New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel hang when trying to set TPIDRRO_EL0 register at EL1 #6817
Comments
What happens when it fails to write to |
With some debug messages, I figured that the program enters the function but does not proceed after the MSR instruction. The program is stuck indefinitely on that line. Yes, for this implementation, I have set |
So far, we don't know anything about the hardware you're running on. Can you try it in QEMU and connect with gdb? |
Correction: MSR instruction seems to stored the value, but the program does not return to caller. (I tried putting debug messaged on the qemu console) I am building in QEMU on Ubuntu, and I have tried this on two devices - an x86 Ubuntu machine, and a Mac M2 (inside an Ubuntu VM) In
In
Output
Secure World:
QEMU Console:
So it seems that the function did complete, but did not execute the remaining code in Trying GDB now |
Hi Team,
I am working on a fuzzing tool for the OPTEE kernel. I am trying to get obtain a coverage bitmap for all system calls made when executing a TA. However, I need to store the bitmap between system calls.
Following the implementation by Riscure, I want to store the base address of the bitmap in the TPIDRRO_EL0 register. Below is the reference code
However, when I build the kernel, the program fails to set any value (except 0x0) in the TPIDRRO_EL0 register, and kernel hangs.
Since the call is made from
core/kernel/scall.c
, the set instruction happens in EL1, which seems to be the minimum EL level at which this register can be written to. The same happens when trying to run any other TPIDR* register.Can you please suggest how to resolve this?
Thanks
The text was updated successfully, but these errors were encountered: