mirror of https://gitee.com/openkylin/linux.git
dm crypt: print device name in integrity error message
This message should better identify the DM device with the integrity failure. Signed-off-by: Milan Broz <gmazyland@gmail.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
7a1cd7238f
commit
f710126cfc
|
@ -1147,9 +1147,11 @@ static int crypt_convert_block_aead(struct crypt_config *cc,
|
||||||
r = crypto_aead_decrypt(req);
|
r = crypto_aead_decrypt(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == -EBADMSG)
|
if (r == -EBADMSG) {
|
||||||
DMERR_LIMIT("INTEGRITY AEAD ERROR, sector %llu",
|
char b[BDEVNAME_SIZE];
|
||||||
|
DMERR_LIMIT("%s: INTEGRITY AEAD ERROR, sector %llu", bio_devname(ctx->bio_in, b),
|
||||||
(unsigned long long)le64_to_cpu(*sector));
|
(unsigned long long)le64_to_cpu(*sector));
|
||||||
|
}
|
||||||
|
|
||||||
if (!r && cc->iv_gen_ops && cc->iv_gen_ops->post)
|
if (!r && cc->iv_gen_ops && cc->iv_gen_ops->post)
|
||||||
r = cc->iv_gen_ops->post(cc, org_iv, dmreq);
|
r = cc->iv_gen_ops->post(cc, org_iv, dmreq);
|
||||||
|
@ -1793,7 +1795,8 @@ static void kcryptd_async_done(struct crypto_async_request *async_req,
|
||||||
error = cc->iv_gen_ops->post(cc, org_iv_of_dmreq(cc, dmreq), dmreq);
|
error = cc->iv_gen_ops->post(cc, org_iv_of_dmreq(cc, dmreq), dmreq);
|
||||||
|
|
||||||
if (error == -EBADMSG) {
|
if (error == -EBADMSG) {
|
||||||
DMERR_LIMIT("INTEGRITY AEAD ERROR, sector %llu",
|
char b[BDEVNAME_SIZE];
|
||||||
|
DMERR_LIMIT("%s: INTEGRITY AEAD ERROR, sector %llu", bio_devname(ctx->bio_in, b),
|
||||||
(unsigned long long)le64_to_cpu(*org_sector_of_dmreq(cc, dmreq)));
|
(unsigned long long)le64_to_cpu(*org_sector_of_dmreq(cc, dmreq)));
|
||||||
io->error = BLK_STS_PROTECTION;
|
io->error = BLK_STS_PROTECTION;
|
||||||
} else if (error < 0)
|
} else if (error < 0)
|
||||||
|
|
Loading…
Reference in New Issue