History

Merge tag 'lsm-pr-20260615' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm

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

Linus Torvalds committed 5 months ago

Commit 87599bd2 parents 5b33fc6 f71ece97 files · +29 −37Browse files

Showing the changes to include (2 of 7 files). Show all

Unified · Split

2 files
  1. include/linux/lsm_hook_defs.h +2 −2
  2. include/linux/security.h +3 −2
include/linux/lsm_hook_defs.h+2−2
@@ -176,8 +176,8 @@ LSM_HOOK(int, -EOPNOTSUPP, inode_getsecurity, struct mnt_idmap *idmap, · 175 unmodified lines
176176 struct inode *inode, const char *name, void **buffer, bool alloc)
177177 LSM_HOOK(int, -EOPNOTSUPP, inode_setsecurity, struct inode *inode,
178178 const char *name, const void *value, size_t size, int flags)
179−LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char *buffer,
180− size_t buffer_size)
179+LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char **buffer,
180+ ssize_t *remaining_size)
181181 LSM_HOOK(void, LSM_RET_VOID, inode_getlsmprop, struct inode *inode,
182182 struct lsm_prop *prop)
183183 LSM_HOOK(int, 0, inode_copy_up, struct dentry *src, struct cred **new)
include/linux/security.h+3−2
@@ -459,7 +459,7 @@ int security_inode_getsecurity(struct mnt_idmap *idmap, · 458 unmodified lines
459459 struct inode *inode, const char *name,
460460 void **buffer, bool alloc);
461461 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);
463463 void security_inode_getlsmprop(struct inode *inode, struct lsm_prop *prop);
464464 int security_inode_copy_up(struct dentry *src, struct cred **new);
465465 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
10971097 return -EOPNOTSUPP;
10981098 }
10991099
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)
11011102 {
11021103 return 0;
11031104 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t