Re: [PATCH] fix/improve generic page table walker

From: Martin Schwidefsky
Date: Thu Mar 12 2009 - 07:28:17 EST


On Thu, 12 Mar 2009 11:19:16 +0100
Martin Schwidefsky <schwidefsky@xxxxxxxxxx> wrote:

> On Thu, 12 Mar 2009 09:33:35 +0100
> Martin Schwidefsky <schwidefsky@xxxxxxxxxx> wrote:
>
> > > I've gone to lengths to keep VMAs out of the equation, so I can't say
> > > I'm excited about this solution.
> >
> > The minimum fix is to add the mmap_sem. If a vma is unmapped while you
> > walk the page tables, they can get freed. You do have a dependency on
> > the vma list. All the other page table walkers in mm/ start with the
> > vma, then do the four loops. It would be consistent if the generic page
> > table walker would do the same.
> >
> > Having thought about the problem again, I think I found a way how to
> > deal with the problem in the s390 page table primitives. The fix is not
> > exactly nice but it will work. With it s390 will be able to walk
> > addresses outside of the vma address range.
>
> Ok, the patch below fixes the problem without vma operations in the
> generic page table walker. We still need the mmap_sem part though.

Hmm, thinko on my part. If would need the address of the pgd entry to do
what I'm trying to achieve but I only have the pgd entry itself. Back
to the vma operation in walk_page_range I'm afraid.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/