Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755133AbbDIJDQ (ORCPT ); Thu, 9 Apr 2015 05:03:16 -0400 Received: from terminus.zytor.com ([198.137.202.10]:51817 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932574AbbDIJDL (ORCPT ); Thu, 9 Apr 2015 05:03:11 -0400 Date: Thu, 9 Apr 2015 02:02:33 -0700 From: tip-bot for Denys Vlasenko Message-ID: Cc: keescook@chromium.org, rostedt@goodmis.org, ast@plumgrid.com, fweisbec@gmail.com, mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, wad@chromium.org, bp@alien8.de, oleg@redhat.com, luto@amacapital.net, torvalds@linux-foundation.org, brgerst@gmail.com, tglx@linutronix.de, dvlasenk@redhat.com Reply-To: fweisbec@gmail.com, ast@plumgrid.com, rostedt@goodmis.org, keescook@chromium.org, mingo@kernel.org, wad@chromium.org, hpa@zytor.com, linux-kernel@vger.kernel.org, oleg@redhat.com, bp@alien8.de, luto@amacapital.net, tglx@linutronix.de, torvalds@linux-foundation.org, brgerst@gmail.com, dvlasenk@redhat.com In-Reply-To: <1428439424-7258-3-git-send-email-dvlasenk@redhat.com> References: <1428439424-7258-3-git-send-email-dvlasenk@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/asm/entry: Zero EXTRA_REGS for stub32_execve() too Git-Commit-ID: 0f90fb979d7b53d80a6d5cb6e127b4b4b249907e 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: 2732 Lines: 80 Commit-ID: 0f90fb979d7b53d80a6d5cb6e127b4b4b249907e Gitweb: http://git.kernel.org/tip/0f90fb979d7b53d80a6d5cb6e127b4b4b249907e Author: Denys Vlasenko AuthorDate: Tue, 7 Apr 2015 22:43:39 +0200 Committer: Ingo Molnar CommitDate: Thu, 9 Apr 2015 10:31:24 +0200 x86/asm/entry: Zero EXTRA_REGS for stub32_execve() too The change which affected how execve clears EXTRA_REGS missed 32-bit execve syscalls. Fix this by using 64-bit execve stub epilogue for them too. Run-tested. Signed-off-by: Denys Vlasenko Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Will Drewry Link: http://lkml.kernel.org/r/1428439424-7258-3-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/ia32/ia32entry.S | 2 -- arch/x86/kernel/entry_64.S | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 5d8f987..a821b1c 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S @@ -571,8 +571,6 @@ GLOBAL(\label) PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn PTREGSCALL stub32_sigreturn, sys32_sigreturn - PTREGSCALL stub32_execve, compat_sys_execve - PTREGSCALL stub32_execveat, compat_sys_execveat PTREGSCALL stub32_fork, sys_fork PTREGSCALL stub32_vfork, sys_vfork diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index f7d9ba6..5380b3a 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -538,6 +538,21 @@ ENTRY(stub_x32_execveat) END(stub_x32_execveat) #endif +#ifdef CONFIG_IA32_EMULATION +ENTRY(stub32_execve) + CFI_STARTPROC + call compat_sys_execve + jmp return_from_execve + CFI_ENDPROC +END(stub32_execve) +ENTRY(stub32_execveat) + CFI_STARTPROC + call compat_sys_execveat + jmp return_from_execve + CFI_ENDPROC +END(stub32_execveat) +#endif + /* * sigreturn is special because it needs to restore all registers on return. * This cannot be done with SYSRET, so use the IRET return path instead. -- 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/