kernel: make sure signal handlers get the right GS descriptor

This commit is contained in:
K. Lange 2021-02-16 19:17:44 +09:00
parent 97d02d6e23
commit 32c0b670b7

View File

@ -24,6 +24,7 @@ void enter_signal_handler(uintptr_t location, int signum, uintptr_t stack) {
"mov %%ax, %%ds\n"
"mov %%ax, %%es\n"
"mov %%ax, %%fs\n"
"mov $0x33, %%ax\n" /* Segment selector */
"mov %%ax, %%gs\n"
"mov %%esp, %%eax\n" /* Stack -> EAX */
"pushl $0x23\n" /* Segment selector again */