linux/arch/arm64
Stefano Stabellini cbd94a0b5b xen/arm: call uaccess_ttbr0_enable for dm_op hypercall
commit 7f9bbc1140 upstream.

dm_op hypercalls might come from userspace and pass memory addresses as
parameters. The memory addresses typically correspond to buffers
allocated in userspace to hold extra hypercall parameters.

On ARM, when CONFIG_ARM64_SW_TTBR0_PAN is enabled, they might not be
accessible by Xen, as a result ioreq hypercalls might fail. See the
existing comment in arch/arm64/xen/hypercall.S regarding privcmd_call
for reference.

For privcmd_call, Linux calls uaccess_ttbr0_enable before issuing the
hypercall thanks to commit 9cf09d68b8. We need to do the same for
dm_op. This resolves the problem.

Cc: stable@kernel.org
Fixes: 9cf09d68b8 ("arm64: xen: Enable user access before a privcmd hvc call")
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Message-ID: <alpine.DEB.2.22.394.2505121446370.8380@ubuntu-linux-20-04-desktop>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-06-27 11:07:25 +01:00
..
boot arm64: dts: ti: k3-am65-main: Add missing taps to sdhci0 2025-06-27 11:07:20 +01:00
configs arm64: defconfig: mediatek: enable PHY drivers 2025-06-27 11:07:14 +01:00
crypto crypto: arm64/neonbs - fix out-of-bounds access on short input 2024-03-06 14:45:10 +00:00
hyperv hyperv: simplify and rename generate_guest_id 2022-09-28 13:36:56 +00:00
include arm64/mm: Check PUD_TYPE_TABLE in pud_bad() 2025-06-04 14:40:07 +02:00
kernel arm64/fpsimd: Fix merging of FPSIMD state during signal return 2025-06-27 11:07:08 +01:00
kvm KVM: arm64: Eagerly switch ZCR_EL{1,2} 2025-04-25 10:44:00 +02:00
lib arm64: insn: Add support for encoding DSB 2025-05-18 08:21:25 +02:00
mm arm64: mm: Correct the update of max_pfn 2025-04-25 10:43:42 +02:00
net bpf, arm64: Fix address emission with tag-based KASAN enabled 2025-05-22 14:10:09 +02:00
tools arm64: errata: Add workaround for Arm errata 3194386 and 3312417 2024-08-14 13:52:51 +02:00
xen xen/arm: call uaccess_ttbr0_enable for dm_op hypercall 2025-06-27 11:07:25 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig arm64: Support ARM64_VA_BITS=52 when setting ARCH_MMAP_RND_BITS_MAX 2025-06-27 11:07:08 +01:00
Kconfig.debug arm64: remove TEXT_OFFSET randomization 2020-06-15 13:10:59 +01:00
Kconfig.platforms ARM: SoC code changes for 6.1 2022-10-06 11:22:25 -07:00
Makefile arm64: Force position-independent veneers 2024-11-01 01:56:03 +01:00