mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
linux-user: Let user specify random seed
This patch introduces the -seed command line option and the QEMU_RAND_SEED environment variable for setting the random seed, which is used for the AT_RANDOM ELF aux entry. Signed-off-by: Magnus Reftel <reftel@spotify.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
0a2923f848
commit
c5e4a5a95e
2 changed files with 19 additions and 1 deletions
|
@ -1539,7 +1539,6 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
|
|||
* Generate 16 random bytes for userspace PRNG seeding (not
|
||||
* cryptically secure but it's not the aim of QEMU).
|
||||
*/
|
||||
srand((unsigned int) time(NULL));
|
||||
for (i = 0; i < 16; i++) {
|
||||
k_rand_bytes[i] = rand();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue