Re: [patch 1/5] access_process_vm device memory infrastructure

From: Peter Zijlstra
Date: Fri May 16 2008 - 04:21:31 EST


On Thu, 2008-05-15 at 13:53 -0400, Rik van Riel wrote:
> plain text document attachment
> (01-access_process_vm-device-memory.patch)
> Add the generic_access_phys access function and put the hooks in place
> to allow access_process_vm to access device or PPC Cell SPU memory.
>
> Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>
> Signed-off-by: Benjamin Herrensmidt <benh@xxxxxxxxxxxxxxxxxxx>
>

> Index: ptrace-2.6.26-rc2-mm1/include/linux/mm.h
> ===================================================================
> --- ptrace-2.6.26-rc2-mm1.orig/include/linux/mm.h 2008-05-15 13:50:13.000000000 -0400
> +++ ptrace-2.6.26-rc2-mm1/include/linux/mm.h 2008-05-15 13:50:18.000000000 -0400
> @@ -169,6 +169,12 @@ struct vm_operations_struct {
> /* notification that a previously read-only page is about to become
> * writable, if an error is returned it will cause a SIGBUS */
> int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
> +
> + /* called by access_process_vm when get_user_pages() fails, typically
> + * for use by special VMAs that can switch between memory and hardware
> + */
> + int (*access)(struct vm_area_struct *vma, unsigned long addr,
> + void *buf, int len, int write);


This bit misses corresponding Documentation/ changes.

Other than that it looks good.

Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>

--
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/