[go] all: add push linknames to allow legacy pull linknames

Skip to first unread message

Cherry Mui (Gerrit)

May 17, 2024, 12:48:05 PMMay 17
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Russ Cox, Mauri de Souza Meneguzzo, Austin Clements, Than McIntosh, golang-co...@googlegroups.com

Cherry Mui submitted the change with unreviewed changes

Unreviewed changes

4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

The name of the file: src/runtime/time_nofake.go
Insertions: 2, Deletions: 1.

@@ -19,7 +19,8 @@
return nanotime1()

-// overrideWrite allows write to be redirected externally.
+// overrideWrite allows write to be redirected externally, by
+// linkname'ing this and set it to a write function.
//go:linkname overrideWrite
var overrideWrite func(fd uintptr, p unsafe.Pointer, n int32) int32

Change information

Commit message:
all: add push linknames to allow legacy pull linknames

CL 585358 adds restrictions to disallow pull-only linknames
(currently off by default). Currently, there are quite some pull-
only linknames in user code in the wild. In order not to break
those, we add push linknames to allow them to be pulled. This CL
includes linknames found in a large code corpus (thanks Matthew
Dempsky and Michael Pratt for the analysis!), that are not
currently linknamed.

Updates #67401.
Change-Id: I32f5fc0c7a6abbd7a11359a025cfa2bf458fe767
Reviewed-by: Russ Cox <r...@golang.org>
  • M src/cmd/link/link_test.go
  • A src/cmd/link/testdata/linkname/badlinkname.go
  • A src/crypto/tls/badlinkname.go
  • A src/crypto/x509/badlinkname.go
  • A src/database/sql/badlinkname.go
  • A src/go/build/badlinkname.go
  • A src/go/types/badlinkname.go
  • A src/internal/cpu/badlinkname_linux_arm64.go
  • A src/internal/poll/badlinkname.go
  • A src/internal/testlog/badlinkname.go
  • A src/math/big/badlinkname.go
  • A src/mime/multipart/badlinkname.go
  • A src/net/badlinkname.go
  • A src/net/http/badlinkname.go
  • A src/net/url/badlinkname.go
  • A src/reflect/badlinkname.go
  • A src/runtime/badlinkname.go
  • A src/runtime/badlinkname_linux_amd64.go
  • M src/runtime/time_nofake.go
  • A src/sync/badlinkname.go
  • A src/syscall/badlinkname_unix.go
  • A src/time/badlinkname.go
Change size: L
Delta: 22 files changed, 510 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Russ Cox
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I32f5fc0c7a6abbd7a11359a025cfa2bf458fe767
Gerrit-Change-Number: 586137
Gerrit-PatchSet: 6
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Austin Clements <aus...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Russ Cox <r...@golang.org>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
Gerrit-CC: Mauri de Souza Meneguzzo <maur...@gmail.com>
Reply all
Reply to author
0 new messages