Florian Lehner
c0bba94af5
unix: add constants for netlink/audit
...
Change-Id: Idaa02498b43360fa647d52423bc2f4c0cd5a9523
Reviewed-on: https://go-review.googlesource.com/c/sys/+/416754
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-07-15 15:14:00 +00:00
Meng Zhuo
0a85c31ab5
unix: add freebsd/riscv64 support
...
For golang/go#53466
Change-Id: If5a4dc674cb1856ac580fb87d8030d50fa7c95dd
Reviewed-on: https://go-review.googlesource.com/c/sys/+/416834
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Bryan Mills <bcmills@google.com >
Run-TryBot: Meng Zhuo <mzh@golangcn.org >
Reviewed-by: Yuval Pavel Zholkover <paulzhol@gmail.com >
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com >
2022-07-12 01:45:10 +00:00
Meng Zhuo
5a0f0661e0
cpu: support non-linux OS for riscv64
...
Fixes golang/go#53698
Change-Id: Ia954aed4445a47fb8f8a2c0b9869aa8c50f2de15
Reviewed-on: https://go-review.googlesource.com/c/sys/+/416394
Auto-Submit: Meng Zhuo <mzh@golangcn.org >
Reviewed-by: Heschi Kreinick <heschi@google.com >
Run-TryBot: Meng Zhuo <mzh@golangcn.org >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Joel Sing <joel@sing.id.au >
2022-07-08 08:52:39 +00:00
Yuval Pavel Zholkover
05e143d24a
unix: regenerate on FreeBSD 12.3
...
Switch mksysnum to use https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12 .
Also remove the SAL 2.0 annotations.
remove FreeBSD 11 and below 64bit inode compatibility shims
Drop the errors_freebsd_GOARCH.go files.
Drop PTRACE_* and additional (arch specific) consts added as part of golang.org/cl/179099 to types_freebsd.
Add <sys/ptrace.h> to mkerror.sh for FreeBSD instead.
Run mkall.sh on FreeBSD 12.3 on amd64 and arm64 hosts with i386 and armv7 jails
for all supported arches.
Updates golang/go#53280
Change-Id: Idd29056829013a1f6eb26376978632645e4018ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/415714
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
2022-07-04 08:42:25 +00:00
Dan Kortschak
31831981b6
windows: add remaining IpAdapterAddresses fields
...
Change-Id: I373baee2c82c376f4718d9296ae19ba8a28a2693
Reviewed-on: https://go-review.googlesource.com/c/sys/+/415814
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: David Chase <drchase@google.com >
Run-TryBot: Dan Kortschak <dan@kortschak.io >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-07-02 02:00:25 +00:00
Dan Kortschak
179beb0bd1
windows: add GetBestInterfaceEx
...
Change-Id: I56f9212420f96a0f275e79b4a9766b09b175254d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/413495
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Damien Neil <dneil@google.com >
Run-TryBot: Dan Kortschak <dan@kortschak.io >
Run-TryBot: Alex Brainman <alex.brainman@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
2022-07-01 22:57:01 +00:00
Joel Sing
f75cf1eec3
unix: provide Msghdr.SetIovlen on openbsd/mips64
...
Fixes golang/go#53575
Change-Id: Ie9bbe074f9adaf9c194e4458bbf2efb3acd8f110
Reviewed-on: https://go-review.googlesource.com/c/sys/+/414554
Reviewed-by: David Chase <drchase@google.com >
Run-TryBot: Joel Sing <joel@sing.id.au >
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-06-27 19:12:45 +00:00
Ian Lance Taylor
87e55d7148
unix: add RecvmsgBuffers and SendmsgBuffers
...
Fixes golang/go#52885
Change-Id: I04b5be1ac9543a3791ebc4cd59b9e35e958e0ba2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/412497
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
2022-06-24 22:08:33 +00:00
Ian Lance Taylor
175b2fd9d6
unix: change Solaris Iovec.Base to *byte
...
Every other Iovec.Base field is *byte, and that is the only reasonable
value for Go. This is not backward compatible but we've made changes
like this before.
For golang/go#52885
Change-Id: I9a313a7931966a2483a322edd5c06c8cdca2557a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/412496
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Alex Rakoczy <alex@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
2022-06-22 16:19:53 +00:00
Tobias Klauser
4f61da869c
unix: use ByteSliceToString in TestMountUnmount on zos
...
Use the existing ByteSliceToString implementation instead of duplicating
it in TestMountUnmount.
Change-Id: Ia47510ac1ac8094a7e9265edf8a452bcacf06032
Reviewed-on: https://go-review.googlesource.com/c/sys/+/411379
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
2022-06-15 21:35:10 +00:00
Will Hawkins
ff8c426e75
unix: add support for TCP_CONNECTION_INFO on macOS
...
x/sys provides support for accessing TCP_INFO on Linux but does
not provide support for accessing the equivalent (TCP_CONNECTION_INFO)
on macOS. This patch adds that functionality.
Fixes golang/go#53330
Change-Id: Ia1c1bf79a8bbb76f3ccfe58c61e1a82e08735152
Reviewed-on: https://go-review.googlesource.com/c/sys/+/411734
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
2022-06-15 21:25:26 +00:00
Tobias Klauser
bf31f56cad
unix: add MemfdSecret on linux/riscv64
...
Now that SYS_MEMFD_SECRET is defined on linux/riscv64, CL 398514 can be
reverted to provide MemfdSecret on that platform as well.
Fixes golang/go#51547
Change-Id: I48e3e029fd2a3aeb860d69faf387bc10753759c7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/411376
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2022-06-15 21:21:20 +00:00
Tobias Klauser
af78867b19
unix/linux: update to Linux kernel 5.19-rc2
...
Update to 5.19-rc2 instead of 5.18 for the following reasons:
- Support for LoongArch has been merged upstream. This allows to drop
the loong64 specific kernel patches.
- Fixes [1] an issue encountered with when generating the
SOCK_TXREHASH_DEFAULT constant from linux/socket.h on 5.18
- Contains a fix [2] to provide SYS_MEMFD_SECRET on linux/riscv64 as
well, The underlying syscall was already available in earlier kernel
versions. Also see golang/go#51547 .
[1] https://lore.kernel.org/r/20220531094345.13801-1-tklauser@distanz.ch
[2] https://lore.kernel.org/r/20220505081815.22808-1-tklauser@distanz.ch
Change-Id: I6c3ec30a067eae339c443ee55962d94c84feffd9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/411375
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2022-06-15 21:21:18 +00:00
Tobias Klauser
003f7fa1e2
unix: implement Fstat{,at} using Statx on linux/loong64
...
linux/loong64 doesn't provide the fstat and fstatat syscalls in the
upstream Linux kernel. Instead, solely the statx syscall is available.
Use it to implement Fstat and Fstatat.
This follows the implementation in package syscall.
Change-Id: I69eefc863a37bd76ef2ab1e7670d1724dc147aae
Reviewed-on: https://go-review.googlesource.com/c/sys/+/411378
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-06-15 21:19:32 +00:00
Guoqi Chen
6c1b26c550
unix: always zero the higher bits of return value on linux/loong64 syscalls
...
All loong64 syscalls return values only via R4/A0, and R5/A1 may contain
unrelated content. Always zero the second return value.
Change-Id: Ic889f33158c4e4999bd94bd768d1094e95bc6421
Reviewed-on: https://go-review.googlesource.com/c/sys/+/411634
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Austin Clements <austin@google.com >
Reviewed-by: David Chase <drchase@google.com >
2022-06-14 16:21:38 +00:00
Ian Lance Taylor
9f5ed59c13
cpu: use xgetbv intrinsic
...
Fixes golang/go#53302
Change-Id: I698ef44f90e2ec538ae4a057134c22c102a87ff8
Reviewed-on: https://go-review.googlesource.com/c/sys/+/411635
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
2022-06-10 22:13:04 +00:00
Nahum Shalman
635b8c9b7f
unix: add Getsid function on Solaris
...
Change-Id: I04446dc775a1d7f7c5f6184c389e5814dacb16eb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/410370
Reviewed-by: Cherry Mui <cherryyz@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Run-TryBot: Cherry Mui <cherryyz@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2022-06-08 16:42:50 +00:00
Kir Kolyshkin
bc2c85ada1
unix: update openbsd Statfs_t fields
...
This changes some fields of openbsd Statfs_t from arrays of int8
to arrays of byte. This makes the types of those fields correspond to
the types used on most other BSD systems (Darwin, FreeBSD, NetBSD),
and simplifies the conversion to Go string.
Similar changes: CL 359674, CL 259903, CL 74331.
Note that while this patches mkpost.go, the end result is obtained by
manual editing of ztypes_openbsd_*.go files. The reasons for this are:
1. automatic regeneration (tried on openbsd 6.9 / amd64) brings in way
too many changes (5 files changed, 193 insertions, 45 deletions).
2. I could not figure out how to run openbsd on non-amd64.
Nevertheless, this change is sufficient, meaning if someone will
actually end up regenerating these (see e.g. CL 347649) after this
commit is merged, the fields will still be kept as arrays of byte.
Change-Id: I4520889f11f6ac2d9befe17c7a77186198c08cd2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/407195
Run-TryBot: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: 谢致邦 <xiezhibang@gmail.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-05-20 15:13:02 +00:00
Tobias Klauser
f9599da83c
unix: use ByteSliceToString in TestIoctlPtmget
...
Change-Id: I42cb5be80246af76cca9b6a09c6cb85bc07ab081
Reviewed-on: https://go-review.googlesource.com/c/sys/+/407254
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2022-05-20 15:11:50 +00:00
Kir Kolyshkin
dcacdad474
unix: use ByteSliceFromString in (*Ifreq).Name
...
CL 340370 introduced (*Ifreq).Name method which scans the Ifrn field
for \0 twice -- first explicitly, when by calling BytePtrToString.
It seems more straightforward to use ByteSliceToString instead. The
differences are:
- simpler code;
- no double scanning for \0;
- in case there is no \0 in the Ifrn (unlikely), the full string
(rather than an empty string) is now returned.
With the last item in mind, the test case with no \0 as input that
expects empty output fails, so drop it. Alternatively, we could test
that it returns the full string, but it will be essentially testing
ByteSliceToString, which is not the point.
Cc: Matt Layher <mdlayher@gmail.com >
Change-Id: I31d4f6dbe98aae5120f9b2246c93ceaa6a165395
Reviewed-on: https://go-review.googlesource.com/c/sys/+/407194
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
2022-05-19 14:10:25 +00:00
Tobias Klauser
5e4e11fc64
unix/linux: use gotip instead of patched Go 1.18
...
CL 399336 added support for generating linux/loong64 types and constants
by using a patched version of Go 1.18. The necessary changes have since
been submitted to gotip, so use Go build from the master branch to
generate types and consts.
The changes in the cgo -godefs generated comments are due to CL 396936,
also see go.dev/issue/52063
Change-Id: I314156675e79ba77b9eb1fa1845b20ca974ec77a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/406794
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
2022-05-17 19:59:34 +00:00
Ed Schouten
45d2b4557a
unix: add mount(2) for macOS
...
The 'data' argument of this method needs to point to a file system type
specific data structure. In the case of NFS (which I'm interested in
using), this needs to point to an XDR encoded message. The schema for
this message can be found here:
https://github.com/apple-oss-distributions/NFS/blob/main/mount_nfs/nfs_sys_prot.x
Change-Id: Ia49562ba6e8ab5d4c00eb961db6862fb1310b74e
GitHub-Last-Rev: 62c32df776
GitHub-Pull-Request: golang/sys#125
Reviewed-on: https://go-review.googlesource.com/c/sys/+/405494
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Heschi Kreinick <heschi@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-05-13 21:02:49 +00:00
Bryan C. Mills
988cb79eb6
execabs: add legacy "//+build" constraints
...
Go releases before Go 1.17 are no longer supported, and Go 1.17
supports the newer "//go:build" syntax, so the older "//+build"
variation is no longer required by Go's support policy. However, the
x/sys module is very low-level and empirically some users are still on
unsupported Go releases, so there is little harm in adding the older
variations.
Fixes golang/go#52668 .
Change-Id: Ieb8e64e450b9d795f2753fc5f99b36816a3dbff3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/403695
Run-TryBot: Bryan Mills <bcmills@google.com >
Reviewed-by: Russ Cox <rsc@golang.org >
2022-05-03 16:30:25 +00:00
Russ Cox
b6088ccd6c
execabs: make safe for Go 1.19
...
To preserve the same errors that LookPath used to return,
LookPath needs to know to ignore the new Go 1.19 exec.ErrDot errors.
For golang/go#43724 .
Change-Id: I8938813a1a4e14bf697f05879e3ab212611644da
Reviewed-on: https://go-review.googlesource.com/c/sys/+/403256
Run-TryBot: Russ Cox <rsc@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-05-02 12:42:56 +00:00
Russ Cox
b5fbb4746d
all: gofmt
...
Gofmt to update doc comments to the new formatting.
For golang/go#51082 .
Change-Id: I9a1c4b671c06820a1c383ee515f7884965fefa54
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399602
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Russ Cox <rsc@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Russ Cox <rsc@golang.org >
2022-04-29 23:34:32 +00:00
Aayush Agrawal
84afa8d3f7
windows: do not change stdio handle inheritance
...
This CL stops changing inheritance flag of stdint, stdout and stderr handles.
Fixes golang/go#52498
Change-Id: Ic786f660b457af99a0a975b357c35c36bc7f2b48
Reviewed-on: https://go-review.googlesource.com/c/sys/+/402714
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Peter Weinberger <pjw@google.com >
Run-TryBot: Than McIntosh <thanm@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-04-29 12:10:18 +00:00
limeidan
9388b58f71
unix: add loong64 tag to endian_little.go
...
Updates golang/go#46229
Change-Id: I35b57e9158671b159a73b4eba4baa8bfebf2ce31
Reviewed-on: https://go-review.googlesource.com/c/sys/+/400774
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
2022-04-22 01:37:27 +00:00
limeidan
88d2bb9c0c
unix: add generate component files support for linux/loong64
...
Updates golang/go#46229
Change-Id: If0ee99997360608d7ba218880a1ef180ca6db551
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399336
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
2022-04-22 01:37:25 +00:00
Damien Neil
33da011f77
unix: check correct group in Faccessat
...
The Faccessat call checks the user, group, or other permission bits of a
file to see if the calling process can access it. The test to see if the
group permissions should be used was made with the wrong group id, using
the process's group id rather than the file's group id. Fix this to use
the correct group id.
This change only affects Linux versions prior to 5.8. Linux 5.8 added
the faccessat2 system call, which we use in preference to the internal
implementation.
No test since we cannot easily change file permissions when not running
as root and the test is meaningless if running as root.
For golang/go#52313
Change-Id: I6fa64379a50c9380207eab9d095ef7fbd05a2d59
Reviewed-on: https://go-review.googlesource.com/c/sys/+/400074
Run-TryBot: Damien Neil <dneil@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2022-04-12 21:12:40 +00:00
Alexey Perevalov
889880a91f
unix: fsmount fspick fsopen linux syscall
...
Patches were submitted to Linux manpages:
https://lwn.net/Articles/802096/ , but not yet applied.
Generated on linux kernel v5.16.
Fsconfig couldn't implemented by generator, it requires
special cases handling.
Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
Reviewed-on: https://go-review.googlesource.com/c/sys/+/398434
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
2022-04-12 07:17:39 +00:00
limeidan
83041a38b1
unix: provide linux/loong64 assembly for syscalls
...
Updates golang/go#46229
Change-Id: I0c0d9224312915fc3b86a0cd4abb344286449909
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399335
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Russ Cox <rsc@golang.org >
2022-04-12 01:58:02 +00:00
limeidan
0a89baf871
cpu: add basic support for GOARCH=loong64
...
Updates golang/go#46229
Change-Id: Ibee284c742532dec798f4a5ecfe38b429825d7aa
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399334
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Russ Cox <rsc@golang.org >
2022-04-12 01:57:24 +00:00
Florian Lehner
a24fb2fb8a
unix: add constants for netlink/routing rules
...
Change-Id: Ic68b65e71125b755418f9d8d01a9500aa1e9ffc1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399194
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
Auto-Submit: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2022-04-08 20:14:24 +00:00
Tobias Klauser
3f8b81556e
unix/linux: update to Linux kernel 5.17
...
Change-Id: I8e982e355d6058198f5b555c2f33e18301872909
Reviewed-on: https://go-review.googlesource.com/c/sys/+/398435
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-04-06 16:36:25 +00:00
Alexey Perevalov
289d7a0edf
unix: add MoveMount syscall on linux
...
This syscall is not yet described in linux man pages
(https://github.com/mkerrisk/man-pages.git ),
but it was submitted to lkml https://lwn.net/Articles/802095/
This syscall appeared in linux v5.2.
Change-Id: I0708bfceda8d7a7608d0d0e75e36c3d81302dedb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/397095
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-04-06 15:52:45 +00:00
Eric Lagergren
1e041c57c4
unix: revert MemfdSecret changes to riscv64
...
Linux apparently supports the memfd_secret syscall on riscv, but
SYS_MEMFD_SECRET isn't defined by zsysnum_linux_riscv64.go.
Updates #51547
Change-Id: I138ce679bf742a7ff4ce1d5e10db84a00df0e271
Reviewed-on: https://go-review.googlesource.com/c/sys/+/398514
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Bryan Mills <bcmills@google.com >
2022-04-05 21:05:40 +00:00
Eric Lagergren
b1e9470b6e
unix: add MemfdSecret
...
Fixes #51547
Change-Id: I07a02e8e6ac8baaa72f1c214621fbaca6a6ed707
Reviewed-on: https://go-review.googlesource.com/c/sys/+/397774
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-04-05 05:20:23 +00:00
Eric Lagergren
6acee93ad0
unix: regenerate OPEN_TREE_CLONE
...
Constant was incorrectly generated in CL 397094.
Change-Id: I3aeef51e1ad2ec43332fbcdff6afc705b098f57d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/397814
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-04-03 20:57:10 +00:00
Alexey Perevalov
483a9cbc67
unix: add OpenTree on linux
...
This syscall is not yet described in linux man pages
(https://github.com/mkerrisk/man-pages.git )
but it was attempts to do it (https://lwn.net/Articles/829496/ )
This syscall appeared in linux kernel v5.2
Change-Id: If44aa74c4ddd200831011c6c4bf4bd4fee440785
Reviewed-on: https://go-review.googlesource.com/c/sys/+/397094
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-04-03 02:05:50 +00:00
Matt Layher
e17cdc4130
unix: fix staticcheck issues
...
Change-Id: If7abd7a743c4359a9780401cec7c874d530ee268
Reviewed-on: https://go-review.googlesource.com/c/sys/+/396674
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-03-30 03:32:06 +00:00
Matt Layher
43be30ef30
unix: skip Linux TestPidfd if Waitid returns EINVAL
...
The updated test in CL 395936 appears to break GOARCH mips* builders.
Updates golang/go#52014
Change-Id: I42bb71d6afda2112a524257fd1b42306dd22689c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/396154
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-03-29 15:23:56 +00:00
Tobias Klauser
d36c6a25d8
unix/linux: update to Go 1.18
...
Change-Id: I663b4e6346cec4a51f4423a38cc1315c5b51956d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/396114
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2022-03-28 11:51:05 +00:00
Tobias Klauser
530d0810a4
unix: add utimensat libc wrapper on darwin
...
Direct syscalls are no longer supported on darwin (CL 250437), so
utimensat can be implemented as a wrapper around the libc function.
The utimensat function was added in macOS 10.13 and Go 1.17 dropped
support for macOS 10.12.
This also allows to drop the fallback to setattrlistTimes which was
used to set timestamps with nanosecond resolution before utimensat could
be used, see golang/go#22528 and CL 74952.
Change-Id: I206291277e6f7200ca7a659e29075968647779a6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/251737
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Keith Randall <khr@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2022-03-27 21:02:14 +00:00
Matt Layher
36772127a2
unix: implement Waitid on Linux
...
waitid(2) can be used to wait on pidfds. Update TestPidfd to test this new
functionality as well.
Change-Id: I5f26140b9afd5a6ec3f04217fb1c91542936a2c3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/395936
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-03-25 20:38:50 +00:00
Nahum Shalman
594fa53f00
unix: solaris/illumos Event Ports ENOENT cleanup
...
When we receive ENOENT from port_dissociate,
we should clean up our map reference.
To do so safely, we need a place to track
the user cookies.
This work is in support of fsnotify/fsnotify#371
Change-Id: Iae53ccc508d533941ad19df9051ca046262095ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/380034
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-03-25 20:22:31 +00:00
Matt Layher
a9b59b0215
unix: add PidfdSendSignal on Linux
...
This completes the pidfd_* family of syscalls and adds a test to verify that a
child process can be terminated using the new PidfdSendSignal function.
Change-Id: I71f6a1e26518f513731e20afef02030462e9a2c0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/393794
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-03-19 13:42:39 +00:00
Tobias Klauser
2edf467146
windows: optimize UTF16{,Ptr}FromString
...
Use strings.IndexByte in UTF16FromString instead of an open-coded loop.
Change-Id: Iac4374d9a58e40659147d35c9ab21bb89f5da629
Reviewed-on: https://go-review.googlesource.com/c/sys/+/393594
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-03-18 05:55:25 +00:00
Tobias Klauser
51cd9980da
unix: unify Recvmsg epilogues
...
Follow CL 361258 which did the same in package syscall.
Change-Id: I721406286d84ec999978e7e1ea25b6a2b3e195e6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/393294
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-03-17 06:15:10 +00:00
Tobias Klauser
22a226b3d1
unix: unify Sendmsg prologues
...
Follow CL 361256 which did the same in package syscall.
Change-Id: Ifd22e515c220806f02400baded821ec583959d78
Reviewed-on: https://go-review.googlesource.com/c/sys/+/393274
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-03-17 06:14:57 +00:00
Mathieu Aubin
2c4bbad7e9
unix/internal/mkmerge: correct typo
...
Change-Id: Icaa541758d4077aa3c5755e16effa0ce173a2335
GitHub-Last-Rev: 2fcf892e3e
GitHub-Pull-Request: golang/sys#121
Reviewed-on: https://go-review.googlesource.com/c/sys/+/392234
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2022-03-17 02:21:23 +00:00