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: <CAJZ5v0hW1jusNnW8TFTX_fwXzsfBjkFTjHTBQ+iWQyDKe3CETw@mail.gmail.com>
Date:	Sat, 23 Jan 2016 03:00:48 +0100
From:	"Rafael J. Wysocki" <rafael@...nel.org>
To:	David Daney <ddaney.cavm@...il.com>
Cc:	Bjorn Helgaas <helgaas@...nel.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Cao jin <caoj.fnst@...fujitsu.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Chen Fan <chen.fan.fnst@...fujitsu.com>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Len Brown <lenb@...nel.org>, izumi.taku@...fujitsu.com,
	wency@...fujitsu.com, Bjorn Helgaas <bhelgaas@...gle.com>,
	Linux PCI <linux-pci@...r.kernel.org>,
	Jiang Liu <jiang.liu@...ux.intel.com>
Subject: Re: [PATCH] pci: fix unavailable irq number 255 reported by BIOS

On Fri, Jan 22, 2016 at 8:23 PM, David Daney <ddaney.cavm@...il.com> wrote:
> On 01/22/2016 09:53 AM, Bjorn Helgaas wrote:
>>
>> On Thu, Jan 21, 2016 at 11:58:26PM +0100, Rafael J. Wysocki wrote:
>>>
>>> On Thu, Jan 21, 2016 at 3:41 PM, Cao jin <caoj.fnst@...fujitsu.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>>      IMHO, I think maybe modification on i801_smbus driver is easier.
>>>>
>>>>      Because when i801_smbus request_irq using pci_dev->irq, this
>>>> pci_dev->irq seems still holds the value read from register(
>>>> pci_setup_device->pci_read_irq), if the value is 255, it is invalid in
>>>> register,
>>>
>>>
>>> Right.
>>>
>>> Which is why the PCI core should not leak it into the driver's ->probe
>>> callback.
>>
>>
>> Is there a reserved IRQ value we could use to mean "invalid"?
>
>
> In many (most) cases, zero indicates no irq.

Zero is a valid timer IRQ on x86, though, so it's better not to give
any special meaning to it in general.

Using ~0 as suggested by Bjorn should work as it would cause
request_irq() to return -EINVAL if passed to it AFAICS.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ