From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965803AbcCJLGE (ORCPT ); Thu, 10 Mar 2016 06:06:04 -0500 Received: from torg.zytor.com ([198.137.202.12]:38254 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965742AbcCJLFz (ORCPT ); Thu, 10 Mar 2016 06:05:55 -0500 Date: Thu, 10 Mar 2016 03:04:40 -0800 From: tip-bot for Andy Lutomirski Message-ID: Cc: dvlasenk@redhat.com, bp@alien8.de, peterz@infradead.org, hpa@zytor.com, luto@amacapital.net, torvalds@linux-foundation.org, andrew.cooper3@citrix.com, mingo@kernel.org, oleg@redhat.com, linux-kernel@vger.kernel.org, luto@kernel.org, brgerst@gmail.com, tglx@linutronix.de Reply-To: linux-kernel@vger.kernel.org, luto@kernel.org, brgerst@gmail.com, tglx@linutronix.de, dvlasenk@redhat.com, peterz@infradead.org, bp@alien8.de, luto@amacapital.net, hpa@zytor.com, andrew.cooper3@citrix.com, torvalds@linux-foundation.org, mingo@kernel.org, oleg@redhat.com In-Reply-To: <2d15f24da52dafc9d2f0b8d76f55544f4779c517.1457578375.git.luto@kernel.org> References: <2d15f24da52dafc9d2f0b8d76f55544f4779c517.1457578375.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/entry: Remove TIF_SINGLESTEP entry work Git-Commit-ID: 392a62549fbb80da48811d04391615a25c39d091 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 392a62549fbb80da48811d04391615a25c39d091 Gitweb: http://git.kernel.org/tip/392a62549fbb80da48811d04391615a25c39d091 Author: Andy Lutomirski AuthorDate: Wed, 9 Mar 2016 19:00:34 -0800 Committer: Ingo Molnar CommitDate: Thu, 10 Mar 2016 09:48:14 +0100 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 Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/2d15f24da52dafc9d2f0b8d76f55544f4779c517.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/entry/common.c | 10 ---------- arch/x86/include/asm/thread_info.h | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index 1a000f5..209ba33 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -172,16 +172,6 @@ long syscall_trace_enter_phase2(struct pt_regs *regs, u32 arch, if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) BUG_ON(regs != task_pt_regs(current)); - /* - * If we stepped into a sysenter/syscall insn, it trapped in - * kernel mode; do_debug() cleared TF and set TIF_SINGLESTEP. - * If user-mode had set TF itself, then it's still clear from - * do_debug() and we need to set it again to restore the user - * state. If we entered on the slow path, TF was already set. - */ - if (work & _TIF_SINGLESTEP) - regs->flags |= X86_EFLAGS_TF; - #ifdef CONFIG_SECCOMP /* * Call seccomp_phase2 before running the other hooks so that diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index c0778fc..f2e2302 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -137,7 +137,7 @@ struct thread_info { /* work to do in syscall_trace_enter() */ #define _TIF_WORK_SYSCALL_ENTRY \ (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_EMU | _TIF_SYSCALL_AUDIT | \ - _TIF_SECCOMP | _TIF_SINGLESTEP | _TIF_SYSCALL_TRACEPOINT | \ + _TIF_SECCOMP | _TIF_SYSCALL_TRACEPOINT | \ _TIF_NOHZ) /* work to do on any return to user space */