Re: [PATCH] fsverity: simplify fsverity_get_digest()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2022-11-28 at 20:51 -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> Instead of looking up the algorithm by name in hash_algo_name[] to get
> its hash_algo ID, just store the hash_algo ID in the fsverity_hash_alg
> struct.  Verify at build time that every fsverity_hash_alg has a valid
> hash_algo ID with matching digest size.
> 
> Remove an unnecessary memset() of the whole digest array to 0 before the
> digest is copied into it.
> 
> Finally, remove the pr_debug statement.  There is already a pr_debug for
> the fsverity digest when the file is opened.
> 
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>

Agreed, much simpler. 
   Reviewed-by: Mimi Zohar <zohar@xxxxxxxxxxxxx>




[Index of Archives]     [linux Cryptography]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]

  Powered by Linux