Commit Graph

141 Commits

Author SHA1 Message Date
Tobias Klauser
f9fddec55a unix/linux: update Dockerfile to kernel 5.10 and Go 1.15.6
Also include some newly added consts.

Change-Id: Iaf9fad92a4cbbf9f1e97ed544116bd93525dddde
Reviewed-on: https://go-review.googlesource.com/c/sys/+/277254
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-14 21:06:02 +00:00
Matt Layher
a01c418693 unix: add Linux MPLS tunnel constants for use with rtnetlink APIs
Change-Id: Ic990c616c416e7bfe98e68eb74bab2810a1126ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271137
Trust: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-11-18 18:29:58 +00:00
Matt Layher
ade898ef86 unix: add Linux lwtunnel constants for use with rtnetlink APIs
Change-Id: Ibe39b315321c18916870dcfc97b083a18b91be2b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271077
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-11-18 18:01:33 +00:00
Tobias Klauser
215b40eba5 unix/linux: update Dockerfile to Go 1.15.4
No changes in generated files.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Change-Id: Ibbb81f8ef48d43d7fb620fec57c3ac779ebf0e11
Reviewed-on: https://go-review.googlesource.com/c/sys/+/268357
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-11-09 16:54:25 +00:00
Lehner Florian
da207088b7 unix: update IFLA consts on linux
Update the IFLA_* consts from /usr/include/linux/if_link.h

Change-Id: I8a751f9237c78737691fb425dcbc4be6e52364d9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/266977
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
2020-11-01 10:28:59 +00:00
Ben Cartwright-Cox
0fcbb8f492 unix: add linux constants and types for PPS devices ioctl's
After trying to implement Pulse Per Second devices
in go, I found that the ioctl values and structs
where not in the unix package yet:

~# strace ppstest /dev/pps0 |& grep ioctl
ioctl(3, PPS_GETPARAMS, 0xbee63b18)     = 0
ioctl(3, PPS_GETCAP, 0xbee63b84)        = 0
ioctl(3, PPS_GETPARAMS, 0xbee63b18)     = 0
ioctl(3, PPS_SETPARAMS, 0xbee63b18)     = 0
ioctl(3, PPS_FETCH, 0xbee63b00)         = 0
ioctl(3, PPS_FETCH, 0xbee63b00)         = 0
ioctl(3, PPS_FETCH, 0xbee63b00)         = 0
ioctl(3, PPS_FETCH, 0xbee63b00)         = 0
ioctl(3, PPS_FETCH, 0xbee63b00)         = 0

This commit should add them.

Change-Id: If1225ab7c4c38aad5d8ae841d1fdebfa45055549
GitHub-Last-Rev: c1469112b8
GitHub-Pull-Request: golang/sys#90
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265217
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-10-27 14:07:54 +00:00
Ian Lance Taylor
e3ed0017c2 unix/linux: update to Go 1.15.3 release
Does not cause any changes to generated files.

Change-Id: I635230441d4c48d1f649ca5c7cca073974e36b60
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262457
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
2020-10-15 00:08:50 +00:00
Tobias Klauser
56aa3af1a1 unix: update Dockerfile to Linux 5.9 and Go 1.15.2
Also add some newly added IFLA_* and PERF_* consts and adjust the
renamed NFTA_LIST_UNPEC const (see torvalds/linux@da9125df85).

Change-Id: Ic37f39e5b5bfe063ae6d7701de05ced07e62abfb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261457
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
2020-10-13 06:48:17 +00:00
Matt Layher
ac719f4daa unix: fix typo in PERF_TYPE_HARDWARE introduced in CL 259477
Change-Id: Iee2a067673309abc6b80d3cc96ac49d9d6b52865
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259799
Trust: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-10-06 15:56:30 +00:00
Lehner Florian
765f4ea38d unix: update PERF consts on linux
Update the PERF_* consts from /usr/include/linux/perf_event.h.

Change-Id: I2dfa09445547682fa7ed99b385476319e8493c27
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259477
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-10-05 06:50:44 +00:00
Matt Layher
f6757f2700 unix: add Linux watchdog structures and missing constants
This CL also adds the type-safe wrappers IoctlGetWatchdogInfo
and IoctlWatchdogKeepalive around the raw ioctl interface.

Change-Id: I98e3970807b28832e49524700b17b6b6f75d91ed
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259497
Run-TryBot: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Terin Stock <terinjokes@gmail.com>
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
2020-10-04 23:06:29 +00:00
Tobias Klauser
aee5d888a8 unix: add IoctlFile{Clone,CloneRange,DedupeRange} on linux
Add wrappers for the FICLONE, FICLONERANGE and FIDEDUPERANGE ioctl
operations on linux. See the ioctl_ficlone(2), ioctl_ficlonerange(2) and
ioctl_fideduperange(2) man pages for details.

Change-Id: If3bad98facc362d4f7524e8d7a128815e9e2f204
Reviewed-on: https://go-review.googlesource.com/c/sys/+/256000
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-22 07:02:32 +00:00
Kir Kolyshkin
eff7692f90 unix: add openat2 for linux
openat2 is a new syscall added to Linux 5.6. It provides a superset of
openat(2) functionality, extending it with flags telling the kernel how
to resolve the paths.

For more info, see https://lwn.net/Articles/803237/

NOTE that this is a second attempt to add the call; the previous one
(https://golang.org/cl/227280) was reverted
(https://golang.org/cl/227846) due to the test case failure on ARM
(https://golang.org/issue/38357).

This CL has the test case reworked to be less assumptive to the testing
environment. In particular, it first tries if the most simplistic
openat2() call succeeds, and skips the test otherwise. It is done that
way because CI can be under under different kernels and in various
envrionments -- in particular, Docker+seccomp can result in EPERM from a
system call (which is not expected otherwise).

For previous discussions about the test case, see
https://golang.org/cl/227865.

Change-Id: I4276cf13dc29ecbdbdc9c58da0f76270f585a67f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/253057
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-09-09 08:10:42 +00:00
Tobias Klauser
d2e65c121b unix: update Dockerfile to Go 1.15.1
Change-Id: Ia1a7cecc953968e04e710b065668ec9d06c2c1d3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/253437
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-09-08 13:41:30 +00:00
Stephan Klatt
8dfe04af21 unix: add constants for raw CAN sockets
Fixes golang/go#41091

Change-Id: Icae9ad639599474144b286510f744f4a283aba06
GitHub-Last-Rev: 541bdb97bb
GitHub-Pull-Request: golang/sys#83
Reviewed-on: https://go-review.googlesource.com/c/sys/+/251357
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-08-28 15:00:25 +00:00
Ricardo Pchevuzinske Katz
7c7a221682 unix: add nftables_compat defines and types
Some types from nftables compatibility header are missing
in unix package and this change adds those missing types

Fixes golang/go#40898

Change-Id: I9a33aa4e4c6e1938fa40900ac74c1fc07ed00df2
GitHub-Last-Rev: 57a6fa7ca7
GitHub-Pull-Request: golang/sys#80
Reviewed-on: https://go-review.googlesource.com/c/sys/+/249237
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-08-19 14:11:00 +00:00
Paweł Szulik
9a32b3aa38 unix: add missing PERF_SAMPLE values
This adds missing `sample_type` options from: https://man7.org/linux/man-pages/man2/perf_event_open.2.html

Change-Id: Icc17151f973d9a9f327bd6ca064e94ccc29e741c
GitHub-Last-Rev: 46e519b84c
GitHub-Pull-Request: golang/sys#79
Reviewed-on: https://go-review.googlesource.com/c/sys/+/249157
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-08-19 03:55:08 +00:00
Christian Svensson
3ff754bf58 unix: add AF_IUCV and SockaddrIUCV
On z series machines the IUCV address family is used to communicate
between parts of the machine and other VMs that may be running.

This adds support for addressing these services using AF_IUCV.

Fixes golang/go#40826

Change-Id: I3aba3beb5cb98d9c548d7abc874ca86fb25c8a52
GitHub-Last-Rev: b964d186b4
GitHub-Pull-Request: golang/sys#76
Reviewed-on: https://go-review.googlesource.com/c/sys/+/248777
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-08-17 08:59:35 +00:00
Anatol Pomozov
3d37ad5750 unix: add dm-ioctl constants and types
This interface is used by devicemapper framework to manage its block
devices.

Change-Id: If86a679461867dac18b56bdf005567ffc4b7f951
Reviewed-on: https://go-review.googlesource.com/c/sys/+/247437
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-08-14 20:00:57 +00:00
Tobias Klauser
6a926be9bd unix: update Dockerfile to Go 1.15
Change-Id: Ic3deb101db06686ccecdda679e715782df11b895
Reviewed-on: https://go-review.googlesource.com/c/sys/+/248137
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-08-12 15:58:32 +00:00
Tobias Klauser
1b9f1253b3 unix: update Dockerfile to Go 1.15rc2
Change-Id: I830933bb7d6b2e6683f6f7b135d015f54fbcaded
Reviewed-on: https://go-review.googlesource.com/c/sys/+/247657
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-08-10 15:15:05 +00:00
Tobias Klauser
1030fc2bf1 unix: update BPF consts to Linux kernel 5.8
Change-Id: I81fe749808d48bfafdaf55c266168f9d3a773294
Reviewed-on: https://go-review.googlesource.com/c/sys/+/247158
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-08-08 12:01:58 +00:00
Tobias Klauser
5acd03effb unix: update Dockerfile to glibc 2.32
Change-Id: Ia5ebb34a743c6e676d3cb2febaefc55afa9fc7ac
Reviewed-on: https://go-review.googlesource.com/c/sys/+/247157
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-08-06 12:55:47 +00:00
Tobias Klauser
fcf3340312 unix: add SI_LOAD_SHIFT on Linux
This is used to convert the loadavg values read using Sysinfo into
float.

Change-Id: I3866c17c908a463373db89690152acc720c73ef3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/246897
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-08-06 06:08:41 +00:00
Tobias Klauser
fd5f0c170a unix: update Dockerfile to Linux 5.8
Change-Id: If6643e7e092c5d482f9cefe838640ebcec22188e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/246417
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-08-03 15:09:36 +00:00
Tobias Klauser
2d971f7391 unix: update Dockerfile to Go 1.15rc1
This verifies that go tool cgo -godefs in Go 1.15 is able to generate all
consts and types in this package.

Change-Id: Ic63d15427f27527d7a6f8dc780ab560cde434bc8
Reviewed-on: https://go-review.googlesource.com/c/sys/+/244977
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-07-27 15:44:30 +00:00
Tobias Klauser
8d3cce7afc unix: update Dockerfile to Linux 5.7 and Go 1.14.4
Some BPF related macros were converted to enum values, so add them to
linux/types.go

Change-Id: I6fa9cc17b6ff3be91f3aa0b7ef2cfe19faf069bd
Reviewed-on: https://go-review.googlesource.com/c/sys/+/236097
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-06-02 10:08:48 +00:00
Maxim Pugachev
1f56873058 unix: add support for timerfd syscalls on Linux
timerfd_create, timerfd_gettime and timerfd_settime syscalls have been added.
Fixes golang/go#38733

Change-Id: I306d68103b6efb2515c74f384646210c4b68f66e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/230798
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-04-30 08:24:07 +00:00
Maxim Pugachev
593003d681 unix: switch to Ubuntu 20.04 in Dockerfile
ubuntu:19.04 is not supported anymore and update repos are unavailable, so
build process on Linux just fails. Latest stable ubuntu:20.04 works fine.
Also, DEBIAN_FRONTEND=noninteractive env variable has been added to prevent
unneeded questions during installation of tzdata package.

Fixes golang/go#38724

Change-Id: I2d7730d83fc051de2879d4f97fc7942090d2574c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/230577
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-04-28 20:04:54 +00:00
Andrew Bonventre
669c56c373 Revert "unix: add openat2 for linux"
This reverts CL 227280.

Reason for revert: causes failures on ARM builders

Fixes golang/go#38357

Change-Id: Ie80ff37205ff12c3b74d00ff46b7222e34363d86
Reviewed-on: https://go-review.googlesource.com/c/sys/+/227846
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-04-13 16:56:38 +00:00
Tobias Klauser
59c9f1ba88 unix: update Dockerfile to Go 1.14.2
Go 1.14.2 fixes golang/go#37621 which allows the Go types to be
generated properly again.

Change-Id: I556c7dd37713d68ef6aad79adc33b2d227e8bbd3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/227678
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-04-09 09:22:40 +00:00
Tobias Klauser
e3b113bbe6 unix: add nexthop types and consts
Fixes golang/go#38249

Change-Id: Ie8149ac16d09e76d6c5aa4d47edd947a647c381f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/227357
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-04-06 15:51:08 +00:00
Kir Kolyshkin
c6e801f48b unix: add openat2 for linux
openat2 is a new syscall added to Linux 5.6. It provides a superset
of openat(2) functionality, providing a way to extend it in the future,
and (for now) adding flags telling the kernel how to resolve the path.

For more info on openat2, see https://lwn.net/Articles/803237/

A primitive test case is added to check that Openat2 works as
it should. Tested to skip on kernel 5.5 and pass on 5.6.

Change-Id: Ib8bbd71791762f043200543cecdea16d2fd3c81d
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Reviewed-on: https://go-review.googlesource.com/c/sys/+/227280
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-04-06 11:34:30 +00:00
Tobias Klauser
c3d8025017 unix: update Dockerfile to Linux 5.6, and Go 1.13.9
We cannot update to Go 1.14 yet, since cgo code generation for certain
types is broken due to golang/go#37621.

Change-Id: I7b60d23ff4e79a7bb7fa4f0e0625893e4eff81f1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/226577
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-03-31 12:40:33 +00:00
Tobias Klauser
9dae0f8f57 unix: add fs-verity consts and types
See https://www.kernel.org/doc/html/latest/filesystems/fsverity.html for
details.

Change-Id: I5b02d0ef84f21d05ea3f1ac8e905232733ea3739
Reviewed-on: https://go-review.googlesource.com/c/sys/+/225698
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-03-27 17:32:47 +00:00
Tom Parkin
9a0dfc3c55 unix: implement L2TPIP socket address on Linux
Add constants and types to support IP-encapsulated L2TP/RFC3931
tunnels on Linux systems.

The L2TP subsystem for IP encapsulated tunnels hooks into the inet
kernel code using a specific IP protocol value.  In order to handle
this, anyToSockaddr now has to query the socket protocol type using
GetsockoptInt for the AF_INET and AF_INET6 address families.

Although this change is reasonably simple, unit tests have been added
to validate handling of the new types.

Fixes golang/go#37787

Change-Id: I16ae1e24dcced4ccc6ce6a79a90a5a2f6a560967
GitHub-Last-Rev: ca554ad1b6
GitHub-Pull-Request: golang/sys#60
Reviewed-on: https://go-review.googlesource.com/c/sys/+/223157
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-03-16 20:21:46 +00:00
Tobias Klauser
5c8b2ff675 unix: update BPF consts on linux
Update the BPF_* consts from include/uapi/linux/bpf.h as of Linux 5.5.

Change-Id: I5098fc9e4fc1fb3e6cc2e2f85a8e65b369b6a81c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/221797
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-03-02 15:01:41 +00:00
Johan Jansson
5d559ad92b unix: merge duplicate code in ztypes_linux_*.go
Run mkmerge.go on ztypes_linux_*.go to merge duplicate consts, funcs,
and types into ztypes_linux.go

Please see https://gist.github.com/jupj/639b5cda305d251161fec2304c27c9b9
for a script to validate these changes.

Fixes golang/go#33059

Change-Id: Ic272869fed6bf6bbf3018d3919ae5a6b6bc15bbb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/221320
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-03-01 20:44:00 +00:00
Johan Jansson
2f85c7ec1e unix: merge duplicate code in zsyscall_linux_*.go
Run mkmerge.go on zsyscall_linux_*.go to merge duplicate consts, funcs,
and types into zsyscall_linux.go

Also, run mkmerge.go on zsysnum_linux_*.go; currently there is nothing
to merge.

Please see https://gist.github.com/jupj/639b5cda305d251161fec2304c27c9b9
for a script to validate these changes.

Updates golang/go#33059

Change-Id: I715ada044ee957475669d94b16de059ebb9162d1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/221319
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-03-01 15:39:31 +00:00
Johan Jansson
c5d0d7b4ec unix: merge duplicate code in zerrors_linux_*.go
Run mkmerge.go on zerrors_linux_*.go to merge duplicate consts, funcs,
and types into zerrors_linux.go

Please see https://gist.github.com/jupj/639b5cda305d251161fec2304c27c9b9
for a script to validate these changes.

Updates golang/go#33059

Change-Id: I168b5efc7fd6d2fcf7fc8dfe1ef5eea07f07f9c2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/221318
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-03-01 04:06:27 +00:00
Nikson Kanti Paul
d5e6a3e2c0 unix: add adjtimex return constants
Fixes golang/go#37234

Change-Id: I6deda79bc0b8f34c7bb210b64adabbfff5fe675e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/219697
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-02-23 17:06:10 +00:00
Tobias Klauser
d101bd2416 unix: update Dockerfile to Linux 5.5, glibc 2.31, Go 1.13.7
Change-Id: I6bcbf93132861fb2896c6884e2c7e1c42672ece4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/217477
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-02-02 16:47:22 +00:00
erifan01
ac6580df44 unix: move functions Ptrace{Get|Set}RegSetArm64 to a separate file
CL 204418 adds functions PtraceGetRegSetArm64 and PtraceSetRegSetArm64 to file
zptrace_armnn_linux.go, both of which depend on type Iovec. The definitions of type
Iovec on linux arm and arm64 are different, but file zptrace_armnn_linux.go is
shared by them. So these two functions cause compilation errors on linux arm. This
patch fixes this error by moving these two functions into a separate file.

Fixes golang/go#36032

Change-Id: Ia380bd863895900599c09d4631ed26f204955112
Reviewed-on: https://go-review.googlesource.com/c/sys/+/210322
Run-TryBot: eric fang <eric.fang@arm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-12-10 02:34:23 +00:00
erifan01
bc7efcf3b8 unix: add functions PtraceGetRegSetArm64 and PtraceSetRegSetArm64
Since arm64 GNU/Linux version 2.6.34, PTRACE_GETREGS was replaced by PTRACE_GETREGSET,
in order to get or set the general purpose and floating-point register values,
PTRACE_GETREGSET/PTRACE_SETREGSET request type and a proper "NT_XXX" constant values
should be used. For the sake of not breaking the existing API, we added two functions
PtraceGetRegSetArm64 and PtraceSetRegSetArm64, they take an additional argument "addr",
and use PTRACE_GETREGSET and PTRACE_SETREGSET request types respectively.

Change-Id: I14c55733e15cea4b7d775187b1018fcb2880d6a9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/204418
Run-TryBot: eric fang <eric.fang@arm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-12-06 21:42:22 +00:00
Eric Biggers
63cb32ae39 unix: add new fscrypt declarations from Linux v5.4
Create Go bindings for the updated fscrypt UAPI from Linux v5.4:

- Various new ioctls.  We use the regex FS_IOC_.*ENCRYPTION to match
  both the new and existing fscrypt ioctls.

- Various new structures for passing to the ioctls

- Various new constants named like FSCRYPT_*

- FscryptPolicy was renamed to FscryptPolicyV1.  (But the old name is
  still available for source compatibility.)

- The existing fscrypt-related constants named like FS_* (besides the
  ioctls) were renamed to FSCRYPT_*.  (But the old names are still
  available for source compatibility.)

For reference, see fscrypt.h:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/fscrypt.h?h=v5.4

Fixes golang/go#35856

Change-Id: I48ddd37cfa7c1e0e7eb227baa6f220c848ddc880
Reviewed-on: https://go-review.googlesource.com/c/sys/+/208898
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-11-27 02:17:46 +00:00
Matt Layher
8a8471f7e5 unix/linux: bump Linux and Go versions to latest stable releases
Attempting to upgrade to the Ubuntu 19.10 Docker image results in
failures due to Ubuntu/Debian removing the mips{,64}{,le} cross
compilers, so we stick with 19.04 for now.

Change-Id: Ie75057447889ea1648d638a410e1c35c047b579a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/208737
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-11-26 13:16:56 +00:00
Tobias Klauser
52ab431487 unix: fix EpollEvent padding on mips64{,le}
Like on other 64-bit GOARCHes, EpollEvent needs padding before Fd for
mips64 and mips64le.

Change-Id: I934368ba22ef7bf3a25949649613c2a03928bf83
Reviewed-on: https://go-review.googlesource.com/c/sys/+/207278
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-11-15 15:19:21 +00:00
Matt Layher
195ce5e7f9 unix: add devlink Linux generic netlink API constants
For more information on devlink, see: https://lwn.net/Articles/674867/.

Change-Id: I68815c94160864f4a3d2bb78b2e5d06949d27acf
Reviewed-on: https://go-review.googlesource.com/c/sys/+/203878
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-10-28 16:43:58 +00:00
Lehner Florian
06d7bd2c5f unix: update rtnetlink constants
Change-Id: I21551672b5d8dd3e56c49da69f66dc19b07a5299
Reviewed-on: https://go-review.googlesource.com/c/sys/+/199757
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-10-09 17:02:03 +00:00
Srinidhi Kaushik
aed5e4c7ec unix: add Klogset and related SYSLOG_ACTION_ constants
Adds a new function: Klogset which wraps sys_syslog for
cases where the `bufp` argument is not required and the
argument that follows needs to be passed to the function.

Fixes golang/go#34672

Change-Id: Idf026791ea9265aaca33e78a34fcd490edb8d326
Reviewed-on: https://go-review.googlesource.com/c/sys/+/199278
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-10-05 20:08:04 +00:00