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:   Wed,  3 Mar 2021 13:00:54 +0800
From:   Youlin Song <syl.loop@...il.com>
To:     mpe@...erman.id.au, benh@...nel.crashing.org, paulus@...ba.org,
        christophe.leroy@...roup.eu
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        Youlin Song <syl.loop@...il.com>
Subject: [PATCH] powerpc/prom: move the device tree to the right space

If the device tree has been allocated memory and it will
be in the memblock reserved space.Obviously it is in a
valid memory declaration and will be mapped by the kernel.

Signed-off-by: Youlin Song <syl.loop@...il.com>
---
 arch/powerpc/kernel/prom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 9a4797d1d40d..ef5f93e7d7f2 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -121,7 +121,7 @@ static void __init move_device_tree(void)
 	size = fdt_totalsize(initial_boot_params);
 
 	if ((memory_limit && (start + size) > PHYSICAL_START + memory_limit) ||
-	    !memblock_is_memory(start + size - 1) ||
+	    (!memblock_is_memory(start + size - 1) && !memblock_is_reserved(start + size - 1)) ||
 	    overlaps_crashkernel(start, size) || overlaps_initrd(start, size)) {
 		p = memblock_alloc_raw(size, PAGE_SIZE);
 		if (!p)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ