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] [thread-next>] [day] [month] [year] [list]
Message-ID: <877cr6pj40.fsf@jogness.linutronix.de>
Date:   Tue, 11 Jul 2023 17:29:43 +0206
From:   John Ogness <john.ogness@...utronix.de>
To:     Sergey Senozhatsky <senozhatsky@...omium.org>
Cc:     Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH printk v2 4/5] printk: Add per-console suspended state

On 2023-07-12, Sergey Senozhatsky <senozhatsky@...omium.org> wrote:
>> @@ -2623,8 +2647,6 @@ void console_lock(void)
>>  		msleep(1000);
>>  
>>  	down_console_sem();
>> -	if (console_suspended)
>> -		return;
>>  	console_locked = 1;
>>  	console_may_schedule = 1;
>>  }
>> @@ -2645,10 +2667,6 @@ int console_trylock(void)
>>  		return 0;
>>  	if (down_trylock_console_sem())
>>  		return 0;
>> -	if (console_suspended) {
>> -		up_console_sem();
>> -		return 0;
>> -	}
>>  	console_locked = 1;
>>  	console_may_schedule = 0;
>>  	return 1;
>
> Interesting. console_locked previously would not be set if
> console is suspended, but now it's always set, which in theory
> changes the way WARN_CONSOLE_UNLOCKED() macro works in some
> cases?

Yes, Petr mentioned [0] this during the v1 review. His direct comment:

  "console_locked" seems to be used only in WARN_CONSOLE_UNLOCKED().
  I could imagine a corner case where, for example, "vt" code does
  not print the warning because it works as it works. But it does
  not make much sense. IMHO, such a code should get fixed. And it
  is just a warning after all.

And his final comment in that thread:

  I believe that @console_suspended is not longer needed.
  Let's replace it with the per-console flag and do not worry
  about races.

John Ogness

[0] https://lore.kernel.org/lkml/ZAieQtcs7YEuCCDa@alley

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ