The complete story of the in-kernel sloppy GPIO logic analyzer

You know the rules, right? You should not implement a logic analyzer in software because equidistant sampling points cannot be guaranteed. You should also not disable interrupts in your kernel code, and if you really need to, it should be as short as possible. And surely you should not allow userspace to allocate memory without any constraints. Now, one big joy with hacking is breaking such rules and go wild. Listen to Wolfram’s story about the sloppy GPIO logic analyzer. How it started as an internal tool to debug a remote system and evolved into something which is making its way to mainline. You will learn details about upstreaming, the GPIO subsystem, that isolating a CPU core for one specific task is harder than it looks, and that Murphy’s law is still all around in 2022. Oh, and that Kernel hacking is tons of fun, of course.

Wolfram Sang