Files
Andrei VaginandgVisor bot 8890371e35 platform/kvm: use per-thread signal stack to run bluepill handler
The user-space bluepill introduced the issue. With that change, we use a
per-vcpu stack to run bluepillHandler. BluepillHanlder releases a vcpu before
calling sigreturn, so it is still running on the vcpu stack. The race looks
like this: one thread releases a vcpu, another thread takes it and  starts
using its stack, the first thread calls sigreturn with a corrupted signal
frame.



PiperOrigin-RevId: 684992950
2024-10-11 16:40:39 -07:00

39 lines
837 B
Python

load("//tools:defs.bzl", "go_library", "go_test")
package(default_applicable_licenses = ["//:license"])
licenses(["notice"])
go_library(
name = "sigframe",
srcs = [
"sigframe.go",
"sigframe_amd64.s",
"sigframe_amd64_unsafe.go",
],
visibility = ["//visibility:public"],
deps = [
"//pkg/abi/linux",
"//pkg/hostarch",
"//pkg/hostsyscall",
"//pkg/sentry/arch",
"@org_golang_x_sys//unix:go_default_library",
],
)
go_test(
name = "sigframe_test",
srcs = [
"sigframe_amd64_test.go",
"sigframe_amd64_test.s",
"sigframe_test.go",
],
library = ":sigframe",
deps = [
"//pkg/abi/linux",
"//pkg/hostarch",
"//pkg/sentry/arch",
"@org_golang_x_sys//unix:go_default_library",
],
)