From: ebiederm@xmission.com (Eric W. Biederman)
To: Lennart Poettering <mzxreary@0pointer.de>
Cc: Oleg Nesterov <oleg@redhat.com>,
linux-kernel@vger.kernel.org,
Americo Wang <xiyou.wangcong@gmail.com>,
James Morris <jmorris@namei.org>,
Kay Sievers <kay.sievers@vrfy.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Kyle McMartin <kyle@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Michael Kerrisk <mtk.manpages@googlemail.com>,
Roland McGrath <roland@redhat.com>
Subject: Re: [PATCH] exit: PR_SET_ANCHOR for marking processes as reapers for child processes
Date: Wed, 10 Mar 2010 20:14:55 -0800 [thread overview]
Message-ID: <m1wrxjcx4w.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20100306001616.GH28657@tango.0pointer.de> (Lennart Poettering's message of "Sat\, 6 Mar 2010 01\:16\:16 +0100")
Lennart Poettering <mzxreary@0pointer.de> writes:
> On Thu, 04.03.10 15:08, Oleg Nesterov (oleg@redhat.com) wrote:
>
>> Should we clear ->child_anchor flags when the "sub-init" execs? Or,
>> at least, when the task changes its credentials? Probably not, but
>> dunno.
>
> Since this flag is only useful for a very well defined type of processes
> (i.e. session managers, supervising daemons, init systems) it might make
> sense to reset it automatically when privs are dropped or we exec
> something. After all, I don't see how we'd gain any useful functionality
> when we allow this flag to continue to be set. However we would
> certainly be on the safer side when we reset it, because that way it can
> never leak it to processes that are differently privileged or do not
> expect it.
>
> So, for the sake of being on the safe side, I think we should reset the
> flag on exec()/setuid().
>
>> It is a bit strange that PR_SET_ANCHOR acts per-thread, not per
>> process.
>
> Yes, I agree, this should be per-process indeed.
Have you take a look at the pid namespace?
Except for the fact it requires privilege to create it seems to do
what you want. It is certainly what I have been using when I want
an inescapable environment.
If nothing else I get the feeling that what you are after is
a generalization of the child_reaper feature in the pid namespace
and yet you haven't touched any of that code.
Eric
next prev parent reply other threads:[~2010-03-11 4:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 12:04 Lennart Poettering
2010-02-03 8:24 ` KOSAKI Motohiro
2010-02-03 9:53 ` Lennart Poettering
2010-02-03 15:31 ` Américo Wang
2010-02-03 17:49 ` Lennart Poettering
2010-02-05 9:54 ` Américo Wang
2010-02-11 10:21 ` Kay Sievers
2010-02-04 15:42 ` Kay Sievers
2010-02-04 20:59 ` Kay Sievers
2010-03-04 14:08 ` Oleg Nesterov
2010-03-04 22:14 ` Roland McGrath
2010-03-05 18:51 ` Kay Sievers
2010-03-05 19:18 ` Roland McGrath
2010-03-06 0:24 ` Lennart Poettering
2010-03-09 0:45 ` Ray Lee
2010-03-09 13:19 ` Oleg Nesterov
2010-03-06 0:20 ` Lennart Poettering
2010-03-08 23:11 ` Roland McGrath
2010-03-05 4:47 ` KOSAKI Motohiro
2010-03-05 18:55 ` Kay Sievers
2010-03-06 0:16 ` Lennart Poettering
2010-03-11 4:14 ` Eric W. Biederman [this message]
2010-03-11 7:56 ` KOSAKI Motohiro
2010-12-20 14:26 ` Scott James Remnant
2010-12-20 14:51 ` Kay Sievers
2010-12-21 9:56 ` Lennart Poettering
2010-12-21 12:05 ` Scott James Remnant
2010-12-23 15:44 ` Lennart Poettering
2010-12-23 16:00 ` Scott James Remnant
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=m1wrxjcx4w.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=jmorris@namei.org \
--cc=kay.sievers@vrfy.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=kyle@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@googlemail.com \
--cc=mzxreary@0pointer.de \
--cc=oleg@redhat.com \
--cc=roland@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=xiyou.wangcong@gmail.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
Powered by JetHome