FROMGIT: dm verity: log the hash algorithm implementation
authorEric Biggers <ebiggers@google.com>
Thu, 6 Dec 2018 04:54:13 +0000 (20:54 -0800)
committerEric Biggers <ebiggers@google.com>
Tue, 18 Dec 2018 18:56:31 +0000 (10:56 -0800)
commit3c9f3e0b62ad4ceca4da628708597f4cb0afe54a
treeaf017eccd8499da0f0c26eea5d634f76efb9d4d1
parent505d1d4021d07216ad55406ff599cb1d6038cc78
FROMGIT: dm verity: log the hash algorithm implementation

Log the hash algorithm's driver name when a dm-verity target is created.
This will help people determine whether the expected implementation is
being used.  It can make an enormous difference; e.g., SHA-256 on ARM
can be 8x faster with the crypto extensions than without.  It can also
be useful to know if an implementation using an external crypto
accelerator is being used instead of a software implementation.

Example message:

[   35.281945] device-mapper: verity: sha256 using implementation "sha256-ce"

We've already found the similar message in fs/crypto/keyinfo.c to be
very useful.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
(cherry picked from commit 8ec60e93af574f0426dba17208084f1038b1418e
 https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next)
Test: Verified that the message is logged when dm-verity is used.
Change-Id: I78a803eb8e0db8eda7b4790cd338d5d5555486e5
Signed-off-by: Eric Biggers <ebiggers@google.com>
drivers/md/dm-verity-target.c