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: <20200513174416.GA331366@bjorn-Precision-5520>
Date:   Wed, 13 May 2020 12:44:16 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     "Rafael J . Wysocki" <rafael@...nel.org>,
        Aman Sharma <amanharitsh123@...il.com>,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v2 0/2] PCI: Check for platform_get_irq() failure
 consistently

On Fri, May 01, 2020 at 05:40:40PM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@...gle.com>
> 
> All callers of platform_get_irq() and related functions interpret a
> negative return value as an error.  A few also interpret zero as an error.
> 
> platform_get_irq() should return either a negative error number or a valid
> non-zero IRQ, so there's no need to check for zero.
> 
> This series:
> 
>   - Extends the platform_get_irq() function comment to say it returns a
>     non-zero IRQ number or a negative error number.
> 
>   - Adds a WARN() if platform_get_irq() ever *does* return zero (this would
>     be a bug in the underlying arch code, and most callers are not prepared
>     for this).
> 
>   - Updates drivers/pci/ to check consistently using "irq < 0".
> 
> This is based on Aman's series [1].  I propose to merge this via the PCI
> tree, given acks from Greg and Thomas.
> 
> [1] https://lore.kernel.org/r/cover.1583952275.git.amanharitsh123@gmail.com
> 
> Aman Sharma (1):
>   PCI: Check for platform_get_irq() failure consistently
> 
> Bjorn Helgaas (1):
>   driver core: platform: Clarify that IRQ 0 is invalid
> 
>  drivers/base/platform.c                       | 40 ++++++++++++-------
>  drivers/pci/controller/dwc/pci-imx6.c         |  4 +-
>  drivers/pci/controller/dwc/pcie-tegra194.c    |  4 +-
>  .../controller/mobiveil/pcie-mobiveil-host.c  |  4 +-
>  drivers/pci/controller/pci-aardvark.c         |  3 ++
>  drivers/pci/controller/pci-v3-semi.c          |  4 +-
>  drivers/pci/controller/pcie-mediatek.c        |  3 ++
>  drivers/pci/controller/pcie-tango.c           |  4 +-
>  8 files changed, 41 insertions(+), 25 deletions(-)

Applied with acks from Greg and Linus W to pci/misc for v5.8.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ