[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260102192930.GA226444@bhelgaas>
Date: Fri, 2 Jan 2026 13:29:30 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Lorenzo Pieralisi <lpieralisi@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-pci@...r.kernel.org, Len Brown <lenb@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH] ACPI: PCI: IRQ: Handle INTx GSIs as u32 values not int
On Fri, Jan 02, 2026 at 12:24:55PM +0100, Lorenzo Pieralisi wrote:
> On Wed, Dec 31, 2025 at 11:01:50AM -0600, Bjorn Helgaas wrote:
> > On Wed, Dec 31, 2025 at 10:26:15AM +0100, Lorenzo Pieralisi wrote:
> > > In ACPI Global System Interrupts (GSIs) are described using a 32-bit
> > > value.
> > >
> > > ACPI/PCI legacy interrupts (INTx) parsing code treats GSIs as 'int', which
> > > poses issues if the GSI interrupt value is a 32-bit value with the MSB set
> > > (as required in some interrupt configurations - eg ARM64 GICv5 systems).
> > >
> > > Fix ACPI/PCI legacy INTx parsing by converting variables representing
> > > GSIs from 'int' to 'u32' bringing the code in line with the ACPI
> > > specification.
> >
> > Looks good to me. Is there any symptom of what the issue looks like
> > that could be mentioned here? Might also be useful in the subject,
> > which currently describes the C code without really saying why we want
> > to do this.
>
> Thanks ! Happy New Year !
Happy New Year!
> acpi_pci_link_allocate_irq() would return a GSI with MSB set, that the
> logic in acpi_pci_irq_enable() would treat as a failure because that's
> a negative value.
>
> After fixing that - passing a 32-bit value with MSB set to
> acpi_irq_get_penalty() causes an array acpi_isa_irq_penalty dereference
> with an an index that is way beyond the array size.
Ouch, out-of-bounds reference. Best case, maybe a data page fault or
a "No IRQ available" message or just a suboptimal IRQ choice.
Powered by blists - more mailing lists