Re: [f2fs-dev] [PATCH v15 1/4] Add flags option to get xattr method paired to __vfs_getxattr

2019-11-05 Thread Mark Salyzyn via Linux-f2fs-devel
On 11/5/19 1:48 AM, Jan Kara wrote: @@ -228,11 +228,11 @@ static int afs_xattr_get_yfs(const struct xattr_handler *handler, break; case 1: data = buf; - dsize = snprintf(buf, sizeof(buf), "%u", yacl->inherit_flag); + dsize =

[f2fs-dev] [PATCH v15 1/4] Add flags option to get xattr method paired to __vfs_getxattr

2019-11-04 Thread Mark Salyzyn via Linux-f2fs-devel
From: Mark Salyzyn Add a flag option to get xattr method that could have a bit flag of XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is generally then set in the __vfs_getxattr path when called by security infrastructure. This handles the case of a union filesystem driver that is being

[f2fs-dev] [PATCH v14 1/5] Add flags option to get xattr method paired to __vfs_getxattr

2019-10-22 Thread Mark Salyzyn via Linux-f2fs-devel
Replace arguments for get and set xattr methods, and __vfs_getxattr and __vfs_setaxtr functions with a reference to the following now common argument structure: struct xattr_gs_args { struct dentry *dentry; struct inode *inode; const char *name; union {

Re: [f2fs-dev] [PATCH v8] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-28 Thread Mark Salyzyn via Linux-f2fs-devel
On 8/28/19 7:24 AM, Christoph Hellwig wrote: On Tue, Aug 27, 2019 at 08:05:15AM -0700, Mark Salyzyn wrote: Replace arguments for get and set xattr methods, and __vfs_getxattr and __vfs_setaxtr functions with a reference to the following now common argument structure: Yikes. That looks like a

[f2fs-dev] [PATCH v8] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-27 Thread Mark Salyzyn via Linux-f2fs-devel
Replace arguments for get and set xattr methods, and __vfs_getxattr and __vfs_setaxtr functions with a reference to the following now common argument structure: struct xattr_gs_args { struct dentry *dentry; struct inode *inode; const char *name; union {

Re: [f2fs-dev] [PATCH v7] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-27 Thread Mark Salyzyn via Linux-f2fs-devel
On 8/27/19 7:19 AM, Jan Kara wrote: On Tue 20-08-19 11:06:48, Mark Salyzyn wrote: diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 204dd3ea36bb..e2687f21c7d6 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@

[f2fs-dev] [PATCH v7] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-20 Thread Mark Salyzyn via Linux-f2fs-devel
Replace arguments for get and set xattr methods, and __vfs_getxattr and __vfs_setaxtr functions with a reference to the following now common argument structure: struct xattr_gs_args { struct dentry *dentry; struct inode *inode; const char *name; union {

[f2fs-dev] [PATCH v6] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-20 Thread Mark Salyzyn via Linux-f2fs-devel
Replace arguments for get and set xattr methods, and __vfs_getxattr and __vfs_setaxtr functions with a reference to the following now common argument structure: struct xattr_gs_args { struct dentry *dentry; struct inode *inode; const char *name; union {

[f2fs-dev] [PATCH v5] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-19 Thread Mark Salyzyn via Linux-f2fs-devel
Replace arguments for get and set xattr methods, and __vfs_getxattr and __vfs_setaxtr functions with a reference to the following argument structure: struct xattr_gs_args { struct dentry *dentry; struct inode *inode; const char *name; union { void

Re: [f2fs-dev] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-16 Thread Mark Salyzyn via Linux-f2fs-devel
On 8/15/19 3:27 PM, James Morris wrote: On Thu, 15 Aug 2019, Mark Salyzyn wrote: Good Idea, but using the same argument structure for set and get I would be concerned about the loss of compiler protection for the buffer argument; Agreed, I missed that. Sadly, the pattern of struct

[f2fs-dev] [PATCH v4] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-15 Thread Mark Salyzyn via Linux-f2fs-devel
Add a flag option to get xattr method that could have a bit flag of XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is generally then set in the __vfs_getxattr path. This handles the case of a union filesystem driver that is being requested by the security layer to report back the xattr data.

[f2fs-dev] [PATCH v3] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-14 Thread Mark Salyzyn via Linux-f2fs-devel
Add a flag option to get xattr method that could have a bit flag of XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is generally then set in the __vfs_getxattr path. This handles the case of a union filesystem driver that is being requested by the security layer to report back the xattr data.

[f2fs-dev] [PATCH v2] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-13 Thread Mark Salyzyn via Linux-f2fs-devel
Add a flag option to get xattr method that could have a bit flag of XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is generally then set in the __vfs_getxattr path. This handles the case of a union filesystem driver that is being requested by the security layer to report back the xattr data

Re: [f2fs-dev] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-13 Thread Mark Salyzyn via Linux-f2fs-devel
On 8/13/19 1:48 AM, Greg Kroah-Hartman wrote: On Mon, Aug 12, 2019 at 12:32:49PM -0700, Mark Salyzyn wrote: --- a/include/linux/xattr.h +++ b/include/linux/xattr.h @@ -30,10 +30,10 @@ struct xattr_handler { const char *prefix; int flags; /* fs private flags */ bool

[f2fs-dev] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-12 Thread Mark Salyzyn via Linux-f2fs-devel
Add a flag option to get xattr method that could have a bit flag of XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is generally then set in the __vfs_getxattr path. This handles the case of a union filesystem driver that is being requested by the security layer to report back the xattr data.

[f2fs-dev] [PATCH v13 3/5] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2019-07-31 Thread Mark Salyzyn via Linux-f2fs-devel
Because of the overlayfs getxattr recursion, the incoming inode fails to update the selinux sid resulting in avc denials being reported against a target context of u:object_r:unlabeled:s0. Solution is to respond to the XATTR_NOSECURITY flag in get xattr method that calls the __vfs_getxattr

[f2fs-dev] [PATCH v13 2/5] Add flags option to get xattr method paired to __vfs_getxattr

2019-07-31 Thread Mark Salyzyn via Linux-f2fs-devel
Add a flag option to get xattr method that could have a bit flag of XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is generally then set in the __vfs_getxattr path. This handles the case of a union filesystem driver that is being requested by the security layer to report back the data that is

[f2fs-dev] [PATCH v13 5/5] overlayfs: override_creds=off option bypass creator_cred

2019-07-31 Thread Mark Salyzyn via Linux-f2fs-devel
By default, all access to the upper, lower and work directories is the recorded mounter's MAC and DAC credentials. The incoming accesses are checked against the caller's credentials. If the principles of least privilege are applied, the mounter's credentials might not overlap the credentials of

[f2fs-dev] [PATCH v13 0/5] overlayfs override_creds=off

2019-07-31 Thread Mark Salyzyn via Linux-f2fs-devel
Patch series: overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh Add flags option to get xattr method paired to __vfs_getxattr overlayfs: handle XATTR_NOSECURITY flag for get xattr method overlayfs: internal getxattr operations without sepolicy checking overlayfs:

[f2fs-dev] [PATCH v13 4/5] overlayfs: internal getxattr operations without sepolicy checking

2019-07-31 Thread Mark Salyzyn via Linux-f2fs-devel
Check impure, opaque, origin & meta xattr with no sepolicy audit (using __vfs_getxattr) since these operations are internal to overlayfs operations and do not disclose any data. This became an issue for credential override off since sys_admin would have been required by the caller; whereas would

[f2fs-dev] [PATCH v13 0/5] overlayfs override_creds=off

2019-07-31 Thread Mark Salyzyn via Linux-f2fs-devel
Patch series: overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh Add flags option to get xattr method paired to __vfs_getxattr overlayfs: handle XATTR_NOSECURITY flag for get xattr method overlayfs: internal getxattr operations without sepolicy checking overlayfs:

[f2fs-dev] [PATCH v13 1/5] overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh

2019-07-31 Thread Mark Salyzyn via Linux-f2fs-devel
Assumption never checked, should fail if the mounter creds are not sufficient. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-unio...@vger.kernel.org Cc:

[f2fs-dev] [PATCH v12 2/5] Add flags option to get xattr method paired to __vfs_getxattr

2019-07-30 Thread Mark Salyzyn via Linux-f2fs-devel
Add a flag option to get xattr method that could have a bit flag of XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is set in the __vfs_getxattr path. This handles the case of a union filesystem driver that is being requested by the security layer to report back the data that is the target label