Lines Matching defs:xattr
18 #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.
223 * Instead of retrieving the requested xattr, for performance, calculate
224 * the hmac using the requested xattr value. Don't alloc/free memory for
225 * each xattr, but attempt to re-use the previously allocated memory.
235 struct xattr_list *xattr;
255 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) {
258 if (strcmp(xattr->name, XATTR_NAME_IMA) == 0)
265 if (type != EVM_XATTR_PORTABLE_DIGSIG && !xattr->enabled)
269 && !strcmp(xattr->name, req_xattr_name)) {
281 size = vfs_getxattr_alloc(&nop_mnt_idmap, dentry, xattr->name,
291 xattr->name, NULL, 0);
293 pr_debug("file %s: xattr %s size mismatch (kernel: %d, user: %d)\n",
294 dentry->d_name.name, xattr->name, size,
302 dump_security_xattr(xattr->name, xattr_value, xattr_size);
369 * Calculate the hmac and update security.evm xattr
382 * Don't permit any transformation of the EVM xattr if the signature
395 data.hdr.xattr.sha1.type = EVM_XATTR_HMAC;
398 &data.hdr.xattr.data[1],
406 int evm_init_hmac(struct inode *inode, const struct xattr *xattrs,
410 const struct xattr *xattr;
421 for (xattr = xattrs; xattr->name; xattr++) {
423 XATTR_SECURITY_PREFIX_LEN, xattr->name) != 0)
426 crypto_shash_update(desc, xattr->value,
427 xattr->value_len);