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] [day] [month] [year] [list]
Date:	Tue, 21 May 2013 11:40:26 -0700
From:	Joe Perches <joe@...ches.com>
To:	jorge@...2.net
Cc:	netdev@...r.kernel.org, linux-ppp@...r.kernel.org
Subject: Re: [RFC PATCH v2 3/4] ppp_mppe: cleanup kernel log messages

On Tue, 2013-05-21 at 20:18 +0200, Jorge Boncompte [DTI2] wrote:
> From: "Jorge Boncompte [DTI2]" <jorge@...2.net>
> 
> - Consolidate log messages, print PPP unit number where available.
> - Changes error or warning messages to correct log level.
> - Use _ratelimited() functions for messages triggered by network packets.
[]
> diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp/ppp_mppe.c
[]
> @@ -178,7 +178,8 @@ static void mppe_rekey(struct ppp_mppe_state * state, int initial_key)
>  		setup_sg(sg_out, state->session_key, state->keylen);
>  		if (crypto_blkcipher_encrypt(&desc, sg_out, sg_in,
>  					     state->keylen) != 0) {
> -    		    printk(KERN_WARNING "mppe_rekey: cipher_encrypt failed\n");
> +			net_warn_ratelimited("%s[%d]: crypto_blkcipher_encrypt "
> +					     "failed\n", __func__, state->unit);

Please don't split formats across multiple lines.

			net_warn_ratelimited("%s[%d]: crypto_blkcipher_encrypt failed\n",
					     __func__, state->unit);

is just fine.

> @@ -314,8 +314,7 @@ mppe_init(void *arg, unsigned char *options, int optlen, int unit, int debug,
>  			sprintf(mkey + i * 2, "%02x", state->master_key[i]);
>  		for (i = 0; i < sizeof(state->session_key); i++)
>  			sprintf(skey + i * 2, "%02x", state->session_key[i]);
> -		printk(KERN_DEBUG
> -		       "%s[%d]: keys: master: %s initial session: %s\n",
> +		printk(KERN_DEBUG "%s[%d]: keys: master: %s initial session: %s\n",
>  		       debugstr, unit, mkey, skey);

this could probably use:
	%*ph, (int)sizeof(state->session_key), state->session_key

>  	}
>  
> @@ -387,9 +386,9 @@ mppe_compress(void *arg, unsigned char *ibuf, unsigned char *obuf,
[]
> +		net_err_ratelimited("%s[%d]: osize too small! "
> +				    "(have: %d need: %d)\n", __func__,
> +				    state->unit, osize, isize + MPPE_OVHD + 2);

another split format, please coalesce.

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