diff options
| author | Filippo Valsorda <filippo@golang.org> | 2024-10-17 12:48:11 +0200 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-10-28 14:55:26 +0000 |
| commit | f0b51a2099446d3835c8d54edef8300c0f081116 (patch) | |
| tree | b8af54d666529a34f7f44a2c15c29b17a1a8e6e6 /src/runtime/runtime1.go | |
| parent | ba1caa8b3051bc13bc353840946b404a13575410 (diff) | |
| download | go-f0b51a2099446d3835c8d54edef8300c0f081116.tar.xz | |
crypto/internal/fips: add service indicator mechanism
Placed the fipsIndicator field in some 64-bit alignment padding in the g
struct to avoid growing per-goroutine memory requirements on 64-bit
targets.
Fixes #69911
Updates #69536
Change-Id: I176419d0e3814574758cb88a47340a944f405604
Reviewed-on: https://go-review.googlesource.com/c/go/+/620795
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Derek Parker <parkerderek86@gmail.com>
Diffstat (limited to 'src/runtime/runtime1.go')
| -rw-r--r-- | src/runtime/runtime1.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index 2f87b8b967..56886ea571 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -724,3 +724,13 @@ func reflect_addReflectOff(ptr unsafe.Pointer) int32 { reflectOffsUnlock() return id } + +//go:linkname fips_getIndicator crypto/internal/fips.getIndicator +func fips_getIndicator() uint8 { + return getg().fipsIndicator +} + +//go:linkname fips_setIndicator crypto/internal/fips.setIndicator +func fips_setIndicator(indicator uint8) { + getg().fipsIndicator = indicator +} |
