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
| ||
|
Date: Thu, 22 Feb 2018 16:41:40 -0800 (PST) From: Palmer Dabbelt <palmer@...ive.com> To: shea@...alevy.com, linux-kernel@...r.kernel.org CC: linux-riscv@...ts.infradead.org, shea@...alevy.com Subject: Re: [PATCH] riscv: Implement free_initrd_mem. On Tue, 20 Feb 2018 05:50:43 PST (-0800), shea@...alevy.com wrote: > Signed-off-by: Shea Levy <shea@...alevy.com> > --- > arch/riscv/mm/init.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c > index c77df8142be2..1c832b541e95 100644 > --- a/arch/riscv/mm/init.c > +++ b/arch/riscv/mm/init.c > @@ -66,5 +66,11 @@ void free_initmem(void) > #ifdef CONFIG_BLK_DEV_INITRD > void free_initrd_mem(unsigned long start, unsigned long end) > { > + if (start == initrd_start) > + start = round_down(start, PAGE_SIZE); > + if (end == initrd_end) > + end = round_up(end, PAGE_SIZE); > + > + free_reserved_area((void *)start, (void *)end, -1, "initrd"); > } > #endif /* CONFIG_BLK_DEV_INITRD */ It looks like everyone is doing something slightly different here: * arm64 doesn't round to a page size, and has keep_initrd. * arm calls poison_init_mem(), and has keep_initrd. * sparc64 doesn't round, and doesn't have a keep_initrd. * mips doesn't round, and doesn't have a keep_initrd. * x86 rounds end to a page size but not start, and doesn't have a keep_initrd. It feels like this should be something generic. I'm adding linux-kernel to see what people think.
Powered by blists - more mailing lists