Commit fcd3b483 authored by Jason Yan's avatar Jason Yan Committed by GUO Zihua
Browse files

powerpc/fsl_booke/64: clear the original kernel if randomized

maillist inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8OHAZ
CVE: NA

Reference: https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20200330022023.3691-6-yanaijie@huawei.com/



-------------------------------------------------

The original kernel still exists in the memory, clear it now.

Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Cc: Scott Wood <oss@buserror.net>
Cc: Diana Craciun <diana.craciun@nxp.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: default avatarCui GaoSheng <cuigaosheng1@huawei.com>
Signed-off-by: default avatarGUO Zihua <guozihua@huawei.com>
parent c7a3fb71
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -376,8 +376,10 @@ notrace void __init kaslr_early_init(void *dt_ptr, phys_addr_t size)
	unsigned long kernel_sz;

	if (IS_ENABLED(CONFIG_PPC64)) {
		if (__run_at_load == 1)
		if (__run_at_load == 1) {
			kaslr_late_init();
			return;
		}

		/* Get the first memblock size */
		early_get_first_memblock_info(dt_ptr, &size);