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:   Thu, 6 Jul 2017 01:36:03 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:     Pavel Machek <pavel@....cz>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Jan Kara <jack@...e.cz>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Eric Biederman <ebiederm@...ssion.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>, Andreas Mohr <andi@...as.de>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCHv3 2/5] printk: introduce printing kernel thread

Hello,

On (07/02/17 22:27), Pavel Machek wrote:
[..]
> > +#define PRINTK_FLOOD_DEFAULT_DELAY	10
> > +
> >  int printk_delay_msec __read_mostly;
> 
> = 10;

the idea is to throttle printk() only (and as long as) when we see
that something is not right. like when we added 4 (a random number)
times more messages that we were able to print so far. printk_delay_msec
would throttle all printk calls. there is a difference.

there are some cases that are sort of broken with this automatic
throttling. the simples one is printk() under console_lock().
the harder one is throttling printk() from IRQ context. that
can be risky, in theory. may be I'm overcomplicating here; if
the system has hard locked up due to printk throttling from IRQ,
then probably it was going to lockup anyway.

need to check sysrq-t case, tho.

> > +	if (console_seen < 4 * console_to_see) {
> > +		if (printk_delay_msec)
> > +			__printk_delay(printk_delay_msec);
> > +		else
> > +			__printk_delay(PRINTK_FLOOD_DEFAULT_DELAY);
> 
> And get rid of if () here? We want to enable delays of 0...

this if () is totally useless and stupid, yes. realized after I sent
the mail.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ