Re: [PATCH] powerpc/prom_init: Undo relocation before entering secure mode
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2019-10-25 11:03:57
Also in:
lkml
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2019-10-25 11:03:57
Also in:
lkml
Thiago Jung Bauermann [off-list ref] writes:
The ultravisor will do an integrity check of the kernel image but we
relocated it so the check will fail. Restore the original image by
relocating it back to the kernel virtual base address.
This works because during build vmlinux is linked with an expected virtual
runtime address of KERNELBASE.
Fixes: 6a9c930bd775 ("powerpc/prom_init: Add the ESM call to prom_init")
Signed-off-by: Thiago Jung Bauermann <redacted>
---
arch/powerpc/include/asm/elf.h | 3 +++
arch/powerpc/kernel/prom_init.c | 11 +++++++++++
arch/powerpc/kernel/prom_init_check.sh | 3 ++-
3 files changed, 16 insertions(+), 1 deletion(-)
This breaks the build when CONFIG_RELOCATABLE=n:
prom_init.c:(.init.text+0x3160): undefined reference to `relocate'
See http://kisskb.ellerman.id.au/kisskb/buildresult/14004234/
cheers