Re: [PATCH v2 1/1] x86/ia32: Normalize any null selector value to 0

From: Xin Li
Date: Wed Nov 20 2024 - 22:55:38 EST


On 11/20/2024 11:34 AM, Andrew Cooper wrote:
On 20/11/2024 7:09 pm, Xin Li wrote:
On 11/20/2024 1:33 AM, Andrew Cooper wrote:
Right now, this change is codifying the problem behaviour we were trying
to fix out under FRED.

Under FRED, if userspace loads e.g. 2 into a selector, it should remain
2 until userspace changes it to something else.

Okay, I will fix it by:
1) For null selector values, do nothing.
2) For non-null selector values, set RPL bits.

sounds okay?

Yeah, that sounds okay.

Actually this is what v1 does:

https://lore.kernel.org/lkml/20230706052231.2183-1-xin3.li@xxxxxxxxx/

But obviously I need to rewrite the change log.


The selftest ought to work under FRED, but it was speculative coding.  I
can't rule out that tweaks might be needed.

The v1 makes the test happy with both IDT and FRED.

Thanks!
Xin