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]
Date:   Sat, 5 Aug 2023 10:17:05 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Liu Song <liusong@...ux.alibaba.com>
Cc:     dianders@...omium.org, pmladek@...e.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog/hardlockup: set watchdog_hardlockup_warned to
 true as early as possible

On Sun,  6 Aug 2023 00:01:44 +0800 Liu Song <liusong@...ux.alibaba.com> wrote:

> Since we want to ensure only printing hardlockups once, it is necessary
> to set "watchdog_hardlockup_warned" to true as early as possible.
> 
> ...
>
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -180,6 +180,8 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
>  		/* Only print hardlockups once. */
>  		if (per_cpu(watchdog_hardlockup_warned, cpu))
>  			return;
> +		else
> +			per_cpu(watchdog_hardlockup_warned, cpu) = true;

The "else" is unneeded.
  
>  		pr_emerg("Watchdog detected hard LOCKUP on cpu %d\n", cpu);
>  		print_modules();
> @@ -206,8 +208,6 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
>  
>  		if (hardlockup_panic)
>  			nmi_panic(regs, "Hard LOCKUP");
> -
> -		per_cpu(watchdog_hardlockup_warned, cpu) = true;
>  	} else {
>  		per_cpu(watchdog_hardlockup_warned, cpu) = false;
>  	}

When resending, please tell us some more about the effects of the
change.  Presumably there are circumstances in which excess output is
produced?  If so, describe these circumstances and the observed
effects.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ