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: <560F158C.4040303@caviumnetworks.com>
Date:	Fri, 2 Oct 2015 16:38:52 -0700
From:	David Daney <ddaney@...iumnetworks.com>
To:	Yinghai Lu <yinghai@...nel.org>
CC:	David Daney <ddaney.cavm@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"linux-pci@...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>,
	"Sean O. Stalley" <sean.stalley@...el.com>,
	Rajat Jain <rajatxjain@...il.com>,
	"gong.chen@...ux.intel.com" <gong.chen@...ux.intel.com>,
	David Daney <david.daney@...ium.com>
Subject: Re: [PATCH v4 3/5] PCI: Handle IORESOURCE_PCI_FIXED when sizing and
 assigning resources.

On 10/02/2015 04:14 PM, Yinghai Lu wrote:
> On Fri, Oct 2, 2015 at 3:37 PM, David Daney <ddaney.cavm@...il.com> wrote:
>> From: David Daney <david.daney@...ium.com>
>>
>> The new Enhanced Allocation (EA) capability support creates resources
>> with the IORESOURCE_PCI_FIXED set.  This creates a couple of problems:
>>
>> 1) Since these resources cannot be relocated or resized, their
>>     alignment is not really defined, and it is therefore not specified.
>>     This causes a problem in pbus_size_mem() where resources with
>>     unspecified alignment are disabled.
>>
>> 2) During resource assignment in pci_bus_assign_resources(),
>>     IORESOURCE_PCI_FIXED resources are not given a parent.  This, in
>>     turn, causes pci_enable_resources() to fail with a "not claimed"
>>     error.
>>
>> So, in pbus_size_mem() skip IORESOURCE_PCI_FIXED resources, instead of
>> disabling them.
>>
>> In __pci_bus_assign_resources(), for IORESOURCE_PCI_FIXED resources,
>> try to request the resource from a parent bus.
>
> Can you check if
>
> https://patchwork.kernel.org/patch/7304971/
> [v6,05/53] PCI: Don't release fixed resource for realloc


This one isn't relevant as the problem is seen when we are acquiring 
resources, not releasing them.

>
> https://patchwork.kernel.org/patch/7304371/
> [v6,06/53] PCI: Claim fixed resource during remove/rescan path

This one is interesting, but I don't think it will work.

pci_claim_resource() calls pci_find_parent_resource(), which will fail 
in important use cases.

It is perfectly legal for a bridge provisioned by EA to not specify any 
resources.  In this case we must walk up the bus tree until we find 
something that contains the device resource, and can thus be a parent.

That is a big part of what my patch is doing.

As for the merits of assigning fixed resources from the FINAL fixup, 
rather than in __pci_bus_assign_resources(), I am unsure.

Thanks,
David Daney


>
> address the the problem that you met?
>
>          Yinghai
>

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