[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86_64: Fix reporting fsgs base in thread_get_state ()
From: |
Sergey Bugaev |
Subject: |
[PATCH] x86_64: Fix reporting fsgs base in thread_get_state () |
Date: |
Mon, 15 May 2023 10:44:34 +0300 |
Fixes 31dd30a94a682955c3c9e2f42252b4a07687067a "add setting gs/fsbase".
---
This was breaking fork () in glibc when it tried to set up TLS in the
new process by copying fs_base from an existing thread.
i386/i386/pcb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index a5efb9a8..fb535709 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -873,7 +873,7 @@ kern_return_t thread_getstatus(
state = (struct i386_fsgs_base_state *) tstate;
state->fs_base = thread->pcb->iss.fsbase;
- state->fs_base = thread->pcb->iss.gsbase;
+ state->gs_base = thread->pcb->iss.gsbase;
*count = i386_FSGS_BASE_STATE_COUNT;
break;
}
--
2.40.1
- [PATCH] x86_64: Fix reporting fsgs base in thread_get_state (),
Sergey Bugaev <=