[RFC PATCH V2 07/38] riscv: u64ilp32: Add ptrace interface support
guoren at kernel.org
guoren at kernel.org
Sat Nov 11 22:14:43 PST 2023
From: Guo Ren <guoren at linux.alibaba.com>
The pt_regs of u64ilp32 is the same as the 64-bit kernel's. So, change
to use native_view instead.
Signed-off-by: Guo Ren <guoren at linux.alibaba.com>
Signed-off-by: Guo Ren <guoren at kernel.org>
---
arch/riscv/kernel/ptrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index 1d572cf3140f..5471b12127da 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -369,7 +369,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
const struct user_regset_view *task_user_regset_view(struct task_struct *task)
{
#ifdef CONFIG_COMPAT
- if (test_tsk_thread_flag(task, TIF_32BIT))
+ if (test_tsk_thread_flag(task, TIF_32BIT) &&
+ !test_tsk_thread_flag(task, TIF_64ILP32))
return &compat_riscv_user_native_view;
else
#endif
--
2.36.1
More information about the linux-riscv
mailing list