Lines Matching refs:xattr
19 #include <linux/xattr.h>
135 struct xattr_list *xattr;
142 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) {
143 error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0);
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 */
286 struct xattr_list *xattr;
289 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) {
290 if (!all_xattrs && !xattr->enabled)
293 if ((strlen(xattr->name) == namelen)
294 && (strncmp(req_xattr_name, xattr->name, namelen) == 0)) {
299 xattr->name + XATTR_SECURITY_PREFIX_LEN,
320 * evm_read_protected_xattrs - read EVM protected xattr names, lengths, values
322 * @buffer: buffer xattr names, lengths or values are copied to
327 * Read protected xattr names (separated by |), lengths (u32) or values for a
336 struct xattr_list *xattr;
339 list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) {
341 xattr->name, NULL, 0);
349 size = strlen(xattr->name) + 1;
354 memcpy(buffer + total_size, xattr->name, size);
370 d_backing_inode(dentry), xattr->name,
388 * evm_verifyxattr - verify the integrity of the requested xattr
389 * @dentry: object of the verify xattr
390 * @xattr_name: requested xattr
391 * @xattr_value: requested xattr value
392 * @xattr_value_len: requested xattr value length
396 * security.evm xattr. For performance, use the xattr value and length
399 * Returns the xattr integrity status.
439 * evm_xattr_change - check if passed xattr value differs from current value
442 * @xattr_name: requested xattr
443 * @xattr_value: requested xattr value
444 * @xattr_value_len: requested xattr value length
446 * Check if passed xattr value differs from current value.
448 * Returns 1 if passed xattr value differs from current value, 0 otherwise.
480 * The posix xattr acls are 'system' prefixed, which normally would not
481 * affect security.evm. An interesting side affect of writing posix xattr
483 * For posix xattr acls only, permit security.evm, even if it currently
563 * Before allowing the 'security.evm' protected xattr to be updated,
650 * and 'security.evm' xattr updated, unless the existing 'security.evm' is
758 * evm_inode_post_removexattr - update 'security.evm' after removing the xattr
762 * Update the HMAC stored in 'security.evm' to reflect removal of the xattr.
871 const struct qstr *qstr, struct xattr *xattrs,
875 struct xattr *xattr, *evm_xattr;
887 for (xattr = xattrs; xattr->name; xattr++) {
888 if (evm_protected_xattr(xattr->name))
892 /* EVM xattr not needed. */
898 * Array terminator (xattr name = NULL) must be the first non-filled
899 * xattr slot.
901 WARN_ONCE(evm_xattr != xattr,