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

> > + childregs->esp -= sizeof(0UL);
> > + p->user_vm_lock = (long *) childregs->esp;
>
> you are right. Fix against BK-curr attached.

in fact testing these changes in glibc revealed another thing - the top of
the thread's stack has to be 16-byte aligned (for SSE2 support), so the
attached patch ontop of BK-curr would be a better solution, it does not
modify the thread's stack alignment but simply writes to the top of the
stack. (which is the first word of the thread control block.) This removes
a few instructions both from glibc and from the kernel.

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->esp;
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.137 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site