unix: use the stat64 family and fix Stat_t on linux/sparc64 - #290
unix: use the stat64 family and fix Stat_t on linux/sparc64#290shalseth wants to merge 1 commit into
Conversation
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
|
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:
|
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
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