kernel/bpf/bpf_lsm_proto.c
Source file repositories/reference/linux-study-clean/kernel/bpf/bpf_lsm_proto.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/bpf/bpf_lsm_proto.c- Extension
.c- Size
- 523 bytes
- Lines
- 20
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/fs.hlinux/bpf_lsm.h
Detected Declarations
function mmap_file
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2025 Google LLC.
*/
#include <linux/fs.h>
#include <linux/bpf_lsm.h>
/*
* Strong definition of the mmap_file() BPF LSM hook. The __nullable suffix on
* the struct file pointer parameter name marks it as PTR_MAYBE_NULL. This
* explicitly enforces that BPF LSM programs check for NULL before attempting to
* dereference it.
*/
int bpf_lsm_mmap_file(struct file *file__nullable, unsigned long reqprot,
unsigned long prot, unsigned long flags)
{
return 0;
}
Annotation
- Immediate include surface: `linux/fs.h`, `linux/bpf_lsm.h`.
- Detected declarations: `function mmap_file`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: source implementation candidate.
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.