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: <87wm4lbqt2.fsf@jogness.linutronix.de>
Date: Thu, 23 Oct 2025 17:12:49 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Oleg Nesterov
 <oleg@...hat.com>, Petr Mladek <pmladek@...e.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] printk_legacy_map: use LD_WAIT_CONFIG instead of
 LD_WAIT_SLEEP

On 2025-10-23, Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
>> @@ -3016,7 +3017,7 @@ bool printk_get_next_message(struct printk_message *pmsg, u64 seq,
>>  static inline void printk_legacy_allow_spinlock_enter(void) { }
>>  static inline void printk_legacy_allow_spinlock_exit(void) { }
>>  #else
>> -static DEFINE_WAIT_OVERRIDE_MAP(printk_legacy_map, LD_WAIT_SLEEP);
>> +static DEFINE_WAIT_OVERRIDE_MAP(printk_legacy_map, LD_WAIT_CONFIG);
>
> We could use this lock_map_acquire_try() directly but okay having it in
> one spot with a comment might have its benefit. But _why_ is here a
> CONFIG_PREEMPT_RT? This is supposed to work in both cases. Should a
> legacy driver be invoked on RT then the comment is not accurate, lockdep
> won't yell but we still have CONFIG_DEBUG_ATOMIC_SLEEP making its own
> judgement.

With PREEMPT_RT, legacy console printing is forced into its own
dedicated kthread. At runtime this is checked via
force_legacy_kthread(). So with PREEMPT_RT there is no need for special
lockdep trickery. Once we can get all the consoles switched over to
nbcon, !PREEMPT_RT will also not need this lockdep trickery.

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ