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, 29 Apr 2019 13:44:23 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:     Feng Tang <feng.tang@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        linux-kernel@...r.kernel.org,
        Aaro Koskinen <aaro.koskinen@...ia.com>,
        Kees Cook <keescook@...omium.org>, Borislav Petkov <bp@...e.de>
Subject: Re: [PATCH v4] panic: add an option to replay all the printk message
 in buffer

On Sat 2019-04-27 02:16:40, Sergey Senozhatsky wrote:
> On (04/27/19 01:43), Sergey Senozhatsky wrote:
> [..]
> > > The console waiter logic is effective but it does not always
> > > work. The current console owner must be calling the console
> > > drivers.
> > >
> > > >   Hmm, we might have a bit of a problem here, maybe.
> > >
> > > Hmm, the printk() might wait forever when NMI stopped
> > > the current console owner in the console driver code
> > > or with the logbuf_lock taken.
> > 
> > I guess this is why we re-init logbuf lock from panic,
> > however, we don't do anything with the console_owner.

> > > The console waiter logic might get solved by clearing
> > > the console_owner in console_flush_on_panic(). It can't
> > > be much worse, we already ignore console_lock() there, ...
> 
> Hmm, or maybe we are fine... console_waiter logic should work
> before we send out stop IPI/NMI from panic CPU. When we call
> flush_on_panic() console_unlock() clears console_owner, so
> panic_print_sys_info() should not deadlock on console_owner.

Good point!

> It's probably only problematic if we kill a console_owner
> CPU and then try to printk() (from smp_send_stop()) before
> we do flush_on_panic()->console_unlock().

Yup. There are called several functions between smp_send_stop()
and console_flush_on_panic().

The question is if it is worth a code complication. We could
never 100% guarantee that printk() would work in panic().
I more and more understand what Peter Zijlstra means
by the duct taping.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ