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: <CA+55aFzF+Wo7EVSoJSaarbsQCNw5St4JH27t6vxNJivJnBQ0Sg@mail.gmail.com>
Date:	Mon, 11 May 2015 14:42:27 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Richard Weinberger <richard@....at>,
	Linux-Arch <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: VERIFY_READ/WRITE in uaccess.h?

On Mon, May 11, 2015 at 2:05 PM, H. Peter Anvin <hpa@...or.com> wrote:
> On 05/10/2015 02:44 AM, Richard Weinberger wrote:
>> Hi!
>>
>> While cleaning up UML's uaccess code I've noticed that not a single architecture
>> is using VERIFY_READ/WRITE in access_ok().
>> One exception is UML, it uses the access type in one check which is in vain anyways.
>> Also asm-generic/uaccess.h drops the type parameter silently.
>>
>> Why do we still carry it around?
>>
>> Is it because we want it for some future architecture which can benefit
>> from it or just because nobody cared enough to do a tree-wide cleanup?
>> I fear it is the latter... ;)
>>
>
> Or, perhaps, nobody noticed?

Not a future architecture. A historical one.

I think the only architecture that needed the VERIFY_READ/WRITE
distinction was the now-dropped i386, where it was used to decide if
we needed to do the manual COW because the 80386 couldn't do COW
correctly in kernel mode.

That one - for the same reasons - also checked the actual accesses,
not just that the range was in user mode. Exactly because it needed to
pre-COW the pages (even if that was then obviously racy in threaded
environments - in practice it worked, and we tried to support the
fundamentally broken i386 hardware protection model for a long time).

                         Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ