qemu-patch-raspberry4/include
Fam Zheng 972606c4db blockdev: Error out on negative throttling option values
extract_common_blockdev_options() uses qemu_opt_get_number() to parse
the bps/iops numbers to uint64_t, then converts to double and stores in
ThrottleConfig.  The actual parsing is done by strtoull() in
parse_option_number().  Negative numbers are wrapped to large positive
ones, and stored.

We used to reject negative numbers since 7d81c1413c, but this regressed
when the option parsing code was changed later. Now fix this again.

This time, define an arbitrary large upper limit (1e15),  and check the
values so both negative and impractically big numbers are caught and
reported.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-01-20 13:37:37 +01:00
..
block block: Inactivate BDS when migration completes 2016-01-20 13:36:23 +01:00
crypto crypto: Fix typo in example 2016-01-11 11:39:28 +03:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec ivshmem: Store file descriptor for vhost-user negotiation 2016-01-09 23:20:20 +02:00
fpu softfloat: expand out STATUS macro 2015-02-06 16:11:38 +00:00
hw qemu-sparc update 2016-01-18 09:33:36 +00:00
io io: add QIOChannelBuffer class 2015-12-18 12:18:31 +00:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration vmstate: Introduce VMSTATE_VARRAY_MULTPLY 2016-01-16 12:01:23 +00:00
monitor monitor/target-ppc: Define target_get_monitor_def 2015-11-12 14:53:36 +11:00
net ether/slirp: Avoid redefinition of the same constants 2016-01-11 11:01:35 +08:00
qapi error: New error_prepend(), error_reportf_err() 2016-01-13 15:16:17 +01:00
qemu blockdev: Error out on negative throttling option values 2016-01-20 13:37:37 +01:00
qom qom: Change object property iterator API contract 2016-01-18 17:47:58 +01:00
standard-headers linux-headers: update from kvm/next 2015-12-17 15:24:34 +01:00
sysemu qemu-char: add logfile facility to all chardev backends 2016-01-15 18:58:02 +01:00
ui gtk: implement set_echo 2016-01-18 16:36:21 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h elf: add arm note types 2016-01-15 14:55:16 +00:00
glib-compat.h glib: add compatibility interface for g_hash_table_add() 2015-10-30 09:01:03 +01:00
qemu-common.h osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h 2016-01-11 11:39:28 +03:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00