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, 21 Jun 2024 19:32:45 +0200
From: Borislav Petkov <bp@...en8.de>
To: "Xin Li (Intel)" <xin@...or.com>
Cc: linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
	tglx@...utronix.de, mingo@...hat.com, dave.hansen@...ux.intel.com,
	x86@...nel.org, hpa@...or.com, will@...nel.org,
	peterz@...radead.org, akpm@...ux-foundation.org, acme@...nel.org,
	namhyung@...nel.org
Subject: Re: [PATCH v2 1/3] x86/cpufeatures: Add {required,disabled} feature
 configs

On Sun, Jun 16, 2024 at 01:57:41AM -0700, Xin Li (Intel) wrote:
> diff --git a/arch/x86/Kconfig.cpufeatures b/arch/x86/Kconfig.cpufeatures
> new file mode 100644
> index 000000000000..5ed24e45df87
> --- /dev/null
> +++ b/arch/x86/Kconfig.cpufeatures
> @@ -0,0 +1,197 @@
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# x86 feature bits (see arch/x86/include/asm/cpufeatures.h) that are
> +# either REQUIRED to be enabled, or DISABLED (always ignored) for this
> +# particular compile-time configuration.  The tests for these features
> +# are turned into compile-time constants via the generated
> +# <asm/featuremasks.h>.
> +#
> +# The naming of these variables *must* match asm/cpufeatures.h, e.g.,
> +#     X86_FEATURE_ALWAYS <==> X86_REQUIRED_FEATURE_ALWAYS
> +#     X86_FEATURE_FRED   <==> X86_DISABLED_FEATURE_FRED
> +#
> +# And these REQUIRED and DISABLED config options are manipulated in an
> +# AWK script as the following example:
> +#
> +#                          +----------------------+
> +#                          |    X86_FRED = y ?    |
> +#                          +----------------------+
> +#                              /             \
> +#                           Y /               \ N
> +#  +-------------------------------------+   +-------------------------------+
> +#  | X86_DISABLED_FEATURE_FRED undefined |   | X86_DISABLED_FEATURE_FRED = y |
> +#  +-------------------------------------+   +-------------------------------+
> +#                                                        |
> +#                                                        |
> +#     +-------------------------------------------+      |
> +#     | X86_FEATURE_FRED: feature word 12, bit 17 | ---->|
> +#     +-------------------------------------------+      |
> +#                                                        |
> +#                                                        |
> +#                                     +-------------------------------+
> +#                                     | set bit 17 of DISABLED_MASK12 |
> +#                                     +-------------------------------+
> +#

Look ma, a picture. :-)

But yeah, this is better.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ