From: Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
To: Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: Namespaces exhausted CLONE_XXX bits problem
Date: Mon, 14 Jan 2008 16:20:19 +0100 [thread overview]
Message-ID: <478B7DB3.9050702@fr.ibm.com> (raw)
In-Reply-To: <478B76C4.8050804-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
>>> I started looking at PTYs/TTYs/Console to make the appropriate
>>> namespace and suddenly remembered that we have already
>>> exhausted all the CLONE_ bits in 32-bit mask.
>> yes nearly. 1 left with the mq_namespace i'm going to send.
>
> Yup. That's why I think that we should first solve this
> issue and then send more namespaces.
OK.
>>> So, I recalled the discussions we had and saw the following
>>> proposals of how to track this problem (with their disadvantages):
>>>
>>> 1. make the clone2 system call with 64-bit mask
>>> - this is a new system call
>> sys_clone2 is used on ia64 ... so we would need another name.
>>
>> clone_ns() would be nice but it's too specific to namespaces unless
>> we agree that we need a new syscall specific to namespaces.
>>
>> clone_new or clone_large ?
>
> clone3 :) Just kidding. _If_ implement new system calls then I'd
> better like cloe_ns and unshare_nr pair.
We will find a name.
>>> 2. re-use CLONE_STOPPED
>>> - this will give us only one bit
>> not enough.
>
> Yup :)
>
>>> 3. merge existing bits into one
>>> - we lose the ability to create them separately
>> it would be useful to have such a flag though, something like CLONE_ALLN,
>> because it's the one everyone is going to use.
>>
>> what i've been looking at in December is 1. and 3. : a new general purpose
>> clone syscall with extend flags. The all-in-on flag is not an issue but it
>> would be nice to keep the last clone flag for this purpose.
>>
>> Now, if we use 64bits, we have a few issue/cleanups to solve. First, in
>> kernel land, the clone_flags are passed down to the security modules
>>
>> security_task_create()
>>
>> so we'll have to change to kernel api. I don't remember anything else
>> blocking.
>>
>> In user land, we need to choose a prototype supporting also 32bits arches.
>> so it could be :
>>
>> long sys_clone_new(struct clone_new_args)
>>
>> or
>>
>> long sys_clone_new(... unsigned long flags_high, unsigned long flag_low ...)
>>
>> Second option might be an issue because clone already has 6 arguments.
>> right ?
>
> Yes.
>
>>> 4. implement a sys_unshare_ns system call with 64bit/arbitrary mask
>>> - this is anew system call
>> I think that a new clone deserves a new unshare.
>>
>>> - this will bring some dissymmetry between namespaces
>> what do you mean ?
>
> I mean, that soe namespaces will be unshare-only, but some
> clone-and-unshare.
OK. we still have that already. pid namespace for instance.
>>> 5. use sys_indirect
>>> - this one is not in even -mm tree yet and it's questionable
>>> whether it will be at all
>> I don't know much about that one.
>>
>> C.
>
> So you seem to prefer a "new system call" approach, right?
yes.
to be more precise :
long sys_clone_something(struct clone_something_args args)
and
long sys_unshare_something(struct unshare_something_args args)
The arg passing will be slower bc of the copy_from_user() but we will
still have the sys_clone syscall for the fast path.
C.
next prev parent reply other threads:[~2008-01-14 15:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 13:45 Namespaces exhausted CLONE_XXX bits problem Pavel Emelyanov
[not found] ` <478B6764.6050300-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-01-14 14:44 ` Cedric Le Goater
[not found] ` <478B7549.2020000-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-01-14 14:50 ` Pavel Emelyanov
[not found] ` <478B76C4.8050804-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-01-14 15:20 ` Cedric Le Goater [this message]
[not found] ` <478B7DB3.9050702-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-01-14 16:32 ` Serge E. Hallyn
[not found] ` <20080114163246.GA31663-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2008-01-14 16:52 ` Pavel Emelyanov
[not found] ` <478B9345.30004-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-01-14 18:07 ` Serge E. Hallyn
[not found] ` <20080114180748.GA2772-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2008-01-14 21:36 ` Oren Laadan
[not found] ` <478BD5CD.7030607-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-01-14 21:54 ` Dave Hansen
2008-01-15 8:25 ` Pavel Emelyanov
[not found] ` <478C6E14.1050901-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-01-15 8:39 ` Cedric Le Goater
[not found] ` <478C7156.2090004-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-01-15 8:53 ` Pavel Emelyanov
[not found] ` <478C7493.8070405-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-01-15 9:40 ` Cedric Le Goater
[not found] ` <478C7F95.6050800-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-01-15 9:57 ` Pavel Emelyanov
2008-01-15 9:22 ` Dave Hansen
2008-01-15 9:24 ` Pavel Emelyanov
[not found] ` <478C7BD1.7040905-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-01-15 15:08 ` Serge E. Hallyn
[not found] ` <20080115150806.GH4453-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2008-01-15 15:51 ` Cedric Le Goater
2008-01-15 7:53 ` Cedric Le Goater
[not found] ` <478C665C.80106-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-01-15 14:35 ` Serge E. Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=478B7DB3.9050702@fr.ibm.com \
--to=clg-nmtc/0zbporqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox