lkml.org 
[lkml]   [2023]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH V2 07/38] riscv: u64ilp32: Add ptrace interface support
    Date
    From: Guo Ren <guoren@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@linux.alibaba.com>
    Signed-off-by: Guo Ren <guoren@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
    \
     
     \ /
      Last update: 2023-11-20 13:57    [W:3.766 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site