
Print All Environment Variables Using environ
The global environ is the NULL-terminated array behind getenv. Loop over it to list every NAME=value entry, split entries safely and avoid the stale envp trap.
Processes, threads, files, memory mapping, signals, IPC and sockets through POSIX and Win32: the core every other kind of system is built on.

The global environ is the NULL-terminated array behind getenv. Loop over it to list every NAME=value entry, split entries safely and avoid the stale envp trap.

Pass parameters to a Linux kernel module with module_param: types, permissions, MODULE_PARM_DESC, insmod and modprobe.d usage, and /sys/module values.

insmod loads one .ko by path, and modprobe loads by name with dependencies from modules.dep and modprobe.d. See how each works, what fails and which to use.

The kernel copies argc and argv onto the new process's stack on execve, then startup code hands them to main. See the layout and measure it with a program.

Write, build and load your first Linux kernel module in C: the init and exit functions, MODULE_LICENSE, a Makefile and insmod, with the exact dmesg output.

setenv copies its arguments and honors an overwrite flag, unsetenv removes a name, and putenv stores your pointer. Learn the rules and what children inherit.

getenv returns a pointer to a variable's value, or NULL when it is unset. Check for NULL, tell empty from unset, copy what you keep and parse numbers safely.

Run code in the child between fork and exec with CommandExt::pre_exec, learn which calls are async-signal-safe, and see how errors propagate to spawn.

Run the Rust doctests of the kernel crate and write your own kunit_tests suite on Linux 6.18, with kunit.py, KTAP output and the limits of each test kind.

Stop passing raw i32 descriptors around. Use OwnedFd to close on drop and BorrowedFd to lend a descriptor safely, with the AsFd trait, since Rust 1.63.

Compare one Linux 6.18 module in C and Rust for safety, error handling, build cost and API coverage, then pick the language for your next kernel module.

Write, build and load a first Rust kernel module in a Linux 6.18 tree: the module! macro, init and Drop, KVec, Kconfig and Makefile entries and dmesg output.
We send one email when a new post is published. No spam.