x86/extable: Adjust extable handling to be shadow stack compatible
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 30 Apr 2020 14:05:24 +0000 (15:05 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 29 May 2020 22:09:46 +0000 (23:09 +0100)
commit209fb9919b5085f97c7fcf339fa8535e025e8d78
treee747de3caa93129da630c631132c890e352a782c
parent4648cba0a60a660e7ecb06bc552e785250b38b45
x86/extable: Adjust extable handling to be shadow stack compatible

When adjusting an IRET frame to recover from a fault, and equivalent
adjustment needs making in the shadow IRET frame.

The adjustment in exception_with_ints_disabled() could in principle be an
alternative block rather than an ifdef, as the only two current users of
_PRE_EXTABLE() are IRET-to-guest instructions.  However, this is not a
fastpath, and this form is more robust to future changes.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/traps.c
xen/arch/x86/x86_64/entry.S