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: <20241104142329.GUZyjY4Zwb6WyB2JYv@fat_crate.local>
Date: Mon, 4 Nov 2024 15:23:29 +0100
From: Borislav Petkov <bp@...en8.de>
To: Yazen Ghannam <yazen.ghannam@....com>
Cc: linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
	tony.luck@...el.com, x86@...nel.org, avadhut.naik@....com,
	john.allen@....com, mario.limonciello@....com, bhelgaas@...gle.com,
	Shyam-sundar.S-k@....com, richard.gong@....com, jdelvare@...e.com,
	linux@...ck-us.net, clemens@...isch.de, hdegoede@...hat.com,
	ilpo.jarvinen@...ux.intel.com, linux-pci@...r.kernel.org,
	linux-hwmon@...r.kernel.org, platform-driver-x86@...r.kernel.org,
	naveenkrishna.chatradhi@....com, carlos.bilbao.osdev@...il.com
Subject: Re: [PATCH 09/16] x86/amd_nb, x86/amd_node: Simplify
 amd_pci_dev_to_node_id()

On Wed, Oct 23, 2024 at 05:21:43PM +0000, Yazen Ghannam wrote:
> diff --git a/arch/x86/include/asm/amd_node.h b/arch/x86/include/asm/amd_node.h
> index 419a0ad13ef2..8e473a293706 100644
> --- a/arch/x86/include/asm/amd_node.h
> +++ b/arch/x86/include/asm/amd_node.h
> @@ -30,4 +30,10 @@ static inline u16 amd_num_nodes(void)
>  	return topology_amd_nodes_per_pkg() * topology_max_packages();
>  }
>  
> +/* Caller must ensure the input is an AMD node device. */

You can ensure that yourself by checking the PCI vendor in the PCI device,
right?

IOW, pdev->vendor...

-- 
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