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-arm-kernel, linux-mm, linux-riscv, lkml
Reply to
Alexandre Ghiti, 2025-08-14
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.  
Thread (22 messages) 22 messages, 3 authors, last reply 2025-08-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help