17 Commits
Author SHA1 Message Date
gVisor bot 1f79e1b26f Prepare for go.dev/cl/652276
Upstream Go CL https://go.dev/cl/652276 removes an unused field from
runtime.gobuf. This CL prepares for this change.

This CL also simplifies the build constraints in the hosttid files:
- Remove legacy '// +build' constraint syntax
- Remove explicit GOARCH matching. The GOARCH is in the filename

PiperOrigin-RevId: 733382770
2025-03-04 10:41:09 -08:00
gVisor bot de9adb58ac Internal change.
PiperOrigin-RevId: 626999793
2024-04-22 05:15:20 -07:00
Adin ScannellandgVisor bot 5ba34bd1a5 Add explicit NOFRAME annotation in assembly functions.
For all trivial and zero frame-sized functions, we now require an explicit
NOFRAME annotation as the heuristic has changed. See go.dev/cl/466316.

Most of these functions do not  *require* NOFRAME, but this change encodes
the existing behavior in order to avoid accidental bugs or regressions.

PiperOrigin-RevId: 513946210
2023-03-04 00:53:20 -08:00
Adin ScannellandgVisor bot 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Adin ScannellandgVisor bot bd561fd3f9 Move from facts render to facts validation.
This allows fact information to be validated in the underlying source files,
but requires us to explicitly maintain this in appropriate version-tagged, and
architecture-tagged files. This is more explicit and safer.

This mechanism uses a special regular expression for matching a +checkconst
stanza to validate constant values, sizes and offsets. This applies to both Go
source files and assembly files.

PiperOrigin-RevId: 511867507
2023-02-23 13:17:49 -08:00
Adin ScannellandgVisor bot 6a4908b262 Process nogo targets across all architectures.
PiperOrigin-RevId: 511343590
2023-02-21 17:06:02 -08:00
Adin ScannellandgVisor bot 12a930a63e Move goid to dynamic facts render.
This removes the need for ongoing tags.

This change requires some minor updates to remove dependency cycles, since
the goid package is a base library used by many internals (log, sync, etc.).

PiperOrigin-RevId: 504066914
2023-01-23 13:29:37 -08:00
Michael PrattandgVisor bot 974792ae18 Bump negative build tag constraints to go1.21
PiperOrigin-RevId: 465062413
2022-08-03 08:30:46 -07:00
Michael PrattandgVisor bot d3d9c4fb2c Bump gVisor build tags to go1.20
Upstream Go tip has updated its version to 1.19, so we need to bump these build
tags to allow tip testing.

This CL bumps the minimum version in pkg/sync/runtime_amd64.s from 1.8 to 1.14.
The offset was different prior to Go 1.14.

Ideally we'll get checklinkname (or equivalent) to check these remaining unsafe
uses (like internal struct field offsets) soon.

For golang/go#51445.

PiperOrigin-RevId: 433304124
2022-03-08 14:02:19 -08:00
Michael PrattandgVisor bot 99325baf5d Bump gVisor build tags to go1.19
Go's dev.typeparams branch already claims to be Go 1.18, so our !go1.18 build
tags breaking testing gVisor with that branch.

Normally I would not want to bump the build tags this early, but I plan to
extend checklinkname to check the assumptions in these files and remove the
build tags ASAP. So we just go ahead and bump the tags until then to unblock
testing.

PiperOrigin-RevId: 389037239
2021-08-05 15:25:00 -07:00
Jamie LiuandgVisor bot 1ad3822200 Add go:build directives as required by Go 1.17's gofmt.
PiperOrigin-RevId: 385894869
2021-07-20 16:28:45 -07:00
Michael PrattandgVisor bot f80a857a4f Bump build constraints to Go 1.18
These are bumped to allow early testing of Go 1.17. Use will be audited closer
to the 1.17 release.

PiperOrigin-RevId: 358278615
2021-02-18 15:30:58 -08:00
Michael PrattandgVisor bot 3454d57219 Require sync.Mutex to lock and unlock from the same goroutine
We would like to track locks ordering to detect ordering violations. Detecting
violations is much simpler if mutexes must be unlocked by the same goroutine
that locked them.

Thus, as a first step to tracking lock ordering, add this lock/unlock
requirement to gVisor's sync.Mutex. This is more strict than the Go standard
library's sync.Mutex, but initial testing indicates only a single lock that is
used across goroutines. The new sync.CrossGoroutineMutex relaxes the
requirement (but will not provide lock order checking).

Due to the additional overhead, enforcement is only enabled with the
"checklocks" build tag. Build with this tag using:

bazel build --define=gotags=checklocks ...

From my spot-checking, this has no changed inlining properties when disabled.

Updates #4804

PiperOrigin-RevId: 343370200
2020-11-19 14:29:34 -08:00
Jamie LiuandgVisor bot bf392dcc7d Allow goid.Get() to be used outside of race builds.
PiperOrigin-RevId: 342179912
2020-11-12 19:16:29 -08:00
Bin Lu ba27514083 add arm64 support to goid
Adding a method to get g on Arm64

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-05-13 04:35:47 -04:00
Adin ScannellandgVisor bot d29e59af9f Standardize on tools directory.
PiperOrigin-RevId: 291745021
2020-01-27 12:21:00 -08:00
Ian GudgerandgVisor bot 6b83111499 goid: new package
Allows retrieving the goroutine ID for concurrency testing when the race
detector is enabled.

Updates #1472

PiperOrigin-RevId: 289155308
2020-01-10 13:34:48 -08:00