1
0
Fork 0
alistair23-linux/arch
Marc Zyngier c4ad98e4b7 KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch
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
2020-09-18 18:01:48 +01:00
..
alpha iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
arc mm/gup: remove task_struct pointer for all gup code 2020-08-12 10:58:04 -07:00
arm all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
arm64 KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch 2020-09-18 18:01:48 +01:00
c6x Merge branch 'work.regset' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-08-07 09:29:25 -07:00
csky mm/csky: use general page fault accounting 2020-08-12 10:58:03 -07:00
h8300 uaccess: remove segment_eq 2020-08-12 10:57:58 -07:00
hexagon mm/hexagon: use general page fault accounting 2020-08-12 10:58:03 -07:00
ia64 all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
m68k Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
microblaze all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
mips all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
nds32 mm/nds32: use general page fault accounting 2020-08-12 10:58:03 -07:00
nios2 mm/nios2: use general page fault accounting 2020-08-12 10:58:03 -07:00
openrisc OpenRISC updates for 5.9 2020-08-14 14:04:53 -07:00
parisc parisc: fix PMD pages allocation by restoring pmd_alloc_one() 2020-08-16 10:53:13 -07:00
powerpc iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
riscv A RISC-V Fix for 5.9 2020-08-15 18:54:42 -07:00
s390 all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
sh Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
sparc all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
um Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
x86 arm64/x86: KVM: Introduce steal-time cap 2020-08-21 14:05:19 +01:00
xtensa all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
.gitignore
Kconfig A set oftimekeeping/VDSO updates: 2020-08-14 14:26:08 -07:00