Skip to content

Commit

Permalink
i386: Make kernel_execve() suitable for stack unwinding
Browse files Browse the repository at this point in the history
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>
LKML-Reference: <4C7FBC660200007800013F95@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Sep 3, 2010
1 parent 2bfc96a commit 7fe977d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/sys_i386_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 7fe977d

Please sign in to comment.