lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-7fe977dab356fbd7e86aa10bf83891761107c57c@git.kernel.org>
Date:	Fri, 3 Sep 2010 07:13:10 GMT
From:	tip-bot for Jan Beulich <JBeulich@...ell.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, arnd@...db.de, hpa@...or.com,
	mingo@...hat.com, jbeulich@...ell.com, JBeulich@...ell.com,
	tglx@...utronix.de, mingo@...e.hu
Subject: [tip:x86/asm] i386: Make kernel_execve() suitable for stack unwinding

Commit-ID:  7fe977dab356fbd7e86aa10bf83891761107c57c
Gitweb:     http://git.kernel.org/tip/7fe977dab356fbd7e86aa10bf83891761107c57c
Author:     Jan Beulich <JBeulich@...ell.com>
AuthorDate: Thu, 2 Sep 2010 14:01:58 +0100
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Fri, 3 Sep 2010 08:16:02 +0200

i386: Make kernel_execve() suitable for stack unwinding

The explicit saving and restoring of %ebx was confusing stack
unwind data consumers, and it is plain unnecessary to do this
within the asm(), since that was only introduced for PIC user
mode consumers of the original _syscall3() macro this was
derived from.

Signed-off-by: Jan Beulich <jbeulich@...ell.com>
Cc: Arnd Bergmann <arnd@...db.de>
LKML-Reference: <4C7FBC660200007800013F95@....id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/kernel/sys_i386_32.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c
index d5e0662..0b0cb5f 100644
--- a/arch/x86/kernel/sys_i386_32.c
+++ b/arch/x86/kernel/sys_i386_32.c
@@ -33,8 +33,8 @@ int kernel_execve(const char *filename,
 		  const char *const envp[])
 {
 	long __res;
-	asm volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx"
+	asm volatile ("int $0x80"
 	: "=a" (__res)
-	: "0" (__NR_execve), "ri" (filename), "c" (argv), "d" (envp) : "memory");
+	: "0" (__NR_execve), "b" (filename), "c" (argv), "d" (envp) : "memory");
 	return __res;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ