Mark Ryan
3283fc3f61
cpu: add support for detecting RISC-V extensions
...
Add a RISCV64 variable to cpu that indicates both the presence
of RISC-V extensions and performance information about the underlying
RISC-V cores. The variable is only populated with non false values on
Linux. The detection code first attempts to use the riscv_hwprobe
syscall introduced in Linux 6.4, falling back to HWCAP if riscv_hwprobe
is not supported. The patch can detect the C, V, Zba, Zbb and Zbs
extensions. V, Zba, Zbb and Zbs can only be detected on a 6.5 kernel
or later (without backports).
Updates golang/go#61416
Change-Id: I40f92724ee3d337c06bdc559ff0b18a8f6bfda9f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/605815
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Joel Sing <joel@sing.id.au >
Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com >
2024-08-23 10:43:34 +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 >
v0.24.0
2024-08-07 23:18:19 +00:00
database64128
4c7077ec60
windows: add enums for IpAdapterUnicastAddress
...
These are for the enum fields in IpAdapterUnicastAddress.
Change-Id: Ibcb6ce674ab41a94dbe46d394f035208a94b6dae
GitHub-Last-Rev: 1837ff9c32
GitHub-Pull-Request: golang/sys#204
Reviewed-on: https://go-review.googlesource.com/c/sys/+/598895
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: David Chase <drchase@google.com >
2024-08-07 08:50:18 +00:00
Alex Brainman
29298aaa6a
windows: delete TestGetKeyboardLayout
...
According to
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow
GetForegroundWindow can return nil in some circumstances. So
GetForegroundWindow cannot be used in the TestGetKeyboardLayout.
Just delete the test for now.
Fixes golang/go#68671
Change-Id: I7e05ac2f19b1a6310a3f7f690c6d02b0d1f5571e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/602335
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Ayman Bagabas <ayman.bagabas@gmail.com >
2024-08-05 20:31:40 +00:00
Joel Sing
aa1c4c8554
unix: provide Mount on openbsd
...
Note that Mount is already provided for both darwin and linux, with
differing signatures.
Change-Id: Iaddae1769e436aad5125b78e31b2d62d22e45b16
Reviewed-on: https://go-review.googlesource.com/c/sys/+/595735
Reviewed-by: 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 >
v0.23.0
2024-08-03 07:06:10 +00:00
Mauri de Souza Meneguzzo
cde4660eb9
unix: add linux mseal system call
...
The mseal system call was added in Linux 6.10.
See https://lwn.net/Articles/954936 .
Change-Id: Ic812a5d784effbc1f362045ffeb6f7e50ee5f8bb
GitHub-Last-Rev: de3924e954
GitHub-Pull-Request: golang/sys#209
Reviewed-on: https://go-review.googlesource.com/c/sys/+/600518
Reviewed-by: Ian Lance Taylor <iant@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: Michael Knyszek <mknyszek@google.com >
2024-07-29 14:24:59 +00:00
Mauri de Souza Meneguzzo
31ef9e726f
unix: update to Linux kernel 6.10
...
Change-Id: I87cac997e5fad645ae04b8a808063389fc468e5a
GitHub-Last-Rev: 3104aafba8
GitHub-Pull-Request: golang/sys#207
Reviewed-on: https://go-review.googlesource.com/c/sys/+/600516
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2024-07-24 16:33:01 +00:00
Mauri de Souza Meneguzzo
d03a807229
unix: update glibc to 2.40
...
Change-Id: I691cc18fe046600a6192c492cf573c8223aa573e
GitHub-Last-Rev: 7a25e88e86
GitHub-Pull-Request: golang/sys#208
Reviewed-on: https://go-review.googlesource.com/c/sys/+/600517
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: Dmitri Shuralyov <dmitshur@google.com >
2024-07-24 15:35:55 +00:00
Ayman Bagabas
beb594982d
windows: correctly generate GetAce syscall
...
GetAce expects a failretval==0, and we shouldn't call GetLastError on
error.
For golang/go#66850
Change-Id: I812d71b066d56e8285324e70b8b5b5fb42b5ce35
GitHub-Last-Rev: 40cf7508de
GitHub-Pull-Request: golang/sys#205
Reviewed-on: https://go-review.googlesource.com/c/sys/+/599295
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 >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com >
2024-07-22 20:52:27 +00:00
Hernan Martinez
7bb0bf703b
cpu: add Int8 matrix multiplication instructions CPU feature flag for ARM64
...
References:
5bbd9b2498/arch/arm64/include/uapi/asm/hwcap.h (L75C9-L75C31)
https://developer.arm.com/documentation/ddi0601/2024-03/AArch64-Registers/ID-AA64ISAR1-EL1--AArch64-Instruction-Set-Attribute-Register-1
Change-Id: Ic4e1cf2c23097c7e8695453b6d0b335756d474bc
Reviewed-on: https://go-review.googlesource.com/c/sys/+/595678
Reviewed-by: Ian Lance Taylor <iant@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2024-07-17 17:57:00 +00:00
Ayman Bagabas
bce4cf76d8
windows: add GetKeyboardLayout & ToUnicodeEx
...
These are used along with GetForegroundWindow and GetWindowThreadProcessId to determine the current user layout and translate the base key the user has pressed.
Change-Id: Ib833ba7ab54213d83e889ff74c5bc0ace5edbe95
GitHub-Last-Rev: 2afe9976a2
GitHub-Pull-Request: golang/sys#188
Reviewed-on: https://go-review.googlesource.com/c/sys/+/574755
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Reviewed-by: Ayman Bagabas <ayman.bagabas@gmail.com >
2024-07-17 07:58:31 +00:00
database64128
0eac9b5475
windows: add flags for GetAdaptersAddresses
...
This commit adds all missing flags for GetAdaptersAddresses.
Change-Id: I874623b6ac77af4ced49205493258e118a4f1b26
GitHub-Last-Rev: 384c92a280
GitHub-Pull-Request: golang/sys#203
Reviewed-on: https://go-review.googlesource.com/c/sys/+/597915
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
2024-07-17 07:47:25 +00:00
Roland Shoemaker
0c18c88c71
cpu: add DIT option and hwcap DIT support
...
Follow-up to https://go.dev/cl/597377 , add a option for DIT so it can be
set via GODEBUG, and add hwcap support for Linux.
Change-Id: Ib094b520edea9c099d37f121b09d02b31644a433
Reviewed-on: https://go-review.googlesource.com/c/sys/+/598719
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2024-07-17 01:04:09 +00:00
Russ Cox
dce4e64e66
LICENSE: update per Google Legal
...
Very minor tweaks:
- Remove (c) pseudosymbol.
- Remove "All Rights Reserved."
- Change "Google Inc." (no longer exists) to "Google LLC".
[git-generate]
echo '
,s/\(c\) //
,s/ All rights reserved.//
,s/Google Inc./Google LLC/
w
q
' | sam -d LICENSE
Change-Id: I9373310143631467badd0131416d741b02c9bd10
Reviewed-on: https://go-review.googlesource.com/c/sys/+/598528
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Russ Cox <rsc@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2024-07-16 16:11:15 +00:00
Ian Lance Taylor
ee0e627958
unix: skip TestIoctlFileDedupeRange on EOPNOTSUPP error
...
Fixes golang/go#68372
Change-Id: Id3b8fb920b1458e39e7370195591183ee7e450ff
Reviewed-on: https://go-review.googlesource.com/c/sys/+/597555
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 >
Commit-Queue: Ian Lance Taylor <iant@google.com >
2024-07-11 23:28:22 +00:00
Roland Shoemaker
47fe916942
cpu: add support for DIT detection
...
Change-Id: I9f0991da9684ebd297e40a754e34130c418c34d0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/597377
Reviewed-by: Ian Lance Taylor <iant@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-07-11 16:45:38 +00:00
Koichi Shiraishi
4cafe5c66f
unix: implements RenamexNp and RenameatxNp for darwin
...
Fixes golang/go#48425
Change-Id: Ib3619863e238eadf09da479bd2e1e47d9ab6f274
Reviewed-on: https://go-review.googlesource.com/c/sys/+/361958
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: 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 >
2024-07-09 14:51:42 +00:00
Edoardo Spadolini
faed7ec264
unix: add PthreadChdir and PthreadFchdir on darwin
...
Fixes golang/go#68226
Change-Id: I92052e2319e4edde21b5e1e47ddb5b261d81448a
GitHub-Last-Rev: bc02d6d44b
GitHub-Pull-Request: golang/sys#201
Reviewed-on: https://go-review.googlesource.com/c/sys/+/595677
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 >
v0.22.0
2024-07-03 02:01:09 +00:00
Nuno Cruces
c892bb7ec2
unix: fix MmapPtr test failing on OpenBSD
...
OpenBSD apparently doesn't allow unmapping address space if part of the region is already unmapped.
This tweaks the test so that munmapping twice no longer happens.
Fixes golang/go#68181
Change-Id: I588255f5e10ec015dbb7188eac79cee6be570680
GitHub-Last-Rev: 2535abd892
GitHub-Pull-Request: golang/sys#199
Cq-Include-Trybots: luci.golang.try:go1.22-openbsd-amd64
Reviewed-on: https://go-review.googlesource.com/c/sys/+/595095
TryBot-Bypass: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@golang.org >
2024-06-26 17:48:03 +00:00
Nuno Cruces
a0ef40af1f
unix: fix MremapPtr test failing on NetBSD
...
NetBSD apparently doesn't allow remapping into used address space.
This means that the test that uses mremap to move a mmapped page
into a new address should first mmap (to reserve)
then munmap (to free) the destination.
Fixes golang/go#68180
Change-Id: If66b67e7166ca4dc4331a8cfc3e3a285416e9849
GitHub-Last-Rev: 92058c2f25
GitHub-Pull-Request: golang/sys#198
Cq-Include-Trybots: luci.golang.try:x_sys-gotip-netbsd-amd64
Reviewed-on: https://go-review.googlesource.com/c/sys/+/594756
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Joedian Reid <joedian@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-06-26 14:54:58 +00:00
Nuno Cruces
daa239428c
unix: add unsafe mmap, munmap, mremap
...
Fixes golang/go#56123
Change-Id: I63a7a6fb3a5b1bb556ac19d76a1e0b04a03ebcfa
GitHub-Last-Rev: 39dbc8e308
GitHub-Pull-Request: golang/sys#197
Reviewed-on: https://go-review.googlesource.com/c/sys/+/592415
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2024-06-25 00:37:56 +00:00
Claudiu Belu
76700875df
windows: add GetAce Windows API
...
GetAce obtains a pointer to an access control entry (ACE) in an
discretionary access control list (DACL), which controls access to
an object.
Adds the ACE_HEADER and ACCESS_ALLOWED_ACE structs.
Adds GetEntriesFromACL function which returns an array of ACEs from the
given ACL if no errors have been encountered.
References:
- https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header
- https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace
- https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-getace
Fixes golang/go#66850
Change-Id: I98306ff7e947e586a58d563d364169a2555492f4
GitHub-Last-Rev: d14ca7fb0b
GitHub-Pull-Request: golang/sys#191
Reviewed-on: https://go-review.googlesource.com/c/sys/+/578976
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Damien Neil <dneil@google.com >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
2024-06-24 03:00:31 +00:00
Alex Brainman
348425aa18
windows/svc: do not pass theService to windows.RegisterServiceCtrlHandlerEx
...
windows.RegisterServiceCtrlHandlerEx context parameter is uintptr, so it
is unsafe to pass pointers in that parameter. Use theService global
variable in ctlHandler function instead.
Fixes golang/go#67437
Change-Id: I84c910eaa354603c2a5114421cd61788cb40b86f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/591475
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Quim Muntal <quimmuntal@gmail.com >
Reviewed-by: David Chase <drchase@google.com >
2024-06-13 07:32:15 +00:00
Meng Zhuo
673e0f94c1
unix: skip ethtool driver test for busy interface
...
This CL skips IoctlGetEthtoolDrvinfo on busy interface tests since
ethtool getting the same result too.
Fixes golang/go#67350
Change-Id: Ia65678e3caab8a9dd42b9cdb8e4cb7f7f0b476da
Reviewed-on: https://go-review.googlesource.com/c/sys/+/586435
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 >
v0.21.0
2024-05-17 15:15:09 +00:00
Mauri de Souza Meneguzzo
6943ab67c4
unix/linux: update glibc to 2.39
...
Change-Id: I5c2b996180073ca10f1b7c86201a19eaf0557e43
GitHub-Last-Rev: a092f56935
GitHub-Pull-Request: golang/sys#195
Reviewed-on: https://go-review.googlesource.com/c/sys/+/585136
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-05-13 22:24:33 +00:00
Mauri de Souza Meneguzzo
92f3ad6e7f
unix: update to Linux kernel 6.9
...
Change-Id: Ib7bd9dabfcb8234c522ec357d32bfa3e87af53db
GitHub-Last-Rev: 4bea205222
GitHub-Pull-Request: golang/sys#194
Reviewed-on: https://go-review.googlesource.com/c/sys/+/585135
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Mauri de Souza Meneguzzo <mauri870@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2024-05-13 21:43:45 +00:00
JoeyShapiro
f34bb9fccc
windows: add net user enum
...
In the go windows package, you can get user information by using
`NetUserGetInfo` along with a specified level. However, there is
no way to get a list of the users.
The only options are to
1. know the users,
2. brute force users, or
3. use an external tool or command (`net users`).
I suggest adding a function that implements the windows api for
`NetUserEnum`. This will allow a built in way to enumerate
users and follow the standard.
A side note is that I used `buf **byte` because
it is how the others are done, but using `buf *byte`
works just as well.
Change-Id: Ifcc916659eb1d796175cd18acd2e81f2661bfcd2
GitHub-Last-Rev: 3d01bca920
GitHub-Pull-Request: golang/sys#190
Reviewed-on: https://go-review.googlesource.com/c/sys/+/578475
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Auto-Submit: Cherry Mui <cherryyz@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2024-05-09 17:46:52 +00:00
Florian Lehner
6dfb94eaa3
unix: add types for SOCK_DIAG
...
Change-Id: Ifcc90735b6e42b6c9971d4ba15c31b8169e005fe
Reviewed-on: https://go-review.googlesource.com/c/sys/+/579996
Reviewed-by: Cherry Mui <cherryyz@google.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 >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-05-06 17:39:26 +00:00
dustin-ward
7d69d983c4
unix: extend support for z/OS
...
This change syncs the IBM internal version of sys/unix with the public
repository.
There are a variety of new syscalls and const definitions that have been
accumulated over the past few years to support developers using Go on
the platform. Old simulations of calls like 'epoll' and 'fstatfs' have
been replaced with their real counterparts. The zos/s390x syscalls also
have extensive trampolining to handle zos systems that might not have
support for some of these new system calls.
Closes golang/go#67071
Change-Id: I973d9e0abca2b05365308cf2b890438e50ae5957
Reviewed-on: https://go-review.googlesource.com/c/sys/+/582035
Reviewed-by: David Chase <drchase@google.com >
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com >
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 >
v0.20.0
2024-05-03 20:28:26 +00:00
Michal Hruby
7758090324
cpu: add support for sve2 detection
...
Fixes golang/go#66952
Change-Id: Idaf2ce3b09baf33cf29079677a83a51ea9c4b255
GitHub-Last-Rev: eac00886d1
GitHub-Pull-Request: golang/sys#193
Reviewed-on: https://go-review.googlesource.com/c/sys/+/580655
Reviewed-by: Ian Lance Taylor <iant@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: David Chase <drchase@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2024-05-03 16:45:19 +00:00
Tobias Klauser
9a28524796
windows: drop go version tags for unsupported versions
...
go.mod specifies go 1.18. Drop go1.n version tags for older, unsupported
versions.
Change-Id: I7a23a9f4ba558999ac417b7b4647fa1061d69c06
Reviewed-on: https://go-review.googlesource.com/c/sys/+/566038
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: Quim Muntal <quimmuntal@gmail.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2024-04-16 22:18:47 +00:00
Tobias Klauser
27dc90bcf4
unix: update to Linux kernel 6.4
...
Change-Id: I88b628a97f5cfb76083968be2ff2e9857ce56557
Reviewed-on: https://go-review.googlesource.com/c/sys/+/577975
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: Carlos Amedee <carlos@golang.org >
2024-04-11 16:37:17 +00:00
Tom Payne
cabba82f75
windows: use uint32 for serial comm flags for consistency
...
This is a follow-up to https://go-review.googlesource.com/c/sys/+/572295
and specifically the comment
https://go-review.googlesource.com/c/sys/+/572295/comment/a00e1a2e_e3b01666/ .
All other structs and methods us uint32 in golang.org/x/sys/windows
for flag bitmasks, so make the serial communication structs use uint32
to be consistent with the rest of the package.
As a side effect the DTR_CONTROL_* and RTS_CONTROL_* constants are
updated to reflect the positions of the bits in the 32-bit flags.
Change-Id: Ie19774a8ef5411d7df1e5b0d36806aa1d401fa86
GitHub-Last-Rev: bc93d94a45
GitHub-Pull-Request: golang/sys#189
Reviewed-on: https://go-review.googlesource.com/c/sys/+/575635
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Reviewed-by: Than McIntosh <thanm@google.com >
v0.19.0
2024-04-04 14:40:38 +00:00
Tom Payne
1a50d9738b
windows: add serial comm functions
...
Serial ports are still widely used to communicate with a large range of
devices.
This change adds the remaining functions described in "Serial
Communications in Win32", enabling Go applications and libraries to be
written that support the full set of serial port functionality on
Windows.
x/sys/unix already has equivalent functionality through termios.
See https://learn.microsoft.com/en-us/previous-versions/ms810467(v=msdn.10) .
Change-Id: I57f9ed6b7dbcc2331f740bd95b6483f141b0ad6f
GitHub-Last-Rev: 0a5a7441ce
GitHub-Pull-Request: golang/sys#187
Reviewed-on: https://go-review.googlesource.com/c/sys/+/572295
Reviewed-by: David Chase <drchase@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
2024-04-02 01:45:51 +00:00
Peter Hoogendijk
95f07eca87
x/sys/windows: add func windows.DisconnectNamedPipe(handle Handle) (err error)
...
Fixes golang/go#66234
Change-Id: I1e4a94e1ca8c01a29bab18e0bf12238c511fe1c6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/570435
Reviewed-by: Quim Muntal <quimmuntal@gmail.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
2024-03-12 20:49:51 +00:00
Mackenzie Malainey
4be02d3543
unix: expose mmap calls on z/OS
...
The calls `Mmap` and `Munmap` were removed for z/OS.
Syscall removed occurred in: 508397
This change exposes them in a z/OS specific file
(to remove the accidental deletion of them in future refactors of the APIs for `unix-like` OSes).
Change-Id: Ice0cabfb4547cab2ffa7130b7c26d9cc38233afe
GitHub-Last-Rev: e7b4680e63
GitHub-Pull-Request: golang/sys#186
Reviewed-on: https://go-review.googlesource.com/c/sys/+/569359
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: Michael Knyszek <mknyszek@google.com >
2024-03-08 16:26:02 +00:00
Ilya Hanov
360f961f89
unix: add API for fsconfig system call
...
Fixes golang/go#59537
Change-Id: I8d806ace3adad423c633813455d8f758706cee1d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/484995
Reviewed-by: Than McIntosh <thanm@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 >
v0.18.0
2024-02-16 13:31:09 +00:00
Tobias Klauser
7ff74af46e
unix: drop go version tags for unsupported versions
...
go.mod specifies go 1.18. Drop go1.n version tags for older, unsupported
versions.
Change-Id: I8563bd2cc8e86bd560a45b885a9aa2e6bcc95c47
Reviewed-on: https://go-review.googlesource.com/c/sys/+/559415
Reviewed-by: Than McIntosh <thanm@google.com >
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 >
2024-02-14 13:16:46 +00:00
Yuval Pavel Zholkover
6b4eab51c2
unix: suppress ENOMEM errors from sysctl's implementing Uname(uname *Utsname) on FreeBSD due to truncated fields.
...
Fixes golang/go#65585 .
Change-Id: I7e529eaef224be977e3b0c20d071802f49b297e7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/562617
Reviewed-by: Than McIntosh <thanm@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-02-13 14:35:18 +00:00
Florian Lehner
2f2cc5dae4
unix: update IFLA and NETKIT constants with Linux kernel 6.7
...
Change-Id: I5034ceb384f6a4945a969b00ca420c80aa03d941
Reviewed-on: https://go-review.googlesource.com/c/sys/+/561575
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: David Chase <drchase@google.com >
Run-TryBot: 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 >
2024-02-07 19:22:56 +00:00
qmuntal
914b96c1bd
windows: support ill-formed UTF-16 in UTF16PtrToString
...
UTF16PtrToString does not support ill-formed UTF-16 because it uses
utf16.Decode, which expects well-formed UTF-16.
This CL updates the UTF16PtrToString implementation to use
UTF16ToString instead of utf16.Decode, which supports ill-formed
UTF-16 since go1.21 via syscall.UTF16ToString.
Change-Id: Ifb72b6d38a8c08ad90ec6a47eed05fc3739500a1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/560355
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
v0.17.0
2024-02-01 17:02:20 +00:00
Bryan Mills
511ec846b6
Revert "windows: support nil done parameter in ReadFile and WriteFile"
...
This reverts CL 559375.
Reason for revert: introduced a different regression (golang/go#65378 ).
Fixes golang/go#65378 .
Updates golang/go#65365 .
Change-Id: Ie2a602415913b04b9d9b65fee5c6a54c0267b35e
Cq-Include-Trybots: luci.golang.try:x_sys-gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/sys/+/559502
Auto-Submit: Bryan Mills <bcmills@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2024-01-30 20:43:58 +00:00
qmuntal
628365db92
windows: support nil done parameter in ReadFile and WriteFile
...
Win32 defines the `done` param as optional for ReadFile and WriteFile
functions. We should support this case too.
Fixes golang/go#65365 .
Change-Id: I961ff66a63d3a8ffa5560b6dab21fbd4ac9817ae
Reviewed-on: https://go-review.googlesource.com/c/sys/+/559375
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2024-01-30 17:14:39 +00:00
Joshua Sing
bef1bd8971
unix: move mksyscall regexp to package level variables
...
Avoid compiling regular expressions for each loop iteration, rather
declare them as package level variables so they are only compiled once.
Change-Id: I5c29a44e986ef8d97326134e8fc8e983671e68d8
Reviewed-on: https://go-review.googlesource.com/c/sys/+/542955
Reviewed-by: Joel Sing <joel@sing.id.au >
Run-TryBot: Joel Sing <joel@sing.id.au >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2024-01-27 04:55:52 +00:00