The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Borislav Petkov <bp@alien8.de>
Cc: dave.hansen@linux.intel.com,
	Vishal Badole <Vishal.Badole@amd.com>,
	mingo@redhat.com, x86@kernel.org, hpa@zytor.com,
	rafael@kernel.org, lenb@kernel.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org, peterz@infradead.org,
	tony.luck@intel.com, chang.seok.bae@intel.com,
	wei.w.wang@hotmail.com
Subject: Re: [PATCH 1/2] x86/topology: Name the AMD core-type values
Date: Tue, 07 Jul 2026 21:29:32 +0200	[thread overview]
Message-ID: <87wlv6sin7.ffs@fw13> (raw)
In-Reply-To: <74ekieyxpcriutn35o54ejeoccx4xpmhyg2s7uzgiirsxtitws@5e3mwksftvy6>

On Tue, Jul 07 2026 at 10:52, Pawan Gupta wrote:
> On Mon, Jul 06, 2026 at 05:47:13PM -0700, Borislav Petkov wrote:
>> On Mon, Jul 06, 2026 at 11:29:07AM -0700, Pawan Gupta wrote:
>> > >  /**
>> > >   * x86_match_cpu - match current CPU against an array of x86_cpu_ids
>> > >   * @match: Pointer to array of x86_cpu_ids. Last entry terminated with
>> > > @@ -81,7 +53,7 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)
>> > >  			continue;
>> > >  		if (m->feature != X86_FEATURE_ANY && !cpu_has(c, m->feature))
>> > >  			continue;
>> > > -		if (!x86_match_vendor_cpu_type(c, m))
>> > > +		if (m->type != X86_CPU_TYPE_ANY && c->topo.cpu_type != m->type)
>> > 
>> > ... matching a hybrid CPU to any cpu_type.
>> 
>> I don't know what you mean here.
>
> Vulnerability enumeration is done on the BSP, for a hybrid system with BSP
> as a performance-core, a vulnerability that only affects efficiency-cores
> would not be enumerated. So, x86_match_cpu() currently returns a match for
> any cpu-type on a hybrid system.

Abusing the type, which enumerates performance properties, for
vulnerability crystal ball logic is simply broken.

The type is a per CPU property and has nothing to do with hybrid or
not. Hybrid is a packet property.

Just because it is convenient does not make it more correct. If you need
to enable mitigations on hybrid systems, then explicitely check for the
hybrid property.

Thanks,

        tglx




  reply	other threads:[~2026-07-07 19:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29  9:43 [PATCH 0/2] x86/topology: Add support for Low Power cpu_type Vishal Badole
2026-06-29  9:43 ` [PATCH 1/2] x86/topology: Name the AMD core-type values Vishal Badole
2026-07-02  0:27   ` Borislav Petkov
2026-07-02 22:06     ` Thomas Gleixner
2026-07-02 23:03       ` Borislav Petkov
2026-07-03 19:32         ` Borislav Petkov
2026-07-03 19:39           ` Thomas Gleixner
2026-07-06 18:29           ` Pawan Gupta
2026-07-07  0:47             ` Borislav Petkov
2026-07-07 17:52               ` Pawan Gupta
2026-07-07 19:29                 ` Thomas Gleixner [this message]
2026-07-07 20:46                   ` Pawan Gupta
2026-07-07 23:24                     ` Thomas Gleixner
2026-06-29  9:43 ` [PATCH 2/2] x86/topology: Add TOPO_CPU_TYPE_LOW_POWER Vishal Badole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wlv6sin7.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=Vishal.Badole@amd.com \
    --cc=bp@alien8.de \
    --cc=chang.seok.bae@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=wei.w.wang@hotmail.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox