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: <4DCB78ED.9040409@zytor.com>
Date:	Wed, 11 May 2011 23:06:37 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	Fenghua Yu <fenghua.yu@...el.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Asit K Mallick <asit.k.mallick@...el.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] x86, cpu: Enable/disable SMEP

On 05/11/2011 03:36 PM, Andi Kleen wrote:
> "Fenghua Yu"<fenghua.yu@...el.com>  writes:
>
>> +static int disable_smep;
>
> If you add a __initdata here the whole thing will completely disappear
> after boot.
>
>> @@ -867,6 +886,8 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
>>   	/* Init Machine Check Exception if available. */
>>   	mcheck_cpu_init(c);
>>
>> +	setup_smep(c);
>
> My feeling is you're setting this too late. In theory there could be
> early overflows. Better use a early_param and set it as early
> as possible, directly after the cpuid flags are set up in early
> initialization.
>
> -Andi

SMEP only matters if we can into userspace code, so I *think* the above 
should be okay.  However, the most logical place would be to enable it 
in the same place(s) where we enable NX.

	-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