[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o8y5dr3c.fsf@mpe.ellerman.id.au>
Date: Fri, 25 Oct 2019 22:03:51 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Thiago Jung Bauermann <bauerman@...ux.ibm.com>,
linuxppc-dev@...ts.ozlabs.org
Cc: linux-kernel@...r.kernel.org,
Mike Anderson <andmike@...ux.ibm.com>,
Paul Mackerras <paulus@...ba.org>,
Ram Pai <linuxram@...ibm.com>,
Thiago Jung Bauermann <bauerman@...ux.ibm.com>
Subject: Re: [PATCH] powerpc/prom_init: Undo relocation before entering secure mode
Thiago Jung Bauermann <bauerman@...ux.ibm.com> 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 <bauerman@...ux.ibm.com>
> ---
> 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
Powered by blists - more mailing lists