The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mathias Krause <minipli@grsecurity.net>
To: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Cc: "bp@alien8.de" <bp@alien8.de>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	"tglx@kernel.org" <tglx@kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Gao, Chao" <chao.gao@intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>
Subject: Re: [PATCH v2] x86/shstk: Provide kernel command line knob to disable
Date: Thu, 14 May 2026 18:14:04 +0200	[thread overview]
Message-ID: <4224602c-4bae-4d4e-9cbd-0b9c8b1d35d0@grsecurity.net> (raw)
In-Reply-To: <15fb40f258adfaf50bdb0e2d3ab91748559268df.camel@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 1634 bytes --]


On 5/14/26 02:31, Edgecombe, Rick P wrote:
> On Wed, 2026-05-13 at 22:51 +0200, Mathias Krause wrote:
>> On 08.05.26 18:35, Edgecombe, Rick P wrote:
>>> On Fri, 2026-05-08 at 09:23 +0200, Mathias Krause wrote:
>>>>> Now that KVM uses this this feature independently of X86_FEATURE_USER_SHSTK,
>>>>> it might be good to have the plain HW shstk feature exposed for just normal
>>>>> runtime user use. (+Chao, for KVM CET)
>>>>
>>>> But that sounds more like having the need for an official chicken bit,
>>>> like I was proposing, no? Using 'clearcpuid=shstk' as a workaround for
>>>> whatever KVM bugs, similar in spirit to 'nousershstk', but without the
>>>> kernel taint?
>>>
>>> For users to turn off shadow stack for guests? You can do this via the KVM API
>>> in the normal way you customize guests.
>>
>> https://git.kernel.org/linus/2d5d3fc593c9b7e41bee86175d7b9e11f470072e
>>
>> Oh, well....
> 
> Heh, well, the clearcpuid would have helped debugging I guess. And that module
> param turns off shadow stack for KVM, but not for userspace. So doesn't help
> your CR4.CET problems I guess.

Yeah, I was more trying to say that if the initial version of my patch
would have landed, it could be used to workaround the KVM issue in the
meantime as well. Anyhow!

> 
> Are you planning to send another revision of the clearcpuid approach? I'm
> convinced something like this is a good thing to have, so I'll probably pick it
> up if you don't.

Sorry, I was busy with holidays and travel. Here we go:
https://lore.kernel.org/lkml/20260514160932.91556-1-minipli@grsecurity.net/

Thanks,
Mathias

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

      reply	other threads:[~2026-05-14 16:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260402173606.1096172-1-minipli@grsecurity.net>
     [not found] ` <3d7c8d26-558d-40ef-9ad9-3a5100eed9e5@grsecurity.net>
2026-05-06 19:03   ` [PATCH v2] x86/shstk: Provide kernel command line knob to disable Dave Hansen
2026-05-06 22:45     ` Edgecombe, Rick P
2026-05-07 13:39       ` Mathias Krause
2026-05-07 19:53         ` Edgecombe, Rick P
2026-05-08  7:23           ` Mathias Krause
2026-05-08 16:34             ` Dave Hansen
2026-05-11  5:04               ` Mathias Krause
2026-05-08 16:35             ` Edgecombe, Rick P
2026-05-13 20:51               ` Mathias Krause
2026-05-14  0:31                 ` Edgecombe, Rick P
2026-05-14 16:14                   ` Mathias Krause [this message]

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=4224602c-4bae-4d4e-9cbd-0b9c8b1d35d0@grsecurity.net \
    --to=minipli@grsecurity.net \
    --cc=bp@alien8.de \
    --cc=chao.gao@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@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