linux/arch/nios2/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
..
Kbuild asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
asm-macros.h
asm-offsets.h
cache.h
cacheflush.h mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
cachetype.h Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
checksum.h
cpuinfo.h
delay.h
elf.h
entry.h nios2: page fault et.al. are *not* restartable syscalls... 2022-08-15 11:25:31 -05:00
io.h asm-generic: provide generic page_to_phys and phys_to_page implementations 2024-10-28 21:44:28 +00:00
irq.h
irqflags.h
kgdb.h
linkage.h
mmu.h
mmu_context.h
page.h vdso: Introduce vdso/page.h 2024-10-16 00:13:04 +02:00
pgalloc.h mm: pgtable: introduce pagetable_dtor() 2025-01-25 20:22:22 -08:00
pgtable-bits.h nios2/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE 2023-02-02 22:33:08 -08:00
pgtable.h nios2: define virtual address space for modules 2024-05-14 00:31:43 -07:00
processor.h nios2: remove unused INIT_MMAP 2022-11-08 17:37:19 -08:00
ptrace.h nios2: add force_successful_syscall_return() 2022-08-15 11:25:32 -05:00
registers.h
setup.h
shmparam.h
string.h
switch_to.h
syscall.h
syscalls.h
thread_info.h nios2: _TIF_ALLWORK_MASK is unused 2023-03-05 20:21:04 -05:00
timex.h
tlb.h
tlbflush.h
traps.h arch: add do_page_fault prototypes 2023-11-23 11:32:32 +01:00
uaccess.h
unistd.h nios2: convert to generic syscall table 2024-07-10 14:23:38 +02:00
vmalloc.h