Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933924Ab3E1Myz (ORCPT ); Tue, 28 May 2013 08:54:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49939 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933886Ab3E1Myy (ORCPT ); Tue, 28 May 2013 08:54:54 -0400 Date: Tue, 28 May 2013 05:54:07 -0700 From: tip-bot for Jiri Olsa Message-ID: Cc: eranian@google.com, mingo@kernel.org, a.p.zijlstra@chello.nl, torvalds@linux-foundation.org, acme@ghostprotocols.net, jolsa@redhat.com, fweisbec@gmail.com, akpm@linux-foundation.org, tglx@linutronix.de, oleg@redhat.com, cjashfor@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, hpa@zytor.com, paulus@samba.org, andi@firstfloor.org, vincent.weaver@maine.edu, mingo@elte.hu Reply-To: mingo@kernel.org, eranian@google.com, torvalds@linux-foundation.org, a.p.zijlstra@chello.nl, acme@ghostprotocols.net, jolsa@redhat.com, fweisbec@gmail.com, akpm@linux-foundation.org, oleg@redhat.com, tglx@linutronix.de, cjashfor@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, hpa@zytor.com, paulus@samba.org, andi@firstfloor.org, vincent.weaver@maine.edu, mingo@elte.hu In-Reply-To: <1367421944-19082-4-git-send-email-jolsa@redhat.com> References: <1367421944-19082-4-git-send-email-jolsa@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] x86/signals: Merge EFLAGS bit clearing into a single statement Git-Commit-ID: ddd40da4ccbabdd2e941837aa987e08dfa4396b4 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 Content-Length: 2736 Lines: 71 Commit-ID: ddd40da4ccbabdd2e941837aa987e08dfa4396b4 Gitweb: http://git.kernel.org/tip/ddd40da4ccbabdd2e941837aa987e08dfa4396b4 Author: Jiri Olsa AuthorDate: Wed, 1 May 2013 17:25:43 +0200 Committer: Ingo Molnar CommitDate: Tue, 28 May 2013 08:46:53 +0200 x86/signals: Merge EFLAGS bit clearing into a single statement Merging EFLAGS bit clearing into a single statement, to ensure EFLAGS bits are being cleared in a single instruction. Signed-off-by: Jiri Olsa Tested-by: Oleg Nesterov Reviewed-by: Frederic Weisbecker Originally-Reported-by: Vince Weaver Cc: H. Peter Anvin Cc: Andi Kleen Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Paul Mackerras Cc: Corey Ashford Cc: Frederic Weisbecker Cc: Vince Weaver Cc: Stephane Eranian Cc: Linus Torvalds Cc: Andrew Morton Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/r/1367421944-19082-4-git-send-email-jolsa@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/signal.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index cb12fc9..cf91358 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -662,21 +662,17 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs) if (!failed) { /* * Clear the direction flag as per the ABI for function entry. - */ - regs->flags &= ~X86_EFLAGS_DF; - /* + * * Clear RF when entering the signal handler, because * it might disable possible debug exception from the * signal handler. - */ - regs->flags &= ~X86_EFLAGS_RF; - /* + * * Clear TF when entering the signal handler, but * notify any tracer that was single-stepping it. * The tracer may want to single-step inside the * handler too. */ - regs->flags &= ~X86_EFLAGS_TF; + regs->flags &= ~(X86_EFLAGS_DF|X86_EFLAGS_RF|X86_EFLAGS_TF); } signal_setup_done(failed, ksig, test_thread_flag(TIF_SINGLESTEP)); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/