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: <20171219153224.GB591@tigerII.localdomain>
Date:   Wed, 20 Dec 2017 00:32:24 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Petr Mladek <pmladek@...e.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Fengguang Wu <fengguang.wu@...el.com>,
        Kevin Hilman <khilman@...libre.com>,
        Mark Brown <broonie@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [PATCHv2] printk: add console_msg_format command line option

Hi,

On (12/19/17 10:17), Steven Rostedt wrote:
[..]
> > +	console_msg_format=
> > +			[KNL] Change console messages format
> > +		default
> > +			By default we print messages on consoles in
> > +			"[time stamp] text\n" format (time stamp may not be
> > +			printed, depending on CONFIG_PRINTK_TIME or
> > +			`printk_time' param).
> > +		syslog
> > +			Switch to syslog format: "<%u>[time stamp] text\n"
> > +			IOW, each message will have a facility and loglevel
> > +			prefix. The format is similar to one used by syslog()
> > +			syscall, or to executing "dmesg -S --raw" or to reading
> > +			from /proc/kmsg.
> 
> Just to clarify. This affects all consoles, not just serial?

yes.

just like printk_time param/config option affects all the consoles,
console_msg_format affects all of them. we msg_print_text() once, that
makes messages look the same on every console. so I kept the existing
behaviour.

[..]
> > +enum con_msg_format {
> > +	MSG_FORMAT_DEFAULT	= 0,
> > +	MSG_FORMAT_SYSLOG	= (1 << 0),
> > +};
> 
> So the con_msg_format will be a flag (as denoted with the (1<<0)).
> Should we call it "con_msg_format_flags" to make it more obvious that
> these are treated as flags and not a simple number.

ok, can do.

[..]
> > +static int __init console_msg_format_setup(char *str)
> > +{
> > +	if (!strncmp(str, "syslog", 6))
> > +		console_msg_format = MSG_FORMAT_SYSLOG;
> > +	if (!strncmp(str, "default", 7))
> 
> You can use strcmp() instead of strncmp(), the init code will nul
> terminate the string for you before calling this function. Otherwise if
> we add "syslog_special" or "default_extra" they will be confused with
> the above.

ok, that's a minor thing, but can change.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ