From: Borislav Petkov <bp@alien8.de>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Lai Jiangshan <jiangshanlai@gmail.com>
Subject: [PATCH v2 4/6] x86/cpu: Remove "nosmep"
Date: Thu, 27 Jan 2022 12:56:24 +0100 [thread overview]
Message-ID: <20220127115626.14179-5-bp@alien8.de> (raw)
In-Reply-To: <20220127115626.14179-1-bp@alien8.de>
From: Borislav Petkov <bp@suse.de>
There should be no need to disable SMEP anymore.
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>
---
Documentation/admin-guide/kernel-parameters.txt | 2 +-
Documentation/x86/cpuinfo.rst | 4 ++--
arch/x86/kernel/cpu/common.c | 7 -------
3 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 04b155a4298f..e3894159c22b 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3398,7 +3398,7 @@
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.
diff --git a/Documentation/x86/cpuinfo.rst b/Documentation/x86/cpuinfo.rst
index 12fbe2b1e98a..08246e8ac835 100644
--- a/Documentation/x86/cpuinfo.rst
+++ b/Documentation/x86/cpuinfo.rst
@@ -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.
----------------------------------------------
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 7e5d695279bc..3d0a5340a678 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -291,13 +291,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))
--
2.29.2
next prev parent reply other threads:[~2022-01-27 11:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 11:56 [PATCH v2 0/6] x86/cpu: Do some janitorial work Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 1/6] x86/cpu: Allow feature bit names from /proc/cpuinfo in clearcpuid= Borislav Petkov
2022-02-07 22:04 ` Kees Cook
2022-02-08 11:54 ` Borislav Petkov
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 2/6] x86/cpu: Remove "nosep" Borislav Petkov
2022-02-07 21:58 ` Kees Cook
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 3/6] x86/cpu: Remove CONFIG_X86_SMAP and "nosmap" Borislav Petkov
2022-02-07 22:07 ` Kees Cook
2022-02-08 15:06 ` Borislav Petkov
2022-02-08 21:01 ` Borislav Petkov
2022-02-09 2:56 ` Kees Cook
2022-02-09 11:53 ` Borislav Petkov
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` Borislav Petkov [this message]
2022-02-07 22:07 ` [PATCH v2 4/6] x86/cpu: Remove "nosmep" Kees Cook
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 5/6] x86/cpu: Remove "noexec" Borislav Petkov
2022-02-07 22:25 ` Kees Cook
2022-02-08 17:40 ` Sean Christopherson
2022-02-08 19:56 ` Borislav Petkov
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 6/6] x86/cpu: Remove "noclflush" Borislav Petkov
2022-02-07 22:08 ` Kees Cook
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220127115626.14179-5-bp@alien8.de \
--to=bp@alien8.de \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome