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: <877cbtj6qv.fsf@jogness.linutronix.de>
Date: Tue, 03 Sep 2024 13:56:48 +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 09/17] printk: nbcon: Rely on kthreads for
 normal operation

On 2024-09-03, Petr Mladek <pmladek@...e.com> wrote:
>> @@ -3071,12 +3080,21 @@ static bool console_flush_all(bool do_cond_resched, u64 *next_seq, bool *handove
>>  	do {
>>  		any_progress = false;
>>  
>> +		printk_get_console_flush_type(&ft);
>> +
>>  		cookie = console_srcu_read_lock();
>>  		for_each_console_srcu(con) {
>>  			short flags = console_srcu_read_flags(con);
>>  			u64 printk_seq;
>>  			bool progress;
>>  
>> +			/*
>> +			 * console_flush_all() is only for legacy consoles when
>> +			 * the nbcon consoles have their printer threads.
>> +			 */
>> +			if ((flags & CON_NBCON) && ft.nbcon_offload)
>> +				continue;
>
> I mean that we really
> should handle nbcon consoles in the legacy loop only when there
> is a boot console (both ft.nbcon_* == false).

Agreed. I will change it to:

			/*
			 * console_flush_all() is only responsible for nbcon
			 * consoles when the nbcon consoles cannot print via
			 * their atomic or threaded flushing.
			 */
			if ((flags & CON_NBCON) && (ft.nbcon_atomic || ft.nbcon_offload))
				continue;


Also note that patch 15/17 ("printk: Implement legacy printer kthread
for PREEMPT_RT") has the same check in legacy_kthread_should_wakeup(),
which I will also update.

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ