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  linux-cve-announce  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:   Thu, 18 Oct 2018 12:14:36 +0100
From:   Catalin Marinas <catalin.marinas@....com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Andy Lutomirski <luto@...capital.net>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Szabolcs Nagy <szabolcs.nagy@....com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Yury Norov <ynorov@...iumnetworks.com>,
        Philipp Tomsich <philipp.tomsich@...obroma-systems.com>,
        Joseph Myers <joseph@...esourcery.com>,
        linux-arch <linux-arch@...r.kernel.org>,
        Steve Ellcey <sellcey@...iumnetworks.com>,
        Prasun Kapoor <Prasun.Kapoor@...iumnetworks.com>,
        Andreas Schwab <schwab@...e.de>,
        Alexander Graf <agraf@...e.de>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Bamvor Zhangjian <bamv2005@...il.com>,
        Dave Martin <Dave.Martin@....com>,
        Adam Borowski <kilobyte@...band.pl>,
        "Manuel A. Fernandez Montecelo" <manuel.montezelo@...il.com>,
        James Hogan <james.hogan@...tec.com>,
        Chris Metcalf <cmetcalf@...lanox.com>,
        Andrew Pinski <pinskia@...il.com>,
        Lin Yongting <linyongting@...wei.com>,
        Alexey Klimov <klimov.linux@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Maxim Kuvyrkov <maxim.kuvyrkov@...aro.org>,
        Florian Weimer <fweimer@...hat.com>,
        Linux API <linux-api@...r.kernel.org>,
        Nathan Lynch <Nathan_Lynch@...tor.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        James Morse <james.morse@....com>,
        Ramana Radhakrishnan <ramana.gcc@...glemail.com>,
        Martin Schwidefsky <schwidefsky@...ibm.com>,
        David Miller <davem@...emloft.net>,
        Christoph Muellner <christoph.muellner@...obroma-systems.com>
Subject: Re: [PATCH v9 00/24] ILP32 for ARM64

On Sun, Oct 14, 2018 at 09:49:01PM +0200, Arnd Bergmann wrote:
> On Sat, Oct 13, 2018 at 9:36 PM Andy Lutomirski <luto@...capital.net> wrote:
> >
> > On Wed, May 16, 2018 at 1:19 AM Yury Norov <ynorov@...iumnetworks.com> wrote:
> > >
> > > This series enables AARCH64 with ILP32 mode.
> > >
> > > As supporting work, it introduces ARCH_32BIT_OFF_T configuration
> > > option that is enabled for existing 32-bit architectures but disabled
> > > for new arches (so 64-bit off_t userspace type is used by new userspace).
> > > Also it deprecates getrlimit and setrlimit syscalls prior to prlimit64.
> >
> > Second, ILP32 user code is highly unlikely
> > to end up with the same struct layout as ILP64 code.  The latter seems
> > like it should be solved entirely in userspace by adding a way to
> > annotate a structure as being a kernel ABI structure and getting the
> > toolchain to lay it out as if it were ILP64 even though the target is
> > ILP32.
> 
> The syscall ABI could be almost completely abstracted in glibc, the
> main issue is ioctl and a couple of related interfaces that pass data
> structures (read() on /dev/input/*, mmap on /dev/snd/*
> or raw sockets, fcntl).

There is another case on struct siginfo which has some pointers and it
wouldn't look like an LP64 structure at all (and glibc doesn't normally
intercept the sighandler call to rewrite the structure). We could add
padding around void * members as the kernel zeros them, I don't recall
the kernel reading these pointers from user. Anyway, using something
that resembles compat_siginfo looked the simplest for ILP32.

-- 
Catalin

Powered by blists - more mailing lists