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:   Wed, 5 Apr 2017 11:16:28 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Calvin Owens <calvinowens@...com>
Cc:     Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.cz>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Manuel Schölling <manuel.schoelling@....de>,
        Hans de Goede <hdegoede@...hat.com>,
        Paul Burton <paul.burton@...tec.com>,
        linux-kernel@...r.kernel.org, kernel-team@...com,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of
 messages by loglevel

On (04/05/17 11:08), Sergey Senozhatsky wrote:
[..]
> >  		stop_critical_timings();	/* don't trace print latency */
> > -		call_console_drivers(ext_text, ext_len, text, len);
> > +		call_console_drivers(ext_text, ext_len, text, len, msg->level);
> >  		start_critical_timings();
> >  		printk_safe_exit_irqrestore(flags);
> 
> ok, so the idea is quite clear and reasonable.
> 
> 
> some thoughts,
> we have a system-wide suppress_message_printing() loglevel filtering
> in console_unlock() loop, which sets a limit on loglevel for all of
> the messages - we don't even msg_print_text() if the message has
> suppressible loglevel. and this implicitly restricts per-console
> maxlevels.
> 
> console_unlock()
> {
> 	for (;;) {
> 		...
> skip:
> 
> 		if (suppress_message_printing(msg->level))	// console_loglevel
> 			goto skip;
> 
> 		call_console_drivers(msg->level)
> 			{
> 				if (level > con->maxlevel)	// con loglevel
> 					continue;
> 				...
> 			}
> 	}
> }
> 
> this can be slightly confusing. what do you think?

one more thing.

this per-console filtering ignores... the "ignore_loglevel" param.

early_param("ignore_loglevel", ignore_loglevel_setup);
module_param(ignore_loglevel, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(ignore_loglevel,
		 "ignore loglevel setting (prints all kernel messages to the console)");


my preference would be preserve "ignore_loglevel" behaviour. if
we are forced to 'ignore all loglevel filtering' then we should
do so.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ