From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "minipli@grsecurity.net" <minipli@grsecurity.net>,
"bp@alien8.de" <bp@alien8.de>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"tglx@kernel.org" <tglx@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v3] x86/cpufeatures: Make X86_FEATURE_SHSTK clearcpuid-able
Date: Thu, 14 May 2026 17:07:30 +0000 [thread overview]
Message-ID: <8380b063f933ac3b909b6a5c9adfa03a116da1f7.camel@intel.com> (raw)
In-Reply-To: <20260514165922.GGagX_amNCc0mZcz4d@fat_crate.local>
On Thu, 2026-05-14 at 18:59 +0200, Borislav Petkov wrote:
> On Thu, May 14, 2026 at 06:09:32PM +0200, Mathias Krause wrote:
> > Allow X86_FEATURE_SHST to be disabled through the kernel commandline via
> > 'clearcpuid=shstk' as 'nousershstk' would still enable CR4.CET even if
> > no CET features are in use.
>
> clearcpuid= taints the kernel because that cmdline option is not supposed to
> be used except for debugging crap... and alas people are still using it. No
> wonder... :-\
Do we want a non-taint version of this capability? That was Mathias' original
approach, but his use was just debugging. So hence, this.
Also, have you ever thought about keeping a list of approved clearcpuid values
that are supported for normal runtime. People could use it to turn off features
without picking up a taint? Like maybe people want to turn off something for
performance reasons or something. Then we can have one interface for it all,
instead of various nousershstk-like flags. Not sure if it's a good.
>
> Anyway, "nousershstk" should disable the CR4 bit too.
Mathias, I can send a patch for this if you want to be done with this.
next prev parent reply other threads:[~2026-05-14 17:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 16:09 [PATCH v3] x86/cpufeatures: Make X86_FEATURE_SHSTK clearcpuid-able Mathias Krause
2026-05-14 16:59 ` Borislav Petkov
2026-05-14 17:07 ` Edgecombe, Rick P [this message]
2026-05-14 17:12 ` Borislav Petkov
2026-05-14 17:15 ` Borislav Petkov
2026-05-14 18:23 ` Edgecombe, Rick P
2026-05-14 22:38 ` Borislav Petkov
2026-05-15 16:20 ` Mathias Krause
2026-05-14 17:30 ` Dave Hansen
2026-05-14 18:25 ` Edgecombe, Rick P
2026-05-15 16:11 ` Mathias Krause
2026-05-15 16:21 ` Edgecombe, Rick P
2026-05-14 17:01 ` Edgecombe, Rick P
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=8380b063f933ac3b909b6a5c9adfa03a116da1f7.camel@intel.com \
--to=rick.p.edgecombe@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=minipli@grsecurity.net \
--cc=peterz@infradead.org \
--cc=tglx@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