Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jaya Kumar <jayakumar.lkml@...>
Cc: Andrew Morton <akpm@...>, <stefani@...>, <linux-kernel@...>, David Howells <dhowells@...>, <linux-mm@...>, Hugh Dickins <hugh@...>
Date: Tuesday, October 30, 2007 - 9:25 am

On Tue, 2007-10-30 at 09:16 -0400, Jaya Kumar wrote:

well, one set thereof, the kernel mappings, which for this purpose are
the least interesting.



this installs a user space page table entry for your page; this is the
interesting one as it carries the user-dirty state.


Not quite, you would set that right after vmallocing, just set an
increasing page->index starting with 0 for the first page.

Then ensure your vma->vm_pgoff is 0 (which should be the case since
userspace will most likely mmap the whole thing, and if not it still
gets what it expects).

d work

Yeah, page_mkclean_one(page, vma) will use vma_address() to obtain an
user-space address for the page in this vma using page->index and the
formula from the last email, this address is then used to walk the page
tables and obtain a pte.

This will be the user-space pte installed by your nopfn handler. Not the
kernel vmap pte resulting from the vmalloc() call.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Stefani Seibold, (Mon Oct 22, 10:40 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Andrew Morton, (Mon Oct 29, 3:40 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Mon Oct 29, 1:01 pm)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Mon Oct 29, 2:17 pm)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Mon Oct 29, 6:16 pm)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Tue Oct 30, 5:56 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Tue Oct 30, 9:25 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Hugh Dickins, (Tue Oct 30, 11:47 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Tue Oct 30, 11:51 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Stefani Seibold, (Tue Oct 30, 6:49 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Hugh Dickins, (Tue Oct 30, 8:39 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Tue Oct 30, 9:12 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Mon Oct 29, 6:11 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Peter Zijlstra, (Mon Oct 29, 8:35 am)
Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23, Nick Piggin, (Mon Oct 29, 10:28 am)