diff options
| -rw-r--r-- | arch/x86/kernel/signal_32.c | 5 | ||||
| -rw-r--r-- | arch/x86/kernel/signal_64.c | 5 | ||||
| -rw-r--r-- | include/asm-x86/thread_info.h | 4 |
3 files changed, 13 insertions, 1 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) |
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h index da0a675adf94..4cd5b7bdc8cc 100644 --- a/include/asm-x86/thread_info.h +++ b/include/asm-x86/thread_info.h | |||
| @@ -71,6 +71,7 @@ struct thread_info { | |||
| 71 | * Warning: layout of LSW is hardcoded in entry.S | 71 | * Warning: layout of LSW is hardcoded in entry.S |
| 72 | */ | 72 | */ |
| 73 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 73 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
| 74 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ | ||
| 74 | #define TIF_SIGPENDING 2 /* signal pending */ | 75 | #define TIF_SIGPENDING 2 /* signal pending */ |
| 75 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 76 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
| 76 | #define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ | 77 | #define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ |
| @@ -93,6 +94,7 @@ struct thread_info { | |||
| 93 | #define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */ | 94 | #define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */ |
| 94 | 95 | ||
| 95 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 96 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
| 97 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
| 96 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 98 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
| 97 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 99 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
| 98 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 100 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
| @@ -133,7 +135,7 @@ struct thread_info { | |||
| 133 | 135 | ||
| 134 | /* Only used for 64 bit */ | 136 | /* Only used for 64 bit */ |
| 135 | #define _TIF_DO_NOTIFY_MASK \ | 137 | #define _TIF_DO_NOTIFY_MASK \ |
| 136 | (_TIF_SIGPENDING|_TIF_MCE_NOTIFY) | 138 | (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_NOTIFY_RESUME) |
| 137 | 139 | ||
| 138 | /* flags to check in __switch_to() */ | 140 | /* flags to check in __switch_to() */ |
| 139 | #define _TIF_WORK_CTXSW \ | 141 | #define _TIF_WORK_CTXSW \ |
