Skip to content
Commit 5c38e05e authored by Alexander Graf's avatar Alexander Graf
Browse files

efi_loader: Make RTS relocation more robust



While changing the RTS alignment to 64KB in commit 7a82c305
("efi_loader: Align runtime section to 64kb") the relocation code
started to break.

The reason for that is that we didn't actually look at the real
relocation data. We merely took the RUNTIME_CODE section as a
hint and started to relocate based on self calculated data from
that point on. That calculation was now out of sync though.

To ensure we're not running into such a situation again, this patch
makes the runtime relocation code a bit more robust. We can just
trust the phys/virt hints from the payload. We also should check that
we really only have a single section, as the code doesn't handle
multiple code relocations yet.

Fixes: 7a82c305 ("efi_loader: Align runtime section to 64kb")
Reported-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reported-by: default avatarLoic Devulder <ldevulder@suse.de>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
Reviewed-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: default avatarLoic Devulder <ldevulder@suse.de>
Tested-by: default avatarJonathan Gray <jsg@jsg.id.au>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 5bdb0a7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment