Skip to content

arm64: deliver guest signals to handlers, with nested-signal support#77

Merged
fwsGonzo merged 0 commit into
masterfrom
arm64-signal-delivery
Jun 19, 2026
Merged

arm64: deliver guest signals to handlers, with nested-signal support#77
fwsGonzo merged 0 commit into
masterfrom
arm64-signal-delivery

Conversation

@perbu

@perbu perbu commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Implement guest signal-handler delivery on ARM64. tgkill (131) redirects EL0 to a registered handler: Signals::enter saves the interrupted frame, sets x0=sig / x30=SIGRETURN_ADDR / pc=handler (optionally on the SA_ONSTACK altstack), and an rt_sigreturn (139) syscall restores the frame. SIG_DFL/SIG_IGN and default-ignored signals keep their dispositions; unhandled fatal signals terminate with 128+sig.

Nested signals supported: sigret is a stack of frames, so a handler raising another signal doesn't clobber the outer return frame. Also fixes a pre-existing amd64 Signals::enter off-by-one.

Tests: tests/unit/arm64_signals.cpp (8 cases). Known gaps (in TODO.md): SA_SIGINFO args and signal masking.

@perbu

perbu commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

this needs to cover both ARM64 and AMD64

@perbu perbu force-pushed the arm64-signal-delivery branch 2 times, most recently from 709ddd6 to 750d27d Compare June 18, 2026 18:32
@fwsGonzo fwsGonzo force-pushed the master branch 2 times, most recently from f6b5c96 to 3bcfa5f Compare June 19, 2026 12:45
@fwsGonzo fwsGonzo merged commit 750d27d into master Jun 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants