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]
Message-ID: <2dda07f893cb4ef9b5ea2265adccb98f@AcuMS.aculab.com>
Date:   Mon, 14 Feb 2022 22:13:34 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Linus Torvalds' <torvalds@...ux-foundation.org>,
        Arnd Bergmann <arnd@...nel.org>
CC:     Mark Rutland <mark.rutland@....com>, Rich Felker <dalias@...c.org>,
        "linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
        Linux-sh list <linux-sh@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
        Max Filippov <jcmvbkbc@...il.com>, Guo Ren <guoren@...nel.org>,
        sparclinux <sparclinux@...r.kernel.org>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        Will Deacon <will@...nel.org>,
        Ard Biesheuvel <ardb@...nel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        linux-s390 <linux-s390@...r.kernel.org>,
        "Brian Cain" <bcain@...eaurora.org>,
        "open list:QUALCOMM HEXAGON..." <linux-hexagon@...r.kernel.org>,
        Helge Deller <deller@....de>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Russell King - ARM Linux <linux@...linux.org.uk>,
        "linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
        Christoph Hellwig <hch@....de>,
        "Christoph Hellwig" <hch@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        "Geert Uytterhoeven" <geert@...ux-m68k.org>,
        "open list:SYNOPSYS ARC ARCHITECTURE" 
        <linux-snps-arc@...ts.infradead.org>,
        "open list:TENSILICA XTENSA PORT (xtensa)" 
        <linux-xtensa@...ux-xtensa.org>, Arnd Bergmann <arnd@...db.de>,
        Heiko Carstens <hca@...ux.ibm.com>,
        linux-um <linux-um@...ts.infradead.org>,
        Richard Weinberger <richard@....at>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>,
        Openrisc <openrisc@...ts.librecores.org>,
        Greentime Hu <green.hu@...il.com>,
        Stafford Horne <shorne@...il.com>,
        "Linux ARM" <linux-arm-kernel@...ts.infradead.org>,
        Michal Simek <monstr@...str.eu>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Nick Hu <nickhu@...estech.com>,
        Parisc List <linux-parisc@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>,
        Linux API <linux-api@...r.kernel.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        Dinh Nguyen <dinguyen@...nel.org>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        alpha <linux-alpha@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        David Miller <davem@...emloft.net>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: RE: [PATCH 04/14] x86: use more conventional access_ok() definition

From: Linus Torvalds
> Sent: 14 February 2022 20:24
> >
> > x86-64 has always(*) used TASK_SIZE_MAX for access_ok(), and the
> > get_user() assembler implementation does the same.
> 
> Side note: we could just check the sign bit instead, and avoid big
> constants that way.

The cheap test for most 64bit is (addr | size) >> 62 != 0.

I did some tests last week and the compilers correctly optimise
out constant size.

Doesn't sparc64 still need a wrap test?
Or is that assumed because there is always an unmapped page
and transfer are 'adequately' done on increasing addresses?

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ