Home
last modified time | relevance | path

Searched refs:xattr (Results 1 – 25 of 75) sorted by relevance

123

/linux/security/integrity/evm/
H A Devm_secfs.c132 struct xattr_list *xattr; in evm_read_xattrs() local
141 list_for_each_entry(xattr, &evm_config_xattrnames, list) { in evm_read_xattrs()
142 if (!xattr->enabled) in evm_read_xattrs()
145 size += strlen(xattr->name) + 1; in evm_read_xattrs()
160 list_for_each_entry(xattr, &evm_config_xattrnames, list) { in evm_read_xattrs()
161 if (!xattr->enabled) in evm_read_xattrs()
165 xattr->name); in evm_read_xattrs()
189 struct xattr_list *xattr, *tmp; in evm_write_xattrs()
208 xattr = kmalloc_obj(struct xattr_list); in evm_write_xattrs()
209 if (!xattr) { in evm_write_xattrs()
183 struct xattr_list *xattr, *tmp; evm_write_xattrs() local
[all...]
H A Devm_crypto.c18 #include <linux/xattr.h>
137 /* Protect against 'cutting & pasting' security.evm xattr, include inode
190 * Dump large security xattr values as a continuous ascii hexadecimal string. in dump_security_xattr_l()
223 * Instead of retrieving the requested xattr, for performance, calculate in evm_calc_hmac_or_hash()
224 * the hmac using the requested xattr value. Don't alloc/free memory for in evm_calc_hmac_or_hash()
225 * each xattr, but attempt to re-use the previously allocated memory. in evm_calc_hmac_or_hash()
235 struct xattr_list *xattr; in evm_calc_hmac_or_hash()
255 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) { in evm_calc_hmac_or_hash()
258 if (strcmp(xattr->name, XATTR_NAME_IMA) == 0) in evm_calc_hmac_or_hash()
265 if (type != EVM_XATTR_PORTABLE_DIGSIG && !xattr in evm_calc_hmac_or_hash()
228 struct xattr_list *xattr; evm_calc_hmac_or_hash() local
403 const struct xattr *xattr; evm_init_hmac() local
[all...]
H A Devm_main.c18 #include <linux/xattr.h>
150 struct xattr_list *xattr; in evm_find_protected_xattrs() local
157 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) { in evm_find_protected_xattrs()
158 error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0); in evm_find_protected_xattrs()
182 * evm_verify_hmac - calculate and compare the HMAC with the EVM xattr
185 * and compare it against the stored security.evm xattr.
188 * - use the previously retrieved xattr value and length to calculate the
262 /* accept xattr with non-empty signature field */ in evm_verify_hmac()
327 struct xattr_list *xattr; in evm_protected_xattr_common() local
330 list_for_each_entry_lockless(xattr, in evm_protected_xattr_common()
377 struct xattr_list *xattr; evm_read_protected_xattrs() local
1069 struct xattr *xattr, *evm_xattr; evm_inode_init_security() local
[all...]
H A Devm_posix_acl.c12 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/fs/ceph/
H A Dxattr.c10 #include <linux/xattr.h>
20 struct ceph_inode_xattr *xattr);
577 struct ceph_inode_xattr *xattr = NULL; in __set_xattr()
584 xattr = rb_entry(parent, struct ceph_inode_xattr, node); in __set_xattr()
585 c = strncmp(name, xattr->name, min(name_len, xattr->name_len)); in __set_xattr()
591 if (name_len == xattr->name_len) in __set_xattr()
593 else if (name_len < xattr->name_len) in __set_xattr()
598 xattr = NULL; in __set_xattr()
604 if (xattr in __set_xattr()
576 struct ceph_inode_xattr *xattr = NULL; __set_xattr() local
675 struct ceph_inode_xattr *xattr = NULL; __get_xattr() local
704 __free_xattr(struct ceph_inode_xattr * xattr) __free_xattr() argument
717 __remove_xattr(struct ceph_inode_info * ci,struct ceph_inode_xattr * xattr) __remove_xattr() argument
742 struct ceph_inode_xattr *xattr = NULL; __copy_xattr_names() local
766 struct ceph_inode_xattr *xattr = NULL; __ceph_destroy_xattrs() local
911 struct ceph_inode_xattr *xattr = NULL; __ceph_build_xattrs_blob() local
975 struct ceph_inode_xattr *xattr; __ceph_getxattr() local
1192 struct ceph_inode_xattr *xattr = NULL; __ceph_setxattr() local
[all...]
/linux/fs/hfsplus/
H A Dxattr_security.c37 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/fs/ext2/
H A Dxattr_security.c31 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/fs/jffs2/
H A Dsecurity.c27 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/fs/ext4/
H A Dxattr_security.c14 #include "xattr.h"
37 ext4_initxattrs(struct inode *inode, const struct xattr *xattr_array, in ext4_initxattrs()
40 const struct xattr *xattr; in ext4_initxattrs()
44 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in ext4_initxattrs()
47 xattr->name, xattr->value, in ext4_initxattrs()
48 xattr in ext4_initxattrs()
39 const struct xattr *xattr; ext4_initxattrs() local
[all...]
/linux/fs/jfs/
H A Dxattr.c64 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/fs/
H A Dxattr.c3 File: fs/xattr.c
15 #include <linux/xattr.h>
47 * In order to implement different sets of xattr operations for each xattr
90 * may_write_xattr - check whether inode allows writing xattr
92 * @inode: the inode on which to set an xattr
234 * @name: xattr name to set
290 * @name: xattr name to set
392 * before retrieving the extended attribute. The xattr value buffer should
484 * vfs_listxattr - retrieve \0 separated list of xattr name
1219 simple_xattr_free(struct simple_xattr * xattr) simple_xattr_free() argument
1228 struct simple_xattr *xattr = container_of(head, struct simple_xattr, rcu); simple_xattr_rcu_free() local
1241 simple_xattr_free_rcu(struct simple_xattr * xattr) simple_xattr_free_rcu() argument
1294 const struct simple_xattr *xattr = obj; simple_xattr_obj_hashfn() local
1302 const struct simple_xattr *xattr = obj; simple_xattr_obj_cmpfn() local
1335 struct simple_xattr *xattr; simple_xattr_get() local
1610 struct simple_xattr *xattr; simple_xattr_list() local
1733 struct simple_xattr *xattr = list_first_entry(xattrs, typeof(*xattr), node); simple_xattrs_free() local
[all...]
/linux/fs/squashfs/
H A Dxattr.c32 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()
H A Dinode.c226 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode()
280 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode()
324 __le32 xattr; in squashfs_read_inode() local
330 err = squashfs_read_metadata(sb, &xattr, &block, in squashfs_read_inode()
331 &offset, sizeof(xattr)); in squashfs_read_inode()
334 xattr_id = le32_to_cpu(xattr); in squashfs_read_inode()
379 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode()
421 xattr_id = le32_to_cpu(sqsh_ino->xattr); in squashfs_read_inode()
437 &squashfs_i(inode)->xattr); in squashfs_read_inode()
H A Dxattr_id.c29 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()
H A Dsquashfs_fs.h297 __le32 xattr; member
320 __le32 xattr; member
362 __le32 xattr; member
393 __le32 xattr; member
442 __le64 xattr; member
/linux/fs/ubifs/
H A Dxattr.c113 ui->xattr = 1; in create_xattr()
243 if (ubifs_inode(inode)->xattr) in iget_xattr()
525 ubifs_assert(c, ubifs_inode(xino)->xattr); in ubifs_purge_xattrs()
605 static int init_xattrs(struct inode *inode, const struct xattr *xattr_array, in init_xattrs()
608 const struct xattr *xattr; in init_xattrs() local
612 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in init_xattrs()
614 strlen(xattr->name) + 1, GFP_NOFS); in init_xattrs()
620 strcpy(name + XATTR_SECURITY_PREFIX_LEN, xattr->name); in init_xattrs()
625 err = ubifs_xattr_set(inode, name, xattr->value, in init_xattrs()
626 xattr->value_len, 0, false); in init_xattrs()
/linux/fs/btrfs/
H A Dxattr.c491 const struct xattr *xattr_array, void *fs_private) in btrfs_initxattrs()
494 const struct xattr *xattr; in btrfs_initxattrs() local
504 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in btrfs_initxattrs()
506 strlen(xattr->name) + 1; in btrfs_initxattrs()
513 scnprintf(name, name_len, "%s%s", XATTR_SECURITY_PREFIX, xattr->name); in btrfs_initxattrs()
518 ret = btrfs_setxattr(trans, inode, name, xattr->value, in btrfs_initxattrs()
519 xattr->value_len, 0); in btrfs_initxattrs()
/linux/Documentation/filesystems/
H A Derofs.rst110 (no)user_xattr Setup Extended User Attributes. Note: xattr is enabled
234 xattr metadata:
302 shared xattr metadata rather than inlined immediately after the inode.
312 The shared xattr metadata view is similar to the inode metadata view.
318 Each shared xattr can be located using the following formula::
320 xattr offset = xattr_blkaddr * block_size + 4 * xattr_id
331 | ... | xattr_entry | xattr data | ... | xattr_entry | xattr data ...
378 The long xattr name prefixes feature is introduced to address this issue. The
379 overall idea is that, apart from the existing predefined prefixes, the xattr
[all...]
H A Dsquashfs.rst154 | xattr |
161 xattr tables are written.
278 The xattr table contains extended attributes for each inode. The xattrs
280 name and value field. The type field encodes the xattr prefix
283 is stored inline (in which case the value field contains the xattr value),
290 The xattr lists are packed into compressed 8K metadata blocks.
292 location of the xattr list inside each inode, a 32-bit xattr id
293 is stored. This xattr id is mapped into the location of the xattr
294 list using a second xattr id lookup table.
/linux/fs/f2fs/
H A Dxattr.c3 * fs/f2fs/xattr.c
8 * Portions of this code from linux/fs/ext2/xattr.c
15 * xattr consolidation Copyright (c) 2004 James Morris <jmorris@redhat.com>,
24 #include "xattr.h"
140 static int f2fs_initxattrs(struct inode *inode, const struct xattr *xattr_array, in f2fs_initxattrs()
143 const struct xattr *xattr; in f2fs_initxattrs() local
146 for (xattr = xattr_array; xattr->name != NULL; xattr in f2fs_initxattrs()
[all...]
/linux/include/linux/
H A Dxattr.h73 struct xattr { struct
141 void simple_xattr_free(struct simple_xattr *xattr);
142 void simple_xattr_free_rcu(struct simple_xattr *xattr);
/linux/Documentation/filesystems/ext4/
H A Deainode.rst11 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/Documentation/security/
H A DIMA-templates.rst82 - '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/fs/xfs/
H A Dxfs_iops.c56 const struct xattr *xattr_array, in xfs_initxattrs()
59 const struct xattr *xattr; in xfs_initxattrs() local
63 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in xfs_initxattrs()
67 .name = xattr->name, in xfs_initxattrs()
68 .namelen = strlen(xattr->name), in xfs_initxattrs()
69 .value = xattr->value, in xfs_initxattrs()
70 .valuelen = xattr in xfs_initxattrs()
[all...]
/linux/kernel/bpf/
H A Dinode.c24 #include <linux/xattr.h>
50 const struct xattr *xattr_array, void *fs_info);
940 const struct xattr *xattr_array, void *fs_info) in bpf_fs_initxattrs()
944 const struct xattr *xattr; in bpf_fs_initxattrs()
947 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in bpf_fs_initxattrs()
948 CLASS(simple_xattr, new_xattr)(xattr->value, xattr in bpf_fs_initxattrs()
939 const struct xattr *xattr; bpf_fs_initxattrs() local
[all...]

123