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, 28 Jan 2022 14:54:26 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     ira.weiny@...el.com, Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Dan Williams <dan.j.williams@...el.com>
Cc:     Fenghua Yu <fenghua.yu@...el.com>,
        Rick Edgecombe <rick.p.edgecombe@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V8 06/44] mm/pkeys: Add Kconfig options for PKS

On 1/27/22 09:54, ira.weiny@...el.com wrote:
> From: Ira Weiny <ira.weiny@...el.com>
> 
> Protection Key Supervisor, PKS, is a feature used by kernel code only.
> As such if no kernel users are configured the PKS code is unnecessary
> overhead.
> 
> Define a Kconfig structure which allows kernel code to detect PKS
> support by an architecture and then subsequently enable that support
> within the architecture.
> 
> ARCH_HAS_SUPERVISOR_PKEYS indicates to kernel consumers that an
> architecture supports pkeys.  PKS users can then select
> ARCH_ENABLE_SUPERVISOR_PKEYS to turn on the support within the
> architecture.
> 
> If ARCH_ENABLE_SUPERVISOR_PKEYS is not selected architectures avoid the
> PKS overhead.
> 
> ARCH_ENABLE_SUPERVISOR_PKEYS remains off until the first kernel use case
> sets it.

This is heavy on the "what" and weak on the "why".

Why isn't this an x86-specific Kconfig?  Why do we need two Kconfigs?
Good old user pkeys only has one:

	config ARCH_HAS_PKEYS
	        bool

and it's in arch-generic code because there are ppc and x86
implementations *and* the pkey support touches generic code.

This might become evident later in the series, but it's clear as mud as
it stands.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ