Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Stackless error handler doesn't work in initial trusted stack frame if sp is corrupted #321

Closed
rmn30 opened this issue Oct 21, 2024 · 0 comments

Comments

@rmn30
Copy link
Collaborator

rmn30 commented Oct 21, 2024

The stackless error handler does not work if the thread is in the first trusted stack frame.
This is partly due to

beq s1, t1, .Lrecovered_stack
using the wrong register (t1 should be tp) but even once that is fixed it appears to rely on the interrupted thread's stack pointer which might have been corrupted.
I'm not sure whether the initial stack pointer for the thread is available anywhere to restore.

nwf added a commit to nwf/cheriot-rtos that referenced this issue Oct 22, 2024
Partially addresses
CHERIoT-Platform#321 , but is not
the end of it.

Co-authored-by: Robert Norton <robert.norton@microsoft.com>
nwf added a commit to nwf/cheriot-rtos that referenced this issue Oct 22, 2024
We were not installing the correct thing into ct0 (which would then get
moved into csp) prior to reaching .Linvoke_error_handler when the
thread was in its initial compartment invocation.

FIXES: CHERIoT-Platform#321
nwf added a commit to nwf/cheriot-rtos that referenced this issue Oct 25, 2024
Partially addresses
CHERIoT-Platform#321 , but is not
the end of it.

Co-authored-by: Robert Norton <robert.norton@microsoft.com>
nwf added a commit to nwf/cheriot-rtos that referenced this issue Oct 25, 2024
We were not installing the correct thing into ct0 (which would then get
moved into csp) prior to reaching .Linvoke_error_handler when the
thread was in its initial compartment invocation.

FIXES: CHERIoT-Platform#321
nwf added a commit that referenced this issue Oct 29, 2024
Partially addresses
#321 , but is not
the end of it.

Co-authored-by: Robert Norton <robert.norton@microsoft.com>
@nwf nwf closed this as completed in 7b33c9f Oct 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant