lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Aug 2023 16:42:26 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Jo Van Bulck <jo.vanbulck@...kuleuven.be>,
        linux-kernel@...r.kernel.org, dave.hansen@...ux.intel.com,
        luto@...nel.org, peterz@...radead.org, mingo@...hat.com,
        sohil.mehta@...el.com
Cc:     x86@...nel.org, bp@...en8.de, tglx@...utronix.de, hpa@...or.com
Subject: Re: [PATCH 1/1] x86/pti: Fix kernel warnings for pti= and nopti
 cmdline options.

On 8/11/23 16:27, Jo Van Bulck wrote:
> On 11.08.23 14:36, Jo Van Bulck wrote:>   static enum pti_mode {
>>       PTI_AUTO = 0,
>> +    PTI_FORCE_AUTO,
>>       PTI_FORCE_OFF,
>>       PTI_FORCE_ON
>>   } pti_mode;
> 
> I introduced a new PTI_FORCE_AUTO value here to make pti=auto override
> any mitigations=off parameter. However, I realize now that this may
> inadvertently affect other functions that test for pti_mode == PTI_AUTO
> (eg in pti_kernel_image_global_ok()).
> 
> Having 2 constants PTI_AUTO and PTI_FORCE_AUTO is arguably not very
> neat, so we should better get rid of this. I see several options:
> 
> - not have pti=auto override mitigations=off
> - have a global var to indicate pti= argument was passed
> - set pti_mode = PTI_AUTO in the pti_mode == PTI_FORCE_AUTO if branch
> 
> Not sure which option would best match kernel coding guidelines?

This sound like it's getting a bit out of hand and reaching far beyond
cleaning up some (mostly) harmless warnings.

I bet we have a billion command-line parameters that conflict with each
other.  mitigations=off and pti=auto is probably the least of our
worries.  Nobody in their right mind is going to say, oh, I *only* want
PTI, I don't care about any other mitigations.  That's nuts.

mitigations=off is the big hammer.  If you set that, you're basically
shouting from the rooftops, "moar speed!!"  You don't get security after
that.

pti=auto does *not* need to override mitigations=off.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ