[lkml]   [2005]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH -mm 1/5] New system call, unshare
On Fri, Dec 09, 2005 at 11:55:02AM +0100, Ingo Molnar wrote:
> * JANAK DESAI <> wrote:
> > [PATCH -mm 1/5] unshare system call: System call handler function
> > sys_unshare
> >+ if (unshare_flags & ~(CLONE_NEWNS | CLONE_VM))
> >+ goto errout;
> just curious, did you consider all the other CLONE_* flags as well, to
> see whether it makes sense to add unshare support for them?

IMO the right thing to do is
* accept *all* flags from the very beginning
* check constraints ("CLONE_NEWNS must be accompanied by CLONE_FS")
and either -EINVAL if they are not satisfied or silently force them.
* for each unimplemented flag check if we corresponding thing
is shared; -EINVAL otherwise.

Then for each flag we care to implement we should replace such check with
actual unsharing - a patch per flag.

CLONE_FS and CLONE_FILES are *definitely* worth implementing and are
trivial to implement. The only thing we must take care of is doing
all replacements under task_lock, without dropping it between updates.
I would say that CLONE_SIGHAND is also an obvious candidate for adding.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-12-09 13:05    [W:0.074 / U:31.824 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site