mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Lennart Poettering <lennart@poettering.net>,
	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>
Subject: Re: [PATCH] exit: PR_SET_ANCHOR for marking processes as reapers for child processes
Date: Thu,  4 Mar 2010 14:14:34 -0800 (PST)	[thread overview]
Message-ID: <20100304221434.17567187@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of  Thursday, 4 March 2010 15:08:22 +0100 <20100304140822.GA458@redhat.com>

> Security. This is beyond my understanding, hopefully the cc'ed
> experts can help.

There are a few different aspects of behavior change to think about.

1. Who can get a SIGCHLD and wait result they weren't expecting.
2. Who sees some PID for getppid() when they are expecting 1.
3. What ps shows.

When I start thinking through what might be security issues, they are
almost all #1 questions.  There is a hairy nest of many variations of #1
questions.  The #2 question is pretty simple, but it also could be an issue
for security when setuid is involved (or just correctness for any
application).

My impression is that #3 is the only actual motivation for this feature.
So perhaps we should consider an approach that leaves the rest of the
semantics alone and only affects that.

Lennart, am I right that this is all you are looking for?  Does it even
matter to you that this change the PPID that ps groks today?  How about if
it's just an entirely new kind of assocation that ps et al can learn to
display, and not even the traditional PPID field changes?

> To me, it looks more natural if PR_SET_ANCHOR marks the whole process as
> a local reaper, not only the thread which called PR_SET_ANCHOR.

Agreed.  It could probably be a bit in signal_struct.flags,
which also means no memory cost for adding the feature.


Thanks,
Roland

  reply	other threads:[~2010-03-04 22:14 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 [this message]
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
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=20100304221434.17567187@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=jmorris@namei.org \
    --cc=kay.sievers@vrfy.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=kyle@redhat.com \
    --cc=lennart@poettering.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@googlemail.com \
    --cc=oleg@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

all inboxes | Powered by JetHome®