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: <20240625121652.1189095-1-lgs156412@gmail.com>
Date: Tue, 25 Jun 2024 20:16:52 +0800
From: Guanshun Liu <lgs156412@...il.com>
To: rppt@...nel.org
Cc: akpm@...ux-foundation.org,
	linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Guanshun Liu <lgs156412@...il.com>
Subject: [PATCH v2] memblock: export memblock_free() to free reserved memory.

On architectures that support the preservation of memblock metadata
after __init, allow drivers to call memblock_free() to free a
reservation configured in dts. This is a hack to support the
freeing of bootsplash reservations passed to Linux by the bootloader.

Signed-off-by: Guanshun Liu <lgs156412@...il.com>
---
 mm/memblock.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/memblock.c b/mm/memblock.c
index 6d18485571b4..20e7f81fc076 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -848,6 +848,9 @@ void __init_memblock memblock_free(void *ptr, size_t size)
 	if (ptr)
 		memblock_phys_free(__pa(ptr), size);
 }
+#ifdef CONFIG_ARCH_KEEP_MEMBLOCK
+EXPORT_SYMBOL_GPL(memblock_free);
+#endif
 
 /**
  * memblock_phys_free - free boot memory block
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ