Skip to contentSkip to conversation

printk for 6.9

GIT PULL Merged Petr Mladek 2 participants 2 messages Mar 12, 2024 – Mar 13, 2024

lore
Share & tools
lore
#0 lore raw

Hi Linus,

please pull the latest printk changes from

git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git tags/printk-for-6.9

========================================

Printk changes for 6.9 improve the behavior during panic. The issues were found when testing the ongoing changes introducing atomic consoles and printk kthreads.

- pr_flush() has to wait for the last reserved record instead of the last finalized one. Note that records are finalized in random order when generated by more CPUs in parallel.

- Ignore non-finalized records during panic(). Messages printed on panic-CPU are always finalized. Messages printed by other CPUs might never be finalized when the CPUs get stopped.

- Block new printk() calls on non-panic CPUs completely. Backtraces are printed before entering the panic mode. Later messages would just mess information printed by the panic CPU.

- Do not take console_lock in console_flush_on_panic() at all. The original code did try_lock()/console_unlock(). The unlock part might cause a deadlock when panic() happened in a scheduler code.

- Fix conversion of 64-bit sequence number for 32-bit atomic operations.

----------------------------------------------------------------
John Ogness (12):
printk: nbcon: Relocate 32bit seq macros
printk: Use prb_first_seq() as base for 32bit seq macros
printk: ringbuffer: Do not skip non-finalized records with prb_next_seq()
printk: ringbuffer: Clarify special lpos values
printk: For @suppress_panic_printk check for other CPU in panic
printk: Add this_cpu_in_panic()
printk: ringbuffer: Cleanup reader terminology
printk: Wait for all reserved records with pr_flush()
printk: ringbuffer: Skip non-finalized records in panic
printk: Avoid non-panic CPUs writing to ringbuffer
panic: Flush kernel log buffer at the end
dump_stack: Do not get cpu_sync for panic CPU

Petr Mladek (1):
printk: Disable passing console lock owner completely during panic()

Sebastian Andrzej Siewior (1):
printk: Adjust mapping for 32bit seq macros

 include/linux/printk.h            |   2 +
 kernel/panic.c                    |   8 +
 kernel/printk/nbcon.c             |  41 +----
 kernel/printk/printk.c            | 101 +++++++-----
 kernel/printk/printk_ringbuffer.c | 337 ++++++++++++++++++++++++++++++++------
 kernel/printk/printk_ringbuffer.h |  54 +++++-
 lib/dump_stack.c                  |  16 +-
 7 files changed, 420 insertions(+), 139 deletions(-)
merge bot Merged
#1 lore raw
The pull request you sent on Tue, 12 Mar 2024 15:54:57 +0100:

The pull request you sent on Tue, 12 Mar 2024 15:54:57 +0100:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git tags/printk-for-6.9

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/b0546776ad3f332e215cebc0b063ba4351971cca

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html