aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/ptrace.c')
-rw-r--r--arch/blackfin/kernel/ptrace.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 271d7c63cef..30f4828277a 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -285,9 +285,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
285 tmp = child->mm->start_data; 285 tmp = child->mm->start_data;
286#ifdef CONFIG_BINFMT_ELF_FDPIC 286#ifdef CONFIG_BINFMT_ELF_FDPIC
287 } else if (addr == (sizeof(struct pt_regs) + 12)) { 287 } else if (addr == (sizeof(struct pt_regs) + 12)) {
288 tmp = child->mm->context.exec_fdpic_loadmap; 288 goto case_PTRACE_GETFDPIC_EXEC;
289 } else if (addr == (sizeof(struct pt_regs) + 16)) { 289 } else if (addr == (sizeof(struct pt_regs) + 16)) {
290 tmp = child->mm->context.interp_fdpic_loadmap; 290 goto case_PTRACE_GETFDPIC_INTERP;
291#endif 291#endif
292 } else { 292 } else {
293 tmp = get_reg(child, addr); 293 tmp = get_reg(child, addr);
@@ -296,6 +296,28 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
296 break; 296 break;
297 } 297 }
298 298
299#ifdef CONFIG_BINFMT_ELF_FDPIC
300 case PTRACE_GETFDPIC: {
301 unsigned long tmp = 0;
302
303 switch (addr) {
304 case_PTRACE_GETFDPIC_EXEC:
305 case PTRACE_GETFDPIC_EXEC:
306 tmp = child->mm->context.exec_fdpic_loadmap;
307 break;
308 case_PTRACE_GETFDPIC_INTERP:
309 case PTRACE_GETFDPIC_INTERP:
310 tmp = child->mm->context.interp_fdpic_loadmap;
311 break;
312 default:
313 break;
314 }
315
316 ret = put_user(tmp, datap);
317 break;
318 }
319#endif
320
299 /* when I and D space are separate, this will have to be fixed. */ 321 /* when I and D space are separate, this will have to be fixed. */
300 case PTRACE_POKEDATA: 322 case PTRACE_POKEDATA:
301 pr_debug("ptrace: PTRACE_PEEKDATA\n"); 323 pr_debug("ptrace: PTRACE_PEEKDATA\n");