Messages in this thread |  | | Date | Mon, 1 Dec 2025 17:14:49 +0100 | | From | Petr Mladek <> | | Subject | [GIT PULL] printk for 6.19 |
| |
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.19
==================================================
- Allow to create nbcon console drivers with an unsafe write_atomic() callback. It can be called only by the final nbcon_atomic_flush_unsafe(). Otherwise, the driver would rely on the kthread.
It is going to be used as the-best-effort approach for an experimental nbcon netconsole driver, see https://lore.kernel.org/r/20251121-nbcon-v1-2-503d17b2b4af@debian.org
Note that a safe .write_atomic() callback is supposed to work in NMI context. But some networking drivers are not safe even in IRQ context, see https://lore.kernel.org/r/oc46gdpmmlly5o44obvmoatfqo5bhpgv7pabpvb6sjuqioymcg@gjsma3ghoz35
In the ideal world, all networking drivers were fixed first and the atomic flush would be blocked only in NMI context. But it brings the question how reliable are networking drivers when the system is in a bad state. They might block flushing more reliable serial consoles which are more suitable for serious debugging anyway.
- Allow to use the last 4 bytes of the printk ring buffer.
- Prevent queuing IRQ work and block printk kthreads when consoles are suspended. Otherwise, they create non-necessary churn or even block the suspend.
- Release console_lock() between each record in the kthread used for legacy consoles on RT. It might significantly speed up the boot.
- Release nbcon context between each record in the atomic flush. It prevents stalls of the related printk kthread after it has lost the ownership in the middle of a record.
- Add support for NBCON consoles into KDB.
- Add %ptsP modifier for printing struct timespec64 and use it where possible.
- Misc code clean up.
---------------------------------------------------------------- Andrew Murray (2): printk: Introduce console_flush_one_record printk: Use console_flush_one_record for legacy printer kthread
Andy Shevchenko (24): lib/vsprintf: Check pointer before dereferencing in time_and_date() lib/vsprintf: Deduplicate special hex number specifier data lib/vsprintf: Add specifier for printing struct timespec64 ceph: Switch to use %ptSp libceph: Switch to use %ptSp dma-buf: Switch to use %ptSp drm/amdgpu: Switch to use %ptSp drm/msm: Switch to use %ptSp drm/vblank: Switch to use %ptSp drm/xe: Switch to use %ptSp e1000e: Switch to use %ptSp igb: Switch to use %ptSp ipmi: Switch to use %ptSp media: av7110: Switch to use %ptSp mmc: mmc_test: Switch to use %ptSp net: dsa: sja1105: Switch to use %ptSp PCI: epf-test: Switch to use %ptSp pps: Switch to use %ptSp ptp: ocp: Switch to use %ptSp s390/dasd: Switch to use %ptSp scsi: fnic: Switch to use %ptSp scsi: snic: Switch to use %ptSp tracing: Switch to use %ptSp lib/vsprintf: Unify FORMAT_STATE_NUM handlers
Daniil Tatianin (1): printk_ringbuffer: don't needlessly wrap data blocks around
John Ogness (4): printk: nbcon: Allow unsafe write_atomic() for panic printk: Allow printk_trigger_flush() to flush all types printk: Avoid scheduling irq_work on suspend printk: Avoid irq_work for printk_deferred() on suspend
Lukas Bulwahn (1): MAINTAINERS: add printk core-api doc file to PRINTK
Marcos Paulo de Souza (8): printk: nbcon: Export console_is_usable printk: nbcon: Introduce KDB helpers printk: nbcon: Allow KDB to acquire the NBCON context printk: nbcon: Export nbcon_write_context_set_buf kdb: Adapt kdb_msg_write to work with NBCON consoles drivers: serial: kgdboc: Drop checks for CON_ENABLED and CON_BOOT arch: um: kmsg_dump: Use console_is_usable printk: Use console_is_usable on console_unblank
Oleg Nesterov (1): printk_legacy_map: use LD_WAIT_CONFIG instead of LD_WAIT_SLEEP
Petr Mladek (13): printk: console_flush_one_record() code cleanup printk/nbcon: Block printk kthreads when any CPU is in an emergency context printk/nbcon/panic: Allow printk kthread to sleep when the system is in panic printk/nbcon: Release nbcon consoles ownership in atomic flush after each emitted record printk_ringbuffer: Fix check of valid data size when blk_lpos overflows printk_ringbuffer: Create a helper function to decide whether more space is needed Merge branch 'for-6.19-vsprintf-timespec64' into for-linus Merge branch 'rework/atomic-flush-hardlockup' into for-linus Merge branch 'rework/nbcon-in-kdb' into for-linus Merge branch 'rework/preempt-legacy-kthread' into for-linus Merge branch 'rework/suspend-fixes' into for-linus Merge branch 'rework/threaded-printk' into for-linus Merge branch 'rework/write_atomic-unsafe' into for-linus
Thorsten Blum (1): lib/vsprintf: Improve vsprintf + sprintf function comments
Documentation/core-api/printk-formats.rst | 11 +- MAINTAINERS | 1 + arch/um/kernel/kmsg_dump.c | 2 +- drivers/char/ipmi/ipmi_si_intf.c | 3 +- drivers/char/ipmi/ipmi_ssif.c | 6 +- drivers/dma-buf/sync_debug.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 3 +- drivers/gpu/drm/drm_vblank.c | 6 +- drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 3 +- drivers/gpu/drm/msm/msm_gpu.c | 3 +- drivers/gpu/drm/xe/xe_devcoredump.c | 4 +- drivers/mmc/core/mmc_test.c | 20 +- drivers/net/dsa/sja1105/sja1105_tas.c | 8 +- drivers/net/ethernet/intel/e1000e/ptp.c | 7 +- drivers/net/ethernet/intel/igb/igb_ptp.c | 7 +- drivers/pci/endpoint/functions/pci-epf-test.c | 5 +- drivers/pps/generators/pps_gen_parport.c | 3 +- drivers/pps/kapi.c | 3 +- drivers/ptp/ptp_ocp.c | 13 +- drivers/s390/block/dasd.c | 3 +- drivers/scsi/fnic/fnic_trace.c | 55 ++-- drivers/scsi/snic/snic_debugfs.c | 10 +- drivers/scsi/snic/snic_trc.c | 5 +- drivers/staging/media/av7110/av7110.c | 2 +- drivers/tty/serial/kgdboc.c | 1 - fs/ceph/dir.c | 5 +- fs/ceph/inode.c | 49 ++-- fs/ceph/xattr.c | 6 +- include/linux/console.h | 68 +++++ include/linux/kdb.h | 16 ++ kernel/debug/kdb/kdb_io.c | 47 ++-- kernel/printk/internal.h | 53 +--- kernel/printk/nbcon.c | 174 ++++++++++-- kernel/printk/printk.c | 306 ++++++++++++++-------- kernel/printk/printk_ringbuffer.c | 67 ++++- kernel/trace/trace_output.c | 6 +- lib/tests/printf_kunit.c | 4 + lib/vsprintf.c | 80 +++--- net/ceph/messenger_v2.c | 6 +- 39 files changed, 682 insertions(+), 391 deletions(-)
|  |