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:	Fri, 18 May 2012 00:01:59 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Willy Tarreau <w@....eu>
Cc:	netdev@...r.kernel.org
Subject: Re: Stable regression with 'tcp: allow splice() to build full TSO
 packets'

On Thu, 2012-05-17 at 23:50 +0200, Eric Dumazet wrote:
> On Thu, 2012-05-17 at 23:40 +0200, Eric Dumazet wrote:
> 
> > I dont understand why we should tcp_push() if we sent 0 bytes in this
> > splice() call.
> > 
> > The push() should have be done already by prior splice() call, dont you
> > think ?
> > 
> > out:
> > 	if (copied && !(flags & MSG_SENDPAGE_NOTLAST))
> > 		tcp_push(sk, flags, mss_now, tp->nonagle);
> > 
> 
> I think I now understand
> 
> One splice() syscall actually calls do_tcp_sendpages() several times
> (N).
> 
> Problem is N-1 calls are done with MSG_SENDPAGE_NOTLAST set
> 
> And last one with MSG_SENDPAGE_NOTLAST unset
> 
> So maybe we should replace this test by :
> 
> 	if (!(flags & MSG_SENDPAGE_NOTLAST))
> 		tcp_push(...);
> 
> 

Its more tricky than that.

If we return 0 from do_tcp_sendpages(), __splice_from_pipe() wont call
us again, but we need to flush().  (This bug is indeed very old)

So maybe use :

if ((copied && !(flags & MSG_SENDPAGE_NOTLAST)) ||
    !copied)
	tcp_push(...);





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