Re: dmcrypt - possible corruption of data with kernel 6.7.0-rc5-1-mainline

Milan Broz <[email protected]> Wed, 20 Dec 2023 09:57:50 +0100
Newsgroups dev.linux.lists.cryptsetup
Message-ID <[email protected]>
Hi,

please send this to dm-devel list, DM maintainers are usually not here.
(see link in here https://subspace.kernel.org/lists.linux.dev.html)

However, you will need to add more info and simple reproducer, otherwise
nobody can actually check what's going on here.

Cryptsetup version here does not play any role, as it only configures
kernel dm-crypt and rest happens in kernel.

Milan

On 12/20/23 09:26, Richard Clauß wrote:
> Hello,
> 
> I don't require assistance, but hope someone involved with dmcrypt can
> make use of the following hint:
> 
> I believe dmcrypt corrupts my data on arch linux with mainline kernel
> 6.7.0-rc5-1-mainline, while it doesn't on stable kernel 6.6.7-arch1-1.
> 
> My system has a btrfs mounted at /, which contains a file test.img,
> which is used as block device for dmcrypt. The decrypted block device is
> then mounted at /mnt/test
> 
> When I rsync ~150GB of data to /mnt/test the btrfs inside shows many
> write_io_errs on kernel 6.7.0-rc5-1-mainline. The outside btrfs / shows
> no errors. An extended smart selftest of the underlying nvme also
> revealed no errors.
> 
> When I do the same with the stable kernel, no errors show up. It is
> probably only my system, but maybe someone wants to try that out. I
> created the image file completely new each time.
> 
> 
> # I used the following commands to set everything up:
> dd of=/test.img bs=300G count=0 seek=1
> cryptsetup -y luksFormat /test.img
> sudo cryptsetup open /test.img image
> sudo mkfs.btrfs /dev/mapper/image
> sudo mkdir /mnt/test
> sudo mount /dev/mapper/image /mnt/test
> 
> sudo chown -R user:user /mnt/test
> 
> cryptsetup is at: 2.6.1-3
> 
> Regards
> 
> Richard