All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] overlayfs upperdir/workdir verifications
@ 2017-06-01 17:01 Amir Goldstein
  2017-06-01 17:01 ` [PATCH v2 1/5] vfs: introduce inode 'inuse' lock Amir Goldstein
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Amir Goldstein @ 2017-06-01 17:01 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Al Viro, linux-unionfs, linux-fsdevel

Miklos,

This patch set is a prelude to the index dir feature, which
requires origin verification w.r.t. upperdir.  I will follow
up with the posting of index dir feature soon.

This work prevents:
1. Concurrent overlay mounts with same upperdir/workdir
2. Reuse of upperdir with different lowerdir
3. Merge lower dir that doesn't match upper dir origin

For backward compat with existing setups that copy layers, the
checks 2-3 above depend on a new mount option (-o verify_lower).
The same mount option is going to determine whether an index dir
that doesn't match upper dir is blown away or fails the mount.

I have another dir verification patch that decodes origin dir on
failure to verify lower dir, which I am using for snapshots and
is going to be needed for NFS export. Because those features are
not proposed for v4.13 I left out the patch from this posting.

The verify_lower mount option can be tested with my unionmount-testsuite
development branch [1].  I had to fix the mount cycling test (run --ov=N)
not to reuse the same workdir with new rotated upperdir, because reusing
workdir with different upperdir breaks the origin verification for the
persistent index dir.

[1] https://github.com/amir73il/unionmount-testsuite/commits/overlayfs-devel

Amir Goldstein (5):
  vfs: introduce inode 'inuse' lock
  ovl: get exclusive ownership on upper/work dirs
  ovl: add support for verify_lower mount option
  ovl: verify lower root dir by file handle
  ovl: document the 'verify_lower' feature

 Documentation/filesystems/overlayfs.txt |  48 +++++++++++++
 fs/inode.c                              |  50 ++++++++++++++
 fs/overlayfs/copy_up.c                  |  16 +++--
 fs/overlayfs/namei.c                    |  95 ++++++++++++++++++++++---
 fs/overlayfs/overlayfs.h                |  18 +++++
 fs/overlayfs/ovl_entry.h                |   4 ++
 fs/overlayfs/super.c                    | 118 +++++++++++++++++++++++++++++++-
 fs/overlayfs/util.c                     |   7 ++
 include/linux/fs.h                      |  15 ++++
 9 files changed, 351 insertions(+), 20 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-01 17:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01 17:01 [PATCH v2 0/5] overlayfs upperdir/workdir verifications Amir Goldstein
2017-06-01 17:01 ` [PATCH v2 1/5] vfs: introduce inode 'inuse' lock Amir Goldstein
2017-06-01 17:01 ` [PATCH v2 2/5] ovl: get exclusive ownership on upper/work dirs Amir Goldstein
2017-06-01 17:01 ` [PATCH v2 3/5] ovl: add support for verify_lower mount option Amir Goldstein
2017-06-01 17:01 ` [PATCH v2 4/5] ovl: verify lower root dir by file handle Amir Goldstein
2017-06-01 17:01 ` [PATCH v2 5/5] ovl: document the 'verify_lower' feature Amir Goldstein

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.