diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 08:33:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 08:33:25 -0700 |
commit | c32f1a34ff1097110469a240ea4539dc9c101e96 (patch) | |
tree | eda863205e83afe54cbedcf15cdac416cdec2cf5 /arch/sparc/kernel/signal.c | |
parent | 4f31f3080943c7e3541f07df326f06d598a067d0 (diff) | |
parent | 04d91cb8163f7f946e348b2362a6e5dfa5f06b13 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc: Set CONFIG_HAVE_ARCH_TRACEHOOK
sparc: Add task_pt_regs().
sparc: Add call to tracehook_signal_handler().
sparc: Create and use TIF_NOTIFY_RESUME.
sparc: Use tracehook routines in syscall_trace().
sparc64: tracehook: CONFIG_HAVE_ARCH_TRACEHOOK
sparc: Add user_stack_pointer().
sparc64: tracehook_signal_handler
sparc64: tracehook: TIF_NOTIFY_RESUME
sparc: Add asm/syscall.h
sparc64: tracehook syscall
sparc: enable headers_export again
sparc, sparc64: use arch/sparc/include
Diffstat (limited to 'arch/sparc/kernel/signal.c')
-rw-r--r-- | arch/sparc/kernel/signal.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c index 3fd1df9f9ba..c94f91c8b6e 100644 --- a/arch/sparc/kernel/signal.c +++ b/arch/sparc/kernel/signal.c @@ -18,6 +18,7 @@ #include <linux/smp.h> #include <linux/binfmts.h> /* do_coredum */ #include <linux/bitops.h> +#include <linux/tracehook.h> #include <asm/uaccess.h> #include <asm/ptrace.h> @@ -513,7 +514,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs, * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. */ -asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0) +static void do_signal(struct pt_regs *regs, unsigned long orig_i0) { struct k_sigaction ka; int restart_syscall; @@ -552,6 +553,8 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0) */ if (test_thread_flag(TIF_RESTORE_SIGMASK)) clear_thread_flag(TIF_RESTORE_SIGMASK); + + tracehook_signal_handler(signr, &info, &ka, regs, 0); return; } if (restart_syscall && @@ -579,6 +582,17 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0) } } +void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, + unsigned long thread_info_flags) +{ + if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) + do_signal(regs, orig_i0); + if (thread_info_flags & _TIF_NOTIFY_RESUME) { + clear_thread_flag(TIF_NOTIFY_RESUME); + tracehook_notify_resume(regs); + } +} + asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr, struct sigstack __user *ossptr, unsigned long sp) |