commit_msg
stringlengths
1
24.2k
commit_hash
stringlengths
2
84
project
stringlengths
2
40
source
stringclasses
4 values
labels
int64
0
1
repo_url
stringlengths
26
70
commit_url
stringlengths
74
118
commit_date
stringlengths
25
25
nvme: Account for failed and invalid operations Signed-off-by: Alberto Garcia <[email protected]> Message-id: 678dc67da229759d404b44f7cc2bf5ed8bf8ad14.1446044838.git.berto@igalia.com Signed-off-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
1753f3dc177a82f8b3c5ea8d2a32737db9411dd4
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/1753f3dc177a82f8b3c5ea8d2a32737db9411dd4
2015-11-12 16:22:46+01:00
memory: don't try to adjust endianness for zero length eventfd There's no need to adjust endianness for zero length eventfd since the data wrote was actually ignored by kernel. So skip the adjust in this case to fix a possible crash when trying to use wildcard mmio eventfd in ppc. Cc: Greg Kurz <[email protected]> Cc: Peter Maydell <[email protected]> Cc: Paolo Bonzini <[email protected]> Acked-by: Greg Kurz <[email protected]> Signed-off-by: Jason Wang <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
b8aecea23aaccf39da54c77ef248f5fa50dcfbc1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b8aecea23aaccf39da54c77ef248f5fa50dcfbc1
2015-11-12 15:49:32+02:00
PPC: mac99: Always add USB controller The mac99 machines always have a USB controller. Usually not having one around doesn't hurt quite as much, but Mac OS 9 really really wants one or it crashes on bootup. So always add OHCI to make it happy. Signed-off-by: Alexander Graf <[email protected]> Signed-off-by: Mark Cave-Ayland <[email protected]> Reviewed-by: David Gibson <[email protected]> Signed-off-by: David Gibson <[email protected]>
72f1f97d4927f798167855fda7881b0e22756b20
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/72f1f97d4927f798167855fda7881b0e22756b20
2015-11-12 13:15:54+11:00
migration_init: Fix lock initialisation/make it explicit Peter reported a lock error on MacOS after my a82d593b patch. migrate_get_current does one-time initialisation of a bunch of variables. migrate_init does reinitialisation even on a 2nd migrate after a cancel. The problem here was that I'd initialised the mutex in migrate_get_current, and the memset in migrate_init corrupted it. Remove the memset and replace it by explicit initialisation of fields that need initialising; this also turns out to be simpler than the old code that had to preserve some fields. Reported-by: Peter Maydell <[email protected]> Signed-off-by: Dr. David Alan Gilbert <[email protected]> Fixes: a82d593b Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
389775d1f67b2c8f44f9473b1e5363735972e389
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/389775d1f67b2c8f44f9473b1e5363735972e389
2015-11-12 17:55:27+01:00
ui: Use g_new() & friends where that makes obvious sense g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form sizeof(T). Same Coccinelle semantic patch as in commit b45c03f. Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
fedf0d35aafc4f1f1e5f6dbc80cb23ae1ae49f0b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fedf0d35aafc4f1f1e5f6dbc80cb23ae1ae49f0b
2015-11-06 15:42:38+03:00
target-i386: Don't left shift negative constant Left shift of negative values is undefined behavior. Detected by clang: qemu/target-i386/translate.c:2423:26: runtime error: left shift of negative value -8 This changes the code to reverse the sign after the left shift. Signed-off-by: Eduardo Habkost <[email protected]>
712b4243c761cb6ab6a4367a160fd2a42e2d4b76
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/712b4243c761cb6ab6a4367a160fd2a42e2d4b76
2015-10-27 15:52:11-02:00
qga: guest-get-memory-blocks shouldn't fail for unexposed memory blocks Some guests don't expose memory blocks via sysfs at all. This shouldn't be a failure, instead just return an empty list. For other access failures we still report an error. Signed-off-by: Michael Roth <[email protected]>
f693fe6ef402bdcf89b3979bf004c4c5bf646724
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f693fe6ef402bdcf89b3979bf004c4c5bf646724
2015-10-19 18:28:07-05:00
migration: fix deadlock Release qemu global mutex before call synchronize_rcu(). synchronize_rcu() waiting for all readers to finish their critical sections. There is at least one critical section in which we try to get QGM (critical section is in address_space_rw() and prepare_mmio_access() is trying to aquire QGM). Both functions (migration_end() and migration_bitmap_extend()) are called from main thread which is holding QGM. Thus there is a race condition that ends up with deadlock: main thread working thread Lock QGA | | Call KVM_EXIT_IO handler | | | Open rcu reader's critical section Migration cleanup bh | | | synchronize_rcu() is | waiting for readers | | prepare_mmio_access() is waiting for QGM \ / deadlock The patch changes bitmap freeing from direct g_free after synchronize_rcu to free inside call_rcu. Signed-off-by: Denis V. Lunev <[email protected]> Reported-by: Igor Redko <[email protected]> Tested-by: Igor Redko <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Juan Quintela <[email protected]> CC: Anna Melekhova <[email protected]> CC: Juan Quintela <[email protected]> CC: Amit Shah <[email protected]> CC: Paolo Bonzini <[email protected]> CC: Wen Congyang <[email protected]>
60be6340796e66b5ac8aac2d98dde5c79336a89c
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/60be6340796e66b5ac8aac2d98dde5c79336a89c
2015-10-15 08:14:13+02:00
tcg: Allocate a guard page after code_gen_buffer This will catch any overflow of the buffer. Add a native win32 alternative for alloc_code_gen_buffer; remove the malloc alternative. Signed-off-by: Richard Henderson <[email protected]>
f293709c6af7a65a9bcec09cdba7a60183657a3e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f293709c6af7a65a9bcec09cdba7a60183657a3e
2015-10-07 20:36:53+11:00
vfio/pci: Cleanup vfio_early_setup_msix() error path With the addition of the Chelsio quirk we have an error path out of vfio_early_setup_msix() that doesn't free the allocated VFIOMSIXInfo struct. This doesn't introduce a leak as it still gets freed in the vfio_put_device() path, but it's complicated and sloppy to rely on that. Restructure to free the allocated data on error and only link it into the vdev on success. Signed-off-by: Alex Williamson <[email protected]> Reported-by: Laszlo Ersek <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]>
b5bd049fa907bccc4600ad1855e1c9c0e62f0be3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b5bd049fa907bccc4600ad1855e1c9c0e62f0be3
2015-09-23 13:04:43-06:00
target-mips: get rid of MIPS_DEBUG_SIGN_EXTENSIONS MIPS_DEBUG_SIGN_EXTENSIONS was used sometimes ago to verify that 32-bit instructions correctly sign extend their results. It's now not need anymore, remove it. Cc: Leon Alrae <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]> Reviewed-by: Leon Alrae <[email protected]> Signed-off-by: Leon Alrae <[email protected]>
b307446e04232b3a87e9da04886895a8e5a4a407
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b307446e04232b3a87e9da04886895a8e5a4a407
2015-09-18 09:20:48+01:00
vnc: fix memory corruption (CVE-2015-5225) The _cmp_bytes variable added by commit "bea60dd ui/vnc: fix potential memory corruption issues" can become negative. Result is (possibly exploitable) memory corruption. Reason for that is it uses the stride instead of bytes per scanline to apply limits. For the server surface is is actually fine. vnc creates that itself, there is never any padding and thus scanline length always equals stride. For the guest surface scanline length and stride are typically identical too, but it doesn't has to be that way. So add and use a new variable (guest_ll) for the guest scanline length. Also rename min_stride to line_bytes to make more clear what it actually is. Finally sprinkle in an assert() to make sure we never use a negative _cmp_bytes again. Reported-by: 范祚至(库特) <[email protected]> Reviewed-by: P J P <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
eb8934b0418b3b1d125edddc4fc334a54334a49b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/eb8934b0418b3b1d125edddc4fc334a54334a49b
2015-08-26 17:54:33+02:00
ahci.c: Don't assume AHCIState's parent is AHCIPCIState The AHCIState struct can either have AHCIPCIState or SysbusAHCIState as a parent. The ahci_irq_lower() and ahci_irq_raise() functions assume that it is always AHCIPCIState, which is not always the case, which causes a seg fault. Verify what the container of AHCIState is before setting the PCIDevice struct. Signed-off-by: Alistair Francis <[email protected]> Acked-by: John Snow <[email protected]> Reviewed-by: Peter Crosthwaite <[email protected]> Signed-off-by: Peter Maydell <[email protected]>
bb639f829f139ddc83325b3b6825f93096ee44f1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/bb639f829f139ddc83325b3b6825f93096ee44f1
2015-09-08 17:38:45+01:00
hw/net: handle flow control in mcf_fec driver receiver The network mcf_fec driver emulated receive side method is not dealing with network queue flow control properly. Modify the receive side to check if we have enough space in the descriptors to store the current packet. If not we process none of it and return 0. When the guest frees up some buffers through its descriptors we signal the qemu net layer to send more packets. [Fixed coding style: 4-space indent and curly braces on if statement. --Stefan] Signed-off-by: Greg Ungerer <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
ff1d2ac949dc94d8a0e71fd46939fb69c2ef075b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ff1d2ac949dc94d8a0e71fd46939fb69c2ef075b
2015-07-28 11:27:53+01:00
scsi: fix buffer overflow in scsi_req_parse_cdb (CVE-2015-5158) This is a guest-triggerable buffer overflow present in QEMU 2.2.0 and newer. scsi_cdb_length returns -1 as an error value, but the caller does not check it. Luckily, the massive overflow means that QEMU will just SIGSEGV, making the impact much smaller. Reported-by: Zhu Donghai (朱东海) <[email protected]> Fixes: 1894df02811f6b79ea3ffbf1084599d96f316173 Reviewed-by: Fam Zheng <[email protected]> Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]>
c170aad8b057223b1139d72e5ce7acceafab4fa9
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c170aad8b057223b1139d72e5ce7acceafab4fa9
2015-07-24 13:57:44+02:00
vnc: fix memory leak If vnc's password is configured, it will leak memory which cipher variable pointed on every vnc connection. Cc: Daniel P. Berrange <[email protected]> Reviewed-by: Daniel P. Berrange <[email protected]> Signed-off-by: Gonglei <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
60928458e5eea3c77a7eb0a4194927872f463947
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/60928458e5eea3c77a7eb0a4194927872f463947
2015-07-24 13:57:44+02:00
hw/display/exynos4210_fimd: Fix bit-swapping code fimd_swap_data() includes code to reverse the bits in a 64-bit integer, but an off-by-one error meant that it would try to shift off the top of the integer. Correct the bug (spotted by Coverity). Signed-off-by: Peter Maydell <[email protected]> Message-id: [email protected]
644ead5be1a851abff16886240c5c6fc1c5137c0
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/644ead5be1a851abff16886240c5c6fc1c5137c0
2015-06-15 18:06:08+01:00
raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size Image files with an unaligned image size have a final hole that starts at EOF, i.e. in the middle of a sector. Currently, *pnum == 0 is returned when checking the status of this sector. In qemu-img, this triggers an assertion failure. In order to fix this, one type for the sector that contains EOF must be found. Treating a hole as data is safe, so this patch rounds the calculated number of data sectors up, so that a partial sector at EOF is treated as a full data sector. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1229394 Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Eric Blake <[email protected]> Tested-by: Cole Robinson <[email protected]>
b8684454e152ca2e100f4b59d80de2be27186206
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b8684454e152ca2e100f4b59d80de2be27186206
2015-06-12 15:54:01+02:00
Add a protective section footer Badly formatted migration streams can go undetected or produce misleading errors due to a lock of checking at the end of sections. In particular a section that adds an extra 0x00 at the end causes what looks like a normal end of stream and thus doesn't produce any errors, and something that ends in a 0x01..0x04 kind of look like real section headers and then fail when the section parser tries to figure out which section they are. This is made worse by the choice of 0x00..0x04 being small numbers that are particularly common in normal section data. This patch adds a section footer consisting of a marker (0x7e - ~) followed by the section-id that was also sent in the header. If they mismatch then it throws an error explaining which section was being loaded. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
f68945d42bab700d95b87f62e0898606ce2421ed
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f68945d42bab700d95b87f62e0898606ce2421ed
2015-06-12 06:54:01+02:00
monitor: Drop broken, unused asynchronous command interface The asynchronous monitor command interface goes back to commit 940cc30 (Jan 2010). Added a third case to command execution. The hope back then according to the commit message was that all commands get converted to the asynchronous interface, killing off the other two cases. Didn't happen. The initial asynchronous commands balloon and info balloon were converted back to synchronous long ago (commit 96637bc and d72f32), with commit messages calling the asynchronous interface "not fully working" and "deprecated". The only other user went away in commit 3b5704b. New code generally uses synchronous commands and asynchronous events. What exactly is still "not fully working" with asynchronous commands? Well, here's a bug that defeats actual asynchronous use pretty reliably: the reply's ID is wrong (and has always been wrong) unless you use the command synchronously! To reproduce, we need an asynchronous command, so we have to go back before commit 3b5704b. Run QEMU with spice: $ qemu-system-x86_64 -nodefaults -S -spice port=5900,disable-ticketing -qmp stdio {"QMP": {"version": {"qemu": {"micro": 94, "minor": 2, "major": 2}, "package": ""}, "capabilities": []}} Connect a spice client in another terminal: $ remote-viewer spice://localhost:5900 Set up a migration destination dummy in a third terminal: $ socat TCP-LISTEN:12345 STDIO Now paste the following into the QMP monitor: { "execute": "qmp_capabilities", "id": "i0" } { "execute": "client_migrate_info", "id": "i1", "arguments": { "protocol": "spice", "hostname": "localhost", "port": 12345 } } { "execute": "query-kvm", "id": "i2" } Produces two replies immediately, one to qmp_capabilities, and one to query-kvm: {"return": {}, "id": "i0"} {"return": {"enabled": false, "present": true}, "id": "i2"} Both are correct. Two lines of debug output from libspice-server not shown. Now EOF socat's standard input to make it close the connection. This makes the asynchronous client_migrate_info complete. It replies: {"return": {}} Bug: "id": "i1" is missing. Two lines of debug output from libspice-server not shown. Cherry on top: storage for the missing ID is leaked. Get rid of this stuff before somebody hurts himself with it. Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Luiz Capitulino <[email protected]>
65207c59d99f2260c5f1d3b9c491146616a522aa
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/65207c59d99f2260c5f1d3b9c491146616a522aa
2015-06-02 09:59:13+02:00
qemu-io: prompt for encryption keys when required The qemu-io tool does not check if the image is encrypted so historically would silently corrupt the sectors by writing plain text data into them instead of cipher text. The earlier commit turns this mistake into a fatal abort, so check for encryption and prompt for key when required. This enables us to add unit tests to ensure we don't break the ability of qemu-img to convert existing encrypted qcow2 files into a non-encrypted format. Signed-off-by: Daniel P. Berrange <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
8caf02127e92939fff39b63a7ff1a5834d320191
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8caf02127e92939fff39b63a7ff1a5834d320191
2015-05-22 17:08:01+02:00
block/parallels: implement parallels_check method of block driver The check is very simple at the moment. It calculates necessary stats and fix only the following errors: - space leak at the end of the image. This would happens due to preallocation - clusters outside the image are zeroed. Nothing else could be done here Signed-off-by: Denis V. Lunev <[email protected]> Reviewed-by: Roman Kagan <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Roman Kagan <[email protected]> Message-id: [email protected] CC: Kevin Wolf <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
49ad6467313d17486af9029413debb709dc971a8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/49ad6467313d17486af9029413debb709dc971a8
2015-05-22 09:37:32+01:00
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index is always bounded by the allocated memory. This is CVE-2015-3456. Signed-off-by: Petr Matousek <[email protected]> Reviewed-by: John Snow <[email protected]> Signed-off-by: John Snow <[email protected]>
e907746266721f305d67bc0718795fedee2e824c
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e907746266721f305d67bc0718795fedee2e824c
2015-05-12 18:52:57-04:00
pci: Fix crash with illegal "-net nic, model=xxx" option Current QEMU crashes when specifying an illegal model with the "-net nic,model=xxx" option, e.g.: $ qemu-system-x86_64 -net nic,model=n/a qemu-system-x86_64: Unsupported NIC model: n/a Program received signal SIGSEGV, Segmentation fault. The gdb backtrace looks like this: 0x0000555555965fe0 in error_get_pretty (err=0x0) at util/error.c:152 152 return err->msg; (gdb) bt 0 0x0000555555965fe0 in error_get_pretty (err=0x0) at util/error.c:152 1 0x0000555555965ffd in error_report_err (err=0x0) at util/error.c:157 2 0x0000555555809c90 in pci_nic_init_nofail (nd=0x555555e49860 <nd_table>, rootbus=0x5555564409b0, default_model=0x55555598c37b "e1000", default_devaddr=0x0) at hw/pci/pci.c:1663 3 0x0000555555691e42 in pc_nic_init (isa_bus=0x555556f71900, pci_bus=0x5555564409b0) at hw/i386/pc.c:1506 4 0x000055555569396b in pc_init1 (machine=0x5555562abbf0, pci_enabled=1, kvmclock_enabled=1) at hw/i386/pc_piix.c:248 5 0x0000555555693d27 in pc_init_pci (machine=0x5555562abbf0) at hw/i386/pc_piix.c:310 6 0x000055555572ddf5 in main (argc=3, argv=0x7fffffffe018, envp=0x7fffffffe038) at vl.c:4226 The problem is that pci_nic_init_nofail() does not check whether the err parameter from pci_nic_init has been set up and thus passes a NULL pointer to error_report_err(). Fix it by correctly checking the err parameter. Signed-off-by: Thomas Huth <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Jason Wang <[email protected]> Signed-off-by: Peter Maydell <[email protected]>
4d0ecde44ae6dab3aa9d10c23e61d9d43789731a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4d0ecde44ae6dab3aa9d10c23e61d9d43789731a
2015-04-13 12:11:44+01:00
qga: fitering out -fstack-protector-strong configure script may add -fstack-protector-strong option instead of -fstack-protector-all, depending on availability ( see commit 63678e17c ). Both options have to by filtered out for qga-vss.dll, otherwise MinGW cross-compilation fails at linking stage. Signed-off-by: Joseph Hindin <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
420957a5982113416c5e442687de5e1ffaffeafc
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/420957a5982113416c5e442687de5e1ffaffeafc
2015-04-02 15:57:27+02:00
machine: query dump-guest-core machine property Running qemu-bin ... -machine pc,dump-guest-core=on leads to crash: x86_64-softmmu/qemu-system-x86_64 -machine pc,dump-guest-core=on qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. Aborted (core dumped) This happens because the commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Fix this by querying machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]>
47c8ca533e502955a4e1b24056639c79500ab8f8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/47c8ca533e502955a4e1b24056639c79500ab8f8
2015-03-11 18:17:54+01:00
block/xen: Use blk_new_open() in blk_connect() As part of the required changes, this fixes a bug where specifying an invalid driver would result in the block layer probing the image format; now it will result in an error, unless "<unset>" is specified as the driver name. Fixing this would require further work on the xen_disk code which does not seem worth it (at this point and for this patch). Signed-off-by: Max Reitz <[email protected]> Reviewed-by: Eric Blake <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
9a925356e3a109c412240721890c1e6c1a86d286
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/9a925356e3a109c412240721890c1e6c1a86d286
2015-02-16 15:07:18+00:00
PPC: Fix crash on spapr_tce_table_finalize() spapr_tce_table_finalize() can SEGV if the object was not previously realized. In particular this can be triggered by running qemu-system-ppc -device spapr-tce-table,? The basic problem is that we have mismatched initialization versus finalization: spapr_tce_table_finalize() is attempting to undo things that are done in spapr_tce_table_realize(), not an instance_init function. Therefore, replace spapr_tce_table_finalize() with spapr_tce_table_unrealize(). Signed-off-by: David Gibson <[email protected]> Cc: [email protected] Signed-off-by: Alexander Graf <[email protected]>
5f9490de566c5b092a6cfedc3c7a37a9c9dee917
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5f9490de566c5b092a6cfedc3c7a37a9c9dee917
2015-01-07 16:16:26+01:00
coverity: Model GLib string allocation partially Without a model, Coverity can't know that the result of g_strdup() needs to be fed to g_free(). One way to get such a model is to scan GLib, build a derived model file with cov-collect-models, and use that when scanning QEMU. Unfortunately, the Coverity Scan service we use doesn't support that. Thus, we're stuck with the other way: write a user model. Doing that for all of GLib is hardly practical. I'm doing it for the "String Utility Functions" we actually use that return dynamically allocated strings. In a local scan, this flags 20 additional RESOURCE_LEAKs. The ones I checked look genuine. It also loses a NULL_RETURNS about ppce500_init() using qemu_find_file() without error checking. I don't understand why. Signed-off-by: Markus Armbruster <[email protected]> Acked-by: Paolo Bonzini <[email protected]>
e4b77daa5724a9dd41aaa44d2dea4b8e92351081
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e4b77daa5724a9dd41aaa44d2dea4b8e92351081
2015-02-05 17:16:07+01:00
target-arm: fix for exponent comparison in recpe_f64 f64 exponent in HELPER(recpe_f64) should be compared to 2045 rather than 1023 (FPRecipEstimate in ARMV8 spec). This fixes incorrect underflow handling when flushing denormals to zero in the FRECPE instructions operating on 64-bit values. Signed-off-by: Ildar Isaev <[email protected]> Signed-off-by: Peter Maydell <[email protected]>
fc1792e9aa36227ee9994757974f9397684e1a48
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fc1792e9aa36227ee9994757974f9397684e1a48
2015-02-05 13:37:25+00:00
fw_cfg: fix endianness in fw_cfg_data_mem_read() / _write() (1) Let's contemplate what device endianness means, for a memory mapped device register (independently of QEMU -- that is, on physical hardware). It determines the byte order that the device will put on the data bus when the device is producing a *numerical value* for the CPU. This byte order may differ from the CPU's own byte order, therefore when software wants to consume the *numerical value*, it may have to swap the byte order first. For example, suppose we have a device that exposes in a 2-byte register the number of sheep we have to count before falling asleep. If the value is decimal 37 (0x0025), then a big endian register will produce [0x00, 0x25], while a little endian register will produce [0x25, 0x00]. If the device register is big endian, but the CPU is little endian, the numerical value will read as 0x2500 (decimal 9472), which software has to byte swap before use. However... if we ask the device about who stole our herd of sheep, and it answers "XY", then the byte representation coming out of the register must be [0x58, 0x59], regardless of the device register's endianness for numeric values. And, software needs to copy these bytes into a string field regardless of the CPU's own endianness. (2) QEMU's device register accessor functions work with *numerical values* exclusively, not strings: The emulated register's read accessor function returns the numerical value (eg. 37 decimal, 0x0025) as a *host-encoded* uint64_t. QEMU translates this value for the guest to the endianness of the emulated device register (which is recorded in MemoryRegionOps.endianness). Then guest code must translate the numerical value from device register to guest CPU endianness, before including it in any computation (see (1)). (3) However, the data register of the fw_cfg device shall transfer strings *only* -- that is, opaque blobs. Interpretation of any given blob is subject to further agreement -- it can be an integer in an independently determined byte order, or a genuine string, or an array of structs of integers (in some byte order) and fixed size strings, and so on. Because register emulation in QEMU is integer-preserving, not string-preserving (see (2)), we have to jump through a few hoops. (3a) We defined the memory mapped fw_cfg data register as DEVICE_BIG_ENDIAN. The particular choice is not really relevant -- we picked BE only for consistency with the control register, which *does* transfer integers -- but our choice affects how we must host-encode values from fw_cfg strings. (3b) Since we want the fw_cfg string "XY" to appear as the [0x58, 0x59] array on the data register, *and* we picked DEVICE_BIG_ENDIAN, we must compose the host (== C language) value 0x5859 in the read accessor function. (3c) When the guest performs the read access, the immediate uint16_t value will be 0x5958 (in LE guests) and 0x5859 (in BE guests). However, the uint16_t value does not matter. The only thing that matters is the byte pattern [0x58, 0x59], which the guest code must copy into the target string *without* any byte-swapping. (4) Now I get to explain where I screwed up. :( When we decided for big endian *integer* representation in the MMIO data register -- see (3a) --, I mindlessly added an indiscriminate byte-swizzling step to the (little endian) guest firmware. This was a grave error -- it violates (3c) --, but I didn't realize it. I only saw that the code I otherwise intended for fw_cfg_data_mem_read(): value = 0; for (i = 0; i < size; ++i) { value = (value << 8) | fw_cfg_read(s); } didn't produce the expected result in the guest. In true facepalm style, instead of blaming my guest code (which violated (3c)), I blamed my host code (which was correct). Ultimately, I coded ldX_he_p() into fw_cfg_data_mem_read(), because that happened to work. Obviously (...in retrospect) that was wrong. Only because my host happened to be LE, ldX_he_p() composed the (otherwise incorrect) host value 0x5958 from the fw_cfg string "XY". And that happened to compensate for the bogus indiscriminate byte-swizzling in my guest code. Clearly the current code leaks the host endianness through to the guest, which is wrong. Any device should work the same regardless of host endianness. The solution is to compose the host-endian representation (2) of the big endian interpretation (3a, 3b) of the fw_cfg string, and to drop the wrong byte-swizzling in the guest (3c). Brown paper bag time for me. Signed-off-by: Laszlo Ersek <[email protected]> Message-id: [email protected] Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Peter Maydell <[email protected]>
36b62ae6a58f9a588fd33be9386e18a2b90103f5
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/36b62ae6a58f9a588fd33be9386e18a2b90103f5
2015-01-16 11:54:30+00:00
hw/net/xen_nic.c: Free 'netdev->txs' when map 'netdev->rxs' fails When map 'netdev->rxs' fails, need free the original resource, or will cause resource leak. Signed-off-by: Chen Gang <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
b4f72e31b924bec2c18fe0b2a8c6462dbed9dcb2
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b4f72e31b924bec2c18fe0b2a8c6462dbed9dcb2
2015-01-12 10:16:23+00:00
vga: Add mechanism to force the use of a shadow surface This prevents surface sharing which will be necessary to fix cirrus HW cursor support. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
5508099397c480f1c3b4f14b0e64593ebe284b26
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5508099397c480f1c3b4f14b0e64593ebe284b26
2014-12-16 15:14:42+01:00
hw/arm/boot: fix uninitialized scalar variable warning reported by coverity Coverity reports the 'size' may be used uninitialized, but that can't happen, because the caller has checked "if (binfo->dtb_filename || binfo->get_dtb)" before call 'load_dtb'. Here we simply remove the 'if (binfo->get_dtb)' to satisfy coverity. Signed-off-by: zhanghailiang <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]>
a554ecb49d0021fd8bb0fd4f2f6be807b3c8b54f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a554ecb49d0021fd8bb0fd4f2f6be807b3c8b54f
2014-12-11 12:07:53+00:00
bitmap.h: Don't include qemu-common.h This will avoid unexpected circular header dependencies in the future. Signed-off-by: Eduardo Habkost <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
d6aaddfe977417e3df4fc8a0fc0b4cc015909b84
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d6aaddfe977417e3df4fc8a0fc0b4cc015909b84
2014-11-02 10:04:34+03:00
virtio-serial: use aliases instead of duplicate qdev properties virtio-serial-{pci, s390, ccw} all duplicate the qdev properties of their VirtIOSerial child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward property accesses to the VirtIOSerial child. This way no duplication is necessary. Signed-off-by: Gonglei <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]>
4f456d8025c7259c66b2b2bcec99d5c6c94d99be
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4f456d8025c7259c66b2b2bcec99d5c6c94d99be
2014-09-30 11:09:03+02:00
virtio/vhost-scsi: use aliases instead of duplicate qdev properties {virtio, vhost}-scsi-{pci, s390, ccw} all duplicate the qdev properties of their VirtIOSCSI/VHostSCSI child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward property accesses to the VirtIOSCSI/VHostSCSI child. This way no duplication is necessary. Signed-off-by: Gonglei <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]>
c39343fd811a22c921fc08e9e6ca62c8e7539264
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c39343fd811a22c921fc08e9e6ca62c8e7539264
2014-09-30 11:08:41+02:00
qemu-char: Permit only a single "stdio" character device When more than one is used, the terminal settings aren't restored correctly on exit. Fixable. However, such usage makes no sense, because the users race for input, so outlaw it instead. If you want to connect multiple things to stdio, use the mux chardev. Signed-off-by: Li Liu <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
c88930a6866e74953e931ae749781e98e486e5c8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c88930a6866e74953e931ae749781e98e486e5c8
2014-09-20 17:55:53+04:00
target-ppc: Bug Fix: mulldo OV Detection Fix the code to properly detect overflow; the 128 bit signed product must have all zeroes or all ones in the first 65 bits otherwise OV should be set. Example: R3 45F086A5D5887509 R4 0000000000000002 mulldo 3,3,4 Should set XER[OV]. Signed-off-by: Tom Musta <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
9824d01d5d789a57d27360c0f5e8ee44955eb1d7
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/9824d01d5d789a57d27360c0f5e8ee44955eb1d7
2014-09-08 12:50:50+02:00
spice: make sure we don't overflow ssd->buf Related spice-only bug. We have a fixed 16 MB buffer here, being presented to the spice-server as qxl video memory in case spice is used with a non-qxl card. It's also used with qxl in vga mode. When using display resolutions requiring more than 16 MB of memory we are going to overflow that buffer. In theory the guest can write, indirectly via spice-server. The spice-server clears the memory after setting a new video mode though, triggering a segfault in the overflow case, so qemu crashes before the guest has a chance to do something evil. Fix that by switching to dynamic allocation for the buffer. CVE-2014-3615 Cc: [email protected] Cc: [email protected] Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]>
ab9509cceabef28071e41bdfa073083859c949a7
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ab9509cceabef28071e41bdfa073083859c949a7
2014-09-05 12:19:50+02:00
libqtest: Correct small memory leak. Fixes a small memory leak inside of libqtest. After we produce a test path and glib copies the string for itself, we should clean up our temporary copy. Signed-off-by: John Snow <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
a7afc6b8c13c70e9c40b4f666be80600f8ad0b3d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a7afc6b8c13c70e9c40b4f666be80600f8ad0b3d
2014-08-15 18:03:13+01:00
block: Handle failure for potentially large allocations Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses bounce buffer allocations in block.c. While at it, convert bdrv_commit() from plain g_malloc() to qemu_try_blockalign(). Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]>
857d4f46c31d2f4d57d2f0fad9dfb584262bf9b9
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/857d4f46c31d2f4d57d2f0fad9dfb584262bf9b9
2014-08-15 15:07:15+02:00
image-fuzzer: Tool for fuzz tests execution The purpose of the test runner is to prepare the test environment (e.g. create a work directory, a test image, etc), execute a program under test with parameters, indicate a test failure if the program was killed during the test execution and collect core dumps, logs and other test artifacts. The test runner doesn't depend on an image format, so it can be used with any external image generator. [Fixed path to qcow2 format module "qcow2" instead of "../qcow2" since runner.py is no longer in a sub-directory. --Stefan] Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Maria Kustova <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
ad724dd7282520ea13f0626f1c3ef45d65a1b994
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ad724dd7282520ea13f0626f1c3ef45d65a1b994
2014-08-15 18:03:14+01:00
pc-dimm: error out if memory hotplug is not enabled fixes QEMU abort in case it's started without memory hotplug enabled. as result of fix it will print following messages: " -device pc-dimm,id=d1,memdev=m1: memory hotplug is not enabled, enable it on startup -device pc-dimm,id=d1,memdev=m1: Device 'pc-dimm' could not be initialized " Also fixup assert condition to detect hotplug address space overflow. Signed-off-by: Igor Mammedov <[email protected]> Reported-by: Hu Tao <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
9b79a76cdbb43b0b00aaf6e9421298842fc68841
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/9b79a76cdbb43b0b00aaf6e9421298842fc68841
2014-07-06 09:13:54+03:00
disas/libvixl: Fix wrong format strings When the compiler is told to check the arguments of AppendToOutput, it reports several errors of this kind: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int64_t {aka long int}’ [-Werror=format] Fix those bugs by using the correct format strings with PRId64, PRIx64. Signed-off-by: Stefan Weil <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]>
ffebe8997523fd922da58a8e19ddffee6b035429
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ffebe8997523fd922da58a8e19ddffee6b035429
2014-06-29 22:04:28+01:00
qemu_opts_append: Play nicely with QemuOptsList's head When running a libvirt test suite I've noticed the qemu-img is crashing occasionally. Tracing the problem down led me to the following valgrind output: qemu.git $ valgrind -q ./qemu-img create -f qed -obacking_file=/dev/null,backing_fmt=raw qed ==14881== Invalid write of size 8 ==14881== at 0x1D263F: qemu_opts_create (qemu-option.c:692) ==14881== by 0x130782: bdrv_img_create (block.c:5531) ==14881== by 0x118DE0: img_create (qemu-img.c:462) ==14881== by 0x11E7E4: main (qemu-img.c:2830) ==14881== Address 0x11fedd38 is 24 bytes inside a block of size 232 free'd ==14881== at 0x4C2CA5E: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==14881== by 0x592D35E: g_realloc (in /usr/lib64/libglib-2.0.so.0.3800.2) ==14881== by 0x1D38D8: qemu_opts_append (qemu-option.c:1129) ==14881== by 0x13075E: bdrv_img_create (block.c:5528) ==14881== by 0x118DE0: img_create (qemu-img.c:462) ==14881== by 0x11E7E4: main (qemu-img.c:2830) ==14881== Formatting 'qed', fmt=qed size=0 backing_file='/dev/null' backing_fmt='raw' cluster_size=65536 ==14881== Invalid write of size 8 ==14881== at 0x1D28BE: qemu_opts_del (qemu-option.c:750) ==14881== by 0x130BF3: bdrv_img_create (block.c:5638) ==14881== by 0x118DE0: img_create (qemu-img.c:462) ==14881== by 0x11E7E4: main (qemu-img.c:2830) ==14881== Address 0x11fedd38 is 24 bytes inside a block of size 232 free'd ==14881== at 0x4C2CA5E: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==14881== by 0x592D35E: g_realloc (in /usr/lib64/libglib-2.0.so.0.3800.2) ==14881== by 0x1D38D8: qemu_opts_append (qemu-option.c:1129) ==14881== by 0x13075E: bdrv_img_create (block.c:5528) ==14881== by 0x118DE0: img_create (qemu-img.c:462) ==14881== by 0x11E7E4: main (qemu-img.c:2830) ==14881== The problem is apparently in the qemu_opts_append(). Well, if it gets called twice or more. On the first call, when @dst is NULL some initialization is done during which @dst->head list gets initialized. The list is initialized in a way, so that the list tail points at the list head. However, the next time qemu_opts_append() is called for new options to be added, g_realloc() may move @dst to a new address making the old list tail point at an invalid address. If that's the case, we must update the list pointers. Signed-off-by: Michal Privoznik <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
a760715095e9cda6eb97486c040aa35f82297945
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a760715095e9cda6eb97486c040aa35f82297945
2014-06-26 15:53:52+02:00
vl: allow other threads to do qemu_system_vmstop_request There patch protects vmstop_requested with a lock and introduces qemu_system_vmstop_request_prepare. Together with the new call to qemu_vmstop_requested in vm_start, qemu_system_vmstop_request_prepare avoids a race where the VM could remain stopped even though the iostatus of a block device has already been set (for example). qemu_system_vmstop_request_prepare however also lets the caller thread delay observation of the state change until it has itself communicated that change to the user. This delay avoids any possibility of a wrong reordering of the BLOCK_IO_ERROR event and the subsequent STOP event. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
74892d2468b9f0c56b915ce94848d6f7fac39740
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/74892d2468b9f0c56b915ce94848d6f7fac39740
2014-06-23 16:36:13+08:00
target-mips: implement UserLocal Register From MIPS documentation (Volume III): UserLocal Register (CP0 Register 4, Select 2) Compliance Level: Recommended. The UserLocal register is a read-write register that is not interpreted by the hardware and conditionally readable via the RDHWR instruction. This register only exists if the Config3-ULRI register field is set. Privileged software may write this register with arbitrary information and make it accessible to unprivileged software via register 29 (ULR) of the RDHWR instruction. To do so, bit 29 of the HWREna register must be set to a 1 to enable unprivileged access to the register. Signed-off-by: Petar Jovanovic <[email protected]> Reviewed-by: Andreas Färber <[email protected]> Reviewed-by: Aurelien Jarno <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
d279279e2b5cd40dbcc863fb66a695990f304077
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d279279e2b5cd40dbcc863fb66a695990f304077
2014-06-18 18:10:47+02:00
block: asynchronously stop the VM on I/O errors With virtio-blk dataplane, I/O errors might occur while QEMU is not in the main I/O thread. However, it's invalid to call vm_stop when we're neither in a VCPU thread nor in the main I/O thread, even if we were to take the iothread mutex around it. To avoid this problem, we can raise a request to the main I/O thread, similar to what QEMU does when vm_stop is called from a CPU thread. We know that bdrv_error_action is called from an AIO callback, and the moment at which the callback will fire is not well-defined; it depends on the moment at which the disk or OS finishes the operation, which can happen at any time. Note that QEMU is certainly not in a CPU thread and we do not need to call cpu_stop_current() like vm_stop() does. However, we need to ensure that any action taken by management will result in correct detection of the error _and_ a running VM. In particular: - the event must be raised after the iostatus has been set, so that "info block" will return an iostatus that matches the event. - the VM must be stopped after the iostatus has been set, so that "info block" will return an iostatus that matches the runstate. The ordering between the STOP and BLOCK_IO_ERROR events is preserved; BLOCK_IO_ERROR is documented to come first. This makes bdrv_error_action() thread safe (assuming QMP events are, which is attacked by a separate series). Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
2bd3bce8efebe86b031beab5c0e3b9bbaec0b502
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2bd3bce8efebe86b031beab5c0e3b9bbaec0b502
2014-06-23 16:36:13+08:00
target-ppc: Remove PVR check from migration Currently migration fails if CPU version (PVR register) is different even a bit. This check is performed at the very end of migration when device states are sent. This is too late for management software and we need to provide a way for the user to make sure that migration will succeed if QEMU is started with appropritate command line parameters. This removes the PVR check. This resets PVR to the default value as the existing VMSTATE record for SPR array sends all 1024 registers unconditionally and overwrites the destination PVR. If the user wants some guarantees for migration to succeed, then a CPU name or "host" CPU with a "compat" option (on its way to upsteam) should be used and KVM or TCG is expected to fail on unsupported values at the moment of QEMU start. Signed-off-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
569be9f0551f5941335afa525b2b83d4dfb4210c
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/569be9f0551f5941335afa525b2b83d4dfb4210c
2014-06-16 13:24:27+02:00
qdev: Add test of qdev_prop_check_global This will generate a warning from "make check": ... GTESTER tests/test-qdev-global-props Warning: "-global dynamic-prop-type-bad.prop3=103" not used GTESTER tests/check-qom-interface ... If the warning is not generated, the test will fail. Signed-off-by: Don Slutz <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]>
711e2f1e9ecad845e142fdddbbf1e8037bce902b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/711e2f1e9ecad845e142fdddbbf1e8037bce902b
2014-06-05 19:20:38+03:00
qcow1: Check maximum cluster size Huge values for header.cluster_bits cause unbounded allocations (e.g. for s->cluster_cache) and crash qemu this way. Less huge values may survive those allocations, but can cause integer overflows later on. The only cluster sizes that qemu can create are 4k (for standalone images) and 512 (for images with backing files), so we can limit it to 64k. Cc: [email protected] Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Benoit Canet <[email protected]>
7159a45b2bf2dcb9f49f1e27d1d3d135a0247a2f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/7159a45b2bf2dcb9f49f1e27d1d3d135a0247a2f
2014-05-19 11:36:49+02:00
virtio-scsi: fix buffer overrun on invalid state load CVE-2013-4542 hw/scsi/scsi-bus.c invokes load_request. virtio_scsi_load_request does: qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem)); this probably can make elem invalid, for example, make in_num or out_num huge, then: virtio_scsi_parse_req(s, vs->cmd_vqs[n], req); will do: if (req->elem.out_num > 1) { qemu_sgl_init_external(req, &req->elem.out_sg[1], &req->elem.out_addr[1], req->elem.out_num - 1); } else { qemu_sgl_init_external(req, &req->elem.in_sg[1], &req->elem.in_addr[1], req->elem.in_num - 1); } and this will access out of array bounds. Note: this adds security checks within assert calls since SCSIBusInfo's load_request cannot fail. For now simply disable builds with NDEBUG - there seems to be little value in supporting these. Cc: Andreas Färber <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
3c3ce981423e0d6c18af82ee62f1850c2cda5976
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/3c3ce981423e0d6c18af82ee62f1850c2cda5976
2014-05-05 22:15:02+02:00
hpet: fix buffer overrun on invalid state load CVE-2013-4527 hw/timer/hpet.c buffer overrun hpet is a VARRAY with a uint8 size but static array of 32 To fix, make sure num_timers is valid using VMSTATE_VALID hook. Reported-by: Anthony Liguori <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
3f1c49e2136fa08ab1ef3183fd55def308829584
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/3f1c49e2136fa08ab1ef3183fd55def308829584
2014-05-05 22:15:02+02:00
usb: mtp: fix possible buffer overflow Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Peter Wu <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]>
afa82daf1627645d3ad3e05954b098fff001ab32
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/afa82daf1627645d3ad3e05954b098fff001ab32
2014-05-05 12:57:58+02:00
qom: Fix crash with qom-list and link properties Commit 9561fda8d90e176bef598ba87c42a1bd6ad03ef7 changed the type of 'opaque' for link properties, but missed updating this call site. Reproducer: ./x86_64-softmmu/qemu-system-x86_64 -qmp unix:./qmp.sock,server & ./scripts/qmp/qmp-shell ./qmp.sock (QEMU) qom-list path=//machine/i440fx/pci.0/child[2] Reported-by: Marcin Gibuła <[email protected]> Signed-off-by: Cole Robinson <[email protected]> Message-id: 2f8f007ce2152ac3b65f0811199662799c509225.1397155389.git.crobinso@redhat.com Acked-by: Andreas Färber <[email protected]> Signed-off-by: Peter Maydell <[email protected]>
92b3eeadd9bc72f1f4e5ba1f62a289dc0190e88f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/92b3eeadd9bc72f1f4e5ba1f62a289dc0190e88f
2014-04-11 17:57:36+01:00
hw/ide/ahci.c: Avoid shift left into sign bit Add U suffix to avoid shifting left into the sign bit, which is undefined behaviour. Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
ee25595f0126de0f83da86cc29ba2365be7a50d2
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ee25595f0126de0f83da86cc29ba2365be7a50d2
2014-04-18 10:33:36+04:00
dmg: prevent chunk buffer overflow (CVE-2014-0145) Both compressed and uncompressed I/O is buffered. dmg_open() calculates the maximum buffer size needed from the metadata in the image file. There is currently a buffer overflow since ->lengths[] is accounted against the maximum compressed buffer size but actually uses the uncompressed buffer: switch (s->types[chunk]) { case 1: /* copy */ ret = bdrv_pread(bs->file, s->offsets[chunk], s->uncompressed_chunk, s->lengths[chunk]); We must account against the maximum uncompressed buffer size for type=1 chunks. This patch fixes the maximum buffer size calculation to take into account the chunk type. It is critical that we update the correct maximum since there are two buffers ->compressed_chunk and ->uncompressed_chunk. Signed-off-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Max Reitz <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
f0dce23475b5af5da6b17b97c1765271307734b6
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f0dce23475b5af5da6b17b97c1765271307734b6
2014-04-01 15:22:35+02:00
qcow2: Check refcount table size (CVE-2014-0144) Limit the in-memory reference count table size to 8 MB, it's enough in practice. This fixes an unbounded allocation as well as a buffer overflow in qcow2_refcount_init(). Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Max Reitz <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
5dab2faddc8eaa1fb1abdbe2f502001fc13a1b21
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5dab2faddc8eaa1fb1abdbe2f502001fc13a1b21
2014-04-01 14:19:09+02:00
curl: check data size before memcpy to local buffer. (CVE-2014-0144) curl_read_cb is callback function for libcurl when data arrives. The data size passed in here is not guaranteed to be within the range of request we submitted, so we may overflow the guest IO buffer. Check the real size we have before memcpy to buffer to avoid overflow. Signed-off-by: Fam Zheng <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Max Reitz <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
6d4b9e55fc625514a38d27cff4b9933f617fa7dc
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/6d4b9e55fc625514a38d27cff4b9933f617fa7dc
2014-04-01 14:19:09+02:00
bochs: Check catalog_size header field (CVE-2014-0143) It should neither become negative nor allow unbounded memory allocations. This fixes aborts in g_malloc() and an s->catalog_bitmap buffer overflow on big endian hosts. Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Max Reitz <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
e3737b820b45e54b059656dc3f914f895ac7a88b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e3737b820b45e54b059656dc3f914f895ac7a88b
2014-04-01 13:59:47+02:00
page_check_range: don't bail out early after unprotecting page When checking a page range, if we found that a page was made read-only by QEMU because it contained translated code, we were incorrectly returning immediately after unprotecting that page, rather than continuing to check the entire range, so we might fail to unprotect pages later in the range, or might incorrectly return a "success" result even if later pages were not writable. In particular, this could cause segfaults in a case where signals are delivered back to back on a target architecture which uses trampoline code in the stack frame (as AArch64 currently does). The second signal causes a segfault because the frame cannot be written to (it was protected because we translated and executed the restorer trampoline, and the unprotect logic did not unprotect the whole range). Signed-off-by: Andrei Warkentin <[email protected] [PMM: expanded commit message a bit] Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Peter Maydell <[email protected]>
cd7ccc83512a0cba5aa0c778e7507f267cfb1b16
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cd7ccc83512a0cba5aa0c778e7507f267cfb1b16
2014-04-04 18:16:03+01:00
block: make bdrv_swap rebuild the bs graph node list field. Moving only the node_name one field could lead to some inconsitencies where a node_name was defined on a bs which was not registered in the graph node list. bdrv_swap between a named node bs and a non named node bs would lead to this. bdrv_make_anon would then crash because it would try to remove the bs from the graph node list while it is not in it. This patch remove named node bses from the graph node list before doing the swap then insert them back. Signed-off-by: Benoit Canet <[email protected]> Reviewed-by: Max Reitz <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
90ce8a061bdcc485a56142cae68cfbfff270e634
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/90ce8a061bdcc485a56142cae68cfbfff270e634
2014-03-06 11:33:10+01:00
target-ppc: Enable frsqrtes on Power7 and Power8 The frsqrtes instruction was introduced prior to ISA 2.06 and is support on both the Power7 and Power8 processors. However, this instruction is handled as illegal in the current QEMU emulation machines. This patch enables the existing implemention of frsqrtes in the P7 and P8 machines. Signed-off-by: Tom Musta <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
ce8ca30b398fb74e522be1a9ea87aa7868f27428
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ce8ca30b398fb74e522be1a9ea87aa7868f27428
2014-03-05 03:06:43+01:00
s390x/virtio-hcall: Add range check for hypervisor call The handler for diag 500 did not check whether the requested function was in the supported range, so illegal values could crash QEMU in the worst case. Signed-off-by: Thomas Huth <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> CC: [email protected]
f2c55d1735175ab37ab9f69854460087112d2756
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f2c55d1735175ab37ab9f69854460087112d2756
2014-02-27 09:51:25+01:00
qxl: add sanity check Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]>
9c70434f825fd0d2e89d1aa0f872159378d0aab3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/9c70434f825fd0d2e89d1aa0f872159378d0aab3
2014-02-24 13:00:52+01:00
qapi: Refine human printing of sizes This fixes several bugs or shortcomings of the previous pretty-printer. In particular: * use PRIu64 instead of casting to long long * the exact value is included too * the correct unit of measure (MiB, GiB, etc.) is used. PiB and EiB are added too. * due to an off-by-one error, 512*2^30 was printed as 0.500MiB rather than 512MiB. floor(log2(val)) is equal to 63 - clz(val), while the code used 64. * The desired specification is %g rather than %f, which always uses three decimals in the current code. However %g would switch to scientific notation when the integer part is >= 1000 (e.g. 1000*2^30). To keep the code simple, switch to the higher power when the integer part is >= 1000; overflow is avoided by using frexp instead of clz. Suggested-by: Eric Blake <[email protected]> Reviewed-by: Igor Mammedov <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Andreas Färber <[email protected]>
e41b509d68afb1f329c8558b6edfe2fcbac88e66
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e41b509d68afb1f329c8558b6edfe2fcbac88e66
2014-02-14 21:12:05+01:00
hw/lm32: print error if cpu model is not found QEMU crashed if a the given cpu_model is not found. Signed-off-by: Michael Walle <[email protected]> Reviewed-by: Peter Maydell <[email protected]>
f41152bd9d01ab327c19a3828bb7896d67cf0752
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f41152bd9d01ab327c19a3828bb7896d67cf0752
2014-02-04 19:47:39+01:00
blkdebug: Don't leak bs->file on failure Reported-by: Laszlo Ersek <[email protected]> Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]>
eaf944a43835399f12808aebd0d0a1db6249ed07
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/eaf944a43835399f12808aebd0d0a1db6249ed07
2014-02-09 09:12:39+01:00
migration:fix free XBZRLE decoded_buf wrong When qemu do live migration with xbzrle, qemu malloc decoded_buf at destination end but free it at source end. It will crash qemu by double free error in some scenarios. Splitting the XBZRLE structure for clear logic distinguishing src/dst side. Signed-off-by: ChenLiang <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Reviewed-by: Orit Wasserman <[email protected]> Signed-off-by: GongLei <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
905f26f2221e139ac0e7317ddac158c50f5cf876
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/905f26f2221e139ac0e7317ddac158c50f5cf876
2014-02-04 16:49:24+01:00
rbd: switch from pipe to QEMUBH completion notification rbd callbacks are called from non-QEMU threads. Up until now a pipe was used to signal completion back to the QEMU iothread. The pipe writer code handles EAGAIN using select(2). The select(2) API is not scalable since fd_set size is static. FD_SET() can write beyond the end of fd_set if the file descriptor number is too high. (QEMU's main loop uses poll(2) to avoid this issue with select(2).) Since the pipe itself is quite clumsy to use and QEMUBH is now thread-safe, just schedule a BH from the rbd callback function. This way we can simplify I/O completion in addition to eliminating the potential FD_SET() crash when file descriptor numbers become too high. Crash scenario: QEMU already has 1024 file descriptors open. Hotplug an rbd drive and get the pipe writer to take the select(2) code path. Reviewed-by: Josh Durgin <[email protected]> Tested-by: Josh Durgin <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
e04fb07fd1676e9facd7f3f878c1bbe03bccd26b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e04fb07fd1676e9facd7f3f878c1bbe03bccd26b
2014-01-22 12:07:16+01:00
KVM: Retry KVM_CREATE_VM on EINTR Upstreaming this change from Android (https://android-review.googlesource.com/54211). On heavily loaded machines with many VM instances we see KVM_CREATE_VM failing with EINTR on this path: kvm_dev_ioctl_create_vm -> kvm_create_vm -> kvm_init_mmu_notifier -> mmu_notifier_register -> do_mmu_notifier_register -> mm_take_all_locks which checks if any signals have been raised while it was attaining locks and returns EINTR. Retrying the system call greatly improves reliability. Cc: [email protected] Signed-off-by: thomas knych <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
94ccff133820552a859c0fb95e33a539e0b90a75
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/94ccff133820552a859c0fb95e33a539e0b90a75
2014-01-15 12:58:41+01:00
mempath prefault: fix off-by-one error Fix off-by-one error (noticed by Andrea Arcangeli). Reviewed-by: Paolo Bonzini <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2ba82852894c762299b7d05e9a2be184116b80f0
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2ba82852894c762299b7d05e9a2be184116b80f0
2013-12-30 19:05:11-02:00
target-arm: A64: add support for EXTR This patch adds emulation support for the EXTR instruction. Signed-off-by: Alexander Graf <[email protected]> [claudio: adapted for new decoder, removed a few temporaries, fixed the 32bit bug, added checks for more unallocated cases] Signed-off-by: Claudio Fontana <[email protected]> Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Richard Henderson <[email protected]>
e801de93d0155c0c14d6b4dea1b3577ca36e214b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e801de93d0155c0c14d6b4dea1b3577ca36e214b
2013-12-17 20:12:51+00:00
scsi-disk: reject ANCHOR=1 for UNMAP and WRITE SAME commands Since we report ANC_SUP==0 in VPD page B2h, we need to return an error (ILLEGAL REQUEST/INVALID FIELD IN CDB) for all WRITE SAME requests with ANCHOR==1. Inspired by a similar patch to the LIO in-kernel target. Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
823bd7391c96ba675f20fd6d952d1cb6e1ffb851
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/823bd7391c96ba675f20fd6d952d1cb6e1ffb851
2013-12-03 15:26:49+01:00
block/iscsi: check WRITE SAME support differently depending on MAY_UNMAP The current check is right for MAY_UNMAP=1. For MAY_UNMAP=0, just try and fall back to regular writes as soon as a WRITE SAME command fails. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Peter Lieven <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
fa6252b0565526ec2347e248172f91771e0d9f47
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fa6252b0565526ec2347e248172f91771e0d9f47
2013-12-03 15:26:49+01:00
scsi: Allocate SCSITargetReq r->buf dynamically [CVE-2013-4344] r->buf is hardcoded to 2056 which is (256 + 1) * 8, allowing 256 luns at most. If more than 256 luns are specified by user, we have buffer overflow in scsi_target_emulate_report_luns. To fix, we allocate the buffer dynamically. Signed-off-by: Asias He <[email protected]> Tested-by: Michael Roth <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
846424350b292f16b732b573273a5c1f195cd7a3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/846424350b292f16b732b573273a5c1f195cd7a3
2013-10-09 17:24:18+02:00
qemu-char: Fix potential out of bounds access to local arrays Latest gcc-4.8 supports a new option -fsanitize=address which activates an AddressSanitizer. This AddressSanitizer stops the QEMU system emulation very early because two character arrays of size 8 are potentially written with 9 bytes. Commit 6ea314d91439741e95772dfbab98b4135e04bebb added the code. There is no obvious reason why width or height could need 8 characters, so reduce it to 7 characters which together with the terminating '\0' fit into the arrays. Cc: qemu-stable <[email protected]> Signed-off-by: Stefan Weil <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
49aa4058ac6dd0081aaa45776f07c98df397ca5e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/49aa4058ac6dd0081aaa45776f07c98df397ca5e
2013-10-05 13:05:15+04:00
qemu/xen: make use of xenstore relative paths Qemu has several hardcoded xenstore paths that are only valid on Dom0. Attempts to launch a Qemu instance (to act as a userspace backend for PV disks) will fail because Qemu is not able to access those paths when running on a domain different than Dom0. Instead make the xenstore paths relative to the domain where Qemu is actually running. Signed-off-by: Roger Pau Monné <[email protected]> Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Anthony PERARD <[email protected]> Cc: [email protected] Cc: Anthony PERARD <[email protected]>
33876dfad64bc481f59c5e9ccf60db78624c4b93
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/33876dfad64bc481f59c5e9ccf60db78624c4b93
2013-10-10 14:25:52+00:00
tcg-ppc: Fix and cleanup tcg_out_tlb_check The fix is that sparc has so many mmu modes that the last one overflowed the 16-bit signed offset we assumed would fit. Handle this, and check the new assumption at compile time. Load the tlb addend earlier for the fast path. Remove the explicit address + addend and make use of index addressing. Adjust constraints for qemu_ld64 such that we don't clobber the address register or tlb addend before loading both values. Signed-off-by: Richard Henderson <[email protected]>
8f50c841b374dc90ea604888ca92c37f469c428a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8f50c841b374dc90ea604888ca92c37f469c428a
2013-09-25 07:46:31-07:00
scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial scsi_bus_legacy_add_drive() creates either a scsi-disk or a scsi-generic device. It sets property "serial" to argument serial unless null. Crashes with scsi-generic, because it doesn't have such the property. Only usb_msd_initfn_storage() passes non-null serial. Reproducer: $ qemu-system-x86_64 -nodefaults -display none -S -usb \ -drive if=none,file=/dev/sg1,id=usb-drv0 \ -device usb-storage,id=usb-msd0,drive=usb-drv0,serial=123 qemu-system-x86_64: -device usb-storage,id=usb-msd0,drive=usb-drv0,serial=123: Property '.serial' not found Aborted (core dumped) Fix by handling exactly like "removable": set the property only when it exists. Cc: [email protected] Reviewed-by: Andreas Färber <[email protected]> Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
c24e7517ee4a98e90eee5f0f07708a1fa12326b3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c24e7517ee4a98e90eee5f0f07708a1fa12326b3
2013-09-12 08:46:21+02:00
linux-user/signal.c: Avoid using uninitialized data in ARM sigreturn Rephrase code used in ARM sigreturn functions to avoid using uninitialized variables. This fixes one genuine problem ('frame' would not be initialized if we took the error-exit path because our stackpointer was misaligned) and one which is clang being alarmist (frame_addr wouldn't be initialized, though this is harmless since unlock_user_struct ignores its second argument in these cases; however since we don't generally make use of this not-really-documented effect it's better avoided). Signed-off-by: Peter Maydell <[email protected]> Message-id: [email protected] Signed-off-by: Anthony Liguori <[email protected]>
978fae9f1ac47e22890a1bd9ebf5fa46fe8b6ef7
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/978fae9f1ac47e22890a1bd9ebf5fa46fe8b6ef7
2013-07-29 19:56:52-05:00
Fix real mode guest migration Older KVM versions save CS dpl value to an invalid value for real mode guests (0x3). This patch detect this situation when loading CPU state and set all the segments dpl to zero. This will allow migration from older KVM on host without unrestricted guest to hosts with restricted guest support. For example migration from a Penryn host (with kernel 2.6.32) to a Westmere host (for real mode guest) will fail with "kvm: unhandled exit 80000021". Signed-off-by: Orit Wasserman <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
444ba6797ef6ef331fe9fd34309b1ec59caaede3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/444ba6797ef6ef331fe9fd34309b1ec59caaede3
2013-07-23 14:36:10+02:00
qemu-option: Fix qemu_opts_find() for null id arguments Crashes when the first list member has an ID. Admittedly nonsensical reproducer: $ qemu-system-x86_64 -nodefaults -machine id=foo -machine "" Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-id: [email protected] Signed-off-by: Anthony Liguori <[email protected]>
96bc97ebf350ec480b69082819cedb8850f46a0f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/96bc97ebf350ec480b69082819cedb8850f46a0f
2013-07-09 13:38:56-05:00
xen_machine_pv: do not create a dummy CPU in machine->init This fixes a regression introduced by: commit 62fc403f11523169eb4264de31279745f48e3ecc Author: Igor Mammedov <[email protected]> Date: Mon Apr 29 18:54:13 2013 +0200 target-i386: Attach ICC bus to CPU on its creation X86CPU should have parent bus so it could provide bus for child APIC. The commit makes it mandatory to pass a valid ICC bus to cpu_x86_create, but cpu_x86_init just passes NULL to it. xen_machine_pv uses cpu_x86_init, therefore it has been broken. This patch fixes the problem by removing the dummy CPU creation altogether from xen_init_pv, relying on the fact that QEMU can now cope with a machine without an emulated CPU. Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Andreas Färber <[email protected]> CC: [email protected] CC: [email protected]
58ee9b0ae05d81c74d6869a25ce4263fc22ed809
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/58ee9b0ae05d81c74d6869a25ce4263fc22ed809
2013-06-03 15:41:26+00:00
exec: eliminate io_mem_ram It is never used, the IOTLB always goes through io_mem_notdirty. In fact in softmmu_template.h, if it were, QEMU would crash just below the tests, as soon as io_mem_read/write dispatches to error_mem_read/write. Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
2a8e7499093cd33a607ebd7c1cd591169aa68a3e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2a8e7499093cd33a607ebd7c1cd591169aa68a3e
2013-05-29 16:26:21+02:00
configure: Detect uuid on MacOSX (fixes compile failure) Commit 7791dba3ec broke compilation on MacOSX, because it introduced a new include of util.h. On MacOSX this includes pwd.h which in turn includes the system uuid/uuid.h, which causes a compile failure if QEMU was configured without CONFIG_UUID due to a conflict between the system header and our fallback versions: block/vdi.c:124:20: error: static declaration of 'uuid_generate' follows non-static declaration static inline void uuid_generate(uuid_t out) ^ /usr/include/uuid/uuid.h:63:6: note: previous declaration is here void uuid_generate(uuid_t out); ^ Fix this breakage by improving configure's check for uuid to work on MacOSX (where there is no need to link in a separate libuuid). Note that if the user explicitly runs configure with '--disable-uuid' on MacOSX then QEMU will fail to compile. Signed-off-by: Peter Maydell <[email protected]> Message-id: [email protected] Signed-off-by: Anthony Liguori <[email protected]>
2d16c8e9885d4344a264c68feae28ae1e5f1c993
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2d16c8e9885d4344a264c68feae28ae1e5f1c993
2013-05-15 08:49:08-05:00
qemu-iotests: Filter out 'adapter_type' Filter out vmdk creation option 'adapter_type' for vmdk. So that tests with an explicit './check -o adapter_type=XXX' will not fail. Signed-off-by: Stefan Hajnoczi <[email protected]>
86abefd61e23325162e59e5bfb8f0346eda62541
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/86abefd61e23325162e59e5bfb8f0346eda62541
2013-05-03 13:06:22+02:00
ccid-card-emul: do not crash if backend is not provided Program received signal SIGSEGV, Segmentation fault. __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164 164 movdqu (%rsi), %xmm2 (gdb) bt at /home/elmarco/320g/src/qemu/hw/ccid-card-emulated.c:477 at /home/elmarco/320g/src/qemu/hw/ccid-card-emulated.c:503 Signed-off-by: Marc-André Lureau <[email protected]> Reviewed-by: Alon Levy <[email protected]>
d0ebd78890fba2ab458ec34763dae8566ccb1b72
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d0ebd78890fba2ab458ec34763dae8566ccb1b72
2013-04-24 11:47:32+03:00
qemu-log: Remove qemu_log_try_set_file() and its users Remove the function qemu_log_try_set_file() and its users (which are all in TCG code generation functions for various targets). This function was added to abstract out code which was originally written as "if (!logfile) logfile = stderr;" in order that BUG: case code which did an unguarded "fprintf(logfile, ...)" would not crash if debug logging was not enabled. Since those direct uses of logfile have also been abstracted away into qemu_log() calls which check for a NULL logfile, there is no need for the target-* files to mess with the user's chosen logging settings. Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Andreas Färber <[email protected]> Acked-by: Michael Walle <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
632314c49ce20ee9c974f07544d9125fbbbfbe1b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/632314c49ce20ee9c974f07544d9125fbbbfbe1b
2013-02-23 09:42:14+00:00
bochs: Fix bdrv_open() error handling Return -errno instead of -1 on errors. While touching the code, fix a memory leak. Signed-off-by: Kevin Wolf <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
5b7d7dfd198f06ec5edd0c857291c5035c5c060f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5b7d7dfd198f06ec5edd0c857291c5035c5c060f
2013-02-01 14:58:28+01:00
target-arm: Fix TCG temp leaks for WI and UNDEF VFP sysreg writes Fix a leak of a TCG temporary in code paths for VFP system register writes for cases which UNDEF or are write-ignored. Signed-off-by: Peter Maydell <[email protected]>
e4c1cfa5cb8f8bfbbfd949f2fabbe2be35e60c99
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e4c1cfa5cb8f8bfbbfd949f2fabbe2be35e60c99
2013-01-30 16:01:58+00:00
target-i386: Remove setting tsc-frequency from x86_def_t Setting tsc-frequency from x86_def_t is NOP because default tsc_khz in x86_def_t is 0 and CPUX86State.tsc_khz is also initialized to 0 by default. So there is no need to overwrite tsc_khz with default 0 because field was already initialized to 0. Custom tsc-frequency setting is not affected due to it being set without using x86_def_t. Field tsc_khz in x86_def_t becomes unused with this patch, so drop it as well. Signed-off-by: Igor Mammedov <[email protected]> Reviewed-by: Eduardo Habkost <[email protected]> Signed-off-by: Andreas Färber <[email protected]>
2c728dfef56d468a6a80b4dacdfb7109220d2546
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2c728dfef56d468a6a80b4dacdfb7109220d2546
2013-01-27 14:34:27+01:00
vnc: Clean up vncws_send_handshake_response() Use appropriate types, drop superfluous casts, use sizeof, don't exploit that this particular call of gnutls_fingerprint() doesn't change its last argument. Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
cfba8e6f92d45a2374622c3dc57499e42a1c07e1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cfba8e6f92d45a2374622c3dc57499e42a1c07e1
2013-01-30 10:31:22+01:00
block: Monitor command commit neglects to report some errors The non-live bdrv_commit() function may return one of the following errors: -ENOTSUP, -EBUSY, -EACCES, -EIO. The only error that is checked in the HMP handler is -EBUSY, so the monitor command 'commit' silently fails for all error cases other than 'Device is in use'. Report error using monitor_printf() and strerror(), and convert existing qerror_report() calls in do_commit() to monitor_printf(). Signed-off-by: Jeff Cody <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Signed-off-by: Luiz Capitulino <[email protected]>
58513bde833804bc9395d79fd81aae631b97c348
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/58513bde833804bc9395d79fd81aae631b97c348
2013-01-25 10:36:26-02:00
dataplane: avoid reentrancy during virtio_blk_data_plane_stop() When dataplane is stopping, the s->vdev->binding->set_host_notifier(..., false) call can invoke the virtqueue handler if an ioeventfd notification is pending. This causes hw/virtio-blk.c to invoke virtio_blk_data_plane_start() before virtio_blk_data_plane_stop() returns! The result is that we try to restart dataplane while trying to stop it and the following assertion is raised: msix_set_mask_notifier: Assertion `!dev->msix_mask_notifier' failed. Although the code was intended to prevent this scenario, the s->started boolean isn't enough. Add s->stopping so that we can postpone clearing s->started until we've completely stopped dataplane. This way, virtqueue handler calls during virtio_blk_data_plane_stop() are ignored. When dataplane is legitimately started again later we already self-kick ourselves to resume processing. Signed-off-by: Stefan Hajnoczi <[email protected]>
cd7fdfe59f4f965665dcd9868fe3764f5256d6aa
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cd7fdfe59f4f965665dcd9868fe3764f5256d6aa
2013-01-18 16:57:59+01:00
openpic: don't crash on a register access without a CPU context If we access a register via the QEMU memory inspection commands (e.g. "xp") rather than from guest code, we won't have a CPU context. Gracefully fail to access the register in that case, rather than crashing. Signed-off-by: Scott Wood <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
c3203fa5b2c17a1c446e44c87788fef21b4af5f4
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c3203fa5b2c17a1c446e44c87788fef21b4af5f4
2013-01-07 17:37:09+01:00
usb: Fix usb_ep_find_packet_by_id usb_ep_find_packet_by_id mistakenly only checks the first packet and if that is not a match, keeps trying the first packet! This patch fixes this. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
6735d433729f80fab80c0a1f70ae131398645613
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/6735d433729f80fab80c0a1f70ae131398645613
2013-01-07 12:57:24+01:00
uhci: Limit amount of frames processed in one go Before this patch uhci would process an unlimited amount of frames when behind on schedule, by setting the timer to a time already past, causing the timer subsys to immediately recall the frame_timer function gain. This would cause invalid cancellations of bulk queues when the catching up processed more then 32 frames at a moment when the bulk qh was temporarily unlinked (which the Linux uhci driver does). This patch fixes this by processing maximum 16 frames in one go, and always setting the timer one ms later, making the code behave more like the ehci code. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
f8f48b6957bf182339495e6be429f7bdc7ef1981
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f8f48b6957bf182339495e6be429f7bdc7ef1981
2013-01-07 12:57:24+01:00
pc_sysfw: Check for qemu_find_file() failure pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily creates a drive without a medium. When pc_system_flash_init() asks for its size, bdrv_getlength() fails with -ENOMEDIUM, which isn't checked either. It fails relatively cleanly only because -ENOMEDIUM isn't a multiple of 4096: $ qemu-system-x86_64 -S -vnc :0 -bios nonexistant qemu: PC system firmware (pflash) must be a multiple of 0x1000 [Exit 1 ] Fix by handling the qemu_find_file() failure. Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
e7b1d0ea950fc760371c9580ba6b34c912369a38
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e7b1d0ea950fc760371c9580ba6b34c912369a38
2013-01-04 14:38:04+01:00