linux/kernel/debug/kdb
John Ogness f9f3f02db9 printk: introduce a kmsg_dump iterator
Rather than storing the iterator information in the registered
kmsg_dumper structure, create a separate iterator structure. The
kmsg_dump_iter structure can reside on the stack of the caller, thus
allowing lockless use of the kmsg_dump functions.

Update code that accesses the kernel logs using the kmsg_dumper
structure to use the new kmsg_dump_iter structure. For kmsg_dumpers,
this also means adding a call to kmsg_dump_rewind() to initialize
the iterator.

All this is in preparation for removal of @logbuf_lock.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Kees Cook <keescook@chromium.org> # pstore
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210303101528.29901-13-john.ogness@linutronix.de
2021-03-08 11:43:27 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kdb_bp.c kgdb: Honour the kprobe blocklist when setting breakpoints 2020-09-28 12:14:08 +01:00
kdb_bt.c kdb: Use newer api for tasklist scanning 2020-09-08 14:36:46 +01:00
kdb_cmds kdb: cleanup unused variables missed in the original kdb merge 2011-08-01 13:23:58 -05:00
kdb_debugger.c kernel: debug: Centralize dbg_[de]activate_sw_breakpoints 2020-10-01 14:23:45 +01:00
kdb_io.c kdb: Fix pager search for multi-line strings 2020-10-01 14:44:08 +01:00
kdb_keyboard.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
kdb_main.c printk: introduce a kmsg_dump iterator 2021-03-08 11:43:27 +01:00
kdb_private.h kdb: Use newer api for tasklist scanning 2020-09-08 14:36:46 +01:00
kdb_support.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Makefile kdb: Get rid of broken attempt to print CCVERSION in kdb summary 2019-05-12 09:50:43 +01:00