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: <aP9gWId8aav-LjA-@smile.fi.intel.com>
Date: Mon, 27 Oct 2025 14:06:48 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Ciju Rajan K <crajank@...dia.com>
Cc: hdegoede@...hat.com, ilpo.jarvinen@...ux.intel.com, tglx@...utronix.de,
	linux-kernel@...r.kernel.org, christophe.jaillet@...adoo.fr,
	platform-driver-x86@...r.kernel.org, vadimp@...dia.com
Subject: Re: [PATCH platform-next v3 1/1] [PATCH platform-next]
 platform/mellanox: mlxreg-hotplug: Add support for handling interrupt storm

On Tue, Sep 23, 2025 at 04:49:54PM +0300, Ciju Rajan K wrote:
> In case of broken hardware, it is possible that broken device will
> flood interrupt handler with false events. For example, if fan or
> power supply has damaged presence pin, it will cause permanent
> generation of plugged in / plugged out events. As a result, interrupt
> handler will consume a lot of CPU resources and will keep raising
> "UDEV" events to the user space.
> 
> This patch provides a mechanism to detect device causing interrupt
> flooding and mask interrupt for this specific device, to isolate
> from interrupt handling flow. Use the following criteria: if the
> specific interrupt was generated 'N' times during 'T' seconds,
> such device is to be considered as broken and will be closed for
> getting interrupts. User will be notified through the log error
> and will be instructed to replace broken device.
> 
> Add fields for interrupt storm handling.
> Extend structure mlxreg_core_data with the following fields:
>  'wmark_cntr'   - interrupt storm counter.
>  'wmark_window' - time window to count interrupts to check for storm.
> 
> Extend structure mlxreg_core_item with the following field:
>  'storming_bits' - interrupt storming bits mask.

...

>  	for_each_set_bit(bit, &asserted, 8) {
>  		int pos;
>  
> +		/* Skip already marked storming bit. */
> +		if (item->storming_bits & BIT(bit))
> +			continue;

Instead, just mask "asserted" correspondingly before for-loop.

...

> struct mlxreg_core_data {

>  	u8 regnum;
>  	u8 slot;
>  	u8 secured;
> +	unsigned int wmark_cntr;
> +	unsigned long wmark_window;

Is it okay to use variadic (arch-dependent) types? The context suggests that
this data sturcture has fixed-width fields.

>  };

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ