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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151124205026.GB17377@localhost>
Date:	Tue, 24 Nov 2015 14:50:26 -0600
From:	Bjorn Helgaas <helgaas@...nel.org>
To:	Stanimir Varbanov <stanimir.varbanov@...aro.org>
Cc:	linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
	Jingoo Han <jingoohan1@...il.com>,
	Pratyush Anand <pratyush.anand@...il.com>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] PCI: designware: remove wrong io_base assignment

On Tue, Nov 24, 2015 at 11:36:52AM +0200, Stanimir Varbanov wrote:
> The io_base is used to keep the cpu physical address parsed
> from ranges dt property. After issue pci_remap_iospace the
> io_base has been assigned with io->start, which is not correct
> cause io->start is a PCI bus address.
> 
> Fixes: 0021d22b73d6 ("PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT")
> Reviewed-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@...aro.org>
> ---
>  drivers/pci/host/pcie-designware.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 540f077c37ea..02a7452bdf23 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -440,7 +440,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
>  					 ret, pp->io);
>  				continue;
>  			}
> -			pp->io_base = pp->io->start;
>  			break;
>  		case IORESOURCE_MEM:
>  			pp->mem = win->res;

Applied to for-linus for v4.4 with changelog as follows, thanks!


commit 5228e39e3f709c82e6c4643402fc25de54391e32
Author: Stanimir Varbanov <stanimir.varbanov@...aro.org>
Date:   Tue Nov 24 11:36:52 2015 +0200

    PCI: designware: Remove incorrect io_base assignment
    
    "pp->io" is an I/O resource, e.g., "[io 0x0000-0xffff]"; "pp->io_base" is
    the CPU physical address of a region where the host bridge converts CPU
    memory accesses into PCI I/O transactions.
    
    Corrupting pp->io_base by assigning pp->io->start to it breaks access to
    the PCI I/O space, as reported by Kishon.
    
    Remove the invalid assignment.
    
    [bhelgaas: changelog]
    Fixes: 0021d22b73d6 ("PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT")
    Reported-and-tested-by: Kishon Vijay Abraham I <kishon@...com>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@...aro.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
    Reviewed-by: Arnd Bergmann <arnd@...db.de>

diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 540f077..02a7452 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -440,7 +440,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
 					 ret, pp->io);
 				continue;
 			}
-			pp->io_base = pp->io->start;
 			break;
 		case IORESOURCE_MEM:
 			pp->mem = win->res;
--
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