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:	Thu, 25 Feb 2010 00:31:24 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	yi.zhu@...el.com
Cc:	netdev@...r.kernel.org
Subject: Re: [RFC PATCH] accounting for socket backlog

From: Zhu Yi <yi.zhu@...el.com>
Date: Thu, 25 Feb 2010 11:13:13 +0800

> @@ -1372,8 +1372,13 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
>  	bh_lock_sock(sk);
>  	if (!sock_owned_by_user(sk))
>  		rc = __udp_queue_rcv_skb(sk, skb);
> -	else
> +	else {
> +		if (atomic_read(&sk->sk_backlog.len) >= sk->sk_rcvbuf) {
> +			bh_unlock_sock(sk);
> +			goto drop;
> +		}
>  		sk_add_backlog(sk, skb);
> +	}

We have to address this issue, of course, but I bet this method of
handling it negatively impacts performance in normal cases.

Right now we can queue up a lot and still get it to the application
if it is slow getting scheduled onto a cpu, but if you put this
limit here it could result in lots of drops.
--
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