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:	Thu, 1 Oct 2015 09:45:18 +0200 (CEST)
From:	Jiri Kosina <jikos@...nel.org>
To:	Aaron Tomlin <atomlin@...hat.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Ulrich Obergfell <uobergfe@...hat.com>,
	Don Zickus <dzickus@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog: perform all-CPU backtrace in case of hard
 lockup

On Thu, 1 Oct 2015, Aaron Tomlin wrote:

> > +		/*
> > +		 * Perform all-CPU dump only once to avoid multiple hardlockups
> > +		 * generating interleaving traces
> > +		 */
> > +		if (sysctl_hardlockup_all_cpu_backtrace &&
> > +				!test_and_set_bit(0, &hardlockup_allcpu_dumped))
> > +			trigger_allbutself_cpu_backtrace();
> 
> How does this play when 'softlockup_all_cpu_backtrace' is enabled too?

That should be fine. Worst case scenario is hardlockup and softlockup 
trigerring 'in parallel' on different CPUs, and all-cpu backtrace being 
triggered twice.

Frankly, I've never seen this happen in practice (hardlockup and 
softlockup triggering at different CPUs at the very same time).

We could possibly make a global 'all_cpus_dump_in_progress' flag so that 
we guarantee only one stream of dumps, but we'd need to convert everybody 
using this facility (e.g. RCU stall detector, and whoever else) to be 
aware of it as well, otherwise it wouldn't make too much sense.

Something to add to TODO I guess.

> 
> > +
> > +		if (hardlockup_panic)
> > +			panic("Hard LOCKUP");
> >  
> >  		__this_cpu_write(hard_watchdog_warn, true);
> >  		return;
> 
> This does indeed appear similar to Linus commit ed235875
> ("kernel/watchdog.c: print traces for all cpus on lockup detection");
> albeit for the hardlockup detector.
> 
> Looks fine to me. Thanks!
> 
> Reviewed-by: Aaron Tomlin <atomlin@...hat.com>

Thanks,

-- 
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ