Re: [PATCH 2/2] x86/retpoline: Fix return buffer filling
- Date: Tue, 13 Feb 2018 06:32:02 -0800
- From: Andi Kleen <andi@xxxxxxxxxxxxxx>
- Subject: Re: [PATCH 2/2] x86/retpoline: Fix return buffer filling
> However... that was supposed to be a 'clear RSB' operation, with 32
> CALLs in sequence. And Boris changed it to 16 by calling __fill_rsb()
> instead of __clear_rsb():
True. That's even worse.
> - asm volatile (ANNOTATE_NOSPEC_ALTERNATIVE
> - ALTERNATIVE("jmp 910f",
> - __stringify(__FILL_RETURN_BUFFER(%0, RSB_CLEAR_LOOPS, %1)),
> - X86_FEATURE_RETPOLINE)
> - "910:"
> - : "=r" (loops), ASM_CALL_CONSTRAINT
> - : : "memory" );
> + alternative_input("",
> + "call __fill_rsb",
> + X86_FEATURE_RETPOLINE,
> + ASM_NO_INPUT_CLOBBER(_ASM_BX, "memory"));
> I think we do need to revert that patch. And perhaps stop accepting any
> more similar bikeshedding.
Yes revertion would be the right way.
I already regret the time I wasted trying to fix it.