[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6.5 11/26] x86: Support indirect thunks from assembly code
On Thu, 2018-01-04 at 00:15 +0000, Andrew Cooper wrote: > + * We've got no usable stack so can't use a RETPOLINE thunk, and are > + * further than +- 2G from the high mappings so couldn't use > JUMP_THUNK > + * even if was a non-RETPOLINE thunk. Futhermore, an LFENCE isn't > + * necesserily safe to use at this point. I count three typos, pedantry about ± and GiB aside. Late night? :) > --- a/xen/arch/x86/extable.c > +++ b/xen/arch/x86/extable.c > @@ -158,7 +158,7 @@ static int __init stub_selftest(void) > memcpy(ptr, tests[i].opc, ARRAY_SIZE(tests[i].opc)); > unmap_domain_page(ptr); > > - asm volatile ( "call *%[stb]\n" > + asm volatile ( "CALL_THUNK %[stb]\n" If you make that %V[stb] then... > + .if CONFIG_INDIRECT_THUNK == 1 > + > + $done = 0 > + .irp reg, rax, rbx, rcx, rdx, rsi, rdi, rbp, r8, r9, r10, r11, r12, > r13, r14, r15 > + .ifeqs "\arg", "%\reg" > + \insn __x86.indirect_thunk.\reg > + $done = 1 > + .exitm > + .endif > + .endr > + .if $done != 1 > + .error "Bad register arg \arg" > + .endif > + ... you don't need this. Attachment:
smime.p7s _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |