Steve Capper
4a24416796
tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry
...
[ Upstream commit 697a1d44af8ba0477ee729e632f4ade37999249a ]
tlb_remove_huge_tlb_entry only considers PMD_SIZE and PUD_SIZE when
updating the mmu_gather structure.
Unfortunately on arm64 there are two additional huge page sizes that
need to be covered: CONT_PTE_SIZE and CONT_PMD_SIZE. Where an end-user
attempts to employ contiguous huge pages, a VM_BUG_ON can be experienced
due to the fact that the tlb structure hasn't been correctly updated by
the relevant tlb_flush_p.._range() call from tlb_remove_huge_tlb_entry.
This patch adds inequality logic to the generic implementation of
tlb_remove_huge_tlb_entry s.t. CONT_PTE_SIZE and CONT_PMD_SIZE are
effectively covered on arm64. Also, as well as ptes, pmds and puds;
p4ds are now considered too.
Reported-by: David Hildenbrand <david@redhat.com>
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/linux-mm/811c5c8e-b3a2-85d2-049c-717f17c3a03a@redhat.com/
Signed-off-by: Steve Capper <steve.capper@arm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220330112543.863-1-steve.capper@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:19:37 +02:00
..
bitops
arm64: make atomic helpers __always_inline
2021-01-27 11:47:44 +01:00
vdso
lib/vdso: Make __arch_update_vdso_data() logic understandable
2020-03-05 16:43:49 +01:00
4level-fixup.h
mm: make the __PAGETABLE_PxD_FOLDED defines non-empty
2018-11-02 08:31:52 +01:00
5level-fixup.h
include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used
2019-08-13 16:06:52 -07:00
asm-offsets.h
asm-prototypes.h
atomic-instrumented.h
locking/atomics: Check atomic headers with sha1sum
2019-02-13 08:07:31 +01:00
atomic-long.h
locking/atomics: Check atomic headers with sha1sum
2019-02-13 08:07:31 +01:00
atomic.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36
2019-05-24 17:27:11 +02:00
atomic64.h
locking/atomic: Use s64 for atomic64
2019-06-03 12:32:56 +02:00
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
barrier.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36
2019-05-24 17:27:11 +02:00
bitops-instrumented.h
asm-generic, x86: add bitops instrumentation for KASAN
2019-07-12 11:05:42 -07:00
bitops.h
bitsperlong.h
bug.h
bug: move WARN_ON() "cut here" into exception handler
2019-09-25 17:51:41 -07:00
bugs.h
cache.h
cacheflush.h
asm-generic/nds32: don't redefine cacheflush primitives
2020-01-17 19:48:43 +01:00
checksum.h
cmpxchg-local.h
cmpxchg.h
compat.h
current.h
delay.h
device.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428
2019-06-05 17:37:16 +02:00
div64.h
asm-generic changes for v5.4
2019-09-17 14:30:30 -07:00
dma-contiguous.h
dma-mapping.h
dma-mapping: bypass indirect calls for dma-direct
2018-12-13 21:06:18 +01:00
dma.h
early_ioremap.h
emergency-restart.h
error-injection.h
error-injection: Consolidate override function definition
2019-08-07 13:52:43 +01:00
exec.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36
2019-05-24 17:27:11 +02:00
export.h
module: Remove leftover '#undef' from export header
2019-09-12 15:29:46 +02:00
extable.h
fb.h
fixmap.h
mm: introduce common STRUCT_PAGE_MAX_SHIFT define
2018-12-14 15:05:45 -08:00
flat.h
binfmt_flat: remove the persistent argument from flat_get_addr_from_rp
2019-06-24 09:16:47 +10:00
ftrace.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
futex.h
futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser()
2019-07-22 11:20:10 +02:00
getorder.h
asm-generic: fix -Wtype-limits compiler warnings
2019-08-03 07:02:01 -07:00
gpio.h
hardirq.h
hugetlb.h
hugetlb: allow to free gigantic pages regardless of the configuration
2019-05-14 09:47:47 -07:00
hw_irq.h
ide_iops.h
int-ll64.h
io.h
asm-generic: don't provide __ioremap
2019-08-30 21:46:27 +02:00
ioctl.h
iomap.h
iomap: introduce io{read|write}64_{lo_hi|hi_lo}
2019-01-22 13:39:59 +01:00
irq.h
irq_regs.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
irq_work.h
irqflags.h
Kbuild
asm-generic: make simd.h a mandatory include/asm header
2019-07-31 21:29:24 +10:00
kdebug.h
kmap_types.h
kprobes.h
kvm_para.h
linkage.h
local.h
local64.h
mcs_spinlock.h
memory_model.h
mm-arch-hooks.h
mm_hooks.h
x86/mpx, mm/core: Fix recursive munmap() corruption
2019-05-09 10:37:17 +02:00
mmiowb.h
asm-generic/mmiowb: Allow mmiowb_set_pending() when preemptible()
2020-07-29 10:18:40 +02:00
mmiowb_types.h
asm-generic/mmiowb: Add generic implementation of mmiowb() tracking
2019-04-08 11:59:39 +01:00
mmu.h
mmu_context.h
module.h
mshyperv.h
x86/Hyper-V: Report crash data in die() when panic_on_oops is set
2020-04-23 10:36:24 +02:00
msi.h
page.h
asm-generic/page.h: fix typo in #error text requiring a real asm/page.h
2019-02-22 21:53:25 +01:00
param.h
parport.h
pci.h
pci_iomap.h
percpu.h
percpu: remove PER_CPU_DEF_ATTRIBUTES macro
2018-10-31 08:54:14 -07:00
pgalloc.h
mm: treewide: clarify pgtable_page_{ctor,dtor}() naming
2019-09-26 10:10:44 -07:00
pgtable-nop4d-hack.h
x86/mm: Validate kernel_physical_mapping_init() PTE population
2018-12-05 09:03:06 +01:00
pgtable-nop4d.h
x86/mm: Validate kernel_physical_mapping_init() PTE population
2018-12-05 09:03:06 +01:00
pgtable-nopmd.h
mm: make the __PAGETABLE_PxD_FOLDED defines non-empty
2018-11-02 08:31:52 +01:00
pgtable-nopud.h
x86/mm: Validate kernel_physical_mapping_init() PTE population
2018-12-05 09:03:06 +01:00
pgtable.h
arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed
2020-12-02 08:49:50 +01:00
preempt.h
sched/preempt: Use CONFIG_PREEMPTION where appropriate
2019-07-31 19:03:34 +02:00
qrwlock.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
2019-05-30 11:26:37 -07:00
qrwlock_types.h
qspinlock.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
2019-05-30 11:26:37 -07:00
qspinlock_types.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
2019-05-30 11:26:37 -07:00
resource.h
seccomp.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
sections.h
vmlinux.lds.h: Create section for protection against instrumentation
2021-02-17 10:35:16 +01:00
serial.h
set_memory.h
shmparam.h
treewide: remove SPDX "WITH Linux-syscall-note" from kernel-space headers
2019-05-14 19:52:48 -07:00
signal.h
simd.h
spinlock.h
statfs.h
string.h
switch_to.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36
2019-05-24 17:27:11 +02:00
syscall.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 193
2019-05-30 11:29:21 -07:00
syscalls.h
termios-base.h
termios.h
timex.h
tlb.h
tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry
2022-04-20 09:19:37 +02:00
tlbflush.h
topology.h
include/asm-generic/topology.h: guard cpumask_of_node() macro argument
2020-06-03 08:21:27 +02:00
trace_clock.h
uaccess.h
asm-generic: optimize generic uaccess for 8-byte loads and stores
2019-04-23 21:51:41 +02:00
unaligned.h
user.h
vga.h
vmlinux.lds.h
module/ftrace: handle patchable-function-entry
2022-02-23 11:59:56 +01:00
vtime.h
word-at-a-time.h
xor.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 47
2019-05-24 17:27:13 +02:00