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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X9Cw0WK4kweSB1yi@alley>
Date:   Wed, 9 Dec 2020 12:11:13 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     John Ogness <john.ogness@...utronix.de>
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: Re: [PATCH next v4 2/2] printk: remove logbuf_lock writer-protection
 of ringbuffer

On Wed 2020-12-09 01:50:53, John Ogness wrote:
> Since the ringbuffer is lockless, there is no need for it to be
> protected by @logbuf_lock. Remove @logbuf_lock writer-protection of
> the ringbuffer. The reader-protection is not removed because some
> some variables used by readers are using @logbuf_lock for
> synchronization: @syslog_seq, @syslog_time, @syslog_partial,
> @console_seq, struct kmsg_dumper.
> 
> For PRINTK_NMI_DIRECT_CONTEXT_MASK, @logbuf_lock usage is not removed
> because it may be used for dumper synchronization.
> 
> Without @logbuf_lock synchronization of vprintk_store() it is no
> longer possible to use the single static buffer for temporarily
> sprint'ing the message. Instead, use vsnprintf() to determine the
> length and perform the real vscnprintf() using the area reserved from
> the ringbuffer. This leads to suboptimal packing of the message data,
> but will result in less wasted storage than multiple per-cpu buffers
> to support lockless temporary sprint'ing.
> 
> Signed-off-by: John Ogness <john.ogness@...utronix.de>

Reviewed-by: Petr Mladek <pmladek@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ