diff options
Diffstat (limited to 'arch/arm/kernel/ptrace.c')
-rw-r--r-- | arch/arm/kernel/ptrace.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index e1d5e1929fbd..ede6443c34d9 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/perf_event.h> | 23 | #include <linux/perf_event.h> |
24 | #include <linux/hw_breakpoint.h> | 24 | #include <linux/hw_breakpoint.h> |
25 | #include <linux/regset.h> | 25 | #include <linux/regset.h> |
26 | #include <linux/audit.h> | ||
26 | 27 | ||
27 | #include <asm/pgtable.h> | 28 | #include <asm/pgtable.h> |
28 | #include <asm/system.h> | 29 | #include <asm/system.h> |
@@ -699,10 +700,13 @@ static int vfp_set(struct task_struct *target, | |||
699 | { | 700 | { |
700 | int ret; | 701 | int ret; |
701 | struct thread_info *thread = task_thread_info(target); | 702 | struct thread_info *thread = task_thread_info(target); |
702 | struct vfp_hard_struct new_vfp = thread->vfpstate.hard; | 703 | struct vfp_hard_struct new_vfp; |
703 | const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs); | 704 | const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs); |
704 | const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr); | 705 | const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr); |
705 | 706 | ||
707 | vfp_sync_hwstate(thread); | ||
708 | new_vfp = thread->vfpstate.hard; | ||
709 | |||
706 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, | 710 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, |
707 | &new_vfp.fpregs, | 711 | &new_vfp.fpregs, |
708 | user_fpregs_offset, | 712 | user_fpregs_offset, |
@@ -723,9 +727,8 @@ static int vfp_set(struct task_struct *target, | |||
723 | if (ret) | 727 | if (ret) |
724 | return ret; | 728 | return ret; |
725 | 729 | ||
726 | vfp_sync_hwstate(thread); | ||
727 | thread->vfpstate.hard = new_vfp; | ||
728 | vfp_flush_hwstate(thread); | 730 | vfp_flush_hwstate(thread); |
731 | thread->vfpstate.hard = new_vfp; | ||
729 | 732 | ||
730 | return 0; | 733 | return 0; |
731 | } | 734 | } |
@@ -902,6 +905,12 @@ long arch_ptrace(struct task_struct *child, long request, | |||
902 | return ret; | 905 | return ret; |
903 | } | 906 | } |
904 | 907 | ||
908 | #ifdef __ARMEB__ | ||
909 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB | ||
910 | #else | ||
911 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARM | ||
912 | #endif | ||
913 | |||
905 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | 914 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) |
906 | { | 915 | { |
907 | unsigned long ip; | 916 | unsigned long ip; |
@@ -916,7 +925,7 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | |||
916 | if (!ip) | 925 | if (!ip) |
917 | audit_syscall_exit(regs); | 926 | audit_syscall_exit(regs); |
918 | else | 927 | else |
919 | audit_syscall_entry(AUDIT_ARCH_ARMEB, scno, regs->ARM_r0, | 928 | audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0, |
920 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); | 929 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); |
921 | 930 | ||
922 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 931 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) |