Re: [PATCH 3/3] x86_64: add a critical section on entry and exit from syscall/sysret

2023-06-17 Thread Samuel Thibault
Applied, thanks! Luca Dariz, le jeu. 15 juin 2023 23:49:31 +0200, a ecrit: > 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

[PATCH 3/3] x86_64: add a critical section on entry and exit from syscall/sysret

2023-06-15 Thread Luca Dariz
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