Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964779AbbFJHKy (ORCPT ); Wed, 10 Jun 2015 03:10:54 -0400 Received: from terminus.zytor.com ([198.137.202.10]:34085 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933384AbbFJHKi (ORCPT ); Wed, 10 Jun 2015 03:10:38 -0400 Date: Wed, 10 Jun 2015 00:09:31 -0700 From: tip-bot for Denys Vlasenko Message-ID: Cc: bp@alien8.de, keescook@chromium.org, peterz@infradead.org, fweisbec@gmail.com, rostedt@goodmis.org, ast@plumgrid.com, tglx@linutronix.de, akpm@linux-foundation.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, dvlasenk@redhat.com, oleg@redhat.com, luto@amacapital.net, hpa@zytor.com, wad@chromium.org, mingo@kernel.org Reply-To: mingo@kernel.org, oleg@redhat.com, hpa@zytor.com, wad@chromium.org, luto@amacapital.net, tglx@linutronix.de, ast@plumgrid.com, rostedt@goodmis.org, dvlasenk@redhat.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, keescook@chromium.org, bp@alien8.de, fweisbec@gmail.com, peterz@infradead.org In-Reply-To: <1433876051-26604-1-git-send-email-dvlasenk@redhat.com> References: <1433876051-26604-1-git-send-email-dvlasenk@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/asm/entry/32: Fix fallout from the R9 trick removal in the SYSCALL code Git-Commit-ID: aee4b013a71666f11ffeac11ab45bb7c6e0e394d 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: 2254 Lines: 59 Commit-ID: aee4b013a71666f11ffeac11ab45bb7c6e0e394d Gitweb: http://git.kernel.org/tip/aee4b013a71666f11ffeac11ab45bb7c6e0e394d Author: Denys Vlasenko AuthorDate: Tue, 9 Jun 2015 20:54:07 +0200 Committer: Ingo Molnar CommitDate: Wed, 10 Jun 2015 08:42:12 +0200 x86/asm/entry/32: Fix fallout from the R9 trick removal in the SYSCALL code I put %ebp restoration code too late. Under strace, it is not reached and %ebp is not restored upon return to userspace. This is the fix. Run-tested. Signed-off-by: Denys Vlasenko Cc: Alexei Starovoitov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Will Drewry Link: http://lkml.kernel.org/r/1433876051-26604-1-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/entry/entry_64_compat.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S index 2093ce6..2c44180 100644 --- a/arch/x86/entry/entry_64_compat.S +++ b/arch/x86/entry/entry_64_compat.S @@ -344,6 +344,7 @@ cstar_dispatch: call *ia32_sys_call_table(, %rax, 8) movq %rax, RAX(%rsp) 1: + movl RCX(%rsp), %ebp DISABLE_INTERRUPTS(CLBR_NONE) TRACE_IRQS_OFF testl $_TIF_ALLWORK_MASK, ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS) @@ -351,7 +352,6 @@ cstar_dispatch: sysretl_from_sys_call: andl $~TS_COMPAT, ASM_THREAD_INFO(TI_status, %rsp, SIZEOF_PTREGS) - movl RCX(%rsp), %ebp RESTORE_RSI_RDI_RDX movl RIP(%rsp), %ecx movl EFLAGS(%rsp), %r11d -- 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/