From: Borislav Petkov <bp@alien8.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
x86-ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Save a WRMSR GS.base?
Date: Mon, 8 Jun 2026 13:05:28 -0700 [thread overview]
Message-ID: <20260608200528.GDaicgiFydU8LVUGL2@fat_crate.local> (raw)
In-Reply-To: <87cfce38-4b5a-4014-a098-2c43e3067df1@zytor.com>
On Mon, Jun 08, 2026 at 10:30:36AM -0700, H. Peter Anvin wrote:
> Without REX.W (e.g. wrgsbase %eax as opposed to wrgsbase %rax).
I see.
> It means that in kernel mode, it is the currently active GS.base that is
> written (or read with rdgsbase), that is, the one that belongs to kernel,
> not the user space one in what is confusingly enough called
> MSR_KERNEL_GS_BASE.
>
> In other words, not the one we want to task switch, *unless* you are in IDT
> mode and can surround it with SWAPGS.
Uff, what a mess this stuff is. Brain is in a knot.
I think this is begging to be written down somewhere. Lemme point AI to it and
see what it would generate.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2026-06-08 20:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 1:53 Borislav Petkov
2026-06-04 9:17 ` Andrew Cooper
2026-06-05 2:24 ` Borislav Petkov
2026-06-05 2:36 ` H. Peter Anvin
2026-06-05 2:54 ` Borislav Petkov
2026-06-05 3:20 ` H. Peter Anvin
2026-06-05 4:26 ` Borislav Petkov
2026-06-05 4:30 ` H. Peter Anvin
2026-06-05 4:38 ` Borislav Petkov
2026-06-05 5:05 ` H. Peter Anvin
2026-06-05 9:13 ` Andrew Cooper
2026-06-05 15:13 ` H. Peter Anvin
2026-06-05 15:16 ` Andrew Cooper
2026-06-05 15:51 ` H. Peter Anvin
2026-06-05 17:17 ` Borislav Petkov
2026-06-08 6:46 ` H. Peter Anvin
2026-06-08 14:38 ` Borislav Petkov
2026-06-08 17:30 ` H. Peter Anvin
2026-06-08 20:05 ` Borislav Petkov [this message]
2026-06-08 21:21 ` Borislav Petkov
2026-06-08 21:52 ` H. Peter Anvin
2026-06-08 22:58 ` Andrew Cooper
2026-06-18 1:09 ` Borislav Petkov
2026-06-18 10:22 ` David Laight
2026-06-18 18:17 ` H. Peter Anvin
2026-06-18 21:25 ` H. Peter Anvin
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=20260608200528.GDaicgiFydU8LVUGL2@fat_crate.local \
--to=bp@alien8.de \
--cc=andrew.cooper3@citrix.com \
--cc=hpa@zytor.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
all inboxes | Powered by JetHome®