Skip to content

unix: use the stat64 family and fix Stat_t on linux/sparc64 - #290

Open
shalseth wants to merge 1 commit into
golang:masterfrom
shalseth:sparc64-stat
Open

unix: use the stat64 family and fix Stat_t on linux/sparc64#290
shalseth wants to merge 1 commit into
golang:masterfrom
shalseth:sparc64-stat

Conversation

@shalseth

Copy link
Copy Markdown
Contributor

The glibc and kernel stat structures differ on sparc64, as they already
do on mips64: glibc puts st_ino at offset 16 and st_nlink at 28, the
kernel's struct stat64 puts them at 8 and 16. Stat_t was generated from
glibc's, so the raw syscalls filled it at the wrong offsets.

Give sparc64 its own my_stat in linux/types.go, the way mips64 has one,
and point Stat, Lstat and Fstat at the 64 family, which Fstatat already
used.

runc reads the st_ino of /proc to confirm it really is procfs; it read a
garbage value rather than 1 and refused to start any container.

Updates golang/go#55000

The glibc and kernel stat structures differ on sparc64, as they already
do on mips64: glibc puts st_ino at offset 16 and st_nlink at 28, the
kernel's struct stat64 puts them at 8 and 16. Stat_t was generated from
glibc's, so the raw syscalls filled it at the wrong offsets.

Give sparc64 its own my_stat in linux/types.go, the way mips64 has one,
and point Stat, Lstat and Fstat at the 64 family, which Fstatat already
used.

runc reads the st_ino of /proc to confirm it really is procfs; it read a
garbage value rather than 1 and refused to start any container.

Updates golang/go#55000

Change-Id: Ide41872fa8e0171a5d0f5785b2c7b7a4c53b2a71
@gopherbot

Copy link
Copy Markdown
Contributor

This PR (HEAD: 9fb44b9) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/822904.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Tobias Klauser:

Patch Set 1: Auto-Submit+1 Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/822904.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 1:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-08-27T13:29:49Z","revision":"df4a3602ad177ba8817e6b58c917e46fab8fb802"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/822904.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Tobias Klauser:

Patch Set 1: -Commit-Queue

(Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_19560>)


Please don’t reply on this GitHub thread. Visit golang.org/cl/822904.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 1:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/822904.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 1: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/822904.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants