Skip to content

KDB: Fix dmesg command

Anton Vorontsov lkml 1 version In review

Get series with b4
b4 am 20120721002529.GA20567@lizard

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4kdb: Revive dmesg commandkernel/debug/kdb/kdb_main.c+33 -582 replies
2/4printk: Remove kdb_syslog_datakernel/debug/kdb/kdb_private.h kernel/printk.c+0 -160 replies
3/4printk: Implement some unlocked kmsg_dump functionsinclude/linux/kmsg_dump.h kernel/printk.c+71 -130 replies
4/4kdb: Switch to nolock variants of kmsg_dump functionskernel/debug/kdb/kdb_main.c+4 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] KDB: Fix dmesg command

Hi all,

The dmesg command appears to be broken after the printk rework. The old logic in the kdb code makes no sense in terms of current printk/logging storage format, and KDB simply hangs forever upon entering 'dmesg' command.

The first patch revives the command by switching to kmsg_dumper iterator. As a side-effect, the code is now much more simpler.

A few changes were needed in the printk.c: we needed unlocked variant of the kmsg_dumper iterator, but these can surely wait for 3.6.

It's probably too late even for the first patch to go to 3.5, but I'll try to convince otherwise. :-) Here we go:

- The current code is broken for sure, and has no hope to work at all. It is a regression;
- The new code works for me, and probably works for everyone else;
- If it compiles (and I urge everyone to compile-test it on your setup), it hardly can make things worse.

Thanks!

--

 include/linux/kmsg_dump.h      |   16 +++++++
 kernel/debug/kdb/kdb_main.c    |   91 +++++++++++++++-------------------------
 kernel/debug/kdb/kdb_private.h |    1 -
 kernel/printk.c                |   83 +++++++++++++++++++++++-------------
 4 files changed, 104 insertions(+), 87 deletions(-)
Signature · 2 lines
Anton Vorontsov
Email: [email protected]