x86/cpu: Remove "nosmep"
authorBorislav Petkov <bp@suse.de>
Thu, 27 Jan 2022 11:56:24 +0000 (12:56 +0100)
committerBorislav Petkov <bp@suse.de>
Mon, 4 Apr 2022 08:17:00 +0000 (10:17 +0200)
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
Documentation/admin-guide/kernel-parameters.txt
Documentation/x86/cpuinfo.rst
arch/x86/kernel/cpu/common.c

index e0bb710f0fa9f28c538e6df27c52c1d9a6a607ce..39ac2c14dd71b834be8f07e08a6ddd034ace03a2 100644 (file)
                        Disable SMAP (Supervisor Mode Access Prevention)
                        even if it is supported by processor.
 
-       nosmep          [X86,PPC64s]
+       nosmep          [PPC64s]
                        Disable SMEP (Supervisor Mode Execution Prevention)
                        even if it is supported by processor.
 
index 12fbe2b1e98a78baed3b6909ae8a48628a5c36b7..08246e8ac83542064456ea14493aeeaf32023ce2 100644 (file)
@@ -140,8 +140,8 @@ from #define X86_FEATURE_UMIP (16*32 + 2).
 
 In addition, there exists a variety of custom command-line parameters that
 disable specific features. The list of parameters includes, but is not limited
-to, nofsgsbase, and nosmep. 5-level paging can also be disabled using
-"no5lvl". SMEP is disabled with the aforementioned parameter.
+to, nofsgsbase, nosgx, noxsave, etc. 5-level paging can also be disabled using
+"no5lvl".
 
 e: The feature was known to be non-functional.
 ----------------------------------------------
index 747df070fb5e7c5d9b00ebfb9356328c9cfd0847..5791f692d67e0ea1846c9cb42ce1bd67f5270cba 100644 (file)
@@ -369,13 +369,6 @@ static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
 }
 #endif
 
-static __init int setup_disable_smep(char *arg)
-{
-       setup_clear_cpu_cap(X86_FEATURE_SMEP);
-       return 1;
-}
-__setup("nosmep", setup_disable_smep);
-
 static __always_inline void setup_smep(struct cpuinfo_x86 *c)
 {
        if (cpu_has(c, X86_FEATURE_SMEP))