Introduct new xattr name prefix security.bpf., and enable reading these xattrs from bpf kfuncs bpf_get_[file|dentry]_xattr(). As we are on it, correct the comments for return value of bpf_get_[file|dentry]_xattr(), i.e. return length the xattr value on success.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -83,6 +83,10 @@ struct xattr_args { · 82 unmodified lines | ||
| 83 | 83 | #define XATTR_CAPS_SUFFIX "capability" |
| 84 | 84 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX |
| 85 | 85 | |
| 86 | +#define XATTR_BPF_LSM_SUFFIX "bpf." | |
| 87 | +#define XATTR_NAME_BPF_LSM (XATTR_SECURITY_PREFIX XATTR_BPF_LSM_SUFFIX) | |
| 88 | +#define XATTR_NAME_BPF_LSM_LEN (sizeof(XATTR_NAME_BPF_LSM) - 1) | |
| 89 | + | |
| 86 | 90 | #define XATTR_POSIX_ACL_ACCESS "posix_acl_access" |
| 87 | 91 | #define XATTR_NAME_POSIX_ACL_ACCESS XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_ACCESS |
| 88 | 92 | #define XATTR_POSIX_ACL_DEFAULT "posix_acl_default" |