kernel_optimize_test/fs/overlayfs
Vivek Goyal 9d3dfea3d3 ovl: Modify ovl_lookup() and friends to lookup metacopy dentry
This patch modifies ovl_lookup() and friends to lookup metacopy dentries.
It also allows for presence of metacopy dentries in lower layer.

During lookup, check for presence of OVL_XATTR_METACOPY and if not present,
set OVL_UPPERDATA bit in flags.

We don't support metacopy feature with nfs_export.  So in nfs_export code,
we set OVL_UPPERDATA flag set unconditionally if upper inode exists.

Do not follow metacopy origin if we find a metacopy only inode and metacopy
feature is not enabled for that mount.  Like redirect, this can have
security implications where an attacker could hand craft upper and try to
gain access to file on lower which it should not have to begin with.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-07-20 09:56:09 +02:00
..
copy_up.c ovl: A new xattr OVL_XATTR_METACOPY for file on upper 2018-07-20 09:56:08 +02:00
dir.c ovl: copy up times 2018-07-18 15:44:40 +02:00
export.c ovl: Modify ovl_lookup() and friends to lookup metacopy dentry 2018-07-20 09:56:09 +02:00
file.c ovl: add reflink/copyfile/dedup support 2018-07-18 15:44:42 +02:00
inode.c ovl: Modify ovl_lookup() and friends to lookup metacopy dentry 2018-07-20 09:56:09 +02:00
Kconfig ovl: Provide a mount option metacopy=on/off for metadata copyup 2018-07-20 09:56:06 +02:00
Makefile ovl: stack file ops 2018-07-18 15:44:41 +02:00
namei.c ovl: Modify ovl_lookup() and friends to lookup metacopy dentry 2018-07-20 09:56:09 +02:00
overlayfs.h ovl: Modify ovl_lookup() and friends to lookup metacopy dentry 2018-07-20 09:56:09 +02:00
ovl_entry.h ovl: Provide a mount option metacopy=on/off for metadata copyup 2018-07-20 09:56:06 +02:00
readdir.c ovl: fix wrong use of impure dir cache in ovl_iterate() 2018-07-17 16:04:34 +02:00
super.c ovl: A new xattr OVL_XATTR_METACOPY for file on upper 2018-07-20 09:56:08 +02:00
util.c ovl: Modify ovl_lookup() and friends to lookup metacopy dentry 2018-07-20 09:56:09 +02:00