Loading Makefile +1 −1 Original line number Diff line number Diff line VERSION = 4 PATCHLEVEL = 9 SUBLEVEL = 19 SUBLEVEL = 20 EXTRAVERSION = NAME = Roaring Lionus Loading arch/c6x/kernel/ptrace.c +0 −41 Original line number Diff line number Diff line Loading @@ -69,46 +69,6 @@ static int gpr_get(struct task_struct *target, 0, sizeof(*regs)); } static int gpr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) { int ret; struct pt_regs *regs = task_pt_regs(target); /* Don't copyin TSR or CSR */ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, 0, PT_TSR * sizeof(long)); if (ret) return ret; ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, PT_TSR * sizeof(long), (PT_TSR + 1) * sizeof(long)); if (ret) return ret; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, (PT_TSR + 1) * sizeof(long), PT_CSR * sizeof(long)); if (ret) return ret; ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, PT_CSR * sizeof(long), (PT_CSR + 1) * sizeof(long)); if (ret) return ret; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, (PT_CSR + 1) * sizeof(long), -1); return ret; } enum c6x_regset { REGSET_GPR, }; Loading @@ -120,7 +80,6 @@ static const struct user_regset c6x_regsets[] = { .size = sizeof(u32), .align = sizeof(u32), .get = gpr_get, .set = gpr_set }, }; Loading arch/h8300/kernel/ptrace.c +5 −3 Original line number Diff line number Diff line Loading @@ -95,7 +95,8 @@ static int regs_get(struct task_struct *target, long *reg = (long *)®s; /* build user regs in buffer */ for (r = 0; r < ARRAY_SIZE(register_offset); r++) BUILD_BUG_ON(sizeof(regs) % sizeof(long) != 0); for (r = 0; r < sizeof(regs) / sizeof(long); r++) *reg++ = h8300_get_reg(target, r); return user_regset_copyout(&pos, &count, &kbuf, &ubuf, Loading @@ -113,7 +114,8 @@ static int regs_set(struct task_struct *target, long *reg; /* build user regs in buffer */ for (reg = (long *)®s, r = 0; r < ARRAY_SIZE(register_offset); r++) BUILD_BUG_ON(sizeof(regs) % sizeof(long) != 0); for (reg = (long *)®s, r = 0; r < sizeof(regs) / sizeof(long); r++) *reg++ = h8300_get_reg(target, r); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, Loading @@ -122,7 +124,7 @@ static int regs_set(struct task_struct *target, return ret; /* write back to pt_regs */ for (reg = (long *)®s, r = 0; r < ARRAY_SIZE(register_offset); r++) for (reg = (long *)®s, r = 0; r < sizeof(regs) / sizeof(long); r++) h8300_put_reg(target, r, *reg++); return 0; } Loading arch/metag/kernel/ptrace.c +15 −4 Original line number Diff line number Diff line Loading @@ -24,6 +24,16 @@ * user_regset definitions. */ static unsigned long user_txstatus(const struct pt_regs *regs) { unsigned long data = (unsigned long)regs->ctx.Flags; if (regs->ctx.SaveMask & TBICTX_CBUF_BIT) data |= USER_GP_REGS_STATUS_CATCH_BIT; return data; } int metag_gp_regs_copyout(const struct pt_regs *regs, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf) Loading Loading @@ -62,9 +72,7 @@ int metag_gp_regs_copyout(const struct pt_regs *regs, if (ret) goto out; /* TXSTATUS */ data = (unsigned long)regs->ctx.Flags; if (regs->ctx.SaveMask & TBICTX_CBUF_BIT) data |= USER_GP_REGS_STATUS_CATCH_BIT; data = user_txstatus(regs); ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &data, 4*25, 4*26); if (ret) Loading Loading @@ -119,6 +127,7 @@ int metag_gp_regs_copyin(struct pt_regs *regs, if (ret) goto out; /* TXSTATUS */ data = user_txstatus(regs); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &data, 4*25, 4*26); if (ret) Loading Loading @@ -244,6 +253,8 @@ int metag_rp_state_copyin(struct pt_regs *regs, unsigned long long *ptr; int ret, i; if (count < 4*13) return -EINVAL; /* Read the entire pipeline before making any changes */ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &rp, 0, 4*13); Loading Loading @@ -303,7 +314,7 @@ static int metag_tls_set(struct task_struct *target, const void *kbuf, const void __user *ubuf) { int ret; void __user *tls; void __user *tls = target->thread.tls_ptr; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &tls, 0, -1); if (ret) Loading arch/mips/kernel/ptrace.c +2 −1 Original line number Diff line number Diff line Loading @@ -485,7 +485,8 @@ static int fpr_set(struct task_struct *target, &target->thread.fpu, 0, sizeof(elf_fpregset_t)); for (i = 0; i < NUM_FPU_REGS; i++) { BUILD_BUG_ON(sizeof(fpr_val) != sizeof(elf_fpreg_t)); for (i = 0; i < NUM_FPU_REGS && count >= sizeof(elf_fpreg_t); i++) { err = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &fpr_val, i * sizeof(elf_fpreg_t), (i + 1) * sizeof(elf_fpreg_t)); Loading Loading
Makefile +1 −1 Original line number Diff line number Diff line VERSION = 4 PATCHLEVEL = 9 SUBLEVEL = 19 SUBLEVEL = 20 EXTRAVERSION = NAME = Roaring Lionus Loading
arch/c6x/kernel/ptrace.c +0 −41 Original line number Diff line number Diff line Loading @@ -69,46 +69,6 @@ static int gpr_get(struct task_struct *target, 0, sizeof(*regs)); } static int gpr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) { int ret; struct pt_regs *regs = task_pt_regs(target); /* Don't copyin TSR or CSR */ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, 0, PT_TSR * sizeof(long)); if (ret) return ret; ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, PT_TSR * sizeof(long), (PT_TSR + 1) * sizeof(long)); if (ret) return ret; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, (PT_TSR + 1) * sizeof(long), PT_CSR * sizeof(long)); if (ret) return ret; ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, PT_CSR * sizeof(long), (PT_CSR + 1) * sizeof(long)); if (ret) return ret; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, (PT_CSR + 1) * sizeof(long), -1); return ret; } enum c6x_regset { REGSET_GPR, }; Loading @@ -120,7 +80,6 @@ static const struct user_regset c6x_regsets[] = { .size = sizeof(u32), .align = sizeof(u32), .get = gpr_get, .set = gpr_set }, }; Loading
arch/h8300/kernel/ptrace.c +5 −3 Original line number Diff line number Diff line Loading @@ -95,7 +95,8 @@ static int regs_get(struct task_struct *target, long *reg = (long *)®s; /* build user regs in buffer */ for (r = 0; r < ARRAY_SIZE(register_offset); r++) BUILD_BUG_ON(sizeof(regs) % sizeof(long) != 0); for (r = 0; r < sizeof(regs) / sizeof(long); r++) *reg++ = h8300_get_reg(target, r); return user_regset_copyout(&pos, &count, &kbuf, &ubuf, Loading @@ -113,7 +114,8 @@ static int regs_set(struct task_struct *target, long *reg; /* build user regs in buffer */ for (reg = (long *)®s, r = 0; r < ARRAY_SIZE(register_offset); r++) BUILD_BUG_ON(sizeof(regs) % sizeof(long) != 0); for (reg = (long *)®s, r = 0; r < sizeof(regs) / sizeof(long); r++) *reg++ = h8300_get_reg(target, r); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, Loading @@ -122,7 +124,7 @@ static int regs_set(struct task_struct *target, return ret; /* write back to pt_regs */ for (reg = (long *)®s, r = 0; r < ARRAY_SIZE(register_offset); r++) for (reg = (long *)®s, r = 0; r < sizeof(regs) / sizeof(long); r++) h8300_put_reg(target, r, *reg++); return 0; } Loading
arch/metag/kernel/ptrace.c +15 −4 Original line number Diff line number Diff line Loading @@ -24,6 +24,16 @@ * user_regset definitions. */ static unsigned long user_txstatus(const struct pt_regs *regs) { unsigned long data = (unsigned long)regs->ctx.Flags; if (regs->ctx.SaveMask & TBICTX_CBUF_BIT) data |= USER_GP_REGS_STATUS_CATCH_BIT; return data; } int metag_gp_regs_copyout(const struct pt_regs *regs, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf) Loading Loading @@ -62,9 +72,7 @@ int metag_gp_regs_copyout(const struct pt_regs *regs, if (ret) goto out; /* TXSTATUS */ data = (unsigned long)regs->ctx.Flags; if (regs->ctx.SaveMask & TBICTX_CBUF_BIT) data |= USER_GP_REGS_STATUS_CATCH_BIT; data = user_txstatus(regs); ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &data, 4*25, 4*26); if (ret) Loading Loading @@ -119,6 +127,7 @@ int metag_gp_regs_copyin(struct pt_regs *regs, if (ret) goto out; /* TXSTATUS */ data = user_txstatus(regs); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &data, 4*25, 4*26); if (ret) Loading Loading @@ -244,6 +253,8 @@ int metag_rp_state_copyin(struct pt_regs *regs, unsigned long long *ptr; int ret, i; if (count < 4*13) return -EINVAL; /* Read the entire pipeline before making any changes */ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &rp, 0, 4*13); Loading Loading @@ -303,7 +314,7 @@ static int metag_tls_set(struct task_struct *target, const void *kbuf, const void __user *ubuf) { int ret; void __user *tls; void __user *tls = target->thread.tls_ptr; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &tls, 0, -1); if (ret) Loading
arch/mips/kernel/ptrace.c +2 −1 Original line number Diff line number Diff line Loading @@ -485,7 +485,8 @@ static int fpr_set(struct task_struct *target, &target->thread.fpu, 0, sizeof(elf_fpregset_t)); for (i = 0; i < NUM_FPU_REGS; i++) { BUILD_BUG_ON(sizeof(fpr_val) != sizeof(elf_fpreg_t)); for (i = 0; i < NUM_FPU_REGS && count >= sizeof(elf_fpreg_t); i++) { err = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &fpr_val, i * sizeof(elf_fpreg_t), (i + 1) * sizeof(elf_fpreg_t)); Loading