linux/include
Dave Hansen ce8d2cdf3d r/o bind mounts: filesystem helpers for custom 'struct file's
Why do we need r/o bind mounts?

This feature allows a read-only view into a read-write filesystem.  In the
process of doing that, it also provides infrastructure for keeping track of
the number of writers to any given mount.

This has a number of uses.  It allows chroots to have parts of filesystems
writable.  It will be useful for containers in the future because users may
have root inside a container, but should not be allowed to write to
somefilesystems.  This also replaces patches that vserver has had out of the
tree for several years.

It allows security enhancement by making sure that parts of your filesystem
read-only (such as when you don't trust your FTP server), when you don't want
to have entire new filesystems mounted, or when you want atime selectively
updated.  I've been using the following script to test that the feature is
working as desired.  It takes a directory and makes a regular bind and a r/o
bind mount of it.  It then performs some normal filesystem operations on the
three directories, including ones that are expected to fail, like creating a
file on the r/o mount.

This patch:

Some filesystems forego the vfs and may_open() and create their own 'struct
file's.

This patch creates a couple of helper functions which can be used by these
filesystems, and will provide a unified place which the r/o bind mount code
may patch.

Also, rename an existing, static-scope init_file() to a less generic name.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:43:04 -07:00
..
acpi ACPI: CONFIG_ACPI_SLEEP=n power off regression in 2.6.23-rc8 (NOT in rc7) 2007-09-25 17:58:52 -04:00
asm-alpha increase AT_VECTOR_SIZE to terminate saved_auxv properly 2007-10-17 08:43:00 -07:00
asm-arm remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
asm-arm26 softlockup: make asm/irq_regs.h available on every platform 2007-10-17 08:42:47 -07:00
asm-avr32 Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-blackfin Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-cris remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
asm-frv remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
asm-generic remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
asm-h8300 Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-ia64 increase AT_VECTOR_SIZE to terminate saved_auxv properly 2007-10-17 08:43:00 -07:00
asm-m32r remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
asm-m68k Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-m68knommu Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-mips Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-parisc Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-powerpc increase AT_VECTOR_SIZE to terminate saved_auxv properly 2007-10-17 08:43:00 -07:00
asm-ppc Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-s390 remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
asm-sh increase AT_VECTOR_SIZE to terminate saved_auxv properly 2007-10-17 08:43:00 -07:00
asm-sh64 Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-sparc Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-sparc64 Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
asm-um remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
asm-v850 remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
asm-x86 increase AT_VECTOR_SIZE to terminate saved_auxv properly 2007-10-17 08:43:00 -07:00
asm-xtensa remove strict ansi check from __u64 in asm/types.h 2007-10-17 08:42:53 -07:00
crypto [CRYPTO] sha: Add header file for SHA definitions 2007-10-10 16:55:50 -07:00
keys KEYS: Make request_key() and co fundamentally asynchronous 2007-10-17 08:42:57 -07:00
linux r/o bind mounts: filesystem helpers for custom 'struct file's 2007-10-17 08:43:04 -07:00
math-emu Fix <math-emu/soft-fp.h> tpyo 2007-08-18 17:15:17 -07:00
media v4l: copy_to_user() is not a good method name 2007-10-13 09:58:59 -07:00
mtd UBI: kill homegrown endian macros 2007-07-18 16:53:49 +03:00
net [IPV6]: Replace sk_buff ** with sk_buff * in input handlers 2007-10-15 12:50:28 -07:00
pcmcia pcmcia: use DMA_MASK_NONE for the default for all pcmcia devices 2007-10-16 09:42:50 -07:00
rdma IB/cm: Modify interface to send MRAs in response to duplicate messages 2007-10-09 19:59:17 -07:00
rxrpc
scsi do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00
sound [ALSA] version 1.0.15 2007-10-16 16:57:46 +02:00
video pm2fb: hardware cursor support for the Permedia2 2007-10-16 09:43:18 -07:00
xen xen: xen/page.h compile fix 2007-07-26 11:35:16 -07:00
Kbuild do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00