
How Stack Canaries Catch Buffer Overflows at Runtime
A stack canary is a secret value placed before the return address and checked before ret. See how GCC emits it, where glibc stores it, and what it misses.
Tag
445 posts

A stack canary is a secret value placed before the return address and checked before ret. See how GCC emits it, where glibc stores it, and what it misses.

A clock cycle is one tick of the signal that paces a processor. Learn what GHz measures, why it is not performance, and how to convert cycles to time in C.

Use gst-inspect-1.0 to list GStreamer plugins, read an element's pads, caps and properties, and find which package provides a missing decoder.

Replace select with poll and struct pollfd to serve many clients in C without the FD_SETSIZE limit, and learn the POLLIN, POLLHUP and POLLNVAL revents.

Start OS threads in Rust with std::thread::spawn, move data in with move closures, read results from JoinHandle and handle a panicking thread safely.

Replace one rule per source file with a single %.o: %.c pattern rule, add automatic header dependencies with -MMD, and know when make's built-in rule is enough.

Write, translate, compile and run a first CICS COBOL program that shows a message on a 3270 screen with EXEC CICS SEND TEXT.

Add a TMP102 temperature sensor to an I2C bus in a device tree with compatible, reg and status, then check that Linux bound the driver and exposes a reading.

Build the same NASM program two ways on Linux x86-64: a freestanding _start binary linked with ld, and a main function linked with gcc against libc.

Run code every N milliseconds in Zephyr with k_timer, including one-shot and periodic modes, the expiry callback rules and how to wake a thread from it.

A cheat sheet of the errno values you meet most on Linux, such as ENOENT, EACCES, EINTR and EAGAIN, with the cause, the reaction and when not to retry.

Build an STM32F4 blinky with no HAL: one C file, a short linker script, a vector table and the arm-none-eabi-gcc commands that produce a flashable binary.