]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: rm go:linkname from origRlimitNofile
authorKir Kolyshkin <kolyshkin@gmail.com>
Thu, 23 May 2024 20:43:45 +0000 (13:43 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 7 Jun 2024 20:13:57 +0000 (20:13 +0000)
Since CL 588076 runc can do fine without the kludge. The code accessing the symbol is now guarded with `go:build !go1.23` in all supported runc branches (main: [1], release-1.1: [2]).

This reverts part of CL 587219.

Updates #67401.

For #66797.

[1]: https://github.com/opencontainers/runc/pull/4290
[2]: https://github.com/opencontainers/runc/pull/4299

Change-Id: I204843a93c36857e21ab9b43bd7aaf046e8b9787
Reviewed-on: https://go-review.googlesource.com/c/go/+/587918
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/syscall/rlimit.go

index f94b894b902d78295baea9298b46eaa116c6a432..8184f17ab68f29465b9fcb7627942c965876e7db 100644 (file)
@@ -8,20 +8,9 @@ package syscall
 
 import (
        "sync/atomic"
-       _ "unsafe"
 )
 
 // origRlimitNofile, if non-nil, is the original soft RLIMIT_NOFILE.
-//
-// origRlimitNofile should be an internal detail,
-// but widely used packages access it using linkname.
-// Notable members of the hall of shame include:
-//   - github.com/opencontainers/runc
-//
-// Do not remove or change the type signature.
-// See go.dev/issue/67401.
-//
-//go:linkname origRlimitNofile
 var origRlimitNofile atomic.Pointer[Rlimit]
 
 // Some systems set an artificially low soft limit on open file count, for compatibility