Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/cpu: Remove "nosmep"

There should be no need to disable SMEP anymore.

Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220127115626.14179-5-bp@alien8.de

+3 -10
+1 -1
Documentation/admin-guide/kernel-parameters.txt
··· 3465 3465 Disable SMAP (Supervisor Mode Access Prevention) 3466 3466 even if it is supported by processor. 3467 3467 3468 - nosmep [X86,PPC64s] 3468 + nosmep [PPC64s] 3469 3469 Disable SMEP (Supervisor Mode Execution Prevention) 3470 3470 even if it is supported by processor. 3471 3471
+2 -2
Documentation/x86/cpuinfo.rst
··· 140 140 141 141 In addition, there exists a variety of custom command-line parameters that 142 142 disable specific features. The list of parameters includes, but is not limited 143 - to, nofsgsbase, and nosmep. 5-level paging can also be disabled using 144 - "no5lvl". SMEP is disabled with the aforementioned parameter. 143 + to, nofsgsbase, nosgx, noxsave, etc. 5-level paging can also be disabled using 144 + "no5lvl". 145 145 146 146 e: The feature was known to be non-functional. 147 147 ----------------------------------------------
-7
arch/x86/kernel/cpu/common.c
··· 369 369 } 370 370 #endif 371 371 372 - static __init int setup_disable_smep(char *arg) 373 - { 374 - setup_clear_cpu_cap(X86_FEATURE_SMEP); 375 - return 1; 376 - } 377 - __setup("nosmep", setup_disable_smep); 378 - 379 372 static __always_inline void setup_smep(struct cpuinfo_x86 *c) 380 373 { 381 374 if (cpu_has(c, X86_FEATURE_SMEP))