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]
Date:   Wed, 19 Apr 2023 12:31:44 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Michal Hocko <mhocko@...e.com>
Cc:     John Ogness <john.ogness@...utronix.de>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Steven Rostedt <rostedt@...dmis.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] printk: Enough to disable preemption in printk deferred
 context

On Wed 2023-04-19 10:23:33, Michal Hocko wrote:
> On Wed 19-04-23 09:42:10, Petr Mladek wrote:
> > The comment above printk_deferred_enter()/exit() definition claims
> > that it can be used only when interrupts are disabled.
> > 
> > It was required by the original printk_safe_log_store() implementation.
> > The code provided lockless synchronization between a single writer and
> > a single reader. The interrupt and the normal context shared the same
> > buffer.
> > 
> > The commit 93d102f094be ("printk: remove safe buffers") removed
> > these temporary buffers. Instead, the messages are stored directly into
> > the new global lockless buffer which supports multiple parallel writers.
> > 
> > As a result, it is safe to interrupt one writer now. The preemption still
> > has to be disabled because the deferred context is CPU specific.
> 
> Thanks for the clarification and explanation.
> 
> > Fixes: 93d102f094be ("printk: remove safe buffers")
> 
> Is this a fix though? I would expect some users to be changed from irq
> to preempt to disabling to be considered a fix.

Yeah, I am not sure about the Fixes tag either. I wanted to cross-link
the two commits. But it is probably enough to mention it in the commit
message.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ