<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/syscall/exec_linux.go, branch makepkg</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=makepkg</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=makepkg'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2025-10-29T18:00:09Z</updated>
<entry>
<title>internal/itoa, internal/runtime/strconv: delete</title>
<updated>2025-10-29T18:00:09Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2025-10-29T01:54:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=49c1da474d68045458b9462b743e3f0f7dcefdfb'/>
<id>urn:sha1:49c1da474d68045458b9462b743e3f0f7dcefdfb</id>
<content type='text'>
Replaced by internal/strconv.

Change-Id: I0656a9ad5075e60339e963fbae7d194d2f3e16be
Reviewed-on: https://go-review.googlesource.com/c/go/+/716001
Reviewed-by: David Chase &lt;drchase@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>syscall: only get parent PID if SysProcAttr.Pdeathsig is set</title>
<updated>2025-08-28T08:56:41Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2025-08-26T12:04:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ebc763f76d1151d8aa3ac1b894b08527999a4938'/>
<id>urn:sha1:ebc763f76d1151d8aa3ac1b894b08527999a4938</id>
<content type='text'>
The value of the parent PID is only used to check against get value
returned by getppid(2) in case SysProcAttr.Pdeathsig is non-zero. Avoid
the useless getpid(2) system call otherwise.

Cq-Include-Trybots: luci.golang.try:gotip-freebsd-amd64
Change-Id: If89f9c7acc82016ec359c79bd861d41460f42218
Reviewed-on: https://go-review.googlesource.com/c/go/+/699175
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Auto-Submit: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>syscall: forkAndExecInChild1: don't reuse pid variable</title>
<updated>2025-08-19T15:26:46Z</updated>
<author>
<name>Kir Kolyshkin</name>
<email>kolyshkin@gmail.com</email>
</author>
<published>2025-07-17T03:32:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c61db5ebd52a75af80da5afd2c2de3c6ddf080d2'/>
<id>urn:sha1:c61db5ebd52a75af80da5afd2c2de3c6ddf080d2</id>
<content type='text'>
A named return variable pid is reused in a few places, and while
the code is not wrong, it is somewhat confusing.

This variable used to be called r1 before CL 456516 (which did the right
thing, but slightly added to the confusion).

Now, the code calling SYS_WRITE (initially added by CL 158298) never
checks the number of bytes written, so let's remove the assignment.

In the code that calls SYS_READ it is used, so let's use a different
variable, c, which seems less confusing.

All this hopefully makes the code more readable.

Change-Id: I0d7ec311615100deb7e0aa3f02384eadcc1b47e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/696835
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Michael Stapelberg &lt;stapelberg@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>runtime: add valgrind instrumentation</title>
<updated>2025-05-21T17:08:08Z</updated>
<author>
<name>Roland Shoemaker</name>
<email>bracewell@google.com</email>
</author>
<published>2025-03-22T00:58:55Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=40b19b56a94c4d53a3c1d98275df44049b2f5917'/>
<id>urn:sha1:40b19b56a94c4d53a3c1d98275df44049b2f5917</id>
<content type='text'>
Add build tag gated Valgrind annotations to the runtime which let it
understand how the runtime manages memory. This allows for Go binaries
to be run under Valgrind without emitting spurious errors.

Instead of adding the Valgrind headers to the tree, and using cgo to
call the various Valgrind client request macros, we just add an assembly
function which emits the necessary instructions to trigger client
requests.

In particular we add instrumentation of the memory allocator, using a
two-level mempool structure (as described in the Valgrind manual [0]).
We also add annotations which allow Valgrind to track which memory we
use for stacks, which seems necessary to let it properly function.

We describe the memory model to Valgrind as follows: we treat heap
arenas as a "pool" created with VALGRIND_CREATE_MEMPOOL_EXT (so that we
can use VALGRIND_MEMPOOL_METAPOOL and VALGRIND_MEMPOOL_AUTO_FREE).
Within the pool we treat spans as "superblocks", annotated with
VALGRIND_MEMPOOL_ALLOC. We then allocate individual objects within spans
with VALGRIND_MALLOCLIKE_BLOCK.

It should be noted that running binaries under Valgrind can be _quite
slow_, and certain operations, such as running the GC, can be _very
slow_. It is recommended to run programs with GOGC=off. Additionally,
async preemption should be turned off, since it'll cause strange
behavior (GODEBUG=asyncpreemptoff=1).

Running Valgrind with --leak-check=yes will result in some errors
resulting from some things not being marked fully free'd. These likely
need more annotations to rectify, but for now it is recommended to run
with --leak-check=off.

Updates #73602

[0] https://valgrind.org/docs/manual/mc-manual.html#mc-manual.mempools

Change-Id: I71b26c47d7084de71ef1e03947ef6b1cc6d38301
Reviewed-on: https://go-review.googlesource.com/c/go/+/674077
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>all: gofmt -w</title>
<updated>2025-02-25T19:49:16Z</updated>
<author>
<name>Jes Cok</name>
<email>xigua67damn@gmail.com</email>
</author>
<published>2025-02-22T12:37:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=77ce76d761debc4cd9d7d3f029ea27cbce3a2db5'/>
<id>urn:sha1:77ce76d761debc4cd9d7d3f029ea27cbce3a2db5</id>
<content type='text'>
Change-Id: Ie30a780cbd98bab1e80035b3dfddf92eb281759e
GitHub-Last-Rev: 369ada24ffc297efb47768e430b1bd0216706998
GitHub-Pull-Request: golang/go#71898
Reviewed-on: https://go-review.googlesource.com/c/go/+/651795
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: use WCLONE when waiting on pidfd test child</title>
<updated>2025-02-21T16:57:04Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2025-02-21T15:29:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e1e65ae3ee5f977c31f3651233cc7ff2a0b579ca'/>
<id>urn:sha1:e1e65ae3ee5f977c31f3651233cc7ff2a0b579ca</id>
<content type='text'>
As of CL 650835, the pidfd test child no longer sends SIGCHLD on exit.
Per clone(2), "If [the child termination] signal is specified as
anything other than SIGCHLD, then the parent process must specify the
__WALL or __WCLONE options when waiting for the child with wait(2)."

Align with this requirement.

For #71828.

Change-Id: I6a6a636c739e4a59abe1533fe429a433e8588939
Reviewed-on: https://go-review.googlesource.com/c/go/+/651415
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>syscall: don't send child signal when testing pidfd</title>
<updated>2025-02-20T17:20:38Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2025-02-20T01:37:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0de8fc852704d672e3379b05d617ce75dc0b2613'/>
<id>urn:sha1:0de8fc852704d672e3379b05d617ce75dc0b2613</id>
<content type='text'>
Avoid a spurious SIGCHLD the first time we start a process.

Fixes #71828

Change-Id: I744100d21bf6aaaaafc99bc5eec9f9f807a50682
Reviewed-on: https://go-review.googlesource.com/c/go/+/650835
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>syscall: use SYS_EXIT_GROUP in CLONE_PIDFD feature check child</title>
<updated>2024-10-03T13:57:21Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2024-10-02T21:20:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=47a99359206f0dd41228deda0aa31f1e769cc156'/>
<id>urn:sha1:47a99359206f0dd41228deda0aa31f1e769cc156</id>
<content type='text'>
Inside Google we have seen issues with QEMU user mode failing to wake a
parent waitid when this child exits with SYS_EXIT. This bug appears to
not affect SYS_EXIT_GROUP.

It is currently unclear if this is a general QEMU or specific to
Google's configuration, but SYS_EXIT and SYS_EXIT_GROUP are semantically
equivalent here, so we can use the latter here in case this is a general
QEMU bug.

For #68976.

Change-Id: I34e51088c9a6b7493a060e2a719a3cc4a3d54aa0
Reviewed-on: https://go-review.googlesource.com/c/go/+/617417
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>syscall: gofmt after CL 592078</title>
<updated>2024-10-02T14:23:34Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2024-10-02T10:34:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1e338a2fe3b1462e583d57ce8fa6c6cc36af0ac7'/>
<id>urn:sha1:1e338a2fe3b1462e583d57ce8fa6c6cc36af0ac7</id>
<content type='text'>
Change-Id: I328760f7752f1f5ec100f151c7e13e3f804c0e10
Reviewed-on: https://go-review.googlesource.com/c/go/+/617355
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>os: add clone(CLONE_PIDFD) check to pidfd feature check</title>
<updated>2024-09-12T15:45:38Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2024-06-11T20:34:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7a5fc9b34deb8d9fe22c9d060a5839827344fcc2'/>
<id>urn:sha1:7a5fc9b34deb8d9fe22c9d060a5839827344fcc2</id>
<content type='text'>
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.

Fixes #69259.

Change-Id: Ie3f3dc51f0cd76944871bf98690abf59f68fd7bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/592078
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
</feed>
