Re: find_get_entries_tag regression bisected

From: Matthew Wilcox
Date: Sat Feb 16 2019 - 16:11:17 EST


On Sat, Feb 16, 2019 at 09:29:48AM -0800, Matthew Wilcox wrote:
> On Sat, Feb 16, 2019 at 07:35:11AM -0800, Matthew Wilcox wrote:
> > Another way to fix this would be to mask the address in dax_entry_mkclean(),
> > but I think this is cleaner.
>
> That's clearly rubbish, dax_entry_mkclean() can't possibly mask the
> address. It might be mis-aligned in another process. But ... if it's
> misaligned in another process, dax_entry_mkclean() will only clean the first
> PTE associated with the PMD; it won't clean the whole thing. I think we need
> something like this:

Nope, this isn't enough. It's _necessary_ to find the processes that
have part of this PMD page mapped, but not the start of it. But it's
not _sufficient_ because it'll still only mkclean the first PTE. So we
need a loop. I'm feeling a bit over my head here. I may have a go at
a fuller fix, but if someone else wants to have a go at it, be my guest!

(feeling massively unqualified for the task at hand ;-)