Re: Hashed pointer issues
From: Linus Torvalds
Date: Mon Apr 30 2018 - 16:08:09 EST
On Mon, Apr 30, 2018 at 1:01 PM Linus Torvalds <
> But if there are no actual users of get_random_bytes_arch(), maybe we can
> just remove the fallback to the non-arch code, and add that return value
> (and the __must_check()).
Hmm. It is exported, so maybe there is some crazy module out there.
Also, I have to admit that I hate the idea of people using that function
for a "fast random number generator". I think it's fine for this kind of
"initialize hashing state" thing, but I would hate for somebody to actually
use "get_random_bytes_arch()" as an actual source of random bytes.
Even when the "real" random number generator uses it, at least it washes
the result through chacha20 and has other sources or entropy mixed in too.
So let's rename it regardless. Both to see if any external module actually
uses that get_random_bytes_arch() function, and to discourage people to use
it as direct random data.
Maybe call it something like "get_seed_bytes_arch()" or something.
And maybe I'm just being silly.