<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/char/random.c, branch v3.5.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/char/random.c?h=v3.5.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/char/random.c?h=v3.5.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-04-12T20:12:12Z</updated>
<entry>
<title>drivers/char/random.c: fix boot id uniqueness race</title>
<updated>2012-04-12T20:12:12Z</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2012-04-12T19:49:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=44e4360fa3384850d65dd36fb4e6e5f2f112709b'/>
<id>urn:sha1:44e4360fa3384850d65dd36fb4e6e5f2f112709b</id>
<content type='text'>
/proc/sys/kernel/random/boot_id can be read concurrently by userspace
processes.  If two (or more) user-space processes concurrently read
boot_id when sysctl_bootid is not yet assigned, a race can occur making
boot_id differ between the reads.  Because the whole point of the boot id
is to be unique across a kernel execution, fix this by protecting this
operation with a spinlock.

Given that this operation is not frequently used, hitting the spinlock
on each call should not be an issue.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86/rdrand' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-01-17T02:23:09Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-17T02:23:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c2bc3a316a7281f67e36b34dac2802cbe36a9128'/>
<id>urn:sha1:c2bc3a316a7281f67e36b34dac2802cbe36a9128</id>
<content type='text'>
* 'x86/rdrand' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  random: Adjust the number of loops when initializing
  random: Use arch-specific RNG to initialize the entropy store
</content>
</entry>
<entry>
<title>random: Adjust the number of loops when initializing</title>
<updated>2012-01-16T19:33:49Z</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@linux.intel.com</email>
</author>
<published>2012-01-16T19:23:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2dac8e54f988ab58525505d7ef982493374433c3'/>
<id>urn:sha1:2dac8e54f988ab58525505d7ef982493374433c3</id>
<content type='text'>
When we are initializing using arch_get_random_long() we only need to
loop enough times to touch all the bytes in the buffer; using
poolwords for that does twice the number of operations necessary on a
64-bit machine, since in the random number generator code "word" means
32 bits.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Link: http://lkml.kernel.org/r/1324589281-31931-1-git-send-email-tytso@mit.edu
</content>
</entry>
<entry>
<title>random: Use arch-specific RNG to initialize the entropy store</title>
<updated>2012-01-16T19:18:21Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2011-12-22T21:28:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e88bdff1c65145f7ba297ccec69c774afe4c785'/>
<id>urn:sha1:3e88bdff1c65145f7ba297ccec69c774afe4c785</id>
<content type='text'>
If there is an architecture-specific random number generator (such as
RDRAND for Intel architectures), use it to initialize /dev/random's
entropy stores.  Even in the worst case, if RDRAND is something like
AES(NSA_KEY, counter++), it won't hurt, and it will definitely help
against any other adversaries.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Link: http://lkml.kernel.org/r/1324589281-31931-1-git-send-email-tytso@mit.edu
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>module_param: make bool parameters really bool (drivers &amp; misc)</title>
<updated>2012-01-12T23:02:20Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2012-01-12T23:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=90ab5ee94171b3e28de6bb42ee30b527014e0be7'/>
<id>urn:sha1:90ab5ee94171b3e28de6bb42ee30b527014e0be7</id>
<content type='text'>
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>random: Use arch_get_random_int instead of cycle counter if avail</title>
<updated>2011-12-30T00:49:45Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-12-22T19:36:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf833d0b9937874b50ef2867c4e8badfd64948ce'/>
<id>urn:sha1:cf833d0b9937874b50ef2867c4e8badfd64948ce</id>
<content type='text'>
We still don't use rdrand in /dev/random, which just seems stupid. We
accept the *cycle*counter* as a random input, but we don't accept
rdrand? That's just broken.

Sure, people can do things in user space (write to /dev/random, use
rdrand in addition to /dev/random themselves etc etc), but that
*still* seems to be a particularly stupid reason for saying "we
shouldn't bother to try to do better in /dev/random".

And even if somebody really doesn't trust rdrand as a source of random
bytes, it seems singularly stupid to trust the cycle counter *more*.

So I'd suggest the attached patch. I'm not going to even bother
arguing that we should add more bits to the entropy estimate, because
that's not the point - I don't care if /dev/random fills up slowly or
not, I think it's just stupid to not use the bits we can get from
rdrand and mix them into the strong randomness pool.

Link: http://lkml.kernel.org/r/CA%2B55aFwn59N1=m651QAyTy-1gO1noGbK18zwKDwvwqnravA84A@mail.gmail.com
Acked-by: "David S. Miller" &lt;davem@davemloft.net&gt;
Acked-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>fix typo/thinko in get_random_bytes()</title>
<updated>2011-11-17T13:42:54Z</updated>
<author>
<name>Luck, Tony</name>
<email>tony.luck@intel.com</email>
</author>
<published>2011-11-16T18:50:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bd29e568a4cb6465f6e5ec7c1c1f3ae7d99cbec1'/>
<id>urn:sha1:bd29e568a4cb6465f6e5ec7c1c1f3ae7d99cbec1</id>
<content type='text'>
If there is an architecture-specific random number generator we use it
to acquire randomness one "long" at a time.  We should put these random
words into consecutive words in the result buffer - not just overwrite
the first word again and again.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Acked-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86-rdrand-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2011-10-28T12:29:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-10-28T12:29:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8e6d539e0fd0c2124a20a207da70f2af7a9ae52c'/>
<id>urn:sha1:8e6d539e0fd0c2124a20a207da70f2af7a9ae52c</id>
<content type='text'>
* 'x86-rdrand-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, random: Verify RDRAND functionality and allow it to be disabled
  x86, random: Architectural inlines to get random integers with RDRAND
  random: Add support for architectural random hooks

Fix up trivial conflicts in drivers/char/random.c: the architectural
random hooks touched "get_random_int()" that was simplified to use MD5
and not do the keyptr thing any more (see commit 6e5714eaf77d: "net:
Compute protocol sequence numbers and fragment IDs using MD5").
</content>
</entry>
<entry>
<title>net: Compute protocol sequence numbers and fragment IDs using MD5.</title>
<updated>2011-08-07T01:33:19Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-08-04T03:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6e5714eaf77d79ae1c8b47e3e040ff5411b717ec'/>
<id>urn:sha1:6e5714eaf77d79ae1c8b47e3e040ff5411b717ec</id>
<content type='text'>
Computers have become a lot faster since we compromised on the
partial MD4 hash which we use currently for performance reasons.

MD5 is a much safer choice, and is inline with both RFC1948 and
other ISS generators (OpenBSD, Solaris, etc.)

Furthermore, only having 24-bits of the sequence number be truly
unpredictable is a very serious limitation.  So the periodic
regeneration and 8-bit counter have been removed.  We compute and
use a full 32-bit sequence number.

For ipv6, DCCP was found to use a 32-bit truncated initial sequence
number (it needs 43-bits) and that is fixed here as well.

Reported-by: Dan Kaminsky &lt;dan@doxpara.com&gt;
Tested-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>random: Add support for architectural random hooks</title>
<updated>2011-07-31T20:54:50Z</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@zytor.com</email>
</author>
<published>2011-07-31T20:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=63d77173266c1791f1553e9e8ccea65dc87c4485'/>
<id>urn:sha1:63d77173266c1791f1553e9e8ccea65dc87c4485</id>
<content type='text'>
Add support for architecture-specific hooks into the kernel-directed
random number generator interfaces.  This patchset does not use the
architecture random number generator interfaces for the
userspace-directed interfaces (/dev/random and /dev/urandom), thus
eliminating the need to distinguish between them based on a pool
pointer.

Changes in version 3:
- Moved the hooks from extract_entropy() to get_random_bytes().
- Changes the hooks to inlines.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
</feed>
