mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Krause <minipli@grsecurity.net>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Rick Edgecombe <rick.p.edgecombe@intel.com>,
	x86@kernel.org, Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] x86/cpufeatures: Make X86_FEATURE_SHSTK clearcpuid-able
Date: Fri, 15 May 2026 18:11:46 +0200	[thread overview]
Message-ID: <a3bf1f73-2f17-4745-8693-c9336e9010d1@grsecurity.net> (raw)
In-Reply-To: <20260514165922.GGagX_amNCc0mZcz4d@fat_crate.local>

On 5/14/26 18:59, 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... :-\

Funny to see how x86 maintainer options completely disagree on this, see
https://lore.kernel.org/lkml/739e4dd0-84a3-4b37-8cc3-b7ec59737010@intel.com/

> 
> Anyway, "nousershstk" should disable the CR4 bit too.
> 

No, it should not, as that's only for the user portion
(X86_FEATURE_USER_SHSTK != X86_FEATURE_SHSTK).

Even though there is (currently) no kernel level shadow stack support,
KVM may still want to pass it down to guests for their usage -- even if
the host *userland* shouldn't make use of it because of "nousershstk".

Thanks,
Mathias

  parent reply	other threads:[~2026-05-15 16:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 16:09 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
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 [this message]
2026-05-15 16:21     ` Edgecombe, Rick P
2026-05-16 15:27     ` Borislav Petkov
2026-05-19 21:08       ` Mathias Krause
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=a3bf1f73-2f17-4745-8693-c9336e9010d1@grsecurity.net \
    --to=minipli@grsecurity.net \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --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

all inboxes | Powered by JetHome®