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: <55F14619.4030007@linux.intel.com>
Date:	Thu, 10 Sep 2015 16:58:01 +0800
From:	Jiang Liu <jiang.liu@...ux.intel.com>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Arthur Marsh <arthur.marsh@...ernode.on.net>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
Subject: Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices
 managed by non-PCI drivers

On 2015/9/10 3:11, Bjorn Helgaas wrote:
> On Tue, Sep 8, 2015 at 11:49 AM, Jiang Liu <jiang.liu@...ux.intel.com> wrote:
>> Hi Bjorn,
>>         We have used another draft version to fix this issue by changing
>> eata driver as below. But that needs to export pcibios_alloc_irq. And
>> I'm not sure whether there are other drivers having the same behavior.
>> If we think it's a legacy behavior and only a few drivers may have
>> such a behavior, I prefer changing drivers to fix the issue too.
> 
> Did you look at changing the driver to use pci_register_driver()?  I
> bet it's pretty straightforward.
Hi Bjorn,
	I have done some investigation. It's doable, but the change
may be a little bigger. Will send the patch out for comments once
it's done.
Thanks!
Gerry

> 
>>  drivers/pci/pci-driver.c |    1 +
>>  drivers/scsi/eata.c      |    2 ++
>>  2 files changed, 3 insertions(+)
>>
>> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
>> index 52a880ca1768..17d2a0b1de18 100644
>> --- a/drivers/pci/pci-driver.c
>> +++ b/drivers/pci/pci-driver.c
>> @@ -392,6 +392,7 @@ int __weak pcibios_alloc_irq(struct pci_dev *dev)
>>  {
>>         return 0;
>>  }
>> +EXPORT_SYMBOL_GPL(pcibios_alloc_irq);
>>
>>  void __weak pcibios_free_irq(struct pci_dev *dev)
>>  {
>> diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
>> index 227dd2c2ec2f..7e6eaf867987 100644
>> --- a/drivers/scsi/eata.c
>> +++ b/drivers/scsi/eata.c
>> @@ -1061,6 +1061,7 @@ static void enable_pci_ports(void)
>>                        driver_name, dev->bus->number, dev->devfn);
>>  #endif
>>
>> +               pcibios_alloc_irq(dev);
>>                 if (pci_enable_device(dev))
>>                         printk
>>                             ("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n",
>> @@ -1520,6 +1521,7 @@ static void add_pci_ports(void)
>>                 if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev)))
>>                         break;
>>
>> +               pcibios_alloc_irq(dev);
>>                 if (pci_enable_device(dev)) {
>>  #if defined(DEBUG_PCI_DETECT)
>>                         printk
>>
>>
>>>
>>>>      return pci_enable_resources(dev, mask);
>>>>  }
>>>>
>>>> --
>>>> 1.7.10.4
>>>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ