Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1783)

Issue 123260044: code review 123260044: crypto/rand: use getrandom system call on Linux (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by bradfitz
Modified:
9 years, 8 months ago
Reviewers:
r, agl1
CC:
agl, agl1, rsc, r, golang-codereviews, iant
Visibility:
Public.

Description

crypto/rand: use getrandom system call on Linux Adds internal/syscall package. Fixes Issue 8520

Patch Set 1 #

Patch Set 2 : diff -r 39128f4b116e2364be8b055f1273b09248b97404 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 39128f4b116e2364be8b055f1273b09248b97404 https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 4 : diff -r 39128f4b116e2364be8b055f1273b09248b97404 https://go.googlecode.com/hg/ #

Total comments: 9

Patch Set 5 : diff -r 39128f4b116e2364be8b055f1273b09248b97404 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 6 : diff -r 39128f4b116e2364be8b055f1273b09248b97404 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r c047b9e50307c2d04b650bf2b6beb235850df04e https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -2 lines) Patch
A src/pkg/crypto/rand/rand_linux.go View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
M src/pkg/crypto/rand/rand_unix.go View 1 2 3 4 5 3 chunks +10 lines, -1 line 0 comments Download
M src/pkg/go/build/deps_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
A src/pkg/internal/syscall/getrandom_linux.go View 1 2 3 4 5 1 chunk +55 lines, -0 lines 0 comments Download

Messages

Total messages: 15
bradfitz
Hello agl@chromium.org (cc: golang-codereviews@googlegroups.com, iant@golang.org, rsc@golang.org), I'd like you to review this change to https://go.googlecode.com/hg/
9 years, 8 months ago (2014-08-12 19:42:50 UTC) #1
agl1
https://codereview.appspot.com/123260044/diff/40001/src/pkg/crypto/rand/rand_linux.go File src/pkg/crypto/rand/rand_linux.go (right): https://codereview.appspot.com/123260044/diff/40001/src/pkg/crypto/rand/rand_linux.go#newcode16 src/pkg/crypto/rand/rand_linux.go:16: n, err := syscall.GetRandom(p, 0) The new system call ...
9 years, 8 months ago (2014-08-12 20:32:35 UTC) #2
rsc
+r for creation of internal/syscall in this CL (it is tiny)
9 years, 8 months ago (2014-08-12 20:34:59 UTC) #3
r
LGTM for internal/syscall https://codereview.appspot.com/123260044/diff/40001/src/pkg/internal/syscall/getrandom_linux.go File src/pkg/internal/syscall/getrandom_linux.go (right): https://codereview.appspot.com/123260044/diff/40001/src/pkg/internal/syscall/getrandom_linux.go#newcode25 src/pkg/internal/syscall/getrandom_linux.go:25: // GRND_NONBLOCK means "Don't block and ...
9 years, 8 months ago (2014-08-12 20:38:21 UTC) #4
bradfitz
Hello agl@chromium.org, agl@golang.org, rsc@golang.org, r@golang.org (cc: golang-codereviews@googlegroups.com, iant@golang.org), Please take another look.
9 years, 8 months ago (2014-08-12 20:54:26 UTC) #5
r
LGTM for internal/syscall https://codereview.appspot.com/123260044/diff/60001/src/pkg/internal/syscall/getrandom_linux.go File src/pkg/internal/syscall/getrandom_linux.go (right): https://codereview.appspot.com/123260044/diff/60001/src/pkg/internal/syscall/getrandom_linux.go#newcode28 src/pkg/internal/syscall/getrandom_linux.go:28: // GRND_RANDOM means the use the ...
9 years, 8 months ago (2014-08-12 20:55:06 UTC) #6
bradfitz
Updated per conversation with agl. https://codereview.appspot.com/123260044/diff/40001/src/pkg/internal/syscall/getrandom_linux.go File src/pkg/internal/syscall/getrandom_linux.go (right): https://codereview.appspot.com/123260044/diff/40001/src/pkg/internal/syscall/getrandom_linux.go#newcode25 src/pkg/internal/syscall/getrandom_linux.go:25: // GRND_NONBLOCK means "Don't ...
9 years, 8 months ago (2014-08-12 20:55:08 UTC) #7
bradfitz
Hello agl@chromium.org, agl@golang.org, rsc@golang.org, r@golang.org (cc: golang-codereviews@googlegroups.com, iant@golang.org), Please take another look.
9 years, 8 months ago (2014-08-12 20:56:38 UTC) #8
bradfitz
https://codereview.appspot.com/123260044/diff/60001/src/pkg/internal/syscall/getrandom_linux.go File src/pkg/internal/syscall/getrandom_linux.go (right): https://codereview.appspot.com/123260044/diff/60001/src/pkg/internal/syscall/getrandom_linux.go#newcode28 src/pkg/internal/syscall/getrandom_linux.go:28: // GRND_RANDOM means the use the /dev/random pool instead ...
9 years, 8 months ago (2014-08-12 20:56:38 UTC) #9
agl1
https://codereview.appspot.com/123260044/diff/60001/src/pkg/crypto/rand/rand_linux.go File src/pkg/crypto/rand/rand_linux.go (right): https://codereview.appspot.com/123260044/diff/60001/src/pkg/crypto/rand/rand_linux.go#newcode24 src/pkg/crypto/rand/rand_linux.go:24: // machine without hardware entropy available, it'll fall back ...
9 years, 8 months ago (2014-08-12 20:58:41 UTC) #10
r
https://codereview.appspot.com/123260044/diff/80001/src/pkg/internal/syscall/getrandom_linux.go File src/pkg/internal/syscall/getrandom_linux.go (right): https://codereview.appspot.com/123260044/diff/80001/src/pkg/internal/syscall/getrandom_linux.go#newcode28 src/pkg/internal/syscall/getrandom_linux.go:28: // GRND_RANDOM means to use the /dev/random pool instead ...
9 years, 8 months ago (2014-08-12 20:58:53 UTC) #11
bradfitz
https://codereview.appspot.com/123260044/diff/60001/src/pkg/crypto/rand/rand_linux.go File src/pkg/crypto/rand/rand_linux.go (right): https://codereview.appspot.com/123260044/diff/60001/src/pkg/crypto/rand/rand_linux.go#newcode24 src/pkg/crypto/rand/rand_linux.go:24: // machine without hardware entropy available, it'll fall back ...
9 years, 8 months ago (2014-08-12 21:11:27 UTC) #12
bradfitz
Hello agl@chromium.org, agl@golang.org, rsc@golang.org, r@golang.org (cc: golang-codereviews@googlegroups.com, iant@golang.org), Please take another look.
9 years, 8 months ago (2014-08-12 21:11:28 UTC) #13
agl1
LGTM
9 years, 8 months ago (2014-08-12 21:15:09 UTC) #14
bradfitz
9 years, 8 months ago (2014-08-12 21:35:30 UTC) #15
*** Submitted as https://code.google.com/p/go/source/detail?r=a70c897599c4 ***

crypto/rand: use getrandom system call on Linux

Adds internal/syscall package.

Fixes Issue 8520

LGTM=r, agl
R=agl, rsc, r
CC=golang-codereviews, iant
https://codereview.appspot.com/123260044
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b