Pull lsm update from Paul Moore: "A single LSM update the security_inode_listsecurity() hook to be able to leverage the xattr_list_one() helper function. We wanted to do this for a while, but we needed to fixup the callers in the NFS code first. With the NFS code changes shipping in Linux v7.0 and no one complaining, it seemed a good time to complete the shift" * tag 'lsm-pr-20260615' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: security,fs,nfs,net: update security_inode_listsecurity() interface
Showing the changes to include (2 of 7 files). Show all
Unified · Split
| @@ -176,8 +176,8 @@ LSM_HOOK(int, -EOPNOTSUPP, inode_getsecurity, struct mnt_idmap *idmap, · 175 unmodified lines | |||
| 176 | struct inode *inode, const char *name, void **buffer, bool alloc) | 176 | struct inode *inode, const char *name, void **buffer, bool alloc) |
| 177 | LSM_HOOK(int, -EOPNOTSUPP, inode_setsecurity, struct inode *inode, | 177 | LSM_HOOK(int, -EOPNOTSUPP, inode_setsecurity, struct inode *inode, |
| 178 | const char *name, const void *value, size_t size, int flags) | 178 | const char *name, const void *value, size_t size, int flags) |
| 179 | LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char *buffer, | 179 | LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char **buffer, |
| 180 | size_t buffer_size) | 180 | ssize_t *remaining_size) |
| 181 | LSM_HOOK(void, LSM_RET_VOID, inode_getlsmprop, struct inode *inode, | 181 | LSM_HOOK(void, LSM_RET_VOID, inode_getlsmprop, struct inode *inode, |
| 182 | struct lsm_prop *prop) | 182 | struct lsm_prop *prop) |
| 183 | LSM_HOOK(int, 0, inode_copy_up, struct dentry *src, struct cred **new) | 183 | LSM_HOOK(int, 0, inode_copy_up, struct dentry *src, struct cred **new) |
| @@ -459,7 +459,7 @@ int security_inode_getsecurity(struct mnt_idmap *idmap, · 458 unmodified lines | |||
| 459 | struct inode *inode, const char *name, | 459 | struct inode *inode, const char *name, |
| 460 | void **buffer, bool alloc); | 460 | void **buffer, bool alloc); |
| 461 | int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags); | 461 | int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags); |
| 462 | int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size); | 462 | int security_inode_listsecurity(struct inode *inode, char **buffer, ssize_t *remaining_size); |
| 463 | void security_inode_getlsmprop(struct inode *inode, struct lsm_prop *prop); | 463 | void security_inode_getlsmprop(struct inode *inode, struct lsm_prop *prop); |
| 464 | int security_inode_copy_up(struct dentry *src, struct cred **new); | 464 | int security_inode_copy_up(struct dentry *src, struct cred **new); |
| 465 | int security_inode_copy_up_xattr(struct dentry *src, const char *name); | 465 | int security_inode_copy_up_xattr(struct dentry *src, const char *name); |
| @@ -1097,7 +1097,8 @@ static inline int security_inode_setsecurity(struct inode *inode, const char *na · 631 unmodified lines | |||
| 1097 | return -EOPNOTSUPP; | 1097 | return -EOPNOTSUPP; |
| 1098 | } | 1098 | } |
| 1099 | 1099 | ||
| 1100 | static inline int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size) | 1100 | static inline int security_inode_listsecurity(struct inode *inode, |
| 1101 | char **buffer, ssize_t *remaining_size) | ||
| 1101 | { | 1102 | { |
| 1102 | return 0; | 1103 | return 0; |
| 1103 | } | 1104 | } |