Commit df43d903 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull printk updates from Petr Mladek:

 - Optionally, provide an index of possible printk messages via
   <debugfs>/printk/index/. It can be used when monitoring important
   kernel messages on a farm of various hosts. The monitor has to be
   updated when some messages has changed or are not longer available by
   a newly deployed kernel.

 - Add printk.console_no_auto_verbose boot parameter. It allows to
   generate crash dump even with slow consoles in a reasonable time
   frame.

 - Remove printk_safe buffers. The messages are always stored directly
   to the main logbuffer, even in NMI or recursive context. Also it
   allows to serialize syslog operations by a mutex instead of a spin
   lock.

 - Misc clean up and build fixes.

* tag 'printk-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  printk/index: Fix -Wunused-function warning
  lib/nmi_backtrace: Serialize even messages about idle CPUs
  printk: Add printk.console_no_auto_verbose boot parameter
  printk: Remove console_silent()
  lib/test_scanf: Handle n_bits == 0 in random tests
  printk: syslog: close window between wait and read
  printk: convert @syslog_lock to mutex
  printk: remove NMI tracking
  printk: remove safe buffers
  printk: track/limit recursion
  lib/nmi_backtrace: explicitly serialize banner and regs
  printk: Move the printk() kerneldoc comment to its new home
  printk/index: Fix warning about missing prototypes
  MIPS/asm/printk: Fix build failure caused by printk
  printk: index: Add indexing support to dev_printk
  printk: Userspace format indexing support
  printk: Rework parse_prefix into printk_parse_prefix
  printk: Straighten out log_flags into printk_info_flags
  string_helpers: Escape double quotes in escape_special
  printk/console: Check consistent sequence number when handling race in console_unlock()
parents 9e5f3ffc c985aafb
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4198,6 +4198,15 @@
			Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
			default: disabled

	printk.console_no_auto_verbose=
			Disable console loglevel raise on oops, panic
			or lockdep-detected issues (only if lock debug is on).
			With an exception to setups with low baudrate on
			serial console, keeping this 0 is a good choice
			in order to provide more debug information.
			Format: <bool>
			default: 0 (auto_verbose is enabled)

	printk.devkmsg={on,off,ratelimit}
			Control writing to /dev/kmsg.
			on - unlimited logging to /dev/kmsg from userspace
+1 −4
Original line number Diff line number Diff line
@@ -107,9 +107,6 @@ also ``CONFIG_DYNAMIC_DEBUG`` in the case of pr_debug()) is defined.
Function reference
==================

.. kernel-doc:: kernel/printk/printk.c
   :functions: printk

.. kernel-doc:: include/linux/printk.h
   :functions: pr_emerg pr_alert pr_crit pr_err pr_warn pr_notice pr_info
   :functions: printk pr_emerg pr_alert pr_crit pr_err pr_warn pr_notice pr_info
      pr_fmt pr_debug pr_devel pr_cont
+5 −0
Original line number Diff line number Diff line
@@ -15021,6 +15021,11 @@ S: Maintained
F:	include/linux/printk.h
F:	kernel/printk/
PRINTK INDEXING
R:	Chris Down <chris@chrisdown.name>
S:	Maintained
F:	kernel/printk/index.c
PROC FILESYSTEM
L:	linux-kernel@vger.kernel.org
L:	linux-fsdevel@vger.kernel.org
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ __invalid_entry:
	adr	r0, strerr
	mrs	r1, ipsr
	mov	r2, lr
	bl	printk
	bl	_printk
#endif
	mov	r0, sp
	bl	show_regs
+2 −2
Original line number Diff line number Diff line
@@ -667,9 +667,9 @@ static void do_handle_IPI(int ipinr)
		break;

	case IPI_CPU_BACKTRACE:
		printk_nmi_enter();
		printk_deferred_enter();
		nmi_cpu_backtrace(get_irq_regs());
		printk_nmi_exit();
		printk_deferred_exit();
		break;

	default:
Loading