Comment by cryptonector
7 years ago
That has security considerations when spawning a process to run an executable that gets privilege on exec (think set-uid on Unix).
7 years ago
That has security considerations when spawning a process to run an executable that gets privilege on exec (think set-uid on Unix).
Easy to deal with by not applying privileges until the parent is done tinkering and hits start.
I don't see how. The privilege elevation mechanism cannot apply to an already-running process, since then there will be a way to subvert the process.
Now, the better answer to that is to have nothing like a set-uid mechanism, which would be nice, for sure. But just how much violence are we to do to the Unix model, and when are we expected to finish this? It's not like Linux can be abandoned -- for better or worse, Linux "won".
The paper suggests:
> a new process starts as an empty address space, and an advanced user may manipulate it in a piecemeal fashion, populating its address-space and kernel context prior to execution, without needing to clone the parent nor run code in the context of the child. ExOS [43] implemented fork in user-mode atop such a primitive. Retrofitting cross-process APIs into Unix seems at first glance challenging, but may also be productive for future research.
Specifically, you'd want to do something like:
(Y'know, this looks kind of familiar...)
I'm really not sure what you're implying, can you please state it explicitly? I'd expect this code to look similar to both the CreateProcess and fork models, at the very least.
3 replies →
vfork() is the right tool. I dunno what semantics you have in mind for p_execve().
1 reply →