[PATCH -next] evm: call dump_security_xattr() in all cases to remove code duplication

Mimi Zohar zohar at linux.ibm.com
Sun Jan 29 16:15:47 UTC 2023


> @@ -254,15 +264,9 @@ static int evm_calc_hmac_or_hash(struct dentry *dentry,
>  			if (is_ima)
>  				ima_present = true;
>  
> -			if (req_xattr_value_len < 64)
> -				pr_debug("%s: (%zu) [%*phN]\n", req_xattr_name,
> -					 req_xattr_value_len,
> -					 (int)req_xattr_value_len,
> -					 req_xattr_value);
> -			else
> -				dump_security_xattr(req_xattr_name,
> -						    req_xattr_value,
> -						    req_xattr_value_len);
> +			dump_security_xattr(req_xattr_name,
> +					    req_xattr_value,
> +					    req_xattr_value_len);
>  			continue;
>  		}
>  		size = vfs_getxattr_alloc(&nop_mnt_idmap, dentry, xattr->name,

Hm, this patch doesn't apply properly.

Mimi




More information about the Linux-security-module-archive mailing list