[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200507071143.b4xp6jeqvsglzjmx@wittgenstein>
Date: Thu, 7 May 2020 09:11:43 +0200
From: Christian Brauner <christian.brauner@...ntu.com>
To: Joe Perches <joe@...ches.com>
Cc: linux-kernel@...r.kernel.org, libc-alpha@...rceware.org,
Peter Zijlstra <peterz@...radead.org>,
Jan Stancek <jstancek@...hat.com>,
Eugene Syromiatnikov <esyr@...hat.com>,
Christian Kellner <christian@...lner.me>,
Aleksa Sarai <cyphar@...har.com>,
Florian Weimer <fw@...eb.enyo.de>,
Andreas Schwab <schwab@...ux-m68k.org>,
Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"Dmitry V. Levin" <ldv@...linux.org>,
Ingo Molnar <mingo@...nel.org>, Serge Hallyn <serge@...lyn.com>
Subject: Re: [PATCH] clone: only use lower 32 flag bits
On Wed, May 06, 2020 at 12:06:10PM -0700, Joe Perches wrote:
> On Tue, 2020-05-05 at 19:44 +0200, Christian Brauner wrote:
> > Jan reported an issue where an interaction between sign-extending clone's
> > flag argument on ppc64le and the new CLONE_INTO_CGROUP feature causes
> > clone() to consistently fail with EBADF.
> []
> > Let's fix this by always capping the upper 32 bits for the legacy clone()
> > syscall. This ensures that we can't reach clone3() only features by
> > accident via legacy clone as with the sign extension case and also that
> > legacy clone() works exactly like before, i.e. ignoring any unknown flags.
> > This solution risks no regressions and is also pretty clean.
> >
> > I've chosen u32 and not unsigned int to visually indicate that we're
> > capping this to 32 bits.
>
> Perhaps use the lower_32_bits macro?
Oh neat, I wasn't aware of this helper since there are no users under
kernel/*
Christian
Powered by blists - more mailing lists