October 2017
Intermediate to advanced
354 pages
9h 28m
English
Recall from our discussion in the previous section that do_signal() invokes the handle_signal() routine for delivery of pending signals whose disposition is set to user handler. The user-mode signal handler resides in the process code segment and requires access to the user-mode stack of the process; therefore, the kernel needs to switch to the user-mode stack for executing the signal handler. Successful return from the signal handler requires a switch back to the kernel stack to restore the user context for normal user-mode execution, but such an operation would fail since the kernel stack would no longer contain the user context (struct pt_regs) since it is emptied on each entry of the process from user to kernel ...