TencentOS-kernel/arch/x86
Jan Beulich fe2c08a9c1 Xen/gnttab: handle p2m update errors on a per-slot basis
commit 8310b77b48c5558c140e7a57a702e7819e62f04e upstream.

Bailing immediately from set_foreign_p2m_mapping() upon a p2m updating
error leaves the full batch in an ambiguous state as far as the caller
is concerned. Instead flags respective slots as bad, unmapping what
was mapped there right away.

HYPERVISOR_grant_table_op()'s return value and the individual unmap
slots' status fields get used only for a one-time - there's not much we
can do in case of a failure.

Note that there's no GNTST_enomem or alike, so GNTST_general_error gets
used.

The map ops' handle fields get overwritten just to be on the safe side.

This is part of XSA-367.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/96cccf5d-e756-5f53-b91a-ea269bfb9be0@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 12:52:49 +08:00
..
boot x86/asm: Replace __force_order with a memory clobber 2021-03-16 16:39:12 +08:00
configs vgacon: remove software scrollback support 2021-03-16 16:36:07 +08:00
crypto crypto: aesni - prevent misaligned buffers on the stack 2021-04-12 12:52:35 +08:00
entry x86/asm/32: Add ENDs to some functions and relabel with SYM_CODE_* 2021-04-12 12:51:15 +08:00
events perf/x86/kvm: Add Cascade Lake Xeon steppings to isolation_ucodes[] 2021-04-12 12:52:48 +08:00
hyperv x86/hyperv: check cpu mask after interrupt has been disabled 2021-04-12 12:51:21 +08:00
ia32 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
include x86/virt: Eat faults on VMXOFF in reboot flows 2021-04-12 12:52:37 +08:00
kernel x86/build: Treat R_386_PLT32 relocation as R_386_PC32 2021-04-12 12:52:46 +08:00
kvm kvm: x86: replace kvm_spec_ctrl_test_value with runtime test on the host 2021-04-12 12:52:10 +08:00
lib x86/mmx: Use KFPU_387 for MMX string operations 2021-04-12 12:51:37 +08:00
math-emu x86: math-emu: Fix up 'cmp' insn for clang ias 2021-03-16 16:32:34 +08:00
mm x86: fix seq_file iteration for pat/memtype.c 2021-04-12 12:52:38 +08:00
net bpf, x86: Fix encoding for lower 8-bit registers in BPF_STX BPF_B 2021-03-16 16:27:12 +08:00
oprofile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pci x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled 2021-03-16 16:39:28 +08:00
platform efi/x86: Free efi_pgd with free_pages() 2021-03-16 16:41:24 +08:00
power x86/asm/32: Add ENDs to some functions and relabel with SYM_CODE_* 2021-04-12 12:51:15 +08:00
purgatory x86/purgatory: Disable various profiling and sanitizing options 2021-03-16 16:30:08 +08:00
ras Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
realmode x86/asm/32: Add ENDs to some functions and relabel with SYM_CODE_* 2021-04-12 12:51:15 +08:00
tools x86/build: Treat R_386_PLT32 relocation as R_386_PC32 2021-04-12 12:52:46 +08:00
um Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
video Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xen Xen/gnttab: handle p2m update errors on a per-slot basis 2021-04-12 12:52:49 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kbuild Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig.cpu Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig.debug Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile x86/build: Disable CET instrumentation in the kernel for 32-bit too 2021-04-12 12:52:04 +08:00
Makefile.um Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile_32.cpu Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00