lkml.org 
[lkml]   [2020]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2020-10-06 16:31    [W:0.082 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site