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
⌀ |
---|---|---|---|---|---|---|---|
crypto: don't let builtin aes crash if no IV is provided
If no IV is provided, then use a default IV of all-zeros
instead of crashing. This gives parity with gcrypt and
nettle backends.
Signed-off-by: Daniel P. Berrange <[email protected]>
| eb2a770b178b9040c3fc04ee31dc38d1775db09a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/eb2a770b178b9040c3fc04ee31dc38d1775db09a | 2015-10-22 19:03:08+01:00 |
hmp: added io apic dump state
Added the hmp command to query io apic state, may be usefull after guest
crashes to understand IRQ routing in guest.
Implementation is only for kvm here. The dump will look like
(qemu) info ioapic
ioapic id=0x00 sel=0x26 (redir[11])
pin 0 0x0000000000010000 dest=0 vec=0 active-hi edge masked fixed physical
pin 1 0x0000000000000031 dest=0 vec=49 active-hi edge fixed physical
...
pin 23 0x0000000000010000 dest=0 vec=0 active-hi edge masked fixed physical
IRR (none)
Remote IRR (none)
Signed-off-by: Pavel Butsykin <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
CC: Paolo Bonzini <[email protected]>
CC: Andreas Färber <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| d665d696c53f776ec2cb91505658969b9eb9906b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d665d696c53f776ec2cb91505658969b9eb9906b | 2015-09-25 12:04:42+02:00 |
qapi: Make output visitor return qnull() instead of NULL
Before commit 1d10b44, it crashed. Since then, it returns NULL, with
a FIXME comment. The FIXME is valid: code that assumes QObject *
can't be null exists. I'm not aware of a way to feed this problematic
return value to code that actually chokes on null in the current code,
but the next few commits will create one, failing "make check".
Commit 481b002 solved a very similar problem by introducing a special
null QObject. Using this special null QObject is clearly the right
way to resolve this FIXME, so do that, and update the test
accordingly.
However, the patch isn't quite right: it messes up the reference
counting. After about SIZE_MAX visits, the reference counter
overflows, failing the assertion in qnull_destroy_obj(). Because
that's many orders of magnitude more visits of nulls than we expect,
we take this patch despite its flaws, to get the QMP introspection
stuff in without further delay. We'll want to fix it for real before
the release.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
Message-Id: <[email protected]>
| 6c2f9a15dfc8c18ba94defb0f819109902a817cb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6c2f9a15dfc8c18ba94defb0f819109902a817cb | 2015-09-21 09:56:49+02:00 |
qom: Do not reuse errp after a possible error
The argument for an Error **errp parameter must point to a null
pointer. If it doesn't, and an error happens, error_set() fails its
assertion.
Instead of
foo(foos, errp);
bar(bars, errp);
you need to do something like
Error *err = NULL;
foo(foos, &err);
if (err) {
error_propagate(errp, err);
goto out;
}
bar(bars, errp);
out:
Screwed up in commit 0e55884 (v1.3.0): property_get_bool().
Screwed up in commit 1f21772 (v2.1.0): object_property_get_enum() and
object_property_get_uint16List().
Screwed up in commit a8e3fbe (v2.4.0): property_get_enum(),
property_set_enum().
Found by inspection, no actual crashes observed.
Fix them up.
Cc: Anthony Liguori <[email protected]>
Cc: Hu Tao <[email protected]>
Cc: Daniel P. Berrange <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
Cc: [email protected]
Signed-off-by: Andreas Färber <[email protected]>
| 4715d42efe8632b0f9d2594a80e917de45e4ef88 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4715d42efe8632b0f9d2594a80e917de45e4ef88 | 2015-09-19 08:10:11+02:00 |
qcow2: Fix memory leak in qcow2_update_options() error path
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
| c1344ded70cf7d471aeb6fc08134997414631811 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c1344ded70cf7d471aeb6fc08134997414631811 | 2015-09-14 16:51:36+02:00 |
cpu: Add crash_occurred flag into CPUState
CPUState::crash_occurred field inside CPUState marks
that guest crash occurred. This value is added into
cpu common migration subsection.
Signed-off-by: Andrey Smetanin <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
CC: Paolo Bonzini <[email protected]>
CC: Andreas Färber <[email protected]>
Message-Id: <[email protected]>
[Document the new field. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
| bac05aa9a77af1ca7972c8dc07560f4daa7c2dfc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bac05aa9a77af1ca7972c8dc07560f4daa7c2dfc | 2015-09-16 17:33:32+02:00 |
target-mips: fix resource leak reported by Coverity
UHI assert and link operations call lock_user_string() twice to obtain two
strings pointed by gpr[4] and gpr[5]. If the second lock_user_string()
fails, then the first one won't get freed. Fix this by introducing another
macro responsible for obtaining two strings and handling allocation
failure.
Signed-off-by: Leon Alrae <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
| 26e7e982b267e71d40cd20e9e234fedef6770a90 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/26e7e982b267e71d40cd20e9e234fedef6770a90 | 2015-07-15 14:07:25+01:00 |
virtio-pci: don't crash on illegal length
Some guests seem to access cfg with an illegal length value.
It's worth fixing them but debugging is easier if
qemu does not crash.
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 2a6391232fa58f32469fb61d55343eff32a91083 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2a6391232fa58f32469fb61d55343eff32a91083 | 2015-07-13 14:42:24+03:00 |
migration: fix RCU deadlock
migration_end calls synchronize_rcu() within a critical section.
That causes a deadlock; move the call after rcu_read_unlock().
Signed-off-by: Paolo Bonzini <[email protected]>
| d09a6fde1590ca3a45b608b6873a680f208dfeb5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d09a6fde1590ca3a45b608b6873a680f208dfeb5 | 2015-07-09 08:47:58+02:00 |
spapr_vty: lookup should only return valid VTY objects
If a guest passes the reg property of a valid VIO object that is not a VTY
to either H_GET_TERM_CHAR or H_PUT_TERM_CHAR, QEMU hits a dynamic cast
assertion and aborts.
PAPR+ says "Hypervisor checks the termno parameter for validity against the
Vterm IOA unit addresses assigned to the partition, else return H_Parameter."
This patch adds a type check to ensure vty_lookup() either returns a pointer
to a valid VTY object or NULL. H_GET_TERM_CHAR and H_PUT_TERM_CHAR will
now return H_PARAMETER to the guest instead of crashing.
The patch has no effect on the reg == 0 hack used to implement the RTAS call
display-character.
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| 0f888bfaddfc5f55b0d82cde2e1164658a672375 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0f888bfaddfc5f55b0d82cde2e1164658a672375 | 2015-07-07 17:44:53+02:00 |
target-i386: avoid overflow in the tsc-frequency property
The TSC frequency fits comfortably in an int when expressed in kHz,
but it may overflow when converted to Hz. In this case,
tsc-frequency returns a negative value because x86_cpuid_get_tsc_freq
does a 32-bit multiplication before assigning to int64_t.
For simplicity just make tsc_khz a 64-bit value.
Spotted by Coverity.
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 06ef227e5158cca6710e6c268d6a7f65a5e2811b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/06ef227e5158cca6710e6c268d6a7f65a5e2811b | 2015-07-07 10:47:16-03:00 |
migration: Make events a capability
Make check fails with events. THis is due to the parser/lexer that it
uses. Just in case that they are more broken parsers, just only send
events when there are capabilities.
Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
| b05dc72342b27585909d9e99d95d17fd3dfbb269 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b05dc72342b27585909d9e99d95d17fd3dfbb269 | 2015-07-07 14:54:55+02:00 |
qcow2: Handle EAGAIN returned from update_refcount
Fixes a crash during image compression
Signed-off-by: Jindřich Makovička <[email protected]>
Tested-by: Richard W.M. Jones <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 3e5feb6202149e8a963a33b911216e40d790f1d7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3e5feb6202149e8a963a33b911216e40d790f1d7 | 2015-07-02 09:20:18+01:00 |
virtio-pci: correctly set host notifiers for modern bar
Currently, during host notifier set. We only add eventfd for legacy
bar, this is not correct since:
- Non-transitional device does not have legacy bar, so qemu will crash
since proxy->bar was not initialized.
- Modern device uses modern bar and notify cap to notify the device,
we should add eventfd for proxy->notify.
So this patch fixes the above two issues by adding eventfd based on
whether legacy or modern device were supported.
Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
| 975acc0ae6d60260859884a9235ae3c62e2969a2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/975acc0ae6d60260859884a9235ae3c62e2969a2 | 2015-06-10 18:15:05+02:00 |
target-s390x: Only access allocated storage keys
We allocate ram_size / PAGE_SIZE storage keys, so we need to make sure that
we only access that many. Unfortunately the code can overrun this array by
one, potentially overwriting unrelated memory.
Fix it by limiting storage keys to their scope.
Signed-off-by: Alexander Graf <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
| 9814fed0afa73f5c37f04e02ec17c915a5d59303 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9814fed0afa73f5c37f04e02ec17c915a5d59303 | 2015-06-05 01:38:00+02:00 |
monitor: Use trad. command interface for HMP pcie_aer_inject_error
All QMP commands use the "new" handler interface (mhandler.cmd_new).
Most HMP commands still use the traditional interface (mhandler.cmd),
but a few use the "new" one. Complicates handle_user_command() for no
gain, so I'm converting these to the traditional interface.
pcie_aer_inject_error's implementation is split into the
hmp_pcie_aer_inject_error() and pcie_aer_inject_error_print(). The
former is a peculiar crossbreed between HMP and QMP handler. On
success, it works like a QMP handler: store QDict through ret_data
parameter, return 0. Printing the QDict is left to
pcie_aer_inject_error_print(). On failure, it works more like an HMP
handler: print error to monitor, return negative number.
To convert to the traditional interface, turn
pcie_aer_inject_error_print() into a command handler wrapping around
hmp_pcie_aer_inject_error(). By convention, this command handler
should be called hmp_pcie_aer_inject_error(), so rename the existing
hmp_pcie_aer_inject_error() to do_pcie_aer_inject_error().
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Luiz Capitulino <[email protected]>
| 04e00c92ef75629a241ebc50537f75de0867928d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/04e00c92ef75629a241ebc50537f75de0867928d | 2015-06-02 09:59:13+02:00 |
kvm: Silence warning from valgrind
valgrind complains here about uninitialized bytes with the following message:
==17814== Syscall param ioctl(generic) points to uninitialised byte(s)
==17814== at 0x466A780: ioctl (in /usr/lib64/power8/libc-2.17.so)
==17814== by 0x100735B7: kvm_vm_ioctl (kvm-all.c:1920)
==17814== by 0x10074583: kvm_set_ioeventfd_mmio (kvm-all.c:574)
Let's fix it by using a proper struct initializer in kvm_set_ioeventfd_mmio().
Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 03a96b83b539498510e22aab585e41015ba18247 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/03a96b83b539498510e22aab585e41015ba18247 | 2015-04-30 16:55:16+02:00 |
hw/arm/virt: Fix memory leak reported by Coverity
As the conditional statement had to be split anyway, we can also
add a better error report message.
Signed-off-by: Stefan Weil <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 4de9a883be653f02f8c1d5dcd1066f614d9606b6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4de9a883be653f02f8c1d5dcd1066f614d9606b6 | 2015-04-01 17:57:29+01:00 |
block: Deprecate QCOW/QCOW2 encryption
We've steered users away from QCOW/QCOW2 encryption for a while,
because it's a flawed design (commit 136cd19 Describe flaws in
qcow/qcow2 encryption in the docs).
In addition to flawed crypto, we have comically bad usability, and
plain old bugs. Let me show you.
= Example images =
I'm going to use a raw image as backing file, and two QCOW2 images,
one encrypted, and one not:
$ qemu-img create -f raw backing.img 4m
Formatting 'backing.img', fmt=raw size=4194304
$ qemu-img create -f qcow2 -o encryption,backing_file=backing.img,backing_fmt=raw geheim.qcow2 4m
Formatting 'geheim.qcow2', fmt=qcow2 size=4194304 backing_file='backing.img' backing_fmt='raw' encryption=on cluster_size=65536 lazy_refcounts=off
$ qemu-img create -f qcow2 -o backing_file=backing.img,backing_fmt=raw normal.qcow2 4m
Formatting 'normal.qcow2', fmt=qcow2 size=4194304 backing_file='backing.img' backing_fmt='raw' encryption=off cluster_size=65536 lazy_refcounts=off
= Usability issues =
== Confusing startup ==
When no image is encrypted, and you don't give -S, QEMU starts the
guest immediately:
$ qemu-system-x86_64 -nodefaults -display none -monitor stdio normal.qcow2
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) info status
VM status: running
But as soon as there's an encrypted image in play, the guest is *not*
started, with no notification whatsoever:
$ qemu-system-x86_64 -nodefaults -display none -monitor stdio geheim.qcow2
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) info status
VM status: paused (prelaunch)
If the user figured out that he needs to type "cont" to enter his
keys, the confusion enters the next level: "cont" asks for at most
*one* key. If more are needed, it then silently does nothing. The
user has to type "cont" once per encrypted image:
$ qemu-system-x86_64 -nodefaults -display none -monitor stdio -drive if=none,file=geheim.qcow2 -drive if=none,file=geheim.qcow2
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) info status
VM status: paused (prelaunch)
(qemu) c
none0 (geheim.qcow2) is encrypted.
Password: ******
(qemu) info status
VM status: paused (prelaunch)
(qemu) c
none1 (geheim.qcow2) is encrypted.
Password: ******
(qemu) info status
VM status: running
== Incorrect passwords not caught ==
All existing encryption schemes give you the GIGO treatment: garbage
password in, garbage data out. Guests usually refuse to mount
garbage, but other usage is prone to data loss.
== Need to stop the guest to add an encrypted image ==
$ qemu-system-x86_64 -nodefaults -display none -monitor stdio
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) info status
VM status: running
(qemu) drive_add "" if=none,file=geheim.qcow2
Guest must be stopped for opening of encrypted image
(qemu) stop
(qemu) drive_add "" if=none,file=geheim.qcow2
OK
Commit c3adb58 added this restriction. Before, we could expose images
lacking an encryption key to guests, with potentially catastrophic
results. See also "Use without key is not always caught".
= Bugs =
== Use without key is not always caught ==
Encrypted images can be in an intermediate state "opened, but no key".
The weird startup behavior and the need to stop the guest are there to
ensure the guest isn't exposed to that state. But other things still
are!
* drive_backup
$ qemu-system-x86_64 -nodefaults -display none -monitor stdio geheim.qcow2
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) drive_backup -f ide0-hd0 out.img raw
Formatting 'out.img', fmt=raw size=4194304
I guess this writes encrypted data to raw image out.img. Good luck
with figuring out how to decrypt that again.
* commit
$ qemu-system-x86_64 -nodefaults -display none -monitor stdio geheim.qcow2
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) commit ide0-hd0
I guess this writes encrypted data into the unencrypted raw backing
image, effectively destroying it.
== QMP device_add of usb-storage fails when it shouldn't ==
When the image is encrypted, device_add creates the device, defers
actually attaching it to when the key becomes available, then fails.
This is wrong. device_add must either create the device and succeed,
or do nothing and fail.
$ qemu-system-x86_64 -nodefaults -display none -usb -qmp stdio -drive if=none,id=foo,file=geheim.qcow2
{"QMP": {"version": {"qemu": {"micro": 50, "minor": 2, "major": 2}, "package": ""}, "capabilities": []}}
{ "execute": "qmp_capabilities" }
{"return": {}}
{ "execute": "device_add", "arguments": { "driver": "usb-storage", "id": "bar", "drive": "foo" } }
{"error": {"class": "DeviceEncrypted", "desc": "'foo' (geheim.qcow2) is encrypted"}}
{"execute":"device_del","arguments": { "id": "bar" } }
{"timestamp": {"seconds": 1426003440, "microseconds": 237181}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/bar/bar.0/legacy[0]"}}
{"timestamp": {"seconds": 1426003440, "microseconds": 238231}, "event": "DEVICE_DELETED", "data": {"device": "bar", "path": "/machine/peripheral/bar"}}
{"return": {}}
This stuff is worse than useless, it's a trap for users.
If people become sufficiently interested in encrypted images to
contribute a cryptographically sane implementation for QCOW2 (or
whatever other format), then rewriting the necessary support around it
from scratch will likely be easier and yield better results than
fixing up the existing mess.
Let's deprecate the mess now, drop it after a grace period, and move
on.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| a1f688f4152e65260b94f37543521ceff8bfebe4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a1f688f4152e65260b94f37543521ceff8bfebe4 | 2015-03-16 17:07:25+01:00 |
machine: query kernel-irqchip property
Running
x86_64-softmmu/qemu-system-x86_64 -machine pc,kernel_irqchip=on -enable-kvm
leads to crash:
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]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 446f16a6906e9d05aa9ce0dde727d4f731a89298 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/446f16a6906e9d05aa9ce0dde727d4f731a89298 | 2015-03-11 18:14:23+01:00 |
cpus: initialize cpu->memory_dispatch
This fixes a NULL pointer dereference in s390x-softmmu.
On pretty much all other architectures, creating an MMIO region calls
cpu_reload_memory_map. On s390, however, there are no MMIO regions
and everything is done via hypercalls.
Fixes: 9d82b5a792236db31a75b9db5c93af69ac07c7c5
Reported-by: Christian Borntraeger <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| cba7054928b10a7fda57c64807451bbc9a31e42e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cba7054928b10a7fda57c64807451bbc9a31e42e | 2015-03-10 10:49:25+01:00 |
qcow2: Helper function for refcount modification
Since refcounts do not always have to be a uint16_t, all refcount blocks
and arrays in memory should not have a specific type (thus they become
pointers to void) and for accessing them, two helper functions are used
(a getter and a setter). Those functions are called indirectly through
function pointers in the BDRVQcowState so they may later be exchanged
for different refcount orders.
With the check and repair functions using this function, the refcount
array they are creating will be in big endian byte order; additionally,
using realloc_refcount_array() makes the size of this refcount array
always cluster-aligned. Both combined allow rebuild_refcount_structure()
to drop the bounce buffer which was used to convert parts of the
refcount array to big endian byte order and store them on disk. Instead,
those parts can now be written directly.
[ kwolf: Fixed a build failure on 32 bit and another with old glib ]
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 7453c96b78c2b09aa72924f933bb9616e5474194 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7453c96b78c2b09aa72924f933bb9616e5474194 | 2015-03-10 14:02:21+01:00 |
parallel: parallel_hds_isa_init() shouldn't fail
It shouldn't fail, and no caller checks for failure. Make failure
fatal.
Maintainers of affected machines cc'ed.
Cc: Anthony Liguori <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Aurelien Jarno <[email protected]>
Cc: Leon Alrae <[email protected]>
Cc: Blue Swirl <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| 4bc6a3e54e06c47b8e23bfa3d873fa2f42dfec02 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4bc6a3e54e06c47b8e23bfa3d873fa2f42dfec02 | 2015-02-24 00:19:06+01:00 |
libqos/ahci: add ahci command verify
Helps to verify that a command completed successfully.
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| ea41deb6022c1468de094dac12610de74220e4b0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ea41deb6022c1468de094dac12610de74220e4b0 | 2015-02-16 15:07:17+00:00 |
target-arm: Make arm_current_el() return sensible values for M profile
Although M profile doesn't have the same concept of exception level
as A profile, it does have a notion of privileged versus not, which
we currently track in the privmode TB flag. Support returning this
information if arm_current_el() is called on an M profile core, so
that we can identify the correct MMU index to use (and put the MMU
index in the TB flags) without having to special-case M profile.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Greg Bellows <[email protected]>
| 6d54ed3c93f1e05a483201b087142998381c9be8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6d54ed3c93f1e05a483201b087142998381c9be8 | 2015-02-05 13:37:23+00:00 |
coverity/s390x: avoid false positive in kvm_irqchip_add_adapter_route
Paolo Bonzini reported that Coverity reports an uninitialized pad value.
Let's use a designated initializer for kvm_irq_routing_entry to avoid
this false positive. This is similar to kvm_irqchip_add_msi_route and
other users of kvm_irq_routing_entry.
Signed-off-by: Christian Borntraeger <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| e9af2fef242ce92f86d3d5c1a94c3199ff1e24c9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e9af2fef242ce92f86d3d5c1a94c3199ff1e24c9 | 2014-12-15 12:21:01+01:00 |
qcow2: Fix header extension size check
After reading the extension header, offset is incremented, but not
checked against end_offset any more. This way an integer overflow could
happen when checking whether the extension end is within the allowed
range, effectively disabling the check.
This patch adds the missing check and a test case for it.
Cc: [email protected]
Reported-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 2ebafc854d109ff09b66fb4dd62c2c53fc29754a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2ebafc854d109ff09b66fb4dd62c2c53fc29754a | 2014-12-10 10:31:13+01:00 |
target-i386: fix Coverity complaints about overflows
sipi_vector is an int; it is shifted by 12 and passed as a 64-bit value,
which makes Coverity think that we wanted (uint64_t)sipi_vector << 12.
But actually it must be between 0 and 255. Make this explicit.
Signed-off-by: Paolo Bonzini <[email protected]>
| e6a33e45c270ea024929f4afb49283d610577af3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e6a33e45c270ea024929f4afb49283d610577af3 | 2014-11-13 16:13:27+01:00 |
migration: fix parameter validation on ram load
During migration, the values read from migration stream during ram load
are not validated. Especially offset in host_from_stream_offset() and
also the length of the writes in the callers of said function.
To fix this, we need to make sure that the [offset, offset + length]
range fits into one of the allocated memory regions.
Validating addr < len should be sufficient since data seems to always be
managed in TARGET_PAGE_SIZE chunks.
Fixes: CVE-2014-7840
Note: follow-up patches add extra checks on each block->host access.
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
| 0be839a2701369f669532ea5884c15bead1c6e08 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0be839a2701369f669532ea5884c15bead1c6e08 | 2014-11-18 16:49:44+05:30 |
l2tpv3: fix possible double free
freeaddrinfo(result) does not assign result = NULL, after frees it.
There will be a double free when it goes error case.
It is reported by covertiy.
Reviewed-by: Gonglei <[email protected]>
Cc: [email protected]
Signed-off-by: zhanghailiang <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 77374582ab961af2c5e702f767f52179d5f7676c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/77374582ab961af2c5e702f767f52179d5f7676c | 2014-11-14 12:16:24+01:00 |
xhci: add sanity checks to xhci_lookup_uport
Also catch xhci_lookup_uport failures in post_load.
https://bugzilla.redhat.com/show_bug.cgi?id=1074219
Signed-off-by: Gerd Hoffmann <[email protected]>
| f2ad97ff81da51c064b9e87720ff48a0874f45d4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f2ad97ff81da51c064b9e87720ff48a0874f45d4 | 2014-11-11 08:48:16+01:00 |
qemu-img: Fix insignificant memleak
As soon as options is set in img_amend(), it needs to be freed before
the function returns. This leak is rather insignificant, as qemu-img
will exit subsequently anyway, but there's no point in not fixing it.
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Reviewed-by: Benoît Canet <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| b2f27e4438bb9eb302a0976e5b988bdfd55e65dc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b2f27e4438bb9eb302a0976e5b988bdfd55e65dc | 2014-11-03 11:41:49+00:00 |
hw/i386/acpi-build.c: Fix memory leak in acpi_build_tables_cleanup()
There are three ACPI tables: 'linker_data', 'rsdp' and 'table_data'. They are
used differently. Two of them are being copied before using and only the copy
is used later. But the third is used directly. Because of that we need to free
two tables completely and delete only wrapper for the third one.
Valgrind output:
==23931== 131,072 bytes in 1 blocks are definitely lost in loss record 7,729 of 7,734
==23931== at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23931== by 0x2EA920: realloc_and_trace (vl.c:2811)
==23931== by 0x509E6AE: g_realloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==23931== by 0x506DB32: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==23931== by 0x506E463: g_array_set_size (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==23931== by 0x256A4F: acpi_align_size (acpi-build.c:487)
==23931== by 0x259F92: acpi_build (acpi-build.c:1601)
==23931== by 0x25A212: acpi_setup (acpi-build.c:1682)
==23931== by 0x24F346: pc_guest_info_machine_done (pc.c:1110)
==23931== by 0x55FAAB: notifier_list_notify (notify.c:39)
==23931== by 0x2EA704: qemu_run_machine_init_done_notifiers (vl.c:2759)
==23931== by 0x2EEC3C: main (vl.c:4504)
Signed-off-by: Nikita Belov <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Christian Borntraeger <[email protected]>
| ac369a77967d5dd984a5430505eaf24a380af1c0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ac369a77967d5dd984a5430505eaf24a380af1c0 | 2014-11-02 13:44:52+02:00 |
qga: Rewrite code where using readdir_r
If readdir_r fails, error_setg_errno will reference the freed
pointer *dirpath*.
Moreover, readdir_r may cause a buffer overflow, using readdir instead.
Signed-off-by: zhanghailiang <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Cc: [email protected]
Signed-off-by: Michael Roth <[email protected]>
| e668d1b8545f1c79cf869bd78813cb1e52216f45 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e668d1b8545f1c79cf869bd78813cb1e52216f45 | 2014-10-22 07:49:52-05:00 |
hmp: Remove "info pcmcia"
This command lists PCMCIA sockets and cards. Only a few ARM boards
have sockets (akita, borzoi, connex, mainstone, spitz, terrier, tosa,
verdex, z2), the only card is the DSCM-1xxxx Hitachi Microdrive (qdev
"microdrive"), and it is only inserted during machine init, if ever.
So this command doesn't really tell anybody anything new so far.
Moreover, pcmcia_socket_unregister() has a use-after-free bug, flagged
by Coverity. Has never been used, because there has never been code
to eject a PCMCIA card.
Not worth fixing & converting to QMP. Remove it.
Signed-off-by: Markus Armbruster <[email protected]>
Acked-by: Luiz Capitulino <[email protected]>
Acked-by: Andreas Färber <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 7797a73947d5c0e63dd5552b348cf66c384b4555 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7797a73947d5c0e63dd5552b348cf66c384b4555 | 2014-10-24 12:19:11+01:00 |
virtio-net: use aliases instead of duplicate qdev properties
virtio-net-pci, virtio-net-s390, and virtio-net-ccw all duplicate the
qdev properties of their VirtIONet 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
VirtIONet 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]>
| 7779edfeb1822ff5f554a4c1f3e9798789a9352c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7779edfeb1822ff5f554a4c1f3e9798789a9352c | 2014-09-30 11:08:16+02:00 |
block: Keep DriveInfo alive until BlockDriverState dies
If the BDS's refcnt > 0, drive_del() destroys the DriveInfo, but not
the BDS. This can happen in three places:
* Device model destruction during unplug: blockdev_auto_del()
* Xen IDE unplug: pci_piix3_xen_ide_unplug()
* drive_del command when no device model is attached: do_drive_del()
The other callers of drive_del are on error paths where refcnt == 1.
If the user somehow manages to plug in a device model using a BDS that
has gone through drive_del(), the legacy configuration passed in
DriveInfo doesn't reach the device model, and automatic deletion on
unplug doesn't work. Worse, some device models such as scsi-disk
crash when DriveInfo doesn't exist.
This is theoretical; I didn't research an actual reproducer. The problem
was introduced when we replaced DriveInfo reference counting by BDS
reference counting in commit a94a3fa..fa510eb.
Fix by keeping DriveInfo alive until its BDS dies.
This affects qemu_drive_opts: now you can't reuse the same ID for new
drive options until the BDS dies. Before, you could, but since the
code always attempts to create a BDS with the same ID next, the
enclosing operation "create a new drive" failed anyway. Different
error path, same result.
Unfortunately, the fix involves use of blockdev.c stuff from block.c,
which is a layering violation. Fortunately, my forthcoming
BlockBackend work will get rid of it again.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Benoît Canet <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 3ae59580a0db469c1de72d5c58266b08fb096056 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3ae59580a0db469c1de72d5c58266b08fb096056 | 2014-09-25 15:24:14+02:00 |
image-fuzzer: Trivial readability and formatting improvements
Signed-off-by: Maria Kustova <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 407ba0844d90a344e5ed012129e6e40e091bf48b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/407ba0844d90a344e5ed012129e6e40e091bf48b | 2014-09-22 11:39:30+01:00 |
main-loop: narrow win32 pollfds_fill() event bitmasks
pollfds_fill() and pollfds_poll() translate GPollFD to rfds/wfds/xfds
for sockets on win32. select(2) is the underlying system call which is
used to monitor sockets for activity.
Currently file descriptors that monitor G_IO_ERR will be included in
both rfds and wfds. As a result, select(2) will report writability on
file descriptors where we only really wanted to monitor readability
(with errors).
slirp_pollfds_poll() hit this issue: UDP sockets are blocking sockets so
we hang in sorecvfrom() when G_IO_ERR is set due to the socket being
writable (we only wanted to check for readability).
This patch fixes the slirp_pollfds_poll() hang.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Message-id: [email protected]
Signed-off-by: Anthony Liguori <[email protected]>
| 8db165b36ef893ac69af0452f20eeb78e7b26b5a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8db165b36ef893ac69af0452f20eeb78e7b26b5a | 2013-05-16 14:18:47-05:00 |
iotests: Use _img_info
qemu-img info should only be used directly if the format-specific
information or the name of the format is relevant (some tests explicitly
test format-specific information; test 082 uses qcow2-specific settings
to test the qemu-img interface); otherwise, tests should always use
_img_info instead.
Test 082 was touched only partially. It does test the qemu-img
interface; however, its invocations of qemu-img info are not real tests
but rather verifications, so if format-specific information is not
important for the test, there is no reason not to use _img_info. In
contrast to directly invoking qemu-img info, "qcow2" is replaced by
"IMGFMT"; but as "qcow2" is only mentioned once in test 082 (in
_supported_fmt), I consider this an improvement.
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 1b53eab270ee08e61e21c3fcc77e34c4b5484c30 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1b53eab270ee08e61e21c3fcc77e34c4b5484c30 | 2014-10-04 19:18:17+01:00 |
PPC: Cuda: Use cuda timer to expose tbfreq to guest
Mac OS X calibrates a number of frequencies on bootup based on reading
tb values on bootup and comparing them to via cuda timer values.
The only variable we can really steer well (thanks to KVM) is the cuda
frequency. So let's use that one to fake Mac OS X into believing the
bus frequency is tbfreq * 4. That way Mac OS X will automatically
calculate the correct timebase frequency.
With this patch and the patch set I posted earlier I can successfully
run Mac OS X 10.2, 10.3 and 10.4 guests with -M mac99 on TCG and KVM.
Suggested-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| b981289c493c7ddabc1cdf7de99daa24642c7739 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b981289c493c7ddabc1cdf7de99daa24642c7739 | 2014-09-08 12:50:52+02:00 |
loader: Add load_image_size() to replace load_image()
A subsequent patch to ppc/spapr needs to load the RTAS blob into
qemu memory rather than target memory (so it can later be copied
into the right spot at machine reset time).
I would use load_image() but it is marked deprecated because it
doesn't take a buffer size as argument, so let's add load_image_size()
that does.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
[aik: fixed errors from checkpatch.pl]
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| ea87616d6c44d998affef3d3b9fdfc49d14b8150 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ea87616d6c44d998affef3d3b9fdfc49d14b8150 | 2014-09-08 12:50:48+02:00 |
image-fuzzer: Add fuzzing functions for L1/L2 table entries
Signed-off-by: Maria Kustova <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| eeadd9248707c3952de22012974ebdc1e17f2cba | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/eeadd9248707c3952de22012974ebdc1e17f2cba | 2014-08-15 18:03:14+01:00 |
PPC: mac99: Move NVRAM to page boundary when necessary
When running KVM we have to adhere to host page boundaries for memory slots.
Unfortunately the NVRAM on mac99 is a 4k RAM hole inside of an MMIO flash
area.
So if our host is configured with 64k page size, we can't use the mac99 target
with KVM. This is a real shame, as this limitation is not really an issue - we
can easily map NVRAM somewhere else and at least Linux and Mac OS X use it
at their new location.
So in that emergency case when it's about failing to run at all and moving NVRAM
to a place it shouldn't be at, choose the latter.
This patch enables -M mac99 with KVM on 64k page size hosts.
Signed-off-by: Alexander Graf <[email protected]>
| 261265cc912b375649fcdf7aded0f87359dba544 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/261265cc912b375649fcdf7aded0f87359dba544 | 2014-09-08 12:50:47+02:00 |
libqos: Correct memory leak
Fix a small memory leak inside of libqos, in the pc_alloc_init routine.
Signed-off-by: John Snow <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| f3cdcbaee16d32b52d5015a8b1e8ddf5a27f7089 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f3cdcbaee16d32b52d5015a8b1e8ddf5a27f7089 | 2014-08-15 18:03:12+01:00 |
xen_disk: fix possible null-ptr dereference
Signed-off-by: Gonglei <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 8cced121436a3298e5866dbfaec91cd475ad59cf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8cced121436a3298e5866dbfaec91cd475ad59cf | 2014-08-15 15:07:13+02:00 |
acpi-build: tweak acpi migration limits
- Tweak error message for legacy machine type:
Basically if table size exceeds the limits we set all
bets are off for migration: e.g. it can start failing even
within given qemu minor version simply because of a bugfix.
- Increase table size to 128k.
- Make sure we notice it long before we start getting close to the
128k limit: warn at 64k.
- Don't fail if we exceed the limit: most people don't care about
migration, even less people care about cross version miration.
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
| 868270f23d8db2cce83e4f082fe75e8625a5fbf9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/868270f23d8db2cce83e4f082fe75e8625a5fbf9 | 2014-07-29 12:26:12+02:00 |
block/nfs: fix url parameter checking
this patch fixes the incorrect usage of strncmp and
adds simple error checking by means of parse_uint_full
instead of atoi for the supplied URL parameters.
Signed-off-by: Peter Lieven <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 7c24384b3b984f0256ba10eb26d877ec28985019 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7c24384b3b984f0256ba10eb26d877ec28985019 | 2014-06-26 13:51:01+02:00 |
PPC: Fix TCG chunks that don't free their temps
We want to make sure that every instruction cleans up after itself and
clears every temporary it allocated.
While checking whether this is already the case, I came across a few
cases where it isn't. This patch fixes every translation I found that
doesn't free their allocated temporaries.
Signed-off-by: Alexander Graf <[email protected]>
| c80d1df5083846396ab5120731a76a9d62900fda | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c80d1df5083846396ab5120731a76a9d62900fda | 2014-06-16 13:24:34+02:00 |
cg3: add extra check to prevent CG3 register array overflow
The case statements in the CG3 read and write register routines have a maximum
value of CG3_REG_SIZE, so if a value were written to this offset then it
would overflow the register array.
Currently this cannot be exploited since the MemoryRegion restricts accesses
to the range 0 ... CG3_REG_SIZE - 1, but it seems worth clarifying this for
future review and/or static analysis.
Signed-off-by: Mark Cave-Ayland <[email protected]>
CC: Paolo Bonzini <[email protected]>
| 366d4f7e0007a5540897fbac6e377c57d8c79a73 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/366d4f7e0007a5540897fbac6e377c57d8c79a73 | 2014-06-05 20:51:30+01:00 |
target-i386: fix protection bits in the TLB for SMEP
User pages must be marked as non-executable when running under SMEP;
otherwise, fetching the page first and then calling it will fail.
With this patch, all SMEP testcases in kvm-unit-tests now pass.
Signed-off-by: Paolo Bonzini <[email protected]>
| b09481de91cce94342bac3327bb7633c39ff8bf6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b09481de91cce94342bac3327bb7633c39ff8bf6 | 2014-06-05 16:10:35+02:00 |
block/vvfat: Plug memory leak in read_directory()
Has always been leaky. Spotted by Coverity.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| b122c3b6d020e529b203836efb8f611ece787293 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b122c3b6d020e529b203836efb8f611ece787293 | 2014-05-30 14:26:54+02:00 |
blockdev: Plug memory leak in blockdev_init()
blockdev_init() leaks bs_opts when qemu_opts_create() fails, i.e. when
the ID is bad. Missed in commit ec9c10d.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 6376f9522372d589f3efe60001dc0486237dd375 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6376f9522372d589f3efe60001dc0486237dd375 | 2014-05-30 14:26:54+02:00 |
block: Plug memory leak on brv_open_image() error path
Introduced in commit da557a. Spotted by Coverity.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| b20e61e0d52eef57cf5db55087b16e0b5207e730 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b20e61e0d52eef57cf5db55087b16e0b5207e730 | 2014-05-30 14:26:54+02:00 |
qapi: treat all negative return of strtosz_suffix() as error
strtosz_suffix() might return negative error, this patch fixes
the error handling.
This patch also changes to handle error in the if statement
rather than handle success specially, this will make this use
of strtosz_suffix consistent with all other uses.
Signed-off-by: Amos Kong <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
| cb45de6798956975c4b13a6233f7a00d2239b61a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cb45de6798956975c4b13a6233f7a00d2239b61a | 2014-05-08 14:19:58-04:00 |
qtest: Be paranoid about accept() addrlen argument
POSIX specifies that address_len shall on output specify the length of
the stored address; it does not however specify whether it may get
updated on failure as well to, e.g., zero.
In case EINTR occurs, re-initialize the variable to the desired value.
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| 535b45631ad7176e10dab89d55443b5a096500b9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/535b45631ad7176e10dab89d55443b5a096500b9 | 2014-05-05 20:58:33+02:00 |
pxa2xx: avoid buffer overrun on incoming migration
CVE-2013-4533
s->rx_level is read from the wire and used to determine how many bytes
to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the
length of s->rx_fifo[] the buffer can be overrun with arbitrary data
from the wire.
Fix this by validating rx_level against the size of s->rx_fifo.
Cc: Don Koch <[email protected]>
Reported-by: Michael Roth <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Don Koch <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| caa881abe0e01f9931125a0977ec33c5343e4aa7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/caa881abe0e01f9931125a0977ec33c5343e4aa7 | 2014-05-05 22:15:02+02:00 |
qga: Drop superfluous error_is_set()
acquire_privilege(), execute_async() and check_suspend_mode() do
nothing when called with an error set. Callers shouldn't do that, and
no caller does. Drop the superfluous tests.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Michael Roth <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
| 5e54769c921a3d8cd8858444f5a3fa62cc44260e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5e54769c921a3d8cd8858444f5a3fa62cc44260e | 2014-05-09 09:11:31-04:00 |
block: vhdx - account for identical header sections
The VHDX spec v1.00 declares that "a header is current if it is the only
valid header or if it is valid and its SequenceNumber field is greater
than the other header’s SequenceNumber field. The parser must only use
data from the current header. If there is no current header, then the
VHDX file is corrupt."
However, the Disk2VHD tool from Microsoft creates a VHDX image file that
has 2 identical headers, including matching checksums and matching
sequence numbers. Likely, as a shortcut the tool is just writing the
header twice, for the active and inactive headers, during the image
creation. Technically, this should be considered a corrupt VHDX file
(at least per the 1.00 spec, and that is how we currently treat it).
But in order to accomodate images created with Disk2VHD, we can safely
create an exception for this case. If we find identical sequence
numbers, then we check the VHDXHeader-sized chunks of each 64KB header
sections (we won't rely just on the crc32c to indicate the headers are
the same). If they are identical, then we go ahead and use the first
one.
Reported-by: Nerijus Baliūnas <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 6906046169ffa9d829beeeaafe1fadeba51669fb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6906046169ffa9d829beeeaafe1fadeba51669fb | 2014-05-19 11:36:48+02:00 |
vmstate: s/VMSTATE_INT32_LE/VMSTATE_INT32_POSITIVE_LE/
As the macro verifies the value is positive, rename it
to make the function clearer.
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| 3476436a44c29725efef0cabf5b3ea4e70054d57 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3476436a44c29725efef0cabf5b3ea4e70054d57 | 2014-05-05 22:15:03+02:00 |
mirror: Check for bdrv_get_info result
bdrv_get_info could fail. Add check before using the returned value.
Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| c3cc95bd155d51fc1f9b7259b3bff20a361a1cca | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c3cc95bd155d51fc1f9b7259b3bff20a361a1cca | 2014-04-29 13:43:08+02:00 |
block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file.
In 1.7.1 qcow2_create2 reopen the file for flushing without the BDRV_O_NO_BACKING
flags.
As a consequence the code would recursively open the whole backing chain.
These three stack arrays would pile up through the recursion and lead to a coroutine
stack overflow.
Convert these array to malloced buffers in order to streamline the coroutine
footprint.
Symptoms where freezes or segfaults on production machines while taking QMP externals
snapshots. The overflow disturbed coroutine switching.
[Resolved conflicts on qemu.git/master since the patch was against v1.7.1
--Stefan]
Signed-off-by: Benoit Canet <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 1ba4b6a553ad9ff4645af7fab8adfc6e810fcc69 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1ba4b6a553ad9ff4645af7fab8adfc6e810fcc69 | 2014-04-25 18:05:05+02:00 |
vmxnet3: validate interrupt indices coming from guest
CVE-2013-4544
Signed-off-by: Dmitry Fleytman <[email protected]>
Reported-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 8c6c0478996e8f77374e69b6df68655b0b4ba689 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8c6c0478996e8f77374e69b6df68655b0b4ba689 | 2014-04-14 11:33:18+01:00 |
bochs: Use unsigned variables for offsets and sizes (CVE-2014-0147)
Gets us rid of integer overflows resulting in negative sizes which
aren't correctly checked.
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]>
| 246f65838d19db6db55bfb41117c35645a2c4789 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/246f65838d19db6db55bfb41117c35645a2c4789 | 2014-04-01 13:59:47+02:00 |
qcow2: fix two memory leaks in qcow2_open error code path
Signed-off-by: Prasad Joshi <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| c5a33ee9eee031c9bae362b9bd7045cd8ff24d86 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c5a33ee9eee031c9bae362b9bd7045cd8ff24d86 | 2014-04-01 13:49:53+02:00 |
target-sparc: fix 32bit integer division overflow
The signed integer division -0x8000_0000_0000_0000 / -1 must be handled
separately to avoid an overflow on the QEMU host.
Negative overflow must be a negative number for correct sign
extension in Sparc64 mode. Use <stdint.h> constants.
Signed-off-by: Olivier Danet <[email protected]>
Signed-off-by: Mark Cave-Ayland <[email protected]>
| 6a5b69a959483c7404576a7dc54221ced41e6515 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6a5b69a959483c7404576a7dc54221ced41e6515 | 2014-03-26 23:40:40+00:00 |
vl.c: Fix memory leak in qemu_register_machine()
Since commit 261747f176f6 (vl: Use MachineClass instead of global
QEMUMachine list) valgrind complains about the following:
==54082== 57 bytes in 3 blocks are definitely lost in loss record 365 of
729
==54082== at 0x4031AFE: malloc (vg_replace_malloc.c:292)
==54082== by 0x4145569: g_malloc (in
/usr/lib64/libglib-2.0.so.0.3400.2)
==54082== by 0x415F9E9: g_strconcat (in
/usr/lib64/libglib-2.0.so.0.3400.2)
==54082== by 0x80157FE7: qemu_register_machine (vl.c:1597)
==54082== by 0x80208E6B: module_call_init (module.c:105)
==54082== by 0x80013B91: main (vl.c:3000)
Turns out that valgrind is right. We simply forget the memory that
g_strconcat() has allocated. Lets free it after the type_register().
We need a 2nd variable due to constness of the name part of the
type structure.
Signed-off-by: Christian Borntraeger <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| f5946dbab388050da6d9343978a38c81cce0508d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f5946dbab388050da6d9343978a38c81cce0508d | 2014-03-19 21:00:01+01:00 |
tests: test-qmp-commands: Fix double free
The ret variable is freed twice, but on the second time we actually want
to free ret3 instead. Don't know why this didn't explode.
Reported-by: Peter Maydell <[email protected]>
Tested-by: Peter Maydell <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
| 2a7a1a56d1e30de07cf7d7636a35bf7706b9500e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2a7a1a56d1e30de07cf7d7636a35bf7706b9500e | 2014-03-11 09:07:42-04:00 |
ahci: fix sysbus support
Non-PCI AHCI support is broken due to assertion failures when trying
to convert AHCIState to a PCIDevice pointer as AHCIState can have
different container structs. Fix this by using the non-asserting object
cast and checking the returned pointer is not NULL.
The AddressSpace pointer is also being initialized to NULL and causing
dma_memory_map call to fail. Fix this by initializing to
address_space_memory for sysbus instances.
Also correct AHCI_VMSTATE to use the correct container SysbusAHCIState
for sysbus instances.
Signed-off-by: Rob Herring <[email protected]>
Message-id: [email protected]
[PMM: added linebreaks to fix overlong lines]
Signed-off-by: Peter Maydell <[email protected]>
| bd16430777cc3d25930e479fdbe290d92cec0888 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bd16430777cc3d25930e479fdbe290d92cec0888 | 2014-03-18 19:36:13+00:00 |
tests: Correctly skip qtest on non-POSIX hosts
qtest test cases only work on POSIX hosts. The following line only
defines dependencies for qtest binaries on POSIX hosts:
check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS),$(check-qtest-$(TARGET)-y))
But the QTEST_TARGETS definition earlier in the Makefile fails to check
CONFIG_POSIX. This causes make targets to be generated for qtest test
cases even though we don't know how to build the binaries.
The following error message is printed when trying to run gtester on a
binary that was never built:
GLib-WARNING **: Failed to execute test binary: tests/endianness-test.exe: Failed to execute child process "tests/endianness-test.exe" (No such file or directory)
This patch makes QTEST_TARGETS empty on non-POSIX hosts. This prevents
the targets from being generated.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| 5c4e24c1516b6b8c21b6defcd4ffcf05f21202f7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5c4e24c1516b6b8c21b6defcd4ffcf05f21202f7 | 2014-03-31 22:35:03+02:00 |
hw/ide/ahci.h: Avoid shifting left into sign bit
Add 'U' suffixes to avoid undefined behaviour shifting left into
the signed bit of a signed integer type. Clang's sanitizer will
warn about this:
hw/ide/ahci.c:1210:27: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 2c02f88780aa611d669f73b7677aeadc1211de7e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2c02f88780aa611d669f73b7677aeadc1211de7e | 2014-03-07 11:29:21+01:00 |
target-i386: Fix SSE status flag corruption
When we restore the mxcsr register with FXRSTOR, or set it with gdb,
we need to update the various SSE status flags in CPUX86State
Reported-by: Richard Purdie <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| 4e47e39ab0ded72c0af174131ecf49d588d66c12 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4e47e39ab0ded72c0af174131ecf49d588d66c12 | 2014-02-28 08:44:01-08:00 |
scsi-bus: Fix transfer length for VERIFY with BYTCHK=11b
The transfer length depends on field BYTCHK, which is encoded in byte
1, bits 1..2. However, the guard for for case BYTCHK=11b doesn't
work, and we get case 01b instead. Fix it.
Note that since emulated scsi-hd fails the command outright, it takes
SCSI passthrough of a device that actually implements VERIFY with
BYTCHK=11b to make the bug bite.
Screwed up in commit d12ad44. Spotted by Coverity.
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 7ef8cf9a0861b6f67f5e57428478c31bfd811651 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7ef8cf9a0861b6f67f5e57428478c31bfd811651 | 2014-02-22 10:02:23+01:00 |
target-xtensa: add basic checks to icache opcodes
Check privilege level for privileged instructions (IHU, III, IIU and IPFL
are privileged), memory accessibility for instructions that reference memory
(IH* and IPFL) and windowed register validity for all instruction cache
instructions.
Signed-off-by: Max Filippov <[email protected]>
| e848dd4248230c0463841a16d1fa9eb054a2d211 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e848dd4248230c0463841a16d1fa9eb054a2d211 | 2014-02-24 04:47:01+04:00 |
Set xbzrle buffers to NULL after freeing them to avoid double free errors
Signed-off-by: Orit Wasserman <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| f6c6483b259a2395ee44cfa966f622e0f2dbe2ae | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f6c6483b259a2395ee44cfa966f622e0f2dbe2ae | 2014-02-04 16:48:49+01:00 |
qtest: unlink QEMU pid file after startup
After starting the QEMU process and initializing the QMP connection, we
can read the pid file and unlink it.
Just stash away the pid instead of the pid filename. This way we can
avoid pid file leaks since running tests may abort(3) without cleanup.
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 1ad3c6abc0d67e00b84abaa5527bc64b70ca2205 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1ad3c6abc0d67e00b84abaa5527bc64b70ca2205 | 2014-02-03 16:06:24+01:00 |
acpi unit-test: resolved iasl crash
It seems that iasl has an issue when disassembles
some ACPI tables using the command line:
iasl -e DSDT -e SSDT -d HPET
Modified the iasl command line to "iasl -d HPET"
until the problem is solved. The command line
remained the same for DSDT and SSDT tables.
Reported-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 69d09245d19765fd461cc3d3a7d79686007c4474 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/69d09245d19765fd461cc3d3a7d79686007c4474 | 2014-01-26 13:06:49+02:00 |
block: vhdx - improve error message, and .bdrv_check implementation
If there is a dirty log file to be replayed in a VHDX image, it is
replayed in .vhdx_open(). However, if the file is opened read-only,
then a somewhat cryptic error message results.
This adds a more helpful error message for the user. If an image file
contains a log to be replayed, and is opened read-only, the user is
instructed to run 'qemu-img check -r all' on the image file.
Running qemu-img check -r all will cause the image file to be opened
r/w, which will replay the log file. If a log file replay is detected,
this is flagged, and bdrv_check will increase the corruptions_fixed
count for the image.
[Fixed typo in error message that was pointed out by Eric Blake
<[email protected]>.
--Stefan]
Signed-off-by: Jeff Cody <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 7e30e6a6746b417c7e0dbc9af009560fbb63f336 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7e30e6a6746b417c7e0dbc9af009560fbb63f336 | 2013-12-20 09:11:58+01:00 |
qcow2: fix possible corruption when reading multiple clusters
if multiple sectors spanning multiple clusters are read the
function count_contiguous_clusters should ensure that the
cluster type should not change between the clusters.
Especially the for-loop should break when we have one
or more normal clusters followed by a compressed cluster.
Unfortunately the wrong macro was used in the mask to
compare the flags.
This was discovered while debugging a data corruption
issue when converting a compressed qcow2 image to raw.
qemu-img reads 2MB chunks which span multiple clusters.
CC: [email protected]
Signed-off-by: Peter Lieven <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 78a52ad5acca7053b774fcc80290e7b7e224c80a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/78a52ad5acca7053b774fcc80290e7b7e224c80a | 2013-11-14 13:09:07+01:00 |
qemu-iotests: Extend 041 for unbacked mirroring
Add a new test case in file 041 for mirroring unbacked images in
"absolute-paths" mode. This should work, if possible, but most
importantly, qemu should never crash.
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Wenchao Xia <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| c15badee200f9e743e3639cc5e3e7dd62c69332f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c15badee200f9e743e3639cc5e3e7dd62c69332f | 2013-11-14 13:09:06+01:00 |
acpi-build: disable with -no-acpi
QEMU will currently crash if started with -no-acpi flag
since acpi build code probes the PM device which isn't present
in this configuration.
To fix, don't expose ACPI tables to guest when acpi has been
disabled from command line.
Fixes LP# 1248854
https://bugs.launchpad.net/qemu/+bug/1248854
Reported-by: chao zhou <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
| 81adc5131534ca7554cebe64cd8f86bac28dbd1b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/81adc5131534ca7554cebe64cd8f86bac28dbd1b | 2013-11-10 12:08:38+02:00 |
timers: fix stop/cont with -icount
Stop/cont commands are broken with -icount due to a deadlock. The
real problem is that the computation of timers_state.cpu_ticks_offset
makes no sense with -icount enabled: we set it to an icount clock value
in cpu_disable_ticks, and subtract a TSC (or similar, whatever
cpu_get_real_ticks happens to return) value in cpu_enable_ticks.
The fix is simple. timers_state.cpu_ticks_offset is only used
together with cpu_get_real_ticks, so we can use cpu_get_real_ticks
in cpu_disable_ticks. There is no need to update cpu_ticks_prev
at the time cpu_disable_ticks is called; instead, we can do it
the next time cpu_get_ticks is called.
The change to cpu_disable_ticks is the important part of the patch.
The rest modifies the code to always check timers_state.cpu_ticks_prev,
even when the ticks are not advancing (i.e. the VM is stopped). It also
makes a similar change to cpu_get_clock_locked, so that the code remains
similar for cpu_get_ticks and cpu_get_clock_locked.
Signed-off-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Signed-off-by: Anthony Liguori <[email protected]>
| 5f3e31012e334f3410e04abae7f88565df17c91a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5f3e31012e334f3410e04abae7f88565df17c91a | 2013-11-06 21:47:05-08:00 |
tcg-arm: Use QEMU_BUILD_BUG_ON to verify constraints on tlb
One of the two constraints we already checked via #if, but
the tlb offset distance was only checked at runtime.
Signed-off-by: Richard Henderson <[email protected]>
| f2488736371ae902f345cf9270d141f0a6797731 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f2488736371ae902f345cf9270d141f0a6797731 | 2013-10-01 10:20:33-07:00 |
block: Remove redundant assertion
The failing condition is checked immediately before the assertion, so
keeping the assertion is kind of redundant.
Signed-off-by: Kevin Wolf <[email protected]>
| 09da4a72926e2d0af0e5f0cb967ab0dd345311f4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/09da4a72926e2d0af0e5f0cb967ab0dd345311f4 | 2013-08-30 15:28:52+02:00 |
kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled
This patch is to fix the bug https://bugs.launchpad.net/qemu-kvm/+bug/1207623
IA32_FEATURE_CONTROL is pointless if not expose VMX or SMX bits to
cpuid.1.ecx of vcpu. Current qemu-kvm will error return when kvm_put_msrs
or kvm_get_msrs.
Signed-off-by: Liu Jinsong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| df67696e97d3edd0cb1683bf2eb3b3236bd9a5ed | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/df67696e97d3edd0cb1683bf2eb3b3236bd9a5ed | 2013-08-20 18:37:17+02:00 |
qga: escape cmdline args when registering win32 service (CVE-2013-2231)
Reported-by: Lev Veyde <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Laszlo Ersek <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
| 340d51df5592c5c11fc3885f7bdedbe581b87366 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/340d51df5592c5c11fc3885f7bdedbe581b87366 | 2013-07-25 14:49:04-05:00 |
exec: fix incorrect assumptions in memory_access_size
access_size_min can be 1 because erroneous accesses must not crash
QEMU, they should trigger exceptions in the guest or just return
garbage (depending on the CPU). I am not sure I understand the
comment: placing a 4-byte field at the last byte of a region
makes no sense (unless impl.unaligned is true), and that is
why memory.c:access_with_adjusted_size does not bother with
minimums larger than the remaining length.
access_size_max can be mr->ops->valid.max_access_size because memory.c
can and will still break accesses bigger than
mr->ops->impl.max_access_size.
Reported-by: Markus Armbruster <[email protected]>
Tested-by: Markus Armbruster <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| e1622f4b15391bd44eb0f99a244fdf19a20fd981 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e1622f4b15391bd44eb0f99a244fdf19a20fd981 | 2013-07-18 06:03:25+02:00 |
rdma: IPv6 over Ethernet (RoCE) is broken in linux - workaround
We've gotten reports from multiple testers (including Frank Yangjie
and myself) that RDMA IPv6 support over RocE (Ethernet) is broken
in linux.
A patch to Linux is still in review:
http://comments.gmane.org/gmane.linux.drivers.rdma/16448
If the user is listening on '[::]', then we will not have a opened a device
yet and have no way of verifying if the device is RoCE or not.
In this case, the source VM will throw an error for ALL types of
connections (both IPv4 and IPv6) if the destination machine does not have
a regular infiniband network available for use.
The only way to gaurantee that an error is thrown for broken kernels is
for the management software to choose a *specific* interface at bind time
and validate what time of hardware it is.
Unfortunately, this puts the user in a fix:
If the source VM connects with an IPv4 address without knowing that the
destination has bound to '[::]' the migration will unconditionally fail
unless the management software is not explicitly listening on the the IPv4
address while using a RoCE-based device.
If the source VM connects with an IPv6 address, then we're OK because we can
throw an error on the source (and similarly on the destination).
But in mixed environments, this will be broken for a while until it is fixed
inside linux.
We do provide a *tiny* bit of help in mixed environments, though in this patch:
We can list all of the devices in the system and check to see if all the
devices are RoCE or Infiniband.
If we detect that we have a *pure* RoCE environment, then we can safely
thrown an error even if the management sofware has specified '[::]' as the
bind address.
However, if there is are multiple hetergeneous devices, then we cannot make
this assumption and the user just has to be sure they know what they are doing.
Signed-off-by: Michael R. Hines <[email protected]>
Message-id: [email protected]
Signed-off-by: Anthony Liguori <[email protected]>
| 7fc5b13fd7b05babc7bcad9dcb8281ae202a9494 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7fc5b13fd7b05babc7bcad9dcb8281ae202a9494 | 2013-08-12 09:31:16-05:00 |
qapi: qapi-commands: fix possible leaks on visitor dealloc
In qmp-marshal.c the dealloc visitor calls use the same errp
pointer of the input visitor calls. This means that if any of
the input visitor calls fails, then the dealloc visitor will
return early, before freeing the object's memory.
Here's an example, consider this code:
int qmp_marshal_input_block_passwd(Monitor *mon, const QDict *qdict, QObject **ret)
{
[...]
char * device = NULL;
char * password = NULL;
mi = qmp_input_visitor_new_strict(QOBJECT(args));
v = qmp_input_get_visitor(mi);
visit_type_str(v, &device, "device", errp);
visit_type_str(v, &password, "password", errp);
qmp_input_visitor_cleanup(mi);
if (error_is_set(errp)) {
goto out;
}
qmp_block_passwd(device, password, errp);
out:
md = qapi_dealloc_visitor_new();
v = qapi_dealloc_get_visitor(md);
visit_type_str(v, &device, "device", errp);
visit_type_str(v, &password, "password", errp);
qapi_dealloc_visitor_cleanup(md);
[...]
return 0;
}
Consider errp != NULL when the out label is reached, we're going
to leak device and password.
This patch fixes this by always passing errp=NULL for dealloc
visitors, meaning that we always try to free them regardless of
any previous failure. The above example would then be:
out:
md = qapi_dealloc_visitor_new();
v = qapi_dealloc_get_visitor(md);
visit_type_str(v, &device, "device", NULL);
visit_type_str(v, &password, "password", NULL);
qapi_dealloc_visitor_cleanup(md);
Signed-off-by: Luiz Capitulino <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Michael Roth <[email protected]>
| 8f91ad8a1b4702966d91ea58cd90bbde1faea1b3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8f91ad8a1b4702966d91ea58cd90bbde1faea1b3 | 2013-07-16 09:15:06-04:00 |
kvm: add detail error message when fail to add ioeventfd
I try to hotplug 28 * 8 multiple-function devices to guest with
old host kernel, ioeventfds in host kernel will be exhausted, then
qemu fails to allocate ioeventfds for blk/nic devices.
It's better to add detail error here.
Signed-off-by: Amos Kong <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Gleb Natapov <[email protected]>
| fa4ba923bd539647ace9d70d226a848bd6a89dac | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fa4ba923bd539647ace9d70d226a848bd6a89dac | 2013-07-03 10:38:19+02:00 |
s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62
With the next patch, the memory API will complain if the
TARGET_PHYS_ADDR_SPACE_BITS gets dangerously close to an
overflow. s390x can handle up to 64 bit of physical address
space from its page tables, but we never use that much. Just
decrease the value.
Cc: Alexander Graf <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 311f83ca08c011b048c063c2fd3038a8957970bc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/311f83ca08c011b048c063c2fd3038a8957970bc | 2013-05-24 18:43:35+02:00 |
memory: assert that PhysPageEntry's ptr does not overflow
While sized to 15 bits in PhysPageEntry, the ptr field is ORed into the
iotlb entries together with a page-aligned pointer. The ptr field must
not overflow into this page-aligned value, assert that it is smaller than
the page size.
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 68f3f65b09a1ce8c82fac17911ffc3bb6031ebe4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/68f3f65b09a1ce8c82fac17911ffc3bb6031ebe4 | 2013-05-24 18:42:30+02:00 |
qemu-char: do not operate on sources from finalize callbacks
Due to a glib bug, the finalize callback is called with the GMainContext
lock held. Thus, any operation on the context from the callback will
cause recursive locking and a deadlock. This happens, for example,
when a client disconnects from a socket chardev.
The fix for this is somewhat ugly, because we need to forego polymorphism
and implement our own function to destroy IOWatchPoll sources. The
right thing to do here would be child sources, but we support older
glib versions that do not have them. Not coincidentially, glib developers
found and fixed the deadlock as part of implementing child sources.
Signed-off-by: Paolo Bonzini <[email protected]>
Tested-by: Sander Eikelenboom <[email protected]>
Message-id: [email protected]
Signed-off-by: Anthony Liguori <[email protected]>
| 2b316774f60291f57ca9ecb6a9f0712c532cae34 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2b316774f60291f57ca9ecb6a9f0712c532cae34 | 2013-04-22 08:52:21-05:00 |
i386 ROR r8/r16 instruction fix
Fixed EFLAGS corruption by ROR r8/r16 instruction located at the end of the TB.
Signed-off-by: Pavel Dovgalyuk <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| 089305ac0a273e64c9a5655d26da7fe19ecee66f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/089305ac0a273e64c9a5655d26da7fe19ecee66f | 2013-04-20 21:27:52+02:00 |
fpu: Correct edgecase in float64_muladd
In handling float64_muladd, if we end up doing a subtraction of the
product and c, and the 128 bit result of this subtraction happens to
have its most significant bit in bit 63, we weren't handling this
correctly when attempting to normalize to put the most significant
bit into bit 126. We would end up doing a right shift by a negative
number (undefined behaviour in C) so at best we would return an
incorrect result to the guest. MSB in bit 63 has to be handled as a
special case separately from MSB in 0..62 and MSB in 63..126. (MSB
in 127 is not possible.)
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| e3d142d073d02f0a3a4aad79eb838c15b6f99c01 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e3d142d073d02f0a3a4aad79eb838c15b6f99c01 | 2013-04-15 16:06:15+02:00 |
libi2c-omap: Fix endianness dependency
The libqos driver for omap_i2c currently does not work on Big Endian.
Introduce helpers for reading from and writing to 16-bit armel registers.
This fixes tmp105-test failures on ppc.
To prepare for a QTest-level endianness solution, poison mem{read,write}
and always use the helpers. Adopt the expected signatures.
To avoid an unused variable warning, assert the STAT Single Byte Data
bit but, due to it not getting cleared, only it being set when len == 1.
Signed-off-by: Andreas Färber <[email protected]>
Message-id: [email protected]
Signed-off-by: Anthony Liguori <[email protected]>
| d0bce760e04b1658a3b4ac95be2839ae20fd86db | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d0bce760e04b1658a3b4ac95be2839ae20fd86db | 2013-02-11 13:22:48-06:00 |
disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)
Curses display requires stdin/out to stay on the terminal,
so -daemonize makes no sense in this case. Instead of
leaving display uninitialized like is done since 995ee2bf469de6bb,
explicitly detect this case earlier and error out.
-nographic can actually be used with -daemonize, by redirecting
everything to a null device, but the problem is that according
to documentation and historical behavour, -nographic redirects
guest ports to stdin/out, which, again, makes no sense in case
of -daemonize. Since -nographic is a legacy option, don't bother
fixing this case (to allow -nographic and -daemonize by redirecting
guest ports to null instead of stdin/out in this case), but disallow
it completely instead, to stop garbling host terminal.
If no display display needed and user wants to use -nographic,
the right way to go is to use
-serial null -parallel null -monitor none -display none -vga none
instead of -nographic.
Also prevent the same issue -- it was possible to get garbled
host tty after
-nographic -daemonize
and it is still possible to have it by using
-serial stdio -daemonize
Fix this by disallowing opening stdio chardev when -daemonize
is specified.
Signed-off-by: Michael Tokarev <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
| ab51b1d568e02c80b1abf9016bda3a86dc1db389 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ab51b1d568e02c80b1abf9016bda3a86dc1db389 | 2013-01-02 13:32:41-06:00 |
qcow2: Fix refcount table size calculation
A missing factor for the refcount table entry size in the calculation
could mean that too little memory was allocated for the in-memory
representation of the table, resulting in a buffer overflow.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Michael Tokarev <[email protected]>
Tested-by: Michael Tokarev <[email protected]>
| a3548077062dd9dc2701ebffd931ba6eaef40bec | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a3548077062dd9dc2701ebffd931ba6eaef40bec | 2012-11-14 18:19:21+01:00 |
target-mips: optimize ddiv/ddivu/div/divu with movcond
The result of a division by 0, or a division of INT_MIN by -1 in the
signed case, is unpredictable. Just replace 0 by 1 in that case so that
it doesn't trigger a floating point exception on the host.
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| 51127181cfac0315720e6ca502eb133a353f6b11 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/51127181cfac0315720e6ca502eb133a353f6b11 | 2012-10-31 22:20:48+01:00 |
configure: fix seccomp check
Currently, if libseccomp is missing but the user explicitly requested
seccomp support using --enable-seccomp, configure silently ignores the
situation and disables seccomp support.
This is unlike all other tests that explicitly fail in such situation.
Fix that.
Signed-off-by: "Yann E. MORIN" <[email protected]>
Reviewed-by: Andreas Färber <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| e84d5956cc6215d2f098e7b6090fc5ec4cba1be3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e84d5956cc6215d2f098e7b6090fc5ec4cba1be3 | 2012-09-14 08:46:27+01:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.