lkml.org 
[lkml]   [2002]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] user-vm-unlock-2.5.31-A2

doh, one more problem popped up while implementing support for this, which
needs a change in the interface again - this time it should be the final
solution. glibc does not pass in the true top of the stack to clone(), but
rather the address of the start function's parameter frame. So the
VM_RELEASE will overwrite the first parameter.

it is much cleaner anyway to pass in the address of the user-space VM lock
- this will also enable arbitrary implementations of the stack-unlock, as
the fifth clone() parameter. Patch against BK-curr attached.

with this it now works fine. (previously it only appeared to work fine -
but it leaked stackspace.)

Ingo

--- arch/i386/kernel/process.c.orig Thu Aug 15 08:37:52 2002
+++ arch/i386/kernel/process.c Thu Aug 15 12:36:57 2002
@@ -625,10 +625,8 @@
/*
* Does the userspace VM want any unlock on mm_release()?
*/
- if (clone_flags & CLONE_RELEASE_VM) {
- childregs->esp -= sizeof(0UL);
- p->user_vm_lock = (long *) esp;
- }
+ if (clone_flags & CLONE_RELEASE_VM)
+ p->user_vm_lock = (long *) childregs->edi;
return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.077 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site