|
|
Log in / Subscribe / Register

Should take an FD to the executable

Should take an FD to the executable

Posted Aug 4, 2026 14:27 UTC (Tue) by chris_se (subscriber, #99706)
In reply to: Should take an FD to the executable by bluca
Parent article: The beginning of a process-builder API

> > The path field is a pointer to a string containing the path to the executable that the new process should run
>
> This really should also take an FD to the executable...

I tend to agree with this - but should that be restricted to only O_PATH fds referencing existing files on disk, or could one also consider e.g. a memfd (possibly requiring it to be sealed) where e.g. a JIT previously put the result of a run-time compilation? The latter could be quite useful in some circumstances (but also quite useful for hiding malware in non-obvious ways, so YMMV).


to post comments

Should take an FD to the executable

Posted Aug 7, 2026 9:27 UTC (Fri) by justincormack (subscriber, #70439) [Link]

You can already exec a memfd, you can pass the procfs path to the fd.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds