lkml.org 
[lkml]   [2003]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Use %ebp rather than %ebx for thread_info pointer
> Hmm.. Did you check what fork
It only seems to use ret_from_fork, that sets up %ebp on its own.
> execve
Doesn't seem to use any function in entry.S
> vm86 do? I know at least the vm86()
> stuff sets up %ebx before calling the asm functions in entry.S, I bet
> those need to be changed to use %ebp too with something like this.

Right. This should fix it (compiles but untested):
--- arch/i386/kernel/vm86.c~ 2003-01-02 04:21:07.000000000 +0100
+++ arch/i386/kernel/vm86.c 2003-01-09 21:24:58.000000000 +0100
@@ -298,9 +298,10 @@
__asm__ __volatile__(
"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t"
"movl %0,%%esp\n\t"
+ "movl %1,%%ebp\n\t"
"jmp resume_userspace"
: /* no outputs */
- :"r" (&info->regs), "b" (tsk->thread_info) : "ax");
+ :"r" (&info->regs), "r" (tsk->thread_info) : "ax");
/* we never return here */
}

@@ -311,8 +312,9 @@
regs32 = save_v86_state(regs16);
regs32->eax = retval;
__asm__ __volatile__("movl %0,%%esp\n\t"
+ "movl %1,%%ebp\n\t"
"jmp resume_userspace"
- : : "r" (regs32), "b" (current_thread_info()));
+ : : "r" (regs32), "r" (current_thread_info()));
}

static inline void set_IF(struct kernel_vm86_regs * regs)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.110 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site