News › linux

Linux 7.3 Enhances binfmt_misc with Dynamic BPF Environment Selection

By Zayden R., August 16, 2026

Linux 7.3 introduces dynamic execution environments for binfmt_misc, allowing BPF programs to determine execution settings per binary. This advancement extends flexibility for systems like NixOS.

The upcoming Linux 7.3 release marks a significant enhancement to the kernel's binfmt_misc functionality, enabling BPF programs to dynamically select execution environments on a per-binary basis. This change, spearheaded by Christian Brauner, is set to expand the versatility of miscellaneous binary format support, a feature that allows non-native files like Windows EXEs or Java JARs to be executed directly by associating them with suitable interpreters.

For engineers, this means the interpreter or dynamic loader can now be determined programmatically, rather than being fixed at registration time. Such flexibility is particularly beneficial for systems like NixOS, which may want to implement relocatable binaries where the interpreter is found relative to the binary file itself. With this update, binfmt_misc entries can now have BPF programs attached, allowing for innovative execution policies tailored to specific binaries.

Brauner's pull request details the extensive work done on binfmt_misc, including bug fixes and a reworking of the locking mechanism. The format registry has been extended, allowing for a more dynamic approach to binary execution. This change opens up new possibilities, such as implementing policies where the execution environment, including the loader or interpreter, is chosen dynamically per binary.

Additionally, two new dispatch modes have been introduced, which redefine how process identity is managed. Previously, the chosen interpreter would own the entire process identity, but with relocatable binaries, the dynamic linker is identified instead. This overhaul not only addresses longstanding issues but also paves the way for further innovation in how Linux manages non-native executable formats.

Sources

Practice this on a real machine

The Linux Camp teaches these topics as hands-on labs on real virtual machines, verified as you type.