Re: [Cluster-devel] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-13 Thread Mark Salyzyn
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

Re: [Cluster-devel] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-16 Thread Mark Salyzyn
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

Re: [Cluster-devel] [PATCH v4] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-16 Thread Mark Salyzyn
u 15-08-19 08:49:58, Mark Salyzyn wrote: > > 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 filesyst

[Cluster-devel] [PATCH v4] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-15 Thread Mark Salyzyn
cally useless for audit2allow. This patch series is inert and is the wide-spread addition of the flags option for xattr functions, and a replacement of _vfs_getxattr with __vfs_getxattr(...XATTR_NOSECURITY). Signed-off-by: Mark Salyzyn Cc: Stephen Smalley Cc: linux-ker...@vger.kernel.org Cc: kern

Re: [Cluster-devel] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-15 Thread Mark Salyzyn
On 8/15/19 12:20 PM, James Morris wrote: On Tue, 13 Aug 2019, 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

[Cluster-devel] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-12 Thread Mark Salyzyn
cally useless for audit2allow. This patch series is inert and is the wide-spread addition of the flags option for xattr functions, and a replacement of _vfs_getxattr with __vfs_getxattr(...XATTR_NOSECURITY). Signed-off-by: Mark Salyzyn Cc: Stephen Smalley Cc: linux-ker...@vger.kernel.org Cc: kern

[Cluster-devel] [PATCH v5] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-19 Thread Mark Salyzyn
ead addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr({...XATTR_NOSECURITY}). Signed-off-by: Mark Salyzyn Cc: Stephen Smalley Cc: linux-ker...@vger.kernel.org Cc: kernel-t...@android.com Cc: linux-security-mod...@vger.kernel.org Cc: sta...@vger

Re: [Cluster-devel] [PATCH v2] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-14 Thread Mark Salyzyn
On 8/14/19 4:00 AM, Jan Kara wrote: On Tue 13-08-19 07:55:06, Mark Salyzyn wrote: ... diff --git a/fs/xattr.c b/fs/xattr.c index 90dd78f0eb27..71f887518d6f 100644 --- a/fs/xattr.c +++ b/fs/xattr.c ... ssize_t __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name

[Cluster-devel] [PATCH v7] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-20 Thread Mark Salyzyn
e wide-spread addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr({...XATTR_NOSECURITY}). Signed-off-by: Mark Salyzyn Cc: Stephen Smalley Cc: linux-ker...@vger.kernel.org Cc: kernel-t...@android.com Cc: linux-security-mod...@vger.kernel.org C

[Cluster-devel] [PATCH v6] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-20 Thread Mark Salyzyn
e wide-spread addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr({...XATTR_NOSECURITY}). Signed-off-by: Mark Salyzyn Cc: Stephen Smalley Cc: linux-ker...@vger.kernel.org Cc: kernel-t...@android.com Cc: linux-security-mod...@vger.kernel.org C

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

2019-08-28 Thread Mark Salyzyn
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

[Cluster-devel] [PATCH v8] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-27 Thread Mark Salyzyn
e wide-spread addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr({...XATTR_NOSECURITY}). Signed-off-by: Mark Salyzyn Reviewed-by: Jan Kara Cc: Stephen Smalley Cc: linux-ker...@vger.kernel.org Cc: kernel-t...@android.com Cc: linux-security-mod...@

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

2019-08-27 Thread Mark Salyzyn
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

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

2019-07-30 Thread Mark Salyzyn
cally useless for audit2allow. 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: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: ke

[Cluster-devel] [PATCH v13 0/5] overlayfs override_creds=off

2019-07-31 Thread Mark Salyzyn
the caller's credentials. The module boolean parameter and mount option override_creds is also added as a presence check for this "feature", existence of /sys/module/overlay/parameters/overlay_creds Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal

[Cluster-devel] [PATCH v13 1/5] overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh

2019-07-31 Thread Mark Salyzyn
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: linux

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

2019-07-31 Thread Mark Salyzyn
nitialized u:object_r:unlabeled:s0 context making the logs cosmetically useless for audit2allow. This patch series is inert and is the wide-spread addition of the flags option for xattr functions, and a replacement of _vfs_getxattr with __vfs_getxattr(...XATTR_NOSECURITY). Signed-off-by: Mark

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

2019-07-31 Thread Mark Salyzyn
used in other filesystems for their own internal trusted xattr management. 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: l

[Cluster-devel] [PATCH v13 5/5] overlayfs: override_creds=off option bypass creator_cred

2019-07-31 Thread Mark Salyzyn
or general use in time. 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: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc

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

2019-07-31 Thread Mark Salyzyn
access permissions and report back to the logs and the caller that the target context was blocked. For selinux this would solve the cosmetic issue of the selinux log and allow audit2allow to correctly report the rule needed to address the access problem. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi C

[Cluster-devel] [PATCH v13 0/5] overlayfs override_creds=off

2019-07-31 Thread Mark Salyzyn
the caller's credentials. The module boolean parameter and mount option override_creds is also added as a presence check for this "feature", existence of /sys/module/overlay/parameters/overlay_creds Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal

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

2019-11-04 Thread Mark Salyzyn
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

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

2019-11-05 Thread Mark Salyzyn
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 =

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

2019-10-22 Thread Mark Salyzyn
e wide-spread addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr({...XATTR_NOSECURITY}). Signed-off-by: Mark Salyzyn Reviewed-by: Jan Kara Acked-by: Jan Kara Acked-by: Jeff Layton Acked-by: David Sterba Acked-by: Darrick J. Wong Acked-by: Mik