summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/signal_32.c
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-09-06 01:27:11 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-06 14:54:02 +0200
commit72fa50f4ef9014f4212945b766af84ea94308903 (patch)
treea68cda12a76d130238621b6d9d0a9b13e3b3c013 /arch/x86/kernel/signal_32.c
parentx86_32: signal: use syscall_get_nr and error (diff)
downloadlinux-72fa50f4ef9014f4212945b766af84ea94308903.tar.xz
linux-72fa50f4ef9014f4212945b766af84ea94308903.zip
x86_32: signal: introduce signal_fault()
implement signal_fault() for 32bit. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/signal_32.c')
-rw-r--r--arch/x86/kernel/signal_32.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index 3e4a688bb84f..76d05d703845 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -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;
}
@@ -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);
+}