[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201006143012.fgpyujguzvcwszp4@treble>
Date: Tue, 6 Oct 2020 09:30:12 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...e.de>
Subject: Re: linux-next: build failure after merge of the vfs tree
On Mon, Sep 28, 2020 at 11:10:56PM -0500, Josh Poimboeuf wrote:
> > Josh, any ideas? We could, of course, make it "r"(size), but that would
> > be unpleasant in all existing callers...
>
> Sorry, I've been traveling. I'd just vote for making it "r".
>
> array_index_nospec() is always called after a usercopy. I don't think
> anyone will notice the extra mov, for the cases where it would be
> propagated as an immediate. And the argument *is* an unsigned long
> after all.
>
> Stephen, can you confirm this fixes it?
Still traveling, I didn't see an update on this. Any objections to the
below? I assume it fixes Stephen's build issue.
>
> diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h
> index d158ea1fa250..69045ac62f58 100644
> --- a/arch/x86/include/asm/barrier.h
> +++ b/arch/x86/include/asm/barrier.h
> @@ -40,7 +40,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long index,
>
> asm volatile ("cmp %1,%2; sbb %0,%0;"
> :"=r" (mask)
> - :"g"(size),"r" (index)
> + :"r"(size), "r"(index)
> :"cc");
> return mask;
> }
>
--
Josh
Powered by blists - more mailing lists