summaryrefslogtreecommitdiffstats
path: root/arch/x86/um/asm/elf.h
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2023-11-10 12:03:46 +0100
committerRichard Weinberger <richard@nod.at>2024-01-05 16:28:56 +0100
commit1ca1443570e4085c180ecc657d319c21b22a76f6 (patch)
tree17c835b4186c46ff36d3281cc526f160dd516dbb /arch/x86/um/asm/elf.h
parent21822553a5f424892c12d1664b3c1235b095c6c6 (diff)
downloadlinux-stable-1ca1443570e4085c180ecc657d319c21b22a76f6.tar.gz
linux-stable-1ca1443570e4085c180ecc657d319c21b22a76f6.tar.bz2
linux-stable-1ca1443570e4085c180ecc657d319c21b22a76f6.zip
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>
Diffstat (limited to 'arch/x86/um/asm/elf.h')
-rw-r--r--arch/x86/um/asm/elf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/um/asm/elf.h b/arch/x86/um/asm/elf.h
index 6523eb7c3bd1..6052200fe925 100644
--- a/arch/x86/um/asm/elf.h
+++ b/arch/x86/um/asm/elf.h
@@ -168,8 +168,8 @@ do { \
(pr_reg)[18] = (_regs)->regs.gp[18]; \
(pr_reg)[19] = (_regs)->regs.gp[19]; \
(pr_reg)[20] = (_regs)->regs.gp[20]; \
- (pr_reg)[21] = current->thread.arch.fs; \
- (pr_reg)[22] = 0; \
+ (pr_reg)[21] = (_regs)->regs.gp[21]; \
+ (pr_reg)[22] = (_regs)->regs.gp[22]; \
(pr_reg)[23] = 0; \
(pr_reg)[24] = 0; \
(pr_reg)[25] = 0; \