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]
Message-Id: <1428346839-11997-1-git-send-email-toshi.kani@hp.com>
Date:	Mon,  6 Apr 2015 13:00:39 -0600
From:	Toshi Kani <toshi.kani@...com>
To:	mingo@...hat.com, hpa@...or.com, tglx@...utronix.de
Cc:	linux-nvdimm@...1.01.org, linux-fsdevel@...r.kernel.org,
	x86@...nel.org, linux-kernel@...r.kernel.org, hch@....de,
	boaz@...xistor.com, Yinghai Lu <yinghai@...nel.org>,
	Toshi Kani <toshi.kani@...com>
Subject: [PATCH v2] x86: Revert E820_PRAM change in e820_end_pfn()

'Commit ec776ef6bbe17 ("x86/mm: Add support for the non-standard
protected e820 type")' added E820_PRAM ranges, which do not have
have struct-page.  Therefore, there is no need to update max_pfn
to cover the E820_PRAM ranges.  Revert the change made to account
E820_PRAM as RAM in e820.c in the commit.

Signed-off-by: Yinghai Lu <yinghai@...nel.org>
Signed-off-by: Toshi Kani <toshi.kani@...com>
Tested-by: Christoph Hellwig <hch@....de>
---
The patch is based on the tip branch.
---
 arch/x86/kernel/e820.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index e2ce85d..e09a346 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -752,7 +752,7 @@ u64 __init early_reserve_e820(u64 size, u64 align)
 /*
  * Find the highest page frame number we have available
  */
-static unsigned long __init e820_end_pfn(unsigned long limit_pfn)
+static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type)
 {
 	int i;
 	unsigned long last_pfn = 0;
@@ -763,11 +763,7 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn)
 		unsigned long start_pfn;
 		unsigned long end_pfn;
 
-		/*
-		 * Persistent memory is accounted as ram for purposes of
-		 * establishing max_pfn and mem_map.
-		 */
-		if (ei->type != E820_RAM && ei->type != E820_PRAM)
+		if (ei->type != type)
 			continue;
 
 		start_pfn = ei->addr >> PAGE_SHIFT;
@@ -792,12 +788,12 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn)
 }
 unsigned long __init e820_end_of_ram_pfn(void)
 {
-	return e820_end_pfn(MAX_ARCH_PFN);
+	return e820_end_pfn(MAX_ARCH_PFN, E820_RAM);
 }
 
 unsigned long __init e820_end_of_low_ram_pfn(void)
 {
-	return e820_end_pfn(1UL << (32-PAGE_SHIFT));
+	return e820_end_pfn(1UL<<(32 - PAGE_SHIFT), E820_RAM);
 }
 
 static void early_panic(char *msg)
--
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