]> err.no Git - linux-2.6/commit
[PATCH] uml: implement {get,set}_thread_area for i386
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Fri, 31 Mar 2006 10:30:22 +0000 (02:30 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 31 Mar 2006 20:18:52 +0000 (12:18 -0800)
commitaa6758d4867cd07bd76105ade6177fe6148e559a
tree0053f855c885a6dc322337468a2c45b6b2f8ddd0
parent972410b0232e97609fcefc8e408fe3037fcd607b
[PATCH] uml: implement {get,set}_thread_area for i386

Implement sys_[gs]et_thread_area and the corresponding ptrace operations for
UML.  This is the main chunk, additional parts follow.  This implementation is
now well tested and has run reliably for some time, and we've understood all
the previously existing problems.

Their implementation saves the new GDT content and then forwards the call to
the host when appropriate, i.e.  immediately when the target process is
running or on context switch otherwise (i.e.  on fork and on ptrace() calls).

In SKAS mode, we must switch registers on each context switch (because SKAS
does not switches tls_array together with current->mm).

Also, added get_cpu() locking; this has been done for SKAS mode, since TT does
not need it (it does not use smp_processor_id()).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 files changed:
arch/um/include/os.h
arch/um/kernel/exec_kern.c
arch/um/kernel/process_kern.c
arch/um/kernel/ptrace.c
arch/um/kernel/skas/process_kern.c
arch/um/os-Linux/Makefile
arch/um/os-Linux/tls.c [new file with mode: 0644]
arch/um/sys-i386/Makefile
arch/um/sys-i386/ptrace.c
arch/um/sys-i386/sys_call_table.S
arch/um/sys-i386/syscalls.c
arch/um/sys-i386/tls.c [new file with mode: 0644]
arch/um/sys-x86_64/Makefile
arch/um/sys-x86_64/tls.c [new file with mode: 0644]
include/asm-um/desc.h
include/asm-um/processor-i386.h
include/asm-um/processor-x86_64.h
include/asm-um/ptrace-generic.h
include/asm-um/ptrace-i386.h
include/asm-um/ptrace-x86_64.h
include/asm-um/segment.h