aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
authorPaul Moore <paul@paul-moore.com>2026-05-28 21:40:42 -0400
committerPaul Moore <paul@paul-moore.com>2026-05-28 21:40:42 -0400
commitc67f6e6d2c141f202211fa9fea844f577eb233a8 (patch)
tree48ce703efa10be0d2edf27faba2ffc2425225545 /fs
parente7ae89a0c97ce2b68b0983cd01eda67cf373517d (diff)
parent6658fb2e7812b91a30d83abf0bede51660d19a07 (diff)
downloadlinux-next-history-c67f6e6d2c141f202211fa9fea844f577eb233a8.tar.gz
Automated merge of 'dev' into 'next'
* dev: crypto: pkcs7: export verify_pkcs7_message_sig() as EXPORT_SYMBOL_GPL ipe: restore the kdoc comments for evaluate_property() hornet: depend on CONFIG_SECURITY and CONFIG_BPF_SYSCALL ipe: Add BPF program load policy enforcement via Hornet integration selftests/hornet: Add a selftest for the Hornet LSM hornet: Add a light skeleton data extractor scripts hornet: Introduce gen_sig lsm: introduce the Hornet LSM lsm: add additional enum values for bpf integrity checks lsm: framework for BPF integrity verification crypto: pkcs7: add tests for pkcs7_get_authattr crypto: pkcs7: add ability to extract signed attributes by OID crypto: pkcs7: add flag for validated trust on a signed info block security,fs,nfs,net: update security_inode_listsecurity() interface
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c7
-rw-r--r--fs/xattr.c11
2 files changed, 9 insertions, 9 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a9b8d482d2894..a16342056ae56 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -10562,13 +10562,10 @@ static ssize_t nfs4_listxattr(struct dentry *dentry, char *list, size_t size)
left -= error;
}
- error2 = security_inode_listsecurity(d_inode(dentry), list, left);
+ error2 = security_inode_listsecurity(d_inode(dentry), &list, &left);
if (error2 < 0)
return error2;
- if (list) {
- list += error2;
- left -= error2;
- }
+ error2 = size - error - left;
error3 = nfs4_listxattr_nfs4_user(d_inode(dentry), list, left);
if (error3 < 0)
diff --git a/fs/xattr.c b/fs/xattr.c
index 09ecbaaa16608..0bc3b47e6936c 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -510,9 +510,12 @@ vfs_listxattr(struct dentry *dentry, char *list, size_t size)
if (inode->i_op->listxattr) {
error = inode->i_op->listxattr(dentry, list, size);
} else {
- error = security_inode_listsecurity(inode, list, size);
- if (size && error > size)
- error = -ERANGE;
+ ssize_t remaining = size;
+
+ error = security_inode_listsecurity(inode, &list, &remaining);
+ if (error)
+ return error;
+ error = size - remaining;
}
return error;
}
@@ -1540,7 +1543,7 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
if (err)
return err;
- err = security_inode_listsecurity(inode, buffer, remaining_size);
+ err = security_inode_listsecurity(inode, &buffer, &remaining_size);
if (err < 0)
return err;