Skip to content

Commit 385d2ae

Browse files
committed
x86/cpu: Remove "nosmep"
There should be no need to disable SMEP anymore. Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Lai Jiangshan <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent dbae0a9 commit 385d2ae

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3465,7 +3465,7 @@
34653465
Disable SMAP (Supervisor Mode Access Prevention)
34663466
even if it is supported by processor.
34673467

3468-
nosmep [X86,PPC64s]
3468+
nosmep [PPC64s]
34693469
Disable SMEP (Supervisor Mode Execution Prevention)
34703470
even if it is supported by processor.
34713471

Documentation/x86/cpuinfo.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ from #define X86_FEATURE_UMIP (16*32 + 2).
140140

141141
In addition, there exists a variety of custom command-line parameters that
142142
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".
145145

146146
e: The feature was known to be non-functional.
147147
----------------------------------------------

arch/x86/kernel/cpu/common.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,6 @@ static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
369369
}
370370
#endif
371371

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-
379372
static __always_inline void setup_smep(struct cpuinfo_x86 *c)
380373
{
381374
if (cpu_has(c, X86_FEATURE_SMEP))

0 commit comments

Comments
 (0)