Commit 4721e221 authored by Anton Blanchard's avatar Anton Blanchard Committed by Paul Mackerras

[PATCH] ppc64: poison initmem

Poison initmem after we free it so we catch use after free issues.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 2f4cf721
...@@ -392,6 +392,7 @@ void free_initmem(void) ...@@ -392,6 +392,7 @@ void free_initmem(void)
addr = (unsigned long)__init_begin; addr = (unsigned long)__init_begin;
for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) {
memset((void *)addr, 0xcc, PAGE_SIZE);
ClearPageReserved(virt_to_page(addr)); ClearPageReserved(virt_to_page(addr));
set_page_count(virt_to_page(addr), 1); set_page_count(virt_to_page(addr), 1);
free_page(addr); free_page(addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment