diff options
author | Christoph Hellwig <hch@lst.de> | 2024-06-13 10:48:14 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-06-14 10:20:06 -0600 |
commit | 63e649594ab19cc3122a2d0fc2c94b19932f0b19 (patch) | |
tree | 9a4b1ed3274aedcf43d34f5d590f9a0526d3939e /drivers/md/dm-crypt.c | |
parent | 799af947ed132956d6de6d77a5bc053817ccb06b (diff) |
dm-integrity: use the nop integrity profile
Use the block layer built-in nop profile instead of duplicating it.
Tested by:
$ dd if=/dev/urandom of=key.bin bs=512 count=1
$ cryptsetup luksFormat -q --type luks2 --integrity hmac-sha256 \
--integrity-no-wipe /dev/nvme0n1 key.bin
$ cryptsetup luksOpen /dev/nvme0n1 luks-integrity --key-file key.bin
and then doing mkfs.xfs and simple I/O on the mount file system.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240613084839.1044015-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm-crypt.c')
-rw-r--r-- | drivers/md/dm-crypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 1b7a97cc3779..1dfc462f29cd 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1176,8 +1176,8 @@ static int crypt_integrity_ctr(struct crypt_config *cc, struct dm_target *ti) struct blk_integrity *bi = blk_get_integrity(cc->dev->bdev->bd_disk); struct mapped_device *md = dm_table_get_md(ti->table); - /* From now we require underlying device with our integrity profile */ - if (!bi || strcasecmp(bi->profile->name, "DM-DIF-EXT-TAG")) { + /* We require an underlying device with non-PI metadata */ + if (!bi || strcmp(bi->profile->name, "nop")) { ti->error = "Integrity profile not supported."; return -EINVAL; } |