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: <c2894e47-f902-4603-84e7-a9aca545b18c@intel.com>
Date: Wed, 30 Oct 2024 17:53:30 -0700
From: Sohil Mehta <sohil.mehta@...el.com>
To: Yazen Ghannam <yazen.ghannam@....com>, "Luck, Tony" <tony.luck@...el.com>,
	Borislav Petkov <bp@...en8.de>
CC: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
	"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"x86@...nel.org" <x86@...nel.org>, "avadhut.naik@....com"
	<avadhut.naik@....com>, "john.allen@....com" <john.allen@....com>,
	"mario.limonciello@....com" <mario.limonciello@....com>,
	"bhelgaas@...gle.com" <bhelgaas@...gle.com>, "Shyam-sundar.S-k@....com"
	<Shyam-sundar.S-k@....com>, "richard.gong@....com" <richard.gong@....com>,
	"jdelvare@...e.com" <jdelvare@...e.com>, "linux@...ck-us.net"
	<linux@...ck-us.net>, "clemens@...isch.de" <clemens@...isch.de>,
	"hdegoede@...hat.com" <hdegoede@...hat.com>, "ilpo.jarvinen@...ux.intel.com"
	<ilpo.jarvinen@...ux.intel.com>, "linux-pci@...r.kernel.org"
	<linux-pci@...r.kernel.org>, "linux-hwmon@...r.kernel.org"
	<linux-hwmon@...r.kernel.org>, "platform-driver-x86@...r.kernel.org"
	<platform-driver-x86@...r.kernel.org>, "naveenkrishna.chatradhi@....com"
	<naveenkrishna.chatradhi@....com>, "carlos.bilbao.osdev@...il.com"
	<carlos.bilbao.osdev@...il.com>
Subject: Re: [PATCH 03/16] x86/amd_nb: Clean up early_is_amd_nb()


> On Tue, Oct 29, 2024 at 04:15:33PM +0000, Luck, Tony wrote:
>>>>>> -       if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
>>>>>> -               misc_ids = hygon_nb_misc_ids;
>>>>>> +       if (boot_cpu_has(X86_FEATURE_ZEN))
>>>>>
>>>>> check_for_deprecated_apis: WARNING: arch/x86/kernel/amd_nb.c:395: Do not use boot_cpu_has() - use cpu_feature_enabled() instead.
>>>>


Do the comments in cpufeature.h need updating? It seems to recommend
boot_cpu_has() in most cases and suggests using static_cpu_has() (which
is used by cpu_feature_enabled()) only in fast paths.


/*
 * Static testing of CPU features. Used the same as boot_cpu_has(). It
 * statically patches the target code for additional performance. Use
 * static_cpu_has() only in fast paths, where every cycle counts. Which
 * means that the boot_cpu_has() variant is already fast enough for the
 * majority of cases and you should stick to using it as it is generally
 * only two instructions: a RIP-relative MOV and a TEST.
 *
 ...

 */
static __always_inline bool _static_cpu_has(u16 bit)


> 
> And if not to checkpatch, then maybe it can be included in the TIP
> maintainers' handbook? That is, if others are using it or something
> similar.
> 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ