Tobias Klauser
fae7ac547c
unix: add constants and types to work with Linux loop devices
...
Change-Id: I0996df39a561b50822a6e42e770d96421d6b4965
Reviewed-on: https://go-review.googlesource.com/c/sys/+/185498
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2019-07-12 06:29:09 +00:00
Tobias Klauser
6ec70d6a55
unix: update Dockerfile to Linux 5.2 and Go 1.13beta1
...
Change-Id: I1a63f6ae5fe6b8b6fb4f493837b12dbe3c2860d4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/185497
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2019-07-10 14:34:15 +00:00
Tobias Klauser
943d5127bd
unix: add support to get/set Linux capabilities
...
Add wrappers for Getcap/Setcap on Linux as well as some related types
and consts.
Change-Id: I07764c2e64717214850ea3cbdc238e313d1e38c4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/183218
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2019-06-21 15:33:39 +00:00
Tobias Klauser
abf6ff7781
unix: add MCAST_* constants on linux
...
This will also add two BPF_* consts which weren't added as part of
CL 174978 because they were generated before the Linux version update
in CL 175158.
Change-Id: I5dfecbecb9d94b56d01490a5f17f2250ad5b30d4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/178658
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2019-05-24 12:25:48 +00:00
Lehner Florian
12bbe5a7a5
unix: add BPF constants on Linux
...
Change-Id: Ie43daa8ba56ad1e57ddbb8ddd47f83b363fe75b4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/174978
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2019-05-08 10:04:23 +00:00
Tobias Klauser
2953c62de4
unix: update Dockerfile to Linux 5.1
...
Also add KexecFileLoad on linux/arm now that is has SYS_KEXEC_FILE_LOAD.
Change-Id: I519bc2f611b511af994e1c7bbaa07f68cd615ef4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/175158
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-05-07 05:39:17 +00:00
Matt Layher
18eb32c0e2
unix: add Linux crypto configuration API constants and types
...
Change-Id: I447150cb60b5580cee77d23c0dae2244803e92ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/173660
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-04-24 17:57:32 +00:00
Tobias Klauser
e844e0132e
unix: update Dockerfile to Go 1.12 and Linux 5.0
...
Also enable KexecFileLoad on linux/{arm64,riscv64} now that they have
SYS_KEXEC_FILE_LOAD.
Change-Id: I1c52d09a1a617794f2df697e4966c4c24a166611
Reviewed-on: https://go-review.googlesource.com/c/sys/+/164997
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-03-04 15:46:30 +00:00
Dominik Honnef
c2f5717e61
unix: add fanotify API on Linux
...
This teaches unix/mksyscall.go about mapping uint64 to syscall
arguments, similar to existing handling of int64.
Change-Id: I536b4b09bbf6a8e3016565a4a04d2b9d32cbc624
Reviewed-on: https://go-review.googlesource.com/c/164664
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2019-03-03 19:25:50 +00:00
Tobias Klauser
41f3e65849
unix/linux: update Dockerfile to glibc 2.29 and Go 1.12beta2
...
Drop the manually defined *_XDP constants which were added to glibc.
Install python3 instead of python because glibc's confugure script now
requires at least 3.4.
Change-Id: Ic19ff4d8aa4dbadeb5438e331ccafeafc2cc9925
Reviewed-on: https://go-review.googlesource.com/c/160957
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-02-04 20:37:06 +00:00
Tobias Klauser
afcc84fd75
unix: add RND* ioctl consts on Linux
...
Change-Id: I79c721d0f4fe097daf096dc7404675aa3048bf6a
Reviewed-on: https://go-review.googlesource.com/c/160757
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2019-02-01 15:26:29 +00:00
Tobias Klauser
054c452bb7
unix: add socket error queue constants and types from linux/errqueue.h
...
Also add additional packet timestamping constants and types defined
in the same header.
Change-Id: I4280f925b46e229f4c3a83a7fee4612592314016
Reviewed-on: https://go-review.googlesource.com/c/158761
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-01-22 07:17:31 +00:00
Tobias Klauser
a457fd0364
unix: add Signalfd on linux
...
Also add the SFD_* constants and SignalfdSiginfo type.
Change-Id: I3415c212b85c9d5a940ba2bf70f43739a2630d78
Reviewed-on: https://go-review.googlesource.com/c/157897
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-01-15 15:29:22 +00:00
Sebastian Schmidt
2be5172556
unix: add ClockNanosleep and TIMER_ABSTIME
...
This adds the ClockNanosleep syscall and the TIMER_* constants;
currently only TIMER_ABSTIME for specifying an absolute timestamp.
Change-Id: Ic8d857eb92818529aadab569cd8646a19bb9c055
Reviewed-on: https://go-review.googlesource.com/c/157658
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2019-01-14 13:03:36 +00:00
Tobias Klauser
82a175fd15
unix/linux: update Dockerfile to Linux Kernel 4.20
...
Change-Id: Iadc92b5afd18a5c1df0bc42b0d6f52f0b768b47a
Reviewed-on: https://go-review.googlesource.com/c/155979
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-01-02 15:56:01 +00:00
David Anderson
ec83556a53
unix: add ioctl definitions for PPP interfaces.
...
Change-Id: I76b53563e3f029d1fbaad39acd5af73df278343e
GitHub-Last-Rev: b0aff54248
GitHub-Pull-Request: golang/sys#24
Reviewed-on: https://go-review.googlesource.com/c/150317
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2018-11-19 19:55:03 +00:00
Tobias Klauser
731415f00d
unix: add kernel module load/unload syscalls on Linux
...
InitModule loads a kernel module from an ELF image. FinitModule loads a
kernel module from a file descriptor. DeleteModule unloads a kernel
module.
These syscalls require the CAP_SYS_MODULE capability.
See http://man7.org/linux/man-pages/man2/init_module.2.html and
http://man7.org/linux/man-pages/man2/delete_module.2.html for details.
Also drop deprecated syscalls related to kernel modules from the list
of unimplemented syscalls.
Change-Id: I131e17f02c5617640f5f4073982d2b27a6d78bbf
Reviewed-on: https://go-review.googlesource.com/c/144173
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-10-26 06:49:43 +00:00
Tobias Klauser
8a28ead16f
unix: update Dockerfile to Linux 4.19
...
Change-Id: I58c2cfb11ddd5ce731a880c0c63790092052f130
Reviewed-on: https://go-review.googlesource.com/c/143697
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-10-22 13:44:30 +00:00
Tobias Klauser
f81de40a84
unix: add KexecFileLoad on linux/{amd64,ppc64x,s390x}
...
Add a wrapper for the kexec_file_load syscall on the architectures that
implement it (amd64, ppc64x, s390x). See
http://man7.org/linux/man-pages/man2/kexec_file_load.2.html
Change-Id: Ie29f871902176610a6ba7ed0a7bcc95c10eb172b
Reviewed-on: https://go-review.googlesource.com/c/140037
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-10-05 13:07:39 +00:00
Matt Layher
d47a0f3392
unix: implement Linux AF_XDP sockets
...
Provides access to the Linux AF_XDP socket family. For more
information on AF_XDP, see:
https://www.kernel.org/doc/html/latest/networking/af_xdp.html .
Change-Id: I7efb82c4a67da3e15932e3c0d882f0bad7ba16ef
Reviewed-on: https://go-review.googlesource.com/136695
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-09-21 16:39:48 +00:00
Tobias Klauser
ee1b12c67a
unix: add MemfdCreate on Linux
...
Add a wrapper for the memfd_create syscall on Linux. See
http://man7.org/linux/man-pages/man2/memfd_create.2.html for more
information.
Also add the corresponding MFD_* constants to be used in the flags
argument.
Change-Id: Ib30a007e15575a38ecf204601ffede9c913799b6
Reviewed-on: https://go-review.googlesource.com/135915
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-09-18 15:37:33 +00:00
Tobias Klauser
ebe1bf3edb
unix: add SYNC_FILE_RANGE_* constants on Linux
...
These are usefule to specify SyncFileRange's flags argument.
Change-Id: I1726c3adf55aaebac61beed09d39a48a8e040a93
Reviewed-on: https://go-review.googlesource.com/133475
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-09-05 08:04:54 +00:00
Tobias Klauser
4910a1d54f
unix: add UBI ioctl constants on Linux
...
Change-Id: Icde91c6504cd45d78208c6041bf6dc097d2d8334
Reviewed-on: https://go-review.googlesource.com/131235
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-08-24 14:33:01 +00:00
Tobias Klauser
4e1fef5609
unix: update Dockerfile to Linux 4.18, glibc 2.28 and Go 1.11beta3
...
Including linux/stat.h in mkerrors.sh is no longer necessary because the
statx types and constants were added to the glibc headers.
Change-Id: I643c35fd2da76dd2c15015556658d7fa862249c4
Reviewed-on: https://go-review.googlesource.com/129100
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-08-14 07:20:32 +00:00
Tobias Klauser
2be389f392
unix: add Renameat2 on Linux
...
Renameat2 is Linux-specific and allows to pass an additional flags
argument to the renameat syscall. Also add the corresponding RENAME_*
flag mask values.
Change-Id: Ib4baa46fdd0b07ccd0988ac624862ce69d5c3ad5
Reviewed-on: https://go-review.googlesource.com/127763
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-08-06 19:25:00 +00:00
Casey Callendrello
3dc4335d56
unix: add Linux network namespace constants
...
This adds the NETNSA constants from net_namespace.h, used for creating
and querying network namespace IDs.
Fixes golang/go#26330
Change-Id: I786c4c4771be3eddc4fdb830a52e128aa1a2b9fd
Reviewed-on: https://go-review.googlesource.com/124436
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-08-01 22:11:39 +00:00
Tobias Klauser
9e6071e1da
unix: follow convention for generated code comment
...
Follow the convertion (https://golang.org/s/generatedcode ) for generated
code.
Change-Id: I27899b24366d5c0d2c5574b5eaf3d7e0babc8909
Reviewed-on: https://go-review.googlesource.com/118820
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-06-14 13:37:17 +00:00
Michael Stapelberg
56ede360ec
unix: add rtc defines and types
...
Change-Id: I280fc3b2cd3402c40f2840d152bac2fa288f48a0
Reviewed-on: https://go-review.googlesource.com/118661
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-06-13 17:11:35 +00:00
Matt Layher
a9e25c09b9
unix: update Dockerfile to Ubuntu 18.04, Linux 4.17, and Go 1.10.3
...
The code has been regenerated using the updated software versions.
Change-Id: Ic2af968d4d8cbf3ab31e5bca1d6640642eb7115a
Reviewed-on: https://go-review.googlesource.com/118255
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-06-12 14:22:14 +00:00
Michael Stapelberg
31355384c8
unix: add nftables defines and types
...
Change-Id: I55efe06ec81e891ec3872405ba75c7eb9ce4e635
Reviewed-on: https://go-review.googlesource.com/114518
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2018-05-25 06:20:15 +00:00
Tobias Klauser
7c87d13f8e
unix: add tpacket types and constants on Linux
...
Change-Id: I4f2fd8a7c899403f545d8dc73fec2ebbb0b322c0
Reviewed-on: https://go-review.googlesource.com/113035
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-05-14 14:36:08 +00:00
Tobias Klauser
9950ad118b
unix: add statfs and filesystem magic constants on Linux
...
Fixes golang/go#25341
Change-Id: I79cb4c77b771e005eb27d4e495ac6a7491e2e66e
Reviewed-on: https://go-review.googlesource.com/112696
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-05-11 13:39:06 +00:00
Tobias Klauser
6f686a352d
unix: add ErrnoName and SignalName
...
Add ErrnoName and SignalName to get errno and signal name strings from
syscall.Errno and syscall.Signal values, respectively.
This repurposes the errors and signals vars (because they are not used
within x/sys/unix currently) and turns them into slices of struct,
containing errno/signal number, name and description. ErrnoName and
SignalName can then be trivially implemented using sort.Search.
Renaming errors to errorList additionaly allows to avoid package aliases
for the errors package.
Fixes golang/go#25134
Change-Id: Ie195872793f44c437f0f175ccfaa13a2546338c5
Reviewed-on: https://go-review.googlesource.com/110875
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-05-04 06:42:12 +00:00
Matt Layher
79b0c68887
unix: add Linux block device ioctl types and constants
...
These types and constants are taken from hdreg.h, and will enable
querying and manipulation of block devices on Linux.
Fixes golang/go#24971
Change-Id: Iafe8f81ba7ab9f1e127743dab6a9fb1912874a5c
Reviewed-on: https://go-review.googlesource.com/108455
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-04-20 14:53:19 +00:00
Tobias Klauser
3b87a42e50
unix: update Dockerfile to Linux 4.16 and Go 1.10.1
...
Also avoid installing recommended packages if possible to silightly
reduce the Docker image size.
Change-Id: I7a3ea33f6501cf063b1aa0324b5928f96241d048
Reviewed-on: https://go-review.googlesource.com/105077
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-04-06 13:57:29 +00:00
Tobias Klauser
c1138c84af
unix: update to Linux 4.15, glibc 2.27 and Go 1.10
...
Also use the Ubuntu 17.10 docker image and additionally install bison
which is needed by the glibc build.
The resulting change only consists of a few additional constants.
Exclude the X86_CR3_PCID_NOFLUSH constant on 386 and amd64, though.
Change-Id: I0a9b8959146273ff3b259c17bb616625a9ac8278
Reviewed-on: https://go-review.googlesource.com/96255
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-02-22 21:03:05 +00:00
Tobias Klauser
fff93fa7cd
unix: add Statx on Linux
...
statx(2) allows to get enhanced file status information (not currently
available through the existing stat syscalls), lightweight stat,
heavyweight stat. The Statx_t type used by Statx has consistent field
sizes on all arches (with year-2038-capable timestamps) and is closer to
the BSD implementation of Stat_t.
See http://man7.org/linux/man-pages/man2/statx.2.html for details. The
syscall was added in Linux kernel 4.11.
See https://github.com/tklauser/statx for an example of how this
function and types can be used to report stat(1)-like file status
information.
Change-Id: I9e9642b5b42a393f94fd532453888ce9ba4f0003
Reviewed-on: https://go-review.googlesource.com/87555
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2018-01-15 08:58:44 +00:00
Tobias Klauser
a22539bf85
unix: add vmsockets ioctl constant on Linux
...
To be used e.g. in github.com/mdlayher/vsock
Change-Id: I52148a6e6c53c022c07e2cc8bf7348a96445c17b
Reviewed-on: https://go-review.googlesource.com/76193
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2017-11-07 15:03:14 +00:00
Tobias Klauser
52c393dd0c
unix: update Dockerfile to go 1.9.2
...
Update go to 1.9.2 in the Dockerfile used to generate the Linux go files.
The update also changes some zerror definitions: RLIM_INFINITY is
assigned to Rlimit.{Cur,Max} which are both uint64 on all architectures.
PR_SET_PTRACER_ANY is used with Prctl which expects an uintptr.
With the current version, an "constant -1 overflows uint64" error would
result if these constants were used directly without type conversion.
Change-Id: Iefd23a44e983b4fcf210121776531df225014112
Reviewed-on: https://go-review.googlesource.com/73873
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-10-27 13:58:47 +00:00
Michael Stapelberg
a57a2b53a1
unix: add watchdog constants on Linux
...
To be used e.g. in
2e60d5b8c8
Change-Id: If79ffec9021dc79375c861a0ddd9dd443adb4692
Reviewed-on: https://go-review.googlesource.com/72375
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-10-23 17:49:30 +00:00
Tobias Klauser
ff8cd6cb4f
unix: add UTIME_* constants on Linux
...
They might be used as special values in struct Timespec. See
http://man7.org/linux/man-pages/man2/utimensat.2.html for details.
Change-Id: I1c2d6d7731ca7f077d033e51ee6421a4f2cfbb89
Reviewed-on: https://go-review.googlesource.com/72376
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-10-23 17:48:59 +00:00
Joe Richey joerichey@google.com
31e1fafe95
unix: update Linux to v4.13 kernel and v2.26 glibc
...
This change updates the Linux symbols to correspond to v4.13 of the
kernel and v2.26 of glibc. To get everything building correctly, newer
versions of the build tools are required. Instead of trying to get an
Ubuntu 17.10 docker image working, we just add Artful sources to
/etc/apt/sources.list to get a similar effect.
Now that the kernel UAPI is updated, FS_MAX_KEY_SIZE and fscrypt_key no
longer need to be manually declared, as they are now in the proper
kernel headers.
Change-Id: I5f14c99fd70b43dbb8b44e05f53e4e9f09c9a345
Reviewed-on: https://go-review.googlesource.com/61771
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-09-07 22:07:22 +00:00
Matt Layher
ab9e364efd
unix: add generic netlink types and constants on Linux
...
Generic netlink is a generalized netlink family which enables a series
of different communication channels to be multiplexed on a single
netlink family.
For more information, please see: https://lwn.net/Articles/208755/ .
Fixes golang/go#21682 .
Change-Id: I2095150e06471f4a0e1322fba669573aa8f0a9b1
Reviewed-on: https://go-review.googlesource.com/59931
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-08-29 18:59:17 +00:00
Matt Layher
22e23b7432
unix: add taskstats type and constants on Linux
...
Taskstats is a netlink-based interface for sending per-task and
per-process statistics from the kernel to userspace.
For more information, please see:
https://www.kernel.org/doc/Documentation/accounting/taskstats.txt .
Fixes golang/go#21616 .
Change-Id: I7d4b8035aa8e993074d61911d9a8c3a3e61c9b2e
Reviewed-on: https://go-review.googlesource.com/59050
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-08-25 17:12:00 +00:00
Tobias Klauser
abf9c25f54
unix: add additional socket ioctl constants on Linux
...
Add additional SIOC* socket ioctl constants from linux/sockios.h on
Linux.
Change-Id: I76f8c9d9d0015d398ee52844b3c9f506cd182329
Reviewed-on: https://go-review.googlesource.com/47950
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-07-10 16:16:58 +00:00
Tobias Klauser
739734461d
unix: add perf event ioctl constants on Linux
...
Add the PERF_EVENT_IOC_* constants on Linux which are used to
enable/disable/configure perf events. Also add the PERF_IOC_FLAG_GROUP
constant which might be using as part of the ioct argument. See section
"perf_event ioctl calls" in
http://man7.org/linux/man-pages/man2/perf_event_open.2.html
Change-Id: I92fb8f6ef5cc53711f00db566d8e277cdf1cd607
Reviewed-on: https://go-review.googlesource.com/47770
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-07-07 16:14:08 +00:00
Tobias Klauser
90796e5a05
unix: add UMOUNT_NOFOLLOW constant
...
Add the UMOUNT_NOFOLLOW on Linux, available since Linux 2.6.34. See
http://man7.org/linux/man-pages/man2/umount.2.html and
https://github.com/torvalds/linux/commit/db1f05bb85d796
Fixes golang/go#18316
Change-Id: I5c7dafdbb311f287b6cf290aa8a0eaf2940b9834
Reviewed-on: https://go-review.googlesource.com/46771
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-06-27 16:08:55 +00:00
Tobias Klauser
50298aa7a9
unix: add seccomp mode constants
...
Add the SECCOMP_MODE_DISABLED, SECCOMP_MODE_STRICT and
SECCOMP_MODE_FILTER constants to be used with the PR_SET_SECCOMP prctl.
See http://man7.org/linux/man-pages/man2/prctl.2.html
Change-Id: Iacd1ffaeced4ae95e780a09038d35b763778a3d3
Reviewed-on: https://go-review.googlesource.com/46691
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2017-06-26 17:54:06 +00:00
Tobias Klauser
8d3b82dc77
unix: add Setxattr constants
...
Add the XATTR_CREATE and XATTR_REPLACE constants, to be used in the
flags parameter of Setxattr/Lsetxattr. See
http://man7.org/linux/man-pages/man2/setxattr.2.html
Fixes golang/go#14454
Change-Id: I868ac019fe3be755e0f6f8bff734f843ba602ee9
Reviewed-on: https://go-review.googlesource.com/46690
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2017-06-26 16:26:13 +00:00
Tobias Klauser
0b25a408a5
unix: add Eventfd function on Linux
...
Add support for the eventfd2 syscall on Linux.
Use the eventfd2 syscall instead of eventfd, as the latter does not
provide a flags argument and glibc also maps its eventfd() function to
the eventfd2 syscall, see the Notes section in
http://man7.org/linux/man-pages/man2/eventfd.2.html
Also add the corresponding flags values EFD_CLOEXEC, EFD_NONBLOCK and
EFD_SEMAPHORE.
Change-Id: Ia8c99e68d5966ab5c7ebe7e45423943fd7d8214e
Reviewed-on: https://go-review.googlesource.com/45093
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-06-08 16:48:03 +00:00