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: <Z0-Huo1aqf2OAtJi@xiberoa>
Date: Tue, 3 Dec 2024 14:35:38 -0800
From: Frederik Deweerdt <deweerdt.lkml@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: David Howells <dhowells@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net] splice: do not checksum AF_UNIX sockets

On Tue, Dec 03, 2024 at 01:48:56PM -0800, Cong Wang wrote:
> On Tue, Dec 03, 2024 at 04:30:22PM +0000, David Howells wrote:
> > Frederik Deweerdt <deweerdt.lkml@...il.com> wrote:
> > 
> > > -			if (skb->ip_summed == CHECKSUM_NONE)
> > > +			if (skb->ip_summed == CHECKSUM_NONE && skb->sk->sk_family != AF_UNIX)
> > >  				skb_splice_csum_page(skb, page, off, part);
> > 
> > Should AF_UNIX set some other CHECKSUM_* constant indicating that the checksum
> > is unnecessary?
> > 
> 
> It already means unnecessary on TX path:
> 
>  * - %CHECKSUM_NONE
>  *
>  *   The skb was already checksummed by the protocol, or a checksum is not
>  *   required.
> 

Looking back at the patch series that introduced the checksumming [1],
it looks like `ip_output.c::ip_append_page()` was the only path doing
checksumming, it had similar looking logic:
-
-		if (skb->ip_summed == CHECKSUM_NONE) {
-			__wsum csum;
-			csum = csum_page(page, offset, len);
-			skb->csum = csum_block_add(skb->csum, csum, skb->len);
-		}
-

That code in turn has been like this since the git import. I'm not sure
what that was for and how to test its intent.

Frederik

[1] https://patchwork.kernel.org/project/linux-mm/patch/20230522121125.2595254-15-dhowells@redhat.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ