]> git.baikalelectronics.ru Git - kernel.git/commit
dm integrity: fail early if required HMAC key is not available
authorMilan Broz <gmazyland@gmail.com>
Tue, 13 Feb 2018 13:50:50 +0000 (14:50 +0100)
committerMike Snitzer <snitzer@redhat.com>
Tue, 3 Apr 2018 19:04:16 +0000 (15:04 -0400)
commit24bc8db6a15924c095afb3c0f57a8b30b3974543
tree8176b07c744f1d532d629cb9a5b20159f16357cd
parent508c5ea91f29c30c477d0ce082ecad7e1ced360e
dm integrity: fail early if required HMAC key is not available

Since crypto API commit 72c6089ec0c ("crypto: hash - prevent using keyed
hashes without setting key") dm-integrity cannot use keyed algorithms
without the key being set.

The dm-integrity recognizes this too late (during use of HMAC), so it
allows creation and formatting of superblock, but the device is in fact
unusable.

Fix it by detecting the key requirement in integrity table constructor.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-integrity.c