include/linux/kfence.h
Source file repositories/reference/linux-study-clean/include/linux/kfence.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/kfence.h- Extension
.h- Size
- 8929 bytes
- Lines
- 255
- 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.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mm.hlinux/types.hlinux/atomic.hlinux/static_key.h
Detected Declarations
struct kmem_obj_infostruct kmem_obj_infofunction constantfunction kfence_allocfunction kfence_freefunction is_kfence_addressfunction kfence_alloc_pool_and_metadatafunction kfence_ksizefunction __kfence_freefunction kfence_handle_page_faultfunction __kfence_obj_info
Annotated Snippet
static inline bool is_kfence_address(const void *addr) { return false; }
static inline void kfence_alloc_pool_and_metadata(void) { }
static inline void kfence_init(void) { }
static inline void kfence_shutdown_cache(struct kmem_cache *s) { }
static inline void *kfence_alloc(struct kmem_cache *s, size_t size, gfp_t flags) { return NULL; }
static inline size_t kfence_ksize(const void *addr) { return 0; }
static inline void *kfence_object_start(const void *addr) { return NULL; }
static inline void __kfence_free(void *addr) { }
static inline bool __must_check kfence_free(void *addr) { return false; }
static inline bool __must_check kfence_handle_page_fault(unsigned long addr, bool is_write,
struct pt_regs *regs)
{
return false;
}
#ifdef CONFIG_PRINTK
struct kmem_obj_info;
static inline bool __kfence_obj_info(struct kmem_obj_info *kpp, void *object, struct slab *slab)
{
return false;
}
#endif
#endif
#endif /* _LINUX_KFENCE_H */
Annotation
- Immediate include surface: `linux/mm.h`, `linux/types.h`, `linux/atomic.h`, `linux/static_key.h`.
- Detected declarations: `struct kmem_obj_info`, `struct kmem_obj_info`, `function constant`, `function kfence_alloc`, `function kfence_free`, `function is_kfence_address`, `function kfence_alloc_pool_and_metadata`, `function kfence_ksize`, `function __kfence_free`, `function kfence_handle_page_fault`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.