From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "bp@alien8.de" <bp@alien8.de>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"minipli@grsecurity.net" <minipli@grsecurity.net>,
"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 18:23:29 +0000 [thread overview]
Message-ID: <da1860c6e3c2a9ea837075b08c2e06a68af1238c.camel@intel.com> (raw)
In-Reply-To: <20260514171256.GHagYCmFMsc1FYZ57B@fat_crate.local>
On Thu, 2026-05-14 at 19:12 +0200, Borislav Petkov wrote:
> On Thu, May 14, 2026 at 05:07:30PM +0000, Edgecombe, Rick P wrote:
> > Do we want a non-taint version of this capability? That was Mathias' original
> > approach, but his use was just debugging. So hence, this.
>
> No, we don't:
>
> Also note that user programs calling CPUID directly
> or using the feature without checking anything
> will still see it. This just prevents it from
> being used by the kernel or shown in /proc/cpuinfo.
> Also note the kernel might malfunction if you disable
> some critical bits.
>
> Do you want to debug issues because someone decided to shoot our
> representation of a CPUID flag and something is not being detected because of
> this and you're scratching your head why TF it happens?
I didn't mean to support disabling them all. I meant have a thing with the same
format as clearcpuid, but only works for features we want to support. So maybe
like disable=usershstk. And then have just less code to have to cover all the
nofoo cases. It would only support limited bits that were intentionally added.
This is not a well thought out idea though.
>
> > 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.
>
> No, we have "no..." cmdline arguments for things where disabling the feature
> makes sense. And we support those.
>
> The other "no..." switches we add usually as part of a chicken bit when adding
> a new feature. Subsequently, we delete them after it turns out the
> implementation is fine and there's no need for any chicken bit anymore.
Oh, I didn't realize they were intended to be short term things.
>
> If "nousershstk" has a good use case like being able to disable CET issues,
> then by all means, that justifies supporting it fully.
Fair enough, thanks for the consideration.
next prev parent reply other threads:[~2026-05-14 18:23 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
2026-05-14 17:12 ` Borislav Petkov
2026-05-14 17:15 ` Borislav Petkov
2026-05-14 18:23 ` Edgecombe, Rick P [this message]
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=da1860c6e3c2a9ea837075b08c2e06a68af1238c.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