• Jason A. Donenfeld's avatar
    kfence: use better stack hash seed · 08475dab
    Jason A. Donenfeld authored
    As of the prior commit, the RNG will have incorporated both a cycle
    counter value and RDRAND, in addition to various other environmental
    noise. Therefore, using get_random_u32() will supply a stronger seed
    than simply using random_get_entropy(). N.B.: random_get_entropy()
    should be considered an internal API of random.c and not generally
    consumed.
    
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Reviewed-by: default avatarMarco Elver <elver@google.com>
    Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
    08475dab
core.c 34.3 KB