Re: veritysetup forward error correction failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 18/07/2019 10:50 am, Milan Broz wrote:
> On 18/07/2019 11:10, Tom Eccles wrote:
>> tomeccles@debian-kernel-builder:~$ uname -a
>> Linux debian-kernel-builder 4.19.37-verity #6 SMP Wed Jul 17 11:47:38 BST
>> 2019 x86_64 GNU/Linux
>> tomeccles@debian-kernel-builder:~$ /usr/sbin/veritysetup --version
>> veritysetup 2.1.0
>>
>> I can also reproduce the issue using veritysetup 2.2.0-rc1.
> 
> Thanks, the best would be to create an issue for cryptsetup project
> https://gitlab.com/cryptsetup/cryptsetup/issues
> (if it is a kernel bug we report it there later)

I will create an issue once I have images to reproduce the issue.

> I will need some images (or a script to create them) to reproduce it though.

I am working on this. I want to see if I can reproduce with much smaller
filesystem images so as to keep things simple (currently I am using a full
Debian rootfs).

> ...
> 
>> Also, I tried adding some prints to veritysetup and the kernel, and on the
>> face of it, the reed-solomon state (struct rs in veritysetup) seems the
>> same.
> 
> AFAIK the kernel and our code was based on the same libfec code,
> so I am quite interested to find out what is the difference here.

See struct rs_codec in kernel/include/linux/rslib.h:34
/**
 * struct rs_codec - rs codec data
 *
 * @mm:		Bits per symbol
 * @nn:		Symbols per block (= (1<<mm)-1)
 * @alpha_to:	log lookup table
 * @index_of:	Antilog lookup table
 * @genpoly:	Generator polynomial
 * @nroots:	Number of generator roots = number of parity symbols
 * @fcr:	First consecutive root, index form
 * @prim:	Primitive element, index form
 * @iprim:	prim-th root of 1, index form
 * @gfpoly:	The primitive generator polynominal
 * @gffunc:	Function to generate the field, if non-canonical representation
 * @users:	Users of this structure
 * @list:	List entry for the rs codec list
*/
struct rs_codec {
	int		mm;
	int		nn;
	uint16_t	*alpha_to;
	uint16_t	*index_of;
	uint16_t	*genpoly;
	int		nroots;
	int		fcr;
	int		prim;
	int		iprim;
	int		gfpoly;
	int		(*gffunc)(int);
	int		users;
	struct list_head list;
};

Vs cryptsetup/lib/verity/rs.h:34
/* Reed-Solomon codec control block */
struct rs {
	int mm;          /* Bits per symbol */
	int nn;          /* Symbols per block (= (1<<mm)-1) */
	data_t *alpha_to;/* log lookup table */
	data_t *index_of;/* Antilog lookup table */
	data_t *genpoly; /* Generator polynomial */
	int nroots;      /* Number of generator roots = number of parity symbols */
	int fcr;         /* First consecutive root, index form */
	int prim;        /* Primitive element, index form */
	int iprim;       /* prim-th root of 1, index form */
	int pad;         /* Padding bytes in shortened block */
};

> (It can take some time though, the userspace FEC image verification was
> implemented by my student that already disappeared from the project :)
> 
> Thanks,
> Milan
> 
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt



[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux