From: Oleg Nesterov <oleg@redhat.com>
To: Christian Brauner <christian@brauner.io>
Cc: torvalds@linux-foundation.org, viro@zeniv.linux.org.uk,
jannh@google.com, dhowells@redhat.com, linux-api@vger.kernel.org,
linux-kernel@vger.kernel.org, serge@hallyn.com, luto@kernel.org,
arnd@arndb.de, ebiederm@xmission.com, keescook@chromium.org,
tglx@linutronix.de, mtk.manpages@gmail.com,
akpm@linux-foundation.org, cyphar@cyphar.com,
joel@joelfernandes.org, dancol@google.com
Subject: Re: [PATCH v2 2/5] clone: add CLONE_PIDFD
Date: Thu, 18 Apr 2019 15:12:07 +0200 [thread overview]
Message-ID: <20190418131206.GB13701@redhat.com> (raw)
In-Reply-To: <20190418101841.4476-3-christian@brauner.io>
On 04/18, Christian Brauner wrote:
>
> @@ -1674,13 +1729,14 @@ static __latent_entropy struct task_struct *copy_process(
> unsigned long clone_flags,
> unsigned long stack_start,
> unsigned long stack_size,
> + int __user *parent_tidptr,
> int __user *child_tidptr,
> struct pid *pid,
> int trace,
> unsigned long tls,
> int node)
> {
> - int retval;
> + int pidfd = -1, retval;
it seems that initialization is unneeded, but this is cosmetic.
I see no technical problems, feel free to add my reviewed-by.
But let me ask a couple of questions...
Why O_CLOEXEC? I am just curious, I do not really care.
Should we allow CLONE_THREAD | CLONE_PIDFD ?
Are you sure we will never need to extend this interface? If not, then perhaps it
make sense to add something like
if (CLONE_PIDFD) {
unsigned long not_used_yet;
if (get_user(not_used_yet, parent_tidptr) ||
not_used_yet != 0)
return -EINVAL;
}
this way we can easily add more arguments in future or even turn CLONE_PIDFD into
CLONE_MORE_ARGS_IN_PARENT_TIDPTR.
Not that I think this is really good idea, sys_clone2() makes more sense, but still.
Oleg.
next prev parent reply other threads:[~2019-04-18 13:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 10:18 [PATCH v2 0/5] clone: add CLONE_PIDFD Christian Brauner
2019-04-18 10:18 ` [PATCH v2 1/5] Make anon_inodes unconditional Christian Brauner
2019-04-18 10:18 ` [PATCH v2 2/5] clone: add CLONE_PIDFD Christian Brauner
2019-04-18 13:12 ` Oleg Nesterov [this message]
2019-04-18 13:28 ` Christian Brauner
2019-04-18 14:10 ` Oleg Nesterov
2019-04-18 14:15 ` Christian Brauner
2019-04-19 13:39 ` Aleksa Sarai
2019-04-18 10:18 ` [PATCH v2 3/5] signal: use fdget() since we don't allow O_PATH Christian Brauner
2019-04-18 13:17 ` Oleg Nesterov
2019-04-18 15:37 ` Linus Torvalds
2019-04-18 15:53 ` Christian Brauner
2019-04-18 10:18 ` [PATCH v2 4/5] signal: support CLONE_PIDFD with pidfd_send_signal Christian Brauner
2019-04-18 14:26 ` Oleg Nesterov
2019-04-18 15:01 ` Christian Brauner
2019-04-18 10:18 ` [PATCH v2 5/5] samples: show race-free pidfd metadata access Christian Brauner
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=20190418131206.GB13701@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=christian@brauner.io \
--cc=cyphar@cyphar.com \
--cc=dancol@google.com \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=jannh@google.com \
--cc=joel@joelfernandes.org \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=serge@hallyn.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.