/linux-4.4.14/security/integrity/evm/ |
H A D | evm_posix_acl.c | 13 #include <linux/xattr.h> 16 int posix_xattr_acl(const char *xattr) posix_xattr_acl() argument 18 int xattr_len = strlen(xattr); posix_xattr_acl() 21 && (strncmp(XATTR_NAME_POSIX_ACL_ACCESS, xattr, xattr_len) == 0)) posix_xattr_acl() 24 && (strncmp(XATTR_NAME_POSIX_ACL_DEFAULT, xattr, xattr_len) == 0)) posix_xattr_acl()
|
H A D | evm.h | 19 #include <linux/xattr.h> 49 int evm_init_hmac(struct inode *inode, const struct xattr *xattr,
|
H A D | evm_main.c | 22 #include <linux/xattr.h> 77 char **xattr; evm_find_protected_xattrs() local 84 for (xattr = evm_config_xattrnames; *xattr != NULL; xattr++) { evm_find_protected_xattrs() 85 error = inode->i_op->getxattr(dentry, *xattr, NULL, 0); evm_find_protected_xattrs() 98 * evm_verify_hmac - calculate and compare the HMAC with the EVM xattr 101 * and compare it against the stored security.evm xattr. 104 * - use the previoulsy retrieved xattr value and length to calculate the 215 * evm_verifyxattr - verify the integrity of the requested xattr 216 * @dentry: object of the verify xattr 217 * @xattr_name: requested xattr 218 * @xattr_value: requested xattr value 219 * @xattr_value_len: requested xattr value length 222 * security.evm xattr. For performance, use the xattr value and length 225 * Returns the xattr integrity status. 270 * The posix xattr acls are 'system' prefixed, which normally would not 271 * affect security.evm. An interesting side affect of writing posix xattr 273 * For posix xattr acls only, permit security.evm, even if it currently 328 * Before allowing the 'security.evm' protected xattr to be updated, 386 * evm_inode_post_removexattr - update 'security.evm' after removing the xattr 390 * Update the HMAC stored in 'security.evm' to reflect removal of the xattr. 448 const struct xattr *lsm_xattr, evm_inode_init_security() 449 struct xattr *evm_xattr) evm_inode_init_security()
|
H A D | evm_crypto.c | 20 #include <linux/xattr.h> 91 /* Protect against 'cutting & pasting' security.evm xattr, include inode 124 * Instead of retrieving the requested xattr, for performance, calculate 125 * the hmac using the requested xattr value. Don't alloc/free memory for 126 * each xattr, but attempt to re-use the previously allocated memory. 195 * Calculate the hmac and update security.evm xattr 219 int evm_init_hmac(struct inode *inode, const struct xattr *lsm_xattr, evm_init_hmac()
|
/linux-4.4.14/fs/9p/ |
H A D | Makefile | 13 xattr.o
|
H A D | xattr.h | 17 #include <linux/xattr.h>
|
H A D | xattr.c | 23 #include "xattr.h" 123 * On success fid points to xattr v9fs_fid_xattr_set()
|
H A D | acl.c | 22 #include "xattr.h" 259 * xattr value. We leave it to the server to validate v9fs_xattr_set_acl()
|
H A D | vfs_super.c | 49 #include "xattr.h"
|
H A D | vfs_inode.c | 40 #include <linux/xattr.h> 49 #include "xattr.h"
|
H A D | vfs_inode_dotl.c | 38 #include <linux/xattr.h> 47 #include "xattr.h"
|
/linux-4.4.14/fs/hfsplus/ |
H A D | xattr_security.c | 13 #include "xattr.h" 35 const struct xattr *xattr_array, hfsplus_initxattrs() 38 const struct xattr *xattr; hfsplus_initxattrs() local 46 for (xattr = xattr_array; xattr->name != NULL; xattr++) { hfsplus_initxattrs() 48 if (!strcmp(xattr->name, "")) hfsplus_initxattrs() 53 XATTR_SECURITY_PREFIX_LEN, xattr->name); hfsplus_initxattrs() 55 XATTR_SECURITY_PREFIX_LEN + strlen(xattr->name), 0, 1); hfsplus_initxattrs() 58 xattr->value, xattr->value_len, 0); hfsplus_initxattrs()
|
H A D | Makefile | 9 attributes.o xattr.o xattr_user.o xattr_security.o xattr_trusted.o
|
H A D | xattr.h | 2 * linux/fs/hfsplus/xattr.h 12 #include <linux/xattr.h>
|
H A D | xattr_trusted.c | 12 #include "xattr.h"
|
H A D | xattr_user.c | 12 #include "xattr.h"
|
H A D | xattr.c | 2 * linux/fs/hfsplus/xattr.c 12 #include "xattr.h" 162 * here. Really, it means that first try to set of xattr hfsplus_create_attributes_file() 285 pr_err("can't init xattr find struct\n"); __hfsplus_setxattr() 297 pr_err("xattr exists yet\n"); __hfsplus_setxattr() 344 pr_err("xattr exists yet\n"); __hfsplus_setxattr() 356 pr_err("cannot replace xattr\n"); __hfsplus_setxattr() 464 pr_err("can't init xattr find struct\n"); hfsplus_getxattr_finder_info() 522 pr_err("can't allocate xattr entry\n"); __hfsplus_getxattr() 528 pr_err("can't init xattr find struct\n"); __hfsplus_getxattr() 537 pr_err("xattr searching failed\n"); __hfsplus_getxattr() 550 pr_err("invalid xattr record size\n"); __hfsplus_getxattr() 556 pr_err("only inline data xattr are supported\n"); __hfsplus_getxattr() 560 pr_err("invalid xattr record\n"); __hfsplus_getxattr() 633 pr_err("can't init xattr find struct\n"); hfsplus_listxattr_finder_info() 711 pr_err("can't init xattr find struct\n"); hfsplus_listxattr() 737 pr_err("invalid xattr key length: %d\n", key_len); hfsplus_listxattr() 797 pr_err("can't init xattr find struct\n"); hfsplus_removexattr()
|
H A D | posix_acl.c | 10 #include "xattr.h"
|
H A D | attributes.c | 282 pr_err("only inline data xattr are supported\n"); __hfsplus_delete_attr() 359 pr_err("xattr search failed\n"); hfsplus_delete_all_attrs()
|
H A D | dir.c | 19 #include "xattr.h"
|
H A D | inode.c | 21 #include "xattr.h"
|
H A D | super.c | 24 #include "xattr.h"
|
/linux-4.4.14/fs/ext4/ |
H A D | xattr_security.c | 12 #include "xattr.h" 54 ext4_initxattrs(struct inode *inode, const struct xattr *xattr_array, ext4_initxattrs() 57 const struct xattr *xattr; ext4_initxattrs() local 61 for (xattr = xattr_array; xattr->name != NULL; xattr++) { ext4_initxattrs() 64 xattr->name, xattr->value, ext4_initxattrs() 65 xattr->value_len, 0); ext4_initxattrs()
|
H A D | Makefile | 10 mmp.o indirect.o extents_status.o xattr.o xattr_user.o \
|
H A D | xattr_trusted.c | 13 #include "xattr.h"
|
H A D | xattr.h | 2 File: fs/ext4/xattr.h 9 #include <linux/xattr.h>
|
H A D | xattr_user.c | 12 #include "xattr.h"
|
H A D | symlink.c | 23 #include "xattr.h"
|
H A D | inline.c | 19 #include "xattr.h" 49 * We need to subtract another sizeof(__u32) since an in-inode xattr get_max_inline_xattr_value_size() 50 * needs an empty 4 bytes to indicate the gap between the xattr entry get_max_inline_xattr_value_size() 94 * If we can't find the space for a xattr entry, don't use the space 206 * If 'create' is set, we don't need to do the extra copy in the xattr 1272 /* check whether it can be inserted to inline xattr space. */ ext4_try_add_inline_entry() 1276 /* Try to use the xattr space.*/ ext4_try_add_inline_entry() 1858 * Called during xattr set, and if we can sparse space 'needed', 1932 /* Clear the content in the xattr space. */ ext4_inline_data_truncate()
|
H A D | acl.c | 9 #include "xattr.h"
|
H A D | crypto_policy.c | 17 #include "xattr.h"
|
H A D | xattr.c | 2 * linux/fs/ext4/xattr.c 10 * xattr consolidation Copyright (c) 2004 James Morris <jmorris@redhat.com>, 60 #include "xattr.h" 538 * Release the xattr block BH: If the reference count is > 1, decrement it; 570 * Beware of this ugliness: Releasing of xattr block references ext4_xattr_release_block() 952 /* Drop the previous xattr block. */ ext4_xattr_block_set()
|
H A D | crypto_key.c | 18 #include "xattr.h"
|
H A D | crypto.c | 39 #include "xattr.h"
|
H A D | crypto_fname.c | 30 #include "xattr.h"
|
H A D | page-io.c | 28 #include "xattr.h"
|
H A D | ext4_jbd2.h | 58 * This include super block, inode block, quota blocks and xattr blocks
|
H A D | dir.c | 28 #include "xattr.h"
|
H A D | file.c | 31 #include "xattr.h"
|
H A D | ialloc.c | 28 #include "xattr.h"
|
/linux-4.4.14/fs/jffs2/ |
H A D | security.c | 20 #include <linux/xattr.h> 27 const struct xattr *xattr_array, void *fs_info) jffs2_initxattrs() 29 const struct xattr *xattr; jffs2_initxattrs() local 32 for (xattr = xattr_array; xattr->name != NULL; xattr++) { jffs2_initxattrs() 34 xattr->name, xattr->value, jffs2_initxattrs() 35 xattr->value_len, 0); jffs2_initxattrs()
|
H A D | Makefile | 14 jffs2-$(CONFIG_JFFS2_FS_XATTR) += xattr.o xattr_trusted.o xattr_user.o
|
H A D | xattr_trusted.c | 15 #include <linux/xattr.h>
|
H A D | xattr_user.c | 15 #include <linux/xattr.h>
|
H A D | xattr.c | 24 #include <linux/xattr.h> 31 * the index of the xattr name/value pair cache (c->xattrindex). 36 * is used to release xattr name/value pair and detach from c->xattrindex. 38 * is used to reclaim xattr name/value pairs on the xattr name/value pair cache when 302 /* Setup raw-xattr */ save_xattr_datum() 438 * is called to release xattr related objects when unmounting. 440 * is used to confirm inode does not have duplicate xattr name/value pair. 442 * is used to force xattr data integrity check during the initial gc scan. 695 /* -------- xattr subsystem functions --------------- 701 * is used to release any xattr related objects. 882 JFFS2_NOTICE("complete building xattr subsystem, %u of xdatum" jffs2_build_xattr_subsystem() 908 /* -------- xattr subsystem functions --------------- 1110 /* Find existing xattr */ do_jffs2_setxattr()
|
H A D | xattr.h | 15 #include <linux/xattr.h>
|
H A D | summary.h | 70 jint32_t xid; /* xattr identifier */
|
H A D | gc.c | 132 int xattr = 0; jffs2_garbage_collect_pass() local 146 if (c->checked_ino > c->highest_ino && xattr) { jffs2_garbage_collect_pass() 157 if (!xattr) jffs2_garbage_collect_pass() 158 xattr = jffs2_verify_xattr(c); jffs2_garbage_collect_pass() 310 /* When 'ic' refers xattr_datum/xattr_ref, this node is GCed as xattr. jffs2_garbage_collect_pass() 311 * We can decide whether this node is inode or xattr by ic->class. */ jffs2_garbage_collect_pass()
|
H A D | acl.c | 21 #include <linux/xattr.h>
|
H A D | summary.c | 88 dbg_summary("xattr (xid=%u, version=%u) added to summary\n", jffs2_sum_add_mem() 496 dbg_summary("xattr at %#08x-%#08x (xid=%u, version=%u)\n", jffs2_sum_process_sum_data()
|
H A D | nodelist.h | 20 #include "xattr.h"
|
H A D | scan.c | 832 jffs2_dbg(1, "Fewer than %d bytes (xattr node) left to end of buf. Reading 0x%x at 0x%08x\n", jffs2_scan_eraseblock()
|
/linux-4.4.14/fs/ext2/ |
H A D | xattr_security.c | 8 #include "xattr.h" 48 static int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array, ext2_initxattrs() 51 const struct xattr *xattr; ext2_initxattrs() local 54 for (xattr = xattr_array; xattr->name != NULL; xattr++) { ext2_initxattrs() 56 xattr->name, xattr->value, ext2_initxattrs() 57 xattr->value_len, 0); ext2_initxattrs()
|
H A D | Makefile | 10 ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
|
H A D | symlink.c | 21 #include "xattr.h"
|
H A D | xattr_trusted.c | 9 #include "xattr.h"
|
H A D | xattr_user.c | 11 #include "xattr.h"
|
H A D | xattr.h | 10 #include <linux/xattr.h>
|
H A D | acl.c | 12 #include "xattr.h"
|
H A D | file.c | 26 #include "xattr.h"
|
H A D | namei.c | 36 #include "xattr.h"
|
H A D | xattr.c | 2 * linux/fs/ext2/xattr.c 9 * xattr consolidation Copyright (c) 2004 James Morris <jmorris@redhat.com>, 64 #include "xattr.h"
|
H A D | ialloc.c | 21 #include "xattr.h"
|
H A D | inode.c | 38 #include "xattr.h"
|
H A D | super.c | 36 #include "xattr.h"
|
/linux-4.4.14/fs/cachefiles/ |
H A D | Makefile | 14 xattr.o
|
H A D | xattr.c | 18 #include <linux/xattr.h> 54 pr_err("Can't set xattr on %pd [%lu] (err %d)\n", cachefiles_check_object_type() 66 pr_err("Can't read xattr on %pd [%lu] (err %d)\n", cachefiles_check_object_type() 86 pr_err("Cache object %lu type xattr length incorrect\n", cachefiles_check_object_type() 101 * set the state xattr on a cache file 122 "Failed to set xattr with error %d", ret); cachefiles_set_object_xattr() 129 * update the state xattr on a cache file 150 "Failed to update xattr with error %d", ret); cachefiles_update_object_xattr() 194 * check the state xattr on a cache file 227 "Can't read xattr on %lu (err %d)", cachefiles_check_object_xattr() 277 "Can't update xattr on %lu" cachefiles_check_object_xattr() 293 pr_err("Cache object %lu xattr length incorrect\n", cachefiles_check_object_xattr() 304 * remove the object's xattr to mark it stale 317 "Can't remove xattr from %lu" cachefiles_remove_object_xattr()
|
H A D | internal.h | 116 * auxiliary data xattr buffer 237 * xattr.c
|
H A D | namei.c | 18 #include <linux/xattr.h>
|
/linux-4.4.14/drivers/staging/lustre/lustre/llite/ |
H A D | xattr_cache.c | 25 char *xe_name; /* xattr name, \0-terminated */ 26 char *xe_value; /* xattr value */ 28 unsigned xe_vallen; /* xattr value length */ 54 * Initializes xattr cache for an inode. 56 * This initializes the xattr list and marks cache presence. 70 * Find in @cache and return @xattr_name attribute in @xattr, 71 * for the NULL @xattr_name return the first cached @xattr. 78 struct ll_xattr_entry **xattr) ll_xattr_cache_find() 86 *xattr = entry; list_for_each_entry() 98 * This adds an xattr. 104 * \retval -EPROTO if duplicate xattr is being added 111 struct ll_xattr_entry *xattr; ll_xattr_cache_add() local 113 if (ll_xattr_cache_find(cache, xattr_name, &xattr) == 0) { ll_xattr_cache_add() 114 CDEBUG(D_CACHE, "duplicate xattr: [%s]\n", xattr_name); ll_xattr_cache_add() 118 xattr = kmem_cache_alloc(xattr_kmem, GFP_NOFS | __GFP_ZERO); ll_xattr_cache_add() 119 if (xattr == NULL) { ll_xattr_cache_add() 120 CDEBUG(D_CACHE, "failed to allocate xattr\n"); ll_xattr_cache_add() 124 xattr->xe_name = kstrdup(xattr_name, GFP_NOFS); ll_xattr_cache_add() 125 if (!xattr->xe_name) { ll_xattr_cache_add() 126 CDEBUG(D_CACHE, "failed to alloc xattr name %u\n", ll_xattr_cache_add() 127 xattr->xe_namelen); ll_xattr_cache_add() 130 xattr->xe_value = kmemdup(xattr_val, xattr_val_len, GFP_NOFS); ll_xattr_cache_add() 131 if (!xattr->xe_value) ll_xattr_cache_add() 134 xattr->xe_vallen = xattr_val_len; ll_xattr_cache_add() 135 list_add(&xattr->xe_list, cache); ll_xattr_cache_add() 142 kfree(xattr->xe_name); ll_xattr_cache_add() 144 kmem_cache_free(xattr_kmem, xattr); ll_xattr_cache_add() 160 struct ll_xattr_entry *xattr; ll_xattr_cache_del() local 162 CDEBUG(D_CACHE, "del xattr: %s\n", xattr_name); ll_xattr_cache_del() 164 if (ll_xattr_cache_find(cache, xattr_name, &xattr) == 0) { ll_xattr_cache_del() 165 list_del(&xattr->xe_list); ll_xattr_cache_del() 166 kfree(xattr->xe_name); ll_xattr_cache_del() 167 kfree(xattr->xe_value); ll_xattr_cache_del() 168 kmem_cache_free(xattr_kmem, xattr); ll_xattr_cache_del() 190 struct ll_xattr_entry *xattr, *tmp; ll_xattr_cache_list() local 193 list_for_each_entry_safe(xattr, tmp, cache, xe_list) { list_for_each_entry_safe() 195 xld_buffer, xld_tail, xattr->xe_name); list_for_each_entry_safe() 198 xld_size -= xattr->xe_namelen; list_for_each_entry_safe() 202 xattr->xe_name, xattr->xe_namelen); list_for_each_entry_safe() 204 xld_tail += xattr->xe_namelen; list_for_each_entry_safe() 214 * Check if the xattr cache is initialized (filled). 225 * This finalizes the xattr cache. 227 * Free all xattr memory. @lli is the inode info pointer. 259 * Find or request an LDLM lock with xattr data. 328 * Refill the xattr cache. 331 * a read or a write xattr lock depending on operation in @oit. 370 /* xattr data is so large that we don't want to cache it */ ll_xattr_cache_refill() 378 CERROR("no MDT BODY in the refill xattr reply\n"); ll_xattr_cache_refill() 382 /* do not need swab xattr data */ ll_xattr_cache_refill() 406 CERROR("xattr protocol violation (names are broken)\n"); ll_xattr_cache_refill() 409 CERROR("xattr protocol violation (vals are broken)\n"); ll_xattr_cache_refill() 432 CERROR("a hole in xattr data\n"); ll_xattr_cache_refill() 459 * Get an xattr value or list xattrs using the write-through cache. 461 * Get the xattr value (@valid has OBD_MD_FLXATTR set) of @name or 462 * list xattr names (@valid has OBD_MD_FLXATTRLS set) for @inode. 496 struct ll_xattr_entry *xattr; ll_xattr_cache_get() local 498 rc = ll_xattr_cache_find(&lli->lli_xattrs, name, &xattr); ll_xattr_cache_get() 500 rc = xattr->xe_vallen; ll_xattr_cache_get() 503 if (size >= xattr->xe_vallen) ll_xattr_cache_get() 504 memcpy(buffer, xattr->xe_value, ll_xattr_cache_get() 505 xattr->xe_vallen); ll_xattr_cache_get() 76 ll_xattr_cache_find(struct list_head *cache, const char *xattr_name, struct ll_xattr_entry **xattr) ll_xattr_cache_find() argument
|
H A D | Makefile | 5 xattr.o xattr_cache.o remote_perm.o llite_rmtacl.o \
|
H A D | xattr.c | 131 /* b10667: ignore lustre special xattr for now */ ll_setxattr_common() 136 /* b15587: ignore security.capability xattr for now */ ll_setxattr_common() 220 CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", ll_setxattr() 273 CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", ll_removexattr() 297 * without 'user_xattr' ext3 will list all xattr names but ll_getxattr_common() 310 /* b15587: ignore security.capability xattr for now */ ll_getxattr_common() 390 /* only detect the xattr size */ ll_getxattr_common() 408 /* do not need swab xattr data */ ll_getxattr_common() 460 CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", ll_getxattr() 509 * rsync 3.0.x) care much about the exact xattr value ll_getxattr() 525 * confuse tar --xattr by recognizing layout gen as stripe ll_getxattr() 570 /* skip OK xattr type ll_listxattr() 577 * removing the xattr that is not OK ll_listxattr()
|
H A D | llite_internal.h | 396 #define LL_SBI_USER_XATTR 0x08 /* support user xattr */ 411 #define LL_SBI_XATTR_CACHE 0x80000 /* support for xattr cache */ 417 "xattr", \ 433 "xattr", \ 1034 /* llite/xattr.c */
|
H A D | llite_lib.c | 351 "%s: disabling xattr cache due to unknown maximum xattr size.\n", client_common_fill_super()
|
/linux-4.4.14/fs/squashfs/ |
H A D | xattr_id.c | 25 * This file implements code to map the 32-bit xattr id stored in the inode 26 * into the on disk location of the xattr data. 36 #include "xattr.h" 39 * Map xattr id using the xattr id look up table 42 int *count, unsigned int *size, unsigned long long *xattr) squashfs_xattr_lookup() 56 *xattr = le64_to_cpu(id.xattr); squashfs_xattr_lookup() 64 * Read uncompressed xattr id lookup table indexes from disk into memory 82 /* there is always at least one xattr id */ squashfs_read_xattr_id_table() 41 squashfs_xattr_lookup(struct super_block *sb, unsigned int index, int *count, unsigned int *size, unsigned long long *xattr) squashfs_xattr_lookup() argument
|
H A D | xattr.c | 21 * xattr.c 29 #include <linux/xattr.h> 45 u64 start = SQUASHFS_XATTR_BLK(squashfs_i(inode)->xattr) squashfs_listxattr() 47 int offset = SQUASHFS_XATTR_OFFSET(squashfs_i(inode)->xattr); squashfs_listxattr() 56 /* loop reading each xattr name */ squashfs_listxattr() 99 /* skip remaining xattr entry */ squashfs_listxattr() 122 u64 start = SQUASHFS_XATTR_BLK(squashfs_i(inode)->xattr) squashfs_xattr_get() 124 int offset = SQUASHFS_XATTR_OFFSET(squashfs_i(inode)->xattr); squashfs_xattr_get() 133 /* loop reading each xattr name */ squashfs_xattr_get() 159 /* found xattr */ squashfs_xattr_get() 162 u64 xattr; squashfs_xattr_get() local 172 xattr = le64_to_cpu(xattr_val); squashfs_xattr_get() 173 start = SQUASHFS_XATTR_BLK(xattr) + squashfs_xattr_get() 175 offset = SQUASHFS_XATTR_OFFSET(xattr); squashfs_xattr_get() 177 /* read xattr value */ squashfs_xattr_get() 197 /* no match, skip remaining xattr entry */ squashfs_xattr_get()
|
H A D | inode.c | 43 #include <linux/xattr.h> 49 #include "xattr.h" 209 xattr_id = le32_to_cpu(sqsh_ino->xattr); squashfs_read_inode() 263 xattr_id = le32_to_cpu(sqsh_ino->xattr); squashfs_read_inode() 300 __le32 xattr; squashfs_read_inode() local 306 err = squashfs_read_metadata(sb, &xattr, &block, squashfs_read_inode() 307 &offset, sizeof(xattr)); squashfs_read_inode() 310 xattr_id = le32_to_cpu(xattr); squashfs_read_inode() 354 xattr_id = le32_to_cpu(sqsh_ino->xattr); squashfs_read_inode() 394 xattr_id = le32_to_cpu(sqsh_ino->xattr); squashfs_read_inode() 409 &squashfs_i(inode)->xattr); squashfs_read_inode()
|
H A D | xattr.h | 21 * xattr.h 40 unsigned long long *xattr) squashfs_xattr_lookup() 38 squashfs_xattr_lookup(struct super_block *sb, unsigned int index, int *count, unsigned int *size, unsigned long long *xattr) squashfs_xattr_lookup() argument
|
H A D | squashfs.h | 86 /* xattr.c */ 90 * Inodes, files, decompressor and xattr operations 112 /* xattr.c */
|
H A D | squashfs_fs.h | 191 /* xattr id lookup table defines */ 301 __le32 xattr; member in struct:squashfs_lipc_inode 324 __le32 xattr; member in struct:squashfs_ldev_inode 366 __le32 xattr; member in struct:squashfs_lreg_inode 397 __le32 xattr; member in struct:squashfs_ldir_inode 446 __le64 xattr; member in struct:squashfs_xattr_id
|
H A D | symlink.c | 38 #include <linux/xattr.h> 44 #include "xattr.h"
|
H A D | squashfs_fs_i.h | 29 u64 xattr; member in struct:squashfs_inode_info
|
H A D | super.c | 40 #include <linux/xattr.h> 47 #include "xattr.h" 232 /* Allocate and read xattr id lookup table */ squashfs_fill_super() 236 ERROR("unable to read xattr id index table\n"); squashfs_fill_super()
|
H A D | namei.c | 60 #include <linux/xattr.h> 66 #include "xattr.h"
|
/linux-4.4.14/fs/ceph/ |
H A D | xattr.c | 9 #include <linux/xattr.h> 17 struct ceph_inode_xattr *xattr); 346 struct ceph_inode_xattr *xattr = NULL; __set_xattr() local 353 xattr = rb_entry(parent, struct ceph_inode_xattr, node); __set_xattr() 354 c = strncmp(name, xattr->name, min(name_len, xattr->name_len)); __set_xattr() 360 if (name_len == xattr->name_len) __set_xattr() 362 else if (name_len < xattr->name_len) __set_xattr() 367 xattr = NULL; __set_xattr() 372 if (xattr && (flags & XATTR_CREATE)) __set_xattr() 374 else if (!xattr && (flags & XATTR_REPLACE)) __set_xattr() 382 if (xattr) __set_xattr() 383 __remove_xattr(ci, xattr); __set_xattr() 389 if (!xattr) { __set_xattr() 391 xattr = *newxattr; __set_xattr() 392 xattr->name = name; __set_xattr() 393 xattr->name_len = name_len; __set_xattr() 394 xattr->should_free_name = update_xattr; __set_xattr() 401 if (xattr->should_free_val) __set_xattr() 402 kfree((void *)xattr->val); __set_xattr() 406 name = xattr->name; __set_xattr() 408 ci->i_xattrs.names_size -= xattr->name_len; __set_xattr() 409 ci->i_xattrs.vals_size -= xattr->val_len; __set_xattr() 414 xattr->val = val; __set_xattr() 416 xattr->val = ""; __set_xattr() 418 xattr->val_len = val_len; __set_xattr() 419 xattr->dirty = update_xattr; __set_xattr() 420 xattr->should_free_val = (val && update_xattr); __set_xattr() 423 rb_link_node(&xattr->node, parent, p); __set_xattr() 424 rb_insert_color(&xattr->node, &ci->i_xattrs.index); __set_xattr() 428 dout("__set_xattr_val added %llx.%llx xattr %p %s=%.*s\n", __set_xattr() 429 ceph_vinop(&ci->vfs_inode), xattr, name, val_len, val); __set_xattr() 439 struct ceph_inode_xattr *xattr = NULL; __get_xattr() local 446 xattr = rb_entry(parent, struct ceph_inode_xattr, node); __get_xattr() 447 c = strncmp(name, xattr->name, xattr->name_len); __get_xattr() 448 if (c == 0 && name_len > xattr->name_len) __get_xattr() 456 xattr->val_len, xattr->val); __get_xattr() 457 return xattr; __get_xattr() 466 static void __free_xattr(struct ceph_inode_xattr *xattr) __free_xattr() argument 468 BUG_ON(!xattr); __free_xattr() 470 if (xattr->should_free_name) __free_xattr() 471 kfree((void *)xattr->name); __free_xattr() 472 if (xattr->should_free_val) __free_xattr() 473 kfree((void *)xattr->val); __free_xattr() 475 kfree(xattr); __free_xattr() 479 struct ceph_inode_xattr *xattr) __remove_xattr() 481 if (!xattr) __remove_xattr() 484 rb_erase(&xattr->node, &ci->i_xattrs.index); __remove_xattr() 486 if (xattr->should_free_name) __remove_xattr() 487 kfree((void *)xattr->name); __remove_xattr() 488 if (xattr->should_free_val) __remove_xattr() 489 kfree((void *)xattr->val); __remove_xattr() 491 ci->i_xattrs.names_size -= xattr->name_len; __remove_xattr() 492 ci->i_xattrs.vals_size -= xattr->val_len; __remove_xattr() 494 kfree(xattr); __remove_xattr() 503 struct ceph_inode_xattr *xattr; __remove_xattr_by_name() local 507 xattr = __get_xattr(ci, name); __remove_xattr_by_name() 508 err = __remove_xattr(ci, xattr); __remove_xattr_by_name() 516 struct ceph_inode_xattr *xattr = NULL; __copy_xattr_names() local 522 xattr = rb_entry(p, struct ceph_inode_xattr, node); __copy_xattr_names() 523 memcpy(dest, xattr->name, xattr->name_len); __copy_xattr_names() 524 dest[xattr->name_len] = '\0'; __copy_xattr_names() 526 dout("dest=%s %p (%s) (%d/%d)\n", dest, xattr, xattr->name, __copy_xattr_names() 527 xattr->name_len, ci->i_xattrs.names_size); __copy_xattr_names() 529 dest += xattr->name_len + 1; __copy_xattr_names() 539 struct ceph_inode_xattr *xattr = NULL; __ceph_destroy_xattrs() local 546 xattr = rb_entry(p, struct ceph_inode_xattr, node); __ceph_destroy_xattrs() 550 xattr->name_len, xattr->name); __ceph_destroy_xattrs() 553 __free_xattr(xattr); __ceph_destroy_xattrs() 587 /* updated internal xattr rb tree */ 655 * 4 bytes for the length, and additional 4 bytes per each xattr name, __get_required_blob_size() 678 struct ceph_inode_xattr *xattr = NULL; __ceph_build_xattrs_blob() local 692 xattr = rb_entry(p, struct ceph_inode_xattr, node); __ceph_build_xattrs_blob() 694 ceph_encode_32(&dest, xattr->name_len); __ceph_build_xattrs_blob() 695 memcpy(dest, xattr->name, xattr->name_len); __ceph_build_xattrs_blob() 696 dest += xattr->name_len; __ceph_build_xattrs_blob() 697 ceph_encode_32(&dest, xattr->val_len); __ceph_build_xattrs_blob() 698 memcpy(dest, xattr->val, xattr->val_len); __ceph_build_xattrs_blob() 699 dest += xattr->val_len; __ceph_build_xattrs_blob() 722 struct ceph_inode_xattr *xattr; __ceph_getxattr() local 728 /* let's see if a virtual xattr was requested */ __ceph_getxattr() 754 xattr = __get_xattr(ci, name); __ceph_getxattr() 755 if (!xattr) __ceph_getxattr() 759 if (size && size < xattr->val_len) __ceph_getxattr() 762 err = xattr->val_len; __ceph_getxattr() 766 memcpy(value, xattr->val, xattr->val_len); __ceph_getxattr() 810 * Start with virtual dir xattr names (if any) (including ceph_listxattr() 827 /* virtual xattr names, too */ ceph_listxattr() 897 dout("xattr.ver (before): %lld\n", ci->i_xattrs.version); ceph_sync_setxattr() 900 dout("xattr.ver (after): %lld\n", ci->i_xattrs.version); ceph_sync_setxattr() 923 struct ceph_inode_xattr *xattr = NULL; __ceph_setxattr() local 938 /* preallocate memory for xattr name, value, index node */ __ceph_setxattr() 950 xattr = kmalloc(sizeof(struct ceph_inode_xattr), GFP_NOFS); __ceph_setxattr() 951 if (!xattr) __ceph_setxattr() 996 flags, value ? 1 : -1, &xattr); __ceph_setxattr() 1023 kfree(xattr); __ceph_setxattr() 478 __remove_xattr(struct ceph_inode_info *ci, struct ceph_inode_xattr *xattr) __remove_xattr() argument
|
H A D | Makefile | 8 export.o caps.o snap.o xattr.o \
|
H A D | acl.c | 24 #include <linux/xattr.h>
|
H A D | mds_client.h | 212 /* data payload is used for xattr ops */
|
H A D | inode.c | 23 * setattr, etc.), xattr helpers, and helpers for assimilating 691 * prealloc xattr data, if it looks like we'll need it. only fill_inode() 693 * bytes are the xattr count). fill_inode() 698 pr_err("fill_inode ENOMEM xattr blob %d bytes\n", fill_inode()
|
H A D | super.h | 255 * (still encoded) xattr blob. we avoid the overhead of parsing 795 /* xattr.c */
|
/linux-4.4.14/fs/f2fs/ |
H A D | Makefile | 7 f2fs-$(CONFIG_F2FS_FS_XATTR) += xattr.o
|
H A D | xattr.c | 2 * fs/f2fs/xattr.c 7 * Portions of this code from linux/fs/ext2/xattr.c 14 * xattr consolidation Copyright (c) 2004 James Morris <jmorris@redhat.com>, 26 #include "xattr.h" 159 static int f2fs_initxattrs(struct inode *inode, const struct xattr *xattr_array, f2fs_initxattrs() 162 const struct xattr *xattr; f2fs_initxattrs() local 165 for (xattr = xattr_array; xattr->name != NULL; xattr++) { f2fs_initxattrs() 167 xattr->name, xattr->value, f2fs_initxattrs() 168 xattr->value_len, (struct page *)page, 0); f2fs_initxattrs() 280 /* read from inline xattr */ read_all_xattrs() 297 /* read from xattr node block */ read_all_xattrs() 341 /* write to inline xattr */ write_all_xattrs() 361 /* no need to use xattr node block */ write_all_xattrs() 369 /* write to xattr node block */ write_all_xattrs()
|
H A D | xattr.h | 2 * fs/f2fs/xattr.h 7 * Portions of this code from linux/fs/ext2/xattr.h 21 #include <linux/xattr.h> 85 * We use inline xattrs space + 1 block for xattr.
|
H A D | crypto_policy.c | 8 * to support f2fs-specific xattr APIs. 19 #include "xattr.h"
|
H A D | crypto_key.c | 21 #include "xattr.h"
|
H A D | recovery.c | 366 /* step 1: recover xattr */ do_recover_data() 371 * Deprecated; xattr blocks should be found from cold log. do_recover_data()
|
H A D | acl.c | 17 #include "xattr.h"
|
H A D | crypto.c | 47 #include "xattr.h"
|
H A D | crypto_fname.c | 36 #include "xattr.h"
|
H A D | node.c | 1720 /* 1: invalidate the previous xattr nid */ recover_xattr_data() 1732 /* 2: allocate new xattr nid */ recover_xattr_data() 1742 /* 3: update xattr blkaddr */ recover_xattr_data()
|
H A D | dir.c | 16 #include "xattr.h"
|
H A D | namei.c | 21 #include "xattr.h"
|
H A D | f2fs.h | 436 unsigned long long xattr_ver; /* cp version of xattr modification */ 1407 FI_INLINE_XATTR, /* used for inline xattr */
|
H A D | super.c | 31 #include "xattr.h"
|
H A D | file.c | 28 #include "xattr.h"
|
/linux-4.4.14/fs/gfs2/ |
H A D | Makefile | 3 gfs2-y := acl.o bmap.o dir.o xattr.o glock.o \
|
H A D | acl.c | 15 #include <linux/xattr.h> 23 #include "xattr.h"
|
H A D | inode.c | 16 #include <linux/xattr.h> 29 #include "xattr.h" 430 * gfs2_init_xattr - Initialise an xattr block for a new inode 433 * This sets up an empty xattr block for a new inode, ready to 555 static int gfs2_initxattrs(struct inode *inode, const struct xattr *xattr_array, gfs2_initxattrs() 558 const struct xattr *xattr; gfs2_initxattrs() local 561 for (xattr = xattr_array; xattr->name != NULL; xattr++) { gfs2_initxattrs() 562 err = __gfs2_xattr_set(inode, xattr->name, xattr->value, gfs2_initxattrs() 563 xattr->value_len, 0, gfs2_initxattrs()
|
H A D | xattr.c | 14 #include <linux/xattr.h> 22 #include "xattr.h" 452 * ea_iter_unstuffed - copies the unstuffed xattr data to/from the
|
H A D | super.c | 47 #include "xattr.h"
|
/linux-4.4.14/fs/jfs/ |
H A D | Makefile | 12 resize.o xattr.o ioctl.o
|
H A D | xattr.c | 22 #include <linux/xattr.h> 73 int flag; /* Indicates what storage xattr points to */ 74 int max_size; /* largest xattr that fits in current buffer */ 75 dxd_t new_ea; /* dxd to replace ea when modifying xattr */ 77 struct jfs_ea_list *xattr; /* buffer containing ea list */ member in struct:ea_buffer 460 ea_buf->xattr = NULL; ea_get() 467 ea_buf->xattr = (struct jfs_ea_list *) ji->i_inline_ea; ea_get() 479 ea_buf->xattr = (struct jfs_ea_list *) ji->i_inline_ea; ea_get() 498 ea_buf->xattr = kmalloc(size, GFP_KERNEL); ea_get() 499 if (ea_buf->xattr == NULL) ea_get() 509 if ((rc = ea_read(inode, ea_buf->xattr))) { ea_get() 510 kfree(ea_buf->xattr); ea_get() 511 ea_buf->xattr = NULL; ea_get() 547 ea_buf->xattr = ea_buf->mp->data; ea_get() 552 if ((rc = ea_read(inode, ea_buf->xattr))) { ea_get() 567 ea_buf->xattr = ea_buf->mp->data; ea_get() 572 if (EALIST_SIZE(ea_buf->xattr) != ea_size) { ea_get() 575 ea_buf->xattr, ea_size, 1); ea_get() 594 kfree(ea_buf->xattr); ea_release() 623 rc = ea_write(inode, ea_buf->xattr, new_size, &ea_buf->new_ea); ea_put() 624 kfree(ea_buf->xattr); ea_put() 629 /* ->xattr must point to original ea's metapage */ ea_put() 630 rc = ea_write(inode, ea_buf->xattr, new_size, &ea_buf->new_ea); ea_put() 731 ealist = (struct jfs_ea_list *) ea_buf.xattr; __jfs_setxattr() 908 ealist = (struct jfs_ea_list *) ea_buf.xattr; __jfs_getxattr() 998 ealist = (struct jfs_ea_list *) ea_buf.xattr; jfs_listxattr() 1073 static int jfs_initxattrs(struct inode *inode, const struct xattr *xattr_array, jfs_initxattrs() 1076 const struct xattr *xattr; jfs_initxattrs() local 1081 for (xattr = xattr_array; xattr->name != NULL; xattr++) { jfs_initxattrs() 1083 strlen(xattr->name) + 1, GFP_NOFS); jfs_initxattrs() 1089 strcpy(name + XATTR_SECURITY_PREFIX_LEN, xattr->name); jfs_initxattrs() 1092 xattr->value, xattr->value_len, 0); jfs_initxattrs()
|
/linux-4.4.14/include/linux/ |
H A D | evm.h | 12 #include <linux/xattr.h> 34 const struct xattr *xattr_array, 35 struct xattr *evm); 93 const struct xattr *xattr_array, evm_inode_init_security() 94 struct xattr *evm) evm_inode_init_security()
|
H A D | xattr.h | 2 File: linux/xattr.h 17 #include <uapi/linux/xattr.h> 37 struct xattr { struct 85 struct simple_xattr *xattr, *node; simple_xattrs_free() local 87 list_for_each_entry_safe(xattr, node, &xattrs->head, list) { list_for_each_entry_safe() 88 kfree(xattr->name); list_for_each_entry_safe() 89 kfree(xattr); list_for_each_entry_safe()
|
H A D | shmem_fs.h | 9 #include <linux/xattr.h>
|
H A D | f2fs_fs.h | 185 #define F2FS_INLINE_XATTR 0x01 /* file inline xattr flag */ 211 __le32 i_xattr_nid; /* nid to save xattr */
|
H A D | security.h | 53 struct xattr; 151 const struct xattr *xattr_array, void *fs_data);
|
/linux-4.4.14/drivers/staging/most/hdm-dim2/ |
H A D | dim2_sysfs.c | 55 struct bus_attr *xattr = container_of(attr, struct bus_attr, attr); bus_kobj_attr_show() local 57 if (!xattr->show) bus_kobj_attr_show() 60 return xattr->show(bus, buf); bus_kobj_attr_show() 69 struct bus_attr *xattr = container_of(attr, struct bus_attr, attr); bus_kobj_attr_store() local 71 if (!xattr->store) bus_kobj_attr_store() 74 ret = xattr->store(bus, buf, count); bus_kobj_attr_store()
|
/linux-4.4.14/fs/nfs/ |
H A D | nfs.h | 20 const struct xattr_handler **xattr; /* NFS xattr handlers */ member in struct:nfs_subversion
|
H A D | nfs3super.c | 17 .xattr = nfs3_xattr_handlers,
|
H A D | nfs4super.c | 72 .xattr = nfs4_xattr_handlers,
|
H A D | nfs3proc.c | 21 #include <linux/xattr.h>
|
/linux-4.4.14/fs/cifs/ |
H A D | Makefile | 8 cifs_unicode.o nterr.o xattr.o cifsencrypt.o \
|
H A D | xattr.c | 2 * fs/cifs/xattr.c 25 #include <linux/xattr.h> 73 cifs_dbg(FYI, "Null xattr names not supported\n"); cifs_removexattr() 77 "illegal xattr request %s (only user namespace supported)\n", cifs_removexattr() 133 /* return dos attributes as pseudo xattr */ cifs_setxattr() 146 cifs_dbg(FYI, "Null xattr names not supported\n"); cifs_setxattr() 219 cifs_dbg(FYI, "illegal xattr request %s (only user namespace supported)\n", cifs_setxattr() 268 /* return dos attributes as pseudo xattr */ cifs_getxattr() 271 cifs_dbg(FYI, "Null xattr names not supported\n"); cifs_getxattr() 347 cifs_dbg(FYI, "Trusted xattr namespace not supported yet\n"); cifs_getxattr() 350 cifs_dbg(FYI, "Security xattr namespace not supported yet\n"); cifs_getxattr() 353 "illegal xattr request %s (only user namespace supported)\n", cifs_getxattr() 407 /* return dos attributes as pseudo xattr */ cifs_listxattr()
|
H A D | cifs_fs_sb.h | 29 #define CIFS_MOUNT_NO_XATTR 0x10 /* if set - disable xattr support */
|
H A D | cifs_debug.c | 141 seq_printf(m, " xattr"); cifs_debug_data_proc_show()
|
/linux-4.4.14/fs/ocfs2/ |
H A D | xattr.h | 4 * xattr.h 22 #include <linux/xattr.h> 73 * xattrs can live inside an inode, as part of an external xattr block, 74 * or inside an xattr bucket, which is the leaf of a tree rooted in an 75 * xattr block. Some of the xattr calls, especially the value setting
|
H A D | Makefile | 43 xattr.o \
|
H A D | ocfs2_fs.h | 1026 * Note that it can be stored in inode, one block or one xattr bucket. 1029 __le32 xe_name_hash; /* hash value of xattr prefix+suffix. */ 1031 local xattr storage(inode, xattr block or 1032 xattr bucket). */ 1033 __u8 xe_name_len; /* xattr name len, doesn't include prefix. */ 1037 __le64 xe_value_size; /* real xattr value length. */ 1041 * On disk structure for xattr header. 1044 * the local xattr storage. 1049 local xattr storage. */ 1051 xattr. */ 1054 __le16 xh_num_buckets; /* Number of xattr buckets 1060 used for xattr 1064 struct ocfs2_xattr_entry xh_entries[0]; /* xattr entry list. */ 1068 * On disk structure for xattr value root. 1070 * When an xattr's value is large enough, it is stored in an external 1071 * b-tree like file data. The xattr value root points to this structure. 1074 /*00*/ __le32 xr_clusters; /* clusters covered by xattr value. */ 1081 * On disk structure for xattr tree root. 1087 /*00*/ __le32 xt_clusters; /* clusters covered by xattr. */ 1104 * On disk structure for xattr block. 1116 real xattr or a xattr tree. */ 1120 xattr block belongs to. Only 1124 struct ocfs2_xattr_header xb_header; /* xattr header if this 1125 block contains xattr */ 1126 struct ocfs2_xattr_tree_root xb_root;/* xattr tree root if this 1127 block cotains xattr
|
H A D | xattr.c | 4 * xattr.c 9 * Lots of code in this file is copy from linux/fs/ext3/xattr.c. 56 #include "xattr.h" 193 * Describes an xattr entry location. This is a memory structure 197 /* This xattr belongs to this inode */ 403 /* Read the xattr bucket at xb_blkno */ ocfs2_read_xattr_bucket() 599 * The max space of security xattr taken inline is ocfs2_calc_security_init() 613 /* reserve clusters for xattr value which will be set in B tree*/ ocfs2_calc_security_init() 659 * The max space of security xattr taken inline is ocfs2_calc_xattr_init() 661 * The max space of acl xattr taken inline is ocfs2_calc_xattr_init() 664 * xattr bucket, otherwise reserve one metadata block ocfs2_calc_xattr_init() 668 * directory contents and force an external xattr block. ocfs2_calc_xattr_init() 1944 * ocfs2_xa_prepare_entry() or ocfs2_xa_remove(), we may have an xattr 1962 * This way, the xattr block we store in the journal will be consistent. 1976 "Partial truncate while %s xattr %.*s. Leaking " ocfs2_xa_cleanup_value_truncate() 1983 "Unable to allocate an external value for xattr " ocfs2_xa_cleanup_value_truncate() 1991 "Unable to grow xattr %.*s safely. %u new clusters " ocfs2_xa_cleanup_value_truncate() 2099 * Prepares loc->xl_entry to receive the new xattr. This includes 2222 * little. Errors are going to leave the xattr header in a ocfs2_xa_set() 2301 * In xattr remove, if it is stored outside and refcounted, we may have 2985 /* Check whether the new xattr can be inserted into the inode. */ ocfs2_xattr_can_be_in_inode() 3089 * delete a xattr doesn't need metadata and cluster allocation. ocfs2_calc_xattr_set_need() 3107 * In xattr set, we always try to set the xe in inode first, ocfs2_calc_xattr_set_need() 3109 * one will be removed from the xattr block, and this xattr ocfs2_calc_xattr_set_need() 3110 * will be inserted into inode as a new xattr in inode. ocfs2_calc_xattr_set_need() 3179 * If there is already an xattr tree, good, we can calculate ocfs2_calc_xattr_set_need() 3196 * new xattr block. ocfs2_calc_xattr_set_need() 3467 * In extreme situation, may need xattr bucket when ocfs2_xattr_set_handle() 3662 * Find the xattr extent rec which may contains name_hash. 3663 * e_cpos will be the first name hash of the xattr rec. 3692 "Inode %lu has non zero tree depth in xattr tree block %llu\n", ocfs2_xattr_get_rec() 3709 ret = ocfs2_error(inode->i_sb, "Inode %lu has bad extent record (%u, %u, 0) in xattr\n", ocfs2_xattr_get_rec() 3785 * Find the specified xattr entry in a series of buckets. 3790 * Return the buffer_head this xattr should reside in. And if the xattr's 3863 /* the searched xattr should reside in this bucket if exists. */ ocfs2_xattr_bucket_find() 3876 * When the xattr's hash value is in the gap of 2 buckets, we will ocfs2_xattr_bucket_find() 4164 * and all the xattr entries will be moved to the new bucket. 4231 * After we move xattr from block to index btree, we have to 4234 * When the entry is in xattr block, xattr_bh indicates the storage place. 4236 * real place of the xattr. 4366 * defrag a xattr bucket if we find that the bucket has some 4487 * to insert our xattr. If the bucket move places the target in the new 4718 * In the new bucket, We just move the xattr entry to the beginning ocfs2_divide_xattr_bucket() 4783 * Copy xattr from one bucket to another bucket. 4982 /* Move half of the xattr in start_blk to the next bucket. */ ocfs2_divide_xattr_cluster() 4989 * contiguous in ocfs2 xattr tree. 4998 * The problem is how much xattr should we move to the new one and when should 5066 * Add a new cluster for xattr storage. 5231 /* Move half of the xattr in target_blkno to the next bucket. */ ocfs2_extend_xattr_bucket() 5243 * Add new xattr bucket in an extent record and adjust the buckets 5334 * Truncate the specified xe_off entry in xattr bucket. 5499 * check whether the xattr bucket is filled up with the same hash value. 5500 * If we want to insert the xattr with the same hash, return -ENOSPC. 5501 * If we want to insert a xattr with different hash value, go ahead 5516 mlog(ML_ERROR, "Too much hash collision in xattr bucket %llu, " ocfs2_check_xattr_bucket_collision() 5704 * Whenever we modify a xattr value root in the bucket(e.g, CoW 5732 * Special action we need if the xattr value is refcounted. 5734 * 1. If the xattr is refcounted, lock the tree. 5735 * 2. CoW the xattr if we are setting the new value and the value 5743 * CoW the whole xattr value. 5828 * CoW the whole xattr. So there shouldn't be a xattr with ocfs2_prepare_refcount_xattr() 5842 * If we are deleting the xattr or the new size will be stored inside, ocfs2_prepare_refcount_xattr() 5843 * cool, leave it there, the xattr truncate process will remove them ocfs2_prepare_refcount_xattr() 6019 * For a given xattr bucket, refcount all the entries which 6168 * Store the information we need in xattr reflink. 6183 * Given a xattr header and xe offset, 6185 * xattr in inode, block and xattr tree have different implementaions. 6196 * Calculate all the xattr value root metadata stored in this xattr header and 6198 * We use get_xattr_value_root so that all types of xattr container can use it. 6243 /* Used by xattr inode and block to return the right xv and buffer_head. */ ocfs2_get_xattr_value_root() 6266 * It is only used for inline xattr and xattr block. 6314 * Given a xattr header, reflink all the xattrs in this container. 6318 * Before we call this function, the caller has memcpy the xattr in 6322 * be reflinked or not. If not, remove it from the new xattr header. 6386 * For the xattr which has l_tree_depth = 0, all the extent ocfs2_reflink_xattr_header() 6391 * For the xattr which has l_tree_depth > 0, we need ocfs2_reflink_xattr_header() 6597 /* One more credits in case we need to add xattr flags in new inode. */ ocfs2_reflink_xattr_block() 6729 * Given a xattr extent rec starting from blkno and having len clusters, 6780 /* count in the xattr tree change. */ ocfs2_lock_reflink_xattr_rec_allocators() 6861 * our xattr tree we also set the xh_num_bucket for the new ocfs2_reflink_xattr_bucket() 6955 * so that the xattr tree looks the same as the original one ocfs2_reflink_xattr_buckets() 6979 * Create the same xattr extent record in the new inode's xattr tree. 7035 * Create reflinked xattr buckets. 7265 static int ocfs2_initxattrs(struct inode *inode, const struct xattr *xattr_array, ocfs2_initxattrs() 7268 const struct xattr *xattr; ocfs2_initxattrs() local 7271 for (xattr = xattr_array; xattr->name != NULL; xattr++) { ocfs2_initxattrs() 7273 xattr->name, xattr->value, ocfs2_initxattrs() 7274 xattr->value_len, XATTR_CREATE); ocfs2_initxattrs() 7286 /* check whether ocfs2 support feature xattr */ ocfs2_init_security_get()
|
H A D | symlink.c | 52 #include "xattr.h"
|
H A D | acl.c | 37 #include "xattr.h" 41 * Convert from xattr value to acl struct. 85 * Convert acl struct to xattr value.
|
H A D | ocfs2_ioctl.h | 219 * - refcount,xattr cases.
|
H A D | extent_map.c | 568 "Inode %lu has non zero tree depth in xattr leaf block %llu\n", ocfs2_xattr_get_clusters() 587 "Inode %lu has bad extent record (%u, %u, 0) in xattr\n", ocfs2_xattr_get_clusters()
|
H A D | journal.h | 431 * alloc group descriptor + mkdir/symlink blocks + dir blocks + xattr 490 * dinode, xattr block */
|
H A D | ocfs2.h | 276 OCFS2_MOUNT_NOUSERXATTR = 1 << 6, /* No user xattr */ 453 /* used to protect metaecc calculation check of xattr. */
|
H A D | alloc.h | 31 * For xattr tree leaf, we limit the leaf byte size to be 64K.
|
H A D | namei.c | 63 #include "xattr.h" 326 /* get security xattr */ ocfs2_mknod() 337 /* calculate meta data/clusters for setting security and acl xattr */ ocfs2_mknod() 1876 /* get security xattr */ ocfs2_symlink() 1887 /* calculate meta data/clusters for setting security xattr */ ocfs2_symlink()
|
H A D | move_extents.c | 787 * - xattr extents. __ocfs2_move_extents_range()
|
H A D | uptodate.c | 611 /* Called when we remove xattr clusters from an inode. */ ocfs2_remove_xattr_clusters_from_cache()
|
H A D | refcounttree.c | 34 #include "xattr.h" 928 * 3) Check whether we have inline xattr stored outside, if yes, exit. 3535 * Given a xattr value root, calculate the most meta/credits we need for 3620 * Do CoW for xattr.
|
H A D | ocfs2_trace.h | 1737 /* Trace events for fs/ocfs2/xattr.c. */ 1855 /* End of trace events for fs/ocfs2/xattr.c. */
|
/linux-4.4.14/fs/reiserfs/ |
H A D | xattr.h | 64 * We may have to create up to 3 objects: xattr root, xattr dir, xattr file. 66 * xattr root: We cache it. If it's not cached, we may need to create it. 67 * xattr dir: If anything has been loaded for this inode, we can set a flag 69 * xattr file: Since we don't cache xattrs, we can't tell. We always include
|
H A D | xattr_trusted.c | 6 #include <linux/xattr.h> 7 #include "xattr.h"
|
H A D | xattr_user.c | 5 #include <linux/xattr.h> 6 #include "xattr.h"
|
H A D | Makefile | 10 item_ops.o ioctl.o xattr.o lock.o
|
H A D | xattr.c | 2 * linux/fs/reiserfs/xattr.c 32 * Directory components (xattr root, xattr dir) are protectd by their i_mutex. 45 #include <linux/xattr.h> 46 #include "xattr.h" 79 * We use I_MUTEX_CHILD here to silence lockdep. It's safe because xattr 212 reiserfs_error(dentry->d_sb, "xattr-20003", fill_with_dentries() 213 "Corrupted directory: xattr %pd listed but " fill_with_dentries() 244 /* Skip out, an xattr has no xattrs associated with it */ reiserfs_for_each_xattr() 286 * between the xattr root's i_mutex and the journal lock. reiserfs_for_each_xattr() 324 /* This is the xattr dir, handle specially. */ delete_one_xattr() 701 "Invalid magic for xattr (%s) " reiserfs_xattr_get() 721 "Invalid hash for xattr (%s) associated " reiserfs_xattr_get() 735 * In order to implement different sets of xattr operations for each xattr 736 * prefix with the generic xattr API, a filesystem should create a 740 * The generic_fooxattr() functions will use this list to dispatch xattr 748 /* This is the implementation for the xattr plugin infrastructure */ 842 if (!handler) /* Unsupported xattr name */ listxattr_filler() 922 reiserfs_info(dentry->d_sb, "Created %s - reserved for xattr " create_privroot()
|
H A D | xattr_security.c | 5 #include <linux/xattr.h> 7 #include "xattr.h"
|
H A D | xattr_acl.c | 7 #include <linux/xattr.h> 10 #include "xattr.h" 29 * Pessimism: We can't assume that anything from the xattr root up reiserfs_set_acl()
|
H A D | file.c | 8 #include "xattr.h"
|
H A D | namei.c | 19 #include "xattr.h" 1662 * symlink operations.. same as page_symlink_inode_operations, with xattr 1678 * special file operations.. just xattr/acl stuff
|
/linux-4.4.14/fs/btrfs/ |
H A D | xattr.c | 23 #include <linux/xattr.h> 29 #include "xattr.h" 49 /* lookup the xattr by name */ __btrfs_getxattr() 76 * where name is the xattr name, so security.foo, and data is the __btrfs_getxattr() 77 * content of the xattr. data_ptr points to the location in memory __btrfs_getxattr() 123 * Do a lookup first (read-only btrfs_search_slot), and return if xattr do_setxattr() 125 * path - we can't race with a concurrent xattr delete, because the VFS do_setxattr() 148 * matches our target xattr, so lets check. do_setxattr() 173 * any point in time we have either the old or the new xattr do_setxattr() 220 * Insert, and we had space for the xattr, so path->slots[0] is do_setxattr() 221 * where our xattr dir_item is and btrfs_insert_xattr_item() do_setxattr() 277 * first xattr that we find and walk forward btrfs_listxattr() 488 const struct xattr *xattr_array, void *fs_info) btrfs_initxattrs() 490 const struct xattr *xattr; btrfs_initxattrs() local 495 for (xattr = xattr_array; xattr->name != NULL; xattr++) { btrfs_initxattrs() 497 strlen(xattr->name) + 1, GFP_NOFS); btrfs_initxattrs() 503 strcpy(name + XATTR_SECURITY_PREFIX_LEN, xattr->name); btrfs_initxattrs() 505 xattr->value, xattr->value_len, 0); btrfs_initxattrs()
|
H A D | acl.c | 21 #include <linux/xattr.h> 29 #include "xattr.h"
|
H A D | xattr.h | 22 #include <linux/xattr.h>
|
H A D | props.c | 24 #include "xattr.h"
|
H A D | dir-item.c | 65 * xattrs work a lot like directories, this inserts an xattr item
|
H A D | inode.c | 36 #include <linux/xattr.h> 52 #include "xattr.h" 3564 /* we found an xattr, assume we've got an acl */ acls_after_inode_item() 3574 * we found a key greater than an xattr key, there can't acls_after_inode_item() 3592 /* we hit the end of the leaf before we found an xattr or acls_after_inode_item() 3593 * something larger than an xattr. We have to assume the inode acls_after_inode_item() 6358 * 1 for xattr if selinux is on btrfs_mknod() 6429 * 1 for xattr if selinux is on btrfs_create() 6577 * 1 for xattr if selinux is on btrfs_mkdir() 9666 * 1 item for xattr if selinux is on btrfs_symlink()
|
/linux-4.4.14/fs/ |
H A D | xattr.c | 2 File: fs/xattr.c 13 #include <linux/xattr.h> 81 * @name - xattr name to set 678 * In order to implement different sets of xattr operations for each xattr 679 * prefix with the generic xattr API, a filesystem should create a 683 * The generic_fooxattr() functions will use this list to dispatch xattr 799 * The get and set xattr handler operations are called with the remainder of 804 * Note: the list xattr handler operation when called from the vfs is passed a 818 * Allocate new xattr and copy in the value; but leave the name to callers. 840 * xattr GET operation for in-memory/pseudo filesystems 845 struct simple_xattr *xattr; simple_xattr_get() local 849 list_for_each_entry(xattr, &xattrs->head, list) { simple_xattr_get() 850 if (strcmp(name, xattr->name)) simple_xattr_get() 853 ret = xattr->size; simple_xattr_get() 855 if (size < xattr->size) simple_xattr_get() 858 memcpy(buffer, xattr->value, xattr->size); simple_xattr_get() 869 struct simple_xattr *xattr; __simple_xattr_set() local 887 list_for_each_entry(xattr, &xattrs->head, list) { __simple_xattr_set() 888 if (!strcmp(name, xattr->name)) { __simple_xattr_set() 890 xattr = new_xattr; __simple_xattr_set() 893 list_replace(&xattr->list, &new_xattr->list); __simple_xattr_set() 895 list_del(&xattr->list); __simple_xattr_set() 901 xattr = new_xattr; __simple_xattr_set() 905 xattr = NULL; __simple_xattr_set() 909 if (xattr) { __simple_xattr_set() 910 kfree(xattr->name); __simple_xattr_set() 911 kfree(xattr); __simple_xattr_set() 918 * simple_xattr_set - xattr SET operation for in-memory/pseudo filesystems 921 * @value: value of the new xattr. If %NULL, will remove the attribute 922 * @size: size of the new xattr 925 * %XATTR_CREATE is set, the xattr shouldn't exist already; otherwise fails 926 * with -EEXIST. If %XATTR_REPLACE is set, the xattr should exist; 940 * xattr REMOVE operation for in-memory/pseudo filesystems 953 * xattr LIST operation for in-memory/pseudo filesystems 959 struct simple_xattr *xattr; simple_xattr_list() local 963 list_for_each_entry(xattr, &xattrs->head, list) { simple_xattr_list() 967 if (!trusted && xattr_is_trusted(xattr->name)) simple_xattr_list() 970 len = strlen(xattr->name) + 1; simple_xattr_list() 977 memcpy(buffer, xattr->name, len); simple_xattr_list()
|
H A D | Makefile | 12 seq_file.o xattr.o libfs.o fs-writeback.o \
|
H A D | posix_acl.c | 20 #include <linux/xattr.h>
|
/linux-4.4.14/security/integrity/ima/ |
H A D | ima_appraise.c | 14 #include <linux/xattr.h> 56 iint->ima_hash->xattr.sha1.type = IMA_XATTR_DIGEST; ima_fix_xattr() 59 iint->ima_hash->xattr.ng.type = IMA_XATTR_DIGEST_NG; ima_fix_xattr() 60 iint->ima_hash->xattr.ng.algo = algo; ima_fix_xattr() 63 &iint->ima_hash->xattr.data[offset], ima_fix_xattr() 64 (sizeof(iint->ima_hash->xattr) - offset) + ima_fix_xattr() 181 * Assuming success, compare the xattr hash with the collected measurement. 234 /* xattr length may be longer. md5 hash in previous ima_appraise_measurement() 235 version occupied 20 bytes in xattr, instead of 16 ima_appraise_measurement()
|
H A D | ima_api.c | 19 #include <linux/xattr.h>
|
H A D | ima_main.c | 25 #include <linux/xattr.h>
|
/linux-4.4.14/fs/ubifs/ |
H A D | xattr.c | 32 * directories. Indeed, any inode (but of course not xattr inodes) may have a 61 #include <linux/xattr.h> 123 ubifs_err(c, "cannot add one more xattr name to inode %lu, total names length would become %d, max. is %d", create_xattr() 145 ui->xattr = 1; create_xattr() 230 * It is important to write the host inode after the xattr inode change_xattr() 299 if (ubifs_inode(inode)->xattr) iget_xattr() 340 /* We are asked not to create the xattr */ setxattr() 348 /* We are asked not to replace the xattr */ setxattr() 370 dbg_gen("xattr '%s', host ino %lu ('%pd'), size %zd", ubifs_setxattr() 387 dbg_gen("xattr '%s', ino %lu ('%pd'), buf size %zd", name, ubifs_getxattr() 420 ubifs_err(c, "buffer size %zd, xattr len %d", ubifs_getxattr() 551 dbg_gen("xattr '%s', ino %lu ('%pd')", name, ubifs_removexattr() 591 static int init_xattrs(struct inode *inode, const struct xattr *xattr_array, init_xattrs() 594 const struct xattr *xattr; init_xattrs() local 598 for (xattr = xattr_array; xattr->name != NULL; xattr++) { init_xattrs() 600 strlen(xattr->name) + 1, GFP_NOFS); init_xattrs() 606 strcpy(name + XATTR_SECURITY_PREFIX_LEN, xattr->name); init_xattrs() 607 err = setxattr(inode, name, xattr->value, xattr->value_len, 0); init_xattrs()
|
H A D | super.c | 89 if (ui->xattr && !S_ISREG(inode->i_mode)) validate_inode() 156 ui->xattr = (ui->flags & UBIFS_XATTR_FL) ? 1 : 0; ubifs_iget() 167 if (ui->xattr) { ubifs_iget() 300 ubifs_assert(!ui->xattr); ubifs_write_inode() 344 if (ui->xattr) ubifs_evict_inode()
|
H A D | debug.c | 262 pr_err("\txattr %u\n", ui->xattr); ubifs_dump_inode() 263 pr_err("\tbulk_read %u\n", ui->xattr); ubifs_dump_inode() 1746 * @references: how many directory/xattr entries refer this inode (calculated 2198 ubifs_err(c, "inode %lu has xattr size %u, but calculated size is %lld", check_inodes() 2210 ubifs_err(c, "inode %lu has xattr names' size %u, but calculated names' size is %lld", check_inodes() 2259 * o makes sure inode nlink, size, xattr size/count are correct (for all
|
H A D | ubifs.h | 359 * @xattr: non-zero if this is an extended attribute inode 413 unsigned int xattr:1; member in struct:ubifs_inode 1758 /* xattr.c */
|
/linux-4.4.14/fs/hfs/ |
H A D | attr.c | 6 * Export hfs data via xattr 11 #include <linux/xattr.h>
|
/linux-4.4.14/include/uapi/linux/ |
H A D | xattr.h | 2 File: linux/xattr.h
|
H A D | libc-compat.h | 142 /* Definitions for xattr.h */ 182 /* Definitions for xattr.h */
|
/linux-4.4.14/fs/ecryptfs/ |
H A D | mmap.c | 157 printk(KERN_ERR "%s: Error reading xattr " ecryptfs_copy_up_encrypted_with_header() 212 "from the xattr into the header; rc = " ecryptfs_readpage() 318 "the xattr into the header; rc " ecryptfs_write_begin() 428 "No support for setting xattr in lower filesystem\n"); ecryptfs_write_inode_size_to_xattr() 435 "inode size to xattr\n"); ecryptfs_write_inode_size_to_xattr() 450 "to lower file xattr; rc = [%d]\n", rc); ecryptfs_write_inode_size_to_xattr()
|
H A D | crypto.c | 1364 * @page_virt: The vitual address into which to read the xattr data 1384 "xattr from the lower file; return value = " ecryptfs_read_xattr_region() 1416 * the xattr region of the file, or some other repostory that is 1419 * and from the xattr region. 1456 "file header region or xattr region, inode %lu\n", ecryptfs_read_metadata() 1466 "file xattr region either, inode %lu\n", ecryptfs_read_metadata() 1477 "xattr support enabled. eCryptfs will not treat " ecryptfs_read_metadata()
|
H A D | inode.c | 35 #include <linux/xattr.h>
|
/linux-4.4.14/security/integrity/ |
H A D | integrity.h | 87 } xattr; member in struct:ima_digest_data 95 uint8_t type; /* xattr type */
|
H A D | digsig.c | 55 /* v1 API expect signature without xattr type */ integrity_digsig_verify()
|
/linux-4.4.14/fs/xfs/ |
H A D | xfs_iops.c | 43 #include <linux/xattr.h> 64 const struct xattr *xattr_array, xfs_initxattrs() 67 const struct xattr *xattr; xfs_initxattrs() local 71 for (xattr = xattr_array; xattr->name != NULL; xattr++) { xfs_initxattrs() 72 error = xfs_attr_set(ip, xattr->name, xattr->value, xfs_initxattrs() 73 xattr->value_len, ATTR_SECURE); xfs_initxattrs()
|
H A D | xfs_acl.c | 28 #include <linux/xattr.h>
|
H A D | xfs_xattr.c | 31 #include <linux/xattr.h>
|
/linux-4.4.14/fs/kernfs/ |
H A D | kernfs-internal.h | 17 #include <linux/xattr.h>
|
H A D | inode.c | 16 #include <linux/xattr.h>
|
/linux-4.4.14/security/ |
H A D | commoncap.c | 24 #include <linux/xattr.h> 643 * cap_inode_setxattr - Determine whether an xattr may be altered 645 * @name: The name of the xattr to be changed 646 * @value: The value that the xattr will be changed to 650 * Determine whether an xattr may be altered or set on an inode, returning 0 if 673 * cap_inode_removexattr - Determine whether an xattr may be removed 675 * @name: The name of the xattr to be changed 677 * Determine whether an xattr may be removed from an inode, returning 0 if
|
H A D | security.c | 370 struct xattr new_xattrs[MAX_LSM_EVM_XATTR + 1]; security_inode_init_security() 371 struct xattr *lsm_xattr, *evm_xattr, *xattr; security_inode_init_security() local 395 for (xattr = new_xattrs; xattr->value != NULL; xattr++) security_inode_init_security() 396 kfree(xattr->value); security_inode_init_security()
|
/linux-4.4.14/fs/overlayfs/ |
H A D | dir.c | 12 #include <linux/xattr.h> 416 * CAP_SYS_ADMIN for setting opaque xattr ovl_create_or_link() 669 * CAP_SYS_ADMIN for setting xattr on whiteout, opaque dir ovl_do_remove() 800 * CAP_SYS_ADMIN for setting xattr on whiteout, opaque dir ovl_rename2()
|
H A D | copy_up.c | 14 #include <linux/xattr.h>
|
H A D | inode.c | 12 #include <linux/xattr.h>
|
H A D | readdir.c | 14 #include <linux/xattr.h>
|
H A D | super.c | 13 #include <linux/xattr.h>
|
/linux-4.4.14/net/ceph/ |
H A D | osd_client.c | 300 ceph_osd_data_release(&op->xattr.osd_data); osd_req_op_data_release() 579 op->xattr.name_len = payload_len; osd_req_op_xattr_init() 582 op->xattr.value_len = size; osd_req_op_xattr_init() 586 op->xattr.cmp_op = cmp_op; osd_req_op_xattr_init() 587 op->xattr.cmp_mode = cmp_mode; osd_req_op_xattr_init() 589 ceph_osd_data_pagelist_init(&op->xattr.osd_data, pagelist); osd_req_op_xattr_init() 732 dst->xattr.name_len = cpu_to_le32(src->xattr.name_len); osd_req_encode_op() 733 dst->xattr.value_len = cpu_to_le32(src->xattr.value_len); osd_req_encode_op() 734 dst->xattr.cmp_op = src->xattr.cmp_op; osd_req_encode_op() 735 dst->xattr.cmp_mode = src->xattr.cmp_mode; osd_req_encode_op() 736 osd_data = &src->xattr.osd_data; osd_req_encode_op()
|
/linux-4.4.14/mm/ |
H A D | shmem.c | 45 #include <linux/xattr.h> 1485 static int shmem_initxattrs(struct inode *, const struct xattr *, void *); 2514 * Superblocks without xattr inode operations may get some security.* xattr 2524 const struct xattr *xattr_array, shmem_initxattrs() 2528 const struct xattr *xattr; shmem_initxattrs() local 2532 for (xattr = xattr_array; xattr->name != NULL; xattr++) { shmem_initxattrs() 2533 new_xattr = simple_xattr_alloc(xattr->value, xattr->value_len); shmem_initxattrs() 2537 len = strlen(xattr->name) + 1; shmem_initxattrs() 2548 xattr->name, len); shmem_initxattrs()
|
/linux-4.4.14/include/linux/ceph/ |
H A D | rados.h | 402 /* xattr comparison */ 438 } __attribute__ ((packed)) xattr; member in union:ceph_osd_op::__anon12174
|
H A D | ceph_fs.h | 462 __le64 xattr_version; /* version for xattr blob */ 475 /* followed by frag array, symlink string, dir layout, xattr blob */
|
H A D | osd_client.h | 95 } xattr; member in union:ceph_osd_req_op::__anon12160
|
/linux-4.4.14/security/selinux/include/ |
H A D | security.h | 203 #define SECURITY_FS_USE_XATTR 1 /* use xattr */
|
/linux-4.4.14/fs/fscache/ |
H A D | cookie.c | 44 * request a cookie to represent an object (index, datafile, xattr, etc)
|
/linux-4.4.14/include/uapi/asm-generic/ |
H A D | unistd.h | 43 /* fs/xattr.c */
|
/linux-4.4.14/security/smack/ |
H A D | smack_lsm.c | 21 #include <linux/xattr.h> 3460 * Get the value from the xattr. smack_d_instantiate() 3471 * No xattr support means, alas, no SMACK label. smack_d_instantiate() 3479 * Get the dentry for xattr. smack_d_instantiate() 4500 * smack_ismaclabel - check if xattr @name references a smack MAC label 4501 * @name: Full xattr name to check.
|
/linux-4.4.14/security/selinux/ |
H A D | hooks.c | 33 #include <linux/xattr.h> 339 "uses xattr", 434 /* Make sure that the xattr handler exists and that no sb_finish_set_opts() 438 assigned xattr values to the filesystem. */ sb_finish_set_opts() 441 "xattr support\n", sb->s_id, sb->s_type->name); sb_finish_set_opts() 449 "%s) has no security xattr handler\n", sb_finish_set_opts() 1324 /* Need a dentry, since the xattr API requires one. inode_doinit_with_dentry()
|
/linux-4.4.14/drivers/staging/lustre/lustre/include/lustre/ |
H A D | lustre_idl.h | 303 * xattr. 1698 #define OBD_MD_FLXATTR (0x0000001000000000ULL) /* xattr */ 1699 #define OBD_MD_FLXATTRLS (0x0000002000000000ULL) /* xattr list */ 1700 #define OBD_MD_FLXATTRRM (0x0000004000000000ULL) /* xattr remove */ 1708 * under lock; for xattr
|
H A D | lustre_user.h | 164 * been moved to a dedicated xattr
|
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/ |
H A D | lprocfs_status.c | 58 "xattr",
|