mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <christian.brauner@ubuntu.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, libc-alpha@sourceware.org,
	Peter Zijlstra <peterz@infradead.org>,
	Jan Stancek <jstancek@redhat.com>,
	Eugene Syromiatnikov <esyr@redhat.com>,
	Christian Kellner <christian@kellner.me>,
	Aleksa Sarai <cyphar@cyphar.com>,
	Florian Weimer <fw@deneb.enyo.de>,
	Andreas Schwab <schwab@linux-m68k.org>,
	Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Dmitry V. Levin" <ldv@altlinux.org>,
	Ingo Molnar <mingo@kernel.org>, Serge Hallyn <serge@hallyn.com>
Subject: Re: [PATCH] clone: only use lower 32 flag bits
Date: Thu, 7 May 2020 09:11:43 +0200	[thread overview]
Message-ID: <20200507071143.b4xp6jeqvsglzjmx@wittgenstein> (raw)
In-Reply-To: <aa9e029703e184a56bcab9f0992cfff316136d16.camel@perches.com>

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

      reply	other threads:[~2020-05-07  7:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 17:44 Christian Brauner
2020-05-06 19:06 ` Joe Perches
2020-05-07  7:11   ` Christian Brauner [this message]

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=20200507071143.b4xp6jeqvsglzjmx@wittgenstein \
    --to=christian.brauner@ubuntu.com \
    --cc=christian@kellner.me \
    --cc=cyphar@cyphar.com \
    --cc=esyr@redhat.com \
    --cc=fw@deneb.enyo.de \
    --cc=joe@perches.com \
    --cc=jstancek@redhat.com \
    --cc=ldv@altlinux.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=schwab@linux-m68k.org \
    --cc=serge@hallyn.com \
    --cc=tglx@linutronix.de \
    --cc=tj@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

all inboxes | Powered by JetHome®