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

From: Jo Van Bulck
Date: Fri Aug 11 2023 - 17:20:52 EST


On 11.08.23 12:13, Sohil Mehta wrote:> Based on above, even when you split the if check only a single print
would be enough, right?

Yes, I agree these both cases can simply print "disabled on command line." (as in the original code) IMHO

I don't believe that is a requirement either. Sometimes kernel command
lines can get very long and people make mistakes. I just thought it is
neat that the current code is defaulting that way and we should probably
keep the same behavior since it makes sense.

Makes sense indeed.

I agree, in both cases pti= overriding the other option (nopti or
mitigations=off) sounds reasonable to me.

I prepared a revised patch for this and will post this shortly.

Best,
Jo