What Happens When open() Is Called

An axiomatic, step-by-step deconstruction of the Linux open() system call.

STAGE 1: User Space → Syscall

From open("file") in C to the syscall assembly instruction.

Topics: Headers, Preprocessor, Compilation, Linking, PLT/GOT, Assembly.

STAGE 2: Kernel Space - The Filename

Tracing the first kernel function: getname().

Topics: struct filename, Slab Allocator, kprobes, User-to-Kernel Copy.

STAGE 2b: Kernel Space - The Return Cavern

Tracing the return of do_filp_open().

Topics: struct file, Atomics, Error Pointers, Dentry Name Verification.

STAGE 3: Kernel Space - Flags & Mode

Coming soon: build_open_flags() and get_unused_fd_flags().