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: <CAE9FiQVDkWSrm0Z9N+zW=Pb2gL6CW9EBj7CcOfKD=1uizRqP6Q@mail.gmail.com>
Date:	Wed, 10 Dec 2014 10:18:58 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Wei Yang <weiyang@...ux.vnet.ibm.com>
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>,
	Gavin Shan <gwshan@...ux.vnet.ibm.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Marek Kordík <kordikmarek@...il.com>,
	Alexey Voronkov <zermond@...il.com>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI: Clear all bridge res MEM_64 if host bridge has non mem64

On Wed, Dec 10, 2014 at 6:34 AM, Wei Yang <weiyang@...ux.vnet.ibm.com> wrote:
> My mutt hang, in case the mail isn't sent out, I resend it.
>
> On Wed, Dec 10, 2014 at 10:15:37PM +0800, Wei Yang wrote:
>>On Tue, Dec 09, 2014 at 03:13:49PM -0800, Yinghai Lu wrote:
>>>On Tue, Dec 9, 2014 at 1:53 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
>>>> On Tue, Dec 9, 2014 at 2:34 PM, Yinghai Lu <yinghai@...nel.org> wrote:
>>>>> +       list_for_each_entry(window, &bridge->windows, list) {
>>>>> +               res = window->res;
>>>>> +               if (resource_type(res) == IORESOURCE_MEM ||
>>>>> +                   res->end > 0xffffffff) {
>>>>> +                       bridge->has_mem64_res = true;
>>>>
>>>> This is an interesting idea, but I think you're checking CPU addresses
>>>> here, and you need to check PCI bus addresses.
>>>
>>>Looks like those IBM platforms have res > 4g, but pci bus address < 4g.
>>>If we check pci bus address, and then we would break those platforms.
>>>
>
> Hi, Yinghai
>
> I did some test with patch on my machine. It looks good.
>
> While as Bjorn mentioned, I think we could change it a little. The pci space
> on our machine is like this:
>
>         cpu address                               pci address
>   MEM   0x00003ff280000000..0x00003ff2fffeffff -> 0x00000000 8000 0000
>   MEM64 0x00003d5000000000..0x00003d5fffffffff -> 0x00003d50 0000 0000


>
> Each root bridge has two MMIO window. From this output we could see the pci
> address for 64-bit window is above 4G.

>
> I did a little change on your code, like this
>
>         list_for_each_entry(window, &bridge->windows, list) {
>                 res = window->res;
>                 if (resource_type(res) == IORESOURCE_MEM ||
> -                   res->end > 0xffffffff) {
> +                   (res->end - window->offset) > 0xffffffff) {
>                         bridge->has_mem64_res = true;
>                         break;
>                 }
>         }

good, then we should change to compare region end.

>
> This also works on my machine.
>
> One more question, with this patch, do we still need previous patch for
> Marek's problem?

Only need this to make Marek's working.

but does not help on Zermond's

Thanks

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