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: <1214418160.27577.87.camel@promb-2n-dhcp368.eng.vmware.com>
Date:	Wed, 25 Jun 2008 11:22:40 -0700
From:	Alok Kataria <akataria@...are.com>
To:	Zhao Yakui <yakui.zhao@...el.com>, Ingo Molnar <mingo@...e.hu>,
	lenb@...nel.org
Cc:	linux-acpi <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] acpi based pci gap caluculation v2

On Wed, 2008-06-25 at 09:57 -0700, Alok Kataria wrote:

> While writing this mail i figured out that, instead of searching from
> start_addr of _CRS to 2^32 we should just search till *end_addr* of _CRS resource.
> I will send a patch to that effect. 
> 
> Thanks,
> Alok
> 

Ingo, Please also apply this patch to the tip/out-of-tree
--

Incremental patch . This patch passes the pci producer resources
end_addr (got from _CRS) to the e820_search_gap function. 
Without this patch the code will always search from the producer regions
start_address to 2^32, even though the producer region may be smaller. 

Now , we limit the search only within the producer region's address
space. 
Also we put a condition to check if the resource lies in the 32bit
address range. 

Signed-off-by: Alok N Kataria <akataria@...are.com>

Index: linux-x86-tree.git/arch/x86/pci/acpi.c
===================================================================
--- linux-x86-tree.git.orig/arch/x86/pci/acpi.c	2008-06-25 10:11:35.000000000 -0700
+++ linux-x86-tree.git/arch/x86/pci/acpi.c	2008-06-25 11:17:31.000000000 -0700
@@ -121,13 +121,21 @@
 	struct acpi_resource_address64 addr;
 	acpi_status status;
 	struct gap_info *gap = data;
+	unsigned long long start_addr, end_addr;
 
 	status = resource_to_addr(resource, &addr);
 	if (ACPI_SUCCESS(status) &&
 	    addr.resource_type == ACPI_MEMORY_RANGE &&
 	    addr.address_length > gap->gapsize) {
-		e820_search_gap(&gap->gapstart, &gap->gapsize,
-				(addr.minimum + addr.translation_offset));
+		start_addr = addr.minimum + addr.translation_offset;
+		/*
+		 * We want space only in the 32bit address range
+		 */
+		if (start_addr < UINT_MAX) {
+			end_addr = start_addr + addr.address_length;
+			e820_search_gap(&gap->gapstart, &gap->gapsize,
+					start_addr, end_addr);
+		}
 	}
 
 	return AE_OK;


--
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