Skip to content

Commit 7fe977d

Browse files
Jan BeulichIngo Molnar
authored andcommitted
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 <[email protected]> Cc: Arnd Bergmann <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 2bfc96a commit 7fe977d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/sys_i386_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ int kernel_execve(const char *filename,
3333
const char *const envp[])
3434
{
3535
long __res;
36-
asm volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx"
36+
asm volatile ("int $0x80"
3737
: "=a" (__res)
38-
: "0" (__NR_execve), "ri" (filename), "c" (argv), "d" (envp) : "memory");
38+
: "0" (__NR_execve), "b" (filename), "c" (argv), "d" (envp) : "memory");
3939
return __res;
4040
}

0 commit comments

Comments
 (0)