diff options
author | Roland McGrath <roland@redhat.com> | 2008-04-19 22:10:57 -0400 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2008-07-26 17:38:05 -0400 |
commit | 59e52130f04537d2c80ea44bb007cadd1ad29543 (patch) | |
tree | 80531b2e893f1b4a339ffc84351a82c0347601e6 /arch/x86 | |
parent | 4dfcbb997aa9f3a6a3ed8c192f0dac28b027e08f (diff) |
x86: tracehook: TIF_NOTIFY_RESUME
This adds TIF_NOTIFY_RESUME support for x86, both 64-bit and 32-bit.
When set, we call tracehook_notify_resume() on the way to user mode.
Signed-off-by: Roland McGrath <roland@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/signal_64.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 22aae1683c14..4445d26efd47 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -663,5 +663,10 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
663 | if (thread_info_flags & _TIF_SIGPENDING) | 663 | if (thread_info_flags & _TIF_SIGPENDING) |
664 | do_signal(regs); | 664 | do_signal(regs); |
665 | 665 | ||
666 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | ||
667 | clear_thread_flag(TIF_NOTIFY_RESUME); | ||
668 | tracehook_notify_resume(regs); | ||
669 | } | ||
670 | |||
666 | clear_thread_flag(TIF_IRET); | 671 | clear_thread_flag(TIF_IRET); |
667 | } | 672 | } |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index cb7cf0216ab7..d01e3f6ef26d 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -523,6 +523,11 @@ void do_notify_resume(struct pt_regs *regs, void *unused, | |||
523 | /* deal with pending signal delivery */ | 523 | /* deal with pending signal delivery */ |
524 | if (thread_info_flags & _TIF_SIGPENDING) | 524 | if (thread_info_flags & _TIF_SIGPENDING) |
525 | do_signal(regs); | 525 | do_signal(regs); |
526 | |||
527 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | ||
528 | clear_thread_flag(TIF_NOTIFY_RESUME); | ||
529 | tracehook_notify_resume(regs); | ||
530 | } | ||
526 | } | 531 | } |
527 | 532 | ||
528 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where) | 533 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where) |