um: Rely on PTRACE_SETREGSET to set FS/GS base registers
authorBenjamin Berg <benjamin@sipsolutions.net>
Fri, 10 Nov 2023 11:03:46 +0000 (12:03 +0100)
committerRichard Weinberger <richard@nod.at>
Fri, 5 Jan 2024 15:28:56 +0000 (16:28 +0100)
commit1ca1443570e4085c180ecc657d319c21b22a76f6
tree17c835b4186c46ff36d3281cc526f160dd516dbb
parent21822553a5f424892c12d1664b3c1235b095c6c6
um: Rely on PTRACE_SETREGSET to set FS/GS base registers

These registers are saved/restored together with the other general
registers using ptrace. In arch_set_tls we then just need to set the
register and it will be synced back normally.

Most of this logic was introduced in commit f355559cf7845 ("[PATCH] uml:
x86_64 thread fixes"). However, at least today we can rely on ptrace to
restore the base registers for us. As such, only the part of the patch
that tracks the FS register for use as thread local storage is actually
needed.

Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/shared/os.h
arch/x86/um/asm/elf.h
arch/x86/um/asm/processor_64.h
arch/x86/um/os-Linux/Makefile
arch/x86/um/os-Linux/prctl.c [deleted file]
arch/x86/um/syscalls_64.c
arch/x86/um/tls_64.c