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:	Tue, 01 Sep 2009 18:21:27 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	nhorman@...driver.com
Cc:	netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH] drop_monitor: make last_rx timestamp private

From: Neil Horman <nhorman@...driver.com>
Date: Mon, 31 Aug 2009 15:58:47 -0400

> It was recently pointed out to me that the last_rx field of the net_device
> structure wasn't updated regularly.  In fact only the bonding driver really uses
> it currently.  Since the drop_monitor code relies on the last_rx field to detect
> drops on recevie in hardware, We need to find a more reliable way to rate limit
> our drop checks (so that we don't check for drops on every frame recevied, which
> would be inefficient.  This patch makes a last_rx timestamp that is private to
> the drop monitor code and is updated for every device that we track.
> 
> Signed-off-by: Neil Horman <nhorman@...driver.com>

Neil, this doesn't apply to net-next-2.6:

> diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
> index 9d66fa9..34a05ce 100644
> --- a/net/core/drop_monitor.c
> +++ b/net/core/drop_monitor.c
 ...
> @@ -179,18 +180,21 @@ static void trace_napi_poll_hit(struct napi_struct *napi)
>  {
>  	struct dm_hw_stat_delta *new_stat;
>  
> -	/*
> -	 * Ratelimit our check time to dm_hw_check_delta jiffies
> -	 */
> -	if (!time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta))
> -		return;
>  
>  	rcu_read_lock();
>  	list_for_each_entry_rcu(new_stat, &hw_stats_list, list) {

In net-next-2.6 this test reads:

	/*
	 * Ratelimit our check time to dm_hw_check_delta jiffies
	 */
	if (!napi->dev ||
	    !time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta))
		return;

and you must retain the napi->dev NULL check there as otherwise
the list traversal tests will blindly dereference that pointer.
--
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