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:	Sat, 09 May 2015 15:37:55 -0700
From:	Joe Perches <joe@...ches.com>
To:	Mateusz Kulikowski <mateusz.kulikowski@...il.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 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.

> diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
[]
> @@ -69,7 +69,7 @@ static void *rtllib_ccmp_init(int key_idx)
>  
>  	priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
>  	if (IS_ERR(priv->tfm)) {
> -		pr_debug("rtllib_crypt_ccmp: could not allocate crypto API aes\n");
> +		pr_debug("%s(): could not allocate crypto API aes\n", __func__);
>  		priv->tfm = NULL;
>  		goto fail;
>  	}

> diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
[]
> @@ -630,12 +623,10 @@ static int rtllib_michael_mic_verify(struct sk_buff *skb, int keyidx,
>  		struct rtllib_hdr_4addr *hdr;
>  
>  		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__?

> diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
[]
> @@ -346,8 +346,9 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
>  	res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv);
>  	atomic_dec(&crypt->refcnt);
>  	if (res < 0) {
> -		printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed (SA= %pM keyidx=%d)\n",
> -		       ieee->dev->name, hdr->addr2, keyidx);
> +		netdev_dbg(ieee->dev,
> +			   "MSDU decryption/MIC verification failed (SA= %pM keyidx=%d)\n",
> +			   hdr->addr2, keyidx);
>  		return -1;
>  	}
>  



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