- 18 Jul, 2017 1 commit
-
-
Tobias Klauser authored
Add IoctlGetWinsize and IoctlSetWinsize to retreive and manipulate Winsize structures on Linux, akin to the already existing implementation on Solaris. Also remove the named result parameter for IoctlSetInt and IoctlSetTermios, as they add no additional use. Change-Id: Id349d1d6a21d5c9a05943f4dcc3a275613ccf7b8 Reviewed-on: https://go-review.googlesource.com/49231 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 14 Jul, 2017 1 commit
-
-
Tobias Klauser authored
Add the Mkfifoat function on Linux, akin to the existing Mkfifo function but taking an additional dirfd parameter. See http://man7.org/linux/man-pages/man3/mkfifo.3.html Originally requested in golang/go#14216 Also remove the named result parameter for Mkfifo, as they add no additional use (suggested by Brad Fitzpatrick). Change-Id: I7b759752abf3e1469d7f883a7f13313e3062aeb4 Reviewed-on: https://go-review.googlesource.com/48530Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 10 Jul, 2017 1 commit
-
-
Tobias Klauser authored
Add additional SIOC* socket ioctl constants from linux/sockios.h on Linux. Change-Id: I76f8c9d9d0015d398ee52844b3c9f506cd182329 Reviewed-on: https://go-review.googlesource.com/47950Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 07 Jul, 2017 1 commit
-
-
Tobias Klauser authored
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/47770Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 05 Jul, 2017 1 commit
-
-
Francesc Campoy authored
Change-Id: I5709137db7308934e627d866da1cc8aa5abca7db Reviewed-on: https://go-review.googlesource.com/47310Reviewed-by: Rob Pike <r@golang.org>
-
- 03 Jul, 2017 1 commit
-
-
Awn authored
Change-Id: I5bb10469bab144f5e42c7bcf6ee8717d3fd0d4e4 Reviewed-on: https://go-review.googlesource.com/47337Reviewed-by: Matt Layher <mdlayher@gmail.com> Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 02 Jul, 2017 2 commits
-
-
Awn authored
Change-Id: I0dee287567bdbf882e804bcd5ed7dcd6f748b30c Reviewed-on: https://go-review.googlesource.com/47340Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Awn authored
Fixes golang/go#20086 Change-Id: Ifdc2561fe6cc125fa45a57bad9750f3f3f055e66 Reviewed-on: https://go-review.googlesource.com/47335 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
- 30 Jun, 2017 1 commit
-
-
Tobias Klauser authored
Add IoctlGetTermios and IoctlGetTermios to retreive and manipulate Termios structures on Linux, akin to the already existing implementation or Solaris. If desired, functions conforming to POSIX tcgetattr/tcsetattr could be implemented on top of these. Change-Id: I2a71061bad2e632c597b6f6184ad6374c46a43ee Reviewed-on: https://go-review.googlesource.com/47330Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Jun, 2017 2 commits
-
-
Tobias Klauser authored
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/46771Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tyler Treat authored
Add the remaining AcceptX commands (AcceptParamChange, AcceptNetBindChange, AcceptHardwareProfileChange, AcceptPowerEvent, and AcceptSessionChange) to the windows/svc package. Also add support for these to updateStatus such that a service can actually accept these commands. Change-Id: I11191e7798489b3222a3e76ba55129f10fd202ab Reviewed-on: https://go-review.googlesource.com/46722Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Jun, 2017 2 commits
-
-
Tobias Klauser authored
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/46691Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
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/46690Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 23 Jun, 2017 1 commit
-
-
Tobias Klauser authored
Currently Linux' fchmodat(2) syscall implementation doesn't support the flags parameter (though it might in future versions [1]). Fchmodat in x/sys/unix takes the parameter and (wrongly) passes it on to the syscall which will ignore it. According to the POSIX.1-2008 manual page [2], AT_SYMLINK_NOFOLLOW is the only valid value for the flags parameter and EOPNOTSUPP should be returned in case changing the mode of a symbolic link is not supported by the underlying system. EINVAL should be returned for any other value of the flags parameter. [1] https://patchwork.kernel.org/patch/9596301/ [2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/chmod.html Change the Fchmodat implementation accordingly and also add the corresponding test. Fixes golang/go#20130 Change-Id: I62e677e6674d3702eaf388af0ac3d7e623a35c24 Reviewed-on: https://go-review.googlesource.com/46474Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 15 Jun, 2017 1 commit
-
-
Alex Brainman authored
Add API to list services installed on the system. Fixes golang/go#20596 Change-Id: Ifa2f20ef15ccb962bd21d03788ce931dd45f2630 Reviewed-on: https://go-review.googlesource.com/45711Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Jun, 2017 1 commit
-
-
Tobias Klauser authored
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/45093Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 07 Jun, 2017 1 commit
-
-
Tobias Klauser authored
Add the following additional Getrlimit/Setrlimit resource constants (see http://man7.org/linux/man-pages/man2/getrlimit.2.html): RLIMIT_LOCKS RLIMIT_MEMLOCK RLIMIT_MSGQUEUE RLIMIT_NICE RLIMIT_NPROC RLIMIT_RSS RLIMIT_RTPRIO RLIMIT_RTTIME RLIMIT_SIGPENDING Fixes golang/go#14854 Change-Id: I302ff67d6d1b11d94f18614490fbd634a8caec19 Reviewed-on: https://go-review.googlesource.com/45052Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 29 May, 2017 1 commit
-
-
Tobias Klauser authored
Add support for the lgetxattr, llistxattr, lremovexattr and lsetxattr on Linux, akin to the already existing getxattr, listxattr, removexattr and setxattr syscalls. These variants are identical to the already existing variants. except in the case of a symbolic link where the extended attribute operation is applied to the link itself rather than to the file that it refers to. See: http://man7.org/linux/man-pages/man2/getxattr.2.html http://man7.org/linux/man-pages/man2/listxattr.2.html http://man7.org/linux/man-pages/man2/removexattr.2.html http://man7.org/linux/man-pages/man2/setxattr.2.html Fixes golang/go#14116 Change-Id: I786953db8bf862566f54bdd745cc1feca5031be7 Reviewed-on: https://go-review.googlesource.com/44374Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 24 May, 2017 1 commit
-
-
Matt Layher authored
This CL adds basic integer get/set functions which wrap a generic ioctl call. The API is similar the one introduced for solaris/amd64 in CL 14587, but the request parameter has been changed to a uint instead of an int. This makes requests with a number larger than the maximum signed 32-bit integer work on linux/386. For consistency, the solaris/amd64 API has also been updated to make use of a uint instead of an int for the request number. Fixes golang/go#20474 Change-Id: Iaae1ee2e4bb4bfcc420dcec252fe53c8d90ce81d Reviewed-on: https://go-review.googlesource.com/44009 Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 21 May, 2017 1 commit
-
-
helloPiers authored
The args passed to Mgr.CreateService end up as the command-line arguments (available via os.Args), not as the args passed to Svc.Handler.Execute. Fixes golang/go#20440 Change-Id: I55a1ec3432b377082c018fe960114c96350e8978 Reviewed-on: https://go-review.googlesource.com/43714Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 18 May, 2017 2 commits
-
-
Joe Richey joerichey@google.com authored
This CL adds support for the ADD_KEY, REQUESET_KEY, and KEYCTL syscalls. These syscalls allow access to the kernel keyring facilities. In C code, these syscalls are wrapped by the libkeyutils package. See: http://man7.org/linux/man-pages/man7/keyutils.7.html The ADD_KEY and REQUEST_KEY calls are fairly straightforward, but the KEYCTL syscall is a multiplexor for a number of key management functions. See: http://man7.org/linux/man-pages/man3/keyctl.3.html The Go bindings for the KEYCTL functions attempt to replicate what libkeyutils does. This is done via generated helper functions. Change-Id: If8c97d4ef5bce14c43dee3e6772ded42dc3c595a Reviewed-on: https://go-review.googlesource.com/41415Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Julian Pastarmov authored
This allows services written with this library to register for more advanced notifications like SERVICE_CONTROL_DEVICEEVENT for example. Also the code now exposes the service status handle through a new api call, because the handle is needed to register for such notifications and can not be obtained by any other means. Change-Id: I80796e1dd9d94ec9d6c236d0413b17288c67fe1f Reviewed-on: https://go-review.googlesource.com/42812Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 17 May, 2017 1 commit
-
-
Mikio Hara authored
Change-Id: I4ef179aacaf0694cd7661b4d9972ce85abeee8df Reviewed-on: https://go-review.googlesource.com/43470Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 14 May, 2017 1 commit
-
-
Sean Chittenden authored
Reference: https://www.illumos.org/man/2/statvfs Change-Id: If7af43da35b3204f5069a48eb08426a145544008 Reviewed-on: https://go-review.googlesource.com/43490Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 12 May, 2017 4 commits
-
-
Derek McGowan authored
Introduces the CopyFileRange syscall which first appears in Linux 4.5. Allows copying file content between file descriptors within the kernel without transferring data to user space. This syscall also allows the kernel to take advantage of reflinking or other fast copy methods on supported file systems. http://man7.org/linux/man-pages/man2/copy_file_range.2.html Change-Id: Id365f1e5d4d5ddf7159478e3a13084c9576ebd5c Reviewed-on: https://go-review.googlesource.com/39992Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
James Cowgill authored
On mips, "struct user" bears no relation to the actual structure used by PTRACE_GETREGS. The real structure is "struct pt_regs" which is declared in asm/ptrace.h Fixes golang/go#20338. Change-Id: I604d27bd2b0a0903784380cbd3fa2fd9b9811fa5 Reviewed-on: https://go-review.googlesource.com/43431Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
James Cowgill authored
After this commit the testsuite passes on mips64le. Fixes golang/go#20340. Change-Id: I6b3f673674af107fd6d249ccf5e695e0e50a41bb Reviewed-on: https://go-review.googlesource.com/43430Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tamir Duberstein authored
Useful since GetSystemTimePreciseAsFileTime is Windows 8+. Change-Id: I736bd0668aaf6ad086f6465b8b9a17f1943f0570 Reviewed-on: https://go-review.googlesource.com/43312Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 11 May, 2017 3 commits
-
-
Mikio Hara authored
This is a backport of https://go-review.googlesource.com/30171. Updates golang/go#7402. Change-Id: I4e79570964c248ec52acf14d0ed8306e52073a51 Reviewed-on: https://go-review.googlesource.com/43212 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Fixes golang/go#17252. Change-Id: I244c14d531542ea154f82e402059f4bc999241e2 Reviewed-on: https://go-review.googlesource.com/43211 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: If732030e7ed8f1ba4ce09d4efc5b132d5f48fd8a Reviewed-on: https://go-review.googlesource.com/43210 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 27 Apr, 2017 2 commits
-
-
Mikio Hara authored
Also adds support for accept4 system call. Change-Id: Ib4f15a3ac47ad2fa86ac2f22331a061ddda12d82 Reviewed-on: https://go-review.googlesource.com/41833Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Each language has its own operators. Change-Id: I765d4d56aeafe693d22914de7ee970d7b1928a25 Reviewed-on: https://go-review.googlesource.com/41832Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 25 Apr, 2017 1 commit
-
-
Ian Lance Taylor authored
The code was broken such that it didn't compile. With this fix, it compiles. Fixes golang/go#20055. Change-Id: I9aeb4900f2c99b2ad254be75b4987913cae71e14 Reviewed-on: https://go-review.googlesource.com/41672Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Apr, 2017 1 commit
-
-
joerichey@google.com authored
This CL adds in the necessary types and constants to support Linux filesystem encryption. This includes the structs for the keys and polices as well as the constants for key size and encryption algorithms. This code also reduces the scope of some of the regexes in mkerrors.sh. This is to reduce the number of unrelated constants added in with this change. Note that due to a bug in the Linux uapi headers, not all of the necessary constants and structures are declared in linux/fs.h despite being part of the kernel ABI. This means that some constants and types had to be manually added in. The bug has been patched (https://patchwork.kernel.org/patch/9662723), and the manual additions can be removed when the patch is merged into the mainline kernel. Change-Id: Ib508ad99bdf4c0068933ffcf351c52bb359cfcf4 Reviewed-on: https://go-review.googlesource.com/41417Reviewed-by: Matt Layher <mdlayher@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 21 Apr, 2017 1 commit
-
-
Joe Richey authored
Right now the process for adding in new constants, errors, or syscalls for Linux is a pain and unreliable. The scripts are designed to be run on the target architecture and use the header files installed on the user's system. This makes it hard to generate files for all the architectures or to have consistency between users. See golang/go#15282. This CL fixes this issue by making all of the files for the 11 supported architectures directly from source checkouts of Linux, glibc, and bluez. This is done using Docker, the gcc cross-compilers, and qemu emulation. Previously discussed here: https://go-review.googlesource.com/c/37589/ A README.md file is also added to explain how all the parts of the build system work. In order to get the build working for all the architectures, I made some changes to the other scripts called from mkall_linux.go: - Files only used for generating linux code, moved to linux/ - linux/mksysnum.pl supports a specified CC compiler. - The generated C code in mkerrors.sh changed to avoid a warning - mkerrors.sh headers changed to fix powerpc64 bug in sys/ioctl.h - linux/types.go no longer needs to export Ptrace structs in lowercase Build instructions: - Host system needs to be x86-64 Linux - Install Docker (https://docs.docker.com/engine/installation/) - ./mkall.sh (That's it!!!) Change-Id: I87067c14442ba12f8d51991349a43a9d73f38ae0 Reviewed-on: https://go-review.googlesource.com/37943Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 07 Apr, 2017 2 commits
-
-
Tamir Duberstein authored
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686244(v=vs.85).aspx Change-Id: If7d460a9fb43767c0a3ee55e86faf3356162c81d Reviewed-on: https://go-review.googlesource.com/39609Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tamir Duberstein authored
GetStdHandle: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683231(v=vs.85).aspx DWORD: https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx Change-Id: I2fb794f85418e7846687911c4513886eb1803770 Reviewed-on: https://go-review.googlesource.com/39608Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 06 Apr, 2017 1 commit
-
-
Jason Chu authored
golang.org/x/sys/unix currently does not compile on mips nor mipsle as it fails to set the `isBigEndian` variable. This is due to mips and mipsle being missing in the build tag of their respective endian files. This change adds mips to the build tag of `endian_big.go` and mipsle to the build tag of `endian_little.go` to fix this issue. Change-Id: I79947cedb2645e80143e65bde00f2c95261125fb Reviewed-on: https://go-review.googlesource.com/39730Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 05 Apr, 2017 1 commit
-
-
Tamir Duberstein authored
https://msdn.microsoft.com/en-us/library/windows/desktop/hh706895(v=vs.85).aspx Change-Id: I6e6a6642c041fad046ae7db725a27e7e94bfbfba Reviewed-on: https://go-review.googlesource.com/39610Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-