]> xenbits.xensource.com Git - xen.git/commit
x86: mirror compat argument translation area for 32-bit PV
authorJan Beulich <jbeulich@suse.com>
Thu, 25 Feb 2021 14:10:47 +0000 (15:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Feb 2021 14:10:47 +0000 (15:10 +0100)
commitcda16c1bb223bfaa83022d97d87da7909d604896
tree81ddd3b95201618693d761963afbb8a374008e86
parent067935804a8e7a33ff7170a2db8ce94bb46d9a63
x86: mirror compat argument translation area for 32-bit PV

Now that we guard the entire Xen VA space against speculative abuse
through hypervisor accesses to guest memory, the argument translation
area's VA also needs to live outside this range, at least for 32-bit PV
guests. To avoid extra is_hvm_*() conditionals, use the alternative VA
uniformly.

While this could be conditionalized upon CONFIG_PV32 &&
CONFIG_SPECULATIVE_HARDEN_GUEST_ACCESS, omitting such extra conditionals
keeps the code more legible imo.

Fixes: 4dc181599142 ("x86/PV: harden guest memory accesses against speculative abuse")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
xen/arch/x86/mm.c
xen/include/asm-x86/config.h
xen/include/asm-x86/x86_64/uaccess.h