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-next>] [day] [month] [year] [list]
Date:	Mon, 13 Oct 2008 11:49:04 +1100
From:	Peter Chubb <peterc@...ato.unsw.edu.au>
To:	matthew@....cx, jbarnes@...tuousgeek.org,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: [patch] fix 64-vbit prefetchable memory resource BARs


Since patch 6ac665c63dcac8fcec534a1d224ecbb8b867ad59
my infiniband controller hasn't worked.  This is because it has
64-bit prefetchable memory, which was mistakenly being  taken to be
32-bit memory.  The resource flags in this case are
PCI_BASE_ADDRESS_MEM_TYPE_64|PCI_BASE_ADDRESS_MEM_PREFETCH.

This patch checks only for the PCI_BASE_ADDRESS_MEM_TYPE_64 bit; thus
whether the region is prefetchable or not is ignored.  This fixes my
Infiniband.


Signed-off-by: Peter Chubb <peterc@...ato.unsw.edu.au>

Index: linux-2.6-git/drivers/pci/probe.c
===================================================================
--- linux-2.6-git.orig/drivers/pci/probe.c	2008-10-13 10:49:46.012798465 +1100
+++ linux-2.6-git/drivers/pci/probe.c	2008-10-13 11:35:43.016329442 +1100
@@ -219,7 +219,7 @@
 
 	res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK;
 
-	if (res->flags == PCI_BASE_ADDRESS_MEM_TYPE_64)
+	if (res->flags & PCI_BASE_ADDRESS_MEM_TYPE_64)
 		return pci_bar_mem64;
 	return pci_bar_mem32;
 }


--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au           ERTOS within National ICT Australia
--
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