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:   Fri, 20 Apr 2018 11:13:07 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        akpm@...ux-foundation.org, linux-mm@...ck.org,
        Peter Zijlstra <peterz@...radead.org>, Jan Kara <jack@...e.cz>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [PATCH] printk: Ratelimit messages printed by console drivers

On Fri, 20 Apr 2018 16:57:20 +0200
Petr Mladek <pmladek@...e.com> wrote:


> No, call_console_drivers() is done with interrupts disabled:
> 
> 		console_lock_spinning_enable();
> 
> 		stop_critical_timings();	/* don't trace print latency */
>  ---->		call_console_drivers(ext_text, ext_len, text, len);  
> 		start_critical_timings();
> 
> 		if (console_lock_spinning_disable_and_check()) {
>  ---->			printk_safe_exit_irqrestore(flags);  
> 			goto out;
> 		}
> 
>  ---->		printk_safe_exit_irqrestore(flags);  
> 
> They were called with interrupts disabled for ages, long before
> printk_safe. In fact, it was all the time in the git kernel history.
> 
> Therefore only NMIs are in the game. And they should be solved
> by the above change.
> 

Really?


  console_trylock_spinning(); /* console_owner now equals current */
  console_unlock() {

---> take interrupt here:

					vprintk() {
					   vprintk_func() {
					      if (console_owner == current && !__ratelimit(&ratelimit_console))

				[ RATE LIMIT HERE!!!! ]


	for (;;) {
		printk_safe_enter_irqsave(flags);

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ