fix: random: only read from /dev/random after its pool has received 128 bits (v5.2)
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 21 May 2019 20:33:14 +0000 (16:33 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 May 2019 14:49:07 +0000 (10:49 -0400)
commitdf0e746a05a267384785d66c9fca947eb4a9e517
tree55c5cad461ede1daf6d268b6fc4b4b1169e21f5f
parentcf9d65394074b0c1a56732bbb092dfd5c95bb4b0
fix: random: only read from /dev/random after its pool has received 128 bits (v5.2)

See upstream commit:

  commit eb9d1bf079bb438d1a066d72337092935fc770f6
  Author: Theodore Ts'o <tytso@mit.edu>
  Date:   Wed Feb 20 16:06:38 2019 -0500

    random: only read from /dev/random after its pool has received 128 bits

    Immediately after boot, we allow reads from /dev/random before its
    entropy pool has been fully initialized.  Fix this so that we don't
    allow this until the blocking pool has received 128 bits.

    We do this by repurposing the initialized flag in the entropy pool
    struct, and use the initialized flag in the blocking pool to indicate
    whether it is safe to pull from the blocking pool.

    To do this, we needed to rework when we decide to push entropy from the
    input pool to the blocking pool, since the initialized flag for the
    input pool was used for this purpose.  To simplify things, we no
    longer use the initialized flag for that purpose, nor do we use the
    entropy_total field any more.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/random.h
This page took 0.026292 seconds and 4 git commands to generate.