Re: [PATCH v2 5/5] x86/pti: Do not enable PTI on fixed Intel processors

Alan Cox
2018-01-24T18:40:53Z

> > AND K5 speculates, Cyrix 6x86 speculates, IDT WinChip does not. I think
> > this should be
> >
> > X86_VENDOR_ANY, 4
> > X86_VENDOR_INTEL, 5,
> > X86_VENDOR_CENTAUR, 5,
>
> Hm, for the specific case of controlling X86_BUG_CPU_MELTDOWN it's not
> just "speculates" which is the criterion. It's "optimises away the
> permissions checks while speculating, on the assumption that it'll be
> fixed up before retiring the instruction".

Nobody has published official statements on Cyrix or AMD 32bit processors
so we don't know if they are vulnerable to meltdown. One problem I
suspect is that as with things like Alpha 21264 - the people who knew are
probably long retired. We do know the Intel ones I listed are OK and the
Centaur.

If someone can figure out the Cyrix and AMD cases that would be great.

> By the time the dust settles we might end up with a bunch of different
> match tables, *one* of which is "does not speculate at all". And the
> conditions for the different bugs will each use different sets of match
> tables. For example
>
>  if (!x86_match_cpu(cpu_no_speculation_at_all) &&
>      !x86_match_cpu(speculation_but_no_meltdown) &&
>      !cpu_sets_rdcl_no())
> setup_force_cpu_bug(X86_BUG_CPU_MELTDOWN);
>
>  if (!x86_match_cpu(cpu_no_speculation_at_all) &&
>      !x86_match_cpu(no_branch_target_buffer))
> setup_force_cpu_bug(X86_BUG_SPECTRE_V2);

There are afaik no x86 processors that speculate and don't have a BTB.
It's a bit like building a racing car with no gearbox.

Alan