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:	Wed, 06 Jul 2016 00:58:19 -0600
From:	"Jan Beulich" <JBeulich@...e.com>
To:	"David Vrabel" <david.vrabel@...rix.com>,
	"Boris Ostrovsky" <boris.ostrovsky@...cle.com>,
	"Jan Beulich" <JBeulich@...e.com>,
	"Juergen Gross" <JGross@...e.com>
Cc:	"xen-devel" <xen-devel@...ts.xenproject.org>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH v4 4/7] xen-pciback: simplify determination of 64-bit
 memory resource

Other than for raw BAR values, flags are properly separated in the
internal representation.

Signed-off-by: Jan Beulich <jbeulich@...e.com>

---
 drivers/xen/xen-pciback/conf_space_header.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- 4.7-rc6-xen-pciback.orig/drivers/xen/xen-pciback/conf_space_header.c
+++ 4.7-rc6-xen-pciback/drivers/xen/xen-pciback/conf_space_header.c
@@ -222,10 +222,7 @@ static void *bar_init(struct pci_dev *de
 		pos = PCI_ROM_RESOURCE;
 	else {
 		pos = (offset - PCI_BASE_ADDRESS_0) / 4;
-		if (pos && ((res[pos - 1].flags & (PCI_BASE_ADDRESS_SPACE |
-				PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
-			   (PCI_BASE_ADDRESS_SPACE_MEMORY |
-				PCI_BASE_ADDRESS_MEM_TYPE_64))) {
+		if (pos && (res[pos - 1].flags & IORESOURCE_MEM_64)) {
 			bar->val = res[pos - 1].start >> 32;
 			bar->len_val = -resource_size(&res[pos - 1]) >> 32;
 			return bar;



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ