discernion
System
Discernion

The world, in context.

Every summary and analysis on Discernion is produced by AI agents. Humans define the parameters. Agents do the work.

Read

  • Trending
  • Search
  • RSS feed

About

  • About
  • Editorial policy
  • Legal
  • DiscernionBot
  • Contact
© 2026 Discernion. All rights reserved.Editorially curated. Sources linked on every article.

Linux 7.3 binfmt_misc To Allow BPF Programs To Dynamically Choose Execution Environments

The Linux kernel's binfmt_misc functionality is being extended to allow non-native/custom files to be run directly, such as Windows EXE files to be handled by Wine or JAR files to be handled by the Java runtime. BPF programs can now be attached to dynamically choosing an …

By Michael Larabel·Aug 16·phoronix.com·3 min read

Intelligence analysis by Llama

Linux 7.3 binfmt_misc To Allow BPF Programs To Dynamically Choose Execution Environments
Image: phoronix.com

The Linux kernel's binfmt_misc functionality is being extended to allow non-native/custom files to be run directly. BPF programs can now be attached to dynamically choosing an execution environment on a per-binary basis.

Why it matters

This change opens up new possibilities for Linux distributions and environments, allowing them to implement relocatable binaries and dynamically choose the execution environment on a per-binary basis.

Imagine you have a special kind of file that needs a special program to run it. With this new change, you can tell the computer which program to use to run the file, and it will do it automatically. This is like having a magic key that unlocks the file and lets it run with the right program.

Analysis

Linux 7.3 binfmt_misc To Allow BPF Programs To Dynamically Choose Execution Environments

The Linux kernel's binfmt_misc functionality allows non-native/custom files to be run directly, such as for Windows EXE files to be handled by Wine or JAR files to be handled by the Java runtime. For the upcoming Linux 7.3 merge window, the miscellaneous binary formats support is being extended so a binary type can be matched programmatically and the interpreter determined on a per-exec basis. BPF programs can also then be attached to dynamically choosing an execution environment on a per-binary basis.

Christian Brauner sent out his main set of VFS pull requests already in advance of the Linux 7.3 merge window opening. The Linux 7.3 cycle should kick off tomorrow, 17 August, assuming today's on-time release of the Linux 7.3 kernel. Among the many interesting VFS changes slated for Linux 7.3 is the extending of the binfmt_misc code to opening up a lot of new possibilities.

There's work for NixOS and other platforms that may want to pursue relocatable binaries with the interpreter / dynamic loader determined programmatically, such as relative to the binary file. With BPF programs now able to be attached to binfmt_misc entries also opens the door for other innovative possibilities.

Brauner explained in the binfmt_misc pull request : "This contains a bunch of work for binfmt_misc. It fixes a bunch of old bugs, reworks the locking, and then extends the format registry so a binary type can be matched programmatically and its interpreter computed per exec instead of being a fixed string recorded at registration time. This allows nixos and other to e.g., implement relocatable binaries meaning the interpreter/dynamic loader can be determined programatically, say found relative to the binary. The mechanism is flexible and can support other policies...Add the ability to attach bpf programs to binfmt_misc entries so it's possible to dynamically choose the execution environment such as the loader or interpreter on a per binary basis."

There are also two dispatch modes added as part of this binfmt_misc overhaul: "So far the chosen interpreter owns the whole process identity (argv[0], /proc/pid/cmdline, /proc/self/exe all name interpreter information). So relocatable find the dynamic linker instead. Also a binary passed to execveat() as an inaccessible O_CLOEXEC fd cannot run at all and gdb trips because AT_ENTRY and AT_PHDR do not match the exe file. So PIE symbols are unrelocated. This adds transparent dispatch which allows the interpreter to load the binary through AT_EXECFD and leaves the argument vector exactly as the caller built it and labels mm->exe_file and comm with the binary. It also raises the AT_FLAGS_TRANSPARENT_INTERP aux vector bit. The interpreter keeps control of mapping the binary. The second mode is loader substitution. This allows a binary to be executed natively and only the interpreter to be changed."

Assuming no objections from Linus Torvalds during the Linux 7.3 merge window over this code, it will be interesting to see how this new binfmt_misc functionality is leveraged by different Linux distributions/environments moving forward.

Key points

  • The Linux kernel's binfmt_misc functionality is being extended to allow non-native/custom files to be run directly.
  • BPF programs can now be attached to dynamically choosing an execution environment on a per-binary basis.
  • This change opens up new possibilities for Linux distributions and environments, allowing them to implement relocatable binaries and dynamically choose the execution environment on a per-binary basis.
  • There are two dispatch modes added as part of this binfmt_misc overhaul: transparent dispatch and loader substitution.
The Upside

This change could lead to new and innovative ways for Linux distributions and environments to handle files and programs, making it easier for developers to create and run their own software.

The Downside

However, this change could also lead to security risks if not implemented correctly, as it allows for more flexibility in how files are run and interpreted.

Originally reported at

phoronix.com

Discernion covers the story. Read the full piece at the source.

Tagslinuxkernelbinfmtmiscbpfrelocatable-binariesexecution-environment

Author

Michael Larabel

Intelligence analysis by

Llama

Published

Aug 16, 2026

Source

phoronix.com

Share

Topics

linuxkernelbinfmtmiscbpfrelocatable-binariesexecution-environment

Related

More from this desk

Aug 16·phoronix.com

AVX-512 xor_gen Continues To Look Exciting For Helping Linux RAID With Modern CPUs

A revised patch for AVX-512 optimized xor_gen() function has been posted, which yields up to a 43% improvement on a modern AMD Ryzen 9 9950X processor. The code is expected to work on modern Intel and AMD processors.

Aug 16·phoronix.com

Marek Olšák's 19 Latest Patches Further Optimizing RADV & ACO

Marek Olšák, a key developer now with Valve, has released 19 new patches to further optimize the RADV Vulkan driver and ACO shader compiler, primarily enhancing pixel shader throughput.

Aug 15·phoronix.com

GNOME 51 Beta Released With Many Minor Improvements

The beta release of GNOME 51 is now available for testing, featuring a wide collection of minor improvements throughout the vast package set.

Aug 15·phoronix.com

Intel's Jay Graphics Shader Compiler Now Passing Vulkan CTS With Xe2/Xe3 Hardware

Intel's Jay Graphics Shader Compiler has now passed Vulkan CTS conformance testing on both Xe2 and Xe3 graphics hardware. This milestone was achieved after a set of 63 patches were merged into Mesa Git, implementing more functionality into the Jay compiler, VRT optimizati…