-
由 Jason A. Donenfeld 提交于
This reverts 35a33ff3 ("random: use memmove instead of memcpy for remaining 32 bytes"), which was made on a totally bogus basis. The thing it was worried about overlapping came from the stack, not from one of its arguments, as Eric pointed out. But the fact that this confusion even happened draws attention to the fact that it's a bit non-obvious that the random_data parameter can alias chacha_state, and in fact should do so when the caller can't rely on the stack being cleared in a timely manner. So this commit documents that. Reported-by: NEric Biggers <ebiggers@kernel.org> Reviewed-by: NEric Biggers <ebiggers@google.com> Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
8717627d