# System map — torvalds/linux

> Canonical page: https://codevetter.com/unpack/linux/system-map

# System map — torvalds/linux

Scanned commit f0100363d8c374bd8e9ea7c9ba02744f0b802ca4 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

The tree is organized as core kernel code (init/, kernel/, mm/, ipc/), a VFS layer with ~50 filesystems (fs/), networking (net/), block layer (block/), io_uring (io_uring/), drivers (drivers/), security modules (security/), crypto (crypto/), per-architecture ports (arch/, 22 architectures), Rust support (rust/), userspace tooling (tools/), documentation (Documentation/, ~4000 rst files) and scripts/ for the build. There is no single binary entrypoint: the linker composes initcall sections and start_kernel() in init/main.c is the canonical C entry after arch-specific setup. Build is driven by the top-level Makefile (VERSION=7 PATCHLEVEL=3 SUBLEVEL=0 EXTRAVERSION=-rc4) plus Kconfig; there are no CI configs in-tree. The runtime boundary is the syscall table, generated from per-arch .tbl files.
- Top-level Makefile pins the release: VERSION=7, PATCHLEVEL=3, SUBLEVEL=0, EXTRAVERSION=-rc4, NAME="Baby Opossum Posse"; requires GNU Make >= 4.0 and uses a recursive Kbuild descent where sub-Makefiles only modify their own directory. — [Makefile#L2-6](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/Makefile#L2-L6) [Makefile#L25-41](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/Makefile#L25-L41)
- start_kernel() in init/main.c is the architecture-independent C entrypoint; it runs a strictly ordered bring-up — set_task_stack_end_magic, smp_setup_processor_id, boot_cpu_init, setup_arch, mm_core_init_early/mm_core_init, sched_init, rcu_init, early_irq_init, init_IRQ, timers_init, hrtimers_init — and ends by calling rest_init(). — [init/main.c#L986-1100](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/init/main.c#L986-L1100) [init/main.c#L1186-1192](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/init/main.c#L1186-L1192)
- rest_init() creates PID 1 by calling kernel_clone() with kernel_init as the thread function and creates kthreadd via kernel_thread(); the boot CPU then becomes the idle thread via schedule_preempt_disabled() and cpu_startup_entry(CPUHP_ONLINE). — [init/main.c#L681-732](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/init/main.c#L681-L732) [kernel/fork.c#L2715-2813](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/kernel/fork.c#L2715-L2813)
- Subsystem initialization is linker-ordered: __define_initcall macros (early_initcall, core_initcall ... device_initcall, late_initcall) emit function pointers into initcall sections, and do_initcalls() walks initcall_levels[0..7] calling do_one_initcall on each entry; do_pre_smp_initcalls() runs the 'early' level before smp_init(). — [include/linux/init.h#L284-311](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/include/linux/init.h#L284-L311) [init/main.c#L1427-1470](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/init/main.c#L1427-L1470) [init/main.c#L1658-1675](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/init/main.c#L1658-L1675)
- The top-level Kconfig file is an aggregator that sources init/Kconfig, kernel/Kconfig.freezer, fs/Kconfig.binfmt, mm/Kconfig, net/Kconfig, drivers/Kconfig, fs/Kconfig, security/Kconfig, crypto/Kconfig, lib/Kconfig, lib/Kconfig.debug, Documentation/Kconfig and io_uring/Kconfig. — [Kconfig#L1-35](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/Kconfig#L1-L35)
- The init/ Makefile links the boot sequence objects: main.o, version.o, mounts.o (do_mounts.o plus do_mounts_rd.o/do_mounts_initrd.o when initrd support is enabled), initramfs.o or noinitramfs.o, calibrate.o and initramfs_test.o under CONFIG_INITRAMFS_TEST. — [init/Makefile#L1-20](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/init/Makefile#L1-L20) [init/do_mounts.c](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/init/do_mounts.c)
- x86-64 syscall entry is arch/x86/entry/entry_64.S entry_SYSCALL_64, which calls do_syscall_64() in arch/x86/entry/syscall_64.c; that function wraps dispatch in syscall_enter_from_user_mode_randomize_stack()/syscall_exit_to_user_mode() and calls do_syscall_x64, which bounds-checks nr with array_index_nospec and calls x64_sys_call — a dense switch generated from <asm/syscalls_64.h> rather than the legacy sys_call_table[] pointer jump. — [arch/x86/entry/entry_64.S#L87-121](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/arch/x86/entry/entry_64.S#L87-L121) [arch/x86/entry/syscall_64.c#L23-90](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/arch/x86/entry/syscall_64.c#L23-L90)
- Syscall numbers and their implementing symbols are declared per-architecture in table files such as arch/x86/entry/syscalls/syscall_64.tbl (e.g. nr 9 mmap -> sys_mmap, nr 16 ioctl -> sys_ioctl), which are compiled into generated headers that build both the switch dispatcher and sys_call_table[] (kept only for trace_syscalls). — [arch/x86/entry/syscalls/syscall_64.tbl](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/arch/x86/entry/syscalls/syscall_64.tbl) [arch/x86/entry/syscall_64.c#L23-43](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/arch/x86/entry/syscall_64.c#L23-L43)
- Rust is a first-class in-tree language: rust/kernel/lib.rs defines a #![no_std] 'kernel' crate that all Rust kernel code depends on, with per-subsystem modules (alloc, block, driver, fs, i2c, ...) gated by CONFIG_* cfgs; its doc comment instructs contributors to wrap missing C APIs in this crate rather than bypass it. — [rust/kernel/lib.rs#L1-60](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/rust/kernel/lib.rs#L1-L60) [rust/macros/module.rs](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/rust/macros/module.rs)
- The device model lives in drivers/base/: bus.c implements bus/driver/device matching and dd.c runs probing via driver_probe_device -> __driver_probe_device -> really_probe, which calls driver_sysfs_add and the driver's probe hook. — [drivers/base/dd.c#L483-900](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/drivers/base/dd.c#L483-L900) [drivers/base/bus.c](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/drivers/base/bus.c) [drivers/base/core.c](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/drivers/base/core.c)
- Loadable kernel modules are handled by kernel/module/main.c: SYSCALL_DEFINE3(init_module) and SYSCALL_DEFINE3(finit_module) both call may_init_module() (CAP_SYS_MODULE + modules_disabled check) then load_module(), which validates the ELF image, checks signatures and modinfo, lays out sections and calls do_init_module(). — [kernel/module/main.c#L3223-3229](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/kernel/module/main.c#L3223-L3229) [kernel/module/main.c#L3433-3667](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/kernel/module/main.c#L3433-L3667) [kernel/module/main.c#L3812-3820](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/kernel/module/main.c#L3812-L3820)
- The LSM layer in security/security.c generates dispatch wrappers via call_int_hook()/call_void_hook() over hook lists declared in include/linux/lsm_hook_defs.h; security/lsm_init.c registers staged LSM initcalls (pure, early, core, subsys, fs) and early_security_init()/security_init() are invoked from start_kernel(). — [security/security.c#L90-515](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/security/security.c#L90-L515) [security/lsm_init.c#L383-544](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/security/lsm_init.c#L383-L544) [include/linux/lsm_hook_defs.h](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/include/linux/lsm_hook_defs.h) [init/main.c#L1011-1014](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/init/main.c#L1011-L1014)
- There is no CI configuration in the repository root (no .github or .gitlab-ci.yml); the contribution pipeline is email/patch based and documented in Documentation/process/, with scripts/checkpatch.pl and scripts/get_maintainer.pl as the local quality gates. — [Documentation/process/submitting-patches.rst](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/Documentation/process/submitting-patches.rst) [scripts/checkpatch.pl](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/scripts/checkpatch.pl) [scripts/get_maintainer.pl](https://github.com/torvalds/linux/blob/f0100363d8c374bd8e9ea7c9ba02744f0b802ca4/scripts/get_maintainer.pl)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
