RFC: on adding new CLONE_* flags [WAS Re: [PATCH 0/4] clone: add CLONE_PIDFD]

From
Enrico Weigelt, metux IT consult <hidden>
Date
2019-04-15 10:09:00
Also in
lkml
Reply to
Christian Brauner, 2019-04-14
On 14.04.19 22:14, Christian Brauner wrote:

Hi folks,
This patchset makes it possible to retrieve pid file descriptors at
process creation time by introducing the new flag CLONE_PIDFD to the
clone() system call as previously discussed.
Sorry, for highjacking this thread, but I'm curious on what things to
consider when introducing new CLONE_* flags.

The reason I'm asking is:

I'm working on implementing plan9-like fs namespaces, where unprivileged
processes can change their own namespace at will. For that, certain
traditional unix'ish things have to be disabled, most notably suid.
As forbidding suid can be helpful in other scenarios, too, I thought
about making this its own feature. Doing that switch on clone() seems
a nice place for that, IMHO.

As there might be potentially even more CLONE_* flags in the future,
and the bitmask size is limited, this raises the question on how to
proceed with those flag additions in the future.

What's your thoughts on that ?


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287
Thread (40 messages) 40 messages, 13 authors, last reply 2019-05-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help