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:Mostafa Saleh <smostafa@google.com> Tested-by:
Daniel Mentz <danielmentz@google.com> Signed-off-by:
Will Deacon <willdeacon@google.com> Change-Id: I7ad0609636fccb71500398cc930d123f99135620
Loading
Please sign in to comment