summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorYulong Wang <[email protected]>2025-07-12 13:10:48 +0000
committerRbb666 <[email protected]>2025-07-23 09:38:35 +0800
commite7a40ae6ec1fdcb0d74a4902cfbd50aee7ee8e8f (patch)
tree07a0746d811356206dfe332e5318862a034063c2 /components
parent3c046646cbba093c5ffaf2721d11391a5417fe2a (diff)
[lwp][rv64] restore tp register in arch_thread_signal_enter to fix user-mode memory access
Diffstat (limited to 'components')
-rw-r--r--components/lwp/arch/risc-v/rv64/lwp_gcc.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/lwp/arch/risc-v/rv64/lwp_gcc.S b/components/lwp/arch/risc-v/rv64/lwp_gcc.S
index c207285c6f..9290923191 100644
--- a/components/lwp/arch/risc-v/rv64/lwp_gcc.S
+++ b/components/lwp/arch/risc-v/rv64/lwp_gcc.S
@@ -178,6 +178,9 @@ arch_thread_signal_enter:
/* restore user GP */
LOAD gp, FRAME_OFF_GP(s3)
+ /* restore user TP */
+ LOAD tp, FRAME_OFF_TP(s3)
+
/**
* handler(signo, psi, ucontext);
*/