<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/syscall/exec_linux.go, branch json-isValidNumber-before</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber-before</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber-before'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-01-25T03:23:11Z</updated>
<entry>
<title>syscall: clean up variable declarations in forkAndExecInChild</title>
<updated>2023-01-25T03:23:11Z</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-12-09T17:30:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e216ee7e7416df48dc9550a6f18552a4ada5d419'/>
<id>urn:sha1:e216ee7e7416df48dc9550a6f18552a4ada5d419</id>
<content type='text'>
The various forkAndExecInChild implementations have comments
explaining that they pre-declare variables to force allocations
to occur before forking, but then later use ":=" declarations
for additional variables.

To make it clearer that those ":=" declarations do not allocate,
we move their declarations up to the predeclared blocks.

For #57208.

Change-Id: Ie8cb577fa7180b51b64d6dc398169053fdf8ea97
Reviewed-on: https://go-review.googlesource.com/c/go/+/456516
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>syscall: fix shadowing bugs in forkAndExecInChild</title>
<updated>2022-12-12T14:38:22Z</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-12-09T17:25:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=27301e8247580e456e712a07d68890dc1e857000'/>
<id>urn:sha1:27301e8247580e456e712a07d68890dc1e857000</id>
<content type='text'>
Fixes #57208.
Updates #23152.

Change-Id: Icc9a74aeb26f1b6f151162c5d6bf1b4d7cd54d0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/456515
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>syscall: remove redundant type conversion</title>
<updated>2022-10-02T02:27:38Z</updated>
<author>
<name>cui fliter</name>
<email>imcusg@gmail.com</email>
</author>
<published>2022-09-30T03:41:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=51297dd6df713b988b5c587e448b27d18ca1bd8a'/>
<id>urn:sha1:51297dd6df713b988b5c587e448b27d18ca1bd8a</id>
<content type='text'>
Change-Id: Iae290216687fd1ce8be720600157fb78cc2446d0
GitHub-Last-Rev: 4fba64ecb14a704d39f6ecc33989522bcac6656f
GitHub-Pull-Request: golang/go#55959
Reviewed-on: https://go-review.googlesource.com/c/go/+/436881
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>syscall: add CgroupFD support for ForkExec on Linux</title>
<updated>2022-09-09T15:34:16Z</updated>
<author>
<name>Kir Kolyshkin</name>
<email>kolyshkin@gmail.com</email>
</author>
<published>2022-07-15T04:18:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=bca17d16ca0dabbe1b533bb78f367d64e076fe73'/>
<id>urn:sha1:bca17d16ca0dabbe1b533bb78f367d64e076fe73</id>
<content type='text'>
Implement CLONE_INTO_CGROUP feature, allowing to put a child in a
specified cgroup in a clean and simple way. Note that the feature only
works for cgroup v2, and requires Linux kernel 5.7 or newer.

Using the feature requires a new syscall, clone3. Currently this is the
only reason to use clone3, but the code is structured in a way so that
other cases may be easily added in the future.

Add a test case.

While at it, try to simplify the syscall calling code in
forkAndExecInChild1, which became complicated over time because:

1. It was using either rawVforkSyscall or RawSyscall6 depending on
   whether CLONE_NEWUSER was set.

2. On Linux/s390, the first two arguments to clone(2) system call are
   swapped (which deserved a mention in Linux ABI hall of shame). It
   was worked around in rawVforkSyscall on s390, but had to be
   implemented via a switch/case when using RawSyscall6, making the code
   less clear.

Let's

 - modify rawVforkSyscall to have two arguments (which is also required
   for clone3);

 - remove the arguments workaround from s390 asm, instead implementing
   arguments swap in the caller (which still looks ugly but at least
   it's done once and is clearly documented now);

 - use rawVforkSyscall for all cases (since it is essentially similar to
   RawSyscall6, except for having less parameters, not returning r2, and
   saving/restoring the return address before/after syscall on 386 and
   amd64).

Updates #51246.

Change-Id: Ifcd418ebead9257177338ffbcccd0bdecb94474e
Reviewed-on: https://go-review.googlesource.com/c/go/+/417695
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;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Kirill Kolyshkin &lt;kolyshkin@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: append(bytes, str...) works out of the box</title>
<updated>2022-08-23T21:04:06Z</updated>
<author>
<name>Daniel Martí</name>
<email>mvdan@mvdan.cc</email>
</author>
<published>2022-08-22T21:11:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=790d60537e0888464a1c8a6f98c20baf2eeacdf2'/>
<id>urn:sha1:790d60537e0888464a1c8a6f98c20baf2eeacdf2</id>
<content type='text'>
From the append docs in the builtin package:

	As a special case, it is legal to append a string to a byte slice, like this:

	slice = append([]byte("hello "), "world"...)

Change-Id: Ib14039a7476873b12a3aefccd8863e8d628b9249
Reviewed-on: https://go-review.googlesource.com/c/go/+/425102
Reviewed-by: hopehook &lt;hopehook@qq.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Daniel Martí &lt;mvdan@mvdan.cc&gt;
</content>
</entry>
<entry>
<title>syscall: add new CLONE_ flags for Linux</title>
<updated>2022-08-19T16:12:50Z</updated>
<author>
<name>Kir Kolyshkin</name>
<email>kolyshkin@gmail.com</email>
</author>
<published>2022-05-20T05:25:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3204e62dd1abe087430e37e8c33c3d010606aabe'/>
<id>urn:sha1:3204e62dd1abe087430e37e8c33c3d010606aabe</id>
<content type='text'>
The constants for these were auto-generated from the C includes
into zerrors_linux* files quite some time ago. The generator is
currently broken, but some new flags need to be added nevertheless.

As the flags won't change and the values are the same for all
architectures, we can just define them statically (as it's already
done in the runtime package):

 - remove the CLONE_* constants from zerrors_linux_*.go;
 - patch mkerrors.sh to not generate CLONE_ constants
   (in case it will be fixed and used in the future);
 - add the constants and some comments about them to exec_linux.go,
   using Linux v5.17 include/uapi/sched.h as the ultimate source.

This adds the following new flags:

 - CLONE_CLEAR_SIGHAND
 - CLONE_INTO_CGROUP
 - CLONE_NEWCGROUP
 - CLONE_NEWTIME
 - CLONE_PIDFD

For #51246.

Change-Id: I0c635723926218bd403d37e113ee4d62194463a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/407574
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Joedian Reid &lt;joedian@golang.org&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>syscall: gofmt after CL 412114</title>
<updated>2022-07-11T21:46:19Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2022-07-11T17:10:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=126c22a09824a7b52c019ed9a1d198b4e7781676'/>
<id>urn:sha1:126c22a09824a7b52c019ed9a1d198b4e7781676</id>
<content type='text'>
Change-Id: Ie51545eaebd22a31379bf8814a2c62b91d1d105b
Reviewed-on: https://go-review.googlesource.com/c/go/+/416934
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>syscall: clarify Pdeathsig documentation on Linux</title>
<updated>2022-06-15T21:18:07Z</updated>
<author>
<name>Vojtěch Boček</name>
<email>vojtech.bocek@avast.com</email>
</author>
<published>2022-06-15T09:36:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0e3d0c9581d1d31a94f5c70a528ff0bdba5c523d'/>
<id>urn:sha1:0e3d0c9581d1d31a94f5c70a528ff0bdba5c523d</id>
<content type='text'>
This is a rather large footgun, so let's mention that it sends the signal on thread termination and not process termination in the documentation.

Updates #27505

Change-Id: I489cf7136e34a1a7896067ae24187b0d523d987e
GitHub-Last-Rev: c8722b25d1fb8b0b3696257ec7e955eb421f15a6
GitHub-Pull-Request: golang/go#53365
Reviewed-on: https://go-review.googlesource.com/c/go/+/412114
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>all: separate doc comment from //go: directives</title>
<updated>2022-04-05T17:54:15Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-01-31T01:13:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9839668b5619f45e293dd40339bf0ac614ea6bee'/>
<id>urn:sha1:9839668b5619f45e293dd40339bf0ac614ea6bee</id>
<content type='text'>
A future change to gofmt will rewrite

	// Doc comment.
	//go:foo

to

	// Doc comment.
	//
	//go:foo

Apply that change preemptively to all comments (not necessarily just doc comments).

For #51082.

Change-Id: Iffe0285418d1e79d34526af3520b415a12203ca9
Reviewed-on: https://go-review.googlesource.com/c/go/+/384260
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor)</title>
<updated>2021-10-28T18:17:57Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-08-25T16:48:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f229e7031a6efb2f23241b5da000c3b3203081d6'/>
<id>urn:sha1:f229e7031a6efb2f23241b5da000c3b3203081d6</id>
<content type='text'>
When these packages are released as part of Go 1.18,
Go 1.16 will no longer be supported, so we can remove
the +build tags in these files.

Ran go fix -fix=buildtag std cmd and then reverted the bootstrapDirs
as defined in src/cmd/dist/buildtool.go, which need to continue
to build with Go 1.4 for now.

Also reverted src/vendor and src/cmd/vendor, which will need
to be updated in their own repos first.

Manual changes in runtime/pprof/mprof_test.go to adjust line numbers.

For #41184.

Change-Id: Ic0f93f7091295b6abc76ed5cd6e6746e1280861e
Reviewed-on: https://go-review.googlesource.com/c/go/+/344955
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
</content>
</entry>
</feed>
