#include <linux/cfi.h>
enum bug_trap_type report_cfi_failure(struct pt_regs *regs, unsigned long addr,
unsigned long *target, u32 type)
{ … }
#ifdef CONFIG_ARCH_USES_CFI_TRAPS
static inline unsigned long trap_address(s32 *p)
{ … }
static bool is_trap(unsigned long addr, s32 *start, s32 *end)
{ … }
#ifdef CONFIG_MODULES
void module_cfi_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
struct module *mod)
{ … }
static bool is_module_cfi_trap(unsigned long addr)
{ … }
#else
static inline bool is_module_cfi_trap(unsigned long addr)
{
return false;
}
#endif
extern s32 __start___kcfi_traps[];
extern s32 __stop___kcfi_traps[];
bool is_cfi_trap(unsigned long addr)
{ … }
#endif