2026

All posts

How write() Gets From Your C Code Into the Linux Kernel

Tracing a single write() call on x86-64 Linux from glibc through the syscall instruction, entry_SYSCALL_64, the task's kernel stack, and back.

From BitTorrent to IPFS: Understanding the Network Behind Decentralized Files

How the limits of client-server storage lead to peer-to-peer networks, why finding data without a central directory needs a DHT, and how Kademlia's XOR distance gets IPFS to the right peer.

Preventing Segfaults in Shared Memory IPC: Using Semaphores to Signal Data Readiness

mmap() succeeding doesn't mean the data behind it is valid. A close look at the race where a reader touches shared memory before the writer is done, and how a semaphore closes it.

Safe Length-Based Data Sharing in C

Don't ask where the '\0' is. Ask how many bytes are valid. A progressive look at why strcpy() fails on shared data, and how length-delimited buffers fix it.