lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 22 Sep 2020 17:44:11 +0206
From:   John Ogness <john.ogness@...utronix.de>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org
Subject: [PATCH printk 0/5] printk: remove logbuf_lock

Hello,

Here is the next series for the printk-rework to remove
@logbuf_lock. Since this lock protected more than just the
ringbuffer, a new finer-grained @syslog_lock is introduced.

With this series, vprintk_store() is lockless.

A consequence of this locklessness is that a different method
for using temporary sprint space was needed. A DIY memory
buffer pool has been implemented for this. Since printk is
used before per-cpu variables are available, I felt that this
was the simplest approach. Feel free to throw tomatoes at me
if another approach should be taken. (And please suggest that
other approach.)

Also as a consequence of a lockless vprintk_store() is that
there is no longer a need for the NMI safe buffers. They are
also removed. The safe buffers for printk recursion are still
used.

This series falls in line with the printk-rework plan as
presented [0] at Linux Plumbers in Lisbon 2019.

The series is based on the printk-rework branch of the printk
git tree:

f35efc78add6 ("printk: remove dict ring")

John Ogness

[0] https://linuxplumbersconf.org/event/4/contributions/290/attachments/276/463/lpc2019_jogness_printk.pdf (slide 23)

John Ogness (5):
  printk: get new seq before enabling interrupts
  printk: kmsg_dump_rewind_nolock: start from first record
  printk: use buffer pool for sprint buffers
  printk: remove logbuf_lock, add syslog_lock
  printk: remove nmi safe buffers

 kernel/printk/internal.h    |   4 +-
 kernel/printk/printk.c      | 320 ++++++++++++++++++++++++------------
 kernel/printk/printk_safe.c |  64 +-------
 3 files changed, 218 insertions(+), 170 deletions(-)

-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ