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
| ||
|
Date: Fri, 26 Feb 2016 15:57:22 +0100 From: Petr Mladek <pmladek@...e.com> To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com> Cc: Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>, Peter Zijlstra <peterz@...radead.org>, Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org, Sergey Senozhatsky <sergey.senozhatsky@...il.com> Subject: Re: [PATCH] printk/nmi: restore printk_func in nmi_panic On Fri 2016-02-26 12:37:20, Sergey Senozhatsky wrote: > When watchdog detects a hardlockup and calls nmi_panic() `printk_func' > must be restored via printk_nmi_exit() call, so panic() will be able > to flush nmi buf and show backtrace and panic message. We also better > explicitly ask nmi to printk_nmi_flush() in console_flush_on_panic(), > because it may be too late to rely on irq work. > > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com> > --- > include/linux/kernel.h | 6 ++++-- > kernel/printk/printk.c | 1 + > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/include/linux/kernel.h b/include/linux/kernel.h > index f4fa2b2..3ee33d5 100644 > --- a/include/linux/kernel.h > +++ b/include/linux/kernel.h > @@ -469,10 +469,12 @@ do { \ > cpu = raw_smp_processor_id(); \ > old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu); \ > \ > - if (old_cpu == PANIC_CPU_INVALID) \ > + if (old_cpu == PANIC_CPU_INVALID) { \ > + printk_nmi_exit(); \ This might end up in a deadlock that printk_nmi() wanted to avoid. I think about a compromise. We should try to get the messages out only when kdump is not enabled. If the kdump is enabled we should avoid the risk a the deadlock here and let people to find the messages in the dump. I am going to play with this a bit. Best Regards, Petr PS: I am sorry for not responding much about the printk problems this week. I have attended a training and did not have much time for a real work.
Powered by blists - more mailing lists