/linux-6.12.1/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 | 228 struct xattr_list *xattr; in evm_calc_hmac_or_hash() local 248 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) { in evm_calc_hmac_or_hash() 251 if (strcmp(xattr->name, XATTR_NAME_IMA) == 0) in evm_calc_hmac_or_hash() 258 if (type != EVM_XATTR_PORTABLE_DIGSIG && !xattr->enabled) in evm_calc_hmac_or_hash() 262 && !strcmp(xattr->name, req_xattr_name)) { in evm_calc_hmac_or_hash() 274 size = vfs_getxattr_alloc(&nop_mnt_idmap, dentry, xattr->name, in evm_calc_hmac_or_hash() 284 xattr->name, NULL, 0); in evm_calc_hmac_or_hash() 287 dentry->d_name.name, xattr->name, size, in evm_calc_hmac_or_hash() 295 dump_security_xattr(xattr->name, xattr_value, xattr_size); in evm_calc_hmac_or_hash() 388 data.hdr.xattr.sha1.type = EVM_XATTR_HMAC; in evm_update_evmxattr() [all …]
|
D | evm_main.c | 134 struct xattr_list *xattr; in evm_find_protected_xattrs() local 141 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) { in evm_find_protected_xattrs() 142 error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0); in evm_find_protected_xattrs() 304 struct xattr_list *xattr; in evm_protected_xattr_common() local 307 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) { in evm_protected_xattr_common() 308 if (!all_xattrs && !xattr->enabled) in evm_protected_xattr_common() 311 if ((strlen(xattr->name) == namelen) in evm_protected_xattr_common() 312 && (strncmp(req_xattr_name, xattr->name, namelen) == 0)) { in evm_protected_xattr_common() 317 xattr->name + XATTR_SECURITY_PREFIX_LEN, in evm_protected_xattr_common() 354 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.12.1/fs/ceph/ |
D | xattr.c | 19 struct ceph_inode_xattr *xattr); 578 struct ceph_inode_xattr *xattr = NULL; in __set_xattr() local 585 xattr = rb_entry(parent, struct ceph_inode_xattr, node); in __set_xattr() 586 c = strncmp(name, xattr->name, min(name_len, xattr->name_len)); in __set_xattr() 592 if (name_len == xattr->name_len) in __set_xattr() 594 else if (name_len < xattr->name_len) in __set_xattr() 599 xattr = NULL; in __set_xattr() 605 if (xattr && (flags & XATTR_CREATE)) in __set_xattr() 607 else if (!xattr && (flags & XATTR_REPLACE)) in __set_xattr() 616 if (xattr) in __set_xattr() [all …]
|
/linux-6.12.1/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.12.1/fs/bcachefs/ |
D | xattr.c | 76 struct bkey_s_c_xattr xattr = bkey_s_c_to_xattr(k); in bch2_xattr_validate() local 77 unsigned val_u64s = xattr_val_u64s(xattr.v->x_name_len, in bch2_xattr_validate() 78 le16_to_cpu(xattr.v->x_val_len)); in bch2_xattr_validate() 87 val_u64s = xattr_val_u64s(xattr.v->x_name_len, in bch2_xattr_validate() 88 le16_to_cpu(xattr.v->x_val_len) + 4); in bch2_xattr_validate() 95 bkey_fsck_err_on(!bch2_xattr_type_to_handler(xattr.v->x_type), in bch2_xattr_validate() 97 "invalid type (%u)", xattr.v->x_type); in bch2_xattr_validate() 99 bkey_fsck_err_on(memchr(xattr.v->x_name, '\0', xattr.v->x_name_len), in bch2_xattr_validate() 110 struct bkey_s_c_xattr xattr = bkey_s_c_to_xattr(k); in bch2_xattr_to_text() local 112 handler = bch2_xattr_type_to_handler(xattr.v->x_type); in bch2_xattr_to_text() [all …]
|
D | acl.c | 200 struct bkey_i_xattr *xattr; in bch2_acl_to_xattr() local 229 xattr = bch2_trans_kmalloc(trans, u64s * sizeof(u64)); in bch2_acl_to_xattr() 230 if (IS_ERR(xattr)) in bch2_acl_to_xattr() 231 return xattr; in bch2_acl_to_xattr() 233 bkey_xattr_init(&xattr->k_i); in bch2_acl_to_xattr() 234 xattr->k.u64s = u64s; in bch2_acl_to_xattr() 235 xattr->v.x_type = acl_to_xattr_type(type); in bch2_acl_to_xattr() 236 xattr->v.x_name_len = 0; in bch2_acl_to_xattr() 237 xattr->v.x_val_len = cpu_to_le16(acl_len); in bch2_acl_to_xattr() 239 acl_header = xattr_val(&xattr->v); in bch2_acl_to_xattr() [all …]
|
/linux-6.12.1/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.12.1/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.12.1/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.12.1/fs/jfs/ |
D | xattr.c | 64 struct jfs_ea_list *xattr; /* buffer containing ea list */ member 447 ea_buf->xattr = NULL; in ea_get() 454 ea_buf->xattr = (struct jfs_ea_list *) ji->i_inline_ea; in ea_get() 466 ea_buf->xattr = (struct jfs_ea_list *) ji->i_inline_ea; in ea_get() 489 ea_buf->xattr = kmalloc(ea_buf->max_size, GFP_KERNEL); in ea_get() 490 if (ea_buf->xattr == NULL) in ea_get() 498 if ((rc = ea_read(inode, ea_buf->xattr))) { in ea_get() 499 kfree(ea_buf->xattr); in ea_get() 500 ea_buf->xattr = NULL; in ea_get() 536 ea_buf->xattr = ea_buf->mp->data; in ea_get() [all …]
|
/linux-6.12.1/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 | 200 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode() 254 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode() 297 __le32 xattr; in squashfs_read_inode() local 303 err = squashfs_read_metadata(sb, &xattr, &block, in squashfs_read_inode() 304 &offset, sizeof(xattr)); in squashfs_read_inode() 307 xattr_id = le32_to_cpu(xattr); in squashfs_read_inode() 351 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode() 391 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode() 406 &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.12.1/fs/ |
D | xattr.c | 1072 void simple_xattr_free(struct simple_xattr *xattr) in simple_xattr_free() argument 1074 if (xattr) in simple_xattr_free() 1075 kfree(xattr->name); in simple_xattr_free() 1076 kvfree(xattr); in simple_xattr_free() 1122 const struct simple_xattr *xattr; in rbtree_simple_xattr_cmp() local 1124 xattr = rb_entry(node, struct simple_xattr, rb_node); in rbtree_simple_xattr_cmp() 1125 return strcmp(xattr->name, xattr_name); in rbtree_simple_xattr_cmp() 1141 struct simple_xattr *xattr; in rbtree_simple_xattr_node_cmp() local 1142 xattr = rb_entry(new_node, struct simple_xattr, rb_node); in rbtree_simple_xattr_node_cmp() 1143 return rbtree_simple_xattr_cmp(xattr->name, node); in rbtree_simple_xattr_node_cmp() [all …]
|
/linux-6.12.1/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.12.1/fs/btrfs/ |
D | xattr.c | 501 const struct xattr *xattr_array, void *fs_private) in btrfs_initxattrs() 504 const struct xattr *xattr; in btrfs_initxattrs() local 514 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in btrfs_initxattrs() 516 strlen(xattr->name) + 1, GFP_KERNEL); in btrfs_initxattrs() 522 strcpy(name + XATTR_SECURITY_PREFIX_LEN, xattr->name); in btrfs_initxattrs() 527 ret = btrfs_setxattr(trans, inode, name, xattr->value, in btrfs_initxattrs() 528 xattr->value_len, 0); in btrfs_initxattrs()
|
/linux-6.12.1/Documentation/filesystems/ |
D | erofs.rst | 107 (no)user_xattr Setup Extended User Attributes. Note: xattr is enabled 228 Each share xattr can also be directly found by the following formula: 229 xattr offset = xattr_blkaddr * block_size + 4 * xattr_id 236 | ... | xattr_entry | xattr data | ... | xattr_entry | xattr data ... 283 The long xattr name prefixes feature is introduced to address this issue. The 284 overall idea is that, apart from the existing predefined prefixes, the xattr 285 entry could also refer to user-specified long xattr name prefixes, e.g. 288 When referring to a long xattr name prefix, the highest bit (bit 7) of 292 xattr name prefix is stored in erofs_xattr_entry.e_name, which could be empty if 293 the full xattr name matches exactly as its long xattr name prefix. [all …]
|
D | squashfs.rst | 156 | xattr | 163 xattr tables are written. 280 The xattr table contains extended attributes for each inode. The xattrs 282 name and value field. The type field encodes the xattr prefix 285 is stored inline (in which case the value field contains the xattr value), 292 The xattr lists are packed into compressed 8K metadata blocks. 294 location of the xattr list inside each inode, a 32-bit xattr id 295 is stored. This xattr id is mapped into the location of the xattr 296 list using a second xattr id lookup table.
|
/linux-6.12.1/include/linux/ |
D | evm.h | 22 const struct qstr *qstr, struct xattr *xattrs, 58 struct xattr *xattrs, in evm_inode_init_security()
|
D | lsm_hooks.h | 186 static inline struct xattr *lsm_get_xattr_slot(struct xattr *xattrs, in lsm_get_xattr_slot()
|
/linux-6.12.1/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.12.1/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
|