linux-brain/arch/x86/xen
Jan Beulich 474773c42f 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-03-07 12:20:49 +01:00
..
apic.c Merge branch 'WIP.x86/asm' into x86/urgent, because the topic is ready 2018-04-12 09:42:34 +02:00
debugfs.c x86: xen: no need to check return value of debugfs_create functions 2019-06-03 15:49:07 +02:00
debugfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
efi.c xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
enlighten_hvm.c x86/xen: Add xen_no_vector_callback option to test PCI INTX delivery 2021-01-27 11:47:45 +01:00
enlighten_pv.c x86/xen: disable Firmware First mode for correctable memory errors 2020-11-01 12:01:05 +01:00
enlighten_pvh.c xen/pvh: correctly setup the PV EFI interface for dom0 2019-04-25 10:36:25 -04:00
enlighten.c x86/xen: Return from panic notifier 2019-10-07 17:53:30 -04:00
grant-table.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
irq.c x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
Kconfig x86/Kconfig: Add new X86_HV_CALLBACK_VECTOR config symbol 2019-06-11 21:21:11 +02:00
Makefile xen/pvh: Create a new file for Xen specific PVH code 2018-12-13 13:41:49 -05:00
mmu_hvm.c x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
mmu_pv.c xen: remove the exports for xen_{create,destroy}_contiguous_region 2019-09-11 12:43:26 +02:00
mmu.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
mmu.h mm: update ptep_modify_prot_start/commit to take vm_area_struct as arg 2019-03-05 21:07:18 -08:00
multicalls.c treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively 2019-04-09 14:19:06 +02:00
multicalls.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
p2m.c Xen/gnttab: handle p2m update errors on a per-slot basis 2021-03-07 12:20:49 +01:00
pci-swiotlb-xen.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
platform-pci-unplug.c xen/pvh: don't try to unplug emulated devices 2018-10-26 09:16:57 +02:00
pmu.c Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-10-23 16:16:40 +01:00
pmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
setup.c x86/xen: dont add memory above max allowed allocation 2019-02-18 06:52:51 +01:00
smp_hvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp_pv.c x86: Fix early boot crash on gcc-10, third try 2020-05-20 08:20:34 +02:00
smp.c x86/xen: Calculate __max_logical_packages on PV domains 2018-02-17 09:40:45 +01:00
smp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spinlock.c x86/xen: don't unbind uninitialized lock_kicker_irq 2020-12-02 08:49:48 +01:00
suspend_hvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
suspend_pv.c x86/xen/time: Initialize pv xen time in init_hypervisor_platform() 2018-07-20 00:02:39 +02:00
suspend.c x86/xen: Zero MSR_IA32_SPEC_CTRL before suspend 2018-02-28 16:03:19 +01:00
time.c x86/xen: Add "xen_timer_slop" command line option 2019-04-23 11:06:26 -04:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso.h x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
vga.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-asm_32.S x86/asm/32: Add ENDs to some functions and relabel with SYM_CODE_* 2021-01-17 14:05:30 +01:00
xen-asm_64.S xen/pv: Fix a boot up hang revealed by int3 self test 2019-07-17 08:09:59 +02:00
xen-asm.S x86/paravirt: Make read_cr2() CALLEE_SAVE 2019-07-17 23:17:37 +02:00
xen-head.S x86/irq/64: Split the IRQ stack into its own pages 2019-04-17 15:37:02 +02:00
xen-ops.h x86/paravirt: Make read_cr2() CALLEE_SAVE 2019-07-17 23:17:37 +02:00