Re: [PATCH] x86/nospec: Fixup array_index_nospec_mask() asm constraint

2018-02-06 Thread Dan Williams
On Tue, Feb 6, 2018 at 5:50 PM, Linus Torvalds wrote: > On Tue, Feb 6, 2018 at 5:33 PM, Dan Williams wrote: >> Allow the compiler to handle @size as an immediate value rather than >> allocating a register. > > Actually, maybe that "ir" should be "g". > > Because it's fine if it's a memory locatio

Re: [PATCH] x86/nospec: Fixup array_index_nospec_mask() asm constraint

2018-02-06 Thread Linus Torvalds
On Tue, Feb 6, 2018 at 5:33 PM, Dan Williams wrote: > Allow the compiler to handle @size as an immediate value rather than > allocating a register. Actually, maybe that "ir" should be "g". Because it's fine if it's a memory location too. "cmp" takes pretty much anything, as long as the thing we

[PATCH] x86/nospec: Fixup array_index_nospec_mask() asm constraint

2018-02-06 Thread Dan Williams
Allow the compiler to handle @size as an immediate value rather than allocating a register. Reported-by: Linus Torvalds Cc: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Thomas Gleixner Signed-off-by: Dan Williams --- arch/x86/include/asm/barrier.h |2 +- 1 file changed, 1 inse