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: <53976984.4030301@zytor.com>
Date:	Tue, 10 Jun 2014 13:24:36 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Borislav Petkov <bp@...e.de>, Jiri Kosina <jkosina@...e.cz>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org, jroedel@...e.de
Subject: Re: [PATCH] x86: be more helpful with SMEP faults

On 06/10/2014 01:18 PM, Borislav Petkov wrote:
>>  static void
>>  show_fault_oops(struct pt_regs *regs, unsigned long error_code,
>> @@ -594,6 +596,11 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
>>  
>>  		if (pte && pte_present(*pte) && !pte_exec(*pte))
>>  			printk(nx_warning, from_kuid(&init_user_ns, current_uid()));
>> +		if (pte && pte_present(*pte) && pte_exec(*pte) &&
>> +				(pgd_flags(*pgd) & _PAGE_USER) &&
>> +				static_cpu_has(X86_FEATURE_SMEP) &&
> 
> Btw, we could probably save us this line as CR4 reserved bits should be
> Must-Be-Zero and setting any of those should #GP. And I'm talking about
> pre-SMEP Intel, and AMD machines.
> 
> IOW, if CR4.SMEP is set, it definitely means SMEP is present and
> enabled.
> 
> hpa, that true?
> 

Yes.  Also, the Linux kernel will set or clear X86_FEATURE_SMEP to
match, so the two are redundant.

	-hpa


--
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