Re: [Qemu-devel] [PATCH v5] linux-user: Let user specify random seed

2014-10-28 Thread Magnus Reftel
On Thu, Oct 23, 2014 at 12:03 PM, Riku Voipio riku.voi...@iki.fi wrote: On Wed, Oct 22, 2014 at 03:17:33PM +0200, Magnus Reftel wrote: Ping. http://patchwork.ozlabs.org/patch/399483/ Applied to linux-user que, thanks Thanks! BR Magnus Reftel

Re: [Qemu-devel] [PATCH v5] linux-user: Let user specify random seed

2014-10-22 Thread Magnus Reftel
On Tue, Oct 14, 2014 at 5:18 PM, Magnus Reftel ref...@spotify.com wrote: linux-user uses the rand function for generating the value of the AT_RANDOM elf aux vector entry, and explicitly seeds the random number generator with the current time. This makes it impossible to reproduce runs

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
On Fri, Oct 10, 2014 at 6:20 PM, Eric Blake ebl...@redhat.com wrote: On 10/10/2014 02:16 AM, Magnus Reftel wrote: On Thu, Oct 9, 2014 at 11:30 PM, Eric Blake ebl...@redhat.com wrote: On 10/09/2014 01:12 PM, Magnus Reftel wrote: +if (parse_uint(arg, seed, end, 0) != 0 || *end != 0 || seed

[Qemu-devel] [PATCH v4] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
linux-user uses the rand function for generating the value of the AT_RANDOM elf aux vector entry, and explicitly seeds the random number generator with the current time. This makes it impossible to reproduce runs that use the AT_RANDOM bytes. This patch adds a command line option and a matching

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
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 ref...@spotify.com --- linux-user/elfload.c | 1 - linux-user/main.c| 19

[Qemu-devel] [PATCH v5] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
linux-user uses the rand function for generating the value of the AT_RANDOM elf aux vector entry, and explicitly seeds the random number generator with the current time. This makes it impossible to reproduce runs that use the AT_RANDOM bytes. This patch adds a command line option and a matching

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
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 ref...@spotify.com Reviewed-by: Eric Blake ebl...@redhat.com --- linux-user/elfload.c | 1

Re: [Qemu-devel] [PATCH v2] linux-user: Let user specify random seed

2014-10-10 Thread Magnus Reftel
On Thu, Oct 9, 2014 at 9:43 PM, Tom Musta tommu...@gmail.com wrote: On 10/9/2014 3:36 AM, Magnus Reftel wrote: 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

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-10 Thread Magnus Reftel
On Thu, Oct 9, 2014 at 11:30 PM, Eric Blake ebl...@redhat.com wrote: On 10/09/2014 01:12 PM, Magnus Reftel wrote: +if (parse_uint(arg, seed, end, 0) != 0 || *end != 0 || seed UINT_MAX) { Slightly shorter as: if (parse_uint_full(arg, seed, 0) 0 || seed UINT_MAX) { but that's

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-09 Thread Magnus Reftel
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 ref...@spotify.com --- linux-user/elfload.c | 1 - linux-user/main.c| 20

[Qemu-devel] [PATCH v2] linux-user: Let user specify random seed

2014-10-09 Thread Magnus Reftel
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. This is an updated version of the patch, addressing review comments from Eric Blake.

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-09 Thread Magnus Reftel
Hi, Thank you for your patience! I will send a third version. On Thu, Oct 9, 2014 at 5:27 PM, Eric Blake ebl...@redhat.com wrote: On 10/09/2014 02:36 AM, Magnus Reftel wrote: +char* end; Style: we prefer: char *end; Done. +if (end==arg || *end!='\0' || seed UINT_MAX) { Style

[Qemu-devel] [PATCH v3] linux-user: Let user specify random seed

2014-10-09 Thread Magnus Reftel
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.

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-09 Thread Magnus Reftel
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 ref...@spotify.com --- linux-user/elfload.c | 1 - linux-user/main.c| 20

[Qemu-devel] [PATCH] Let user specify random seed for linux-user

2014-10-08 Thread Magnus Reftel
linux-user uses the rand function for generating the value of the AT_RANDOM elf aux vector entry, and explicitly seeds the random number generator with the current time. This makes it impossible to reproduce runs that use the AT_RANDOM bytes. This patch adds a command line option and a matching

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-08 Thread Magnus Reftel
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 ref...@spotify.com --- linux-user/elfload.c | 1 - linux-user/main.c| 21