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 Dec 2006 12:10:06 -0600
From:	Matt Mackall <mpm@...enic.com>
To:	Keiichi KII <k-keiichi@...jp.nec.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 2.6.19 1/6] cleanup for netconsole

On Tue, Dec 12, 2006 at 03:28:17PM +0900, Keiichi KII wrote:
> From: Keiichi KII <k-keiichi@...jp.nec.com>
> 
> This patch contains the following cleanups.
>  - add __init for initialization functions(option_setup() and init_netconsole()).
>  - define name of magic number.
> 
> Signed-off-by: Keiichi KII <k-keiichi@...jp.nec.com>
> ---
> --- linux-2.6.19/drivers/net/netconsole.c	2006-12-06 14:37:06.985584500 +0900
> +++ enhanced-netconsole/drivers/net/netconsole.c.cleanup	2006-12-06
> 14:34:52.561183500 +0900
> @@ -50,8 +50,14 @@ MODULE_AUTHOR("Maintainer: Matt Mackall
>  MODULE_DESCRIPTION("Console driver for network interfaces");
>  MODULE_LICENSE("GPL");
> 
> -static char config[256];
> -module_param_string(netconsole, config, 256, 0);
> +enum {
> +	MAX_PRINT_CHUNK = 1000,
> +	MAX_CONFIG_LENGTH = 256,
> +};

Converting defines to anonymous enums is generally not considered a net
improvement around here. It doesn't provide any improvement in type safety.

> 
>  static void write_msg(struct console *con, const char *msg, unsigned int len)
>  {
> @@ -75,14 +80,12 @@ static void write_msg(struct console *co
>  		return;
> 
>  	local_irq_save(flags);
> -
>  	for(left = len; left; ) {
>  		frag = min(left, MAX_PRINT_CHUNK);
>  		netpoll_send_udp(&np, msg, frag);
>  		msg += frag;
>  		left -= frag;
>  	}
> -
>  	local_irq_restore(flags);
>  }

It's not a good idea to mix unrelated changes in, especially if
they're gratuitous formatting changes.

> +static int __init init_netconsole(void)
>  {
>  	if(strlen(config))
>  		option_setup(config);

I seem to recall there was a reason for not marking that __init. It
may no longer apply.

-- 
Mathematics is the supreme nostalgia of our time.
-
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