1. 22 Nov, 2018 1 commit
  2. 21 Nov, 2018 1 commit
    • David Anderson's avatar
      unix: add IoctlSetPointerInt · 0cf1ed9e
      David Anderson authored
      IoctlSetPointerInt is necessary for interacting with the PPP kernel
      driver, which wants it passed as a pointer to int, rather than the
      more conventional int cast as a pointer.
      
      We can technically do this already with
      IoctlSetInt(int(uintptr(unsafe.Pointer(&foo)))), but that's just
      masking the operation we're trying to execute in the first place,
      and relying on the internals of IoctlSetInt to do the right
      inverse transformation.
      
      Change-Id: I1e6a1dd6190c11f06c6f5393cd2cae453939878a
      GitHub-Last-Rev: a88f56073d04b02d9c076b112adaf99169a49513
      GitHub-Pull-Request: golang/sys#25
      Reviewed-on: https://go-review.googlesource.com/c/150321
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      0cf1ed9e
  3. 19 Nov, 2018 1 commit
  4. 16 Nov, 2018 2 commits
  5. 07 Nov, 2018 1 commit
  6. 06 Nov, 2018 3 commits
  7. 31 Oct, 2018 1 commit
  8. 30 Oct, 2018 3 commits
  9. 29 Oct, 2018 1 commit
  10. 26 Oct, 2018 4 commits
  11. 25 Oct, 2018 1 commit
  12. 24 Oct, 2018 2 commits
  13. 23 Oct, 2018 1 commit
  14. 22 Oct, 2018 3 commits
    • Tobias Klauser's avatar
      unix: update Dockerfile to Linux 4.19 · 8a28ead1
      Tobias Klauser authored
      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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      8a28ead1
    • Ivan Markin's avatar
      unix: don't use local syscall number in Pledge() · 8b8824e7
      Ivan Markin authored
      Change-Id: Ifecafeedd733d4b33ef082a8f505165de9bac20a
      GitHub-Last-Rev: 44c40b042479bb3a4a73838b2536adbb715cde11
      GitHub-Pull-Request: golang/sys#20
      Reviewed-on: https://go-review.googlesource.com/c/142318Reviewed-by: 's avatarTobias Klauser <tobias.klauser@gmail.com>
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8b8824e7
    • Yuval Pavel Zholkover's avatar
      unix: FreeBSD 12 ino64 support · 5535b4e6
      Yuval Pavel Zholkover authored
      Background:
      The 64-bit inode project was merged into the upcoming FreeBSD 12 release.
      It changes the ABI for structs holding inodes: stat, statfs, dirent.
      New system call numbers were introduced which accept the new struct layouts,
      the old ones were marked as COMPAT11.
      Their equivalent libc wrappers are using ELF symbol versioning.
      The new wrappers have moved from @FBSD_1.0 to @FBSD_1.5.
      
      Backward and forward compatability is achieved by always using the new struct
      layouts while converting the old struct instance to the new layout on old kernels.
      https://svnweb.freebsd.org/base?view=revision&revision=318736
      https://svnweb.freebsd.org/base?view=revision&revision=320278
      
      The same approach is used for Go:
      The new Stat_t, Statfs_t and Dirent types hold 64-bit inodes and additional ABI
      changes, they are generated from their C definitions in FreeBSD-12 using cgo -godefs.
      Each type has an unexported *_freebsd11 counterpart generated the same way.
      Previous directly exposed syscalls like Fstat have now a wrapper in place calling
      either fstat or fstat_freebsd12 zsyscall wrapper based on the kern.osreldate.
      If an old syscall needs to be used, then the returned *_freebsd11 result is converted
      to the new layout before returning from the wrapper.
      
      Introduce supportsABI() call to check the kern.osreldate sysctl for the ABI version.
      Drop the old struct stat8 definition in favour of the <sys/stat.h> version.
      Run the mktypes part of GOOS=freebsd GOARCH={386,amd64,arm} ./mkall.sh
      on FreeBSD-12.0-ALPHA6 (r338675), updating all types except Kevent.
      
      Expose Mknodat, both COMPAT11 version (currently missing) and the FreeBSD 12 one.
      Some COMPAT11 syscalls have no direct FreeBSD 12 counterpart, in those cases
      an *at(AT_FDCWD, ...) is used instead.
      
      Updates golang/go#22448
      
      Change-Id: I87940b88ae358db88103cdcd06f9cafbf4694cfc
      Reviewed-on: https://go-review.googlesource.com/c/136816
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarGiovanni Bajo <rasky@develer.com>
      Reviewed-by: 's avatarTobias Klauser <tobias.klauser@gmail.com>
      5535b4e6
  15. 21 Oct, 2018 1 commit
  16. 19 Oct, 2018 2 commits
    • Tobias Klauser's avatar
      unix: add SOF_TIMESTAMPING_* flags on Linux · 8e24a49d
      Tobias Klauser authored
      Add the SOF_TIMESTAMPING_* flags used to request different types of
      timestamping operations. In
      
        err := unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_TIMESTAMPING, val)
      
      val is a mask of SOF_TIMESTAMPING_* values.
      
      See https://www.kernel.org/doc/Documentation/networking/timestamping.txt
      for more information.
      
      Fixes golang/go#28173
      
      Change-Id: I26e964d607606f2b3cb24f66f071d11765b9696e
      Reviewed-on: https://go-review.googlesource.com/c/143337
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      8e24a49d
    • chigotc's avatar
      unix: add support for aix/ppc64, gc implementation · 8f1d3d21
      chigotc authored
      This commit ports unix package for aix/ppc64 with gc implementation.
      
      In order to merge as much as possible gc and gccgo implementation, the
      mksyscall_aix_ppc64.pl creates three files.
      
      zsyscall_aix_ppc64.go is common for both implementation. It has the main
      syscall function and handles the pointer creations, type conversions
      and the error if needed. It calls a function "call..." which is
      available for each implementation.
      
      zsyscall_aix_ppc64_gc.go is the gc part. It implements "call..."
      functions using //go:cgo_import_dynamic and //go:linkname. It is
      based on syscall.syscall6 function.
      
      zsyscall_aix_ppc64_gccgo.go is the gccgo part. It implements "call..."
      functions using cgo and C functions.
      
      Some unavailable syscalls were also removed from the previous
      implementation.
      
      For aix/ppc, the script is left unchanged as aix/ppc won't be
      implemented inside gc.
      
      Change-Id: I3701095df31517c66f95874ba8e682967993090b
      Reviewed-on: https://go-review.googlesource.com/c/143117
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarTobias Klauser <tobias.klauser@gmail.com>
      8f1d3d21
  17. 11 Oct, 2018 1 commit
  18. 05 Oct, 2018 2 commits
  19. 04 Oct, 2018 1 commit
  20. 03 Oct, 2018 3 commits
  21. 28 Sep, 2018 1 commit
  22. 27 Sep, 2018 2 commits
  23. 26 Sep, 2018 2 commits