mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] i386: make kernel_execve() suitable for stack unwinding
@ 2010-09-02 13:01 Jan Beulich
  2010-09-03  7:13 ` [tip:x86/asm] i386: Make " tip-bot for Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2010-09-02 13:01 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: arnd, linux-kernel

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@novell.com>
Cc: Arnd Bergmann <arnd@arndb.de>

---
 arch/x86/kernel/sys_i386_32.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.36-rc3/arch/x86/kernel/sys_i386_32.c
+++ 2.6.36-rc3-i386-unwind-annotations/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;
 }




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-03  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-02 13:01 [PATCH] i386: make kernel_execve() suitable for stack unwinding Jan Beulich
2010-09-03  7:13 ` [tip:x86/asm] i386: Make " tip-bot for Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome