Re: [PATCH 01/11] x86/fault: Fix AMD erratum #91 errata fixup for user code

From: Christoph Hellwig
Date: Mon Feb 01 2021 - 04:06:49 EST


On Sun, Jan 31, 2021 at 09:24:32AM -0800, Andy Lutomirski wrote:
> While we're at it, disable the workaround on all CPUs except AMD Family
> 0xF. By my reading of the Revision Guide for AMD Athlon™ 64 and AMD
> Opteron™ Processors, only family 0xF is affected.

I think it would be better to have one no risk refression fix that
just probes both user and kernel addresses and a separate one to
restrict the workaround.

> + if (likely(boot_cpu_data.x86_vendor != X86_VENDOR_AMD
> + || boot_cpu_data.x86 != 0xf))

Normally kernel style would be to have the || on the first line.