kernel/kcsan/debugfs.c
Source file repositories/reference/linux-study-clean/kernel/kcsan/debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/kcsan/debugfs.c- Extension
.c- Size
- 8015 bytes
- Lines
- 273
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/atomic.hlinux/bsearch.hlinux/bug.hlinux/debugfs.hlinux/init.hlinux/kallsyms.hlinux/sched.hlinux/seq_file.hlinux/slab.hlinux/sort.hlinux/string.hlinux/uaccess.hkcsan.h
Detected Declarations
function microbenchmarkfunction cmp_filterlist_addrsfunction kcsan_skip_report_debugfsfunction set_report_filterlist_whitelistfunction insert_report_filterlistfunction show_infofunction debugfs_openfunction debugfs_writefunction kcsan_debugfs_init
Annotated Snippet
static const struct file_operations debugfs_ops =
{
.read = seq_read,
.open = debugfs_open,
.write = debugfs_write,
.release = single_release
};
static int __init kcsan_debugfs_init(void)
{
debugfs_create_file("kcsan", 0644, NULL, NULL, &debugfs_ops);
return 0;
}
late_initcall(kcsan_debugfs_init);
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/bsearch.h`, `linux/bug.h`, `linux/debugfs.h`, `linux/init.h`, `linux/kallsyms.h`, `linux/sched.h`, `linux/seq_file.h`.
- Detected declarations: `function microbenchmark`, `function cmp_filterlist_addrs`, `function kcsan_skip_report_debugfs`, `function set_report_filterlist_whitelist`, `function insert_report_filterlist`, `function show_info`, `function debugfs_open`, `function debugfs_write`, `function kcsan_debugfs_init`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.