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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130613.171339.2275946127393500284.davem@davemloft.net>
Date:	Thu, 13 Jun 2013 17:13:39 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	willemb@...gle.com
Cc:	eric.dumazet@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net-rps: fixes for rps flow limit

From: Willem de Bruijn <willemb@...gle.com>
Date: Thu, 13 Jun 2013 15:29:38 -0400

> Caught by sparse:
> - __rcu: missing annotation to sd->flow_limit
> - __user: direct access in cpumask_scnprintf
> 
> Also
> - add endline character when printing bitmap if room in buffer
> - avoid bucket overflow by reducing FLOW_LIMIT_HISTORY
> 
> Reported-by: Fengguang Wu <fengguang.wu@...el.com>
> (first item)
> 
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>

Applied, and:

> The last item warrants some explanation. The hashtable buckets are
> subject to overflow if FLOW_LIMIT_HISTORY is larger than or equal
> to bucket size, since all packets may end up in a single bucket. The
> current (rather arbitrary) history value of 256 happens to match the
> buffer size (u8).
> 
> As a result, with a single flow, the first 128 packets are accepted
> (correct), the second 128 packets dropped (correct) and then the
> history[] array has filled, so that each subsequent new packet
> causes an increment in the bucket for new_flow plus a decrement
> for old_flow: a steady state.
> 
> This is fine if packets are dropped, as the steady state goes away
> as soon as a mix of traffic reappears. But, because the 256th packet
> overflowed the bucket to 0: no packets are dropped.
> 
> Instead of explicitly adding an overflow check, this patch changes
> FLOW_LIMIT_HISTORY to never be able to overflow a single bucket.

I put this text into the commit message, the more information in the
commit log the better.
--
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