lkml.org 
[lkml]   [2018]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86: Don't build vDSO with $(RETPOLINE_CFLAGS) -DRETPOLINE
From
Date
On Mon, 2018-03-19 at 14:11 -0700, H.J. Lu wrote:
> vDSO code runs in userspace.  Don't compile it with retpoline.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>

There are cases where we might actually want userspace to be using
retpoline though. We still only do IBPB for *some* processes, and
haven't really even finished the argument about the heuristics we use
for that.

If this is only for the switch in __vdso_clock_gettime() then maybe we
turn that into a series of if/else instead of a switch. Or just write
it in asm.

Or better still, teach GCC that when it's using retpoline, a jump table
is *NOT* faster than a series of that many conditional branches. The
costs are higher, and I don't think we taught GCC that yet, did we?[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2018-03-20 09:22    [W:0.060 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site