Closed ZheTingLiu closed 1 year ago
Hello @ZheTingLiu,
I can't say for sure but it looks like a relocation issue. Are you using tee.elf
as the executable file for OP-TEE? tee.elf
cannot be used with ASLR enabled, because ASLR implies runtime relocations, and relocation data are contained in a special meta-data area at the end of the binary. You need to use either tee.bin
or the tee_*v2.bin
files instead.
Hi @jforissier
I use tee.bin
. It looks like that the program doesn't run any ASLR related code.
It fails at the beginning of core_init_mmu_map
. It doesn't run relocate
https://github.com/OP-TEE/optee_os/blob/2f18fc503e5aefbd62d209452cf698c525877486/core/arch/arm/kernel/entry_a64.S#L145-L286
Also, I have some modifications at link.mk. Is it a risk?
This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.
Hi,
When I enable CFG_CORE_ASLR in my platform. I encounter access address 0 then exception. I use version 3.18 and clang 12.0.0 For example, After run last ldr instruction("e121064"), it encounters exception. At this monment, register x8 is 0. After "e121054" is run, x8 will be set to 0. But address 0x0 is not belong to OPTEE memory region. Is it correct for x8 become "0" after running "ldr x8, [x8, # 1784]", then access address 0 in "e121064"