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: <CAMOZA0+XXqau3rW-ZUKBkZASmEYwrmTuHfwkreniJk9NciCe_g@mail.gmail.com>
Date: Thu, 13 Nov 2025 23:42:08 +0100
From: Luigi Rizzo <lrizzo@...gle.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Marc Zyngier <maz@...nel.org>, Luigi Rizzo <rizzo.unipi@...il.com>, 
	Paolo Abeni <pabeni@...hat.com>, Andrew Morton <akpm@...ux-foundation.org>, 
	Sean Christopherson <seanjc@...gle.com>, Jacob Pan <jacob.jun.pan@...ux.intel.com>, 
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org, 
	Bjorn Helgaas <bhelgaas@...gle.com>, Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH 2/6] genirq: soft_moderation: add base files, procfs hooks

On Thu, Nov 13, 2025 at 11:24 AM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> On Thu, Nov 13 2025 at 10:29, Thomas Gleixner wrote:
> > On Wed, Nov 12 2025 at 19:24, Luigi Rizzo wrote:
> >>  [...]
> >> +            struct irq_chip *chip = desc->irq_data.chip;
> >> +
> >> +            /* Make sure this is msi and we can run enable_irq from irq context */
> >> +            mode &= desc->handle_irq == handle_edge_irq && chip && chip->irq_bus_lock == NULL &&
> >> +                            chip->irq_bus_sync_unlock == NULL;
>
> Q: How does this make sure that it is MSI?
> A: Not at all

Yeah the MSI thing was misguided, as Marc suggested I will replace the condition
with !irqd_is_level_type(&desc->irq_data)

> Q: How is this protected against concurrent modification?
> A: Not at all

Is there such a risk, specifically regarding changing desc->chip ?
I expected desc->chip to be set when the irq is attached and never modified
until destruction. Then, this function is called from within the
procfs handler so
the desc is already set. If it gets destroyed, changing mode is harmless.

cheers
luigi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ