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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1395140499.2812.19.camel@joe-AO722>
Date:	Tue, 18 Mar 2014 04:01:39 -0700
From:	Joe Perches <joe@...ches.com>
To:	Ding Tianhong <dingtianhong@...wei.com>
Cc:	fubar@...ibm.com, vfalico@...hat.com, andy@...yhouse.net,
	kaber@...sh.net, davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 3/3] bonding: convert pr_xxx() to
 pr_xxx_ratelimited() for arp interval

On Tue, 2014-03-18 at 18:43 +0800, Ding Tianhong wrote:
> The debug log in the arp interval should be rate limited, otherwise would
> occur spam the log, so convert them.

Hi Ding.

pr_<level>_ratelimited adds a per-use
rate limit control so each line is
separately rate limited.

Another way to do this is to use the
more global net_ratelimit() before
each existing pr_<level>.

Not suggesting one or the other is
right or wrong here, it's just an option.

> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c

> @@ -2131,32 +2131,33 @@ static void bond_arp_send(struct net_device *slave_dev, int arp_op,
>  {
>  	struct sk_buff *skb;
>  
> -	pr_debug("arp %d on slave %s: dst %pI4 src %pI4\n",
> -		 arp_op, slave_dev->name, &dest_ip, &src_ip);
> +	pr_debug_ratelimited("arp %d on slave %s: dst %pI4 src %pI4\n",
> +			     arp_op, slave_dev->name, &dest_ip, &src_ip);

	if (net_ratelimit())
		pr_debug(etc...)

etc..

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