]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
UML - arch_prctl should set thread fs
authorJeff Dike <jdike@addtoit.com>
Mon, 19 Mar 2007 20:12:50 +0000 (16:12 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 23 Mar 2007 19:49:27 +0000 (12:49 -0700)
commita0518e0445325892f9a92fbd19cbfdb0eecfdb3e
tree2a4f02ec4fbafe043dc4791ce44a505df25468b5
parent7ac7551d5cf0d01b0a67a6653c25045e23904732
UML - arch_prctl should set thread fs

x86_64 needs some TLS fixes.  What was missing was remembering the child
thread id during clone and stuffing it into the child during each context
switch.

The %fs value is stored separately in the thread structure since the host
controls what effect it has on the actual register file.  The host also needs
to store it in its own thread struct, so we need the value kept outside the
register file.

arch_prctl_skas was fixed to call PTRACE_ARCH_PRCTL appropriately.  There is
some saving and restoring of registers in the ARCH_SET_* cases so that the
correct set of registers are changed on the host and restored to the process
when it runs again.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/um/include/os.h
arch/um/os-Linux/sys-x86_64/Makefile
arch/um/os-Linux/sys-x86_64/prctl.c [new file with mode: 0644]
arch/um/sys-x86_64/syscalls.c
arch/um/sys-x86_64/tls.c
include/asm-um/processor-x86_64.h
include/asm-um/ptrace-x86_64.h