]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.23] os: add clone(CLONE_PIDFD) check to pidfd feature check
authorMichael Pratt <mpratt@google.com>
Tue, 11 Jun 2024 20:34:38 +0000 (16:34 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 11 Oct 2024 17:01:46 +0000 (17:01 +0000)
commit7fc83126731de12449f7b38c32e2e318c439a6d4
tree34a8161230a4e85f2f32cf4878251840ffaa7dce
parentcc16cdf48f228caebc55c982ed5b1b187ff39fcc
[release-branch.go1.23] os: add clone(CLONE_PIDFD) check to pidfd feature check

clone(CLONE_PIDFD) was added in Linux 5.2 and pidfd_open was added in
Linux 5.3. Thus our feature check for pidfd_open should be sufficient to
ensure that clone(CLONE_PIDFD) works.

Unfortuantely, some alternative Linux implementations may not follow
this strict ordering. For example, QEMU 7.2 (Dec 2022) added pidfd_open,
but clone(CLONE_PIDFD) was only added in QEMU 8.0 (Apr 2023).

Debian bookworm provides QEMU 7.2 by default.

For #68976.
Fixes #69259.

Change-Id: Ie3f3dc51f0cd76944871bf98690abf59f68fd7bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/592078
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
(cherry picked from commit 7a5fc9b34deb8d9fe22c9d060a5839827344fcc2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/612218
src/os/pidfd_linux.go
src/syscall/exec_linux.go