Skip to main content

Module signal_restart

Module signal_restart 

Source
Expand description

What a syscall interrupted for a caught signal gives the guest, by Linux’s x86 table (A5 design 16.6 and D40, D43).

A wait that Detcore ends because a caught signal is pending ends with one of the kernel’s private restart codes. On ptrace the kernel applies the table itself when it builds the handler’s frame. Where Detcore ends the wait and the kernel never sees the code (an in-guest backend under its delivery gate, Config::in_guest_signal_delivery), Detcore applies the same table, with the action of the first caught delivery at that return, and the backend only writes the registers. Ignored instances ahead of it are discarded without touching the registers, and a later frame at the same return sees the result the first one left (-EINTR, or the call’s number to run again), which is no longer a restart code.

Enums§

CaughtSignalReturn
What the guest’s syscall does once the caught signal’s frame is built.

Constants§

ERESTARTNOHAND
See ERESTARTSYS.
ERESTARTNOINTR
See ERESTARTSYS.
ERESTARTSYS
The kernel’s private restart codes, as negative results (include/linux/errno.h v6.12 lines 14-18, https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/linux/errno.h?h=v6.12#n14).
ERESTART_RESTARTBLOCK
See ERESTARTSYS.

Functions§

caught_signal_return
The syscall’s outcome when a caught signal whose action has sa_flags is delivered at its return with raw result result (an errno as its negative): Linux’s handle_signal, arch/x86/kernel/signal.c v6.12 lines 264-282, https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/kernel/signal.c?h=v6.12#n264: