diff options
author | Michael Pratt <mpratt@google.com> | 2020-01-24 11:58:13 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-24 12:01:04 -0800 |
commit | 390bb9c241c2b05c311579562d95cc39d899157b (patch) | |
tree | d9d05355efc1df71b9a5c68e5e5f1739a02d8fca /pkg | |
parent | 24cfbf4b981a76e46cab47650ef514835990b72e (diff) |
Ignore external SIGURG
Go 1.14+ sends SIGURG to Ms to attempt asynchronous preemption of a G. Since it
can't guarantee that a SIGURG is only related to preemption, it continues to
forward them to signal.Notify (see runtime.sighandler).
We should ignore these signals, as applications shouldn't receive them. Note
that this means that truly external SIGURG can no longer be sent to the
application (as with SIGCHLD).
PiperOrigin-RevId: 291415357
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/sentry/kernel/signal.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/signal.go b/pkg/sentry/kernel/signal.go index 02eede93d..e8cce37d0 100644 --- a/pkg/sentry/kernel/signal.go +++ b/pkg/sentry/kernel/signal.go @@ -38,6 +38,9 @@ const SignalPanic = linux.SIGUSR2 // Preconditions: Kernel must have an init process. func (k *Kernel) sendExternalSignal(info *arch.SignalInfo, context string) { switch linux.Signal(info.Signo) { + case linux.SIGURG: + // Sent by the Go 1.14+ runtime for asynchronous goroutine preemption. + case platform.SignalInterrupt: // Assume that a call to platform.Context.Interrupt() misfired. |