/kernel/linux/linux-6.6/security/integrity/evm/ |
H A 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 in evm_write_xattrs() [all...] |
H A D | evm_crypto.c | 17 #include <linux/xattr.h> 136 /* Protect against 'cutting & pasting' security.evm xattr, include inode 183 * Dump large security xattr values as a continuous ascii hexademical string. 216 * Instead of retrieving the requested xattr, for performance, calculate 217 * the hmac using the requested xattr value. Don't alloc/free memory for 218 * each xattr, but attempt to re-use the previously allocated memory. 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 in evm_calc_hmac_or_hash() 392 const struct xattr *xattr; evm_init_hmac() local [all...] |
H A D | evm_posix_acl.c | 9 #include <linux/xattr.h> 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()
|
H A D | evm_main.c | 19 #include <linux/xattr.h> 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() 156 * evm_verify_hmac - calculate and compare the HMAC with the EVM xattr 159 * and compare it against the stored security.evm xattr. 162 * - use the previoulsy retrieved xattr value and length to calculate the 228 /* accept xattr with non-empty signature field */ in evm_verify_hmac() 286 struct xattr_list *xattr; in evm_protected_xattr_common() local 289 list_for_each_entry_lockless(xattr, in evm_protected_xattr_common() 336 struct xattr_list *xattr; evm_read_protected_xattrs() local 875 struct xattr *xattr, *evm_xattr; evm_inode_init_security() local [all...] |
/kernel/linux/linux-5.10/security/integrity/evm/ |
H A 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 size += strlen(xattr->name) + 1; in evm_read_xattrs() 151 list_for_each_entry(xattr, &evm_config_xattrnames, list) { in evm_read_xattrs() 152 sprintf(temp + offset, "%s\n", xattr->name); in evm_read_xattrs() 153 offset += strlen(xattr->name) + 1; in evm_read_xattrs() 177 struct xattr_list *xattr, *tmp; in evm_write_xattrs() local 196 xattr = kmalloc(sizeof(struct xattr_list), GFP_KERNEL); in evm_write_xattrs() 197 if (!xattr) { in evm_write_xattrs() 202 xattr in evm_write_xattrs() [all...] |
H A D | evm_posix_acl.c | 9 #include <linux/xattr.h> 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()
|
/kernel/linux/linux-5.10/fs/ceph/ |
H A D | xattr.c | 10 #include <linux/xattr.h> 19 struct ceph_inode_xattr *xattr); 450 struct ceph_inode_xattr *xattr = NULL; in __set_xattr() local 457 xattr = rb_entry(parent, struct ceph_inode_xattr, node); in __set_xattr() 458 c = strncmp(name, xattr->name, min(name_len, xattr->name_len)); in __set_xattr() 464 if (name_len == xattr->name_len) in __set_xattr() 466 else if (name_len < xattr->name_len) in __set_xattr() 471 xattr = NULL; in __set_xattr() 477 if (xattr in __set_xattr() 546 struct ceph_inode_xattr *xattr = NULL; __get_xattr() local 573 __free_xattr(struct ceph_inode_xattr *xattr) __free_xattr() argument 585 __remove_xattr(struct ceph_inode_info *ci, struct ceph_inode_xattr *xattr) __remove_xattr() argument 610 struct ceph_inode_xattr *xattr = NULL; __copy_xattr_names() local 633 struct ceph_inode_xattr *xattr = NULL; __ceph_destroy_xattrs() local 774 struct ceph_inode_xattr *xattr = NULL; __ceph_build_xattrs_blob() local 837 struct ceph_inode_xattr *xattr; __ceph_getxattr() local 1034 struct ceph_inode_xattr *xattr = NULL; __ceph_setxattr() local [all...] |
/kernel/linux/linux-5.10/fs/hfsplus/ |
H A D | xattr_security.c | 14 #include "xattr.h" 36 const struct xattr *xattr_array, in hfsplus_initxattrs() 39 const struct xattr *xattr; in hfsplus_initxattrs() local 47 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in hfsplus_initxattrs() 49 if (!strcmp(xattr->name, "")) in hfsplus_initxattrs() 54 XATTR_SECURITY_PREFIX_LEN, xattr->name); in hfsplus_initxattrs() 56 XATTR_SECURITY_PREFIX_LEN + strlen(xattr in hfsplus_initxattrs() [all...] |
/kernel/linux/linux-6.6/fs/hfsplus/ |
H A D | xattr_security.c | 14 #include "xattr.h" 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 in hfsplus_initxattrs() [all...] |
/kernel/linux/linux-5.10/fs/ext4/ |
H A D | xattr_security.c | 13 #include "xattr.h" 35 ext4_initxattrs(struct inode *inode, const struct xattr *xattr_array, in ext4_initxattrs() 38 const struct xattr *xattr; in ext4_initxattrs() local 42 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in ext4_initxattrs() 45 xattr->name, xattr->value, in ext4_initxattrs() 46 xattr in ext4_initxattrs() [all...] |
/kernel/linux/linux-5.10/fs/ext2/ |
H A D | xattr_security.c | 9 #include "xattr.h" 30 static int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array, in ext2_initxattrs() 33 const struct xattr *xattr; in ext2_initxattrs() local 36 for (xattr = xattr_array; xattr->name != NULL; xattr++) { in ext2_initxattrs() 38 xattr->name, xattr->value, in ext2_initxattrs() 39 xattr in ext2_initxattrs() [all...] |
/kernel/linux/linux-6.6/fs/ext4/ |
H A D | xattr_security.c | 13 #include "xattr.h" 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 in ext4_initxattrs() [all...] |
/kernel/linux/linux-6.6/fs/ext2/ |
H A D | xattr_security.c | 9 #include "xattr.h" 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 in ext2_initxattrs() [all...] |
/kernel/linux/linux-5.10/fs/jffs2/ |
H A D | security.c | 20 #include <linux/xattr.h> 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 in jffs2_initxattrs() [all...] |
/kernel/linux/linux-6.6/fs/jffs2/ |
H A D | security.c | 20 #include <linux/xattr.h> 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 in jffs2_initxattrs() [all...] |
/kernel/linux/linux-6.6/fs/ceph/ |
H A D | xattr.c | 10 #include <linux/xattr.h> 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 in __set_xattr() 673 struct ceph_inode_xattr *xattr = NULL; __get_xattr() local 702 __free_xattr(struct ceph_inode_xattr *xattr) __free_xattr() argument 714 __remove_xattr(struct ceph_inode_info *ci, struct ceph_inode_xattr *xattr) __remove_xattr() argument 739 struct ceph_inode_xattr *xattr = NULL; __copy_xattr_names() local 762 struct ceph_inode_xattr *xattr = NULL; __ceph_destroy_xattrs() local 903 struct ceph_inode_xattr *xattr = NULL; __ceph_build_xattrs_blob() local 966 struct ceph_inode_xattr *xattr; __ceph_getxattr() local 1177 struct ceph_inode_xattr *xattr = NULL; __ceph_setxattr() local [all...] |
/kernel/linux/linux-5.10/fs/jfs/ |
H A D | xattr.c | 9 #include <linux/xattr.h> 60 int flag; /* Indicates what storage xattr points to */ 61 int max_size; /* largest xattr that fits in current buffer */ 62 dxd_t new_ea; /* dxd to replace ea when modifying xattr */ 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 in ea_get() 1003 const struct xattr *xattr; jfs_initxattrs() local [all...] |
/kernel/linux/linux-6.6/fs/jfs/ |
H A D | xattr.c | 9 #include <linux/xattr.h> 60 int flag; /* Indicates what storage xattr points to */ 61 int max_size; /* largest xattr that fits in current buffer */ 62 dxd_t new_ea; /* dxd to replace ea when modifying xattr */ 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 in ea_get() 1001 const struct xattr *xattr; jfs_initxattrs() local [all...] |
/kernel/linux/linux-5.10/fs/squashfs/ |
H A D | xattr.c | 8 * xattr.c 16 #include <linux/xattr.h> 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() 43 /* loop reading each xattr name */ in squashfs_listxattr() 87 /* skip remaining xattr entry */ 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() 121 /* loop reading each xattr name */ in squashfs_xattr_get() 147 /* found xattr */ in squashfs_xattr_get() 150 u64 xattr; squashfs_xattr_get() local [all...] |
/kernel/linux/linux-6.6/fs/squashfs/ |
H A D | xattr.c | 8 * xattr.c 16 #include <linux/xattr.h> 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() 43 /* loop reading each xattr name */ in squashfs_listxattr() 87 /* skip remaining xattr entry */ 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() 121 /* loop reading each xattr name */ in squashfs_xattr_get() 147 /* found xattr */ in squashfs_xattr_get() 150 u64 xattr; squashfs_xattr_get() local [all...] |
/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | libbpf_probes.c | 71 struct bpf_load_program_attr xattr = {}; in probe_load() local 76 xattr.expected_attach_type = BPF_CGROUP_INET4_CONNECT; in probe_load() 79 xattr.expected_attach_type = BPF_CGROUP_GETSOCKOPT; in probe_load() 82 xattr.expected_attach_type = BPF_SK_LOOKUP; in probe_load() 85 xattr.kern_version = get_kernel_version(); in probe_load() 118 xattr.prog_type = prog_type; in probe_load() 119 xattr.insns = insns; in probe_load() 120 xattr.insns_cnt = insns_cnt; in probe_load() 121 xattr.license = "GPL"; in probe_load() 122 xattr in probe_load() [all...] |
/kernel/linux/linux-5.10/fs/ |
H A D | xattr.c | 3 File: fs/xattr.c 14 #include <linux/xattr.h> 39 * In order to implement different sets of xattr operations for each xattr 96 * Updating an xattr will likely cause i_uid and i_gid in xattr_permission() 186 * @name - xattr name to set 239 * @name: xattr name to set 450 * @name: name of xattr to remove 886 * The get and set xattr handler operations are called with the remainder of 891 * Note: the list xattr handle 932 struct simple_xattr *xattr; simple_xattr_get() local 972 struct simple_xattr *xattr; simple_xattr_set() local 1053 struct simple_xattr *xattr; simple_xattr_list() local [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | evm.h | 13 #include <linux/xattr.h> 36 const struct xattr *xattr_array, 37 struct xattr *evm); 101 const struct xattr *xattr_array, in evm_inode_init_security() 102 struct xattr *evm) in evm_inode_init_security()
|
H A D | xattr.h | 3 File: linux/xattr.h 19 #include <uapi/linux/xattr.h> 44 struct xattr { struct 98 struct simple_xattr *xattr, *node; in simple_xattrs_free() local 100 list_for_each_entry_safe(xattr, node, &xattrs->head, list) { in simple_xattrs_free() 101 kfree(xattr->name); in simple_xattrs_free() 102 kvfree(xattr); in simple_xattrs_free()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/map_tests/ |
H A D | sk_storage_map.c | 22 static struct bpf_create_map_attr xattr = { variable 153 xattr.btf_fd = btf_fd; in create_sk_storage_map() 155 map_fd = bpf_create_map_xattr(&xattr); in create_sk_storage_map() 156 xattr.btf_fd = -1; in create_sk_storage_map() 472 xattr.btf_fd = btf_fd; in test_sk_storage_map_basic() 478 map_fd = bpf_create_map_xattr(&xattr); in test_sk_storage_map_basic() 563 memcpy(&bad_xattr, &xattr, sizeof(xattr)); in test_sk_storage_map_basic() 569 memcpy(&bad_xattr, &xattr, sizeof(xattr)); in test_sk_storage_map_basic() [all...] |