Skip to content

Commit cc4e705

Browse files
alxgnonalexcrichton
authored andcommitted
---
yaml --- r: 115710 b: refs/heads/try c: 3e9f66f h: refs/heads/master v: v3
1 parent 2353ee7 commit cc4e705

File tree

4 files changed

+18
-26
lines changed

4 files changed

+18
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: bee4e6adac17f87b1cdc26ab69f8c0f5d82575a3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
5-
refs/heads/try: 1ee5e7f18511b95ddb83e725d46de0fee43825cf
5+
refs/heads/try: 3e9f66fc9ffa9e78d96676d74b3880ddfd597006
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/man/rustc.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Set lint forbidden
9797
Set internal debugging options. Use "-Z help" to print available options.
9898
.TP
9999
\fB\-C\fR FLAG[=VAL], \fB\-\-codegen\fR FLAG[=VAL]
100-
Set a codegen-related flag to the value specifie.d Use "-C help" to print
100+
Set a codegen-related flag to the value specified. Use "-C help" to print
101101
available flags. See CODEGEN OPTIONS below
102102
.TP
103103
\fB\-v\fR, \fB\-\-version\fR
@@ -119,7 +119,7 @@ is invoked.
119119
.TP
120120
\fBtarget-cpu\fR=help
121121
Selects a target processor. If the value is 'help', then a list of available
122-
cpus is printed.
122+
CPUs is printed.
123123
.TP
124124
\fBtarget-feature\fR='+feature1 -feature2'
125125
A space-separated list of features to enable or disable for the target. A
@@ -132,7 +132,7 @@ cause rustc to print all known passes and exit. The passes specified are
132132
appended at the end of the normal pass manager.
133133
.TP
134134
\fBllvm-args\fR='-arg1 -arg2'
135-
A space-separted list of argument to pass through to LLVM.
135+
A space-separated list of arguments to pass through to LLVM.
136136
.TP
137137
\fBsave-temps\fR
138138
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated

branches/try/src/librand/lib.rs

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,20 @@ after generating 32 KiB of random data.
3030
3131
# Cryptographic security
3232
33-
An application that requires an entropy source for cryptographic purposes
34-
must use `OSRng`, which reads randomness from the source that the operating
35-
system provides (e.g. `/dev/urandom` on Unixes or `CryptGenRandom()` on Windows).
36-
The other random number generators provided by this module are not suitable
37-
for such purposes.
38-
39-
*Note*: many Unix systems provide `/dev/random` as well as `/dev/urandom`.
40-
This module uses `/dev/urandom` for the following reasons:
41-
42-
- On Linux, `/dev/random` may block if entropy pool is empty; `/dev/urandom` will not block.
43-
This does not mean that `/dev/random` provides better output than
44-
`/dev/urandom`; the kernel internally runs a cryptographically secure pseudorandom
45-
number generator (CSPRNG) based on entropy pool for random number generation,
46-
so the "quality" of `/dev/random` is not better than `/dev/urandom` in most cases.
47-
However, this means that `/dev/urandom` can yield somewhat predictable randomness
48-
if the entropy pool is very small, such as immediately after first booting.
49-
If an application likely to be run soon after first booting, or on a system with very
50-
few entropy sources, one should consider using `/dev/random` via `ReaderRng`.
51-
- On some systems (e.g. FreeBSD, OpenBSD and Mac OS X) there is no difference
52-
between the two sources. (Also note that, on some systems e.g. FreeBSD, both `/dev/random`
53-
and `/dev/urandom` may block once if the CSPRNG has not seeded yet.)
33+
An application that requires random numbers for cryptographic purposes
34+
should prefer `OSRng`, which reads randomness from one of the source
35+
that the operating system provides (e.g. `/dev/urandom` on
36+
Unixes). The other random number generators provided by this module
37+
are either known to be insecure (`XorShiftRng`), or are not verified
38+
to be secure (`IsaacRng`, `Isaac64Rng` and `StdRng`).
39+
40+
*Note*: on Linux, `/dev/random` is more secure than `/dev/urandom`,
41+
but it is a blocking RNG, and will wait until it has determined that
42+
it has collected enough entropy to fulfill a request for random
43+
data. It can be used with the `Rng` trait provided by this module by
44+
opening the file and passing it to `reader::ReaderRng`. Since it
45+
blocks, `/dev/random` should only be used to retrieve small amounts of
46+
randomness.
5447
5548
# Examples
5649

branches/try/src/librand/os.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ mod imp {
109109
CRYPT_VERIFYCONTEXT | CRYPT_SILENT)
110110
};
111111

112-
// FIXME #13259:
113112
// It turns out that if we can't acquire a context with the
114113
// NTE_BAD_SIGNATURE error code, the documentation states:
115114
//

0 commit comments

Comments
 (0)