public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Matt Helsley <matthltc@us.ibm.com>,
	"Serge E. Hallyn" <serge.hallyn@canonical.com>,
	Daniel Lezcano <dlezcano@free.fr>,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, Paul Menage <menage@google.com>
Subject: Re: Remaining work for userns
Date: Fri, 30 Jul 2010 17:23:26 -0700	[thread overview]
Message-ID: <m139v0ts75.fsf_-_@fess.ebiederm.org> (raw)
In-Reply-To: <20100729232352.GC13902@hallyn.com> (Serge E. Hallyn's message of "Thu\, 29 Jul 2010 18\:23\:52 -0500")

"Serge E. Hallyn" <serge@hallyn.com> writes:

> Quoting Matt Helsley (matthltc@us.ibm.com):
>> On Thu, Jul 29, 2010 at 05:39:57PM -0500, Serge E. Hallyn wrote:
>> > Quoting Matt Helsley (matthltc@us.ibm.com):
>> > > On Thu, Jul 29, 2010 at 02:58:12PM -0500, Serge E. Hallyn wrote:
>> 
>> <snip>
>> 
>> > 
>> > BTW in the past the only reason I saw for keeping ns cgroup was
>> > to lock tasks into a devices cgroup.  Until that lazy guy who was
>> > going to do it gets off his butt and implements user namespaces,
>> > you'll just have to use LSMs, which is the right way.
>> 
>> And the only missing piece of userns is replacing the cred checks
>> right? If so, it might be possible to come up with a coccinelle semantic
>> patch which would do all/most of the hard work -- depends on whether the
>> all the checks fit a small number of semantic patterns.
>
> I think the thing that always puts the brakes on when I get started
> is siginfo_t.  We need some way to reference user namespaces in there,
> without enforcing lifetime rules on siginfo.

As I recall signal delivery in the kernel lands the signal in the
queue of the destination process before the syscall returns.  If that
is true we should be able to handle signal delivery by just doing
whatever conversions are needed during delivery.

aka the userns should just be task->nsproxy->user_ns for
task->signal->queue.  We cannot unshare the user namespace so there
are no nasty races.

I am reminded that I may want to play with the user namespace and
unshare when I get setns refresh and reviewed for inclusion.  Still
none of that should affect the fact that a task should never be
able to change user namespaces.

> What you mention is definately a chunk as well, so if you are interested
> in pursuing that that'd be great.
>
> Also, reviewing the patches at the top of
> http://git.kernel.org/?p=linux/kernel/git/sergeh/linux-cr.git;a=shortlog;h=refs/heads/userns.feb16.1
> to give us some fresh feedback on the general approach is
> valuable.
>
> And from there, the whole discussion (which we've had several times
> in the past) about how to have the VFS map userids should probably be
> had again.  (I believe august 2008 was the last time we really got
> into that)

We now have user_ns_map_uid and user_ns_map_gid in next-next.git
Serge I'm not certain how that interacts with your other work, but
it is definitely something we want to build on.

Eric


  reply	other threads:[~2010-07-31  0:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 19:56 [PATCH 1/3] cgroup : add clone_children control file Serge E. Hallyn
2010-07-29 19:57 ` [PATCH 2/3] cgroup : make the mount options parsing more accurate Serge E. Hallyn
2010-08-03  8:30   ` Li Zefan
2010-07-29 19:58 ` [PATCH 3/3] cgroup : remove the ns_cgroup Serge E. Hallyn
2010-07-29 21:40   ` Matt Helsley
2010-07-29 22:39     ` Serge E. Hallyn
2010-07-29 23:00       ` Remaining work for userns (WAS Re: [PATCH 3/3] cgroup : remove the ns_cgroup) Matt Helsley
2010-07-29 23:23         ` Serge E. Hallyn
2010-07-31  0:23           ` Eric W. Biederman [this message]
2010-07-29 21:46   ` [PATCH 3/3] cgroup : remove the ns_cgroup Paul Menage
2010-08-03  8:31   ` Li Zefan
2010-08-03  8:30 ` [PATCH 1/3] cgroup : add clone_children control file Li Zefan

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=m139v0ts75.fsf_-_@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dlezcano@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=menage@google.com \
    --cc=serge.hallyn@canonical.com \
    --cc=serge@hallyn.com \
    /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