Re: [PATCH 1/1] x86/pti: Fix kernel warnings for pti= and nopti cmdline options.

From: Jo Van Bulck
Date: Sat Aug 12 2023 - 11:54:15 EST


On 11.08.23 17:08, Dave Hansen wrote:
On 8/11/23 16:58, Sohil Mehta wrote:
I agree this doesn't have to be this complex. PTI_FORCE_AUTO is unnecessary.

It's worth *ZERO* hassle. The docs say:
That's 100% unambiguous.

If you do "mitigations=off pti=auto", you might as well have done
"pti=auto nopti" which is nonsense.

The kernel shouldn't fall over and die, but the user gets to hold the
(undefined) pieces at this point.

Please let's not make this more complicated than it has to be.

Thank you both for the suggestions. I agree the code got overly complex and unnecessary when users are clearly passing conflicting options. So I prepared another patch iteration to largely revert back to the original proposed patch, i.e., *without* backwards compatible behavior when pti= nopti and mitigations=off are erroneously combined.

I'll post the new patch shortly.

Best,
Jo