[PATCH 1/1] sandbox: correct determination of the text base

Simon Glass sjg at chromium.org
Sat Jun 5 18:02:01 CEST 2021


Hi Heinrich,

On Sat, 15 May 2021 at 11:29, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> os_find_text_base() assumes that first line of /proc/self/maps holds
> information about the text. Hence we must call the function before calling
> os_malloc() which calls mmap(0x10000000,).
>
> Failure to do so has led to incorrect values for pc_reloc when an
> exception was reported
>
>     => exception undefined
>
>     Illegal instruction
>     pc = 0x5628d82e9d3c, pc_reloc = 0x5628c82e9d3c
>
> as well as incorrect output of the bdinfo command
>
>     => bdinfo
>     relocaddr   = 0x0000000007858000
>     reloc off   = 0x0000000010000000
>
> Fixes: b308d9fd18fa ("sandbox: Avoid using malloc() for system state")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> This patch must be applied after
> [PATCH 1/1] sandbox: ensure that state->ram_buf is in low memory
> ---
>  arch/sandbox/cpu/start.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list