On Wed, 23 Sep 2026, Itai Handler wrote:
> If there is a specific correctness, security, or architectural reason
> why dm-crypt should retain 4096 bytes as an absolute limit even on
> systems with larger PAGE_SIZE, I would be very interested to understand
> it. Otherwise, I think the question is better evaluated independently
> of whether QCE is a suitable accelerator.
>
> Thanks,
> Itai
There is one important problem - the SSDs and HDDs today have 4k hardware
sector size.
If you use 64k encryption sectors, the disk may write only a part of the
64k sector during power failure. When you attempt to read and decrypt such
a sector, you get garbage.
This is not a problem for XTS or ECB, but it is problem for CBC and most
other encryption modes. So, the patch should reject using larger sectors
with cipher modes other than XTS and ECB.
Mikulas