Commit 8313809ef3bfa8fa366d416add2150787235f192
Committed by
Linus Torvalds
1 parent
6d75ca1022
Exists in
master
and in
7 other branches
cris arch-v10: 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> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 0 additions and 51 deletions Side-by-side Diff
arch/cris/arch-v10/kernel/ptrace.c
... | ... | @@ -127,57 +127,6 @@ |
127 | 127 | ret = 0; |
128 | 128 | break; |
129 | 129 | |
130 | - case PTRACE_SYSCALL: | |
131 | - case PTRACE_CONT: | |
132 | - ret = -EIO; | |
133 | - | |
134 | - if (!valid_signal(data)) | |
135 | - break; | |
136 | - | |
137 | - if (request == PTRACE_SYSCALL) { | |
138 | - set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | |
139 | - } | |
140 | - else { | |
141 | - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | |
142 | - } | |
143 | - | |
144 | - child->exit_code = data; | |
145 | - | |
146 | - /* TODO: make sure any pending breakpoint is killed */ | |
147 | - wake_up_process(child); | |
148 | - ret = 0; | |
149 | - | |
150 | - break; | |
151 | - | |
152 | - /* Make the child exit by sending it a sigkill. */ | |
153 | - case PTRACE_KILL: | |
154 | - ret = 0; | |
155 | - | |
156 | - if (child->exit_state == EXIT_ZOMBIE) | |
157 | - break; | |
158 | - | |
159 | - child->exit_code = SIGKILL; | |
160 | - | |
161 | - /* TODO: make sure any pending breakpoint is killed */ | |
162 | - wake_up_process(child); | |
163 | - break; | |
164 | - | |
165 | - /* Set the trap flag. */ | |
166 | - case PTRACE_SINGLESTEP: | |
167 | - ret = -EIO; | |
168 | - | |
169 | - if (!valid_signal(data)) | |
170 | - break; | |
171 | - | |
172 | - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | |
173 | - | |
174 | - /* TODO: set some clever breakpoint mechanism... */ | |
175 | - | |
176 | - child->exit_code = data; | |
177 | - wake_up_process(child); | |
178 | - ret = 0; | |
179 | - break; | |
180 | - | |
181 | 130 | /* Get all GP registers from the child. */ |
182 | 131 | case PTRACE_GETREGS: { |
183 | 132 | int i; |