summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHoward Zhang <howard.zhang@arm.com>2020-10-20 13:32:36 +0800
committerHoward Zhang <howard.zhang@arm.com>2020-10-20 15:50:09 +0800
commitd7ea53769f4bfffdb836f53a0e0709d0607c2c4c (patch)
tree2ba3102127e600151f4a551887fa86fd412e7553
parent34a6e9576a9684087f95f57ee73171a637bee8b2 (diff)
ARM64 KVM: bad regs.Sp return SIGSEGV
Consistent with the linux kernel, bad regs.Sp return SIGSEGV Signed-off-by: Howard Zhang <howard.zhang@arm.com>
-rw-r--r--pkg/sentry/platform/kvm/machine_arm64_unsafe.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/platform/kvm/machine_arm64_unsafe.go b/pkg/sentry/platform/kvm/machine_arm64_unsafe.go
index a163f956d..f59d37bd2 100644
--- a/pkg/sentry/platform/kvm/machine_arm64_unsafe.go
+++ b/pkg/sentry/platform/kvm/machine_arm64_unsafe.go
@@ -197,7 +197,7 @@ func (c *vCPU) SwitchToUser(switchOpts ring0.SwitchOpts, info *arch.SignalInfo)
if regs := switchOpts.Registers; !ring0.IsCanonical(regs.Pc) {
return nonCanonical(regs.Pc, int32(syscall.SIGSEGV), info)
} else if !ring0.IsCanonical(regs.Sp) {
- return nonCanonical(regs.Sp, int32(syscall.SIGBUS), info)
+ return nonCanonical(regs.Sp, int32(syscall.SIGSEGV), info)
}
// Assign PCIDs.