Commit 375ddbe9 authored by Will Deacon's avatar Will Deacon
Browse files

ANDROID: KVM: arm64: Fix hyp module base address in pkvm_el2_mod_va()



pkvm_el2_mod_va() converts a hypervisor module kernel virtual address
into a hypervisor virtual address by calculating the offset from the
text section of the module and adding that to the 'token' indicating the
hypervisor base address of the module.

This works as long as the text section is the first loaded ELF section
(i.e. loaded lowest in memory), however the linker isn't obliged to
honour this assumption so we should look at the actual base address of
the module instead.

Bug: 278749606
Bug: 361818576
Cc: Vincent Donnefort <vdonnefort@google.com>
Reported-by: default avatarMostafa Saleh <smostafa@google.com>
Tested-by: default avatarDaniel Mentz <danielmentz@google.com>
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
Change-Id: I7ad0609636fccb71500398cc930d123f99135620
parent 54fe7d36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment