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: <20200902160110.GA30014@e121166-lin.cambridge.arm.com>
Date:   Wed, 2 Sep 2020 17:01:19 +0100
From:   Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To:     Samuel Dionne-Riel <samuel@...nne-riel.com>
Cc:     Marc Zyngier <maz@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
        Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
        Frank Rowand <frowand.list@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: Boot failure on gru-scarlet-inx with 5.9-rc2

On Tue, Sep 01, 2020 at 02:33:56PM -0400, Samuel Dionne-Riel wrote:
> On Tue, 1 Sep 2020 17:42:49 +0100
> Lorenzo Pieralisi <lorenzo.pieralisi@....com> wrote:
> 
> > On Tue, Sep 01, 2020 at 04:37:42PM +0100, Marc Zyngier wrote:
> > > On 2020-09-01 04:45, Samuel Dionne-Riel wrote:  
> > > > -	if (pci_is_root_bus(bus->parent) && dev > 0)
> > > > +	if (bus->primary == rockchip->root_bus_nr && dev > 0)  
> > 
> > Can you dump bus->primary when this condition is hit please ?
> 
> With the following diff
> 
> ---
> @@ -79,6 +79,8 @@ static int rockchip_pcie_valid_device(struct rockchip_pcie *rockchip,
>          * do not read more than one device on the bus directly attached
>          * to RC's downstream side.
>          */
> +       printk("[!!] // bus->parent (%d)\n", bus->parent);

Please print a pointer as a pointer and print both bus and bus->parent.

> +       printk("[!!] bus->primary (%d) == rockchip->root_bus_nr (%d) && dev (%d) > 0\n", bus->primary, rockchip->root_bus_nr, dev);
>         if (bus->primary == rockchip->root_bus_nr && dev > 0)
>                 return 0;
> 
> --
> 
> I get two kind of results
> 
> [    1.692913] [!!] // bus->parent (0)
> [    1.692917] [!!] bus->primary (0) == rockchip->root_bus_nr (0) && dev (0) > 0
> 
> and
> 
> [    1.693055] [!!] // bus->parent (-256794624)
> [    1.693058] [!!] bus->primary (0) == rockchip->root_bus_nr (0) && dev (0) > 0
> 

Looks like this is the condition that pci_is_root_bus(bus->parent) is
not hitting.

[...]

> > > > +	/* HACK; ~equiv to last param of
> > > > pci_parse_request_of_pci_ranges */
> > > > +	bus_res = (resource_list_first_type(&bridge->windows,
> > > > IORESOURCE_MEM))->res;  
> > 
> > IORESOURCE_MEM ? I am a bit puzzled by this hack, what is it supposed
> > to do ?
> 
> It's not really supposed to do anything. I only needed access to
> bus_res for bus_res->start to keep as root_bus_nr. My complete lack of
> familiarity with all of this meant that I simply borrowed something
> that was in use in another function to give me the bus_res.

You are accessing a resource IORESOURCE_MEM that has nothing to do
with bus numbers.

s/IORESOURCE_MEM/IORESOURCE_BUS

should be better ;-)

Lorenzo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ