Re: X86: Question about GDT loading

"H. Peter Anvin" <[email protected]>
Newsgroups gmane.linux.kernel
Message-ID <[email protected]>
On 2026-08-16 14:12, H. Peter Anvin wrote:
> 
> For 32 bits that is perfectly safe. On 64 bits, it ends up taking up slot 1 as
> well; this is *not* safe for a kernel address as it would be interpreted as a
> user-space code descriptor for a single-byte code segment somewhere in the low
> 16 MB of memory, addressable as 0x13:0. This could be used to derive bits
> [55:32] of the kernel GDT base from user space.

Corrected: addressable as 0xb:0.

> Therefore this must NOT be done in 64-bit mode.

Formally speaking: long mode.

	-hpa
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.