Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: golang/sys
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.26.0
Choose a base ref
...
head repository: golang/sys
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.27.0
Choose a head ref
  • 20 commits
  • 43 files changed
  • 12 contributors

Commits on Oct 7, 2024

  1. windows: manually initialize NewNTUnicodeString

    The `RtlInitUnicodeString` syscall can be avoided by manually
    initializing the `NTUnicodeString`.
    
    The process is described in [WdmlibRtlInitUnicodeStringEx](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdmsec/nf-wdmsec-wdmlibrtlinitunicodestringex).
    
    The less syscalls, the better. It also makes the function faster:
    
    ```
    goos: windows
    goarch: amd64
    pkg: golang.org/x/sys/windows
    cpu: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
                          │    old.txt    │               new.txt                │
                          │    sec/op     │    sec/op     vs base                │
    NewNTUnicodeString-12   181.05n ± 15%   96.32n ± 11%  -46.80% (p=0.000 n=10)
    ```
    
    Change-Id: Iaf079acdcc2024cdca6b6b649a711f6be99c5b87
    Reviewed-on: https://go-review.googlesource.com/c/sys/+/618175
    Reviewed-by: Damien Neil <dneil@google.com>
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    qmuntal committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    7143f4a View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. 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: 5b15f12
    GitHub-Pull-Request: #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>
    yarikk authored and gopherbot committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    fe162ba View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. 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: 3743a3a
    GitHub-Pull-Request: #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>
    yarikk authored and gopherbot committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    e5eee7e View commit details
    Browse the repository at this point in the history
  2. 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>
    cuishuang authored and gopherbot committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    2dfefb6 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. 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>
    abner-chenc authored and gopherbot committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    3932916 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2024

  1. 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: 47dc9df
    GitHub-Pull-Request: #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>
    yarikk authored and gopherbot committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    a57fdb8 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. windows/mkwinsyscall: use syscall.SyscallN instead of syscall.Syscall…

    …{6,9,12,15}
    
    Replace syscall.Syscall6, Syscall9, Syscall12, and Syscall15 with syscall.SyscallN for Go 1.18+. This simplifies system calls by allowing the exact number of arguments needed, eliminating zero padding and reducing potential errors.
    
    Updated TestSyscallXGeneration to TestSyscallNGeneration to verify correct SyscallN generation for different argument counts.
    
    Change-Id: Icd6662b591d7548e367b88f34243f5529e177eab
    GitHub-Last-Rev: c06fca1
    GitHub-Pull-Request: #219
    Reviewed-on: https://go-review.googlesource.com/c/sys/+/614082
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
    Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
    mertakman authored and gopherbot committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    adbb8bb View commit details
    Browse the repository at this point in the history
  2. 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: 44fac1c
    GitHub-Pull-Request: #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>
    yarikk authored and gopherbot committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    256d1df View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2024

  1. 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: e7990b0
    GitHub-Pull-Request: #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>
    yarikk authored and gopherbot committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    60d7877 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. 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>
    tklauser authored and gopherbot committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    696d342 View commit details
    Browse the repository at this point in the history
  2. 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>
    tklauser authored and gopherbot committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    df4a4da View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2024

  1. 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: 07e32a4
    GitHub-Pull-Request: #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>
    jlee3227 authored and gopherbot committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    123459f View commit details
    Browse the repository at this point in the history
  2. 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>
    dmitshur authored and gopherbot committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    cff53d5 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. windows: implement Ftruncate using a single syscall on Windows

    Ftruncate can be implemented on Windows using a single syscall. This
    makes the implementation more efficient and less prone to races when
    used in combination with other Seek calls.
    
    Note that this is the x/sys counterpart for CL 618835.
    
    Change-Id: Ie9be356bd953ccce85c0dd87a5dcc6ccf4fec464
    Reviewed-on: https://go-review.googlesource.com/c/sys/+/621935
    Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
    Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    Reviewed-by: Damien Neil <dneil@google.com>
    qmuntal authored and gopherbot committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    d045236 View commit details
    Browse the repository at this point in the history
  2. 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>
    tklauser authored and gopherbot committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    18e038c View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2024

  1. 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: 5aafd0b
    GitHub-Pull-Request: #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>
    MacMalainey authored and gopherbot committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    ca04041 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2024

  1. README: don't recommend go get

    These days people will just import the packages and the go tool will
    do the right thing. We don't need to explain it.
    
    Add a pointer to the git repo, though.
    
    For golang/go#62645
    
    Change-Id: I94cd9c588a68d92c61d00be05740248509a2ae6e
    Reviewed-on: https://go-review.googlesource.com/c/sys/+/624078
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@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: Dmitri Shuralyov <dmitshur@google.com>
    ianlancetaylor authored and gopherbot committed Nov 2, 2024
    Configuration menu
    Copy the full SHA
    054f1fc View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2024

  1. cpu: conditionally re-enable AVX512 support on darwin/amd64

    Darwin opmask clobbering bug was fixed in kernel version 21.3.0
    as released in MacOS 12.2.0. This commit resolves issue by
    checking for Darwin AVX512 support via a sysctl call with the
    addition of a kernel minimum version check.
    
    The kernel version check is completed without adding new
    dependencies to x/sys/cpu. A sysctl call is accomplished by
    copying a minimal amount of code from x/sys/unix, to retrieve
    only the needed KERN_OSRELEASE value. This code is structured
    in the same manner as an existing analogous AIX/PPC64 syscall.
    
    The resulting dotted version string value is then parsed for
    numeric comparison with a dependency free function.
    
    All code in this contribution is structured to ease removal of
    the special darwin/amd64 codepaths when that OS/arch combination
    is eventually no longer supported by golang.
    
    Resolves issue: golang/go#49233, reinstates fix for issue: golang/go#43089
    
    Change-Id: I4755fc8b3865eb6562b0959ecc910e2c46ac6cb4
    Reviewed-on: https://go-review.googlesource.com/c/sys/+/620256
    Reviewed-by: Keith Randall <khr@google.com>
    Reviewed-by: Keith Randall <khr@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    Reviewed-by: vsivsi@yahoo.com <vsivsi@yahoo.com>
    vsivsi authored and randall77 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    8f2aa9f View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. windows: add iphlpapi functions for change notifications

    The NotifyIpInterfaceChange and NotifyUnicastIpAddressChange functions
    register a user-defined callback function for receiving network
    interface and IP address change notifications. The GetIfEntry2Ex and
    GetUnicastIpAddressEntry functions can be called to retrieve complete
    information about the changed interface or address.
    
    The CancelMibChangeNotify2 function deregisters for change
    notifications.
    
    Change-Id: Iee29405ffa135c6aa0120f9aa046e3706e2bac47
    GitHub-Last-Rev: a8309cd
    GitHub-Pull-Request: #211
    Reviewed-on: https://go-review.googlesource.com/c/sys/+/603755
    Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: David Chase <drchase@google.com>
    database64128 authored and qmuntal committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    c29efe3 View commit details
    Browse the repository at this point in the history
  2. Revert "windows/mkwinsyscall: use syscall.SyscallN instead of syscall…

    ….Syscall{6,9,12,15}"
    
    This reverts CL 614082.
    
    Reason for revert: syscall.SyscallN allocates more than its syscall.SyscallX counterparts, producing perf-related test failures across the board.
    
    Updates #70197
    
    Change-Id: I51107d909fcdbef4e65ee3f84932b2a0e7804f1b
    Reviewed-on: https://go-review.googlesource.com/c/sys/+/625375
    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>
    qmuntal committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    e0753d4 View commit details
    Browse the repository at this point in the history
Loading