Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

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 ne 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…

Linux 7.3 introduces a new feature called binfmt_misc, which allows BPF programs to dynamically choose execution environments. This modification fixes several old bugs, reworks the locking mechanism, and extends the format registry. The format registry now enables binary types to be matched programmatically, and their interpreters are computed per exec instead of being fixed strings recorded at registration time.

This new capability facilitates the creation of relocatable binaries, where the interpreter/dynamic loader can be determined programmatically, such as being found relative to the binary. The mechanism is flexible and can accommodate other policies.

Additionally, the update enables attaching BPF programs to binfmt_misc entries, allowing for dynamic selection of the execution environment (e.g., loader or interpreter) on a per-binary basis. Prior to this update, the chosen interpreter owned the entire process identity, including argv[0], /proc/pid/cmdline, and /proc/self/exe.

However, relocatable binaries would need to find the dynamic linker, and binaries passed to execveat() as inaccessible O_CLOEXEC file descriptors could not run at all. Furthermore, gdb would trip because AT_ENTRY and AT_PHDR did not match the exe file, rendering PIE symbols unrelocated.

The latest addition to binfmt_misc is transparent dispatch, which allows the interpreter to load the binary through AT_EXECFD. The argument vector remains exactly as the caller built it, and the mm-exe_file and comm labels are assigned to the binary. Moreover, the AT_FLAGS_TRANSPARENT_INTERP aux vector bit is raised. The interpreter retains control of mapping the binary.

In parallel, there is a second mode called loader substitution. This mode enables a binary to be executed natively, with only the interpreter being altered. Michael Larabel, the principal author of Phoronix.com and founder of the site in 2004, has authored over 20,000 articles covering Linux hardware support, performance, graphics drivers, and various topics. He also serves as the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software.

Written by urgent.news from Phoronix's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at phoronix.com →

More in Tech

A Tour of Magit's Status Interface

  • Magit Status interface shows repository state with Head, Merge, Push, and Tag sections.
  • Recent commits listed in second section, collapsed by default.
  • Interactive interface allows staging, unstaging, and managing untracked files.

Airtel Switches On a Satellite Phone Link in the DR Congo

Airtel Congo has switched on a Starlink satellite link for ordinary Android handsets, the first commercial service of its kind on the continent.

  • Airtel Congo launched Airtel Starlink DRC on 14 August 2026.
  • Service connects Android phones to SpaceX satellites without dish.
  • Supports text, low-bandwidth apps, with 30-day free trial.
PMD Predicts 5 Days of Heavy Rain

PMD Predicts 5 Days of Heavy Rain

The Pakistan Meteorological Department (PMD) has forecast heavy rain, wind and thunderstorms across the country’s upper and central regions during … Read More The post PMD Predicts 5 Days of Heavy…

More from Sunday 16 August →