Re: [PATCH 2/2] mm/madvise: Use set_pte() to write page tables
From: Lorenzo Stoakes
Date: Tue Dec 16 2025 - 05:18:57 EST
On Mon, Dec 15, 2025 at 10:57:31AM +0000, Ryan Roberts wrote:
> >>
> >> I agree that it's extremely confusing. Perhaps, at a minimum, we should come up
> >> with some kind of naming convention for this and update this and the other
> >> couple of places that pass pointers to stack-based pXX_t around?
> >>
> >> e.g. instead of calling it "ptep", call it "ptevalp" or something like that?
> >
> > Not sure that'd clarify, we already have a bit of an inconsistent mess with all
> > this :(
> >
> > Given it's a stack variable I'm not sure using a helper is in any way helpful
> > other than I suppose to account for people grepping around for incorrect page
> > table manipulation code?
>
> I've proposed an approach to clean all of this up. I'd appreciate your opinion
> if you get a few mins:
>
> https://lore.kernel.org/all/a063f6c5-2785-4a9f-8079-25edb3e54cef@xxxxxxx/
Sure will take a look!
Cheers, Lorenzo