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:   Mon, 25 Feb 2019 13:08:00 -0800
From:   Joe Perches <joe@...ches.com>
To:     Borislav Petkov <bp@...en8.de>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Jann Horn <jannh@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        the arch/x86 maintainers <x86@...nel.org>,
        "Tobin C. Harding" <tobin@...nel.org>
Subject: Re: [PATCH] x86/uaccess: Remove unused __addr_ok() macro

On Mon, 2019-02-25 at 20:42 +0100, Borislav Petkov wrote:
> On Mon, Feb 25, 2019 at 11:20:42AM -0800, Linus Torvalds wrote:
> > On Mon, Feb 25, 2019 at 11:11 AM Borislav Petkov <bp@...en8.de> wrote:
> > > This was caught while staring at the whole {set,get}_fs() machinery.
> > 
> > Heh.
> > 
> > You should probably have researched _when_ it became unused.
> > 
> > That seems to have happened in commit 5723aa993d83 ("x86: use the new
> > generic strnlen_user() function") which removed the single user from
> > the x86-32 version of strnlen_user(), which used to have
> > 
> >         unsigned long mask = -__addr_ok(s);
> 
> Yap, found it. I still have
> 
> $ git log -p -G__addr_ok --pickaxe-all
> 
> in one of the shells' history here.
> 
> I'll add that to the commit message.
> 
> Thx.

Looks like it's not used in several arches

$ git grep -w __addr_ok
arch/arm/include/asm/uaccess.h:#define __addr_ok(addr)          ((void)(addr), 1)
arch/csky/include/asm/uaccess.h:#define __addr_ok(addr) (access_ok(addr, 0))
arch/openrisc/include/asm/uaccess.h:#define __addr_ok(addr) ((unsigned long) addr < get_fs())
arch/sh/include/asm/uaccess.h:#define __addr_ok(addr) \
arch/sh/include/asm/uaccess.h:  __ao_end >= __ao_a && __addr_ok(__ao_end); })
arch/x86/include/asm/uaccess.h:#define __addr_ok(addr)  \


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ