On 26.11.2021 13:34, Andrew Cooper wrote: > --- a/xen/include/asm-x86/current.h > +++ b/xen/include/asm-x86/current.h > @@ -173,7 +173,6 @@ unsigned long get_stack_dump_bottom (unsigned long sp); > #define switch_stack_and_jump(fn, instr, constr) \ > ({ \ > unsigned int tmp; \ > - (void)((fn) == (void (*)(void))NULL); \ > BUILD_BUG_ON(!ssaj_has_attr_noreturn(fn)); \ > __asm__ __volatile__ ( \ > SHADOW_STACK_WORK \ > @@ -198,6 +197,7 @@ unsigned long get_stack_dump_bottom (unsigned long sp); > > /* The constraint may only specify non-call-clobbered registers. */ > #define reset_stack_and_jump_ind(fn) \ > + (void)((fn) == (void (*)(void))NULL); \ > switch_stack_and_jump(fn, "INDIRECT_JMP %", "b") >
While the risk of use in a context really requiring it is low, I still think we'd be better off wrapping the whole thing in ({ }) then. Jan