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:   Mon, 2 Jul 2018 19:39:17 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        linux-kernel@...r.kernel.org, Dmitry Vyukov <dvyukov@...gle.com>
Subject: Re: printk() from NMI backtrace can delay a lot

Hi,

On (07/02/18 19:26), Tetsuo Handa wrote:
> Hello.
> 
> Today I was testing conditions when/how stall watchdog fires. I noticed that
> printing NMI backtraces to consoles is delayed till IRQ is enabled or somebody
> else schedules printk(). This is not a welcomed behavior when the cause of
> lock up is doing nearly-infinite loop with IRQ disabled. Can we improve this?

Hmm. We can't call console drivers from NMI, this can deadlock on
uart/etc locks. So we always need [except for panic()] someone else to
print NMI message for us. Either it's IRQ on a local CPU (we need two
IRQs actually - one to flush printk_nmi buffer and the second one to do
console_trylock()->console_unlock()), or printk() from another CPU that
would print pending logbuf entries. We used to have a fast path for
print_nmi messages (direct_nmi), which soon will be used only for
NMI->ftrace_dump(). Even if we re-introduce that fast path for printk_nmi
[may be we can do printk_direct_nmi type of checks for printk_nmi as well]
we still can't print anything from the NMI CPU.

I need to look more at the data you have provided.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ