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: <aMfpwYPX6_i6ROOY@willie-the-truck>
Date: Mon, 15 Sep 2025 11:26:09 +0100
From: Will Deacon <will@...nel.org>
To: Yunhui Cui <cuiyunhui@...edance.com>
Cc: akpm@...ux-foundation.org, catalin.marinas@....com, maddy@...ux.ibm.com,
	mpe@...erman.id.au, npiggin@...il.com, christophe.leroy@...roup.eu,
	tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
	dave.hansen@...ux.intel.com, hpa@...or.com, peterz@...radead.org,
	acme@...nel.org, namhyung@...nel.org, mark.rutland@....com,
	alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
	irogers@...gle.com, adrian.hunter@...el.com,
	kan.liang@...ux.intel.com, kees@...nel.org, masahiroy@...nel.org,
	aliceryhl@...gle.com, ojeda@...nel.org,
	thomas.weissschuh@...utronix.de, xur@...gle.com,
	ruanjinjie@...wei.com, gshan@...hat.com, maz@...nel.org,
	suzuki.poulose@....com, zhanjie9@...ilicon.com,
	yangyicong@...ilicon.com, dianders@...omium.org,
	gautam@...ux.ibm.com, arnd@...db.de, zhao.xichao@...o.com,
	rppt@...nel.org, lihuafei1@...wei.com, coxu@...hat.com,
	jpoimboe@...nel.org, yaozhenguo1@...il.com,
	luogengkun@...weicloud.com, max.kellermann@...os.com, tj@...nel.org,
	wangjinchao600@...il.com, yury.norov@...il.com,
	thorsten.blum@...ux.dev, x86@...nel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linuxppc-dev@...ts.ozlabs.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] watchdog: remove HARDLOCKUP_DETECTOR_PERF

On Mon, Sep 15, 2025 at 11:53:55AM +0800, Yunhui Cui wrote:
> There are currently two hard lockup detector implementations:
> HARDLOCKUP_DETECTOR_PERF (perf-based) and HARDLOCKUP_DETECTOR_BUDDY
> (buddy-based). When enabling the hardlockup feature on new arch
> (e.g., RISC-V), ambiguity arises regarding which detector to choose.
> 
> From the community discussion (see link below [1]), the buddy approach is
> preferred. So remove the HARDLOCKUP_DETECTOR_PERF implementation.
> 
> Link: https://lore.kernel.org/all/CAD=FV=WWUiCi6bZCs_gseFpDDWNkuJMoL6XCftEo6W7q6jRCkg@mail.gmail.com/ [1]

This is a link to a thread containing two messages, so I think it's a
little premature to say whether one driver is preferred over the other.

> Signed-off-by: Yunhui Cui <cuiyunhui@...edance.com>
> ---
>  arch/Kconfig                     |  14 --
>  arch/arm64/Kconfig               |   3 -
>  arch/arm64/kernel/Makefile       |   1 -
>  arch/arm64/kernel/watchdog_hld.c |  94 ----------

The main reason we used HARDLOCKUP_DETECTOR_PERF on arm64 is because we
can use interrupt priorities to treat the PMU overflow interrupt like
an NMI, meaning that even if CPUs get wedged with irqs disabled then
we're still able to trigger the watchdog reset.

How does HARDLOCKUP_DETECTOR_BUDDY achieve that? From my cursory glance
at the code, it just looks to be using an hrtimer.

/me looks back at the "discussion" cited in the commit message:

  | If all CPUs are hard locked up at the same time the buddy system
  | can't detect it.

Ok, so why is that limitation acceptable? It looks to me like you're
removing useful functionality.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ