On Thu, 2018-01-11 at 13:41 +0000, Andrew Cooper wrote:
> On 11/01/18 13:03, David Woodhouse wrote:
> > 
> > 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? :)
> Just one of many...
> 
> I've found furthermore and necessarily.  Where is the 3rd?

* even if IT was a … 


> > > -        asm volatile ( "call *%[stb]\n"
> > > +        asm volatile ( "CALL_THUNK %[stb]\n"
> > If you make that %V[stb] then...
> > ... you don't need this.
> That's fine in principle, except it isn't compatible with most of the
> compilers we support.  To use, the %V has to be hidden behind a
> conditional macro, and I can't think of any remotely-clean way to do
> that.

In at least one incarnation I ended up with something like

#ifndef CONFIG_RETPOLINE
#define CALL_THUNK(reg) "call *%[" #reg "]"
#else
#define CALL_THUNK(reg) "CALL_THUNK %V[" #reg "]"
#endif

Or maybe I just insisted that it was called %[thunk_target] and my
CALL_THUNK C macro doesn't even take an argument. I forget. Late night…

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to