Hello, This series removes @logbuf_lock, exposing the ringbuffer locklessly to both readers and writers. And since @logbuf_lock was protecting much more than just the ringbuffer, this series clarifies and cleans up the various protections using comments, lockless accessors, atomic types, and a new finer-grained @syslog_log.
This series takes into account the feedback from [0], which was a series that was partially merged in 5.11. The first few patches (1-5) are general cleanups to help simplify later patches. They probably are important enough to stand alone. John Ogness [0] https://lkml.kernel.org/r/20201201205341.3871-1-john.ogn...@linutronix.de John Ogness (12): printk: kmsg_dump: remove unused fields printk: refactor kmsg_dump_get_buffer() printk: consolidate kmsg_dump_get_buffer/syslog_print_all code printk: define CONSOLE_LOG_MAX in printk.h printk: use seqcount_latch for clear_seq printk: use atomic64_t for devkmsg_user.seq printk: add syslog_lock printk: introduce a kmsg_dump iterator um: synchronize kmsg_dumper hv: synchronize kmsg_dumper printk: remove logbuf_lock printk: kmsg_dump: remove _nolock() variants arch/powerpc/kernel/nvram_64.c | 12 +- arch/powerpc/platforms/powernv/opal-kmsg.c | 3 +- arch/powerpc/xmon/xmon.c | 6 +- arch/um/kernel/kmsg_dump.c | 13 +- drivers/hv/vmbus_drv.c | 17 +- drivers/mtd/mtdoops.c | 5 +- fs/pstore/platform.c | 5 +- include/linux/kmsg_dump.h | 52 +-- include/linux/printk.h | 1 + kernel/debug/kdb/kdb_main.c | 10 +- kernel/printk/internal.h | 4 +- kernel/printk/printk.c | 427 ++++++++++----------- kernel/printk/printk_safe.c | 29 +- 13 files changed, 281 insertions(+), 303 deletions(-) -- 2.20.1