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:   Mon, 9 Jul 2018 15:27:57 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2 0/3] printk: Deadlock in NMI regression

On Wed 2018-06-27 16:08:14, Petr Mladek wrote:
> The commit 719f6a7040f1bdaf96 ("printk: Use the main logbuf in NMI
> when logbuf_lock is available") brought back the possible deadlocks
> in printk() and NMI.
> 
> This is rework of the proposed fix, see
> https://lkml.kernel.org/r/20180606111557.xzs6l3lkvg7lq3ts@pathway.suse.cz
> 
> I realized that we could rather easily move the check to vprintk_func()
> and still avoid any race. I believe that this is a win-win solution.
> 
> 
> Changes against v1:
> 
>   + Move the check from vprintk_emit() to vprintk_func()
>   + More straightforward commit message
>   + Fix build with CONFIG_PRINTK_NMI disabled
> 
> 
> Petr Mladek (3):
>   printk: Split the code for storing a message into the log buffer
>   printk: Create helper function to queue deferred console handling
>   printk/nmi: Prevent deadlock when accessing the main log buffer in NMI
> 
>  include/linux/printk.h      |  4 ++++
>  kernel/printk/internal.h    |  9 ++++++-
>  kernel/printk/printk.c      | 57 +++++++++++++++++++++++++++-----------------
>  kernel/printk/printk_safe.c | 58 +++++++++++++++++++++++++++++----------------
>  kernel/trace/trace.c        |  4 +++-
>  lib/nmi_backtrace.c         |  3 ---
>  6 files changed, 87 insertions(+), 48 deletions(-)

JFYI, I have renamed the new function defer_console() to
defer_console_output() and pushed everything to printk.git,
branch for-4.19-nmi.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ