Re: [RFC PATCH v1 00/13] exec: add spawn templates for repeated executable startup
Kees Cook <[email protected]>
| Newsgroups | org.kernel.vger.linux-api,org.kernel.vger.linux-arch,org.kernel.vger.linux-doc,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kvack.linux-mm |
|---|---|
| Message-ID | <202606011254.5FCBD65@keescook> |
On Thu, May 28, 2026 at 01:02:53PM +0200, Christian Brauner wrote: > On Thu, May 28, 2026 at 05:52:21PM +0800, Li Chen wrote: > > Hi, > > > > This is an early RFC for an idea that is probably still rough in both the > > UAPI and implementation details. Sorry for the rough edges; I am sending > > it now to check whether this direction is worth pursuing and to get > > feedback on the kernel/userspace boundary. > > The idea of having a builder api for exec isn't all that crazy. But it > should simply be built on top of pidfds and thus pidfs itself instead. > It has all the basic infrastructure in place already. Any implementation > should also allow userspace to implement posix_spawn() on top of it. > > fd = pidfd_open(0, PIDFD_EMPTY /* or better name */) > > pidfd_config(fd, ...) // modeled similar to fsconfig() FWIW, I agree this should be modelled after fsconfig and built on pidfs. Doing so will avoid a bunch of design issues, etc. -Kees -- Kees Cook