kernel-fxtec-pro1x/arch/arm
Marc Zyngier 1fa2c32e37 KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch
commit c4ad98e4b72cb5be30ea282fce935248f2300e62 upstream.

KVM currently assumes that an instruction abort can never be a write.
This is in general true, except when the abort is triggered by
a S1PTW on instruction fetch that tries to update the S1 page tables
(to set AF, for example).

This can happen if the page tables have been paged out and brought
back in without seeing a direct write to them (they are thus marked
read only), and the fault handling code will make the PT executable(!)
instead of writable. The guest gets stuck forever.

In these conditions, the permission fault must be considered as
a write so that the Stage-1 update can take place. This is essentially
the I-side equivalent of the problem fixed by 60e21a0ef5 ("arm64: KVM:
Take S1 walks into account when determining S2 write faults").

Update kvm_is_write_fault() to return true on IABT+S1PTW, and introduce
kvm_vcpu_trap_is_exec_fault() that only return true when no faulting
on a S1 fault. Additionally, kvm_vcpu_dabt_iss1tw() is renamed to
kvm_vcpu_abt_iss1tw(), as the above makes it plain that it isn't
specific to data abort.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Will Deacon <will@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200915104218.1284701-2-maz@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01 13:14:54 +02:00
..
boot ARM: dts: vfxxx: Add syscon compatible with OCOTP 2020-09-17 13:45:30 +02:00
common ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used 2020-01-27 14:50:28 +01:00
configs scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
crypto crypto: arm/crc32 - avoid warning when compiling with Clang 2019-11-20 18:47:11 +01:00
firmware
include KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch 2020-10-01 13:14:54 +02:00
kernel ARM: 8948/1: Prevent OOB access in stacktrace 2020-10-01 13:14:31 +02:00
kvm KVM: arm: Don't write junk to CP15 registers on reset 2019-08-29 08:28:48 +02:00
lib ARM: 8843/1: use unified assembler in headers 2020-06-03 08:19:34 +02:00
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: pm: add missing put_device() call in at91_pm_sram_init() 2020-08-19 08:14:49 +02:00
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment 2019-02-06 17:30:11 +01:00
mach-davinci ARM: davinci: dm365: Fix McBSP dma_slave_map entry 2019-11-10 11:27:26 +01:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: exynos: Fix undefined instruction during Exynos5422 resume 2019-06-15 11:54:10 +02:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: imx6: add missing put_device() call in imx6q_suspend_init() 2020-07-16 08:17:23 +02:00
mach-integrator ARM: integrator: Add some Kconfig selections 2020-06-25 15:32:48 +02:00
mach-iop13xx ARM: iop: don't use using 64-bit DMA masks 2019-05-08 07:21:51 +02:00
mach-iop32x ARM: iop32x/n2100: fix PCI IRQ mapping 2019-02-15 08:10:12 +01:00
mach-iop33x
mach-ixp4xx
mach-keystone
mach-ks8695 ARM: ks8695: fix section mismatch warning 2019-12-05 09:20:02 +01:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-mmp ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt 2018-12-19 19:19:51 +01:00
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-netx
mach-nomadik
mach-npcm ARM: npcm: Bring back GPIOLIB support 2020-02-19 19:51:56 +01:00
mach-nspire
mach-omap1 ARM: OMAP1/2: fix SoC name printing 2019-12-13 08:52:11 +01:00
mach-omap2 hwrng: omap3-rom - Fix missing clock by probing with device tree 2020-01-27 14:51:20 +01:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa ARM: pxa: avoid section mismatch warning 2019-02-12 19:47:09 +01:00
mach-qcom
mach-realview
mach-rockchip
mach-rpc ARM: riscpc: fix lack of keyboard interrupts after irq conversion 2020-01-27 14:50:47 +01:00
mach-s3c24xx ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify 2019-03-23 20:10:08 +01:00
mach-s3c64xx
mach-s5pv210
mach-sa1100
mach-shmobile
mach-socfpga ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh() 2020-08-19 08:14:50 +02:00
mach-spear
mach-sti
mach-stm32 ARM: stm32: use "depends on" instead of "if" after prompt 2020-01-27 14:51:01 +01:00
mach-sunxi ARM: sunxi: Fix CPU powerdown on A83T 2019-11-12 19:20:40 +01:00
mach-tango ARM: tango: Improve ARCH_MULTIPLATFORM compatibility 2019-02-15 08:10:12 +01:00
mach-tegra ARM: tegra: Correct PL310 Auxiliary Control Register initialization 2020-06-22 09:05:28 +02:00
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress ARM: vexpress: Set-up shared OPP table instead of individual for each CPU 2020-01-12 12:17:08 +01:00
mach-vt8500
mach-w90x900
mach-zx
mach-zynq ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up 2019-10-05 13:10:07 +02:00
mm ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE 2020-06-22 09:05:12 +02:00
net arm, bpf: Fix bugs with ALU64 {RSH, ARSH} BPF_K shift by 0 2020-04-23 10:30:12 +02:00
nwfpe
oprofile
plat-iop ARM: iop: don't use using 64-bit DMA masks 2019-05-08 07:21:51 +02:00
plat-omap
plat-orion ARM: orion: don't use using 64-bit DMA masks 2019-05-08 07:21:51 +02:00
plat-pxa ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data" 2020-01-27 14:50:38 +01:00
plat-samsung ARM: samsung: Fix system restart on S3C6410 2019-10-05 13:10:06 +02:00
plat-versatile
probes ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction 2019-02-27 10:08:49 +01:00
tools
vdso ARM: vdso: Remove dependency with the arch_timer driver internals 2019-05-31 06:46:11 -07:00
vfp ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc 2019-02-20 10:25:37 +01:00
xen xen/efi: Set nonblocking callbacks 2019-10-29 09:19:33 +01:00
Kconfig ARM: 8951/1: Fix Kexec compilation issue. 2020-02-24 08:34:51 +01:00
Kconfig-nommu
Kconfig.debug ARM: debug: enable UART1 for socfpga Cyclone5 2019-12-13 08:52:08 +01:00
Makefile