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, 26 Apr 2007 00:38:35 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jdelvare@...e.de
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH RFC] Clean up sk_buff walkers

From: Jean Delvare <jdelvare@...e.de>
Date: Tue, 20 Mar 2007 08:19:49 +0100

> Hi all,
> 
> I noticed recently that, in skb_checksum(), "offset" and "start" are
> essentially the same thing and have the same value throughout the
> function, despite being computed differently. Using a single variable
> allows some cleanups and makes the skb_checksum() function smaller,
> more readable, and presumably marginally faster.
> 
> We appear to have many other "sk_buff walker" functions built on the
> exact same model, so the cleanup applies to them, too. Here is a list
> of the functions I found to be affected:
> 
> net/appletalk/ddp.c:atalk_sum_skb()
> net/core/datagram.c:skb_copy_datagram_iovec()
> net/core/datagram.c:skb_copy_and_csum_datagram()
> net/core/skbuff.c:skb_copy_bits()
> net/core/skbuff.c:skb_store_bits()
> net/core/skbuff.c:skb_checksum()
> net/core/skbuff.c:skb_copy_and_csum_bit()
> net/core/user_dma.c:dma_skb_copy_datagram_iovec()
> net/xfrm/xfrm_algo.c:skb_icv_walk()
> net/xfrm/xfrm_algo.c:skb_to_sgvec()
> 
> OTOH, I admit I'm a bit surprised, the cleanup is rather obvious so I'm
> really wondering if I am missing something. Can anyone please comment
> on this?
> 
> Signed-off-by: Jean Delvare <jdelvare@...e.de>

Looks good, I've applied this patch.

Thanks!
-
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