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] [day] [month] [year] [list]
Message-ID: <8de10920-f777-4419-9933-1d005828a9f7@kernel.org>
Date: Thu, 31 Jul 2025 09:46:54 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Wladislav Wiebe <wladislav.wiebe@...ia.com>, tglx@...utronix.de,
 corbet@....net
Cc: akpm@...ux-foundation.org, paulmck@...nel.org, rostedt@...dmis.org,
 Neeraj.Upadhyay@....com, david@...hat.com, bp@...en8.de, arnd@...db.de,
 fvdl@...gle.com, linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 peterz@...radead.org
Subject: Re: [PATCH v4] genirq: add support for warning on long-running IRQ
 handlers

On 24. 07. 25, 17:50, Wladislav Wiebe wrote:
> Introduce a mechanism to detect and warn about prolonged IRQ handlers.
> With a new command-line parameter (irqhandler.duration_warn_us=),
> users can configure the duration threshold in microseconds when a warning
> in such format should be emitted:
> 
> "[CPU14] long duration of IRQ[159:bad_irq_handler [long_irq]], took: 1330 us"
> 
> The implementation uses local_clock() to measure the execution duration of the
> generic IRQ per-CPU event handler.


This version LGTM

Reviewed-by: Jiri Slaby <jirislaby@...nel.org>

> --- a/kernel/irq/handle.c
> +++ b/kernel/irq/handle.c
...
> +static inline void irqhandler_duration_check(u64 ts_start, unsigned int irq,
> +					     const struct irqaction *action)
> +{
> +	u64 delta_ns = local_clock() - ts_start;
> +
> +	if (unlikely(delta_ns > irqhandler_duration_threshold_ns)) {
> +		pr_warn_ratelimited("[CPU%u] long duration of IRQ[%u:%ps], took: %llu us\n",
> +				    smp_processor_id(), irq, action->handler,
> +				    delta_ns >> 10);

Only that: would the division matter in here? Or print ns? But feel free 
to ignore this.

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ