Skip to content

Commit 52c01ec

Browse files
amlutogregkh
authored andcommitted
uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME
commit 82975bc upstream. x86 call do_notify_resume on paranoid returns if TIF_UPROBE is set but not on non-paranoid returns. I suspect that this is a mistake and that the code only works because int3 is paranoid. Setting _TIF_NOTIFY_RESUME in the uprobe code was probably a workaround for the x86 bug. With that bug fixed, we can remove _TIF_NOTIFY_RESUME from the uprobes code. Reported-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Acked-by: Borislav Petkov <bp@suse.de> Signed-off-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d90f2d7 commit 52c01ec

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎arch/x86/include/asm/thread_info.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ struct thread_info {
144144
/* Only used for 64 bit */
145145
#define _TIF_DO_NOTIFY_MASK \
146146
(_TIF_SIGPENDING | _TIF_MCE_NOTIFY | _TIF_NOTIFY_RESUME | \
147-
_TIF_USER_RETURN_NOTIFY)
147+
_TIF_USER_RETURN_NOTIFY | _TIF_UPROBE)
148148

149149
/* flags to check in __switch_to() */
150150
#define _TIF_WORK_CTXSW \

‎kernel/events/uprobes.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,6 @@ bool uprobe_deny_signal(void)
16211621
if (__fatal_signal_pending(t) || arch_uprobe_xol_was_trapped(t)) {
16221622
utask->state = UTASK_SSTEP_TRAPPED;
16231623
set_tsk_thread_flag(t, TIF_UPROBE);
1624-
set_tsk_thread_flag(t, TIF_NOTIFY_RESUME);
16251624
}
16261625
}
16271626

0 commit comments

Comments
 (0)