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:   Tue, 15 Feb 2022 18:21:05 +0100
From:   Daniel Bristot de Oliveira <bristot@...nel.org>
To:     John Ogness <john.ogness@...utronix.de>,
        Shuah Khan <skhan@...uxfoundation.org>,
        Steven Rostedt <rostedt@...dmis.org>
Cc:     Jonathan Corbet <corbet@....net>, Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Marco Elver <elver@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Gabriele Paoloni <gpaoloni@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Clark Williams <williams@...hat.com>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-trace-devel@...r.kernel.org
Subject: Re: [RFC V2 12/21] rv/reactor: Add the printk reactor

On 2/15/22 14:33, John Ogness wrote:
> On 2022-02-15, Daniel Bristot de Oliveira <bristot@...nel.org> wrote:
>>> I suggest using printk_deferred() for this reactor for now. With
>>> printk_deferred() the message and timestamp are immediately and
>>> locklessly stored in the buffer, and the printing is performed in a
>>> separate context. printk_deferred() is safe for all contexts.
>> Question: Does it always postpone or only postpone when in a
>> particular contexts, like, with irqs disabled?
> printk_deferred() always postpones printing.

That is why printk() seems to be the better option, though I can use the
deferred option too.

Noting that, I am aware of printk_deferred(), and every once and while I am
Cc'ed on patches suggesting changing printk() to printk_deferred(), but they are
not, let's say, welcome [1]... that is why I am not using it.

>> Note: do not use this reactor with rq_lock taken, it will lock the
>> system until printk can handle that.
> Perhaps you could explain thi comment in your commit message?  printk()
> should never lock the system.

I saw deadlocks in the past, and while testing the WIP monitor some time ago, it
seems it depends on the console type. If such restriction does not exist
anymore, I can remove that comment, it would be even better!

[1]
https://lore.kernel.org/lkml/e68888438cec9a1da53aaa1647720ade638d6ad4.1600705105.git.bristot@redhat.com/

-- Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ