Fill a sockaddr_un and compute the right address length
Fill sockaddr_un with a bounded copy and pass offsetof(sun_path) plus strlen plus 1 as the length to bind, on Linux with glibc 2.40.
Short posts that solve one thing: the code, the output we got, and why it works.
Fill sockaddr_un with a bounded copy and pass offsetof(sun_path) plus strlen plus 1 as the length to bind, on Linux with glibc 2.40.
See every object, archive and shared library GNU ld 2.43 actually opens during a link with -Wl,--trace, in the order it reads them.
shm_open creates an object of size zero, so call ftruncate before mmap or the first touch of the mapping raises SIGBUS, on Linux with glibc 2.40.
Name Linux core files after the program and PID with kernel.core_pattern and the %e and %p specifiers, so crashes do not overwrite each other.
Add a ::respawn: line to BusyBox /etc/inittab so init restarts a daemon every time it exits, with no extra supervisor installed.
pipe fills a two-element array with a read end and a write end, and one process can write and read both ends because the kernel buffers the data.
Print Clang's abstract syntax tree for a C file with clang -Xclang -ast-dump -fsyntax-only, no object file needed, using Clang 19.
musl defines no identifying macro, so detect it by asking the compiler for its target triple with -dumpmachine, then fall back to a negative glibc test.
Use kzalloc(sizeof(*p), GFP_KERNEL) instead of kmalloc plus memset so new kernel structures never leak stale heap bytes to user space on Linux 6.x.
Check whether a path is a directory with stat and the S_ISDIR macro on Linux 6.12, and know when lstat gives a different answer for a symlink.
Trace a whole group of syscalls with strace 6.x by naming a class such as -e trace=%file or %network instead of listing every call.
ldd lists the shared libraries a program will load, but on glibc it can run the program, so use readelf -d for binaries you do not trust.
We send one email when a new post is published. No spam.