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: <ZWTSp70g_PLH963C@alley>
Date:   Mon, 27 Nov 2023 18:32:23 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     lizhe.67@...edance.com
Cc:     dianders@...omium.org, akpm@...ux-foundation.org,
        lecopzer.chen@...iatek.com, kernelfans@...il.com,
        linux-kernel@...r.kernel.org, lizefan.x@...edance.com
Subject: Re: [PATCH v3] softlockup: serialized softlockup's log

On Thu 2023-11-23 16:40:22, lizhe.67@...edance.com wrote:
> From: Li Zhe <lizhe.67@...edance.com>
> 
> If multiple CPUs trigger softlockup at the same time with
> 'softlockup_all_cpu_backtrace=0', the softlockup's logs will appear
> staggeredly in dmesg, which will affect the viewing of the logs for
> developer. Since the code path for outputting softlockup logs is not
> a kernel hotspot and the performance requirements for the code are
> not strict, locks are used to serialize the softlockup log output to
> improve the readability of the logs.
> 
> Signed-off-by: Li Zhe <lizhe.67@...edance.com>

I do not feel fully comfortable with adding a lock into a code path
which reports system lockups. There might already be a deadlock on
the system and yet another lock would not make things easier.

On the other hand, the added spinlock looks pretty safe:

   + It synchronizes only watchdog_timer_fn() calls against each other.
     watchdog_timer_fn() could not be nested.

   + The locked code seems to be synchronized only by RCU
     and does not wait for other CPUs to finish something.


I haven't found any real deadlock scenario. Feel free
to use:

Reviewed-by: Petr Mladek <pmladek@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ