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]
Message-ID: <47445BE3.6030708@psc.edu>
Date:	Wed, 21 Nov 2007 11:25:07 -0500
From:	John Heffner <jheffner@....edu>
To:	Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>
CC:	Herbert Xu <herbert@...dor.apana.org.au>, netdev@...r.kernel.org
Subject: Re: [RFC PATCH 2/2] [TCP] MTUprobe: Cleanup send queue check (no
 need to loop)

Ilpo Järvinen wrote:
> The original code has striking complexity to perform a query
> which can be reduced to a very simple compare.
> 
> FIN seqno may be included to write_seq but it should not make
> any significant difference here compared to skb->len which was
> used previously. One won't end up there with SYN still queued.
> 
> Use of write_seq check guarantees that there's a valid skb in
> send_head so I removed the extra check.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>

Acked-by: John Heffner <jheffner@....edu>


> ---
>  net/ipv4/tcp_output.c |    7 +------
>  1 files changed, 1 insertions(+), 6 deletions(-)
> 
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index ff22ce8..1822ce6 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -1315,12 +1315,7 @@ static int tcp_mtu_probe(struct sock *sk)
>  	}
>  
>  	/* Have enough data in the send queue to probe? */
> -	len = 0;
> -	if ((skb = tcp_send_head(sk)) == NULL)
> -		return -1;
> -	while ((len += skb->len) < size_needed && !tcp_skb_is_last(sk, skb))
> -		skb = tcp_write_queue_next(sk, skb);
> -	if (len < size_needed)
> +	if (tp->write_seq - tp->snd_nxt < size_needed)
>  		return -1;
>  
>  	if (tp->snd_wnd < size_needed)

-
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