[Crash-utility] [PATCH v3 0/7] log: output logs of printk safe buffers

shogo.matsumoto at fujitsu.com shogo.matsumoto at fujitsu.com
Fri Jan 28 04:16:23 UTC 2022


This patch set introduces -s option for log builtin command to display
printk safe buffers (safe_print_seq/nmi_print_seq) as follows:

===
crash> log -s
PRINTK_SAFE_SEQ_BUF: nmi_print_seq
CPU: 0  ADDR: ffff969d7bc19ce0 LEN: 150  MESSAGE_LOST: 0
  Uhhuh. NMI received for unknown reason 20 on CPU 0.
  Do you have a strange power saving mode enabled?
  Dazed and confused, but trying to continue
  ...
===

The printk safe buffers are also displayed at the bottom of
'log' output so as not to overlook them.

===
crash> log
...
[nmi_print_seq] Uhhuh. NMI received for unknown reason 20 on CPU 0.
[nmi_print_seq] Do you have a strange power saving mode enabled?
[nmi_print_seq] Dazed and confused, but trying to continue
===

-m and -t options are also supported.

Note that the safe buffer (struct printk_safe_seq_buf) was introduced
in kernel-4.11 (Merge commit 7d91de74436a69c2b78a7a72f1e7f97f8b4396fa)
and removed in kernel-5.15 (93d102f094be9beab28e5afb656c188b16a3793b).

Changes since v2:
- Add support new options -s, -t, -m (Kazu)
- Add help text (Kazu)

[v1]: https://listman.redhat.com/archives/crash-utility/2021-December/msg00031.html
[v2]: https://listman.redhat.com/archives/crash-utility/2022-January/msg00004.html

Test program is attached in the above v2 patch e-mail.

Shogo Matsumoto (7):
  log: introduce -s option
  log: adjust indent and line breaks for log -s
  log: append printk safe buffer output to 'log'
  log: add support -t option for output of printk safe buffers
  log: add support -m for output of printk safe buffers
  symbols: add support 'help -o' for printk safe buffers
  log: add help text for printk safe buffers

 defs.h    |   5 ++
 help.c    |  25 ++++++++-
 kernel.c  | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 symbols.c |   5 ++
 4 files changed, 192 insertions(+), 2 deletions(-)

-- 
2.29.2





More information about the Crash-utility mailing list