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] [day] [month] [year] [list]
Date:   Tue, 3 Mar 2020 19:27:53 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        linux-kernel@...r.kernel.org,
        Lech Perczak <l.perczak@...lintechnologies.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Theodore Ts'o <tytso@....edu>,
        John Ogness <john.ogness@...utronix.de>
Subject: Re: [PATCH] printk: queue wake_up_klogd irq_work only if per-CPU
 areas are ready

On (20/03/03 10:18), Petr Mladek wrote:
[..]
> >  static void queue_flush_work(struct printk_safe_seq_buf *s)
> >  {
> > -	if (printk_safe_irq_ready)
> > +	if (printk_percpu_data_ready())
> >  		irq_work_queue(&s->work);
> 
> This is not safe. printk_percpu_data_ready() returns true even before
> s->work gets initialized by printk_safe_init().

Good catch! I'll move printk_safe_init() call from init/main.c to
set_percpu_data_ready().

> Solution would be to call printk_safe_init() from
> setup_log_buf() before calling set_percpu_data_ready().

I'll move the init call. But printk_safe/nmi called too-early
will still write to no-yet-initialised per-cpu data.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ