Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113276
b: refs/heads/master
c: 72fa50f
h: refs/heads/master
v: v3
  • Loading branch information
Hiroshi Shimamoto authored and Ingo Molnar committed Sep 6, 2008
1 parent e3b0cd0 commit a4151fc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb57925f5057837c248b57a51181fd6b138a32f3
refs/heads/master: 72fa50f4ef9014f4212945b766af84ea94308903
18 changes: 17 additions & 1 deletion trunk/arch/x86/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ asmlinkage int sys_rt_sigreturn(unsigned long __unused)
return ax;

badframe:
force_sig(SIGSEGV, current);
signal_fault(regs, frame, "rt sigreturn");
return 0;
}

Expand Down Expand Up @@ -669,3 +669,19 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)

clear_thread_flag(TIF_IRET);
}

void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
{
struct task_struct *me = current;

if (show_unhandled_signals && printk_ratelimit()) {
printk(KERN_INFO
"%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
me->comm, me->pid, where, frame,
regs->ip, regs->sp, regs->orig_ax);
print_vma_addr(" in ", regs->ip);
printk(KERN_CONT "\n");
}

force_sig(SIGSEGV, me);
}
4 changes: 2 additions & 2 deletions trunk/include/asm-x86/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
#ifdef CONFIG_X86_32
extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
int error_code);
#else
void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
#endif

void signal_fault(struct pt_regs *regs, void __user *frame, char *where);

extern long syscall_trace_enter(struct pt_regs *);
extern void syscall_trace_leave(struct pt_regs *);

Expand Down

0 comments on commit a4151fc

Please sign in to comment.