aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2008-07-24 00:27:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:15 -0400
commit28b2ee20c7cba812b6f2ccf6d722cf86d00a84dc (patch)
treee8f1efd05c38c1cb26ca3ee051a454eb685fd122 /Documentation/filesystems
parent0d71d10a4252a3938e6b70189bc776171c02e076 (diff)
access_process_vm device memory infrastructure
In order to be able to debug things like the X server and programs using the PPC Cell SPUs, the debugger needs to be able to access device memory through ptrace and /proc/pid/mem. This 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. [riel@redhat.com: Add documentation for the vm_ops->access function] Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Benjamin Herrensmidt <benh@kernel.crashing.org> Cc: Dave Airlie <airlied@linux.ie> Cc: Hugh Dickins <hugh@veritas.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking7
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 8b22d7d8b991..680fb566b928 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -510,6 +510,7 @@ prototypes:
510 void (*close)(struct vm_area_struct*); 510 void (*close)(struct vm_area_struct*);
511 int (*fault)(struct vm_area_struct*, struct vm_fault *); 511 int (*fault)(struct vm_area_struct*, struct vm_fault *);
512 int (*page_mkwrite)(struct vm_area_struct *, struct page *); 512 int (*page_mkwrite)(struct vm_area_struct *, struct page *);
513 int (*access)(struct vm_area_struct *, unsigned long, void*, int, int);
513 514
514locking rules: 515locking rules:
515 BKL mmap_sem PageLocked(page) 516 BKL mmap_sem PageLocked(page)
@@ -517,6 +518,7 @@ open: no yes
517close: no yes 518close: no yes
518fault: no yes 519fault: no yes
519page_mkwrite: no yes no 520page_mkwrite: no yes no
521access: no yes
520 522
521 ->page_mkwrite() is called when a previously read-only page is 523 ->page_mkwrite() is called when a previously read-only page is
522about to become writeable. The file system is responsible for 524about to become writeable. The file system is responsible for
@@ -525,6 +527,11 @@ taking to lock out truncate, the page range should be verified to be
525within i_size. The page mapping should also be checked that it is not 527within i_size. The page mapping should also be checked that it is not
526NULL. 528NULL.
527 529
530 ->access() is called when get_user_pages() fails in
531acces_process_vm(), typically used to debug a process through
532/proc/pid/mem or ptrace. This function is needed only for
533VM_IO | VM_PFNMAP VMAs.
534
528================================================================================ 535================================================================================
529 Dubious stuff 536 Dubious stuff
530 537