mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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
39 lines
837 B
Python
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",
|
|
],
|
|
)
|