Linux kernel will support $ORIGIN, sort of

https://news.ycombinator.com/rss Hits: 36
Summary

For some reason, during TacoSprint 2026 I decided to see if we could tackle relocatable binaries in Nix. I enjoy these lofty goals to push Nix and the surrounding ecosystem forward. I am bold if not stupid. I left the last earlier post with one potential idea of how to get there: We could patch the Linux kernel so that $ORIGIN is supported in PT_INTERP and the shebang. I waded through the complexity of sending patches over email (turns out I actually enjoy this workflow!), and sent a proposal to the Linux kernel mailing list. My first attempt here proposed simply adding direct support for $ORIGIN in the Virtual File System (VFS) subsystem. I waited nervously. I was expecting the result from what I had come to read about online; someone non-politely telling me to F$#CK OFF because there is something I missed, misunderstood or did not consider. 馃が The result was completely different. 馃槻 Christian Brauner, the maintainer for VFS responded to me in good faith, asking for the rationale for the change and eventually proposing some ways in which such a support could make it into the subsystem. Note It definitely helped having someone like John Ericson chime in and advocate why having a non-fixed interpreter (PT_INTERP) is useful to Nix and other use-cases (i.e. Buck & Bazel). He offered that potentially we could leverage eBPF as a programmable way to select an interpreter through binfmt_misc. Whoa! 馃く I wanted to merely allow $ORIGIN but a programmable selection could let us do anything! The idea must have really intrigued him because soon-after, on his vacation, Christian offered the first draft of such a solution. We went back and forth a little over the mailing list and the end result is a patch series that will make its way into -next branch in the near future. If you don鈥檛 know what eBPF is or binfmt_misc, WTF did we just collaborate on? Let鈥檚 take a look! I won鈥檛 do eBPF justice, and there are plenty of articles online about it as it鈥檚 quite in-vogue at the moment. tl;d...

First seen: 2026-07-21 08:22

Last seen: 2026-07-22 22:52