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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  3 May 2019 20:50:41 +0300
From:   Serge Semin <>
To:     Ralf Baechle <>,
        Paul Burton <>,
        James Hogan <>,
        Mike Rapoport <>,
        Andrew Morton <>,
        Michal Hocko <>,
        Greg Kroah-Hartman <>,
        Thomas Bogendoerfer <>,
        Huacai Chen <>,
        Stefan Agner <>,
        Stephen Rothwell <>,
        Alexandre Belloni <>,
        Juergen Gross <>
Cc:     Serge Semin <>,,
Subject: [PATCH v2 5/5] mips: Manually call fdt_init_reserved_mem() method

Since memblock-patchset was introduced the reserved-memory nodes are
supported being declared in dt-files. So these nodes are actually parsed
during the arch setup procedure when the early_init_fdt_scan_reserved_mem()
method is called. But due to the arch-specific boot mem_map container
utilization we need to manually call the fdt_init_reserved_mem() method
after all the available and reserved memory has been moved to memblock.
The first function call performed before bootmem_init() by the
early_init_fdt_scan_reserved_mem() routine fails due to the lack of any
memblock memory regions to allocate from at that stage.

Signed-off-by: Serge Semin <>

Changelog v2
- Discard forcible selection of OF_RESERVED_MEM config
 arch/mips/kernel/setup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index fbd216b4e929..ab349d2381c3 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -27,6 +27,7 @@
 #include <linux/dma-contiguous.h>
 #include <linux/decompress/generic.h>
 #include <linux/of_fdt.h>
+#include <linux/of_reserved_mem.h>
 #include <asm/addrspace.h>
 #include <asm/bootinfo.h>
@@ -825,6 +826,8 @@ static void __init arch_mem_init(char **cmdline_p)
 		__pa_symbol(&__nosave_end) - __pa_symbol(&__nosave_begin));
+	fdt_init_reserved_mem();
 	early_memtest(PFN_PHYS(min_low_pfn), PFN_PHYS(max_low_pfn));

Powered by blists - more mailing lists