Re: [PATCH 06/11] x86/fault: Improve kernel-executing-user-memory handling

From: Andy Lutomirski
Date: Mon Feb 01 2021 - 20:02:59 EST


On Mon, Feb 1, 2021 at 1:08 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> On Sun, Jan 31, 2021 at 09:24:37AM -0800, Andy Lutomirski wrote:
> > #if defined(CONFIG_X86_64) && defined(CONFIG_CPU_SUP_AMD)
> > + if (likely(boot_cpu_data.x86_vendor != X86_VENDOR_AMD
> > + || boot_cpu_data.x86 != 0xf))
>
> Same nitpick as for the other patch. Maybe we wan a little inline
> helper for the specific erratum that includes the vendor and family
> checks in adddition to using IS_ENABLED for the config options?

I defer to Boris as to exactly what condition we should check here.