On Fri, 2018-01-05 at 16:11 -0500, Brian Gerst wrote: > > Another way to do it is with two consecutive alternatives: > > ALTERNATIVE(NOP, K8: lfence) > ALTERNATIVE(jmp indirect, RETPOLINE: jmp thunk) > > This also avoids the issue with the relocation of the jmp target when > the replacement is more than one instruction. You'd still want a RETPOLINE_AMD flag to enable that lfence; it's not just K8.