Skip to content

Conversation

@kolyshkin
Copy link
Contributor

This is a backport of #4290 to release-1.1 branch.


Go 1.23 tightens access to internal symbols, and even puts runc into "hall of shame" for using an internal symbol (recently added by commit da68c8e). So, while not impossible, it becomes harder to access those internal symbols, and it is a bad idea in general.

Since Go 1.23 includes https://go.dev/cl/588076, we can clean the internal rlimit cache by setting the RLIMIT_NOFILE for ourselves, essentially disabling the rlimit cache.

Once Go 1.22 is no longer supported, we will remove the go:linkname hack.

(cherry picked from commit 584afc6)
Signed-off-by: Kir Kolyshkin kolyshkin@gmail.com

@kolyshkin kolyshkin added this to the 1.1.13 milestone Jun 1, 2024
@kolyshkin kolyshkin force-pushed the 1.1-4290 branch 2 times, most recently from 9022788 to a35b0dc Compare June 1, 2024 21:01
@lifubang

This comment was marked as outdated.

@lifubang lifubang added the backport/1.1-pr A backport PR to release-1.1 label Jun 1, 2024
@lifubang

This comment was marked as outdated.

@kolyshkin

This comment was marked as outdated.

@kolyshkin

This comment was marked as outdated.

@lifubang

This comment was marked as outdated.

Go 1.23 tightens access to internal symbols, and even puts runc into
"hall of shame" for using an internal symbol (recently added by commit
da68c8e). So, while not impossible, it becomes harder to access those
internal symbols, and it is a bad idea in general.

Since Go 1.23 includes https://go.dev/cl/588076, we can clean the
internal rlimit cache by setting the RLIMIT_NOFILE for ourselves,
essentially disabling the rlimit cache.

Once Go 1.22 is no longer supported, we will remove the go:linkname hack.

(cherry picked from commit 584afc6)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin

This comment was marked as outdated.

@kolyshkin
Copy link
Contributor Author

Ah, DCO appears to work now, good.

@kolyshkin kolyshkin merged commit 7d86e7d into opencontainers:release-1.1 Jun 6, 2024
gopherbot pushed a commit to golang/go that referenced this pull request Jun 7, 2024
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]: opencontainers/runc#4290
[2]: opencontainers/runc#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>
@lifubang lifubang mentioned this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.1-pr A backport PR to release-1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants