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:	Sun, 08 Jun 2014 04:02:18 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Gavin Shan <gwshan@...ux.vnet.ibm.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Alex Williamson <alex.williamson@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-pci <linux-pci@...r.kernel.org>
Subject: Re: [PATCH 3.14 186/228] PCI: Wrong register used to check pending
 traffic

On Wed, 2014-06-04 at 16:23 -0700, Greg Kroah-Hartman wrote:
> 3.14-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Gavin Shan <gwshan@...ux.vnet.ibm.com>
> 
> commit d0b4cc4e32705ff00d90d32da7783c266c702c04 upstream.
> 
> The incorrect register offset is passed to pci_wait_for_pending(), which is
> caused by commit 157e876ffe ("PCI: Add pci_wait_for_pending() (refactor
> pci_wait_for_pending_transaction())").
> 
> Fixes: 157e876ffe ("PCI: Add pci_wait_for_pending() (refactor pci_wait_for_pending_transaction())
> Signed-off-by: Gavin Shan <gwshan@...ux.vnet.ibm.com>
> Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
> Acked-by: Alex Williamson <alex.williamson@...il.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> ---
>  drivers/pci/pci.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -3043,7 +3043,8 @@ int pci_wait_for_pending_transaction(str
>  	if (!pci_is_pcie(dev))
>  		return 1;
>  
> -	return pci_wait_for_pending(dev, PCI_EXP_DEVSTA, PCI_EXP_DEVSTA_TRPND);
> +	return pci_wait_for_pending(dev, pci_pcie_cap(dev) + PCI_EXP_DEVSTA,
> +				    PCI_EXP_DEVSTA_TRPND);
>  }
>  EXPORT_SYMBOL(pci_wait_for_pending_transaction);
>  
> @@ -3085,7 +3086,7 @@ static int pci_af_flr(struct pci_dev *de
>  		return 0;
>  
>  	/* Wait for Transaction Pending bit clean */
> -	if (pci_wait_for_pending(dev, PCI_AF_STATUS, PCI_AF_STATUS_TP))
> +	if (pci_wait_for_pending(dev, pos + PCI_AF_STATUS, PCI_AF_STATUS_TP))
>  		goto clear;
>  
>  	dev_err(&dev->dev, "transaction is not cleared; "

This still seems to be broken because pci_wait_for_pending() does
pci_read_config_word() but PCI_AF_STATUS is not word-aligned.

Ben.

-- 
Ben Hutchings
Never attribute to conspiracy what can adequately be explained by stupidity.

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ