lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 Jan 2021 16:07:46 -0800
From:   Andy Lutomirski <luto@...nel.org>
To:     Arnd Bergmann <arnd@...nel.org>, Christoph Hellwig <hch@....de>
Cc:     Ryan Houdek <sonicadvance1@...il.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Arnd Bergmann <arnd@...db.de>,
        Christian Brauner <christian.brauner@...ntu.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Minchan Kim <minchan@...nel.org>,
        Aleksa Sarai <cyphar@...har.com>,
        Sargun Dhillon <sargun@...gun.me>,
        Miklos Szeredi <mszeredi@...hat.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        "Amanieu d'Antras" <amanieu@...il.com>,
        Willem de Bruijn <willemb@...gle.com>,
        YueHaibing <yuehaibing@...wei.com>,
        Xiaoming Ni <nixiaoming@...wei.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Joe Perches <joe@...ches.com>, Jan Kara <jack@...e.cz>,
        David Rientjes <rientjes@...gle.com>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
        Linux API <linux-api@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

On Fri, Jan 15, 2021 at 1:03 AM Arnd Bergmann <arnd@...nel.org> wrote:
>
> On Fri, Jan 15, 2021 at 3:06 AM Ryan Houdek <sonicadvance1@...il.com> wrote:
> > On Wed, Jan 6, 2021 at 12:49 AM Arnd Bergmann <arnd@...nel.org> wrote:
> >> On Wed, Jan 6, 2021 at 7:48 AM <sonicadvance1@...il.com> wrote:
> >> > From: Ryan Houdek <Sonicadvance1@...il.com>
> >> ...
> >>
> >> For x86, this has another complication, as some ioctls also need to
> >> check whether they are in an ia32 task (with packed u64 and 32-bit
> >> __kernel_old_time_t) or an x32 task (with aligned u64 and 64-bit
> >> __kernel_old_time_t). If the new syscall gets wired up on x86 as well,
> >> you'd need to decide which of the two behaviors you want.
> >
> >
> > I can have a follow-up patch that makes this do ni-syscall on x86_64 since
> > we can go through the int 0x80 handler, or x32 handler path and choose
> > whichever one there.
>
> I'd say for consistency
>

We need to make it crystal clear on x86 what this ioctl does.  We have
a silly selection of options:

 - ioctl32() via SYSCALL, x32 bit clear -- presumably does an i386 ioctl?
 - ioctl32() via SYSCALL, x32 bit set -- this needs to do something
clearly documented.
 - ioctl32() via int80 -- presumably you're not wiring this up

In any case, the compat alloc thing should just go away.  It's a hack
and serves no real purpose.

Finally, I'm not convinced that this patch works correctly.  We have
in_compat_syscall(), and code that uses it may well be reachable from
ioctl.  I personally would like to see in_compat_syscall() go away,
but some other people (Hi, Christoph!) disagree, and usage seems to be
increasing, not decreasing.

Powered by blists - more mailing lists