Add log level to show_stack()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest50 patches 18 repliesIn review 49 of 50 applied
- v250 patches 7 repliesSuperseded
- v150 patches 52 repliesSuperseded
Changes in v3 from the cover letter
- Collected more architectual Acks and Reviewed-by
- Fixed compilation on sparc64
Patches in v3 49 of 50 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/50 | kallsyms/printk: Add loglvl to print_ip_sym()arch/ arch/ arch/ +6 more | +17 | 3 replies | Applied |
| 2/50 | alpha: Add show_stack_loglvl()arch/ | +17 | 0 replies | Applied |
| 3/50 | arc: Add show_stack_loglvl()arch/ arch/ arch/ | +18 | 0 replies | Applied |
| 4/50 | arm/asm: Add loglvl to c_backtrace()arch/ arch/ arch/ +3 more | +27 | 0 replies | Applied |
| 5/50 | arm: Add loglvl to unwind_backtrace()arch/ arch/ arch/ | +8 | 0 replies | Applied |
| 6/50 | arm: Add loglvl to dump_backtrace()arch/ | +9 | 0 replies | Applied |
| 7/50 | arm: Wire up dump_backtrace_{entry,stm}arch/ | +7 | 0 replies | Applied |
| 8/50 | arm: Add show_stack_loglvl()arch/ | +8 | 0 replies | Applied |
| 9/50 | arm64: Add loglvl to dump_backtrace()arch/ arch/ arch/ | +11 | 0 replies | Applied |
| 10/50 | arm64: Add show_stack_loglvl()arch/ | +8 | 0 replies | Applied |
| 11/50 | c6x: Add show_stack_loglvl()arch/ | +14 | 3 replies | Applied |
| 12/50 | csky: Add show_stack_loglvl()arch/ | +10 | 2 replies | Applied |
| 13/50 | h8300: Add show_stack_loglvl()arch/ | +12 | 0 replies | Applied |
| 14/50 | hexagon: Add show_stack_loglvl()arch/ | +17 | 0 replies | Applied |
| 15/50 | ia64: Pass log level as arg into ia64_do_show_stack()arch/ arch/ | +7 | 0 replies | Applied |
| 16/50 | ia64: Add show_stack_loglvl()arch/ | +10 | 0 replies | Applied |
| 17/50 | m68k: Add show_stack_loglvl()arch/ | +11 | 0 replies | Applied |
| 18/50 | microblaze: Add loglvl to microblaze_unwind_inner()arch/ | +23 | 0 replies | Applied |
| 19/50 | microblaze: Add loglvl to microblaze_unwind()arch/ arch/ arch/ +1 more | +8 | 0 replies | Applied |
| 20/50 | microblaze: Add show_stack_loglvl()arch/ | +12 | 0 replies | Applied |
| 21/50 | mips: Add show_stack_loglvl()arch/ | +24 | 0 replies | Applied |
| 22/50 | nds32: Add show_stack_loglvl()arch/ | +14 | 0 replies | Applied |
| 23/50 | nios2: Add show_stack_loglvl()arch/ | +15 | 0 replies | Applied |
| 24/50 | openrisc: Add show_stack_loglvl()arch/ | +12 | 2 replies | Applied |
| 25/50 | parisc: Add show_stack_loglvl()arch/ | +17 | 1 reply | Applied |
| 26/50 | powerpc: Add show_stack_loglvl()arch/ | +13 | 0 replies | Applied |
| 27/50 | riscv: Add show_stack_loglvl()arch/ | +10 | 0 replies | Applied |
| 28/50 | s390: Add show_stack_loglvl()arch/ | +11 | 0 replies | Applied |
| 29/50 | sh: Add loglvl to dump_mem()arch/ arch/ arch/ | +13 | 0 replies | Applied |
| 30/50 | sh: Remove needless printk()arch/ | +0 | 0 replies | Applied |
| 31/50 | sh: Add loglvl to printk_address()arch/ arch/ arch/ | +6 | 3 replies | Applied |
| 32/50 | sh: Add loglvl to show_trace()arch/ arch/ arch/ | +7 | 0 replies | Applied |
| 33/50 | sh: Add show_stack_loglvl()arch/ | +9 | 0 replies | Applied |
| 34/50 | sparc: Add show_stack_loglvl()arch/ arch/ | +23 | 0 replies | Applied |
| 35/50 | um/sysrq: Remove needless variable sparch/ | +1 | 0 replies | Applied |
| 36/50 | um: Add show_stack_loglvl()arch/ | +16 | 0 replies | Applied |
| 37/50 | unicore32: Remove unused pmode argument in c_backtrace()arch/ arch/ | +6 | 0 replies | Applied |
| 38/50 | unicore32: Add loglvl to c_backtrace()arch/ arch/ arch/ | +18 | 0 replies | Applied |
| 39/50 | unicore32: Add show_stack_loglvl()arch/ | +17 | 0 replies | Applied |
| 40/50 | x86: Add missing const qualifiers for log_lvlarch/ arch/ | +3 | 0 replies | Applied |
| 41/50 | x86: Add show_stack_loglvl()arch/ | +8 | 0 replies | Applied |
| 42/50 | xtensa: Add loglvl to show_trace()arch/ | +9 | 2 replies | |
| 43/50 | xtensa: Add show_stack_loglvl()arch/ | +10 | 0 replies | Applied |
| 44/50 | sysrq: Use show_stack_loglvl()drivers/ include/ | +3 | 0 replies | Applied |
| 45/50 | x86/amd_gart: Print stacktrace for a leak with KERN_ERRarch/ | +1 | 0 replies | Applied |
| 46/50 | power: Use show_stack_loglvl()drivers/ | +1 | 0 replies | Applied |
| 47/50 | kdb: Don't play with console_loglevelkernel/ | +8 | 0 replies | Applied |
| 48/50 | sched: Print stack trace with KERN_INFOkernel/ | +1 | 0 replies | Applied |
| 49/50 | kernel: Use show_stack_loglvl()kernel/ lib/ | +2 | 0 replies | Applied |
| 50/50 | kernel: Rename show_stack_loglvl() => show_stack()arch/ arch/ arch/ +37 more | +53 | 0 replies | Applied |
Reviews trailers per patch
8 of 50 patches have a Reviewed-by or Acked-by.
| Patch | Brian Cain | David S. Miller | Steven Rostedt (VMware) | Daniel Thompson | Douglas Anderson | Rafael J. Wysocki | Michael Ellerman | Helge Deller | Stafford Horne |
|---|---|---|---|---|---|---|---|---|---|
| 1/50 | A-b | ||||||||
| 2/50 | |||||||||
| 3/50 | |||||||||
| 4/50 | |||||||||
| 5/50 | |||||||||
| 6/50 | |||||||||
| 7/50 | |||||||||
| 8/50 | |||||||||
| 9/50 | |||||||||
| 10/50 | |||||||||
| 11/50 | |||||||||
| 12/50 | |||||||||
| 13/50 | |||||||||
| 14/50 | A-b | ||||||||
| 15/50 | |||||||||
| 16/50 | |||||||||
| 17/50 | |||||||||
| 18/50 | |||||||||
| 19/50 | |||||||||
| 20/50 | |||||||||
| 21/50 | |||||||||
| 22/50 | |||||||||
| 23/50 | |||||||||
| 24/50 | A-b | ||||||||
| 25/50 | A-b | ||||||||
| 26/50 | A-b | ||||||||
| 27/50 | |||||||||
| 28/50 | |||||||||
| 29/50 | |||||||||
| 30/50 | |||||||||
| 31/50 | |||||||||
| 32/50 | |||||||||
| 33/50 | |||||||||
| 34/50 | A-b | ||||||||
| 35/50 | |||||||||
| 36/50 | |||||||||
| 37/50 | |||||||||
| 38/50 | |||||||||
| 39/50 | |||||||||
| 40/50 | |||||||||
| 41/50 | |||||||||
| 42/50 | |||||||||
| 43/50 | |||||||||
| 44/50 | |||||||||
| 45/50 | |||||||||
| 46/50 | A-b | ||||||||
| 47/50 | A-b | R-b | |||||||
| 48/50 | |||||||||
| 49/50 | |||||||||
| 50/50 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 9 reviewers.
Cover letter [PATCHv3 00/50] Add log level to show_stack()
Changes to v3:
- Collected more architectual Acks and Reviewed-by
- Fixed compilation on sparc64
Changes to v2:
- Removed excessive pr_cont("\n") (nits by Senozhatsky)
- Leave backtrace debugging messages with pr_debug() (noted by Russell King and Will Deacon)
- Correct microblaze_unwind_inner() declaration (Thanks to Michal Simek and kbuild test robot)
- Fix copy'n'paste typo in show_stack_loglvl() for sparc (kbuild robot)
- Fix backtrace output on xtensa
(Thanks Max Filippov)
- Add loglevel to show_stack() on s390 (kbuild robot)
- Collected all Reviewed-by and Acked-by (thanks!)
v2: https://lore.kernel.org/linux-riscv/[email protected]/
v1: https://lore.kernel.org/linux-riscv/[email protected]/
Add log level argument to show_stack().
Done in three stages:
1. Introducing show_stack_loglvl() for every architecture
2. Migrating old users with an explicit log level
3. Renaming show_stack_loglvl() into show_stack()
Justification:
o It's a design mistake to move a business-logic decision into platform realization detail.
o I have currently two patches sets that would benefit from this work:
Removing console_loglevel jumps in sysrq driver [1]
Hung task warning before panic [2] - suggested by Tetsuo (but he probably didn't realise what it would involve).
o While doing (1), (2) the backtraces were adjusted to headers and other messages for each situation - so there won't be a situation when the backtrace is printed, but the headers are missing because they have lesser log level (or the reverse).
o As the result in (2) plays with console_loglevel for kdb are removed.
The least important for upstream, but maybe still worth to note that every company I've worked in so far had an off-list patch to print backtrace with the needed log level (but only for the architecture they cared about).
If you have other ideas how you will benefit from show_stack() with a log level - please, reply to this cover letter.
See also discussion on v1:
https://lore.kernel.org/linux-riscv/[email protected]/
Thanks,
Dmitry
[1]: https://lore.kernel.org/lkml/[email protected]/T/#u
[2]: https://lkml.kernel.org/r/[email protected]
Dmitry Safonov (50):
kallsyms/printk: Add loglvl to print_ip_sym()
alpha: Add show_stack_loglvl()
arc: Add show_stack_loglvl()
arm/asm: Add loglvl to c_backtrace()
arm: Add loglvl to unwind_backtrace()
arm: Add loglvl to dump_backtrace()
arm: Wire up dump_backtrace_{entry,stm}
arm: Add show_stack_loglvl()
arm64: Add loglvl to dump_backtrace()
arm64: Add show_stack_loglvl()
c6x: Add show_stack_loglvl()
csky: Add show_stack_loglvl()
h8300: Add show_stack_loglvl()
hexagon: Add show_stack_loglvl()
ia64: Pass log level as arg into ia64_do_show_stack()
ia64: Add show_stack_loglvl()
m68k: Add show_stack_loglvl()
microblaze: Add loglvl to microblaze_unwind_inner()
microblaze: Add loglvl to microblaze_unwind()
microblaze: Add show_stack_loglvl()
mips: Add show_stack_loglvl()
nds32: Add show_stack_loglvl()
nios2: Add show_stack_loglvl()
openrisc: Add show_stack_loglvl()
parisc: Add show_stack_loglvl()
powerpc: Add show_stack_loglvl()
riscv: Add show_stack_loglvl()
s390: Add show_stack_loglvl()
sh: Add loglvl to dump_mem()
sh: Remove needless printk()
sh: Add loglvl to printk_address()
sh: Add loglvl to show_trace()
sh: Add show_stack_loglvl()
sparc: Add show_stack_loglvl()
um/sysrq: Remove needless variable sp
um: Add show_stack_loglvl()
unicore32: Remove unused pmode argument in c_backtrace()
unicore32: Add loglvl to c_backtrace()
unicore32: Add show_stack_loglvl()
x86: Add missing const qualifiers for log_lvl
x86: Add show_stack_loglvl()
xtensa: Add loglvl to show_trace()
xtensa: Add show_stack_loglvl()
sysrq: Use show_stack_loglvl()
x86/amd_gart: Print stacktrace for a leak with KERN_ERR
power: Use show_stack_loglvl()
kdb: Don't play with console_loglevel
sched: Print stack trace with KERN_INFO
kernel: Use show_stack_loglvl()
kernel: Rename show_stack_loglvl() => show_stack()
arch/alpha/kernel/traps.c | 22 +++++++-------- arch/arc/include/asm/bug.h | 3 ++- arch/arc/kernel/stacktrace.c | 17 +++++++----- arch/arc/kernel/troubleshoot.c | 2 +- arch/arm/include/asm/bug.h | 3 ++- arch/arm/include/asm/traps.h | 3 ++- arch/arm/include/asm/unwind.h | 3 ++- arch/arm/kernel/traps.c | 39 +++++++++++++++------------ arch/arm/kernel/unwind.c | 5 ++-- arch/arm/lib/backtrace-clang.S | 9 +++++-- arch/arm/lib/backtrace.S | 14 +++++++--- arch/arm64/include/asm/stacktrace.h | 3 ++- arch/arm64/kernel/process.c | 2 +- arch/arm64/kernel/traps.c | 17 ++++++------ arch/c6x/kernel/traps.c | 16 ++++++----- arch/csky/kernel/dumpstack.c | 9 ++++--- arch/csky/kernel/ptrace.c | 4 +-- arch/h8300/kernel/traps.c | 12 ++++----- arch/hexagon/kernel/traps.c | 25 ++++++++--------- arch/ia64/include/asm/ptrace.h | 1 - arch/ia64/kernel/mca.c | 2 +- arch/ia64/kernel/process.c | 17 ++++++------ arch/m68k/kernel/traps.c | 13 ++++----- arch/microblaze/include/asm/unwind.h | 3 ++- arch/microblaze/kernel/stacktrace.c | 4 +-- arch/microblaze/kernel/traps.c | 12 ++++----- arch/microblaze/kernel/unwind.c | 40 +++++++++++++++++----------- arch/mips/kernel/traps.c | 35 ++++++++++++------------ arch/nds32/kernel/traps.c | 15 ++++++----- arch/nios2/kernel/traps.c | 17 ++++++------ arch/openrisc/kernel/traps.c | 12 +++++---- arch/parisc/kernel/traps.c | 24 ++++++++--------- arch/powerpc/kernel/process.c | 15 ++++++----- arch/powerpc/kernel/stacktrace.c | 2 +- arch/riscv/kernel/stacktrace.c | 9 ++++--- arch/s390/kernel/dumpstack.c | 13 ++++----- arch/sh/include/asm/kdebug.h | 6 +++-- arch/sh/include/asm/processor_32.h | 2 +- arch/sh/kernel/dumpstack.c | 36 ++++++++++++------------- arch/sh/kernel/process_32.c | 2 +- arch/sh/kernel/process_64.c | 3 +-- arch/sh/kernel/traps.c | 4 +-- arch/sh/mm/fault.c | 2 +- arch/sparc/kernel/process_32.c | 10 +++---- arch/sparc/kernel/process_64.c | 2 +- arch/sparc/kernel/traps_64.c | 9 ++++--- arch/um/drivers/mconsole_kern.c | 2 +- arch/um/kernel/sysrq.c | 23 ++++++++-------- arch/unicore32/kernel/setup.h | 2 +- arch/unicore32/kernel/traps.c | 34 +++++++++++------------ arch/unicore32/lib/backtrace.S | 24 +++++++++++------ arch/x86/include/asm/stacktrace.h | 2 +- arch/x86/kernel/amd_gart_64.c | 2 +- arch/x86/kernel/dumpstack.c | 9 ++++--- arch/xtensa/kernel/traps.c | 22 ++++++++------- drivers/base/power/main.c | 2 +- drivers/tty/sysrq.c | 2 +- include/linux/kallsyms.h | 4 +-- include/linux/sched/debug.h | 3 ++- kernel/debug/kdb/kdb_bt.c | 15 ++++++----- kernel/locking/lockdep.c | 4 +-- kernel/locking/rtmutex-debug.c | 2 +- kernel/sched/core.c | 8 +++--- kernel/trace/ftrace.c | 8 +++--- lib/dump_stack.c | 2 +- tools/include/linux/kallsyms.h | 2 +- 66 files changed, 375 insertions(+), 315 deletions(-)
Signature · 1 line
2.26.0