diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:15 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:59 -0400 |
commit | 07f9479a40cc778bc1462ada11f95b01360ae4ff (patch) | |
tree | 0676cf38df3844004bb3ebfd99dfa67a4a8998f5 /arch/powerpc/kernel/ptrace.c | |
parent | 9d5e6bdb3013acfb311ab407eeca0b6a6a3dedbf (diff) | |
parent | cd2e49e90f1cae7726c9a2c54488d881d7f1cd1c (diff) |
Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
Diffstat (limited to 'arch/powerpc/kernel/ptrace.c')
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 906536998291..55613e33e263 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -229,12 +229,16 @@ static int gpr_get(struct task_struct *target, const struct user_regset *regset, | |||
229 | unsigned int pos, unsigned int count, | 229 | unsigned int pos, unsigned int count, |
230 | void *kbuf, void __user *ubuf) | 230 | void *kbuf, void __user *ubuf) |
231 | { | 231 | { |
232 | int ret; | 232 | int i, ret; |
233 | 233 | ||
234 | if (target->thread.regs == NULL) | 234 | if (target->thread.regs == NULL) |
235 | return -EIO; | 235 | return -EIO; |
236 | 236 | ||
237 | CHECK_FULL_REGS(target->thread.regs); | 237 | if (!FULL_REGS(target->thread.regs)) { |
238 | /* We have a partial register set. Fill 14-31 with bogus values */ | ||
239 | for (i = 14; i < 32; i++) | ||
240 | target->thread.regs->gpr[i] = NV_REG_POISON; | ||
241 | } | ||
238 | 242 | ||
239 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, | 243 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
240 | target->thread.regs, | 244 | target->thread.regs, |
@@ -459,7 +463,7 @@ static int vr_set(struct task_struct *target, const struct user_regset *regset, | |||
459 | #ifdef CONFIG_VSX | 463 | #ifdef CONFIG_VSX |
460 | /* | 464 | /* |
461 | * Currently to set and and get all the vsx state, you need to call | 465 | * Currently to set and and get all the vsx state, you need to call |
462 | * the fp and VMX calls aswell. This only get/sets the lower 32 | 466 | * the fp and VMX calls as well. This only get/sets the lower 32 |
463 | * 128bit VSX registers. | 467 | * 128bit VSX registers. |
464 | */ | 468 | */ |
465 | 469 | ||
@@ -641,11 +645,16 @@ static int gpr32_get(struct task_struct *target, | |||
641 | compat_ulong_t *k = kbuf; | 645 | compat_ulong_t *k = kbuf; |
642 | compat_ulong_t __user *u = ubuf; | 646 | compat_ulong_t __user *u = ubuf; |
643 | compat_ulong_t reg; | 647 | compat_ulong_t reg; |
648 | int i; | ||
644 | 649 | ||
645 | if (target->thread.regs == NULL) | 650 | if (target->thread.regs == NULL) |
646 | return -EIO; | 651 | return -EIO; |
647 | 652 | ||
648 | CHECK_FULL_REGS(target->thread.regs); | 653 | if (!FULL_REGS(target->thread.regs)) { |
654 | /* We have a partial register set. Fill 14-31 with bogus values */ | ||
655 | for (i = 14; i < 32; i++) | ||
656 | target->thread.regs->gpr[i] = NV_REG_POISON; | ||
657 | } | ||
649 | 658 | ||
650 | pos /= sizeof(reg); | 659 | pos /= sizeof(reg); |
651 | count /= sizeof(reg); | 660 | count /= sizeof(reg); |