Re: [Qemu-devel] [PATCH v3] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-22 Thread Amit Shah
On (Mon) 21 Jul 2014 [17:44:37], John Snow wrote: If a negative integer is used for the max_bytes parameter, QEMU currently calls abort() and leaves behind a core dump. This patch adds a simple error message to make the reason for the termination clearer. It avoids the abort(), which in the

Re: [Qemu-devel] [PATCH v3] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-22 Thread Amit Shah
On (Mon) 21 Jul 2014 [17:44:37], John Snow wrote: If a negative integer is used for the max_bytes parameter, QEMU currently calls abort() and leaves behind a core dump. This patch adds a simple error message to make the reason for the termination clearer. There is an underlying insufficiency

Re: [Qemu-devel] [PATCH v3] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-22 Thread Markus Armbruster
Amit Shah amit.s...@redhat.com writes: On (Mon) 21 Jul 2014 [17:44:37], John Snow wrote: If a negative integer is used for the max_bytes parameter, QEMU currently calls abort() and leaves behind a core dump. This patch adds a simple error message to make the reason for the termination

Re: [Qemu-devel] [PATCH v3] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-22 Thread Markus Armbruster
Amit Shah amit.s...@redhat.com writes: On (Mon) 21 Jul 2014 [17:44:37], John Snow wrote: If a negative integer is used for the max_bytes parameter, QEMU currently calls abort() and leaves behind a core dump. This patch adds a simple error message to make the reason for the termination

Re: [Qemu-devel] [PATCH v3] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-22 Thread Amit Shah
On (Tue) 22 Jul 2014 [13:41:43], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: On (Mon) 21 Jul 2014 [17:44:37], John Snow wrote: If a negative integer is used for the max_bytes parameter, QEMU currently calls abort() and leaves behind a core dump. This patch adds a

Re: [Qemu-devel] [PATCH v3] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-22 Thread John Snow
On 07/22/2014 07:48 AM, Amit Shah wrote: On (Tue) 22 Jul 2014 [13:41:43], Markus Armbruster wrote: Amit Shah amit.s...@redhat.com writes: On (Mon) 21 Jul 2014 [17:44:37], John Snow wrote: If a negative integer is used for the max_bytes parameter, QEMU currently calls abort() and leaves

Re: [Qemu-devel] [PATCH v3] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-22 Thread Amit Shah
On (Tue) 22 Jul 2014 [11:30:28], John Snow wrote: On 07/22/2014 07:48 AM, Amit Shah wrote: -assert(vrng-conf.max_bytes = INT64_MAX); +/* Workaround: Property parsing does not enforce unsigned integers, + * So this is a hack to reject such numbers. */ +if

[Qemu-devel] [PATCH v3] virtio-rng: Add human-readable error message for negative max-bytes parameter

2014-07-21 Thread John Snow
If a negative integer is used for the max_bytes parameter, QEMU currently calls abort() and leaves behind a core dump. This patch adds a simple error message to make the reason for the termination clearer. There is an underlying insufficiency in the parameter parsing code of QEMU that renders it