TencentOS-kernel/arch
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
..
alpha alpha: fix annotation of io{read,write}{16,32}be() 2021-03-16 16:34:34 +08:00
arc arch/arc: add copy_user_page() to <asm/page.h> to fix build error on ARC 2021-04-12 12:51:24 +08:00
arm Xen/gnttab: handle p2m update errors on a per-slot basis 2021-04-12 12:52:49 +08:00
arm64 arm64 module: set plt* section addresses to 0x0 2021-04-12 12:52:43 +08:00
c6x Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
csky csky: Fixup abiv2 syscall_trace break a4 & a5 2021-03-16 16:28:56 +08:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-04-12 12:52:05 +08:00
hexagon hexagon: define ioremap_uc 2021-03-16 16:27:29 +08:00
ia64 ia64: fix build error with !COREDUMP 2021-03-16 16:40:09 +08:00
m68k m68k: q40: Fix info-leak in rtc_ioctl 2021-03-16 16:36:33 +08:00
microblaze Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mips MIPS: Drop 32-bit asm string functions 2021-04-12 12:52:45 +08:00
nds32 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
nios2 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
openrisc openrisc: Fix issue with get_user for 64-bit values 2021-03-16 16:39:36 +08:00
parisc parisc: Bump 64-bit IRQ stack size to 64 KB 2021-04-12 12:52:48 +08:00
powerpc powerpc/32s: Add missing call to kuep_lock on syscall entry 2021-04-12 12:52:39 +08:00
riscv riscv: virt_addr_valid must check the address belongs to linear mapping 2021-04-12 12:52:02 +08:00
s390 s390/vtime: fix inline assembly clobber list 2021-04-12 12:52:40 +08:00
sh sh: dma: fix kconfig dependency for G2_DMA 2021-04-12 12:51:39 +08:00
sparc sparc32: fix a user-triggerable oops in clear_user() 2021-04-12 12:52:40 +08:00
um um: mm: check more comprehensively for stub changes 2021-04-12 12:52:40 +08:00
unicore32 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
x86 Xen/gnttab: handle p2m update errors on a per-slot basis 2021-04-12 12:52:49 +08:00
xtensa xtensa: uaccess: Add missing __user to strncpy_from_user() prototype 2021-03-16 16:41:40 +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
Kconfig Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS" 2021-03-16 16:43:47 +08:00