kvm: Fix sigsys handler error message.

And remove bluepillSignal var for amd64; it's unused.

PiperOrigin-RevId: 675344862
This commit is contained in:
Konstantin Bogomolov
2024-09-16 17:11:29 -07:00
committed by gVisor bot
parent dd011f2e9f
commit 4bcbb55fcb
2 changed files with 1 additions and 7 deletions
@@ -18,16 +18,10 @@
package kvm
import (
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/ring0"
"gvisor.dev/gvisor/pkg/sentry/arch"
)
var (
// The action for bluepillSignal is changed by sigaction().
bluepillSignal = unix.SIGSEGV
)
func bluepillArchVCPU(context *arch.SignalContext64) *vCPU {
return vCPUPtr(uintptr(context.Rax))
}
+1 -1
View File
@@ -828,7 +828,7 @@ func seccompMmapRules(m *machine) {
seccompMmapRulesOnce.Do(func() {
// Install the handler.
if err := sighandling.ReplaceSignalHandler(unix.SIGSYS, addrOfSigsysHandler(), &savedSigsysHandler); err != nil {
panic(fmt.Sprintf("Unable to set handler for signal %d: %v", bluepillSignal, err))
panic(fmt.Sprintf("Unable to set handler for signal %d: %v", unix.SIGSYS, err))
}
rules := []seccomp.RuleSet{
// Trap mmap system calls and handle them in sigsysGoHandler