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]
Message-ID: <295ea2ef-3480-856b-b93a-9ae36f7b2286@cs.kuleuven.be>
Date:   Fri, 11 Aug 2023 16:27:17 -0700
From:   Jo Van Bulck <jo.vanbulck@...kuleuven.be>
To:     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 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?

Best,
Jo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ