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]
Date:	Tue, 29 Sep 2015 16:53:20 -0700
From:	David Daney <ddaney@...iumnetworks.com>
To:	"Sean O. Stalley" <sean.stalley@...el.com>
CC:	David Daney <ddaney.cavm@...il.com>,
	<linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Rafał Miłecki <zajec5@...il.com>,
	<linux-api@...r.kernel.org>, <yinghai@...nel.org>,
	<rajatxjain@...il.com>, <gong.chen@...ux.intel.com>,
	David Daney <david.daney@...ium.com>
Subject: Re: [PATCH v3 2/2] PCI: Add support for Enhanced Allocation devices

On 09/29/2015 03:47 PM, Sean O. Stalley wrote:
[...]
>>>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
>>>> index 6a9a111..7c60b16 100644
>>>> --- a/drivers/pci/pci.c
>>>> +++ b/drivers/pci/pci.c
>>>> @@ -2148,6 +2148,284 @@ void pci_pm_init(struct pci_dev *dev)
>>>>   	}
>>>>   }
>>>>
>>>> +static unsigned long pci_ea_set_flags(struct pci_dev *dev, u8 prop)
>>>> +{
>>>> +	unsigned long flags = IORESOURCE_PCI_FIXED | IORESOURCE_SIZEALIGN;
>>>
>>> Why did you add the IORESOURCE_SIZEALIGN flag? EA allows for unaligned resources.
>>
>> pci_bus_assign_resources() fails causing the devices to be unusable
>> if resource_alignment() returns zero.  The easiest fix for this was
>> to specify IORESOURCE_SIZEALIGN.
>>
>> An alternative would be to change the code in setup-bus.c so that
>> for IORESOURCE_PCI_FIXED resources, it didn't barf.
>
> I would do this alternative, but with a IORESOURCE_PCI_EA flag.
>

I don't think we need IORESOURCE_PCI_EA.  If a resource is tagged as 
IORESOURCE_PCI_FIXED that means that it cannot be changed, we shouldn't 
care why it is fixed (due to an EA capability for example).  We just 
need to gracefully handle IORESOURCE_PCI_FIXED in the places where 
things currently go wrong.

David Daney

--
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