[go/release-branch.go1.26] runtime: tolerate vendor suffixes in Linux kernel release strings

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jun 30, 2026, 1:09:19 PM (23 hours ago) Jun 30
to Jorropo, Brad Fitzpatrick, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Junyang Shao, Dmitri Shuralyov, Dmitri Shuralyov, Michael Pratt, Damien Neil, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
[release-branch.go1.26] runtime: tolerate vendor suffixes in Linux kernel release strings

Synology kernels can have a "_" in their uname version. Make the
parsing more tolerant. And also don't throw during init if we fail to
parse the kernel version. Instead, fall back to probing. (We can't
probe all the time, because seccomp filters on some platforms like
Android kill the process if we call a verbotenen system call)

This regressed in CL 758902 (forked from CL 751340) on 2026-03-24,
which started calling parseRelease unconditionally during osinit on
32-bit Linux.

Updates #79612
Fixes #79893
Change-Id: I98f61b94e54c7b9d08029f3aef664bdda9ec7f69
Reviewed-by: Jorropo <jorro...@gmail.com>
Reviewed-by: Damien Neil <dn...@google.com>
Reviewed-by: Michael Pratt <mpr...@google.com>
Auto-Submit: Junyang Shao <shaoj...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@golang.org>
Reviewed-by: Junyang Shao <shaoj...@google.com>
Files:
  • M src/runtime/export_linux_test.go
  • M src/runtime/os_linux.go
  • M src/runtime/os_linux32.go
  • M src/runtime/runtime_linux_test.go
Change size: M
Delta: 4 files changed, 106 insertions(+), 32 deletions(-)
Branch: refs/heads/release-branch.go1.26
Submit Requirements:
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: release-branch.go1.26
Gerrit-Change-Id: I98f61b94e54c7b9d08029f3aef664bdda9ec7f69
Gerrit-Change-Number: 793960
Gerrit-PatchSet: 5
Gerrit-Owner: Jorropo <jorro...@gmail.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages