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] [day] [month] [year] [list]
Date:	Thu, 7 Jan 2016 03:43:13 +0100
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	Tom Herbert <tom@...bertland.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	Kernel Team <kernel-team@...com>, tglx@...utronix.de,
	mingo@...hat.com, hpa@...or.com, x86@...nel.org
Subject: Re: [PATCH v2 net-next] net: Implement fast csum_partial for x86_64

On 07.01.2016 03:36, Tom Herbert wrote:
> On Wed, Jan 6, 2016 at 5:52 PM, Hannes Frederic Sowa
> <hannes@...essinduktion.org> wrote:
>> Hi Tom,
>>
>> On 05.01.2016 19:41, Tom Herbert wrote:
>>>
>>> --- /dev/null
>>> +++ b/arch/x86/lib/csum-partial_64.S
>>> @@ -0,0 +1,147 @@
>>> +/* Copyright 2016 Tom Herbert <tom@...bertland.com>
>>> + *
>>> + * Checksum partial calculation
>>> + *
>>> + * __wsum csum_partial(const void *buff, int len, __wsum sum)
>>> + *
>>> + * Computes the checksum of a memory block at buff, length len,
>>> + * and adds in "sum" (32-bit)
>>> + *
>>> + * Returns a 32-bit number suitable for feeding into itself
>>> + * or csum_tcpudp_magic
>>> + *
>>> + * Register usage:
>>> + *   %rdi: argument 1, buff
>>> + *   %rsi: argument 2, length
>>> + *   %rdx: argument 3, add in value
>>
>>
>> I think you forgot to carry-add-in the %rdx register.
>>
>> The assembly code replaces do_csum but not csum_partial.
>>
> First instruction is: movl    %edx, %eax      /* Initialize with
> initial sum argument */

Ups, sorry. I only grepped through the source. Meanwhile my test also 
uses non-zero sums and shows that it is fine.

Bye,
Hannes


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ