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/
This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:39 EST