Files
linux/arch/x86/kernel/cpu/common.c
H. Peter Anvin 7eecce178e x86, smap: Don't enable SMAP if CONFIG_X86_SMAP is disabled
commit 03bbd596ac upstream.

If SMAP support is not compiled into the kernel, don't enable SMAP in
CR4 -- in fact, we should clear it, because the kernel doesn't contain
the proper STAC/CLAC instructions for SMAP support.

Found by Fengguang Wu's test system.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Link: http://lkml.kernel.org/r/20140213124550.GA30497@localhost
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-22 13:34:51 -08:00

33 KiB