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:	Wed, 11 Dec 2013 19:51:14 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Terry Lam <vtlam@...gle.com>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Nandita Dukkipati <nanditad@...gle.com>,
	Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH v2] net-qdisc-hhf: Heavy-Hitter Filter (HHF) qdisc

On Wed, 2013-12-11 at 18:10 -0800, Terry Lam wrote:

> +static u32 hhf_time_stamp(void)
> +{
> +	return jiffies;
> +}


This is a 32 bit value (For a good reason)

> +{
> +	struct hh_flow_state *flow, *next;
> +	unsigned long now = hhf_time_stamp();

stored in a 'unsigned long'

> +
> +	if (list_empty(head))
> +		return NULL;
> +
> +	list_for_each_entry_safe(flow, next, head, flowchain) {
> +		unsigned long prev = flow->hit_timestamp + q->hhf_evict_timeout;


32bit + ...

> +
> +		if (time_before(prev, now)) {

This wont work on 64 bit arches : Wrapping wont be detected anymore.

We keep 32bit variables to lower memory usage,
this is why we have special macros in include/net/codel.h

Please make sure you test your v3 patch, there is no hurry ;)

Thanks !


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