[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v8 02/17] x86: Support indirect thunks from assembly code



>>> On 04.02.18 at 11:57, <dwmw2@xxxxxxxxxxxxx> wrote:
> On Fri, 2018-01-12 at 18:00 +0000, Andrew Cooper wrote:
>> +#ifdef CONFIG_INDIRECT_THUNK
>> +    /* callq __x86_indirect_thunk_rcx */
>> +    ctxt->io_emul_stub[10] = 0xe8;
>> +    *(int32_t *)&ctxt->io_emul_stub[11] =
>> +        (unsigned long)__x86_indirect_thunk_rcx - (stub_va + 11 + 4);
>> +
>> +#else
> 
> Is that always guaranteed to be within a 32-bit offset? It's from the
> stack, isn't it? Even if it's true now, do we need a sanity check just
> to make *sure* things never get changed around and make it untrue?

No, it's not from the stack - we've specifically switched away from
having stubs on the stack quite some time ago. The stub placement
is specifically so that they are within reach.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.