linux-stable/include/asm-generic
Steve Capper 28191f4bea tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry
[ Upstream commit 697a1d44af ]

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:36:21 +02:00
..
bitops bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
vdso
Kbuild
asm-offsets.h
asm-prototypes.h
atomic.h
atomic64.h
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
barrier.h arm64 fixes/cleanups: 2022-01-22 09:22:10 +02:00
bitops.h include: move find.h from asm_generic to linux 2022-01-15 08:47:31 -08:00
bitsperlong.h
bug.h
bugs.h
cache.h
cacheflush.h Add linux/cacheflush.h 2021-11-17 10:36:15 -05:00
checksum.h
cmpxchg-local.h
cmpxchg.h
compat.h compat: make linux/compat.h available everywhere 2021-07-23 14:20:24 +01:00
current.h
delay.h
device.h
div64.h ARM: 9117/1: asm-generic: div64: Remove always-true __div64_const32_is_OK() 2021-08-20 11:39:28 +01:00
dma-mapping.h
dma.h
early_ioremap.h mm/early_ioremap.c: remove redundant early_ioremap_shutdown() 2021-09-08 11:50:24 -07:00
emergency-restart.h
error-injection.h asm-generic/error-injection.h: fix a spelling mistake, and a coding style issue 2021-12-17 14:12:14 +01:00
exec.h
export.h
extable.h
fb.h
fixmap.h
flat.h
ftrace.h
futex.h futex: Fix additional regressions 2021-12-11 23:31:51 +01:00
getorder.h
gpio.h
hardirq.h
hugetlb.h
hw_irq.h
hyperv-tlfs.h PCI: hv: Make the code arch neutral by adding arch specific interfaces 2022-01-12 08:21:54 -06:00
ide_iops.h
int-ll64.h
io.h asm-generic: build fixes for v5.15 2021-10-08 11:57:54 -07:00
ioctl.h
iomap.h parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled 2021-09-19 10:36:09 -07:00
irq.h
irq_regs.h
irq_work.h
irqflags.h
kdebug.h
kmap_size.h
kprobes.h
kvm_para.h
kvm_types.h
linkage.h
local.h
local64.h
logic_io.h logic_io instance of iounmap() needs volatile on argument 2021-12-21 21:31:08 +01:00
mcs_spinlock.h
memory_model.h
mm_hooks.h
mmiowb.h
mmiowb_types.h
mmu.h
mmu_context.h
module.h
module.lds.h
mshyperv.h Drivers: hv: vmbus: Propagate VMbus coherence to each VMbus device 2022-04-20 09:36:20 +02:00
msi.h
nommu_context.h
numa.h
page.h
param.h
parport.h
pci.h
pci_iomap.h parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled 2021-09-19 10:36:09 -07:00
percpu.h
pgalloc.h asm-generic: Prepare for riscv use of pud_alloc_one and pud_free 2022-01-19 17:54:08 -08:00
pgtable-nop4d.h mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t * 2021-07-08 11:48:22 -07:00
pgtable-nopmd.h mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t * 2021-07-08 11:48:22 -07:00
pgtable-nopud.h mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t * 2021-07-08 11:48:22 -07:00
pgtable_uffd.h
preempt.h
qrwlock.h
qrwlock_types.h
qspinlock.h
qspinlock_types.h
resource.h
rwonce.h
seccomp.h
sections.h parisc architecture updates for kernel v5.17-rc1 2022-01-11 15:42:45 -08:00
serial.h
set_memory.h
shmparam.h
signal.h
simd.h
softirq_stack.h
spinlock.h
statfs.h
string.h
switch_to.h
syscall.h arch: remove unused function syscall_set_arguments() 2021-09-14 16:06:20 +02: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:36:21 +02:00
tlbflush.h
topology.h
trace_clock.h
uaccess.h asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user 2021-07-27 23:01:13 +02:00
unaligned.h
user.h
vermagic.h
vga.h
vmlinux.lds.h Driver core changes for 5.16-rc1 2021-11-04 08:32:38 -07:00
vtime.h
word-at-a-time.h
xor.h