[PATCH 6/5] Add documentation for the vm_ops->access function.

From: Rik van Riel
Date: Fri May 16 2008 - 16:28:08 EST


From: Rik van Riel <riel@xxxxxxxxxx>

Add documentation for the vm_ops->access function.

Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>

Index: ptrace-2.6.26-rc2-mm1/Documentation/filesystems/Locking
===================================================================
--- ptrace-2.6.26-rc2-mm1.orig/Documentation/filesystems/Locking 2008-05-15 12:46:37.000000000 -0400
+++ ptrace-2.6.26-rc2-mm1/Documentation/filesystems/Locking 2008-05-16 16:25:10.000000000 -0400
@@ -510,6 +510,7 @@ prototypes:
void (*close)(struct vm_area_struct*);
int (*fault)(struct vm_area_struct*, struct vm_fault *);
int (*page_mkwrite)(struct vm_area_struct *, struct page *);
+ int (*access)(struct vm_area_struct *, unsigned long, void*, int, int);

locking rules:
BKL mmap_sem PageLocked(page)
@@ -517,6 +518,7 @@ open: no yes
close: no yes
fault: no yes
page_mkwrite: no yes no
+access: no yes

->page_mkwrite() is called when a previously read-only page is
about to become writeable. The file system is responsible for
@@ -525,6 +527,11 @@ taking to lock out truncate, the page ra
within i_size. The page mapping should also be checked that it is not
NULL.

+ ->access() is called when get_user_pages() fails in
+acces_process_vm(), typically used to debug a process through
+/proc/pid/mem or ptrace. This function is needed only for
+VM_IO | VM_PFNMAP VMAs.
+
================================================================================
Dubious stuff

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