clean up segment regs

This commit is contained in:
2026-10-11 02:00:40 +02:00
parent de822fa48d
commit 710772efee
+2 -2
View File
@@ -208,14 +208,14 @@ void arch_sched_jump_to_user(uintptr_t ip, uintptr_t sp, uintptr_t arg) {
}; };
uintptr_t percpu = asm_rdmsr(MSR_GS_BASE); uintptr_t percpu = asm_rdmsr(MSR_GS_BASE);
const uint16_t zero = 0;
asm volatile( asm volatile(
"mov ds, %0\n" "mov ds, %0\n"
"mov es, %0\n" "mov es, %0\n"
"mov fs, %0\n" "mov fs, %0\n"
"mov gs, %0\n" "mov gs, %0\n"
: :
: "r"(zero) : "a"(0)
: "memory"
); );
asm_wrmsr(MSR_FS_BASE, 0); asm_wrmsr(MSR_FS_BASE, 0);