diff options
author | Luca Dariz <luca@orpolo.org> | 2023-06-17 23:17:54 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-06-17 23:18:28 +0200 |
commit | 5e597575b78af2464117437c8bc41e632d7e112d (patch) | |
tree | 716c79533870e6e3ca0421d2f00e9a9b2f2944d5 /ipc/ipc_kmsg.c | |
parent | 54d025d426d0442a0f33c98272dee167acdb8613 (diff) | |
download | gnumach-5e597575b78af2464117437c8bc41e632d7e112d.tar.gz gnumach-5e597575b78af2464117437c8bc41e632d7e112d.tar.bz2 gnumach-5e597575b78af2464117437c8bc41e632d7e112d.zip |
x86_64: add a critical section on entry and exit from syscall/sysret
When entering a syscall we're still using the user stack, so we can't
reliably handle exceptions or interrupts, otherwise a user thread can
easily crash the machine with an invalid stack. Instead, disable
interrupts and (hopefullly) avoid traps in the fragments where we need
to have the user stack in RSP.
* i386/i386/ldt.c: mask interrupts and IOPL on syscall entry
* x86_64/locore.S: keep interrupts disabled when we use the user stack
Diffstat (limited to 'ipc/ipc_kmsg.c')
0 files changed, 0 insertions, 0 deletions