diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-05-26 17:42:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:44 -0400 |
commit | 9c1a125921d146f22cf28ff366ff69fd602a0e9b (patch) | |
tree | 37df1b2ae74c23371de7e8b46427fc0a16727cdb /kernel/ptrace.c | |
parent | 0ac0c0d0f837c499afd02a802f9cf52d3027fa3b (diff) |
ptrace: unify FDPIC implementations
The Blackfin/FRV/SuperH guys all have the same exact FDPIC ptrace code in
their arch handlers (since they were probably copied & pasted). Since
these ptrace interfaces are an arch independent aspect of the FDPIC code,
unify them in the common ptrace code so new FDPIC ports don't need to copy
and paste this fundamental stuff yet again.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r-- | kernel/ptrace.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 6af9cdd558b7..4b4f72084d1b 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -594,6 +594,26 @@ int ptrace_request(struct task_struct *child, long request, | |||
594 | ret = ptrace_detach(child, data); | 594 | ret = ptrace_detach(child, data); |
595 | break; | 595 | break; |
596 | 596 | ||
597 | #ifdef CONFIG_BINFMT_ELF_FDPIC | ||
598 | case PTRACE_GETFDPIC: { | ||
599 | unsigned long tmp = 0; | ||
600 | |||
601 | switch (addr) { | ||
602 | case PTRACE_GETFDPIC_EXEC: | ||
603 | tmp = child->mm->context.exec_fdpic_loadmap; | ||
604 | break; | ||
605 | case PTRACE_GETFDPIC_INTERP: | ||
606 | tmp = child->mm->context.interp_fdpic_loadmap; | ||
607 | break; | ||
608 | default: | ||
609 | break; | ||
610 | } | ||
611 | |||
612 | ret = put_user(tmp, (unsigned long __user *) data); | ||
613 | break; | ||
614 | } | ||
615 | #endif | ||
616 | |||
597 | #ifdef PTRACE_SINGLESTEP | 617 | #ifdef PTRACE_SINGLESTEP |
598 | case PTRACE_SINGLESTEP: | 618 | case PTRACE_SINGLESTEP: |
599 | #endif | 619 | #endif |