Discussion:
[dm-crypt] Unlocking LUKS2 with Sector Size > 512B
Martin Hicks
2018-11-26 17:51:42 UTC
Permalink
Hi,

I'm just experimenting with LUKS2 on my embedded target, and I suspect that
the large sector size will help my encryption performance. (IMX6UL, so the
NXP "caam" offload engine)

With my freshly build cryptsetup 2.0.5 I'm able to unlock and use LUKS1 as
well as LUKS2 (512B sector) volumes, but if I create a LUKS2 with 4096B
sector_size I get:

[ 2807.225522] device-mapper: table: 254:0: crypt: Invalid feature arguments
device-mapper: reload ioctl on failed: Invalid argument
Requested sector_size option is not supported.

This machine is running a 4.9.80 kernel. Is this a missing LVM2
(devmapper) feature, or a missing feature in the kernel?

Thanks,
mh
--
Martin Hicks P.Eng. | ***@bork.org
Bork Consulting Inc. | +1 (613) 266-2296
Michael Kjörling
2018-11-26 18:25:23 UTC
Permalink
Post by Martin Hicks
[ 2807.225522] device-mapper: table: 254:0: crypt: Invalid feature arguments
device-mapper: reload ioctl on failed: Invalid argument
Requested sector_size option is not supported.
Might this be related to what Milan Broz discussed the other day
in Message-ID: <aa607562-adad-6aaa-1865-***@gmail.com>?
--
Michael Kjörling • https://michael.kjorling.se • ***@kjorling.se
“The most dangerous thought that you can have as a creative person
is to think you know what you’re doing.” (Bret Victor)
Martin Hicks
2018-11-26 18:57:48 UTC
Permalink
Thanks Michael,

I couldn't figure out how to find that Message-ID, but I did a bit more
digging.

I found that dm-crypt.c in the kernel has an internal version number that
cryptsetup can query.
The required support for sector_size turns up in kernel v4.12

mh
Post by Martin Hicks
Post by Martin Hicks
[ 2807.225522] device-mapper: table: 254:0: crypt: Invalid feature
arguments
Post by Martin Hicks
device-mapper: reload ioctl on failed: Invalid argument
Requested sector_size option is not supported.
Might this be related to what Milan Broz discussed the other day
--
“The most dangerous thought that you can have as a creative person
is to think you know what you’re doing.” (Bret Victor)
_______________________________________________
dm-crypt mailing list
https://www.saout.de/mailman/listinfo/dm-crypt
--
Martin Hicks P.Eng. | ***@bork.org
Bork Consulting Inc. | +1 (613) 266-2296
Loading...