CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

torvalds/linux

Scanned commit f0100363d8 dated 2026-09-21 — last upstream commit. Generated by codevetter 1.12.0 on 2026-09-22.

github.com/torvalds/linux ↗ · 3999 files · 32.7 MB · scan capped

Linux kernel ============ The Linux kernel is the core of any Linux operating system.

Deep analysis by swe-2 via the devin CLI on 2026-09-22 (runtime not recorded) — every claim below links to its cited source files.

Overview

This is the Linux kernel source tree (torvalds/linux) at version 7.3.0-rc4, codename "Baby Opossum Posse" — the monolithic Unix-like kernel that manages hardware, memory, processes, filesystems, networking and security for all Linux userspace. It is written primarily in C (~26MB of C scanned) with a first-class Rust component under rust/ that wraps kernel APIs for in-tree Rust drivers, and is built by a recursive Kbuild system configured through hierarchical Kconfig files. The runtime boundary is the syscall ABI: per-architecture entry code (e.g. arch/x86/entry/) dispatches into generic kernel code where VFS, mm, scheduler and security (LSM) layers mediate everything userspace can do.

System map

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.

All 13 system map claims →

Feature catalog

User-visible features are the syscall surface plus pseudo-filesystems and kernel subsystems. The catalog spans process management (fork/clone3/execve), file I/O (openat2, read/write family, io_uring), sockets and the full network stack, loadable modules, eBPF programs/maps, namespaces and cgroups, SysV/POSIX IPC, the crypto API with AF_ALG userspace access, pluggable schedulers (including BPF-extensible sched_ext), security modules (SELinux, AppArmor, Smack, TOMOYO, Landlock, IPE, Yama, LoadPin), tracing (ftrace, perf events) and sysctl/procfs/sysfs configuration interfaces.

All 13 feature catalog claims →

Data flow

Data enters through arch entry code (syscalls, interrupts, faults), is validated at each layer boundary, and flows through generic frameworks — VFS for files, socket layer for network, the block layer for storage, page-fault machinery for memory. Ownership is layered: user buffers are copied at syscall edges (access_ok, copy_struct_from_user), VFS resolves paths through the dentry/inode caches into struct file, LSM hooks interpose at every security-relevant hop, and the scheduler/RCU control when shared state may be mutated or reclaimed.

Behavior traces

Key flows traced end-to-end: (1) full boot from start_kernel through initcall levels to PID 1 exec of /sbin/init; (2) a syscall from entry_SYSCALL_64 through the generated dispatch switch to sys_openat and VFS path walk; (3) process creation via clone3->kernel_clone->copy_process->wake_up_new_task; (4) module load via finit_module->load_module->do_init_module; (5) scheduling via __schedule's pick_next_task/context_switch; (6) rootfs mounting via prepare_namespace->mount_root->init_mount.

Testing signals

Testing is built into the tree: KUnit (lib/kunit/) is the in-kernel unit-test framework, run at boot via kunit_run_all_tests() or via the tools/testing/kunit/kunit.py harness under UML/QEMU. kselftest (tools/testing/selftests/, ~135 target dirs) provides userspace-driven syscall/feature tests emitting KTAP. Numerous ad-hoc selftest .c files live next to core code (initramfs_test.c, kallsyms_selftest.c, sysctl-test.c, dmapool_test.c, gup_test.c). There is no in-tree CI config — validation is maintainer/review driven, with checkpatch.pl/get_maintainer.pl as local gates; external systems (syzbot, kernelci, 0-day) do continuous testing.

Risk map

The highest-risk paths are the ones that cross privilege boundaries: module loading (ring-0 code injection gated by CAP_SYS_MODULE and signatures), the eBPF verifier, io_uring's single-fd multiplexer over dozens of opcodes, usermodehelper exec, seccomp filter evaluation, and every user-memory copy in syscall bodies. Concurrency hazards concentrate in the RCU path-walk retry ladder and the scheduler's rq-lock protocol. Boot is fail-hard: missing init or corrupt initmem panics the machine.

Extension points

The kernel is extension-by-design: initcall levels order boot-time registration, LSM hook tables add security policies, file_operations/inode_operations/super_operations vtables plug filesystems, struct device_driver + bus match functions plug drivers, register_filesystem adds filesystems, the syscall .tbl files add syscalls, module_init/module_exit wrap loadable code, eBPF program types (including sched_ext and bpf_struct_ops) let userspace extend behavior at runtime, and io_uring opcodes extend async I/O. Rust extensions go through the kernel crate + #[module] proc-macro.

Contributor handoff

This is a review-driven C codebase with hard ABI boundaries (syscalls, UAPI headers, module interface) and strict process rules: coding-style.rst + checkpatch.pl for style, MAINTAINERS + get_maintainer.pl for ownership, submitting-patches.rst for the email workflow, and a dedicated coding-assistants.rst that forbids AI agents from adding Signed-off-by and prescribes an Assisted-by: LLM tag plus a reproducer-then-fix discipline. Safe first edits live in leaf drivers/ or new selftests; touching kernel/sched, mm, fs/namei or arch entry code requires reading the extensive lock-ordering and retry-protocol comments. Test with kunit.py and kselftest; build with make + Kconfig.

Languages

LanguageFilesShare of source
C6453697%
YAML5790docs/config
Shell11672%
JSON1084docs/config
Rust4961%
Python4291%
Markdown9docs/config
C++70%

Start reading here

Probable source entrypoint: lib/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

lib/ (235 files)

Repository structure

Top-level pathFiles
Documentation/236
arch/236
tools/235
include/235
lib/235
net/235
rust/235
fs/235

Docs found: README

Package

tools/net/ynl/pyproject.toml — pyynl v0.0.1, 0 declared dependencies.

Structural health signals

Average score 7.8/10 across 96 analyzed source files; 12 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history