Thread (20 messages) 20 messages, 6 authors, 2025-06-26

Re: [PATCH v3 1/2] arm64: pageattr: Use pagewalk API to change memory permissions

From: Karim Manaouil <hidden>
Date: 2025-06-14 14:50:26
Also in: linux-mm, lkml

On Fri, Jun 13, 2025 at 05:27:27PM +0100, Lorenzo Stoakes wrote:
On Fri, Jun 13, 2025 at 07:13:51PM +0530, Dev Jain wrote:
quoted
+		if (WARN_ON_ONCE((next - addr) != PGDIR_SIZE))
+			return -EINVAL;
I guess the point here is to assert that the searched range _entirely
spans_ the folio that the higher order leaf page table entry describes.

I'm guessing this is desired.

But I'm not sure this should be a warning?

What if you happen to walk a range that isn't aligned like this?
My understandging is that the caller must ensure that addr is
pud/pmd/pte-aligned. But, imho, since -EINVAL is returned, I don't think
the WARN_ON_ONCE() is needed.

-- 
~karim
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help