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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 25 Aug 2022 10:38:23 -0700
From:   Dave Hansen <>
To:     Sean Christopherson <>,
        Peter Zijlstra <>
Subject: Re: [PATCH] x86/mm: Refuse W^X violations

On 8/25/22 10:18, Sean Christopherson wrote:
>> +/*
>> + * Validate and enforce strict W^X semantics.
>> + */
>> +static inline pgprot_t verify_rwx(pgprot_t old, pgprot_t new, unsigned long start,
>> +				  unsigned long pfn, unsigned long npg)
>> +{
>> +	unsigned long end;
>> +
> I think this needs
> 	if (!(__supported_pte_mask & _PAGE_NX))
> 		return new;
> to play nice with non-PAE 32-bit kernels.

Good catch.  Nit: I'd probably write this up as:
	if (!cpu_feature_enabled(X86_FEATURE_NX))
		return new;

That gets us our fancy static branches and is a bit easier on the eyes.
 I checked and don't see a way for __supported_pte_mask to have _PAGE_NX
clear when X86_FEATURE_NX==1.

Powered by blists - more mailing lists