linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tycho Andersen <tycho@tycho.ws>
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Christian Brauner <christian@brauner.io>,
	linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	luto@kernel.org, arnd@arndb.de, keescook@chromium.org,
	akpm@linux-foundation.org, jannh@google.com, oleg@redhat.com,
	cyphar@cyphar.com, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org, dancol@google.com,
	timmurray@google.com, fweimer@redhat.com, tglx@linutronix.de,
	x86@kernel.org, ebiederm@xmission.com
Subject: Re: [PATCH v7 2/2] selftests: add tests for pidfd_send_signal()
Date: Tue, 8 Jan 2019 10:58:43 -0700	[thread overview]
Message-ID: <20190108175843.GA26016@cisco> (raw)
In-Reply-To: <20190108175415.GA22353@mail.hallyn.com>

On Tue, Jan 08, 2019 at 11:54:15AM -0600, Serge E. Hallyn wrote:
> On Tue, Jan 08, 2019 at 10:53:06AM -0700, Tycho Andersen wrote:
> > On Wed, Jan 02, 2019 at 05:16:54PM +0100, Christian Brauner wrote:
> > > +			/*
> > > +			 * Stop the child so we can inspect whether we have
> > > +			 * recycled pid PID_RECYCLE.
> > > +			 */
> > > +			close(pipe_fds[0]);
> > > +			ret = kill(recycled_pid, SIGSTOP);
> > > +			close(pipe_fds[1]);
> > > +			if (ret) {
> > > +				(void)wait_for_pid(recycled_pid);
> > > +				_exit(PIDFD_ERROR);
> > > +			}
> > 
> > Sorry for being late to the party, but I wonder if this whole thing
> > couldn't be simplified with /proc/sys/kenrel/ns_last_pid?
> 
> no, bc it's not namespaced :)

Huh? It looks like it is...

static int pid_ns_ctl_handler(struct ctl_table *table, int write,
                void __user *buffer, size_t *lenp, loff_t *ppos)
{
        struct pid_namespace *pid_ns = task_active_pid_ns(current);
        struct ctl_table tmp = *table;
        int ret, next;

        if (write && !ns_capable(pid_ns->user_ns, CAP_SYS_ADMIN))
                return -EPERM;

        ...

Tycho

  reply	other threads:[~2019-01-08 17:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02 16:16 [PATCH v7 1/2] signal: add pidfd_send_signal() syscall Christian Brauner
2019-01-02 16:16 ` [PATCH v7 2/2] selftests: add tests for pidfd_send_signal() Christian Brauner
2019-01-08 17:53   ` Tycho Andersen
2019-01-08 17:54     ` Serge E. Hallyn
2019-01-08 17:58       ` Tycho Andersen [this message]
2019-01-08 18:17         ` Serge E. Hallyn
2019-01-08 18:20           ` Tycho Andersen
2019-01-08 18:21             ` Serge E. Hallyn
2019-01-08 18:24             ` Christian Brauner
2019-01-08 18:25               ` Tycho Andersen
2019-01-08 23:47 ` [PATCH v7 1/2] signal: add pidfd_send_signal() syscall Christian Brauner
2019-02-15  5:00 ` Tycho Andersen

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=20190108175843.GA26016@cisco \
    --to=tycho@tycho.ws \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=christian@brauner.io \
    --cc=cyphar@cyphar.com \
    --cc=dancol@google.com \
    --cc=ebiederm@xmission.com \
    --cc=fweimer@redhat.com \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=oleg@redhat.com \
    --cc=serge@hallyn.com \
    --cc=tglx@linutronix.de \
    --cc=timmurray@google.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).