From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932865AbbGHTOA (ORCPT ); Wed, 8 Jul 2015 15:14:00 -0400 Received: from terminus.zytor.com ([198.137.202.10]:54059 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754634AbbGHTNk (ORCPT ); Wed, 8 Jul 2015 15:13:40 -0400 Date: Wed, 8 Jul 2015 12:12:40 -0700 From: tip-bot for Andy Lutomirski Message-ID: Cc: luto@kernel.org, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, brgerst@gmail.com, luto@amacapital.net, dvlasenk@redhat.com, bp@alien8.de, peterz@infradead.org Reply-To: luto@kernel.org, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, dvlasenk@redhat.com, brgerst@gmail.com, luto@amacapital.net, bp@alien8.de, peterz@infradead.org In-Reply-To: <25cf0a01e01c6008118dd8f8d9f043020416700c.1436291493.git.luto@kernel.org> References: <25cf0a01e01c6008118dd8f8d9f043020416700c.1436291493.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/entry/64: Fix IRQ state confusion and related warning on compat syscalls with CONFIG_AUDITSYSCALL =n Git-Commit-ID: 8f7f06b87acd2e017d6c536f59e10045dd8d0578 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: 8f7f06b87acd2e017d6c536f59e10045dd8d0578 Gitweb: http://git.kernel.org/tip/8f7f06b87acd2e017d6c536f59e10045dd8d0578 Author: Andy Lutomirski AuthorDate: Tue, 7 Jul 2015 10:55:28 -0700 Committer: Ingo Molnar CommitDate: Wed, 8 Jul 2015 21:10:25 +0200 x86/entry/64: Fix IRQ state confusion and related warning on compat syscalls with CONFIG_AUDITSYSCALL=n int_ret_from_sys_call now expects IRQs to be enabled. I got this right in the real sysexit_audit and sysretl_audit asm paths, but I missed it in the #defined-away versions when CONFIG_AUDITSYSCALL=n. This is a straightforward fix for CONFIG_AUDITSYSCALL=n Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 29ea1b258b98 ("x86/entry/64: Migrate 64-bit and compat syscalls to the new exit handlers and remove old assembly code") Link: http://lkml.kernel.org/r/25cf0a01e01c6008118dd8f8d9f043020416700c.1436291493.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/entry/entry_64_compat.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S index 25aca51..d757153 100644 --- a/arch/x86/entry/entry_64_compat.S +++ b/arch/x86/entry/entry_64_compat.S @@ -22,8 +22,8 @@ #define __AUDIT_ARCH_LE 0x40000000 #ifndef CONFIG_AUDITSYSCALL -# define sysexit_audit ia32_ret_from_sys_call -# define sysretl_audit ia32_ret_from_sys_call +# define sysexit_audit ia32_ret_from_sys_call_irqs_off +# define sysretl_audit ia32_ret_from_sys_call_irqs_off #endif .section .entry.text, "ax" @@ -466,6 +466,10 @@ ia32_badarg: /* And exit again. */ jmp retint_user +ia32_ret_from_sys_call_irqs_off: + TRACE_IRQS_ON + ENABLE_INTERRUPTS(CLBR_NONE) + ia32_ret_from_sys_call: xorl %eax, %eax /* Do not leak kernel information */ movq %rax, R11(%rsp)