Displaying 3 results from an estimated 3 matches for "__x86_thunk_indirect".
2018 Feb 09
0
retpoline mitigation and 6.0
...t final 'ret' still leaves the target address on the
stack, so there would also need to be a complicated dance, without
using any registers, to pop that too.
I expected the emitted code for a *call* using the thunk to look more
like
jmp 2f
1: pushl -0x20(%ebp) # cmp_func
jmp __x86_thunk_indirect # jmp, not call
2: call 1b # set up address for cmp_func to return to
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm...
2018 Feb 09
2
retpoline mitigation and 6.0
On Fri, 2018-02-09 at 01:18 +0000, David Woodhouse wrote:
>
> For now I'm just going to attempt to work around it like this in the
> kernel, so I can concentrate on the retpoline bits:
> http://david.woodhou.se/clang-percpu-hack.patch
32-bit doesn't boot. Built without CONFIG_RETPOLINE and with Clang 5.0
(and the above patch) it does. I'm rebuilding a Release build of
2018 Feb 09
2
retpoline mitigation and 6.0
...mments here:
https://github.com/llvm-project/llvm-project-20170507/blob/master/llvm/lib/Target/X86/X86RetpolineThunks.cpp#L179-L194
>
> I expected the emitted code for a *call* using the thunk to look more
> like
>
> jmp 2f
> 1: pushl -0x20(%ebp) # cmp_func
> jmp __x86_thunk_indirect # jmp, not call
> 2: call 1b # set up address for cmp_func to return to
>
Yeah, the specific goal was to minimize the code size footprint at the call
site even though it means a few more instructions in the thunk. Our pattern
also has a minor reduction in the dynamic branche...