]> Cypherpunks repositories - gostls13.git/commit
internal/runtime: fix assembly for spectre retpoline instrumentation
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 3 Feb 2026 15:45:21 +0000 (15:45 +0000)
committerMichael Knyszek <mknyszek@google.com>
Tue, 3 Feb 2026 19:56:29 +0000 (11:56 -0800)
commit8572b1cfea49b6108b9fb8ea650c4999ba70d381
treed7fe6293b918d114864af86c1af96529c4930002
parente0414d74fe2d38a6de1cadbbc135d578b11a27af
internal/runtime: fix assembly for spectre retpoline instrumentation

In the last year we added two CALLs whose targets are loaded from
memory. Change them to call from a register so that the instrumentation
for spectre mitigations works.

This change also adds a smoke test for the spectre build flags.

For #77420.

Change-Id: I35ec723449ff6a712bcce3276bf1df3fa932bddc
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/741541
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/dist/test.go
src/internal/runtime/gc/scan/scan_amd64.s
src/internal/runtime/startlinetest/func_amd64.s