Skip to content

Commit 82975bc

Browse files
amlutotorvalds
authored andcommitted
uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME
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 <[email protected]> Acked-by: Srikar Dronamraju <[email protected]> Acked-by: Borislav Petkov <[email protected]> Signed-off-by: Andy Lutomirski <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 90e362f commit 82975bc

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

arch/x86/include/asm/thread_info.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ struct thread_info {
141141
/* Only used for 64 bit */
142142
#define _TIF_DO_NOTIFY_MASK \
143143
(_TIF_SIGPENDING | _TIF_MCE_NOTIFY | _TIF_NOTIFY_RESUME | \
144-
_TIF_USER_RETURN_NOTIFY)
144+
_TIF_USER_RETURN_NOTIFY | _TIF_UPROBE)
145145

146146
/* flags to check in __switch_to() */
147147
#define _TIF_WORK_CTXSW \

kernel/events/uprobes.c

-1
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,6 @@ bool uprobe_deny_signal(void)
16401640
if (__fatal_signal_pending(t) || arch_uprobe_xol_was_trapped(t)) {
16411641
utask->state = UTASK_SSTEP_TRAPPED;
16421642
set_tsk_thread_flag(t, TIF_UPROBE);
1643-
set_tsk_thread_flag(t, TIF_NOTIFY_RESUME);
16441643
}
16451644
}
16461645

0 commit comments

Comments
 (0)