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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <845xdak47j.fsf@jogness.linutronix.de>
Date: Mon, 22 Sep 2025 15:33:12 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Andrew Murray <amurray@...goodpenguin.co.uk>, Petr Mladek
 <pmladek@...e.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, Sergey Senozhatsky
 <senozhatsky@...omium.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 2/2] printk: Use console_flush_one_record for legacy
 printer kthread

On 2025-09-19, Andrew Murray <amurray@...goodpenguin.co.uk> wrote:
>> I played with the code and came up with:
>>
>> static int legacy_kthread_func(void *unused)
>> {
>>         bool any_progress;
>>
>> wait_for_event:
>>         wait_event_interruptible(legacy_wait, legacy_kthread_should_wakeup());
>>
>>         do {
>>                 bool any_usable;
>>                 bool handover;
>>                 u64 next_seq;
>>
>>                 if (kthread_should_stop())
>>                         return 0;
>
> This changes the behaviour from the existing legacy_kthread_func. Thus
> allowing the thread to exit mid way through printing remaining
> records, whereas previously the whole set of unprinted records would
> first be printed. But that's probably a good thing.

It does not matter. kthread_should_stop() will only return true from
printk_kthreads_check_locked() when @have_legacy_console and
@have_boot_console are both false. That means that whatever legacy or
boot consoles there were, they are now unregistered, and were already
flushed from within their unregister_console_locked().

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ