From: Oleg Nesterov <oleg@redhat.com>
To: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Adrian Reber <areber@redhat.com>,
Eric Biederman <ebiederm@xmission.com>,
Pavel Emelianov <xemul@virtuozzo.com>,
Jann Horn <jannh@google.com>,
Dmitry Safonov <0x7f454c46@gmail.com>,
linux-kernel@vger.kernel.org, Andrei Vagin <avagin@gmail.com>,
Mike Rapoport <rppt@linux.ibm.com>,
Radostin Stoyanov <rstoyanov1@gmail.com>
Subject: Re: [PATCH v5 1/2] fork: extend clone3() to support CLONE_SET_TID
Date: Mon, 12 Aug 2019 18:57:34 +0200 [thread overview]
Message-ID: <20190812165733.GD31560@redhat.com> (raw)
In-Reply-To: <20190812165130.d3b5smm45dpxk6m4@wittgenstein>
On 08/12, Christian Brauner wrote:
> On Mon, Aug 12, 2019 at 06:37:10PM +0200, Oleg Nesterov wrote:
> > On 08/11, Adrian Reber wrote:
> > >
> > > include/linux/pid.h | 2 +-
> > > include/linux/sched/task.h | 1 +
> > > include/uapi/linux/sched.h | 1 +
> > > kernel/fork.c | 22 ++++++++++++++++++++--
> > > kernel/pid.c | 36 +++++++++++++++++++++++++++++-------
> > > 5 files changed, 52 insertions(+), 10 deletions(-)
> >
> > Looks good to me...
> >
> > A couple of nits below, but I won't insist, feel free to ignore.
> >
> > > +/*
> > > + * Different sizes of struct clone_args
> > > + */
> > > +#define CLONE3_ARGS_SIZE_V0 64
> >
> > I don't really understand why do we want the "size < CLONE3_ARGS_SIZE_V0"
> > check in copy_clone_args_from_user(), but I won't argue.
>
> To make sure a user can't give us a garbage sized struct that is smaller
> than the initial version of the struct.
But why do we want to detect this case?
And why CLONE3_ARGS_SIZE_V0 is special?
Oleg.
next prev parent reply other threads:[~2019-08-12 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-11 20:33 [PATCH v5 1/2] fork: extend clone3() to support CLONE_SET_TID Adrian Reber
2019-08-11 20:33 ` [PATCH v5 2/2] selftests: add tests for clone3() Adrian Reber
2019-08-11 21:37 ` Christian Brauner
2019-08-12 9:40 ` [PATCH v5 1/2] fork: extend clone3() to support CLONE_SET_TID Christian Brauner
2019-08-12 16:37 ` Oleg Nesterov
2019-08-12 16:51 ` Christian Brauner
2019-08-12 16:57 ` Oleg Nesterov [this message]
2019-08-12 17:05 ` 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=20190812165733.GD31560@redhat.com \
--to=oleg@redhat.com \
--cc=0x7f454c46@gmail.com \
--cc=areber@redhat.com \
--cc=avagin@gmail.com \
--cc=christian.brauner@ubuntu.com \
--cc=ebiederm@xmission.com \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rppt@linux.ibm.com \
--cc=rstoyanov1@gmail.com \
--cc=xemul@virtuozzo.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