mirror of
https://github.com/golang/go.git
synced 2025-05-09 01:23:01 +00:00
In Android version 11 and earlier, pidfd-related system calls are not allowed by the seccomp policy, which causes crashes due to SIGSYS signals. For #69065 Fixes #69640 Change-Id: Ib29631639a5cf221ac11b4d82390cb79436b8657 GitHub-Last-Rev: aad6b3b32c81795f86bc4a9e81aad94899daf520 GitHub-Pull-Request: golang/go#69543 Reviewed-on: https://go-review.googlesource.com/c/go/+/614277 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> (cherry picked from commit a3a05ed04cb53c53bdacded2d16f0f3e5facdbb0) Reviewed-on: https://go-review.googlesource.com/c/go/+/616077 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Kirill Kolyshkin <kolyshkin@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
23 lines
517 B
Go
23 lines
517 B
Go
// Copyright 2022 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build unix && !linux
|
|
|
|
package runtime
|
|
|
|
// sigFromUser reports whether the signal was sent because of a call
|
|
// to kill.
|
|
//
|
|
//go:nosplit
|
|
func (c *sigctxt) sigFromUser() bool {
|
|
return c.sigcode() == _SI_USER
|
|
}
|
|
|
|
// sigFromSeccomp reports whether the signal was sent from seccomp.
|
|
//
|
|
//go:nosplit
|
|
func (c *sigctxt) sigFromSeccomp() bool {
|
|
return false
|
|
}
|