include/linux/cfi.h

Source file repositories/reference/linux-study-clean/include/linux/cfi.h

File Facts

System
Linux kernel
Corpus path
include/linux/cfi.h
Extension
.h
Size
2038 bytes
Lines
88
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

static inline int cfi_get_offset(void) { return 0; }
static inline u32 cfi_get_func_hash(void *func) { return 0; }

#define cfi_bpf_hash 0U
#define cfi_bpf_subprog_hash 0U

#endif /* CONFIG_CFI */

#ifdef CONFIG_ARCH_USES_CFI_TRAPS
bool is_cfi_trap(unsigned long addr);
#else
static inline bool is_cfi_trap(unsigned long addr) { return false; }
#endif

#ifdef CONFIG_MODULES
#ifdef CONFIG_ARCH_USES_CFI_TRAPS
void module_cfi_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
			 struct module *mod);
#else
static inline void module_cfi_finalize(const Elf_Ehdr *hdr,
				       const Elf_Shdr *sechdrs,
				       struct module *mod) {}
#endif /* CONFIG_ARCH_USES_CFI_TRAPS */
#endif /* CONFIG_MODULES */

#ifndef CFI_NOSEAL
#define CFI_NOSEAL(x)
#endif

#endif /* _LINUX_CFI_H */

Annotation

Implementation Notes