|
Message-ID: <20191115093209.26434-6-yanaijie@huawei.com> Date: Fri, 15 Nov 2019 17:32:08 +0800 From: Jason Yan <yanaijie@...wei.com> To: <mpe@...erman.id.au>, <linuxppc-dev@...ts.ozlabs.org>, <diana.craciun@....com>, <christophe.leroy@....fr>, <benh@...nel.crashing.org>, <paulus@...ba.org>, <npiggin@...il.com>, <keescook@...omium.org>, <kernel-hardening@...ts.openwall.com> CC: <linux-kernel@...r.kernel.org>, <oss@...error.net>, Jason Yan <yanaijie@...wei.com> Subject: [PATCH 5/6] powerpc/fsl_booke/64: clear the original kernel if randomized The original kernel still exists in the memory, clear it now. Signed-off-by: Jason Yan <yanaijie@...wei.com> Cc: Scott Wood <oss@...error.net> Cc: Diana Craciun <diana.craciun@....com> Cc: Michael Ellerman <mpe@...erman.id.au> Cc: Christophe Leroy <christophe.leroy@....fr> Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org> Cc: Paul Mackerras <paulus@...ba.org> Cc: Nicholas Piggin <npiggin@...il.com> Cc: Kees Cook <keescook@...omium.org> --- arch/powerpc/mm/nohash/kaslr_booke.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/nohash/kaslr_booke.c b/arch/powerpc/mm/nohash/kaslr_booke.c index 513f4616e92a..323fe25e8e08 100644 --- a/arch/powerpc/mm/nohash/kaslr_booke.c +++ b/arch/powerpc/mm/nohash/kaslr_booke.c @@ -377,8 +377,10 @@ notrace void __init kaslr_early_init(void *dt_ptr, phys_addr_t size) #ifdef CONFIG_PPC64 unsigned int *__run_at_load = (unsigned int *)(KERNELBASE + 0x5c); - if (*__run_at_load == 1) + if (*__run_at_load == 1) { + kaslr_late_init(); return; + } *__run_at_load = 1; -- 2.17.2
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.