When Kernel Programmers Lie to the Verifier: A Tale of Broken Assumptions in eBPF
The Failing Guard Imagine you are a system administrator tasked with a simple security policy: block and log any attempt to execute binaries from the /tmp directory. After some research, you settle on the eBPF Linux Security Module (eBPF LSM). It鈥檚 the perfect tool for the job鈥攊t allows you to hook into the execve path, inspect the filename and arguments, and decide whether to allow the execution. You write the following eBPF code: ...
The Design and Trade-offs of LLVM's Conditional Constant Propagation
Introduction Modern compilers can infer variable values in program code to eliminate certain computation instructions and branches, thereby reducing runtime overhead of compiled artifacts. With these optimizations, programmers can typically obtain well-optimized compiled output while maintaining code readability, without manually specializing each variable. Compilers can infer a variable鈥檚 value or range through branch conditions or assertions. Here鈥檚 a simple example: if (a > 10) { if (a > 5) return 1; return 0; } return 1; Clearly, when the program鈥檚 control flow enters the true branch of the first if statement, a>10 holds, which means a>5 must also hold. Therefore, the nested if statement can be eliminated directly, and the program can be optimized to simply return 1. ...