lkml.org 
[lkml]   [2020]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 0/3] x86/dumpstack: Print registers with the same log level as the backtrace
From
Date
Hi Ingo, Thomas,

Could you take these to x86/tip tree?
(in case they are good enough)

On 6/29/20 3:48 PM, Dmitry Safonov wrote:
> Changes since v1 [3]:
> - Use (enum show_regs_mode) instead of (int) [nit by Jann, thanks!]
> - Add acks from Petr
>
> show_trace_log_lvl() provides x86 platform-specific way to unwind
> backtrace with a given log level. Unfortunately, registers dump(s) are
> not printed with the same log level - instead, KERN_DEFAULT is always
> used.
>
> Arista's switches uses quite common setup with rsyslog, where only
> urgent messages goes to console (console_log_level=KERN_ERR), everything
> else goes into /var/log/ as the console baud-rate often is indecently
> slow (9600 bps).
>
> Backtrace dumps without registers printed have proven to be as useful as
> morning standups. Furthermore, in order to introduce KERN_UNSUPPRESSED
> (which I believe is still the most elegant way to fix raciness of sysrq[1])
> the log level should be passed down the stack to register dumping
> functions. Besides, I have a potential use-case for printing traces
> with KERN_DEBUG level [2] (where registers dump shouldn't appear with
> higher log level than the backtrace).
>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Jann Horn <jannh@google.com>
> Cc: Petr Mladek <pmladek@suse.com>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: x86@kernel.org
> [1]: https://lore.kernel.org/lkml/20190528002412.1625-1-dima@arista.com/
> [2]: https://lore.kernel.org/linux-doc/20190724170249.9644-1-dima@arista.com/
> [3]: https://lore.kernel.org/lkml/20200623162958.331051-1-dima@arista.com/
> Dmitry Safonov (3):
> x86/dumpstack: Add log_lvl to show_iret_regs()
> x86/dumpstack: Add log_lvl to __show_regs()
> x86/dumpstack: Show registers dump with trace's log level
>
> arch/x86/include/asm/kdebug.h | 5 ++--
> arch/x86/kernel/dumpstack.c | 23 +++++++++-------
> arch/x86/kernel/process_32.c | 29 ++++++++++----------
> arch/x86/kernel/process_64.c | 51 ++++++++++++++++++-----------------
> 4 files changed, 57 insertions(+), 51 deletions(-)
>

Thanks,
Dmitry

\
 
 \ /
  Last update: 2020-07-20 20:53    [W:0.944 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site