[ SECURITYLAB_—_BLOGS ]

Long-form writing on runtime, distributed systems, kernel internals, Go concurrency, memory models, eBPF, and assembly walkthroughs.

Blog
Debugging a Real-Mode Bootloader in GDB — When CS Changes, Symbols Break

Debugging a Real-Mode Bootloader in GDB — When CS Changes, Symbols Break

Step through a hand-written x86 bootloader in GDB, hit a far jump, and watch your function names turn to garbage. Nothing crashed — CS changed, and in real mode that moves every address out from under GDB's symbol table. Why it happens and how to keep symbols following you.

2026-09-07 5 min read
Blog
Building a Bootloader from Scratch — Just Assembly, No OS

Building a Bootloader from Scratch — Just Assembly, No OS

512 bytes, no operating system, no standard library, no memory management — BIOS drops you at 0x7c00 in 16-bit real mode and everything after that is yours to build. A hand-written Stage-1 MBR, line by line, and why the exercise surfaces every abstraction you normally stand on.

2026-09-07 5 min read
Blog
Store→Load Reordering: x86 vs ARM64, and the Bug Intel Was Hiding

Store→Load Reordering: x86 vs ARM64, and the Bug Intel Was Hiding

The same lock-free C program runs clean on Intel for hours and fails on ARM64 in a minute. The source is identical. This is store→load reordering — why x86's TSO hides it, why ARM64 exposes it, and what a fence actually does — with a real litmus test and its numbers.

2026-09-06 9 min read
Blog
Real Mode vs Protected Mode on x86: What the GDT and IDT Actually Define

Real Mode vs Protected Mode on x86: What the GDT and IDT Actually Define

Every x86 CPU boots in 16-bit real mode and switches to protected mode in its first moments. That switch is a GDT, an IDT, one bit in CR0 and a far jump, and those two tables are where ring 0 vs ring 3 actually comes from. Walked through real bootloader assembly.

2026-09-06 7 min read
Blog
How x86 Conditional Jumps Really Work — EFLAGS, Not Operands

How x86 Conditional Jumps Really Work — EFLAGS, Not Operands

ja, jb, je, jl don't read your operands. They read bits in EFLAGS that some earlier instruction wrote — and it isn't always the cmp you think. Once you see that in GDB, reverse engineering and crash-dump triage stop being guesswork.

2026-09-06 6 min read
Blog
The Approval Prompt Is Not the Sandbox

The Approval Prompt Is Not the Sandbox

Codex ships 43,591 lines of sandboxing across four platform backends, and treats enforcement and approval as two separate axes. Pi ships none and says so in its README. Both are defensible. What is not defensible is the assumption in between, where a dialog box gets mistaken for a boundary. A source-level look at what your coding agent can actually do to your machine.

2026-09-04 8 min read