linux-stable/arch
Will Deacon 3dcaf25993 KVM: arm64: Ensure target address is granule-aligned for range TLBI
commit 4c36a15673 upstream.

When zapping a table entry in stage2_try_break_pte(), we issue range
TLB invalidation for the region that was mapped by the table. However,
we neglect to align the base address down to the granule size and so
if we ended up reaching the table entry via a misaligned address then
we will accidentally skip invalidation for some prefix of the affected
address range.

Align 'ctx->addr' down to the granule size when performing TLB
invalidation for an unmapped table in stage2_try_break_pte().

Cc: Raghavendra Rao Ananta <rananta@google.com>
Cc: Gavin Shan <gshan@redhat.com>
Cc: Shaoqin Huang <shahuang@redhat.com>
Cc: Quentin Perret <qperret@google.com>
Fixes: defc8cc7ab ("KVM: arm64: Invalidate the table entries upon a range")
Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240327124853.11206-5-will@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:35:51 +02:00
..
alpha rtc: Add support for configuring the UIP timeout for RTC reads 2024-01-31 16:18:56 -08:00
arc work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:24:47 +01:00
arm ARM: prctl: reject PR_SET_MDWE on pre-ARMv6 2024-04-03 15:28:54 +02:00
arm64 KVM: arm64: Ensure target address is granule-aligned for range TLBI 2024-04-10 16:35:51 +02:00
csky work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:24:47 +01:00
hexagon hexagon: vmlinux.lds.S: handle attributes section 2024-04-03 15:28:55 +02:00
ia64 cpu-hotplug: Provide prototypes for arch CPU registration 2023-10-11 14:27:37 +02:00
loongarch LoongArch/crypto: Clean up useless assignment operations 2024-04-03 15:28:36 +02:00
m68k mm: Introduce flush_cache_vmap_early() 2024-02-16 19:10:52 +01:00
microblaze Microblaze patches for 6.6-rc1 2023-09-05 10:15:22 -07:00
mips MIPS: Clear Cause.BD in instruction_pointer_set 2024-03-26 18:19:10 -04:00
nios2 mm: Introduce flush_cache_vmap_early() 2024-02-16 19:10:52 +01:00
openrisc OpenRISC updates for 6.6 2023-09-05 10:09:31 -07:00
parisc prctl: generalize PR_SET_MDWE support check to be per-arch 2024-04-03 15:28:54 +02:00
powerpc mm/treewide: replace pud_large() with pud_leaf() 2024-04-10 16:35:46 +02:00
riscv RISC-V: KVM: Fix APLIC in_clrip[x] read emulation 2024-04-10 16:35:48 +02:00
s390 mm/treewide: replace pud_large() with pud_leaf() 2024-04-10 16:35:46 +02:00
sh mm: Introduce flush_cache_vmap_early() 2024-02-16 19:10:52 +01:00
sparc mm/treewide: replace pud_large() with pud_leaf() 2024-04-10 16:35:46 +02:00
um um: Fix adding '-no-pie' for clang 2024-02-23 09:25:03 +01:00
x86 x86/retpoline: Do the necessary fixup to the Zen3/4 srso return thunk for !SRSO 2024-04-10 16:35:51 +02:00
xtensa work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:24:47 +01:00
.gitignore
Kconfig scs: add CONFIG_MMU dependency for vfree_atomic() 2024-02-23 09:24:54 +01:00