On Tue, 2018-01-23 at 16:25 +0100, Peter Zijlstra wrote: > > +               if (insn->type != INSN_JUMP_DYNAMIC && > +                   insn->type != INSN_CALL_DYNAMIC) { > +                       WARN_FUNC("retpoline_safe hint not a indirect jump/call", > +                                 insn->sec, insn->offset); > +                       return -1; ...         case 0xff:                 if (modrm_reg == 2 || modrm_reg == 3)                         *type = INSN_CALL_DYNAMIC;                 else if (modrm_reg == 4)                         *type = INSN_JUMP_DYNAMIC;                 else if (modrm_reg == 5)                         /* jmpf */                         *type = INSN_CONTEXT_SWITCH; I *think* your check includes far calls (FF/3), although not far jumps? It shouldn't, because I don't believe far calls are subject to the same speculation? Other than that, which you can probably ignore if you didn't have to explicitly annotate [m]any safe far calls anyway, Reviewed-by: David Woodhouse Thanks for doing this.