/linux-6.6.21/security/integrity/evm/ |
D | evm_secfs.c | 133 struct xattr_list *xattr; in evm_read_xattrs() local 142 list_for_each_entry(xattr, &evm_config_xattrnames, list) { in evm_read_xattrs() 143 if (!xattr->enabled) in evm_read_xattrs() 146 size += strlen(xattr->name) + 1; in evm_read_xattrs() 155 list_for_each_entry(xattr, &evm_config_xattrnames, list) { in evm_read_xattrs() 156 if (!xattr->enabled) in evm_read_xattrs() 159 sprintf(temp + offset, "%s\n", xattr->name); in evm_read_xattrs() 160 offset += strlen(xattr->name) + 1; in evm_read_xattrs() 184 struct xattr_list *xattr, *tmp; in evm_write_xattrs() local 203 xattr = kmalloc(sizeof(struct xattr_list), GFP_KERNEL); in evm_write_xattrs() [all …]
|
D | evm_crypto.c | 227 struct xattr_list *xattr; in evm_calc_hmac_or_hash() local 246 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) { in evm_calc_hmac_or_hash() 249 if (strcmp(xattr->name, XATTR_NAME_IMA) == 0) in evm_calc_hmac_or_hash() 256 if (type != EVM_XATTR_PORTABLE_DIGSIG && !xattr->enabled) in evm_calc_hmac_or_hash() 260 && !strcmp(xattr->name, req_xattr_name)) { in evm_calc_hmac_or_hash() 272 size = vfs_getxattr_alloc(&nop_mnt_idmap, dentry, xattr->name, in evm_calc_hmac_or_hash() 282 xattr->name, NULL, 0); in evm_calc_hmac_or_hash() 285 dentry->d_name.name, xattr->name, size, in evm_calc_hmac_or_hash() 293 dump_security_xattr(xattr->name, xattr_value, xattr_size); in evm_calc_hmac_or_hash() 377 data.hdr.xattr.sha1.type = EVM_XATTR_HMAC; in evm_update_evmxattr() [all …]
|
D | evm_main.c | 135 struct xattr_list *xattr; in evm_find_protected_xattrs() local 142 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) { in evm_find_protected_xattrs() 143 error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0); in evm_find_protected_xattrs() 286 struct xattr_list *xattr; in evm_protected_xattr_common() local 289 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) { in evm_protected_xattr_common() 290 if (!all_xattrs && !xattr->enabled) in evm_protected_xattr_common() 293 if ((strlen(xattr->name) == namelen) in evm_protected_xattr_common() 294 && (strncmp(req_xattr_name, xattr->name, namelen) == 0)) { in evm_protected_xattr_common() 299 xattr->name + XATTR_SECURITY_PREFIX_LEN, in evm_protected_xattr_common() 336 struct xattr_list *xattr; in evm_read_protected_xattrs() local [all …]
|
D | evm_posix_acl.c | 12 int posix_xattr_acl(const char *xattr) in posix_xattr_acl() argument 14 int xattr_len = strlen(xattr); in posix_xattr_acl() 17 && (strncmp(XATTR_NAME_POSIX_ACL_ACCESS, xattr, xattr_len) == 0)) in posix_xattr_acl() 20 && (strncmp(XATTR_NAME_POSIX_ACL_DEFAULT, xattr, xattr_len) == 0)) in posix_xattr_acl()
|
/linux-6.6.21/fs/ceph/ |
D | xattr.c | 19 struct ceph_inode_xattr *xattr); 575 struct ceph_inode_xattr *xattr = NULL; in __set_xattr() local 582 xattr = rb_entry(parent, struct ceph_inode_xattr, node); in __set_xattr() 583 c = strncmp(name, xattr->name, min(name_len, xattr->name_len)); in __set_xattr() 589 if (name_len == xattr->name_len) in __set_xattr() 591 else if (name_len < xattr->name_len) in __set_xattr() 596 xattr = NULL; in __set_xattr() 602 if (xattr && (flags & XATTR_CREATE)) in __set_xattr() 604 else if (!xattr && (flags & XATTR_REPLACE)) in __set_xattr() 613 if (xattr) in __set_xattr() [all …]
|
/linux-6.6.21/fs/hfsplus/ |
D | xattr_security.c | 37 const struct xattr *xattr_array, in hfsplus_initxattrs() 40 const struct xattr *xattr; in hfsplus_initxattrs() local 48 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in hfsplus_initxattrs() 50 if (!strcmp(xattr->name, "")) in hfsplus_initxattrs() 55 XATTR_SECURITY_PREFIX_LEN, xattr->name); in hfsplus_initxattrs() 57 XATTR_SECURITY_PREFIX_LEN + strlen(xattr->name), 0, 1); in hfsplus_initxattrs() 60 xattr->value, xattr->value_len, 0); in hfsplus_initxattrs()
|
/linux-6.6.21/fs/jffs2/ |
D | security.c | 27 const struct xattr *xattr_array, void *fs_info) in jffs2_initxattrs() 29 const struct xattr *xattr; in jffs2_initxattrs() local 32 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in jffs2_initxattrs() 34 xattr->name, xattr->value, in jffs2_initxattrs() 35 xattr->value_len, 0); in jffs2_initxattrs()
|
/linux-6.6.21/fs/ext2/ |
D | xattr_security.c | 31 static int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array, in ext2_initxattrs() 34 const struct xattr *xattr; in ext2_initxattrs() local 37 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in ext2_initxattrs() 39 xattr->name, xattr->value, in ext2_initxattrs() 40 xattr->value_len, 0); in ext2_initxattrs()
|
/linux-6.6.21/fs/ext4/ |
D | xattr_security.c | 36 ext4_initxattrs(struct inode *inode, const struct xattr *xattr_array, in ext4_initxattrs() 39 const struct xattr *xattr; in ext4_initxattrs() local 43 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in ext4_initxattrs() 46 xattr->name, xattr->value, in ext4_initxattrs() 47 xattr->value_len, XATTR_CREATE); in ext4_initxattrs()
|
/linux-6.6.21/fs/jfs/ |
D | xattr.c | 64 struct jfs_ea_list *xattr; /* buffer containing ea list */ member 445 ea_buf->xattr = NULL; in ea_get() 452 ea_buf->xattr = (struct jfs_ea_list *) ji->i_inline_ea; in ea_get() 464 ea_buf->xattr = (struct jfs_ea_list *) ji->i_inline_ea; in ea_get() 487 ea_buf->xattr = kmalloc(ea_buf->max_size, GFP_KERNEL); in ea_get() 488 if (ea_buf->xattr == NULL) in ea_get() 496 if ((rc = ea_read(inode, ea_buf->xattr))) { in ea_get() 497 kfree(ea_buf->xattr); in ea_get() 498 ea_buf->xattr = NULL; in ea_get() 534 ea_buf->xattr = ea_buf->mp->data; in ea_get() [all …]
|
/linux-6.6.21/fs/squashfs/ |
D | xattr.c | 32 u64 start = SQUASHFS_XATTR_BLK(squashfs_i(inode)->xattr) in squashfs_listxattr() 34 int offset = SQUASHFS_XATTR_OFFSET(squashfs_i(inode)->xattr); in squashfs_listxattr() 110 u64 start = SQUASHFS_XATTR_BLK(squashfs_i(inode)->xattr) in squashfs_xattr_get() 112 int offset = SQUASHFS_XATTR_OFFSET(squashfs_i(inode)->xattr); in squashfs_xattr_get() 150 u64 xattr; in squashfs_xattr_get() local 160 xattr = le64_to_cpu(xattr_val); in squashfs_xattr_get() 161 start = SQUASHFS_XATTR_BLK(xattr) + in squashfs_xattr_get() 163 offset = SQUASHFS_XATTR_OFFSET(xattr); in squashfs_xattr_get()
|
D | inode.c | 197 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode() 251 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode() 289 __le32 xattr; in squashfs_read_inode() local 295 err = squashfs_read_metadata(sb, &xattr, &block, in squashfs_read_inode() 296 &offset, sizeof(xattr)); in squashfs_read_inode() 299 xattr_id = le32_to_cpu(xattr); in squashfs_read_inode() 343 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode() 383 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode() 398 &squashfs_i(inode)->xattr); in squashfs_read_inode()
|
D | xattr_id.c | 29 int *count, unsigned int *size, unsigned long long *xattr) in squashfs_xattr_lookup() argument 48 *xattr = le64_to_cpu(id.xattr); in squashfs_xattr_lookup()
|
D | squashfs_fs.h | 296 __le32 xattr; member 319 __le32 xattr; member 361 __le32 xattr; member 392 __le32 xattr; member 441 __le64 xattr; member
|
/linux-6.6.21/fs/ |
D | xattr.c | 1068 void simple_xattr_free(struct simple_xattr *xattr) in simple_xattr_free() argument 1070 if (xattr) in simple_xattr_free() 1071 kfree(xattr->name); in simple_xattr_free() 1072 kvfree(xattr); in simple_xattr_free() 1118 const struct simple_xattr *xattr; in rbtree_simple_xattr_cmp() local 1120 xattr = rb_entry(node, struct simple_xattr, rb_node); in rbtree_simple_xattr_cmp() 1121 return strcmp(xattr->name, xattr_name); in rbtree_simple_xattr_cmp() 1137 struct simple_xattr *xattr; in rbtree_simple_xattr_node_cmp() local 1138 xattr = rb_entry(new_node, struct simple_xattr, rb_node); in rbtree_simple_xattr_node_cmp() 1139 return rbtree_simple_xattr_cmp(xattr->name, node); in rbtree_simple_xattr_node_cmp() [all …]
|
/linux-6.6.21/fs/btrfs/ |
D | xattr.c | 454 const struct xattr *xattr_array, void *fs_private) in btrfs_initxattrs() 457 const struct xattr *xattr; in btrfs_initxattrs() local 467 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in btrfs_initxattrs() 469 strlen(xattr->name) + 1, GFP_KERNEL); in btrfs_initxattrs() 475 strcpy(name + XATTR_SECURITY_PREFIX_LEN, xattr->name); in btrfs_initxattrs() 476 err = btrfs_setxattr(trans, inode, name, xattr->value, in btrfs_initxattrs() 477 xattr->value_len, 0); in btrfs_initxattrs()
|
/linux-6.6.21/fs/ubifs/ |
D | xattr.c | 126 ui->xattr = 1; in create_xattr() 256 if (ubifs_inode(inode)->xattr) in iget_xattr() 540 ubifs_assert(c, ubifs_inode(xino)->xattr); in ubifs_purge_xattrs() 644 static int init_xattrs(struct inode *inode, const struct xattr *xattr_array, in init_xattrs() 647 const struct xattr *xattr; in init_xattrs() local 651 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in init_xattrs() 653 strlen(xattr->name) + 1, GFP_NOFS); in init_xattrs() 659 strcpy(name + XATTR_SECURITY_PREFIX_LEN, xattr->name); in init_xattrs() 664 err = ubifs_xattr_set(inode, name, xattr->value, in init_xattrs() 665 xattr->value_len, 0, false); in init_xattrs()
|
/linux-6.6.21/Documentation/filesystems/ |
D | erofs.rst | 103 (no)user_xattr Setup Extended User Attributes. Note: xattr is enabled 224 Each share xattr can also be directly found by the following formula: 225 xattr offset = xattr_blkaddr * block_size + 4 * xattr_id 232 | ... | xattr_entry | xattr data | ... | xattr_entry | xattr data ... 279 The long xattr name prefixes feature is introduced to address this issue. The 280 overall idea is that, apart from the existing predefined prefixes, the xattr 281 entry could also refer to user-specified long xattr name prefixes, e.g. 284 When referring to a long xattr name prefix, the highest bit (bit 7) of 288 xattr name prefix is stored in erofs_xattr_entry.e_name, which could be empty if 289 the full xattr name matches exactly as its long xattr name prefix. [all …]
|
D | squashfs.rst | 96 | xattr | 103 xattr tables are written. 220 The xattr table contains extended attributes for each inode. The xattrs 222 name and value field. The type field encodes the xattr prefix 225 is stored inline (in which case the value field contains the xattr value), 232 The xattr lists are packed into compressed 8K metadata blocks. 234 location of the xattr list inside each inode, a 32-bit xattr id 235 is stored. This xattr id is mapped into the location of the xattr 236 list using a second xattr id lookup table.
|
/linux-6.6.21/include/linux/ |
D | lsm_hooks.h | 80 static inline struct xattr *lsm_get_xattr_slot(struct xattr *xattrs, in lsm_get_xattr_slot()
|
D | xattr.h | 68 struct xattr { struct 120 void simple_xattr_free(struct simple_xattr *xattr);
|
/linux-6.6.21/fs/f2fs/ |
D | xattr.c | 138 static int f2fs_initxattrs(struct inode *inode, const struct xattr *xattr_array, in f2fs_initxattrs() 141 const struct xattr *xattr; in f2fs_initxattrs() local 144 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in f2fs_initxattrs() 146 xattr->name, xattr->value, in f2fs_initxattrs() 147 xattr->value_len, (struct page *)page, 0); in f2fs_initxattrs()
|
/linux-6.6.21/Documentation/filesystems/ext4/ |
D | eainode.rst | 11 inode's i_atime field is used to store a checksum of the xattr value; 13 sharing of large xattr values between multiple owning inodes. For
|
/linux-6.6.21/Documentation/security/ |
D | IMA-templates.rst | 82 - 'xattrnames': a list of xattr names (separated by ``|``), only if the xattr is 84 - 'xattrlengths': a list of xattr lengths (u32), only if the xattr is present; 85 - 'xattrvalues': a list of xattr values;
|
/linux-6.6.21/fs/xfs/ |
D | xfs_iops.c | 49 const struct xattr *xattr_array, in xfs_initxattrs() 52 const struct xattr *xattr; in xfs_initxattrs() local 56 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in xfs_initxattrs() 60 .name = xattr->name, in xfs_initxattrs() 61 .namelen = strlen(xattr->name), in xfs_initxattrs() 62 .value = xattr->value, in xfs_initxattrs() 63 .valuelen = xattr->value_len, in xfs_initxattrs()
|