<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/char/random.c, branch v4.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2017-02-07T01:46:49Z</updated>
<entry>
<title>random: move random_min_urandom_seed into CONFIG_SYSCTL ifdef block</title>
<updated>2017-02-07T01:46:49Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2017-01-31T16:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db61ffe3a71c697aaa91c42c862a5f7557a0e562'/>
<id>urn:sha1:db61ffe3a71c697aaa91c42c862a5f7557a0e562</id>
<content type='text'>
Building arm allnodefconfig causes the following build warning:

drivers/char/random.c:318:12: warning: 'random_min_urandom_seed' defined but not used [-Wunused-variable]

Fix the warning by moving 'random_min_urandom_seed' declaration inside
the CONFIG_SYSCTL ifdef block, where it is actually used.

While at it, remove the comment prior to the variable declaration.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>random: convert get_random_int/long into get_random_u32/u64</title>
<updated>2017-01-27T19:25:06Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2017-01-22T15:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c440408cf6901eeb2c09563397e24a9097907078'/>
<id>urn:sha1:c440408cf6901eeb2c09563397e24a9097907078</id>
<content type='text'>
Many times, when a user wants a random number, he wants a random number
of a guaranteed size. So, thinking of get_random_int and get_random_long
in terms of get_random_u32 and get_random_u64 makes it much easier to
achieve this. It also makes the code simpler.

On 32-bit platforms, get_random_int and get_random_long are both aliased
to get_random_u32. On 64-bit platforms, int-&gt;u32 and long-&gt;u64.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>random: use chacha20 for get_random_int/long</title>
<updated>2017-01-27T19:25:06Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2017-01-06T18:32:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5b98461cb8167ba362ad9f74c41d126b7becea7'/>
<id>urn:sha1:f5b98461cb8167ba362ad9f74c41d126b7becea7</id>
<content type='text'>
Now that our crng uses chacha20, we can rely on its speedy
characteristics for replacing MD5, while simultaneously achieving a
higher security guarantee. Before the idea was to use these functions if
you wanted random integers that aren't stupidly insecure but aren't
necessarily secure either, a vague gray zone, that hopefully was "good
enough" for its users. With chacha20, we can strengthen this claim,
since either we're using an rdrand-like instruction, or we're using the
same crng as /dev/urandom. And it's faster than what was before.

We could have chosen to replace this with a SipHash-derived function,
which might be slightly faster, but at the cost of having yet another
RNG construction in the kernel. By moving to chacha20, we have a single
RNG to analyze and verify, and we also already get good performance
improvements on all platforms.

Implementation-wise, rather than use a generic buffer for both
get_random_int/long and memcpy based on the size needs, we use a
specific buffer for 32-bit reads and for 64-bit reads. This way, we're
guaranteed to always have aligned accesses on all platforms. While
slightly more verbose in C, the assembly this generates is a lot
simpler than otherwise.

Finally, on 32-bit platforms where longs and ints are the same size,
we simply alias get_random_int to get_random_long.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Suggested-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>random: fix comment for unused random_min_urandom_seed</title>
<updated>2017-01-19T02:54:16Z</updated>
<author>
<name>Stephan Müller</name>
<email>smueller@chronox.de</email>
</author>
<published>2016-12-27T22:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d0e5ea343a0f70351428476bcf8715e0731f26a'/>
<id>urn:sha1:5d0e5ea343a0f70351428476bcf8715e0731f26a</id>
<content type='text'>
The variable random_min_urandom_seed is not needed any more as it
defined the reseeding behavior of the nonblocking pool. Though it is not
needed any more, it is left in the code for user space interface
compatibility.

Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>random: remove variable limit</title>
<updated>2017-01-19T02:54:15Z</updated>
<author>
<name>Stephan Müller</name>
<email>smueller@chronox.de</email>
</author>
<published>2016-12-27T22:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43d8a72cd985ca5279a9eb84d61fcbb3ee3d3774'/>
<id>urn:sha1:43d8a72cd985ca5279a9eb84d61fcbb3ee3d3774</id>
<content type='text'>
The variable limit was used to identify the nonblocking pool's unlimited
random number generation. As the nonblocking pool is a thing of the
past, remove the limit variable and any conditions around it (i.e.
preserve the branches for limit == 1).

Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>random: remove stale urandom_init_wait</title>
<updated>2017-01-19T02:54:15Z</updated>
<author>
<name>Stephan Müller</name>
<email>smueller@chronox.de</email>
</author>
<published>2016-12-27T22:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2e03c36f25ebb52d3358b8baebcdf96895c33a87'/>
<id>urn:sha1:2e03c36f25ebb52d3358b8baebcdf96895c33a87</id>
<content type='text'>
The urandom_init_wait wait queue is a left over from the pre-ChaCha20
times and can therefore be savely removed.

Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>random: remove stale maybe_reseed_primary_crng</title>
<updated>2017-01-19T02:53:48Z</updated>
<author>
<name>Stephan Mueller</name>
<email>stephan.mueller@atsec.com</email>
</author>
<published>2016-12-15T11:42:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d071d8da1f586c24863a57349586a1611b9aa67'/>
<id>urn:sha1:3d071d8da1f586c24863a57349586a1611b9aa67</id>
<content type='text'>
The function maybe_reseed_primary_crng is not used anywhere and thus can
be removed.

Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2016-12-24T19:46:01Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba'/>
<id>urn:sha1:7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux</title>
<updated>2016-10-15T17:03:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-15T17:03:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ffc66941df278c9f4df979b6bcf6c6ddafedd16'/>
<id>urn:sha1:9ffc66941df278c9f4df979b6bcf6c6ddafedd16</id>
<content type='text'>
Pull gcc plugins update from Kees Cook:
 "This adds a new gcc plugin named "latent_entropy". It is designed to
  extract as much possible uncertainty from a running system at boot
  time as possible, hoping to capitalize on any possible variation in
  CPU operation (due to runtime data differences, hardware differences,
  SMP ordering, thermal timing variation, cache behavior, etc).

  At the very least, this plugin is a much more comprehensive example
  for how to manipulate kernel code using the gcc plugin internals"

* tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  latent_entropy: Mark functions with __latent_entropy
  gcc-plugins: Add latent_entropy plugin
</content>
</entry>
<entry>
<title>random: remove unused randomize_range()</title>
<updated>2016-10-11T22:06:32Z</updated>
<author>
<name>Jason Cooper</name>
<email>jason@lakedaemon.net</email>
</author>
<published>2016-10-11T20:54:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7425154d3bbf5fcc7554738cab6dfac559ffbdda'/>
<id>urn:sha1:7425154d3bbf5fcc7554738cab6dfac559ffbdda</id>
<content type='text'>
All call sites for randomize_range have been updated to use the much
simpler and more robust randomize_addr().  Remove the now unnecessary
code.

Link: http://lkml.kernel.org/r/20160803233913.32511-8-jason@lakedaemon.net
Signed-off-by: Jason Cooper &lt;jason@lakedaemon.net&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: "Theodore Ts'o" &lt;tytso@mit.edu&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>
</feed>
