diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/ptrace.c | 12 | ||||
-rw-r--r-- | arch/sparc64/kernel/ptrace.c | 19 |
2 files changed, 0 insertions, 31 deletions
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index fc4ad69357b8..c4f93bd2daf2 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
@@ -530,18 +530,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
530 | pt_error_return(regs, EIO); | 530 | pt_error_return(regs, EIO); |
531 | goto out_tsk; | 531 | goto out_tsk; |
532 | } | 532 | } |
533 | if (addr != 1) { | ||
534 | if (addr & 3) { | ||
535 | pt_error_return(regs, EINVAL); | ||
536 | goto out_tsk; | ||
537 | } | ||
538 | #ifdef DEBUG_PTRACE | ||
539 | printk ("Original: %08lx %08lx\n", child->thread.kregs->pc, child->thread.kregs->npc); | ||
540 | printk ("Continuing with %08lx %08lx\n", addr, addr+4); | ||
541 | #endif | ||
542 | child->thread.kregs->pc = addr; | ||
543 | child->thread.kregs->npc = addr + 4; | ||
544 | } | ||
545 | 533 | ||
546 | if (request == PTRACE_SYSCALL) | 534 | if (request == PTRACE_SYSCALL) |
547 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 535 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index 1722dc51b0d8..08bac537262a 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -514,25 +514,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
514 | pt_error_return(regs, EIO); | 514 | pt_error_return(regs, EIO); |
515 | goto out_tsk; | 515 | goto out_tsk; |
516 | } | 516 | } |
517 | if (addr != 1) { | ||
518 | unsigned long pc_mask = ~0UL; | ||
519 | |||
520 | if ((child->thread_info->flags & _TIF_32BIT) != 0) | ||
521 | pc_mask = 0xffffffff; | ||
522 | |||
523 | if (addr & 3) { | ||
524 | pt_error_return(regs, EINVAL); | ||
525 | goto out_tsk; | ||
526 | } | ||
527 | #ifdef DEBUG_PTRACE | ||
528 | printk ("Original: %016lx %016lx\n", | ||
529 | child->thread_info->kregs->tpc, | ||
530 | child->thread_info->kregs->tnpc); | ||
531 | printk ("Continuing with %016lx %016lx\n", addr, addr+4); | ||
532 | #endif | ||
533 | child->thread_info->kregs->tpc = (addr & pc_mask); | ||
534 | child->thread_info->kregs->tnpc = ((addr + 4) & pc_mask); | ||
535 | } | ||
536 | 517 | ||
537 | if (request == PTRACE_SYSCALL) { | 518 | if (request == PTRACE_SYSCALL) { |
538 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 519 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |