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: Wed, 24 Apr 2024 20:25:10 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: Guenter Roeck <linux@...ck-us.net>, Borislav Petkov <bp@...en8.de>, "Jean
 Delvare" <jdelvare@...e.com>
CC: "Winiarska, Iwona" <iwona.winiarska@...el.com>,
	"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"patches@...ts.linux.dev" <patches@...ts.linux.dev>
Subject: RE: [PATCH v4 55/71] hwmon: (peci/cputemp) Switch to new Intel CPU
 model defines

>> New CPU #defines encode vendor and family as well as model.
>> 
>> Signed-off-by: Tony Luck <tony.luck@...el.com>
>
> Acked-by: Guenter Roeck <linux@...ck-us.net>

Thanks.

>>   	/* Get the RESOLVED_CORES register value */
>>   	switch (peci_dev->info.model) {
....
>> +	case VFM_MODEL(INTEL_ICELAKE_X):

Hmmm. I may have dashed too quickly to a simple solution here.
Looking at <linux/peci.h> I see:

struct peci_device {
        struct device dev;
        struct {
                u16 family;
                u8 model;
                u8 peci_revision;
                u8 socket_id;
        } info;
        u8 addr;
        bool deleted;
};

So the family is available as well as the model.

This will need to be revisited when I start adding some non-family-6 CPUs
as "model" won't be a unique identifier (it already isn't, but there aren't any
meaningful collisions right now).

Is drivers/peci/device.c: peci_get_cpu_id() specific to Intel CPUs? It seems
to retrieve a value in the format of CPUID(EAX=1).EAX that would apply to
both Intel and AMD. Yet I don't see any checking of vendor id before looking
at the model id.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ