lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 21 Mar 2009 23:05:01 +0300
From:	Ilya Yanok <yanok@...raft.com>
To:	"H. Peter Anvin" <h.peter.anvin@...el.com>
CC:	Dan Williams <dan.j.williams@...el.com>,
	linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
	neilb@...e.de, maciej.sosnowski@...el.com,
	Yuri Tikhonov <yur@...raft.com>
Subject: Re: [PATCH 06/13] async_tx: add support for asynchronous GF multiplication

Hi H.Peter,

H. Peter Anvin wrote:
>> + * @scfs: array of source coefficients used in GF-multiplication
>>     
>
> Array of source coefficients?  Are you doing a vector-vector
> multiplication here?
>
> Given this code:
>
>   
>> 	for (d = 0; d < len; d++) {
>> +		wq = wp = ptrs[0][d];
>> +		for (z = 1; z < src_cnt; z++) {
>> +			wd = ptrs[z][d];
>> +			wp ^= wd;
>> +			wq ^= raid6_gfmul[scfs[z]][wd];
>> +		}
>>     
>
> ... it kinds of looks like that.
>
> This is really quite expensive!  The whole point of the restore code
> that exists is that we never do a two-dimensional lookup, instead
> caching a pointer to the multiplication table that we intend to use,
> because the RAID-6 code only ever contains scalar-vector multiplications.
>
> I really don't get this, and I think it's broken.
>   
Well, that code IS broken. Dan, I think you over-optimized this part.
Have you ever tested this code path? Besides of doing two-dimensional
lookup at every step it ignores scfs[0] completely so if it's not equal
to one the result is wrong.

Regards, Ilya.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ