-
- Downloads
printk: Add a short description string to kmsg_dump()
kmsg_dump doesn't forward the panic reason string to the kmsg_dumper callback. This patch adds a new struct kmsg_dump_detail, that will hold the reason and description, and pass it to the dump() callback. To avoid updating all kmsg_dump() call, it adds a kmsg_dump_desc() function and a macro for backward compatibility. I've written this for drm_panic, but it can be useful for other kmsg_dumper. It allows to see the panic reason, like "sysrq triggered crash" or "VFS: Unable to mount root fs on xxxx" on the drm panic screen. v2: * Use a struct kmsg_dump_detail to hold the reason and description pointer, for more flexibility if we want to add other parameters. (Kees Cook) * Fix powerpc/nvram_64 build, as I didn't update the forward declaration of oops_to_nvram() Signed-off-by:Jocelyn Falempe <jfalempe@redhat.com> Acked-by:
Petr Mladek <pmladek@suse.com> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Acked-by:
Kees Cook <kees@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240702122639.248110-1-jfalempe@redhat.com
Showing
- arch/powerpc/kernel/nvram_64.c 4 additions, 4 deletionsarch/powerpc/kernel/nvram_64.c
- arch/powerpc/platforms/powernv/opal-kmsg.c 2 additions, 2 deletionsarch/powerpc/platforms/powernv/opal-kmsg.c
- arch/um/kernel/kmsg_dump.c 1 addition, 1 deletionarch/um/kernel/kmsg_dump.c
- drivers/gpu/drm/drm_panic.c 2 additions, 2 deletionsdrivers/gpu/drm/drm_panic.c
- drivers/hv/hv_common.c 2 additions, 2 deletionsdrivers/hv/hv_common.c
- drivers/mtd/mtdoops.c 1 addition, 1 deletiondrivers/mtd/mtdoops.c
- fs/pstore/platform.c 5 additions, 5 deletionsfs/pstore/platform.c
- include/linux/kmsg_dump.h 19 additions, 3 deletionsinclude/linux/kmsg_dump.h
- kernel/panic.c 1 addition, 1 deletionkernel/panic.c
- kernel/printk/printk.c 8 additions, 3 deletionskernel/printk/printk.c
Loading