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: <20171213153202.qtxnloxoc66lhsbf@hirez.programming.kicks-ass.net>
Date:   Wed, 13 Dec 2017 16:32:02 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     "Kirill A. Shutemov" <kirill@...temov.name>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Borislav Petkov <bpetkov@...e.de>,
        Greg KH <gregkh@...uxfoundation.org>,
        Kees Cook <keescook@...gle.com>,
        Hugh Dickins <hughd@...gle.com>,
        Brian Gerst <brgerst@...il.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        David Laight <David.Laight@...lab.com>,
        Eduardo Valentin <eduval@...zon.com>, aliguori@...zon.com,
        Will Deacon <will.deacon@....com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        kirill.shutemov@...ux.intel.com, aneesh.kumar@...ux.vnet.ibm.com
Subject: Re: [patch 05/16] mm: Allow special mappings with user access cleared

On Wed, Dec 13, 2017 at 07:14:41AM -0800, Dave Hansen wrote:
> On 12/13/2017 04:57 AM, Kirill A. Shutemov wrote:
> > Dave, what is effect of this on protection keys?
> 
> The goal was to make pkeys-protected userspace memory access
> _consistent_ with normal access.  Specifically, we want a kernel to
> disallow access (or writes) to memory where userspace mapping has a pkey
> whose permissions are in conflict with the access.
> 
> For instance:
> 
> This will fault writing a byte to 'addr':
> 
> 	char *addr = malloc(PAGE_SIZE);
> 	pkey_mprotect(addr, PAGE_SIZE, 13);
> 	pkey_deny_access(13);
> 	*addr[0] = 'f';
> 
> But this will write one byte to addr successfully (if it uses the kernel
> mapping of the physical page backing 'addr'):
> 
> 	char *addr = malloc(PAGE_SIZE);
> 	pkey_mprotect(addr, PAGE_SIZE, 13);
> 	pkey_deny_access(13);
> 	read(fd, addr, 1);
> 

This seems confused to me; why are these two cases different?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ