Home
last modified time | relevance | path

Searched refs:xattrs (Results 1 - 25 of 34) sorted by relevance

12

/kernel/linux/linux-5.10/include/linux/
H A Dxattr.h87 static inline void simple_xattrs_init(struct simple_xattrs *xattrs) in simple_xattrs_init() argument
89 INIT_LIST_HEAD(&xattrs->head); in simple_xattrs_init()
90 spin_lock_init(&xattrs->lock); in simple_xattrs_init()
94 * free all the xattrs
96 static inline void simple_xattrs_free(struct simple_xattrs *xattrs) in simple_xattrs_free() argument
100 list_for_each_entry_safe(xattr, node, &xattrs->head, list) { in simple_xattrs_free()
107 int simple_xattr_get(struct simple_xattrs *xattrs, const char *name,
109 int simple_xattr_set(struct simple_xattrs *xattrs, const char *name,
112 ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs, char *buffer,
114 void simple_xattr_list_add(struct simple_xattrs *xattrs,
[all...]
H A Dshmem_fs.h24 struct simple_xattrs xattrs; /* list of xattrs */ member
/kernel/linux/linux-6.6/include/linux/
H A Dxattr.h116 void simple_xattrs_init(struct simple_xattrs *xattrs);
117 void simple_xattrs_free(struct simple_xattrs *xattrs, size_t *freed_space);
121 int simple_xattr_get(struct simple_xattrs *xattrs, const char *name,
123 struct simple_xattr *simple_xattr_set(struct simple_xattrs *xattrs,
126 ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
128 void simple_xattr_add(struct simple_xattrs *xattrs,
H A Dlsm_hooks.h72 * @xattrs: array storing LSM-provided xattrs
73 * @xattr_count: number of already stored xattrs (updated)
75 * Retrieve the first available slot in the @xattrs array to fill with an xattr,
78 * Return: The slot to fill in @xattrs if non-NULL, NULL otherwise.
80 static inline struct xattr *lsm_get_xattr_slot(struct xattr *xattrs, in lsm_get_xattr_slot() argument
83 if (unlikely(!xattrs)) in lsm_get_xattr_slot()
85 return &xattrs[(*xattr_count)++]; in lsm_get_xattr_slot()
H A Devm.h61 const struct qstr *qstr, struct xattr *xattrs,
163 struct xattr *xattrs, in evm_inode_init_security()
161 evm_inode_init_security(struct inode *inode, struct inode *dir, const struct qstr *qstr, struct xattr *xattrs, int *xattr_count) evm_inode_init_security() argument
H A Dshmem_fs.h30 struct simple_xattrs xattrs; /* list of xattrs */ member
/kernel/linux/linux-6.6/fs/
H A Dxattr.c89 * Check whether the inode allows writing xattrs. Specifically, we can never
467 * This function returns the names of all xattrs associated with the
474 * xattrs.
990 * @dentry: dentry to list the xattrs
1144 * @xattrs: the header of the xattr object
1157 int simple_xattr_get(struct simple_xattrs *xattrs, const char *name, in simple_xattr_get() argument
1164 read_lock(&xattrs->lock); in simple_xattr_get()
1165 rbp = rb_find(name, &xattrs->rb_root, rbtree_simple_xattr_cmp); in simple_xattr_get()
1176 read_unlock(&xattrs->lock); in simple_xattr_get()
1182 * @xattrs
1206 simple_xattr_set(struct simple_xattrs *xattrs, const char *name, const void *value, size_t size, int flags) simple_xattr_set() argument
1308 simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs, char *buffer, size_t size) simple_xattr_list() argument
1363 simple_xattr_add(struct simple_xattrs *xattrs, struct simple_xattr *new_xattr) simple_xattr_add() argument
1377 simple_xattrs_init(struct simple_xattrs *xattrs) simple_xattrs_init() argument
1391 simple_xattrs_free(struct simple_xattrs *xattrs, size_t *freed_space) simple_xattrs_free() argument
[all...]
/kernel/linux/linux-5.10/fs/
H A Dxattr.c929 int simple_xattr_get(struct simple_xattrs *xattrs, const char *name, in simple_xattr_get() argument
935 spin_lock(&xattrs->lock); in simple_xattr_get()
936 list_for_each_entry(xattr, &xattrs->head, list) { in simple_xattr_get()
949 spin_unlock(&xattrs->lock); in simple_xattr_get()
955 * @xattrs: target simple_xattr list
968 int simple_xattr_set(struct simple_xattrs *xattrs, const char *name, in simple_xattr_set() argument
992 spin_lock(&xattrs->lock); in simple_xattr_set()
993 list_for_each_entry(xattr, &xattrs->head, list) { in simple_xattr_set()
1014 list_add(&new_xattr->list, &xattrs->head); in simple_xattr_set()
1018 spin_unlock(&xattrs in simple_xattr_set()
1049 simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs, char *buffer, size_t size) simple_xattr_list() argument
1092 simple_xattr_list_add(struct simple_xattrs *xattrs, struct simple_xattr *new_xattr) simple_xattr_list_add() argument
[all...]
/kernel/linux/linux-5.10/fs/kernfs/
H A Dinode.c55 simple_xattrs_init(&kn->iattr->xattrs); in __kernfs_iattrs()
150 return simple_xattr_list(d_inode(dentry), &attrs->xattrs, buf, size); in kernfs_iop_listxattr()
298 return simple_xattr_get(&attrs->xattrs, name, value, size); in kernfs_xattr_get()
308 return simple_xattr_set(&attrs->xattrs, name, value, size, flags, NULL); in kernfs_xattr_set()
334 struct simple_xattrs *xattrs, in kernfs_vfs_user_xattr_add()
352 ret = simple_xattr_set(xattrs, full_name, value, size, flags, in kernfs_vfs_user_xattr_add()
368 struct simple_xattrs *xattrs, in kernfs_vfs_user_xattr_rm()
376 ret = simple_xattr_set(xattrs, full_name, value, size, flags, in kernfs_vfs_user_xattr_rm()
404 return kernfs_vfs_user_xattr_add(kn, full_name, &attrs->xattrs, in kernfs_vfs_user_xattr_set()
407 return kernfs_vfs_user_xattr_rm(kn, full_name, &attrs->xattrs, in kernfs_vfs_user_xattr_set()
332 kernfs_vfs_user_xattr_add(struct kernfs_node *kn, const char *full_name, struct simple_xattrs *xattrs, const void *value, size_t size, int flags) kernfs_vfs_user_xattr_add() argument
366 kernfs_vfs_user_xattr_rm(struct kernfs_node *kn, const char *full_name, struct simple_xattrs *xattrs, const void *value, size_t size, int flags) kernfs_vfs_user_xattr_rm() argument
[all...]
H A Dkernfs-internal.h28 struct simple_xattrs xattrs; member
/kernel/linux/linux-6.6/fs/kernfs/
H A Dinode.c49 simple_xattrs_init(&kn->iattr->xattrs); in __kernfs_iattrs()
148 return simple_xattr_list(d_inode(dentry), &attrs->xattrs, buf, size); in kernfs_iop_listxattr()
302 return simple_xattr_get(&attrs->xattrs, name, value, size); in kernfs_xattr_get()
313 old_xattr = simple_xattr_set(&attrs->xattrs, name, value, size, flags); in kernfs_xattr_set()
345 struct simple_xattrs *xattrs, in kernfs_vfs_user_xattr_add()
363 old_xattr = simple_xattr_set(xattrs, full_name, value, size, flags); in kernfs_vfs_user_xattr_add()
384 struct simple_xattrs *xattrs, in kernfs_vfs_user_xattr_rm()
391 old_xattr = simple_xattr_set(xattrs, full_name, value, size, flags); in kernfs_vfs_user_xattr_rm()
422 return kernfs_vfs_user_xattr_add(kn, full_name, &attrs->xattrs, in kernfs_vfs_user_xattr_set()
425 return kernfs_vfs_user_xattr_rm(kn, full_name, &attrs->xattrs, in kernfs_vfs_user_xattr_set()
343 kernfs_vfs_user_xattr_add(struct kernfs_node *kn, const char *full_name, struct simple_xattrs *xattrs, const void *value, size_t size, int flags) kernfs_vfs_user_xattr_add() argument
382 kernfs_vfs_user_xattr_rm(struct kernfs_node *kn, const char *full_name, struct simple_xattrs *xattrs, const void *value, size_t size, int flags) kernfs_vfs_user_xattr_rm() argument
[all...]
H A Dkernfs-internal.h29 struct simple_xattrs xattrs; member
/kernel/linux/linux-6.6/security/integrity/evm/
H A Devm_main.c90 int i, xattrs; in evm_init_config() local
92 xattrs = ARRAY_SIZE(evm_config_default_xattrnames); in evm_init_config()
95 for (i = 0; i < xattrs; i++) { in evm_init_config()
119 * attrs/xattrs being found invalid will not make them valid.
321 * @dentry: dentry of the read xattrs
535 * Writing other xattrs is safe for portable signatures, as portable in evm_protect_xattr()
575 /* Policy permits modification of the protected xattrs even though in evm_inode_setxattr()
604 /* Policy permits modification of the protected xattrs even though in evm_inode_removexattr()
658 /* Policy permits modification of the protected xattrs even though in evm_inode_set_acl()
675 * Writing other xattrs i in evm_inode_set_acl()
870 evm_inode_init_security(struct inode *inode, struct inode *dir, const struct qstr *qstr, struct xattr *xattrs, int *xattr_count) evm_inode_init_security() argument
[all...]
H A Devm.h41 /* List of EVM protected security xattrs */
63 int evm_init_hmac(struct inode *inode, const struct xattr *xattrs,
H A Devm_crypto.c214 * Calculate the HMAC value across the set of protected security xattrs.
253 * Skip non-enabled xattrs for locally calculated in evm_calc_hmac_or_hash()
388 int evm_init_hmac(struct inode *inode, const struct xattr *xattrs, in evm_init_hmac() argument
400 for (xattr = xattrs; xattr->name; xattr++) { in evm_init_hmac()
/kernel/linux/linux-5.10/fs/ceph/
H A Dxattr.c30 * These define virtual xattrs exposing the recursive directory
114 * The convention with strings in xattrs is that they should not be NULL
668 struct ceph_inode_xattr **xattrs = NULL; variable
689 xattrs = kcalloc(numattr, sizeof(struct ceph_inode_xattr *),
692 if (!xattrs)
696 xattrs[i] = kmalloc(sizeof(struct ceph_inode_xattr),
698 if (!xattrs[i])
706 kfree(xattrs[i]); variable
707 kfree(xattrs); variable
708 xattrs
727 kfree(xattrs); global() variable
738 kfree(xattrs[i]); global() variable
739 kfree(xattrs); global() variable
[all...]
/kernel/linux/linux-6.6/fs/ceph/
H A Dxattr.c30 * These define virtual xattrs exposing the recursive directory
115 * The convention with strings in xattrs is that they should not be NULL
797 struct ceph_inode_xattr **xattrs = NULL; variable
818 xattrs = kcalloc(numattr, sizeof(struct ceph_inode_xattr *),
821 if (!xattrs)
825 xattrs[i] = kmalloc(sizeof(struct ceph_inode_xattr),
827 if (!xattrs[i])
835 kfree(xattrs[i]); variable
836 kfree(xattrs); variable
837 xattrs
856 kfree(xattrs); global() variable
867 kfree(xattrs[i]); global() variable
868 kfree(xattrs); global() variable
[all...]
/kernel/linux/linux-5.10/security/integrity/evm/
H A Devm_main.c71 int i, xattrs; in evm_init_config() local
73 xattrs = ARRAY_SIZE(evm_config_default_xattrnames); in evm_init_config()
76 for (i = 0; i < xattrs; i++) { in evm_init_config()
383 /* Policy permits modification of the protected xattrs even though in evm_inode_setxattr()
410 /* Policy permits modification of the protected xattrs even though in evm_inode_removexattr()
/kernel/linux/linux-5.10/security/apparmor/include/
H A Dpolicy.h150 char **xattrs; member
/kernel/linux/linux-6.6/security/apparmor/include/
H A Dpolicy.h157 * @xattr_count: number of xattrs in table
158 * @xattrs: table of xattrs
165 char **xattrs; member
/kernel/linux/linux-5.10/security/apparmor/
H A Dpolicy_unpack.c550 if (unpack_nameX(e, AA_STRUCT, "xattrs")) { in unpack_xattrs()
555 profile->xattrs = kcalloc(size, sizeof(char *), GFP_KERNEL); in unpack_xattrs()
556 if (!profile->xattrs) in unpack_xattrs()
559 if (!unpack_strdup(e, &profile->xattrs[i], NULL)) in unpack_xattrs()
818 info = "failed to unpack profile xattrs"; in unpack_profile()
H A Dpolicy.c227 kfree_sensitive(profile->xattrs[i]); in aa_free_profile()
228 kfree_sensitive(profile->xattrs); in aa_free_profile()
/kernel/linux/linux-6.6/security/apparmor/
H A Dpolicy_unpack.c538 if (aa_unpack_nameX(e, AA_STRUCT, "xattrs")) { in unpack_xattrs()
545 profile->attach.xattrs = kcalloc(size, sizeof(char *), GFP_KERNEL); in unpack_xattrs()
546 if (!profile->attach.xattrs) in unpack_xattrs()
549 if (!aa_unpack_strdup(e, &profile->attach.xattrs[i], NULL)) in unpack_xattrs()
966 info = "failed to unpack profile xattrs"; in unpack_profile()
H A Dpolicy.c201 kfree_sensitive(attach->xattrs[i]); in free_attachment()
202 kfree_sensitive(attach->xattrs); in free_attachment()
/kernel/linux/linux-5.10/mm/
H A Dshmem.c1184 simple_xattrs_free(&info->xattrs); in shmem_evict_inode()
2309 simple_xattrs_init(&info->xattrs); in shmem_get_inode()
3230 * support from the LSM "for free". As soon as we have any other xattrs
3236 * Callback for security_inode_init_security() for acquiring xattrs.
3265 simple_xattr_list_add(&info->xattrs, new_xattr); in shmem_initxattrs()
3278 return simple_xattr_get(&info->xattrs, name, buffer, size); in shmem_xattr_handler_get()
3289 return simple_xattr_set(&info->xattrs, name, value, size, flags, NULL); in shmem_xattr_handler_set()
3317 return simple_xattr_list(d_inode(dentry), &info->xattrs, buffer, size); in shmem_listxattr()

Completed in 26 milliseconds

12