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]
Message-ID: <87seybdlwi.fsf@jogness.linutronix.de>
Date: Tue, 21 May 2024 21:13:09 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>, Steven Rostedt
 <rostedt@...dmis.org>, Thomas Gleixner <tglx@...utronix.de>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH printk v5 19/30] printk: nbcon: Provide function to
 flush using write_atomic()

On 2024-05-20, Petr Mladek <pmladek@...e.com> wrote:
> What about reshufling the code a bit?
>
> <proposal>
  [...]
> </proposal>

Your proposal is fine and is easier to follow. Thanks.

>> +	/*
>> +	 * This context must flush any new records added while the console
>> +	 * was locked. The console_srcu_read_lock must be taken to ensure
>> +	 * the console is usable throughout flushing.
>> +	 */
>> +	cookie = console_srcu_read_lock();
>
> In principle, this should not be needed because the console is
> added/removed under con->device_lock() in
> register_console()/unregister_console().  And this function
> nbcon_driver_release() should be called under the same lock.

I added a comment here to make it clear why it is needed. It is about
making sure the console is _usable_ during the flushing, i.e. it
prevents console_suspend() and console_stop() from exiting while the
flush is in progress.

I will leave this as is for v6.

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ