Skip to content
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

core: riscv: Remove thread_exit_user_mode() #7046

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

gagachang
Copy link
Contributor

Currently, the user mode abort and some system calls return to kernel mode by thread_exit_user_mode().
Although this function creates a shorter path to return to kernel mode, it leads to some problems because the function does not update the core local flags.
Especially when CFG_CORE_DEBUG_CHECK_STACKS=y, some checks will fail due to wrong type of stack recorded in the core local flags.

Fix it by removing thread_exit_user_mode().
So that the core local flags can be correctly updated in the common trap handler.

Currently, the user mode abort and some system calls return to kernel
mode by thread_exit_user_mode(). Although this function creates a
shorter path to return to kernel mode, it leads to some problems because
the function does not update the core local flags. Especially when
CFG_CORE_DEBUG_CHECK_STACKS=y, some checks will fail due to wrong type
of stack recorded in the core local flags.

Fix it by removing thread_exit_user_mode(). So that the core local flags
can be correctly updated in the common trap handler.

Signed-off-by: Alvin Chang <[email protected]>
Reviewed-by: Yu Chien Peter Lin <[email protected]>
@jforissier jforissier merged commit 5c71854 into OP-TEE:master Sep 25, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants