ANDROID: add support for Clang's Control Flow Integrity (CFI)
This change adds the CONFIG_CFI_CLANG option, CFI error handling, and a faster look-up table for cross module CFI checks. Bug: 145210207 Change-Id: I118303de50114ca6f85d89a7d69c5cbc47e2f5c0 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <linux/error-injection.h>
|
||||
#include <linux/tracepoint-defs.h>
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/cfi.h>
|
||||
|
||||
#include <linux/percpu.h>
|
||||
#include <asm/module.h>
|
||||
@@ -365,6 +366,10 @@ struct module {
|
||||
const s32 *crcs;
|
||||
unsigned int num_syms;
|
||||
|
||||
#ifdef CONFIG_CFI_CLANG
|
||||
cfi_check_fn cfi_check;
|
||||
#endif
|
||||
|
||||
/* Kernel parameters. */
|
||||
#ifdef CONFIG_SYSFS
|
||||
struct mutex param_lock;
|
||||
|
Reference in New Issue
Block a user