aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2009-06-15 21:08:07 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-06-15 21:08:07 -0400
commit7eef4091a653c243a87e5375c54504cc03bec4d8 (patch)
treef65b77f830b2c8f7d014512badfef5df0d591ee9 /Documentation/filesystems
parent0a93a47f042c459f0f46942c3a920e3c81878031 (diff)
parent07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff)
Merge commit 'v2.6.30' into for-2.6.31
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking24
-rw-r--r--Documentation/filesystems/caching/cachefiles.txt8
-rw-r--r--Documentation/filesystems/tmpfs.txt2
3 files changed, 21 insertions, 13 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 76efe5b71d7d..3120f8dd2c31 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -512,16 +512,24 @@ locking rules:
512 BKL mmap_sem PageLocked(page) 512 BKL mmap_sem PageLocked(page)
513open: no yes 513open: no yes
514close: no yes 514close: no yes
515fault: no yes 515fault: no yes can return with page locked
516page_mkwrite: no yes no 516page_mkwrite: no yes can return with page locked
517access: no yes 517access: no yes
518 518
519 ->page_mkwrite() is called when a previously read-only page is 519 ->fault() is called when a previously not present pte is about
520about to become writeable. The file system is responsible for 520to be faulted in. The filesystem must find and return the page associated
521protecting against truncate races. Once appropriate action has been 521with the passed in "pgoff" in the vm_fault structure. If it is possible that
522taking to lock out truncate, the page range should be verified to be 522the page may be truncated and/or invalidated, then the filesystem must lock
523within i_size. The page mapping should also be checked that it is not 523the page, then ensure it is not already truncated (the page lock will block
524NULL. 524subsequent truncate), and then return with VM_FAULT_LOCKED, and the page
525locked. The VM will unlock the page.
526
527 ->page_mkwrite() is called when a previously read-only pte is
528about to become writeable. The filesystem again must ensure that there are
529no truncate/invalidate races, and then return with the page locked. If
530the page has been truncated, the filesystem should not look up a new page
531like the ->fault() handler, but simply return with VM_FAULT_NOPAGE, which
532will cause the VM to retry the fault.
525 533
526 ->access() is called when get_user_pages() fails in 534 ->access() is called when get_user_pages() fails in
527acces_process_vm(), typically used to debug a process through 535acces_process_vm(), typically used to debug a process through
diff --git a/Documentation/filesystems/caching/cachefiles.txt b/Documentation/filesystems/caching/cachefiles.txt
index c78a49b7bba6..748a1ae49e12 100644
--- a/Documentation/filesystems/caching/cachefiles.txt
+++ b/Documentation/filesystems/caching/cachefiles.txt
@@ -407,7 +407,7 @@ A NOTE ON SECURITY
407================== 407==================
408 408
409CacheFiles makes use of the split security in the task_struct. It allocates 409CacheFiles makes use of the split security in the task_struct. It allocates
410its own task_security structure, and redirects current->act_as to point to it 410its own task_security structure, and redirects current->cred to point to it
411when it acts on behalf of another process, in that process's context. 411when it acts on behalf of another process, in that process's context.
412 412
413The reason it does this is that it calls vfs_mkdir() and suchlike rather than 413The reason it does this is that it calls vfs_mkdir() and suchlike rather than
@@ -429,9 +429,9 @@ This means it may lose signals or ptrace events for example, and affects what
429the process looks like in /proc. 429the process looks like in /proc.
430 430
431So CacheFiles makes use of a logical split in the security between the 431So CacheFiles makes use of a logical split in the security between the
432objective security (task->sec) and the subjective security (task->act_as). The 432objective security (task->real_cred) and the subjective security (task->cred).
433objective security holds the intrinsic security properties of a process and is 433The objective security holds the intrinsic security properties of a process and
434never overridden. This is what appears in /proc, and is what is used when a 434is never overridden. This is what appears in /proc, and is what is used when a
435process is the target of an operation by some other process (SIGKILL for 435process is the target of an operation by some other process (SIGKILL for
436example). 436example).
437 437
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt
index 222437efd75a..3015da0c6b2a 100644
--- a/Documentation/filesystems/tmpfs.txt
+++ b/Documentation/filesystems/tmpfs.txt
@@ -133,4 +133,4 @@ RAM/SWAP in 10240 inodes and it is only accessible by root.
133Author: 133Author:
134 Christoph Rohland <cr@sap.com>, 1.12.01 134 Christoph Rohland <cr@sap.com>, 1.12.01
135Updated: 135Updated:
136 Hugh Dickins <hugh@veritas.com>, 4 June 2007 136 Hugh Dickins, 4 June 2007