3 ms·
Signal handlers have their own stack for this very reason. Handling interrupts within the Linux kernel is not really very similar to signal handling in userspa
by bregma 6y ago
Signal handlers have their own stack for this very reason.
Handling interrupts within the Linux kernel is not really very similar to signal handling in userspace.
- steerablesafe 6y agoFrom the very little research I did signal handlers actually use the same stack as the user-space thread it runs on, unless sigaltstack is used to set up a separate stack. Although it's probably possible for the kernel to adjust the stack pointer over the red-zone before returning to user-space, so the signal handler can run safely.
- wahern 6y agoBy default signal handlers don't use a separate stack; they use the same stack as the process/thread that received the signal. A process/thread must call sigaltstack to install an alternative stack for signal handler execution. So to answer the previous poster's question: yes, AFAICT this bug could have effected userspace code unless there are some other nuances at play.