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, 12 May 2015 22:20:26 +0200
From:	Mateusz Kulikowski <mateusz.kulikowski@...il.com>
To:	Joe Perches <joe@...ches.com>
CC:	gregkh@...uxfoundation.org, dan.carpenter@...cle.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 20/33] staging: rtl8192e: Fix PREFER_PR_LEVEL warnings

On 10.05.2015 00:37, Joe Perches wrote:
> On Sat, 2015-05-09 at 23:19 +0200, Mateusz Kulikowski wrote:
>> Fix most of remaining PREFER_PR_LEVEL warnings in rtllib.
>> Replace printk() with netdev_* if possible, pr_* in other cases.
>> All pr_* use __func__ to easily trace message back to rtllib
> 
> It's more common to use %s: and not %s():
> but it's generally even better not to use these
> at all and use dynamic_debug to add the function
> name when desired.

I wasn't aware of that - thanks for the tip.
In that case I'll throw away function names in all _dbg messages for v4.

>> diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
(...)
>>  		hdr = (struct rtllib_hdr_4addr *) skb->data;
>> -		printk(KERN_DEBUG
>> -		       "%s: Michael MIC verification failed for MSDU from %pM keyidx=%d\n",
>> -		       skb->dev ? skb->dev->name : "N/A", hdr->addr2,
>> -		       keyidx);
>> -		printk(KERN_DEBUG "%d\n",
>> -		       memcmp(mic, skb->data + skb->len - 8, 8) != 0);
>> +		pr_debug("%s: Michael MIC verification failed for MSDU from %pM keyidx=%d\n",
>> +			 skb->dev ? skb->dev->name : "N/A", hdr->addr2,
>> +			 keyidx);
> 
> Not that it's necessary, but are this and below
> missing __func__?

It prints device name in an awkward way - I must missed this one during review as 
it is the place where netdev_dbg() should be used.

Will do it the right way in v4.

Regards,
Mateusz

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ