Re: [PATCH v2] x86/speculation: Use DECLARE_PER_CPU for x86_spec_ctrl_current

From: Jakub Kicinski
Date: Thu Jul 14 2022 - 18:18:55 EST

On Thu, 14 Jul 2022 15:14:53 -0700 Linus Torvalds wrote:
> On Thu, Jul 14, 2022 at 2:56 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
> > I have clang 13, let me double check this fix is enough for the build
> > to complete without disabling WERROR.
> I have clang 14 locally, and it builds fine with that (and doesn't
> build without it).

FWIW I can confirm - builds with clang 13 as well.

> I actually normally build the kernel with both gcc and clang. My
> "upstream" kernel I build with gcc, and then I have my "private random
> collection of patches" kernel that I build with clang and that are
> just rebased on top of the kernel-of-the-day.
> This is all entirely for historical reasons - part of my "private
> random collection of patches" used to be the "asm goto with outputs",
> which had clang support first.
> But then the reason I never even noticed the build breakage with the
> retbleed patches until much too late was that those I just had as a
> third fork off my upstream kernel, so despite me usually building with
> clang too, that only got attention from gcc.
> So it's really just a microcosm version of the exact same bigger issue
> we always have with those embargoed hw security patches: they end up
> missing out on all the usual test environments.
> Anyway, I cherry-picked Nathan's patch from my clang tree and pushed
> it out as commit db886979683a ("x86/speculation: Use DECLARE_PER_CPU
> for x86_spec_ctrl_current").

Awesome, thanks!