x86/spec-ctrl: Adjust DO_OVERWRITE_RSB to be shadow stack compatible
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 24 Apr 2020 13:19:52 +0000 (14:19 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 29 May 2020 22:09:46 +0000 (23:09 +0100)
commit4648cba0a60a660e7ecb06bc552e785250b38b45
treea142d454b7811b29d2046d43da0bad102175dff0
parent18533cfc919172d0df8ce387ffc8e495f7077ee5
x86/spec-ctrl: Adjust DO_OVERWRITE_RSB to be shadow stack compatible

The 32 calls need dropping from the shadow stack as well as the regular stack.
To shorten the code, we can use the 32bit forms of RDSSP/INCSSP, but need to
double up the input to INCSSP to counter the operand size based multiplier.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/spec_ctrl_asm.h