linux-yocto/arch/openrisc/include/asm
Qi Zheng db6b435d73 mm: pgtable: introduce pagetable_dtor()
The pagetable_p*_dtor() are exactly the same except for the handling of
ptlock.  If we make ptlock_free() handle the case where ptdesc->ptl is
NULL and remove VM_BUG_ON_PAGE() from pmd_ptlock_free(), we can unify
pagetable_p*_dtor() into one function.  Let's introduce pagetable_dtor()
to do this.

Later, pagetable_dtor() will be moved to tlb_remove_ptdesc(), so that
ptlock and page table pages can be freed together (regardless of whether
RCU is used).  This prevents the use-after-free problem where the ptlock
is freed immediately but the page table pages is freed later via RCU.

Link: https://lkml.kernel.org/r/47f44fff9dc68d9d9e9a0d6c036df275f820598a.1736317725.git.zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Originally-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>	[s390]
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Aneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jann Horn <jannh@google.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Cc: Will Deacon <will@kernel.org>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-01-25 20:22:22 -08:00
..
bitops
asm-offsets.h
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
barrier.h openrisc: Define memory barrier mb 2021-05-15 16:00:10 +09:00
bitops.h include: move find.h from asm_generic to linux 2022-01-15 08:47:31 -08:00
bug.h openrisc: Add prototype for die to bug.h 2023-08-21 08:15:25 +01:00
cache.h
cacheflush.h openrisc: implement the new page table range API 2023-08-24 16:20:22 -07:00
cmpxchg.h locking/arch: Rename all internal __xchg() names to __arch_xchg() 2023-04-29 09:08:44 +02:00
cpuinfo.h
delay.h
elf.h
fixmap.h openrisc: Implement fixmap to fix earlycon 2024-10-15 18:36:15 +01:00
fpu.h openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
futex.h
io.h openrisc: mm: convert to GENERIC_IOREMAP 2023-08-18 10:12:34 -07:00
irq.h
irqflags.h
Kbuild asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
linkage.h
mmu_context.h openrisc: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:37 +01:00
mmu.h
page.h asm-generic updates for 6.13 2024-11-20 15:13:02 -08:00
pgalloc.h mm: pgtable: introduce pagetable_dtor() 2025-01-25 20:22:22 -08:00
pgtable.h Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
processor.h openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
ptrace.h openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
serial.h
setup.h openrisc: Fix compiler warnings in setup 2021-08-11 06:14:23 +09:00
smp.h
spr_defs.h
spr.h
string.h
syscall.h arch: remove unused function syscall_set_arguments() 2021-09-14 16:06:20 +02:00
syscalls.h openrisc: convert to generic syscall table 2024-07-10 14:23:38 +02:00
thread_info.h uaccess: remove CONFIG_SET_FS 2022-02-25 09:36:06 +01:00
time.h
timex.h openrisc: start CPU timer early in boot 2022-05-13 23:59:23 +02:00
tlb.h
tlbflush.h mm: update legacy flush_tlb_* to use vma 2021-06-29 10:53:52 -07:00
uaccess.h uaccess: remove CONFIG_SET_FS 2022-02-25 09:36:06 +01:00
unistd.h openrisc: convert to generic syscall table 2024-07-10 14:23:38 +02:00
unwinder.h
vmalloc.h