Skip to content

Commit 392a625

Browse files
amlutoIngo Molnar
authored andcommitted
x86/entry: Remove TIF_SINGLESTEP entry work
Now that SYSENTER with TF set puts X86_EFLAGS_TF directly into regs->flags, we don't need a TIF_SINGLESTEP fixup in the syscall entry code. Remove it. Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Andrew Cooper <andrew.cooper3@citrix.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/2d15f24da52dafc9d2f0b8d76f55544f4779c517.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 2a41aa4 commit 392a625

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

arch/x86/entry/common.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,6 @@ long syscall_trace_enter_phase2(struct pt_regs *regs, u32 arch,
172172
if (IS_ENABLED(CONFIG_DEBUG_ENTRY))
173173
BUG_ON(regs != task_pt_regs(current));
174174

175-
/*
176-
* If we stepped into a sysenter/syscall insn, it trapped in
177-
* kernel mode; do_debug() cleared TF and set TIF_SINGLESTEP.
178-
* If user-mode had set TF itself, then it's still clear from
179-
* do_debug() and we need to set it again to restore the user
180-
* state. If we entered on the slow path, TF was already set.
181-
*/
182-
if (work & _TIF_SINGLESTEP)
183-
regs->flags |= X86_EFLAGS_TF;
184-
185175
#ifdef CONFIG_SECCOMP
186176
/*
187177
* Call seccomp_phase2 before running the other hooks so that

arch/x86/include/asm/thread_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ struct thread_info {
137137
/* work to do in syscall_trace_enter() */
138138
#define _TIF_WORK_SYSCALL_ENTRY \
139139
(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_EMU | _TIF_SYSCALL_AUDIT | \
140-
_TIF_SECCOMP | _TIF_SINGLESTEP | _TIF_SYSCALL_TRACEPOINT | \
140+
_TIF_SECCOMP | _TIF_SYSCALL_TRACEPOINT | \
141141
_TIF_NOHZ)
142142

143143
/* work to do on any return to user space */

0 commit comments

Comments
 (0)