aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/ptrace.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-03-10 18:22:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:39 -0500
commitfa1ac57a317f927b8fb901e6270fc41fdaae8e1c (patch)
tree10d6a02d63a35c3b733d03fefcd8ac951656475d /arch/microblaze/kernel/ptrace.c
parent7a0fde8b3b16fcfb2bb4a136c53918f1ca9b35cc (diff)
microblaze: use generic ptrace_resume code
Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT and PTRACE_KILL. This also makes PTRACE_SINGLESTEP return -EIO while it previously succeeded despite not actually causing any kind of single stepping. Also the TIF_SYSCALL_TRACE thread flag is now cleared on PTRACE_KILL which it previously wasn't which is consistent with all architectures using the modern ptrace code. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Roland McGrath <roland@redhat.com> Acked-by: Michal Simek <monstr@monstr.eu> Cc: John Williams <john.williams@petalogix.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/microblaze/kernel/ptrace.c')
-rw-r--r--arch/microblaze/kernel/ptrace.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c
index 8c21d8b3cb0c..6d6349a145f9 100644
--- a/arch/microblaze/kernel/ptrace.c
+++ b/arch/microblaze/kernel/ptrace.c
@@ -110,43 +110,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
110 if (rval == 0 && request == PTRACE_PEEKUSR) 110 if (rval == 0 && request == PTRACE_PEEKUSR)
111 rval = put_user(val, (unsigned long *)data); 111 rval = put_user(val, (unsigned long *)data);
112 break; 112 break;
113 /* Continue and stop at next (return from) syscall */
114 case PTRACE_SYSCALL:
115 pr_debug("PTRACE_SYSCALL\n");
116 case PTRACE_SINGLESTEP:
117 pr_debug("PTRACE_SINGLESTEP\n");
118 /* Restart after a signal. */
119 case PTRACE_CONT:
120 pr_debug("PTRACE_CONT\n");
121 rval = -EIO;
122 if (!valid_signal(data))
123 break;
124
125 if (request == PTRACE_SYSCALL)
126 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
127 else
128 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
129
130 child->exit_code = data;
131 pr_debug("wakeup_process\n");
132 wake_up_process(child);
133 rval = 0;
134 break;
135
136 /*
137 * make the child exit. Best I can do is send it a sigkill.
138 * perhaps it should be put in the status that it wants to
139 * exit.
140 */
141 case PTRACE_KILL:
142 pr_debug("PTRACE_KILL\n");
143 rval = 0;
144 if (child->exit_state == EXIT_ZOMBIE) /* already dead */
145 break;
146 child->exit_code = SIGKILL;
147 wake_up_process(child);
148 break;
149
150 default: 113 default:
151 rval = ptrace_request(child, request, addr, data); 114 rval = ptrace_request(child, request, addr, data);
152 } 115 }