From 02a47c83039f0318d44bea467d5f3926053437a4 Mon Sep 17 00:00:00 2001 From: Matheus Date: Tue, 28 Apr 2026 21:15:21 -0300 Subject: [PATCH] context: fix copy of fs and gs --- kernel-src/arch/x86-64/context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel-src/arch/x86-64/context.c b/kernel-src/arch/x86-64/context.c index 85f578d5..25c0aafd 100644 --- a/kernel-src/arch/x86-64/context.c +++ b/kernel-src/arch/x86-64/context.c @@ -141,7 +141,7 @@ void arch_extracontext_copy(extracontext_t *dst, const extracontext_t *src) { // XXX is this behavior correct? ucontext doesnt seem to save it on linux and so it will not be saved dst->gsbase = src->gsbase; dst->fsbase = src->fsbase; - dst->fs = dst->fs; - dst->gs = dst->gs; + dst->fs = src->fs; + dst->gs = src->gs; memcpy(dst->xsave, src->xsave, arch_xsave_size); }