[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2-6JNS38EbZcLrk=cTT526oP=Rf0aoqWNSJ-k4XTYehQ@mail.gmail.com>
Date: Tue, 22 Sep 2020 09:23:37 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: Andy Lutomirski <luto@...nel.org>, Christoph Hellwig <hch@....de>,
Al Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Jens Axboe <axboe@...nel.dk>,
David Howells <dhowells@...hat.com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
"open list:MIPS" <linux-mips@...r.kernel.org>,
Parisc List <linux-parisc@...r.kernel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-s390 <linux-s390@...r.kernel.org>,
sparclinux <sparclinux@...r.kernel.org>,
linux-block <linux-block@...r.kernel.org>,
Linux SCSI List <linux-scsi@...r.kernel.org>,
Linux FS Devel <linux-fsdevel@...r.kernel.org>,
linux-aio <linux-aio@...ck.org>, io-uring@...r.kernel.org,
linux-arch <linux-arch@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
Network Development <netdev@...r.kernel.org>,
keyrings@...r.kernel.org,
LSM List <linux-security-module@...r.kernel.org>
Subject: Re: [PATCH 1/9] kernel: add a PF_FORCE_COMPAT flag
On Tue, Sep 22, 2020 at 8:32 AM Pavel Begunkov <asml.silence@...il.com> wrote:
> On 22/09/2020 03:58, Andy Lutomirski wrote:
> > On Mon, Sep 21, 2020 at 5:24 PM Pavel Begunkov <asml.silence@...il.com> wrote:
> > I may be looking at a different kernel than you, but aren't you
> > preventing creating an io_uring regardless of whether SQPOLL is
> > requested?
>
> I diffed a not-saved file on a sleepy head, thanks for noticing.
> As you said, there should be an SQPOLL check.
>
> ...
> if (ctx->compat && (p->flags & IORING_SETUP_SQPOLL))
> goto err;
Wouldn't that mean that now 32-bit containers behave differently
between compat and native execution?
I think if you want to prevent 32-bit applications from using SQPOLL,
it needs to be done the same way on both to be consistent:
if ((!IS_ENABLED(CONFIG_64BIT) || ctx->compat) &&
(p->flags & IORING_SETUP_SQPOLL))
goto err;
I don't really see how taking away SQPOLL from 32-bit tasks is
any better than just preventing access to the known-broken files
as Al suggested, or adding the hack to make it work as in
Christoph's original patch.
Can we expect all existing and future user space to have a sane
fallback when IORING_SETUP_SQPOLL fails?
Arnd
Powered by blists - more mailing lists