* [PATCH v2 0/2] AFS metadata xattr fixes @ 2021-03-11 23:06 David Howells 2021-03-11 23:06 ` [PATCH v2 1/2] afs: Fix accessing YFS xattrs on a non-YFS server David Howells 2021-03-11 23:06 ` [PATCH v2 2/2] afs: Stop listxattr() from listing "afs.*" attributes David Howells 0 siblings, 2 replies; 5+ messages in thread From: David Howells @ 2021-03-11 23:06 UTC (permalink / raw) To: linux-afs Cc: Gaja Sophie Peters, dhowells, Gaja Sophie Peters, linux-fsdevel, linux-kernel Here's a pair of fixes for AFS. (1) Fix an oops in AFS that can be triggered by accessing one of the afs.yfs.* xattrs against a yfs server[1][2] - for instance by "cp -a" or "rsync -X". These try and copy all of the xattrs. They should pay attention to the list in /etc/xattr.conf, but cp doesn't on Ubuntu and rsync doesn't seem to on Ubuntu or Fedora. xattr.conf has been modified upstream[3], but a new version hasn't been cut yet. I've logged a bug against rsync for the problem there[4]. (2) Stop listing "afs.*" xattrs[6], particularly ACL ones[8]. This removes them from the list returned by listxattr(), but they're still available to get/set. The patches can be found here: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs-fixes Changes: ver #2: - Hide all of the afs.* xattrs, not just the ACL ones[7]. David Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003498.html [1] Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003501.html [2] Link: https://git.savannah.nongnu.org/cgit/attr.git/commit/?id=74da517cc655a82ded715dea7245ce88ebc91b98 [3] Link: https://github.com/WayneD/rsync/issues/163 [4] Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003516.html [5] Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003524.html [6] Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003565.html # v1 Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003568.html [7] Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003570.html [8] --- David Howells (2): afs: Fix accessing YFS xattrs on a non-YFS server afs: Stop listxattr() from listing "afs.*" attributes fs/afs/dir.c | 1 - fs/afs/file.c | 1 - fs/afs/inode.c | 1 - fs/afs/internal.h | 1 - fs/afs/mntpt.c | 1 - fs/afs/xattr.c | 23 ----------------------- 6 files changed, 28 deletions(-) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] afs: Fix accessing YFS xattrs on a non-YFS server 2021-03-11 23:06 [PATCH v2 0/2] AFS metadata xattr fixes David Howells @ 2021-03-11 23:06 ` David Howells 2021-03-11 23:06 ` [PATCH v2 2/2] afs: Stop listxattr() from listing "afs.*" attributes David Howells 1 sibling, 0 replies; 5+ messages in thread From: David Howells @ 2021-03-11 23:06 UTC (permalink / raw) To: linux-afs Cc: Gaja Sophie Peters, Gaja Sophie Peters, dhowells, Gaja Sophie Peters, linux-fsdevel, linux-kernel If someone attempts to access YFS-related xattrs (e.g. afs.yfs.acl) on a file on a non-YFS AFS server (such as OpenAFS), then the kernel will jump to a NULL function pointer because the afs_fetch_acl_operation descriptor doesn't point to a function for issuing an operation on a non-YFS server[1]. Fix this by making afs_wait_for_operation() check that the issue_afs_rpc method is set before jumping to it and setting -ENOTSUPP if not. This fix also covers other potential operations that also only exist on YFS servers. afs_xattr_get/set_yfs() then need to translate -ENOTSUPP to -ENODATA as the former error is internal to the kernel. The bug shows up as an oops like the following: BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. [...] Call Trace: afs_wait_for_operation+0x83/0x1b0 [kafs] afs_xattr_get_yfs+0xe6/0x270 [kafs] __vfs_getxattr+0x59/0x80 vfs_getxattr+0x11c/0x140 getxattr+0x181/0x250 ? __check_object_size+0x13f/0x150 ? __fput+0x16d/0x250 __x64_sys_fgetxattr+0x64/0xb0 do_syscall_64+0x49/0xc0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fb120a9defe This was triggered with "cp -a" which attempts to copy xattrs, including afs ones, but is easier to reproduce with getfattr, e.g.: getfattr -d -m ".*" /afs/openafs.org/ Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Reported-by: Gaja Sophie Peters <gaja.peters@math.uni-hamburg.de> Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Gaja Sophie Peters <gaja.peters@math.uni-hamburg.de> cc: linux-afs@lists.infradead.org Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003498.html [1] --- fs/afs/fs_operation.c | 7 +++++-- fs/afs/xattr.c | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/afs/fs_operation.c b/fs/afs/fs_operation.c index 97cab12b0a6c..71c58723763d 100644 --- a/fs/afs/fs_operation.c +++ b/fs/afs/fs_operation.c @@ -181,10 +181,13 @@ void afs_wait_for_operation(struct afs_operation *op) if (test_bit(AFS_SERVER_FL_IS_YFS, &op->server->flags) && op->ops->issue_yfs_rpc) op->ops->issue_yfs_rpc(op); - else + else if (op->ops->issue_afs_rpc) op->ops->issue_afs_rpc(op); + else + op->ac.error = -ENOTSUPP; - op->error = afs_wait_for_call_to_complete(op->call, &op->ac); + if (op->call) + op->error = afs_wait_for_call_to_complete(op->call, &op->ac); } switch (op->error) { diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c index c629caae5002..4934e325a14a 100644 --- a/fs/afs/xattr.c +++ b/fs/afs/xattr.c @@ -231,6 +231,8 @@ static int afs_xattr_get_yfs(const struct xattr_handler *handler, else ret = -ERANGE; } + } else if (ret == -ENOTSUPP) { + ret = -ENODATA; } error_yacl: @@ -256,6 +258,7 @@ static int afs_xattr_set_yfs(const struct xattr_handler *handler, { struct afs_operation *op; struct afs_vnode *vnode = AFS_FS_I(inode); + int ret; if (flags == XATTR_CREATE || strcmp(name, "acl") != 0) @@ -270,7 +273,10 @@ static int afs_xattr_set_yfs(const struct xattr_handler *handler, return afs_put_operation(op); op->ops = &yfs_store_opaque_acl2_operation; - return afs_do_sync_operation(op); + ret = afs_do_sync_operation(op); + if (ret == -ENOTSUPP) + ret = -ENODATA; + return ret; } static const struct xattr_handler afs_xattr_yfs_handler = { ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] afs: Stop listxattr() from listing "afs.*" attributes 2021-03-11 23:06 [PATCH v2 0/2] AFS metadata xattr fixes David Howells 2021-03-11 23:06 ` [PATCH v2 1/2] afs: Fix accessing YFS xattrs on a non-YFS server David Howells @ 2021-03-11 23:06 ` David Howells 2021-03-12 20:52 ` Gaja Sophie Peters 2021-03-15 17:02 ` Marc Dionne 1 sibling, 2 replies; 5+ messages in thread From: David Howells @ 2021-03-11 23:06 UTC (permalink / raw) To: linux-afs Cc: Gaja Sophie Peters, dhowells, Gaja Sophie Peters, linux-fsdevel, linux-kernel afs_listxattr() lists all the available special afs xattrs (i.e. those in the "afs.*" space), no matter what type of server we're dealing with. But OpenAFS servers, for example, cannot deal with some of the extra-capable attributes that AuriStor (YFS) servers provide. Unfortunately, the presence of the afs.yfs.* attributes causes errors[1] for anything that tries to read them if the server is of the wrong type. Fix the problem by removing afs_listxattr() so that none of the special xattrs are listed (AFS doesn't support xattrs). It does mean, however, that getfattr won't list them, though they can still be accessed with getxattr() and setxattr(). This can be tested with something like: getfattr -d -m ".*" /afs/example.com/path/to/file With this change, none of the afs.* attributes should be visible. Changes: ver #2: - Hide all of the afs.* xattrs, not just the ACL ones. Fixes: ae46578b963f ("afs: Get YFS ACLs and information through xattrs") Reported-by: Gaja Sophie Peters <gaja.peters@math.uni-hamburg.de> Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-afs@lists.infradead.org Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003502.html [1] Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003567.html # v1 --- fs/afs/dir.c | 1 - fs/afs/file.c | 1 - fs/afs/inode.c | 1 - fs/afs/internal.h | 1 - fs/afs/mntpt.c | 1 - fs/afs/xattr.c | 23 ----------------------- 6 files changed, 28 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 714fcca9af99..17548c1faf02 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -70,7 +70,6 @@ const struct inode_operations afs_dir_inode_operations = { .permission = afs_permission, .getattr = afs_getattr, .setattr = afs_setattr, - .listxattr = afs_listxattr, }; const struct address_space_operations afs_dir_aops = { diff --git a/fs/afs/file.c b/fs/afs/file.c index 85f5adf21aa0..960b64268623 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -43,7 +43,6 @@ const struct inode_operations afs_file_inode_operations = { .getattr = afs_getattr, .setattr = afs_setattr, .permission = afs_permission, - .listxattr = afs_listxattr, }; const struct address_space_operations afs_fs_aops = { diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 1156b2df28d3..12be88716e4c 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -27,7 +27,6 @@ static const struct inode_operations afs_symlink_inode_operations = { .get_link = page_get_link, - .listxattr = afs_listxattr, }; static noinline void dump_vnode(struct afs_vnode *vnode, struct afs_vnode *parent_vnode) diff --git a/fs/afs/internal.h b/fs/afs/internal.h index b626e38e9ab5..1627b1872812 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -1509,7 +1509,6 @@ extern int afs_launder_page(struct page *); * xattr.c */ extern const struct xattr_handler *afs_xattr_handlers[]; -extern ssize_t afs_listxattr(struct dentry *, char *, size_t); /* * yfsclient.c diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index 052dab2f5c03..bbb2c210d139 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c @@ -32,7 +32,6 @@ const struct inode_operations afs_mntpt_inode_operations = { .lookup = afs_mntpt_lookup, .readlink = page_readlink, .getattr = afs_getattr, - .listxattr = afs_listxattr, }; const struct inode_operations afs_autocell_inode_operations = { diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c index 4934e325a14a..7751b0b3f81d 100644 --- a/fs/afs/xattr.c +++ b/fs/afs/xattr.c @@ -11,29 +11,6 @@ #include <linux/xattr.h> #include "internal.h" -static const char afs_xattr_list[] = - "afs.acl\0" - "afs.cell\0" - "afs.fid\0" - "afs.volume\0" - "afs.yfs.acl\0" - "afs.yfs.acl_inherited\0" - "afs.yfs.acl_num_cleaned\0" - "afs.yfs.vol_acl"; - -/* - * Retrieve a list of the supported xattrs. - */ -ssize_t afs_listxattr(struct dentry *dentry, char *buffer, size_t size) -{ - if (size == 0) - return sizeof(afs_xattr_list); - if (size < sizeof(afs_xattr_list)) - return -ERANGE; - memcpy(buffer, afs_xattr_list, sizeof(afs_xattr_list)); - return sizeof(afs_xattr_list); -} - /* * Deal with the result of a successful fetch ACL operation. */ ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] afs: Stop listxattr() from listing "afs.*" attributes 2021-03-11 23:06 ` [PATCH v2 2/2] afs: Stop listxattr() from listing "afs.*" attributes David Howells @ 2021-03-12 20:52 ` Gaja Sophie Peters 2021-03-15 17:02 ` Marc Dionne 1 sibling, 0 replies; 5+ messages in thread From: Gaja Sophie Peters @ 2021-03-12 20:52 UTC (permalink / raw) To: David Howells, linux-afs; +Cc: linux-fsdevel, linux-kernel Am 12.03.21 um 00:06 schrieb David Howells: > afs_listxattr() lists all the available special afs xattrs (i.e. those in > the "afs.*" space), no matter what type of server we're dealing with. But > OpenAFS servers, for example, cannot deal with some of the extra-capable > attributes that AuriStor (YFS) servers provide. Unfortunately, the > presence of the afs.yfs.* attributes causes errors[1] for anything that > tries to read them if the server is of the wrong type. > > Fix the problem by removing afs_listxattr() so that none of the special > xattrs are listed (AFS doesn't support xattrs). It does mean, however, > that getfattr won't list them, though they can still be accessed with > getxattr() and setxattr(). > > This can be tested with something like: > > getfattr -d -m ".*" /afs/example.com/path/to/file > > With this change, none of the afs.* attributes should be visible. > > Changes: > ver #2: > - Hide all of the afs.* xattrs, not just the ACL ones. > > Fixes: ae46578b963f ("afs: Get YFS ACLs and information through xattrs") > Reported-by: Gaja Sophie Peters <gaja.peters@math.uni-hamburg.de> > Signed-off-by: David Howells <dhowells@redhat.com> > cc: linux-afs@lists.infradead.org > Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003502.html [1] > Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003567.html # v1 > --- > > fs/afs/dir.c | 1 - > fs/afs/file.c | 1 - > fs/afs/inode.c | 1 - > fs/afs/internal.h | 1 - > fs/afs/mntpt.c | 1 - > fs/afs/xattr.c | 23 ----------------------- > 6 files changed, 28 deletions(-) > > diff --git a/fs/afs/dir.c b/fs/afs/dir.c > index 714fcca9af99..17548c1faf02 100644 > --- a/fs/afs/dir.c > +++ b/fs/afs/dir.c > @@ -70,7 +70,6 @@ const struct inode_operations afs_dir_inode_operations = { > .permission = afs_permission, > .getattr = afs_getattr, > .setattr = afs_setattr, > - .listxattr = afs_listxattr, > }; > > const struct address_space_operations afs_dir_aops = { > diff --git a/fs/afs/file.c b/fs/afs/file.c > index 85f5adf21aa0..960b64268623 100644 > --- a/fs/afs/file.c > +++ b/fs/afs/file.c > @@ -43,7 +43,6 @@ const struct inode_operations afs_file_inode_operations = { > .getattr = afs_getattr, > .setattr = afs_setattr, > .permission = afs_permission, > - .listxattr = afs_listxattr, > }; > > const struct address_space_operations afs_fs_aops = { > diff --git a/fs/afs/inode.c b/fs/afs/inode.c > index 1156b2df28d3..12be88716e4c 100644 > --- a/fs/afs/inode.c > +++ b/fs/afs/inode.c > @@ -27,7 +27,6 @@ > > static const struct inode_operations afs_symlink_inode_operations = { > .get_link = page_get_link, > - .listxattr = afs_listxattr, > }; > > static noinline void dump_vnode(struct afs_vnode *vnode, struct afs_vnode *parent_vnode) > diff --git a/fs/afs/internal.h b/fs/afs/internal.h > index b626e38e9ab5..1627b1872812 100644 > --- a/fs/afs/internal.h > +++ b/fs/afs/internal.h > @@ -1509,7 +1509,6 @@ extern int afs_launder_page(struct page *); > * xattr.c > */ > extern const struct xattr_handler *afs_xattr_handlers[]; > -extern ssize_t afs_listxattr(struct dentry *, char *, size_t); > > /* > * yfsclient.c > diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c > index 052dab2f5c03..bbb2c210d139 100644 > --- a/fs/afs/mntpt.c > +++ b/fs/afs/mntpt.c > @@ -32,7 +32,6 @@ const struct inode_operations afs_mntpt_inode_operations = { > .lookup = afs_mntpt_lookup, > .readlink = page_readlink, > .getattr = afs_getattr, > - .listxattr = afs_listxattr, > }; > > const struct inode_operations afs_autocell_inode_operations = { > diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c > index 4934e325a14a..7751b0b3f81d 100644 > --- a/fs/afs/xattr.c > +++ b/fs/afs/xattr.c > @@ -11,29 +11,6 @@ > #include <linux/xattr.h> > #include "internal.h" > > -static const char afs_xattr_list[] = > - "afs.acl\0" > - "afs.cell\0" > - "afs.fid\0" > - "afs.volume\0" > - "afs.yfs.acl\0" > - "afs.yfs.acl_inherited\0" > - "afs.yfs.acl_num_cleaned\0" > - "afs.yfs.vol_acl"; > - > -/* > - * Retrieve a list of the supported xattrs. > - */ > -ssize_t afs_listxattr(struct dentry *dentry, char *buffer, size_t size) > -{ > - if (size == 0) > - return sizeof(afs_xattr_list); > - if (size < sizeof(afs_xattr_list)) > - return -ERANGE; > - memcpy(buffer, afs_xattr_list, sizeof(afs_xattr_list)); > - return sizeof(afs_xattr_list); > -} > - > /* > * Deal with the result of a successful fetch ACL operation. > */ Tested-by: Gaja Sophie Peters <gaja.peters@math.uni-hamburg.de> Works for me: $ getfattr -d -m - /afs/openafs.org/ $ getfattr -d -m - /afs/your-file-system.com/ these two show nothing as expected $ getfattr -n afs.acl /afs/openafs.org/ $ getfattr -n afs.acl /afs/your-file-system.com/ these two show the ACL as expected $ getfattr -n afs.yfs.acl /afs/openafs.org/ $ getfattr -n afs.yfs.acl /afs/your-file-system.com/ the latter shows as expected the YFS-ACL, the former as expected the simple message "No such attribute". Only as a "BTW", the primary Patch-Description has a minor mistake: In the email titled "[PATCH v2 0/2] AFS metadata xattr fixes", you write: > Fix an oops in AFS that can be triggered by accessing one of the > afs.yfs.* xattrs against a yfs server[1][2] That should of course be "against an OpenAFS server". Greetings, Gaja Peters -- +---------- | IT-Gruppe, Systemadministration | Universität Hamburg, Fachbereich Mathematik | Bundesstr. 55 (Geomatikum) | Raum 212; Tel. 42838-5175 +---------- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] afs: Stop listxattr() from listing "afs.*" attributes 2021-03-11 23:06 ` [PATCH v2 2/2] afs: Stop listxattr() from listing "afs.*" attributes David Howells 2021-03-12 20:52 ` Gaja Sophie Peters @ 2021-03-15 17:02 ` Marc Dionne 1 sibling, 0 replies; 5+ messages in thread From: Marc Dionne @ 2021-03-15 17:02 UTC (permalink / raw) To: David Howells Cc: linux-afs, Gaja Sophie Peters, linux-fsdevel, Linux Kernel Mailing List On Thu, Mar 11, 2021 at 7:07 PM David Howells <dhowells@redhat.com> wrote: > > afs_listxattr() lists all the available special afs xattrs (i.e. those in > the "afs.*" space), no matter what type of server we're dealing with. But > OpenAFS servers, for example, cannot deal with some of the extra-capable > attributes that AuriStor (YFS) servers provide. Unfortunately, the > presence of the afs.yfs.* attributes causes errors[1] for anything that > tries to read them if the server is of the wrong type. > > Fix the problem by removing afs_listxattr() so that none of the special > xattrs are listed (AFS doesn't support xattrs). It does mean, however, > that getfattr won't list them, though they can still be accessed with > getxattr() and setxattr(). > > This can be tested with something like: > > getfattr -d -m ".*" /afs/example.com/path/to/file > > With this change, none of the afs.* attributes should be visible. > > Changes: > ver #2: > - Hide all of the afs.* xattrs, not just the ACL ones. > > Fixes: ae46578b963f ("afs: Get YFS ACLs and information through xattrs") > Reported-by: Gaja Sophie Peters <gaja.peters@math.uni-hamburg.de> > Signed-off-by: David Howells <dhowells@redhat.com> > cc: linux-afs@lists.infradead.org > Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003502.html [1] > Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003567.html # v1 > --- > > fs/afs/dir.c | 1 - > fs/afs/file.c | 1 - > fs/afs/inode.c | 1 - > fs/afs/internal.h | 1 - > fs/afs/mntpt.c | 1 - > fs/afs/xattr.c | 23 ----------------------- > 6 files changed, 28 deletions(-) > > diff --git a/fs/afs/dir.c b/fs/afs/dir.c > index 714fcca9af99..17548c1faf02 100644 > --- a/fs/afs/dir.c > +++ b/fs/afs/dir.c > @@ -70,7 +70,6 @@ const struct inode_operations afs_dir_inode_operations = { > .permission = afs_permission, > .getattr = afs_getattr, > .setattr = afs_setattr, > - .listxattr = afs_listxattr, > }; > > const struct address_space_operations afs_dir_aops = { > diff --git a/fs/afs/file.c b/fs/afs/file.c > index 85f5adf21aa0..960b64268623 100644 > --- a/fs/afs/file.c > +++ b/fs/afs/file.c > @@ -43,7 +43,6 @@ const struct inode_operations afs_file_inode_operations = { > .getattr = afs_getattr, > .setattr = afs_setattr, > .permission = afs_permission, > - .listxattr = afs_listxattr, > }; > > const struct address_space_operations afs_fs_aops = { > diff --git a/fs/afs/inode.c b/fs/afs/inode.c > index 1156b2df28d3..12be88716e4c 100644 > --- a/fs/afs/inode.c > +++ b/fs/afs/inode.c > @@ -27,7 +27,6 @@ > > static const struct inode_operations afs_symlink_inode_operations = { > .get_link = page_get_link, > - .listxattr = afs_listxattr, > }; > > static noinline void dump_vnode(struct afs_vnode *vnode, struct afs_vnode *parent_vnode) > diff --git a/fs/afs/internal.h b/fs/afs/internal.h > index b626e38e9ab5..1627b1872812 100644 > --- a/fs/afs/internal.h > +++ b/fs/afs/internal.h > @@ -1509,7 +1509,6 @@ extern int afs_launder_page(struct page *); > * xattr.c > */ > extern const struct xattr_handler *afs_xattr_handlers[]; > -extern ssize_t afs_listxattr(struct dentry *, char *, size_t); > > /* > * yfsclient.c > diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c > index 052dab2f5c03..bbb2c210d139 100644 > --- a/fs/afs/mntpt.c > +++ b/fs/afs/mntpt.c > @@ -32,7 +32,6 @@ const struct inode_operations afs_mntpt_inode_operations = { > .lookup = afs_mntpt_lookup, > .readlink = page_readlink, > .getattr = afs_getattr, > - .listxattr = afs_listxattr, > }; > > const struct inode_operations afs_autocell_inode_operations = { > diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c > index 4934e325a14a..7751b0b3f81d 100644 > --- a/fs/afs/xattr.c > +++ b/fs/afs/xattr.c > @@ -11,29 +11,6 @@ > #include <linux/xattr.h> > #include "internal.h" > > -static const char afs_xattr_list[] = > - "afs.acl\0" > - "afs.cell\0" > - "afs.fid\0" > - "afs.volume\0" > - "afs.yfs.acl\0" > - "afs.yfs.acl_inherited\0" > - "afs.yfs.acl_num_cleaned\0" > - "afs.yfs.vol_acl"; > - > -/* > - * Retrieve a list of the supported xattrs. > - */ > -ssize_t afs_listxattr(struct dentry *dentry, char *buffer, size_t size) > -{ > - if (size == 0) > - return sizeof(afs_xattr_list); > - if (size < sizeof(afs_xattr_list)) > - return -ERANGE; > - memcpy(buffer, afs_xattr_list, sizeof(afs_xattr_list)); > - return sizeof(afs_xattr_list); > -} > - > /* > * Deal with the result of a successful fetch ACL operation. > */ Reviewed-by: Marc Dionne <marc.dionne@auristor.com> Marc ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-15 17:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-11 23:06 [PATCH v2 0/2] AFS metadata xattr fixes David Howells 2021-03-11 23:06 ` [PATCH v2 1/2] afs: Fix accessing YFS xattrs on a non-YFS server David Howells 2021-03-11 23:06 ` [PATCH v2 2/2] afs: Stop listxattr() from listing "afs.*" attributes David Howells 2021-03-12 20:52 ` Gaja Sophie Peters 2021-03-15 17:02 ` Marc Dionne
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).