Thread (22 messages) 22 messages, 3 authors, 2025-08-14

Re: [PATCH v16 06/13] mm/page_table_check: Reinstate address parameter in [__]page_table_check_pud_clear()

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2025-08-14 23:24:05
Also in: linux-mm, linux-riscv, linuxppc-dev, lkml

On Thu, 14 Aug 2025 14:11:45 +0200 Alexandre Ghiti [off-list ref] wrote:
quoted
  	for (i = 0; i < nr; i++)
-		__page_table_check_pud_clear(mm, *(pudp + i));
+		__page_table_check_pud_clear(mm, addr + PUD_SIZE * i, *(pudp + i));
  	if (pud_user_accessible_page(pud))
  		page_table_check_set(pud_pfn(pud), stride * nr, pud_write(pud));
  }

So this made me realize we (riscv) did not implement 
pudp_huge_get_and_clear(), which was a mistake since we support THP PUD. 
I have implemented this function in this patch 
https://lore.kernel.org/all/20250814-dev-alex-thp_pud_xchg-v1-1-b4704dfae206@rivosinc.com/T/#u (local)

That's a fix so I'll merge it in 6.17 (at least I'll try) so your 
patchset will break the build on riscv, I'll keep you posted when it 
gets merged!
Thanks, I'll temporarily grab a copy of your "riscv: use an atomic xchg
in pudp_huge_get_and_clear()" to keep mm.git compilable and testable.  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help