Commit Graph

1205 Commits

Author SHA1 Message Date
Juan-Luis de Sousa-Valadas Castaño
11be45c36d unix: add IFAL_* consts and ifaddrlblmsg on linux 2025-08-12 13:05:31 +02:00
Tobias Klauser
5b936e1f12 unix/linux: update to Linux kernel 6.16, Go to 1.24.5
Change-Id: Id0b60b5bbc33c48e49ba655babf0856878960e29
Reviewed-on: https://go-review.googlesource.com/c/sys/+/693215
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-08-06 14:03:43 -07:00
database64128
3a827038f2 unix: remove redundant xnu version check for {p}readv/{p}writev
As discussed later in golang/go#64710, these checks are unnecessary.

For golang/go#64710

Change-Id: I8693af81cc543b886732922eb5cd64e07ed4b7a8
Reviewed-on: https://go-review.googlesource.com/c/sys/+/688858
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Mark Freeman <mark@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
2025-07-30 07:39:06 -07:00
nickgarlis
9920300fc8 unix: add missing nft conntrack constants
The following constants were missing for nft conntrack:

- NFT_CT_SRC_IP
- NFT_CT_DST_IP
- NFT_CT_SRC_IP6
- NFT_CT_DST_IP6
- NFT_CT_ID

https://git.netfilter.org/libnftnl/tree/include/linux/netfilter/nf_tables.h?id=7a7722ee336fac14690851f6c84965582a741601#n1173

Change-Id: I2f9bd12c1ab8569ee019310c040b46b214f65b76
GitHub-Last-Rev: 8fac63b187
GitHub-Pull-Request: golang/sys#257
Reviewed-on: https://go-review.googlesource.com/c/sys/+/689922
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <mark@golang.org>
2025-07-28 12:41:30 -07:00
cuishuang
ad4e0fcb71 unix: remove redundant word in comment
Change-Id: I8b05b5cea86d41423dac9fd96a5000a6daa1e8c3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/690816
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Mark Freeman <mark@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-07-28 11:24:37 -07:00
database64128
084ad875b3 unix: fix //sys decl after CL 548795
CL 548795 mistakenly changed one of the //sys declaration to "// sys"
while resolving a merge conflict.

For golang/go#64710

Change-Id: I029b461fd3ca7b76f3bd23b3343f7e63c4bb09f3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/688857
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-07-25 11:55:20 -07:00
Que Zhiyong
751c3c6ac2 unix: add missing NFT_PAYLOAD_* consts on linux
Change-Id: Id222e11029596d2ea2679e065780171ed3c7708a
GitHub-Last-Rev: 649d64b1c3
GitHub-Pull-Request: golang/sys#250
Reviewed-on: https://go-review.googlesource.com/c/sys/+/681435
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2025-06-17 10:35:38 -07:00
Tobias Klauser
0c740cc0f8 unix: update Go to 1.24.3
Change-Id: I526bfbde6e57b8e7aea6cd31e3cff46608755aa0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/673055
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-06-13 07:34:22 -07:00
Tobias Klauser
d62d31c616 unix: update Linux constants and types to v6.14
CL 660375 updated the kernel version in the Dockerfile but for some
reason no constant or types were updated. Refresh them now and also add
new ETHTOOL_* and NL80211_* enum types while at it.

Change-Id: I73bc509963f0b89f6d461eeca4b210626ab44975
Reviewed-on: https://go-review.googlesource.com/c/sys/+/673076
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
2025-06-13 07:33:12 -07:00
Tobias Klauser
01aaa8342f all: simplify code by using modern Go constructs
Generated using modernize by running:

    go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...

Change-Id: Ifc7d61cf6735cc53f2bdf890a338961f55075af5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/661975
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-04-03 13:04:48 -07:00
Mauri de Souza Meneguzzo
1c3b72f1c1 unix: update Linux kernel to 6.14
No new syscalls or constants in this release, just bumping the version number.

Change-Id: I97f7e1092bb78d99342552ba18e1ea3cd40681f4
GitHub-Last-Rev: df5cca1a90
GitHub-Pull-Request: golang/sys#247
Reviewed-on: https://go-review.googlesource.com/c/sys/+/660375
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-03-26 05:30:21 -07:00
Manuel Schönlaub
3330b5e756 unix: support Readv, Preadv, Writev and Pwritev for darwin
Darwin, starting with Big Sur, supports vectorized IO.

Fixes golang/go#64710

Change-Id: Ic3a3c51009eab24f70665d8d3a145b328a7713c6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/548795
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-03-20 08:06:05 -07:00
Mauri de Souza Meneguzzo
863b3c4ac4 unix: update glibc to 2.41
Change-Id: I1796b552f854a15e8ef5e019e247c4d7e0644086
GitHub-Last-Rev: 3518c62005
GitHub-Pull-Request: golang/sys#244
Reviewed-on: https://go-review.googlesource.com/c/sys/+/645436
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2025-01-31 07:57:49 -08:00
Florian Lehner
4d4692e1b0 unix: add Auxv
Fixes golang/go#67839

Change-Id: I3af38d21159f7cac3786b49ac17657d314fbc178
Reviewed-on: https://go-review.googlesource.com/c/sys/+/644295
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2025-01-31 07:53:42 -08:00
Mauri de Souza Meneguzzo
b215a1c6fc unix: update to Linux kernel 6.13
Change-Id: I4c49a78bd2abf2ac9e4d461680c92ae65be14544
GitHub-Last-Rev: 888e68d533
GitHub-Pull-Request: golang/sys#243
Reviewed-on: https://go-review.googlesource.com/c/sys/+/642199
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2025-01-21 14:32:54 -08:00
Nahum Shalman
1c14dcadc3 unix: add GetPeerUcred and UcredGet for solaris
Change-Id: I74ba119fb729ef46899de04c686115f960975bb3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/639755
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2025-01-07 00:03:00 -08:00
Tobias Klauser
a7f19e9c20 unix: add Dup3 on dragonfly
Use the same implementation as on freebsd which is also what the
dragonfly libc uses.

Change-Id: I0ed513ae15fcb6dac77b2fc76f662723d66b75c6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/636435
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2024-12-17 08:13:49 -08:00
Ian Lance Taylor
fe16172d11 unix: define IfMsghdr2, IfData64, and RtMsghdr2 on darwin
Change-Id: I6943f6b5bd9f7d0ef5bad24ed638b8cf5dd0353d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/633077
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2024-12-03 18:44:20 +00:00
Mauri de Souza Meneguzzo
0a57dbcf35 unix: update to kernel Linux 6.12
Change-Id: I7c8157d5f1b597b6ae249b20866bbad918b46fa4
GitHub-Last-Rev: 0bbc2efbab
GitHub-Pull-Request: golang/sys#238
Reviewed-on: https://go-review.googlesource.com/c/sys/+/629075
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-11-18 19:38:36 +00:00
Tobias Klauser
3cf1e67d0c unix: don't fail TestPpoll on EINTR
TestPpoll sometimes fails builders due to Ppoll getting interrupted and
returning EINTR:

--- FAIL: TestPpoll (0.00s)
    syscall_linux_test.go:299: Ppoll: unexpected error: interrupted system call

Fix this by retrying Ppoll in case of EINTR, same as CL 298189 in
TestPoll.

Fixes golang/go#66324

Change-Id: I8ce4e2c00fe3b7a078cd75b4b15bb076d3a87fb2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/627395
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-11-13 21:52:06 +00:00
Mac Malainey
ca0404159d unix: extend z/OS support
extend support for z/OS target by adding the following syscalls:
- Sendfile (library implementation)
- Fcntl
- MmapPtr
- MunmapPtr

Change-Id: I098748802c2b275c15758e9d0132fca0490e9b70
GitHub-Last-Rev: 5aafd0b757
GitHub-Pull-Request: golang/sys#223
Reviewed-on: https://go-review.googlesource.com/c/sys/+/620375
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-10-29 15:10:58 +00:00
Tobias Klauser
18e038c8ee unix: move NETLINK_* consts to own section
This makes it easier to distinguish them from the IFLA_* and add new
entries. Also refresh the IFLA_* consts while at it.

Change-Id: I94aa56c9f99d0714668d8150cb6185d57e2d789c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/622515
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2024-10-28 15:03:49 +00:00
Dmitri Shuralyov
cff53d5a33 unix: gofmt after CL 610296
Also remove a few unhelpful blank lines.

Change-Id: I4001a25ec409406855b7800afd88738c43f60b90
Reviewed-on: https://go-review.googlesource.com/c/sys/+/621921
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2024-10-25 18:35:15 +00:00
Joon Lee
123459f096 unix: update z/OS implementation of fcntl and mmap
- Add a wrapper function around fcntl to handle different operation
  types and new fcntl implementation that accepts uintptr as an arg.
- Add support for calling mmap/munmap with address pointers.
- Add accompanying tests for new functions.

Change-Id: If5e77aa4cf2cccfd431de4f3bd0c5014a761e167
GitHub-Last-Rev: 07e32a4ab7
GitHub-Pull-Request: golang/sys#216
Reviewed-on: https://go-review.googlesource.com/c/sys/+/610296
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
2024-10-25 15:27:13 +00:00
Tobias Klauser
df4a4da00c unix/linux: adjust Dockerfile ENV key value format
This fixes the following warnings emitted when running mkall.sh on
GOOS=linux with a recent Docker version:

 6 warnings found (use --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 4)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 24)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 25)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 26)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 33)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 56)

Also see https://docs.docker.com/reference/build-checks/legacy-key-value-format/

Change-Id: Icdf05cbe7b8650fc2fec84e010c7401807f5f75f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/621956
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-10-24 15:42:44 +00:00
Tobias Klauser
696d3420cc unix: gofmt after CL 621375
Change-Id: Ibcd776913317d3b38b418190fa93c6eae52ffc0d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/621955
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-10-24 15:37:41 +00:00
Yaroslav Kolomiiets
60d787735c unix: add PTP_PF_* constants on Linux
These represent valid values for PtpPinDesc.Func.
They are defined as enum, thus not emitted from mkerrors.sh.

Change-Id: Ibac22d56214fa0f64a4095dfc000692a5e5e994a
GitHub-Last-Rev: e7990b0882
GitHub-Pull-Request: golang/sys#229
Reviewed-on: https://go-review.googlesource.com/c/sys/+/621735
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-10-23 15:19:30 +00:00
Yaroslav Kolomiiets
256d1dfe8f unix: add PTP IOCTLs on Linux
The IOCTLs are used for interacting with PTP-specific functions of NIC and time card drivers.

Description:
https://netdevconf.info/0x18/docs/netdev-0x18-paper39-talk-slides/netdev-intro-ptp-api.pdf

Change-Id: If50d605958e5cee451146cf68cc95a3704917512
GitHub-Last-Rev: 44fac1cb1a
GitHub-Pull-Request: golang/sys#225
Reviewed-on: https://go-review.googlesource.com/c/sys/+/621375
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-10-21 18:42:12 +00:00
Yaroslav Kolomiiets
a57fdb8507 unix: add IoctlGetHwTstamp/IoctlGetHwTstamp on Linux
Add the ioctls to get/set the hardware timestamping configuration
(SIOCSHWTSTAMP and SIOCGHWTSTAMP) along with relevant symbols.

The usage is described in
https://www.kernel.org/doc/Documentation/networking/timestamping.txt

Change-Id: Ib7509feaf28218aeae497eff9ca6c0a532aa73c0
GitHub-Last-Rev: 47dc9dfec2
GitHub-Pull-Request: golang/sys#224
Reviewed-on: https://go-review.googlesource.com/c/sys/+/620376
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-10-16 17:41:25 +00:00
Guoqi Chen
3932916d5c unix: switch to Ubuntu 24.10 in Dockerfile
ubuntu 24.04 introduced support for qemu-loongarch64, and ubuntu 24.10
introduced support for the cross-compiler gcc-loongarch64-linux-gnu, so
we can temporarily switch to ubuntu 24.10 to discard the extra links
introduced by loong64 and switch to it when the next ubuntu LTS version
is released.

Change-Id: I96de123df0cf50d6ba0331eeb02fc1e8c48ce304
Reviewed-on: https://go-review.googlesource.com/c/sys/+/618075
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-10-14 16:58:48 +00:00
cuishuang
2dfefb6832 all: execute gofmt
Change-Id: I55aef760145df773be30d567c9e989f46a3e79dc
Reviewed-on: https://go-review.googlesource.com/c/sys/+/618898
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2024-10-11 18:38:43 +00:00
Yaroslav Kolomiiets
e5eee7e480 unix: add IoctlGetEthtoolTsInfo on Linux
The function fetches ethtool timestamping and PHC association for a
network interface. Its primary usage is to query the mapping between
the interface and its corresponding PTP clock number in /dev/ptp𝑛.

Change-Id: Id09466b3b43056c628593d4d2e05d77ec8d8082b
GitHub-Last-Rev: 3743a3a650
GitHub-Pull-Request: golang/sys#222
Reviewed-on: https://go-review.googlesource.com/c/sys/+/619335
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-10-11 16:50:38 +00:00
Yaroslav Kolomiiets
fe162bad74 unix: add ClockSettime on Linux
The syscall clock_settime(3) is used to set the time on the specified
clock. It is a counterpart to clock_gettime(3) which is already
exposed as ClockGettime here.

Fixes golang/go#69830

Change-Id: I6145c915754f31e3c50f6a11568eb9d5ba12a778
GitHub-Last-Rev: 5b15f129cc
GitHub-Pull-Request: golang/sys#221
Reviewed-on: https://go-review.googlesource.com/c/sys/+/619255
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-10-10 19:53:43 +00:00
Mateusz Poliwczak
23b0dabe63 unix: mark vgetrandom as non-escaping
For golang/go#69577

Change-Id: Id1942d252c813126aa2f110e3f426714db73b9c7
GitHub-Last-Rev: 10e6a30b78
GitHub-Pull-Request: golang/sys#220
Reviewed-on: https://go-review.googlesource.com/c/sys/+/616795
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Jason Donenfeld <Jason@zx2c4.com>
2024-10-01 18:16:15 +00:00
John Troy
cbf0eb65e7 unix: fix grep syntax to work on non-GNU greps
CL 432835 changed two grep commands in unix/mkerrors.sh in such a way
that is incompatible with AIX's grep, which, unlike GNU grep, does not
support extended regular expressions without the -E flag. The intent of
this PR is to restore the egrep behavior by invoking grep as grep -E.
My assumption is that GNU grep is not meant to be a requirement to run
mkerrors.sh, and given that, grep -E looks like the most cross-platform
approach.

Example of current (incorrect) behavior on AIX:

bash-5.2$ printf 'SIGHUP\nSIGMAX64\nSIGTERM' | grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64'
SIGHUP
SIGMAX64
SIGTERM

Behavior before CL 432835:

bash-5.2$ printf 'SIGHUP\nSIGMAX64\nSIGTERM' | egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)'
SIGHUP
SIGTERM

Behavior of proposed change:

bash-5.2$ printf 'SIGHUP\nSIGMAX64\nSIGTERM' | grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)'
SIGHUP
SIGTERM

OpenBSD's grep behaves the same as AIX for the above commands, which is
why I cast this as GNU vs. non-GNU. I haven't tested any other
implementations.

Fixes golang/go#69365

Change-Id: I009353ee630463475a5c131d019f59c5e69efd34
GitHub-Last-Rev: e1166046e1
GitHub-Pull-Request: golang/sys#217
Reviewed-on: https://go-review.googlesource.com/c/sys/+/615755
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-09-30 12:38:50 +00:00
Mauri de Souza Meneguzzo
e7397b9a65 unix: update to Linux 6.11
Change-Id: I1cc777822da1b557e69634faade8e24d06c00ce8
GitHub-Last-Rev: d09238ecd0
GitHub-Pull-Request: golang/sys#218
Reviewed-on: https://go-review.googlesource.com/c/sys/+/613855
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2024-09-30 12:37:56 +00:00
Jason A. Donenfeld
981de40f5c unix: use vDSO for getrandom() on linux
With CL 614835 adding support in the runtime for calling into the
getrandom() vDSO function, wire up x/sys/unix's Getrandom() function to
it, so that callers can benefit from the increased speed and shared
vDSO state with the runtime.

Updates golang/go#69577.

Change-Id: I17734409982c51bb984a6337f4ffa8f60414ebee
Reviewed-on: https://go-review.googlesource.com/c/sys/+/615335
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-09-28 01:26:00 +00:00
Leo Antunes
48aad76ed3 linux: add tcp_cc_info and its related types
Add the ability to retrieve congestion control information from a socket via TCP_CC_INFO.

Fixes golang/go#68232

Change-Id: I2ea15928ec0e3192b670759bab4b659e62be553b
GitHub-Last-Rev: b8b8c44f1f
GitHub-Pull-Request: golang/sys#200
Reviewed-on: https://go-review.googlesource.com/c/sys/+/595676
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-09-17 15:50:50 +00:00
cuishuang
d58f986c89 all: fix some typos in comment
Change-Id: I40f9866661bad30ee2f4be2e9d0beee54db860b3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/611775
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-09-09 19:33:19 +00:00
Tobias Klauser
30de3524c2 unix: fix Test{Fd,}Xattr failure on NetBSD
On NetBSD the namespace of an xattr is stored separately from the name
and isn't returned by Listxattr and Flistxattr. Like on FreeBSD, strip
the namespace before checking the returned xattrs.

Fixes golang/go#69313
Fixes golang/go#69314

Change-Id: I7f2393cc63f9860332c0e07a51f3b9d32911e892
Cq-Include-Trybots: luci.golang.try:x_sys-gotip-netbsd-arm64
Reviewed-on: https://go-review.googlesource.com/c/sys/+/611695
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-09-09 01:37:35 +00:00
Tobias Klauser
c08bc6e187 unix: update Go to 1.23.0
Change-Id: Ifd0f3aefd3699871fc875c8628aa4105b2c85f13
Reviewed-on: https://go-review.googlesource.com/c/sys/+/610016
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-09-06 13:14:59 +00:00
Ian Lance Taylor
9cb830b23e unix: add missing import to syscall_hurd.go
CL 471119 added a reference to the unsafe package,
but didn't add the import.

Change-Id: Ibb8097df0444d8e83ba08e4ca2b5df98844fccf4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/607976
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-08-23 19:08:35 +00:00
Eli Lindsey
71132f5fbd unix: add POLLRDHUP to FreeBSD
POLLRDHUP is a poll(2) event applicable to stream sockets that notifies
when a remote peer closes a connection.

Change-Id: I03a192426f89bbd08fb27dda2716ffb888043c92
Reviewed-on: https://go-review.googlesource.com/c/sys/+/607797
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-08-23 18:12:53 +00:00
Ian Lance Taylor
29e55b2fd3 unix: use os.Executable rather than os.Args[0] in tests
Change-Id: I67a063d747c6e34dcd0292fdb3a9a0d965a6e133
Reviewed-on: https://go-review.googlesource.com/c/sys/+/607875
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-08-22 21:01:30 +00:00
Ian Lance Taylor
a8c5219b5e unix: rename XDPUmemReg field back to Size
When the Linux-specific XDPUmemReg struct was originally added
(CL 136695) the only field with a prefix was chunk_size,
so cgo rewrote the field to Size. Later Linux added a tx_metadata_len
field, which caused cgo to to leave the chunk_size field as Chunk_size
(CL 577975).

However, existing code, specifically gvisor, refers to the field
as Size. So go back to Size so that existing code will continue
to work.

This does unfortunately mean that people who used the struct since CL
577975 in April, 2024 will have to adapt. There doesn't seem to be a
perfect solution here. But we've had Size since September, 2018,
so let's stick with that.

Change-Id: Ib11edfbf98ce3a9e1a909194f200a39ddfe6f8e0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/607876
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2024-08-22 21:00:49 +00:00
database64128
59665e5b43 unix: add Connectx for darwin
connectx(2) can be used to initiate a connection with TCP Fast Open.

Change-Id: I113ee4dede7df1c01e16a0c07fec2b384b266cb0
GitHub-Last-Rev: 31665b9ad3
GitHub-Pull-Request: golang/sys#215
Reviewed-on: https://go-review.googlesource.com/c/sys/+/606155
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-08-20 16:08:27 +00:00
Joon Lee
a0c72efe2d unix: add f_flag member flags on z/OS
This change adds the constants `ST_RDONLY` and `ST_NOSUID` to a z/OS-specific file.

Change-Id: Ifb78124d93b60a10f10b8169d1bb73dce074e760
GitHub-Last-Rev: 952cf1bc7f
GitHub-Pull-Request: golang/sys#214
Reviewed-on: https://go-review.googlesource.com/c/sys/+/606877
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-08-19 21:41:29 +00:00
Meng Zhuo
c64c51db65 unix: update riscv64 hwprobe to Linux kernel 6.10
Change-Id: Ic74816df459b17302a3ba746060b49e987e5da5c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/604435
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-08-16 23:42:36 +00:00
Mauri de Souza Meneguzzo
da77c6b1d1 unix: sync minimum Linux Kernel version with requirements page
Change-Id: I306728f5bf19955177365fd9afcc4c8678b6f81f
GitHub-Last-Rev: cf6f9c7b19
GitHub-Pull-Request: golang/sys#213
Reviewed-on: https://go-review.googlesource.com/c/sys/+/604136
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-08-12 17:41:49 +00:00
Mauri de Souza Meneguzzo
914deed708 unix: add missing ETHTOOL_FLAG_ constants
Some constants were removed in CL 600516 that included changes for the
Linux kernel 6.10.

This kernel version moved C defines to an enum ethtool_header_flags that
was not picked up by the mkall.sh script.

For enums, there is a perl script that needs to be run manually, and the
output must be added by hand to the list of constants in unix/linux/types.go.

See https://elixir.bootlin.com/linux/v6.10.3/source/include/uapi/linux/ethtool_netlink.h#L120

Fixes golang/go#68761

Change-Id: Idb189886d257d0fe66a4e832757a469e17f86c34
GitHub-Last-Rev: 08b8ef571d
GitHub-Pull-Request: golang/sys#212
Reviewed-on: https://go-review.googlesource.com/c/sys/+/604098
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-08-07 23:18:19 +00:00