[go] runtime: use uname version check for 64-bit time on 32-bit arch codepaths

0 views
Skip to first unread message

Brad Fitzpatrick (Gerrit)

unread,
1:11 PM (10 hours ago) 1:11 PM
to Brad Fitzpatrick, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Damien Neil, Michael Pratt, Jorropo, Michael Knyszek, golang-co...@googlegroups.com

Brad Fitzpatrick submitted the change

Unreviewed changes

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
runtime: use uname version check for 64-bit time on 32-bit arch codepaths

The previous fallback-on-ENOSYS logic causes issues on forks of Linux.

Android: #77621 (CL 750040 added a workaround with a TODO,
this fixes that TODO)
Causes the OS to terminate the program when running on Android
versions <=10 since the seccomp jail does not know about the 64-bit
time syscall and is configured to terminate the program on any
unknown syscall.

Synology's Linux: #77930
On old versions of Synology's Linux they added custom vendor syscalls
without adding a gap in the syscall numbers, that means when we call
the newer Linux syscall which was added later, Synology's Linux
interprets it as a completely different vendor syscall.

Originally by Jorropo in CL 751340.

Fixes #77930
Co-authored-by: Jorropo <jorro...@gmail.com>
Change-Id: I90e15495d9249fd7f6e112f9e3ae8ad1322f56e0
Reviewed-by: Damien Neil <dn...@google.com>
Reviewed-by: Michael Pratt <mpr...@google.com>
Reviewed-by: Jorropo <jorro...@gmail.com>
Files:
  • M src/internal/runtime/syscall/linux/defs_linux_386.go
  • M src/internal/runtime/syscall/linux/defs_linux_amd64.go
  • M src/internal/runtime/syscall/linux/defs_linux_arm.go
  • M src/internal/runtime/syscall/linux/defs_linux_arm64.go
  • M src/internal/runtime/syscall/linux/defs_linux_loong64.go
  • M src/internal/runtime/syscall/linux/defs_linux_mips64x.go
  • M src/internal/runtime/syscall/linux/defs_linux_mipsx.go
  • M src/internal/runtime/syscall/linux/defs_linux_ppc64x.go
  • M src/internal/runtime/syscall/linux/defs_linux_riscv64.go
  • M src/internal/runtime/syscall/linux/defs_linux_s390x.go
  • M src/internal/runtime/syscall/linux/syscall_linux.go
  • M src/runtime/os_linux.go
  • M src/runtime/os_linux32.go
  • M src/runtime/os_linux64.go
Change size: M
Delta: 14 files changed, 97 insertions(+), 29 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Damien Neil, +2 by Michael Pratt, +2 by Jorropo
  • 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: I90e15495d9249fd7f6e112f9e3ae8ad1322f56e0
Gerrit-Change-Number: 758902
Gerrit-PatchSet: 3
Gerrit-Owner: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-CC: Michael Knyszek <mkny...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages