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: <f84dd20d-8bae-4065-8b7e-9a0ea60e6b88@nvidia.com>
Date: Wed, 27 Aug 2025 11:04:33 +0100
From: Jon Hunter <jonathanh@...dia.com>
To: Inochi Amaoto <inochiama@...il.com>, Bjorn Helgaas <bhelgaas@...gle.com>,
 Marc Zyngier <maz@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
 Lorenzo Pieralisi <lpieralisi@...nel.org>,
 Shradha Gupta <shradhagupta@...ux.microsoft.com>,
 Nathan Chancellor <nathan@...nel.org>,
 Anders Roxell <anders.roxell@...aro.org>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
 Longbin Li <looong.bin@...il.com>,
 Linux Kernel Functional Testing <lkft@...aro.org>,
 "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH] PCI/MSI: Check MSI_FLAG_PCI_MSI_MASK_PARENT in
 cond_[startup|shutdown]_parent()


On 27/08/2025 07:29, Inochi Amaoto wrote:
> For msi controller that only supports MSI_FLAG_PCI_MSI_MASK_PARENT,
> the newly added callback irq_startup() and irq_shutdown() for
> pci_msi[x]_templete will not unmask/mask the interrupt when startup/
> shutdown the interrupt. This will prevent the interrupt from being
> enabled/disabled normally.
> 
> Add the missing check for MSI_FLAG_PCI_MSI_MASK_PARENT in the
> cond_[startup|shutdown]_parent(). So the interrupt can be normally
> unmasked/masked if it does not support MSI_FLAG_PCI_MSI_MASK_PARENT.
> 
> Fixes: 54f45a30c0d0 ("PCI/MSI: Add startup/shutdown for per device domains")
> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Closes: https://lore.kernel.org/regressions/aK4O7Hl8NCVEMznB@monster/
> Signed-off-by: Inochi Amaoto <inochiama@...il.com>
> Tested-by: Nathan Chancellor <nathan@...nel.org>
> ---
>   drivers/pci/msi/irqdomain.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/pci/msi/irqdomain.c b/drivers/pci/msi/irqdomain.c
> index e0a800f918e8..b11b7f63f0d6 100644
> --- a/drivers/pci/msi/irqdomain.c
> +++ b/drivers/pci/msi/irqdomain.c
> @@ -154,6 +154,8 @@ static void cond_shutdown_parent(struct irq_data *data)
> 
>   	if (unlikely(info->flags & MSI_FLAG_PCI_MSI_STARTUP_PARENT))
>   		irq_chip_shutdown_parent(data);
> +	else if (unlikely(info->flags & MSI_FLAG_PCI_MSI_MASK_PARENT))
> +		irq_chip_mask_parent(data);
>   }
> 
>   static unsigned int cond_startup_parent(struct irq_data *data)
> @@ -162,6 +164,9 @@ static unsigned int cond_startup_parent(struct irq_data *data)
> 
>   	if (unlikely(info->flags & MSI_FLAG_PCI_MSI_STARTUP_PARENT))
>   		return irq_chip_startup_parent(data);
> +	else if (unlikely(info->flags & MSI_FLAG_PCI_MSI_MASK_PARENT))
> +		irq_chip_unmask_parent(data);
> +
>   	return 0;
>   }


FWIW, this also fixes a boot regression for Tegra124 Jetson TK1.

Tested-by: Jon Hunter <jonathanh@...dia.com>

Thanks!
Jon

-- 
nvpublic


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ