1
0
mirror of https://github.com/golang/go synced 2024-10-04 06:21:23 -06:00
Commit Graph

8 Commits

Author SHA1 Message Date
Dmitriy Vyukov
cffbfaeb18 race: syscall changes
This is a part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044
The purpose of this patch is to provide coarse-grained synchronization
between all Read() and Write() calls.

R=rsc, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/6610064
2012-10-09 20:51:58 +04:00
Russ Cox
3d5ddffa30 syscall: prepare for 64-bit ints
This CL fixes code that incorrectly assumes that int is 32 bits wide.
Specifically, the socketpair system call expects a pointer to a pair
of int32s, not a pair of ints. Fix this inside the wrappers without
changing the APIs.

Update #2188.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6552063
2012-09-24 00:06:22 -04:00
Alexey Borzenkov
a108369c83 syscall: return EINVAL when string arguments have NUL characters
Since NUL usually terminates strings in underlying syscalls, allowing
it when converting string arguments is a security risk, especially
when dealing with filenames. For example, a program might reason that
filename like "/root/..\x00/" is a subdirectory or "/root/" and allow
access to it, while underlying syscall will treat "\x00" as an end of
that string and the actual filename will be "/root/..", which might
be unexpected. Returning EINVAL when string arguments have NUL in
them makes sure this attack vector is unusable.

R=golang-dev, r, bradfitz, fullung, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6458050
2012-08-05 17:24:32 -04:00
Benny Siegert
677cdb800d syscall: use pipe instead of pipe2 on NetBSD
pipe2 is equivalent to pipe with flags set to 0.
However, pipe2 was only added recently. Using pipe
instead improves compatibility with NetBSD 5.

R=jsing
CC=golang-dev
https://golang.org/cl/6268045
2012-06-05 01:29:34 +10:00
Benny Siegert
559c191b89 syscall: manually fix z* for NetBSD/amd64
Building go currently fails on NetBSD, thus the regeneration
scripts do not run correctly. With these changes, at least
the go_bootstrap tool builds correctly.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5695064
2012-04-06 07:57:05 -07:00
Joel Sing
f1ebbf80bd syscall: make pipe work on netbsd
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5504070
2011-12-23 02:47:48 +11:00
Joel Sing
43bc8a9b53 syscall: make getdirentries work on netbsd
R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5504068
2011-12-22 23:42:43 +11:00
Christopher Nielsen
5425db8f99 syscall: Changes to the syscall package to support NetBSD.
Not all syscalls are implemented, but many are. On the suggestion
of Joel Sing <jsing@google.com>, the generated files were added
with hg add instead of hg cp, since they are generated on an OS
dependant basis.

R=golang-dev, jsing, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5491050
2011-12-20 03:57:58 +11:00