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:   Fri, 6 Apr 2018 18:09:19 -0700
From:   Ram Pai <linuxram@...ibm.com>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        shakeelb@...gle.com, stable@...nel.org, tglx@...utronix.de,
        mpe@...erman.id.au, mingo@...nel.org, akpm@...ux-foundation.org,
        shuah@...nel.org
Subject: Re: [PATCH 4/9] x86, pkeys: override pkey when moving away from
 PROT_EXEC

On Fri, Apr 06, 2018 at 05:47:29PM -0700, Dave Hansen wrote:
> On 04/06/2018 05:09 PM, Ram Pai wrote:
> >> -	/*
> >> -	 * Look for a protection-key-drive execute-only mapping
> >> -	 * which is now being given permissions that are not
> >> -	 * execute-only.  Move it back to the default pkey.
> >> -	 */
> >> -	if (vma_is_pkey_exec_only(vma) &&
> >> -	    (prot & (PROT_READ|PROT_WRITE))) {
> >> -		return 0;
> >> -	}
> >> +
> > Dave,
> > 	this can be simply:
> > 
> > 	if ((vma_is_pkey_exec_only(vma) && (prot != PROT_EXEC))
> > 		return ARCH_DEFAULT_PKEY;
> 
> Yes, but we're removing that code entirely. :)

Well :). my point is add this code and delete the other
code that you add later in that function.

RP



-- 
Ram Pai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ