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]
Message-ID: <CAJ3xEMhAJ+p2qG4oeYe4kpGnzRPj30F886nuSyTjNSuiN1u4qw@mail.gmail.com>
Date:	Sat, 29 Aug 2015 23:18:46 -0700
From:	Or Gerlitz <gerlitz.or@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	clsoto@...ux.vnet.ibm.com, David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>,
	Or Gerlitz <ogerlitz@...lanox.com>, brking@...ux.vnet.ibm.com,
	Amir Vadai <amirv@...lanox.com>,
	Muhammad Mahajna <muhammadm@...lanox.com>
Subject: Re: [PATCH net-next] net/mlx4_en: Fix IPv6 csum calculation

On Fri, Aug 28, 2015 at 12:46 PM, Joe Perches <joe@...ches.com> wrote:
> On Fri, 2015-08-28 at 14:28 -0500, clsoto@...ux.vnet.ibm.com wrote:
>> From: Carol L Soto <clsoto@...ux.vnet.ibm.com>
>>
>> Seeing this message with mlx4_eni with IPv6: hw csum failure
>>
>> Changing IPv6 csum calculation to be based on OFED 2.4 code.
>> When calculate IPv6 csum based also on source and destination
>> addresses.
> []
>> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> []
>> +static __wsum csum_ipv6_magic_nofold(const struct in6_addr *saddr,
>> +                                  const struct in6_addr *daddr,
>> +                                  __u32 len, unsigned short proto)
>> +{
>> +     __wsum res = 0;
>> +
>> +     res = csum_add(res, saddr->in6_u.u6_addr32[0]);
>> +     res = csum_add(res, saddr->in6_u.u6_addr32[1]);
>> +     res = csum_add(res, saddr->in6_u.u6_addr32[2]);
>> +     res = csum_add(res, saddr->in6_u.u6_addr32[3]);
>> +     res = csum_add(res, daddr->in6_u.u6_addr32[0]);
>> +     res = csum_add(res, daddr->in6_u.u6_addr32[1]);
>> +     res = csum_add(res, daddr->in6_u.u6_addr32[2]);
>> +     res = csum_add(res, daddr->in6_u.u6_addr32[3]);
>> +     res = csum_add(res, len);
>> +     res = csum_add(res, htonl(proto));
>
> You should try running sparse on this code.


Yep, if I remember correct, the patch is still under internal review
with making sparse/smatch happy on it being a pending comment.


Or.
--
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