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]
Message-ID: <a45fdc35-aa94-4887-94f5-6654987f5ed1@huawei.com>
Date: Sat, 5 Jul 2025 09:38:53 +0800
From: Wang Liang <wangliang74@...wei.com>
To: Ido Schimmel <idosch@...sch.org>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <horms@...nel.org>, <alex.aring@...il.com>,
	<dsahern@...nel.org>, <yuehaibing@...wei.com>, <zhangchangzhong@...wei.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-bluetooth@...r.kernel.org>, <linux-wpan@...r.kernel.org>
Subject: Re: [PATCH net-next v2] net: replace ND_PRINTK with dynamic debug


在 2025/7/5 0:10, Ido Schimmel 写道:
> On Tue, Jul 01, 2025 at 04:11:14PM +0800, Wang Liang wrote:
>> ND_PRINTK with val > 1 only works when the ND_DEBUG was set in compilation
>> phase. Replace it with dynamic debug. Convert ND_PRINTK with val <= 1 to
>> net_{err,warn}_ratelimited, and convert the rest to net_dbg_ratelimited.
> One small comment below
>
> [...]
>
>> @@ -751,9 +747,8 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
>>   	probes -= NEIGH_VAR(neigh->parms, UCAST_PROBES);
>>   	if (probes < 0) {
>>   		if (!(READ_ONCE(neigh->nud_state) & NUD_VALID)) {
>> -			ND_PRINTK(1, dbg,
>> -				  "%s: trying to ucast probe in NUD_INVALID: %pI6\n",
>> -				  __func__, target);
>> +			net_warn_ratelimited("%s: trying to ucast probe in NUD_INVALID: %pI6\n",
>> +					     __func__, target);
> Without getting into a philosophical discussion about the appropriate
> log level for this message, the purpose of this patch is to move
> ND_PRINTK(val > 1, ...) to net_dbg_ratelimited(), but for some reason
> this hunk promotes an existing net_dbg_ratelimited() to
> net_warn_ratelimited(). Why not keep it as net_dbg_ratelimited()?


Thanks!

But this ND_PRINTK is some special. The val is 1, but the level is 'dbg'.

To keep the consistency in printing behavior, I convert ND_PRINTK with
val <= 1 to net_{err,warn}_ratelimited. So I use net_warn_ratelimited() to
place ND_PRINTK here.

>>   		}
>>   		ndisc_send_ns(dev, target, target, saddr, 0);
>>   	} else if ((probes -= NEIGH_VAR(neigh->parms, APP_PROBES)) < 0) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ