diff options
Diffstat (limited to 'arch/ppc64/kernel/ptrace32.c')
-rw-r--r-- | arch/ppc64/kernel/ptrace32.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/arch/ppc64/kernel/ptrace32.c b/arch/ppc64/kernel/ptrace32.c index 16436426c7e2..fb8c22d6084a 100644 --- a/arch/ppc64/kernel/ptrace32.c +++ b/arch/ppc64/kernel/ptrace32.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * this archive for more details. | 17 | * this archive for more details. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
@@ -337,6 +338,19 @@ int sys32_ptrace(long request, long pid, unsigned long addr, unsigned long data) | |||
337 | break; | 338 | break; |
338 | } | 339 | } |
339 | 340 | ||
341 | case PTRACE_GET_DEBUGREG: { | ||
342 | ret = -EINVAL; | ||
343 | /* We only support one DABR and no IABRS at the moment */ | ||
344 | if (addr > 0) | ||
345 | break; | ||
346 | ret = put_user(child->thread.dabr, (u32 __user *)data); | ||
347 | break; | ||
348 | } | ||
349 | |||
350 | case PTRACE_SET_DEBUGREG: | ||
351 | ret = ptrace_set_debugreg(child, addr, data); | ||
352 | break; | ||
353 | |||
340 | case PTRACE_DETACH: | 354 | case PTRACE_DETACH: |
341 | ret = ptrace_detach(child, data); | 355 | ret = ptrace_detach(child, data); |
342 | break; | 356 | break; |
@@ -405,9 +419,23 @@ int sys32_ptrace(long request, long pid, unsigned long addr, unsigned long data) | |||
405 | break; | 419 | break; |
406 | } | 420 | } |
407 | 421 | ||
408 | case PTRACE_GETEVENTMSG: | 422 | case PTRACE_GETEVENTMSG: |
409 | ret = put_user(child->ptrace_message, (unsigned int __user *) data); | 423 | ret = put_user(child->ptrace_message, (unsigned int __user *) data); |
410 | break; | 424 | break; |
425 | |||
426 | #ifdef CONFIG_ALTIVEC | ||
427 | case PTRACE_GETVRREGS: | ||
428 | /* Get the child altivec register state. */ | ||
429 | flush_altivec_to_thread(child); | ||
430 | ret = get_vrregs((unsigned long __user *)data, child); | ||
431 | break; | ||
432 | |||
433 | case PTRACE_SETVRREGS: | ||
434 | /* Set the child altivec register state. */ | ||
435 | flush_altivec_to_thread(child); | ||
436 | ret = set_vrregs(child, (unsigned long __user *)data); | ||
437 | break; | ||
438 | #endif | ||
411 | 439 | ||
412 | default: | 440 | default: |
413 | ret = ptrace_request(child, request, addr, data); | 441 | ret = ptrace_request(child, request, addr, data); |