Messages in this thread | | | From | Linus Torvalds <> | Date | Mon, 30 Apr 2018 20:07:52 +0000 | Subject | Re: Hashed pointer issues |
| |
On Mon, Apr 30, 2018 at 1:01 PM Linus Torvalds < torvalds@linux-foundation.org> wrote:
> 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.
Linus
| |