Messages in this thread | | | Subject | Re: [PATCH] x86: Don't build vDSO with $(RETPOLINE_CFLAGS) -DRETPOLINE | From | David Woodhouse <> | Date | Tue, 20 Mar 2018 08:21:11 +0000 |
| |
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] | |