Re: [PATCH v6 02/49] x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL

From: Tony Luck
Date: Tue May 21 2024 - 11:48:47 EST


On Tue, May 21, 2024 at 09:49:47AM +0200, Borislav Petkov wrote:
> On Mon, May 20, 2024 at 03:45:33PM -0700, Tony Luck wrote:
> > Fixes: 644e9cbbe3fc ("Add driver auto probing for x86 features v4")
>
> Do you really want to backport this to everything since 2012, as that
> patch is from then?

I didn't include a Cc: stable. Is there some better way to report
the source commit for a problem without triggering a backport?

>
> > @@ -690,6 +690,7 @@ struct x86_cpu_id {
> > __u16 model;
> > __u16 steppings;
> > __u16 feature; /* bit index */
> > + __u16 flags;
> > kernel_ulong_t driver_data;
> > };
> >
> > @@ -700,6 +701,9 @@ struct x86_cpu_id {
> > #define X86_STEPPING_ANY 0
> > #define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
> >
> > +/* x86_cpu_id::flags */
> > +#define X86_CPU_ID_FLAG_ENTRY_VALID BIT(0)
>
> I would definitely not want to have those visible in userspace.
>
> IOW, something like this:

Agreed. Looks better to keep the define out of a <linux/*.h> file.

Do you want me to spin a new patch? Or can you fold your change into
my patch when applying?

-Tony