From: Seung-Woo Kim Date: Tue, 19 Nov 2019 01:21:01 +0000 (+0900) Subject: arm64/ptrace: Add compat FPR register support X-Git-Tag: accepted/tizen/unified/20210204.134610~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfbff05c29dd26b5114aebb335a983c15f320eb7;p=platform%2Fkernel%2Flinux-amlogic.git arm64/ptrace: Add compat FPR register support From aarch32 ptrace view, fpr register support is done with vfp registers. As like aarch32 ptrace view, Add to suppot compat fpr resister with vfp. Change-Id: If5b4b6b5f33b7691ba9d3b65c1bffcf316e19588 Signed-off-by: Seung-Woo Kim --- diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index ada08b5..e950f4b 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -28,6 +28,8 @@ /* AArch32-specific ptrace requests */ #define COMPAT_PTRACE_GETREGS 12 #define COMPAT_PTRACE_SETREGS 13 +#define COMPAT_PTRACE_GETFPREGS 14 +#define COMPAT_PTRACE_SETFPREGS 15 #define COMPAT_PTRACE_GET_THREAD_AREA 22 #define COMPAT_PTRACE_SET_SYSCALL 23 #define COMPAT_PTRACE_GETVFPREGS 27 diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 7990377..e35582a 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -1282,6 +1282,22 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, datap); break; + case COMPAT_PTRACE_GETFPREGS: + ret = copy_regset_to_user(child, + &user_aarch32_ptrace_view, + REGSET_FPR, + 0, VFP_STATE_SIZE, + datap); + break; + + case COMPAT_PTRACE_SETFPREGS: + ret = copy_regset_from_user(child, + &user_aarch32_ptrace_view, + REGSET_FPR, + 0, VFP_STATE_SIZE, + datap); + break; + #ifdef CONFIG_HAVE_HW_BREAKPOINT case COMPAT_PTRACE_GETHBPREGS: ret = compat_ptrace_gethbpregs(child, addr, datap);