Re: [dm-devel] [RFC] Reed-Solomon Code: Update no_eras to the actual number of errors

2020-06-26 Thread Ferdinand Blomqvist
Hi, On 2020-06-25 14:46:11, Aiden Leong wrote: BTW: I do believe these functions should be split into a function family. It's really hard to call them correctly and hard to debug as well. I don't think the functions should be split up. Most probably it is the documentation that should be

Re: [dm-devel] [RFC] Reed-Solomon Code: Update no_eras to the actual number of errors

2020-06-25 Thread Aiden Leong
Thanks a lot. I will send you another version soon. BTW: I do believe these functions should be split into a function family. It's really hard to call them correctly and hard to debug as well. Aiden Leong -- From:Kees Cook Send

[dm-devel] [RFC] Reed-Solomon Code: Update no_eras to the actual number of errors

2020-06-25 Thread Aiden Leong
Corr and eras_pos are updated to actual correction pattern and erasure positions, but no_eras is not. When this library is used to recover lost bytes, we normally memset the lost trunk of bytes to zero as a placeholder. Unfortunately, if the lost byte is zero, b[i] is zero too. Without correct

Re: [dm-devel] [RFC] Reed-Solomon Code: Update no_eras to the actual number of errors

2020-06-24 Thread Joe Perches
On Wed, 2020-06-24 at 22:35 -0700, Kees Cook wrote: > On Wed, Jun 24, 2020 at 09:10:53PM -0700, Aiden Leong wrote: > > Corr and eras_pos are updated to actual correction pattern and erasure > > positions, but no_eras is not. [] > > @@ -312,14 +313,21 @@ > >

Re: [dm-devel] [RFC] Reed-Solomon Code: Update no_eras to the actual number of errors

2020-06-24 Thread Kees Cook
On Wed, Jun 24, 2020 at 09:10:53PM -0700, Aiden Leong wrote: > Corr and eras_pos are updated to actual correction pattern and erasure > positions, but no_eras is not. > > When this library is used to recover lost bytes, we normally memset the > lost trunk of bytes to zero as a placeholder.