
Magic SysRq Keys Every Kernel Developer Should Know
The SysRq commands that matter for kernel debugging, each with what it does and when not to use it, plus how to enable them and the REISUB sequence.
Everything you need to level up your coding skills.

The SysRq commands that matter for kernel debugging, each with what it does and when not to use it, plus how to enable them and the REISUB sequence.

Rust's standard library does not talk to the kernel directly on Linux. It calls libc, which issues the syscall. See the layers from File::open down to openat.

Decode a real x86-64 NULL pointer oops from a module, one line at a time: fault address, error code, RIP, registers, call trace and taint flags.

Define a custom 128-bit GATT service on nRF52 with Zephyr: characteristic properties, read and write callbacks, notifications through the CCC and MTU limits.

Send kernel messages as UDP packets to another host with netconsole, set it up at boot or run time, and receive crash logs that never reach disk.

Read lines of any length in C with getline, reuse one growing buffer, strip the newline, spot read errors and handle files without a final newline.

Tell a kernel warning from an oops, a BUG and a panic by what the kernel does next, which taint flag it sets and which sysctls turn one into another.
Advertise a non-connectable BLE beacon on an nRF52 with Zephyr: advertising data, bt_le_adv_start parameters, intervals and an iBeacon payload.

Read the kernel ring buffer with dmesg and the journal with journalctl -k, filter by level and time, follow new messages and avoid clock and permission traps.

Report failures from a C tool the Unix way: perror, strerror and the err and warn family, with errno saved correctly and messages sent to stderr.

Learn the eight printk log levels, the pr_info and pr_err helpers, pr_fmt prefixes, rate limiting and the console loglevel that decides what reaches the screen.

Flash an nRF52840 Dongle over USB with nrfutil, the built-in bootloader and a DFU package, without a debug probe, then recover it back into bootloader mode.
We send one email when a new post is published. No spam.