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: <20090207165843.6017c78a@hyperion.delvare>
Date:	Sat, 7 Feb 2009 16:58:43 +0100
From:	Jean Delvare <khali@...ux-fr.org>
To:	Uwe Kleine-König <ukleinek@...len.de>
Cc:	Frank Seidel <fseidel@...e.de>,
	linux kernel <linux-kernel@...r.kernel.org>,
	akpm@...ux-foundation.org, ben-linux@...ff.org,
	linux-i2c@...r.kernel.org, frank@...eidel.de,
	w.sang@...gutronix.de, "David S. Miller" <davem@...emloft.net>,
	Frans Pop <elendil@...net.nl>,
	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
Subject: Re: [PATCH] i2c: add missing KERN_* constants to printks

On Sat, 7 Feb 2009 11:52:19 +0100, Uwe Kleine-König wrote:
> On Sat, Feb 07, 2009 at 11:37:48AM +0100, Frank Seidel wrote:
> > Jean Delvare wrote:
> > > Default log level? That's news to me. Care to elaborate?
> > 
> > printk (in kernel/printk.c) uses vprintk and vprintk:
> > asmlinkage int vprintk(const char *fmt, va_list args)
> > {
> >         int printed_len = 0;
> >         int current_log_level = default_message_loglevel;
> > ...
> > and default_message_loglevel in include/linux/kernel.h:
> > 
> > #define default_message_loglevel (console_printk[1])
> > 
> > and console_printk[1] is (in kernel/printk.c)
> > DEFAULT_MESSAGE_LOGLEVEL
> > 
> > and in kernel/printk.c:
> > #define DEFAULT_MESSAGE_LOGLEVEL 4 /* KERN_WARNING */
> > 
> > => so as far as i could see KERN_WARNING is the
> > default loglevel of messages.
> one little note:  This is changable writing to /proc/sys/kernel/printk.

OK, thanks for the information. I admit I am surprised that there is
such a default log level and that it is considered important enough to
be changeable through /proc/sys, and that on the other hand it is
considered bad to not have a log level for every message. That's
somewhat contradictory.

> So the patch introduces at least a little change in behaviour.
> IMHO this is OK though.

The aim of Frank's patch shouldn't be to preserve the behavior, as
there is no guarantee that the behavior is correct. In fact, for some
of the messages it is very obvious that it is not. The aim should be to
pick the appropriate log level for every message. If not then I don't
see any point in fixing the messages.

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