]> git.baikalelectronics.ru Git - kernel.git/commit
xen/arm: do not setup the runstate info page if kpti is enabled
authorStefano Stabellini <stefano.stabellini@xilinx.com>
Thu, 24 Sep 2020 23:49:55 +0000 (16:49 -0700)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Sun, 4 Oct 2020 23:41:33 +0000 (18:41 -0500)
commite9cc64a135757649b9916e75211937cf6ac48e4c
treef0bedc44b6b3350d498dd32817ae8a92592623ea
parent1fe5552feccc5bf6507c90065f0cb3a3ea74cbe6
xen/arm: do not setup the runstate info page if kpti is enabled

The VCPUOP_register_runstate_memory_area hypercall takes a virtual
address of a buffer as a parameter. The semantics of the hypercall are
such that the virtual address should always be valid.

When KPTI is enabled and we are running userspace code, the virtual
address is not valid, thus, Linux is violating the semantics of
VCPUOP_register_runstate_memory_area.

Do not call VCPUOP_register_runstate_memory_area when KPTI is enabled.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
CC: Bertrand Marquis <Bertrand.Marquis@arm.com>
CC: boris.ostrovsky@oracle.com
CC: jgross@suse.com
Link: https://lore.kernel.org/r/20200924234955.15455-1-sstabellini@kernel.org
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/arm/include/asm/xen/page.h
arch/arm/xen/enlighten.c
arch/arm64/include/asm/xen/page.h