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
⌀ |
---|---|---|---|---|---|---|---|
iscsi: fix assertion in is_sector_request_lun_aligned
Commit 94d047a added an assertion the the request alignment check.
This introduced 2 issues:
a) A off-by-one error since a request of BDRV_REQUEST_MAX_SECTORS
is actually allowed.
b) The bdrv_get_block_status call in the read path to check the allocation
status requests up to INT_MAX sectors which triggers the assertion.
Fixes: 94d047a35bf663e28f8fef137544d8ea78165add
Signed-off-by: Peter Lieven <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 0ead93120eb7bd770b32adc00b5ec1ee721626dc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0ead93120eb7bd770b32adc00b5ec1ee721626dc | 2016-06-29 14:03:47+02:00 |
ppc: fix exception model for HV mode
This properly implements LPES0 handling for HV vs. !HV mode and
removes the unsupported LPES1. This has been removed from the specs
since ISA v2.07.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
[clg: AIL implementation was fixed in commit 5c94b2a5e5ef. This patch
only contains the bits of the original patch related to LPES0
handling, adapted commit log.
fixed checkpatch.pl errors. ]
Signed-off-by: Cédric Le Goater <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 6d49d6d4edb8106f1a83375d91fa518c631ba00f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6d49d6d4edb8106f1a83375d91fa518c631ba00f | 2016-06-23 12:43:25+10:00 |
qapi: Change visit_type_FOO() to no longer return partial objects
Returning a partial object on error is an invitation for a careless
caller to leak memory. We already fixed things in an earlier
patch to guarantee NULL if visit_start fails ("qapi: Guarantee
NULL obj on input visitor callback error"), but that does not
help the case where visit_start succeeds but some other failure
happens before visit_end, such that we leak a partially constructed
object outside visit_type_FOO(). As no one outside the testsuite
was actually relying on these semantics, it is cleaner to just
document and guarantee that ALL pointer-based visit_type_FOO()
functions always leave a safe value in *obj during an input visitor
(either the new object on success, or NULL if an error is
encountered), so callers can now unconditionally use
qapi_free_FOO() to clean up regardless of whether an error occurred.
The decision is done by adding visit_is_input(), then updating the
generated code to check if additional cleanup is needed based on
the type of visitor in use.
Note that we still leave *obj unchanged after a scalar-based
visit_type_FOO(); I did not feel like auditing all uses of
visit_type_Enum() to see if the callers would tolerate a specific
sentinel value (not to mention having to decide whether it would
be better to use 0 or ENUM__MAX as that sentinel).
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| 68ab47e4b4ecc1c4649362b8cc1e49794d1a6537 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/68ab47e4b4ecc1c4649362b8cc1e49794d1a6537 | 2016-05-12 09:47:55+02:00 |
nbd: Don't mishandle unaligned client requests
The NBD protocol does not (yet) force any alignment constraints
on clients. Even though qemu NBD clients always send requests
that are aligned to 512 bytes, we must be prepared for non-qemu
clients that don't care about alignment (even if it means they
are less efficient). Our use of blk_read() and blk_write() was
silently operating on the wrong file offsets when the client
made an unaligned request, corrupting the client's data (but
as the client already has control over the file we are serving,
I don't think it is a security hole, per se, just a data
corruption bug).
Note that in the case of NBD_CMD_READ, an unaligned length could
cause us to return up to 511 bytes of uninitialized trailing
garbage from blk_try_blockalign() - hopefully nothing sensitive
from the heap's prior usage is ever leaked in that manner.
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Tested-by: Kevin Wolf <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| df7b97ff89319ccf392a16748081482a3d22b35a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/df7b97ff89319ccf392a16748081482a3d22b35a | 2016-04-22 11:55:35+01:00 |
hostmem-file: plug a small leak
Signed-off-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| bc78a01319b689f9214d589b0ec48a9116b440ec | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bc78a01319b689f9214d589b0ec48a9116b440ec | 2016-04-15 17:56:06+02:00 |
migration: add support for encrypting data with TLS
This extends the migration_set_incoming_channel and
migration_set_outgoing_channel methods so that they
will automatically wrap the QIOChannel in a
QIOChannelTLS instance if TLS credentials are configured
in the migration parameters.
This allows TLS to work for tcp, unix, fd and exec
migration protocols. It does not (currently) work for
RDMA since it does not use these APIs, but it is
unlikely that TLS would be desired with RDMA anyway
since it would degrade the performance to that seen
with TCP defeating the purpose of using RDMA.
On the target host, QEMU would be launched with a set
of TLS credentials for a server endpoint
$ qemu-system-x86_64 -monitor stdio -incoming defer \
-object tls-creds-x509,dir=/home/berrange/security/qemutls,endpoint=server,id=tls0 \
...other args...
To enable incoming TLS migration 2 monitor commands are
then used
(qemu) migrate_set_str_parameter tls-creds tls0
(qemu) migrate_incoming tcp:myhostname:9000
On the source host, QEMU is launched in a similar
manner but using client endpoint credentials
$ qemu-system-x86_64 -monitor stdio \
-object tls-creds-x509,dir=/home/berrange/security/qemutls,endpoint=client,id=tls0 \
...other args...
To enable outgoing TLS migration 2 monitor commands are
then used
(qemu) migrate_set_str_parameter tls-creds tls0
(qemu) migrate tcp:otherhostname:9000
Thanks to earlier improvements to error reporting,
TLS errors can be seen 'info migrate' when doing a
detached migration. For example:
(qemu) info migrate
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off x-postcopy-ram: off
Migration status: failed
total time: 0 milliseconds
error description: TLS handshake failed: The TLS connection was non-properly terminated.
Or
(qemu) info migrate
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off x-postcopy-ram: off
Migration status: failed
total time: 0 milliseconds
error description: Certificate does not match the hostname localhost
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
| e122636562218b3d442cd2cd18fbc188dd9ce709 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e122636562218b3d442cd2cd18fbc188dd9ce709 | 2016-05-26 11:32:13+05:30 |
virtio-scsi: fix disabled mode
Add two missing checks for s->dataplane_fenced. In one case, QEMU
would skip injecting an IRQ due to a write to an uninitialized
EventNotifier's file descriptor.
In the second case, the dataplane_disabled field was used by mistake;
in fact after fixing this occurrence it is completely unused.
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 43c696a298f6bef81818b1d8e64d41a160782101 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/43c696a298f6bef81818b1d8e64d41a160782101 | 2016-04-07 19:57:33+03:00 |
pc-bios/s390-ccw: virtio_panic -> panic
This function has nothing to do with virtio.
Reviewed-by: Cornelia Huck <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Signed-off-by: Eugene (jno) Dvurechenski <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| c9262e8a84a29f22fbb5edde5d17f4f6166d5ae1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c9262e8a84a29f22fbb5edde5d17f4f6166d5ae1 | 2016-03-23 16:13:38+01:00 |
ivshmem: Plug leaks on unplug, fix peer disconnect
close_peer_eventfds() cleans up three things: ioeventfd triggers if
they exist, eventfds, and the array to store them.
Commit 98609cd (v1.2.0) fixed it not to clean up ioeventfd triggers
when they don't exist (property ioeventfd=off, which is the default).
Unfortunately, the fix also made it skip cleanup of the eventfds and
the array then. This is a memory and file descriptor leak on unplug.
Additionally, the reset of nb_eventfds is skipped. Doesn't matter on
unplug. On peer disconnect, however, this permanently wedges the
interrupt vectors used for that peer's ID. The eventfds stay behind,
but aren't connected to a peer anymore. When the ID gets recycled for
a new peer, the new peer's eventfds get assigned to vectors after the
old ones. Commonly, the device's number of vectors matches the
server's, so the new ones get dropped with a "Too many eventfd
received" message. Interrupts either don't work (common case) or go
to the wrong vector.
Fix by narrowing the conditional to just the ioeventfd trigger
cleanup.
While there, move the "invalid" peer check to the only caller where it
can actually happen, and tighten it to reject own ID.
Cc: Paolo Bonzini <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
| 9db51b4d64ded01536b3851a5a50e484ac2f7899 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9db51b4d64ded01536b3851a5a50e484ac2f7899 | 2016-03-21 21:29:01+01:00 |
block: Fix memory leak in hmp_drive_add_node()
hmp_drive_add_node() leaked qdict in the error path when no node-name is
specified.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| f8746fb804dad4858796363adb06c56543111062 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f8746fb804dad4858796363adb06c56543111062 | 2016-03-17 15:47:56+01:00 |
io: stronger check for support for IPv4/6
Instead of just checking for bind(), also check whether
getaddrinfo can resolve IPv6 addresses. This catches
failure when travis runs QEMU builds inside minimal
docker containers
Signed-off-by: Daniel P. Berrange <[email protected]>
| cfd47a71df51047833d182e9e97244e7816b57da | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cfd47a71df51047833d182e9e97244e7816b57da | 2016-03-15 13:55:52+00:00 |
migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context
There is a possibility to hit an assert in qcow2_get_specific_info that
s->qcow_version is undefined. This happens when VM in starting from
suspended state, i.e. it processes incoming migration, and in the same
time 'info block' is called.
The problem is that qcow2_invalidate_cache() closes the image and
memset()s BDRVQcowState in the middle.
The patch moves processing of bdrv_invalidate_cache_all out of
coroutine context for standard migration to avoid that.
Signed-off-by: Denis V. Lunev <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
CC: Paolo Bonzini <[email protected]>
CC: Juan Quintela <[email protected]>
CC: Amit Shah <[email protected]>
Message-Id: <[email protected]>
[Amit: Fix a use-after-free bug]
Signed-off-by: Amit Shah <[email protected]>
| 0aa6aefc9c93db1f64e3ba406ee5234da75b545b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0aa6aefc9c93db1f64e3ba406ee5234da75b545b | 2016-02-26 20:39:50+05:30 |
qga: fix off-by-one length check
Laszlo Ersek said: "The length check is off by one (in the safe direction); it
should be (nchars >= 2). The processing should be active for the wide string
L"\r\n" -- resulting in the empty wide string --, I believe."
Reported-by: Laszlo Ersek <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Michael Roth <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
| 25d943b95703ae45567395db4156b25052ee54c4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/25d943b95703ae45567395db4156b25052ee54c4 | 2016-02-25 09:48:51-06:00 |
usb: add pid check at the first of uhci_handle_td()
pid can be gotten from uhci device memory in uhci_handle_td(),
so the guest can trigger assert qemu if we get an invalid pid.
And the uhci spec 2.1.2 tells us The Host Controller sets Host
Controller Process Error bit to 1 when it detects a fatal error
and indicates that the Host Controller suffered a consistency
check failure while processing a Transfer Descriptor. An example
of a consistency check failure would be finding an illegal PID
field while processing the packet header portion of the TD.
When this error occurs, the Host Controller clears the Run/Stop
bit in the Command register to prevent further schedule execution.
We'd better to set UHCI_STS_HCPERR and kick an interrupt, check
the pid value at the first of uhci_handle_td function.
https://bugzilla.redhat.com/show_bug.cgi?id=1070027
Signed-off-by: Gonglei <[email protected]>
Message-id: [email protected]
[ applied minor codestyle fix ]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 5f77e06baa84323e5bbc96c2c7f4fe627078b210 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5f77e06baa84323e5bbc96c2c7f4fe627078b210 | 2016-02-23 10:38:01+01:00 |
usb: check USB configuration descriptor object
When processing remote NDIS control message packets, the USB Net
device emulator checks to see if the USB configuration descriptor
object is of RNDIS type(2). But it does not check if it is null,
which leads to a null dereference error. Add check to avoid it.
Reported-by: Qinghao Tang <[email protected]>
Signed-off-by: Prasad J Pandit <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 80eecda8e5d09c442c24307f340840a5b70ea3b9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/80eecda8e5d09c442c24307f340840a5b70ea3b9 | 2016-02-23 10:38:00+01:00 |
libqos: remove some leaks
qpci_device_find() returns allocated data, don't leak it.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| ea53854a54bc54dddeec0c56572adf53384e960c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ea53854a54bc54dddeec0c56572adf53384e960c | 2016-02-02 13:28:58+01:00 |
nbd-server: do not exit on failed memory allocation
The amount of memory allocated in nbd_co_receive_request is driven by the
NBD client (possibly a virtual machine). Parallel I/O can cause the
server to allocate a large amount of memory; check for failures and
return ENOMEM in that case.
Cc: [email protected]
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| f1c17521e79df863a5771d96974fab0d07f02be0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f1c17521e79df863a5771d96974fab0d07f02be0 | 2016-01-15 18:58:02+01:00 |
net/dump: fix nfds->filename leak
Cc: Jason Wang <[email protected]>
Signed-off-by: Li Zhijian <[email protected]>
Cc: [email protected]
Signed-off-by: Jason Wang <[email protected]>
| b50c7d452f5aef52cc9e7461f215cab87c3f3b03 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b50c7d452f5aef52cc9e7461f215cab87c3f3b03 | 2016-01-11 11:01:34+08:00 |
net: vmxnet3: avoid memory leakage in activate_device
Vmxnet3 device emulator does not check if the device is active
before activating it, also it did not free the transmit & receive
buffers while deactivating the device, thus resulting in memory
leakage on the host. This patch fixes both these issues to avoid
host memory leakage.
Reported-by: Qinghao Tang <[email protected]>
Reviewed-by: Dmitry Fleytman <[email protected]>
Signed-off-by: Prasad J Pandit <[email protected]>
Cc: [email protected]
Signed-off-by: Jason Wang <[email protected]>
| aa4a3dce1c88ed51b616806b8214b7c8428b7470 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/aa4a3dce1c88ed51b616806b8214b7c8428b7470 | 2016-01-11 11:01:34+08:00 |
mirror: Error out when a BDS would get two BBs
bdrv_replace_in_backing_chain() asserts that not both old and new
BlockDdriverState have a BlockBackend attached to them because both
would have to end up pointing to the new BDS and we don't support more
than one BB per BDS yet.
Before we can safely allow references to existing nodes as backing
files, we need to make sure that even if a backing file has a BB on it,
this doesn't crash qemu.
There are probably also some cases with the 'replaces' option set where
drive-mirror could fail this assertion today. They are fixed with this
error check as well.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
| 40365552c2fceacc9800ec9a87b9ead516a9a6ce | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/40365552c2fceacc9800ec9a87b9ead516a9a6ce | 2015-12-18 14:34:42+01:00 |
pcnet: fix rx buffer overflow(CVE-2015-7512)
Backends could provide a packet whose length is greater than buffer
size. Check for this and truncate the packet to avoid rx buffer
overflow in this case.
Cc: Prasad J Pandit <[email protected]>
Cc: [email protected]
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 8b98a2f07175d46c3f7217639bd5e03f2ec56343 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8b98a2f07175d46c3f7217639bd5e03f2ec56343 | 2015-12-07 21:43:48+08:00 |
crypto: avoid two coverity false positive error reports
In qcrypto_tls_creds_get_path() coverity complains that
we are checking '*creds' for NULL, despite having
dereferenced it previously. This is harmless bug due
to fact that the trace call was too early. Moving it
after the cleanup gets the desired semantics.
In qcrypto_tls_creds_check_cert_key_purpose() coverity
complains that we're passing a pointer to a previously
free'd buffer into gnutls_x509_crt_get_key_purpose_oid()
This is harmless because we're passing a size == 0, so
gnutls won't access the buffer, but rather just report
what size it needs to be. We can avoid it though by
explicitly setting the buffer to NULL after free'ing
it.
Signed-off-by: Daniel P. Berrange <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 0e1d02452bf2c3486406dd48524a5b1de3c0eba8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0e1d02452bf2c3486406dd48524a5b1de3c0eba8 | 2015-12-04 09:39:55+03:00 |
raw-posix.c: Make GetBSDPath() handle caching options
Add support for caching options that can be specified from the command
line.
The CD-ROM raw char device bypasses the host page cache and therefore
has alignment requirements. Alignment probing is necessary so only use
the raw char device if BDRV_O_NOCACHE is set.
This patch fixes -cdrom /dev/cdrom on Mac OS X hosts, where bdrv_read()
used to fail due to misaligned requests during image format probing.
Signed-off-by: John Arbuckle <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 98caa5bc0083ed4fe4833addd3078b56ce2f6cfa | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/98caa5bc0083ed4fe4833addd3078b56ce2f6cfa | 2015-11-25 14:27:43+01:00 |
atapi: Prioritize unknown cmd error over BCL error
If we don't know about the command at all, we need to prioritize
that failure above the zero byte-count-limit failure.
This fixes a failure in the sparc64 NetBSD 7.0 installer bootup.
Reported-by: Mark Cave-Ayland <[email protected]>
Signed-off-by: John Snow <[email protected]>
Tested-by: Mark Cave-Ayland <[email protected]>
Message-id: [email protected]
| f36aa12d2f2d5b5a877e38641183259e119e1568 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f36aa12d2f2d5b5a877e38641183259e119e1568 | 2015-11-13 14:31:42-05:00 |
block: Add statistics for failed and invalid I/O operations
This patch adds the block_acct_failed() and block_acct_invalid()
functions to allow keeping track of failed and invalid I/O operations.
The number of failed and invalid operations is exposed in
BlockDeviceStats.
We don't keep track of the time spent on invalid operations because
they are cancelled immediately when they are started.
Signed-off-by: Alberto Garcia <[email protected]>
Message-id: a7256ccb883a86356b1c6c46b5a29ed5448546a5.1446044837.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 7ee12dafe96a86dfa96af38cea1289305e429a55 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7ee12dafe96a86dfa96af38cea1289305e429a55 | 2015-11-12 16:22:45+01:00 |
iotests: 124 - transactional failure test
Use a transaction to request an incremental backup across two drives.
Coerce one of the jobs to fail, and then re-run the transaction.
Verify that no bitmap data was lost due to the partial transaction
failure.
To support the 'err-cancel' QMP argument name it's necessary for
transaction_action() to convert underscores in Python argument names
to hyphens for QMP argument names.
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| fc6c796ff2b049303473702d1ade9196d1843f5d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fc6c796ff2b049303473702d1ade9196d1843f5d | 2015-11-12 16:22:44+01:00 |
qobject: Protect against use-after-free in qobject_decref()
Adding an assertion to qobject_decref() will ensure that a
programming error causing use-after-free will result in
immediate failure (provided no other thread has started
using the memory) instead of silently attempting to wrap
refcnt around and leaving the problem to potentially bite
later at a harder point to diagnose.
Suggested-by: Markus Armbruster <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| cc9f60d4a2a4bf2578a9309a18f1c4602c9f5ce7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cc9f60d4a2a4bf2578a9309a18f1c4602c9f5ce7 | 2015-11-09 16:45:05+01:00 |
xen: Switch uses of xc_map_foreign_{pages,bulk} to use libxenforeignmemory API.
In Xen 4.7 we are refactoring parts libxenctrl into a number of
separate libraries which will provide backward and forward API and ABI
compatiblity.
One such library will be libxenforeignmemory which provides access to
privileged foreign mappings and which will provide an interface
equivalent to xc_map_foreign_{pages,bulk}.
The new xenforeignmemory_map() function behaves like
xc_map_foreign_pages() when the err argument is NULL and like
xc_map_foreign_bulk() when err is non-NULL, which maps into the shim
here onto checking err == NULL and calling the appropriate old
function.
Note that xenforeignmemory_map() takes the number of pages before the
arrays themselves, in order to support potentially future use of
variable-length-arrays in the prototype (in the future, when Xen's
baseline toolchain requirements are new enough to ensure VLAs are
supported).
In preparation for adding support for libxenforeignmemory add support
to the <=4.0 and <=4.6 compat code in xen_common.h to allow us to
switch to using the new API. These shims will disappear for versions
of Xen which include libxenforeignmemory.
Since libxenforeignmemory will have its own handle type but for <= 4.6
the functionality is provided by using a libxenctrl handle we
introduce a new global xen_fmem alongside the existing xen_xc. In fact
we make xen_fmem a pointer to the existing xen_xc, which then works
correctly with both <=4.0 (xc handle is an int) and <=4.6 (xc handle
is a pointer). In the latter case xen_fmem is actually a double
indirect pointer, but it all falls out in the wash.
Unlike libxenctrl libxenforeignmemory has an explicit unmap function,
rather than just specifying that munmap should be used, so the unmap
paths are updated to use xenforeignmemory_unmap, which is a shim for
munmap on these versions of xen. The mappings in xen-hvm.c do not
appear to be unmapped (which makes sense for a qemu-dm process)
In fb_disconnect this results in a change from simply mmap over the
existing mapping (with an implicit munmap) to expliclty unmapping with
xenforeignmemory_unmap and then mapping the required anonymous memory
in the same hole. I don't think this is a problem since any other
thread which was racily touching this region would already be running
the risk of hitting the mapping halfway through the call. If this is
thought to be a problem then we could consider adding an extra API to
the libxenforeignmemory interface to replace a foreign mapping with
anonymous shared memory, but I'd prefer not to.
Signed-off-by: Ian Campbell <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
| e0cb42ae4bc4438ba4ec0760df2d830b8759b255 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e0cb42ae4bc4438ba4ec0760df2d830b8759b255 | 2016-01-26 17:19:35+00:00 |
qga: 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 Roth <[email protected]>
| f3a06403b82c7f036564e4caf18b52ce6885fcfb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f3a06403b82c7f036564e4caf18b52ce6885fcfb | 2015-10-19 18:28:06-05:00 |
fw_cfg: document fw_cfg_modify_iXX() update functions
Document the behavior of fw_cfg_modify_iXX() for leak-less updating
of integer-type blobs.
Currently only fw_cfg_modify_i16() is coded, but 32- and 64-bit versions
may be added later if necessary..
Signed-off-by: Gabriel Somlo <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 57c3d238a5ff7e7ad7aba098b5d55d8d89c2a6a1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/57c3d238a5ff7e7ad7aba098b5d55d8d89c2a6a1 | 2015-10-19 15:26:53+02:00 |
Revert "qdev: Use qdev_get_device_class() for -device <type>,help"
This reverts commit 31bed5509dfcbdfc293154ce81086a4dbd7a80b6.
The reverted commit changed qdev_device_help() to reject abstract
devices and devices that have cannot_instantiate_with_device_add_yet
set, to fix crash bugs like -device x86_64-cpu,help.
Rejecting abstract devices makes sense: they're purely internal, and
the implementation of the help feature can't cope with them.
Rejecting non-pluggable devices makes less sense: even though you
can't use them with -device, the help may still be useful elsewhere,
for instance with -global. This is a regression: -device FOO,help
used to help even for FOO that aren't pluggable.
The previous two commits fixed the crash bug at a lower layer, so
reverting this one is now safe. Fixes the -device FOO,help
regression, except for the broken devices marked
cannot_even_create_with_object_new_yet. For those, the error message
is improved.
Example of a device where the regression is fixed:
$ qemu-system-x86_64 -device PIIX4_PM,help
PIIX4_PM.command_serr_enable=bool (on/off)
PIIX4_PM.multifunction=bool (on/off)
PIIX4_PM.rombar=uint32
PIIX4_PM.romfile=str
PIIX4_PM.addr=int32 (Slot and optional function number, example: 06.0 or 06)
PIIX4_PM.memory-hotplug-support=bool
PIIX4_PM.acpi-pci-hotplug-with-bridge-support=bool
PIIX4_PM.s4_val=uint8
PIIX4_PM.disable_s4=uint8
PIIX4_PM.disable_s3=uint8
PIIX4_PM.smb_io_base=uint32
Example of a device where it isn't fixed:
$ qemu-system-x86_64 -device host-x86_64-cpu,help
Can't list properties of device 'host-x86_64-cpu'
Both failed with "Parameter 'driver' expects pluggable device type"
before.
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Message-Id: <[email protected]>
| 33fe96833015cf15f4c0aa5bf8d34f60526e0732 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/33fe96833015cf15f4c0aa5bf8d34f60526e0732 | 2015-10-09 15:25:57+02:00 |
exec: allocate PROT_NONE pages on top of RAM
This inserts a read and write protected page between RAM and QEMU
memory, for file-backend RAM.
This makes it harder to exploit QEMU bugs resulting from buffer
overflows in devices using variants of cpu_physical_memory_map,
dma_memory_map etc.
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
| 8561c9244ddf1122dfe7ccac9b23f506062f1499 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8561c9244ddf1122dfe7ccac9b23f506062f1499 | 2015-10-01 16:16:52+03:00 |
qemu-char: 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]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 2d528d45ecf5ee3c1a566a9f3d664464925ef830 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2d528d45ecf5ee3c1a566a9f3d664464925ef830 | 2015-09-16 17:33:33+02:00 |
crypto: introduce new module for TLS x509 credentials
Introduce a QCryptoTLSCredsX509 class which is used to
manage x509 certificate TLS credentials. This will be
the preferred credential type offering strong security
characteristics
Example CLI configuration:
$QEMU -object tls-creds-x509,id=tls0,endpoint=server,\
dir=/path/to/creds/dir,verify-peer=yes
The 'id' value in the -object args will be used to associate the
credentials with the network services. For example, when the VNC
server is later converted it would use
$QEMU -object tls-creds-x509,id=tls0,.... \
-vnc 127.0.0.1:1,tls-creds=tls0
Signed-off-by: Daniel P. Berrange <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 85bcbc789eb65b54548a507b747ffffe6175b404 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/85bcbc789eb65b54548a507b747ffffe6175b404 | 2015-09-15 15:05:06+01:00 |
pci: Fix pci_device_iommu_address_space() bus propagation
he current code walks up the bus tree for an iommu, however it passes
to the iommu_fn() callback the bus/devfn of the immediate child of
the level where the callback was found, rather than the original
bus/devfn where the search started from.
This prevents iommu's like POWER8 (and in fact also Q35) to properly
provide an address space for a subset of devices that aren't immediate
children of the iommu.
PCIe carries the originator bdfn acccross to the iommu on all DMA
transactions, so we must be able to properly identify devices at all
levels.
This changes the function pci_device_iommu_address_space() to pass
the original pointers to the iommu_fn() callback instead.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 5af2ae2305143f1805a696f9554231e1fc246edc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5af2ae2305143f1805a696f9554231e1fc246edc | 2015-09-10 11:05:40+03:00 |
rtl8139: check IP Header Length field (CVE-2015-5165)
The IP Header Length field was only checked in the IP checksum case, but
is used in other cases too.
Reported-by: 朱东海(启路) <[email protected]>
Reviewed-by: Jason Wang <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 03247d43c577dfea8181cd40177ad5ba77c8db76 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/03247d43c577dfea8181cd40177ad5ba77c8db76 | 2015-08-03 13:08:03+01:00 |
acpi: avoid potential uninitialized access to cpu_hp_io_base
When building QEMU with Mingw64 toolchain I see a warning
CC x86_64-softmmu/hw/i386/acpi-build.o
hw/i386/acpi-build.c: In function 'acpi_build':
hw/i386/acpi-build.c:1138:9: warning: 'pm.cpu_hp_io_base' may be used uninitialized in this function [-Wmaybe-uninitialized]
aml_append(crs,
^
hw/i386/acpi-build.c:1666:16: note: 'pm.cpu_hp_io_base' was declared here
AcpiPmInfo pm;
^
In acpi_get_pm_info() some of the fields are pre-initialized
to 0, but this one was missed.
Signed-off-by: Daniel P. Berrange <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
| 94aaca6457e52bb9c8a53af3c89bfeec40afadfc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/94aaca6457e52bb9c8a53af3c89bfeec40afadfc | 2015-08-13 14:08:30+03:00 |
block: qemu-iotests - add check for multiplication overflow in vpc
This checks that VPC is able to successfully fail (without segfault)
on an image file with a max_table_entries that exceeds 0x40000000.
This table entry is within the valid range for VPC (although too large
for this sample image).
Cc: [email protected]
Signed-off-by: Jeff Cody <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 77c102c26ead946fe7589d4bddcdfa5cb431ebfe | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/77c102c26ead946fe7589d4bddcdfa5cb431ebfe | 2015-07-27 17:19:07+02:00 |
memory: fix refcount leak in memory_region_present
memory_region_present() leaks a reference to a MemoryRegion in the
case "mr == container". While fixing it, avoid reference counting
altogether for memory_region_present(), by using RCU only.
The return value could in principle be already invalid immediately
after memory_region_present returns, but presumably the caller knows
that and it's using memory_region_present to probe for devices that
are unpluggable, or something like that. The RCU critical section
is needed anyway, because it protects as->current_map.
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| c6742b14fe7352059cd4954a356a8105757af31b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c6742b14fe7352059cd4954a356a8105757af31b | 2015-07-16 20:00:20+02:00 |
tci: Fix compile failure by including qemu-common.h
Compilation of TCI was accidentally broken by the recent disassembler
changes:
CC x86_64-softmmu/arch_init.o
In file included from target-i386/cpu-qom.h:23:0,
from target-i386/cpu.h:986,
from include/qemu-common.h:122,
from include/disas/bfd.h:12,
from disas/tci.c:20:
include/qom/cpu.h:178:43: error: unknown type name ‘disassemble_info’
void (*disas_set_info)(CPUState *cpu, disassemble_info *info);
^
include/qom/cpu.h:179:1: error:
no semicolon at end of struct or union [-Werror]
} CPUClass;
^
cc1: all warnings being treated as errors
The underlying cause of this is an include loop:
bfd.h -> qemu-common.h -> target-arm/cpu.h -> target-arm/cpu-qom.h
-> qom/cpu.h -> bfd.h
which means that if bfd.h is included first then qom/cpu.h doesn't
get the definition of the disassemble_info type that it wanted.
The easiest fix for this is to include qemu-common.h from tci.c
before including disas/bfd.h.
Signed-off-by: Peter Maydell <[email protected]>
| 16c1321bd78ad79a7252b714184ee2a0b5944c56 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/16c1321bd78ad79a7252b714184ee2a0b5944c56 | 2015-07-09 17:50:27+01:00 |
rdma: Fix qemu crash when IPv6 address is used for migration
Qemu crashes when IPv6 address is specified for migration and access
to any RDMA uverbs device available on the system is blocked using cgroups.
Fix the crash by checking the return value of ibv_open_device routine.
Signed-off-by: Meghana Cheripady <[email protected]>
Signed-off-by: Padmanabh Ratnakar <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| 5b61d5752156dcbbe2bf1366c877a676ed9f8f51 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5b61d5752156dcbbe2bf1366c877a676ed9f8f51 | 2015-06-12 06:42:34+02:00 |
net/dump: Improve -net/host_net_add dump error reporting
When -net dump fails, it first reports a specific error, then a
generic one, like this:
$ qemu-system-x86_64 -net dump,id=foo,file=/eperm
qemu-system-x86_64: -net dump,id=foo,file=/eperm: -net dump: can't open /eperm
qemu-system-x86_64: -net dump,id=foo,file=/eperm: Device 'dump' could not be initialized
Convert net_init_tap() to Error. This suppresses the unwanted second
message.
Improve the error messages to include strerror(errno) where
appropriate.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 3791f83ca999edc2d11eb2006ccc1091cd712c15 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3791f83ca999edc2d11eb2006ccc1091cd712c15 | 2015-05-27 09:51:05+01:00 |
CVE-2015-1779: limit size of HTTP headers from websockets clients
The VNC server websockets decoder will read and buffer data from
websockets clients until it sees the end of the HTTP headers,
as indicated by \r\n\r\n. In theory this allows a malicious to
trick QEMU into consuming an arbitrary amount of RAM. In practice,
because QEMU runs g_strstr_len() across the buffered header data,
it will spend increasingly long burning CPU time searching for
the substring match and less & less time reading data. So while
this does cause arbitrary memory growth, the bigger problem is
that QEMU will be burning 100% of available CPU time.
A novnc websockets client typically sends headers of around
512 bytes in length. As such it is reasonable to place a 4096
byte limit on the amount of data buffered while searching for
the end of HTTP headers.
Signed-off-by: Daniel P. Berrange <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 2cdb5e142fb93e875fa53c52864ef5eb8d5d8b41 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2cdb5e142fb93e875fa53c52864ef5eb8d5d8b41 | 2015-04-01 17:12:55+02:00 |
rdma: Fix cleanup in error paths
As part of commit e325b49a320b493cc5d69e263751ff716dc458fe,
order in which resources are destroyed was changed for fixing
a seg fault. Due to this change, CQ will never get destroyed as
CQ should be destroyed after QP destruction. Seg fault is caused
improper cleanup when connection fails. Fixing cleanup after
connection failure and order in which resources are destroyed
in qemu_rdma_cleanup() routine.
Signed-off-by: Meghana Cheripady <[email protected]>
Signed-off-by: Padmanabh Ratnakar <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| 80b262e1439a22708e1c535b75363d4b90c3b41d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/80b262e1439a22708e1c535b75363d4b90c3b41d | 2015-03-26 15:31:46+01:00 |
virtio: Fix memory leaks reported by Coverity
All four leaks are similar, so fix them in one patch.
Success path was not doing memory free.
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
| 4ed7b2c3a78f785a1bcbe575e08c379b166723e3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4ed7b2c3a78f785a1bcbe575e08c379b166723e3 | 2015-03-16 13:32:24+05:30 |
scsi: Improve error reporting for invalid drive property
When setting "realized" fails, scsi_bus_legacy_add_drive() passes the
error to qerror_report_err(), then returns an unspecific "Setting
drive property failed" error, which is reported further up the call
chain.
Example:
$ qemu-system-x86_64 -nodefaults -S -display none \
> -drive if=scsi,id=foo,file=tmp.qcow2 -global isa-fdc.driveA=foo
qemu-system-x86_64: -drive if=scsi,id=foo,file=tmp.qcow2: Property 'scsi-disk.drive' can't take value 'foo', it's in use
qemu-system-x86_64: Setting drive property failed
qemu-system-x86_64: Initialization of device lsi53c895a failed: Device initialization failed
Clean up the obvious way: simply return the original error to the
caller. Gets rid of the second message in the above error cascade.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 390e90a90736f98ca47f2e767d7f2a15d68d6bc4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/390e90a90736f98ca47f2e767d7f2a15d68d6bc4 | 2015-03-10 11:18:23+01:00 |
coroutine: Fix use after free with qemu_coroutine_yield()
Instead of using the same function for entering and exiting coroutines,
and hoping that it doesn't add any functionality that hurts with the
parameters used for exiting, we can just directly call into the real
task switch in qemu_coroutine_switch().
This fixes a use-after-free scenario where reentering a coroutine that
has yielded still accesses the old parent coroutine (which may have
meanwhile terminated) in the part of coroutine_swap() that follows
qemu_coroutine_switch().
Cc: [email protected]
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
| 315a1309defd8ddf910c6c17e28cbbd7faf92f2e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/315a1309defd8ddf910c6c17e28cbbd7faf92f2e | 2015-03-09 11:11:59+01:00 |
block: Switch to host monotonic clock for IO throttling
Currently, throttle timers won't make any progress when VCPU is not
running, which would stall the request queue in utils, qtest, vm
suspending, and live migration, without special handling.
Block jobs are confusingly inconsistent between with and without
throttling: if user sets a bps limit, stops the vm, then start a block
job, the block job will not make any progress; in contrary, if user
unsets the bps limit, or if it's not set, the block job will run
normally.
After this patch, with the host clock, even if the VCPUs are stopped,
the throttle queues will be processed.
This patch also enables potential to add throttle to bdrv_drain_all.
Currently all requests are drained immediately. In other words whenever
it is called, IO throttling goes ineffective (examples: system reset,
migration and many block job operations.). This is a loophole that guest
could exploit. If we use the host clock, we can later just trust the
nested poll. This could be done on top.
Note that for qemu-iotests case 093, which uses qtest, we still keep vm
clock so the script can control the clock stepping in order to be
deterministic.
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| de50a20a4cc368d241d67c600f8c0f667186a8b5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/de50a20a4cc368d241d67c600f8c0f667186a8b5 | 2015-04-28 15:36:08+02:00 |
ide/isa: Replace unchecked qdev_init() by qdev_init_nofail()
isa_ide_init()'s callers don't check for failure. isa_ide_init()
looks like it could fail, but since isa_ide_realizefn() can't fail, it
actually can't. Replace its qdev_init() by qdev_init_nofail() to make
it obvious.
Cc: Kevin Wolf <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| e25b89e5208564220b9ea3a728f899b37ff6dc2d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e25b89e5208564220b9ea3a728f899b37ff6dc2d | 2015-02-24 00:19:05+01:00 |
leon3: Replace unchecked qdev_init() by qdev_init_nofail()
grlib_irqmp_create(), grlib_gptimer_create() and
grlib_apbuart_create() are helpers to create and realize GRLIB
devices. Their only caller leon3_generic_hw_init() doesn't check for
failure. Only the first can actually fail, and only when the caller
fails to set up a pointer property, which is a programming error.
Replace qdev_init() by qdev_init_nofail().
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Fabien Chouteau <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| cd7c50a48dd484637aec36c351728ad0f140805a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cd7c50a48dd484637aec36c351728ad0f140805a | 2015-02-24 00:19:05+01:00 |
vnc: fix coverity warning
vnc_display_local_addr will not be called with an invalid display id.
Add assert() to silence coverity warning about a null pointer dereference.
Signed-off-by: Gerd Hoffmann <[email protected]>
| 9e0ff75e5158c7dbb65ee447382bbdf4cafbef8b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9e0ff75e5158c7dbb65ee447382bbdf4cafbef8b | 2015-02-16 08:48:00+01:00 |
linux-user/elfload.c: Don't use _raw accessor functions
The _raw accessor functions are an implementation detail that has
leaked out to some callsites. Use get_user_u64() instead of ldq_raw().
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-id: [email protected]
| 2ccf97ec0f1b7a62a3220064f305454f3932c55a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2ccf97ec0f1b7a62a3220064f305454f3932c55a | 2015-01-20 15:19:33+00:00 |
block/iscsi: fix uninitialized variable
'ret' was never initialized in the success path.
Signed-off-by: Peter Wu <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| debfb917a4f9c0784772c86f110f2bcd22e5a14f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/debfb917a4f9c0784772c86f110f2bcd22e5a14f | 2015-01-03 09:22:13+01:00 |
target-arm/translate-a64: Fix wrong mmu_idx usage for LDT/STT
The LDT/STT (load/store unprivileged) instruction decode was using
the wrong MMU index value. This meant that instead of these insns
being "always access as if user-mode regardless of current privilege"
they were "always access as if kernel-mode regardless of current
privilege". This went unnoticed because AArch64 Linux doesn't use
these instructions.
Cc: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Greg Bellows <[email protected]>
Reviewed-by: Edgar E. Iglesias <[email protected]>
---
I'm not counting this as a security issue because I'm assuming
nobody treats TCG guests as a security boundary (certainly I
would not recommend doing so...)
| 949013ce111eb64f8bc81cf9a9f1cefd6a1678c3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/949013ce111eb64f8bc81cf9a9f1cefd6a1678c3 | 2015-02-05 13:37:23+00:00 |
serial: only resample THR interrupt on rising edge of IER.THRI
There is disagreement on whether LSR.THRE should be resampled when
IER.THRI goes from 1 to 1. Bochs only does it if IER.THRI goes from 0
to 1; PCE does it even if IER.THRI is unchanged. But the Windows driver
seems to always go from 1 to 0 and back to 1, so do things in agreement
with Bochs, because the handling of thr_ipending was reported in 2010
(https://lists.gnu.org/archive/html/qemu-devel/2010-03/msg01914.html)
as breaking DR-DOS Plus.
Reported-by: Roy Tam <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 1645b8eee558ffe2389a081bf61d08a864c36d2c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1645b8eee558ffe2389a081bf61d08a864c36d2c | 2014-12-15 17:34:42+01:00 |
qcow2: Prevent numerical overflow
In qcow2_alloc_cluster_offset(), *num is limited to
INT_MAX >> BDRV_SECTOR_BITS by all callers. However, since remaining is
of type uint64_t, we might as well cast *num to that type before
performing the shift.
Cc: [email protected]
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 11c89769dc3e638ef72915d97058411ddf79b64b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/11c89769dc3e638ef72915d97058411ddf79b64b | 2014-12-10 10:31:20+01:00 |
Fix for crash after migration in virtio-rng on bi-endian targets
VirtIO devices now remember which endianness they're operating in in order
to support targets which may have guests of either endianness, such as
powerpc. This endianness state is transferred in a subsection of the
virtio device's information.
With virtio-rng this can lead to an abort after a loadvm hitting the
assert() in virtio_is_big_endian(). This can be reproduced by doing a
migrate and load from file on a bi-endian target with a virtio-rng device.
The actual guest state isn't particularly important to triggering this.
The cause is that virtio_rng_load_device() calls virtio_rng_process() which
accesses the ring and thus needs the endianness. However,
virtio_rng_process() is called via virtio_load() before it loads the
subsections. Essentially the ->load callback in VirtioDeviceClass should
only be used for actually reading the device state from the stream, not for
post-load re-initialization.
This patch fixes the bug by moving the virtio_rng_process() after the call
to virtio_load(). Better yet would be to convert virtio to use vmsd and
have the virtio_rng_process() as a post_load callback, but that's a bigger
project for another day.
This is bugfix, and should be considered for the 2.2 branch.
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| db12451decf7dfe0f083564183e135f2095228b9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/db12451decf7dfe0f083564183e135f2095228b9 | 2014-11-28 13:06:00+00:00 |
blockdev: acquire AioContext in eject, change, and block_passwd
By acquiring the AioContext we avoid race conditions with the dataplane
thread which may also be accessing the BlockDriverState.
Fix up eject, change, and block_passwd in a single patch because
qmp_eject() and qmp_change_blockdev() both call eject_device(). Also
fix block_passwd while we're tackling a command that takes a block
encryption password.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| e3442099a2794925dfbe83711cd204caf80eae60 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e3442099a2794925dfbe83711cd204caf80eae60 | 2014-12-10 10:25:30+01:00 |
cirrus: fix blit region check
Issues:
* Doesn't check pitches correctly in case it is negative.
* Doesn't check width at all.
Turn macro into functions while being at it, also factor out the check
for one region which we then can simply call twice for src + dst.
This is CVE-2014-8106.
Reported-by: Paolo Bonzini <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
| d3532a0db02296e687711b8cdc7791924efccea0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d3532a0db02296e687711b8cdc7791924efccea0 | 2014-12-01 10:25:12+01:00 |
virtio-net: fix unmap leak
virtio_net_handle_ctrl() and other functions that process control vq
request call iov_discard_front() which will shorten the iov. This will
lead unmapping in virtqueue_push() leaks mapping.
Fixes this by keeping the original iov untouched and using a temp variable
in those functions.
Cc: Wen Congyang <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: [email protected]
Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 771b6ed37e3aa188a7485560b949a41c6cf174dc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/771b6ed37e3aa188a7485560b949a41c6cf174dc | 2014-11-28 10:29:20+00:00 |
target-mips: Correct the handling of writes to CP0.Status for MIPSr6
Correct these issues with the handling of CP0.Status for MIPSr6:
* only ignore the bit pattern of 0b11 on writes to CP0.Status.KSU, that
is for processors that do implement Supervisor Mode, let the bit
pattern be written to CP0.Status.UM:R0 freely (of course the value
written to read-only CP0.Status.R0 will be discarded anyway); this is
in accordance to the relevant architecture specification[1],
* check the newly written pattern rather than the current contents of
CP0.Status for the KSU bits being 0b11,
* use meaningful macro names to refer to CP0.Status bits rather than
magic numbers.
References:
[1] "MIPS Architecture For Programmers, Volume III: MIPS64 / microMIPS64
Privileged Resource Architecture", MIPS Technologies, Inc., Document
Number: MD00091, Revision 6.00, March 31, 2014, Table 9.45 "Status
Register Field Descriptions", pp. 210-211.
Signed-off-by: Maciej W. Rozycki <[email protected]>
Reviewed-by: Leon Alrae <[email protected]>
Signed-off-by: Leon Alrae <[email protected]>
| f88f79ec9df06d26d84e1d2e0c02d2634b4d8583 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f88f79ec9df06d26d84e1d2e0c02d2634b4d8583 | 2014-12-16 12:45:19+00:00 |
pc: limit DIMM address and size to page aligned values
When running in KVM mode, kvm_set_phys_mem() will silently
fail if registered MemoryRegion address/size is not page
aligned. Causing memory hotplug failure in guest.
Mapping non aligned MemoryRegion in TCG mode 'works', but
sane guest OS still expects page aligned memory module
and fails to initialize it if it's not aligned.
So do not allow non aligned (i.e. valid) address/size
values for DIMM to avoid either KVM failure or guest
issues caused by it.
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 92a37a04d6e034b73ea1ba4825ba4d5860f0a810 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/92a37a04d6e034b73ea1ba4825ba4d5860f0a810 | 2014-11-23 12:11:30+02:00 |
vnc: sanitize bits_per_pixel from the client
bits_per_pixel that are less than 8 could result in accessing
non-initialized buffers later in the code due to the expectation
that bytes_per_pixel value that is used to initialize these buffers is
never zero.
To fix this check that bits_per_pixel from the client is one of the
values that the rfb protocol specification allows.
This is CVE-2014-7815.
Signed-off-by: Petr Matousek <[email protected]>
[ kraxel: apply codestyle fix ]
Signed-off-by: Gerd Hoffmann <[email protected]>
| e6908bfe8e07f2b452e78e677da1b45b1c0f6829 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e6908bfe8e07f2b452e78e677da1b45b1c0f6829 | 2014-10-28 11:51:04+01:00 |
virtio-scsi-dataplane: Add op blocker
We need this to protect dataplane thread from race conditions with block
jobs until the latter is made dataplane-safe.
Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 3e2b2a9c49f44926b995495be5e94e61e4f29f5e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3e2b2a9c49f44926b995495be5e94e61e4f29f5e | 2014-10-23 16:41:22+02:00 |
s390x/kvm: propagate s390 cpu state to kvm
Let QEMU propagate the cpu state to kvm. If kvm doesn't yet support it, it is
silently ignored as kvm will still handle the cpu state itself in that case.
The state is not synced back, thus kvm won't have a chance to actively modify
the cpu state. To do so, control has to be given back to QEMU (which is already
done so in all relevant cases).
Setting of the cpu state can fail either because kvm doesn't support the
interface yet, or because the state is invalid/not supported. Failed attempts
will be traced
Signed-off-by: David Hildenbrand <[email protected]>
Signed-off-by: Jens Freimann <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
CC: Andreas Faerber <[email protected]>
Tested-by: Christian Borntraeger <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| c9e659c9ee75d33ff11a8573cea738ad26bb6f86 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c9e659c9ee75d33ff11a8573cea738ad26bb6f86 | 2014-10-10 10:37:47+02:00 |
qapi: Add corrupt field to ImageInfoSpecificQCow2
Just like lazy-refcounts, this field will be present iff the qcow2
compat level is 1.1 (or probably any future revision).
As expected, this breaks some tests due to the new field present in
qemu-img info output; so fix their output accordingly.
Suggested-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 9009b1963c5ed9bb826c8116e8b1d3aa94d47f85 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9009b1963c5ed9bb826c8116e8b1d3aa94d47f85 | 2014-10-04 19:18:17+01:00 |
monitor: Reset HMP mon->rs in CHR_EVENT_OPEN
Commit cdaa86a54 ("Add G_IO_HUP handler for socket chardev") exposed a bug in
the way the HMP monitor handles its command buffer. When a client closes the
connection to the monitor, tcp_chr_read() will detect the G_IO_HUP condition
and call tcp_chr_disconnect() to close the server-side connection too. Due to
the fact that monitor reads 1 byte at a time (for each tcp_chr_read()), the
monitor readline state / buffers might contain junk (i.e. a half-finished
command). Thus, without calling readline_restart() on mon->rs in
CHR_EVENT_OPEN, future HMP commands will fail.
Signed-off-by: Stratos Psomadakis <[email protected]>
Signed-off-by: Dimitris Aragiorgis <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
| e5554e2015f8fb452135f7b1ce1976536266379c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e5554e2015f8fb452135f7b1ce1976536266379c | 2014-09-26 13:14:10-04:00 |
qdev-monitor: fix segmentation fault on qdev_device_help()
Normally, qmp_device_list_properties() may return NULL when
a device haven't special properties excpet Object and DeviceState
properties, such as virtio-balloon-device.
We just need check local_err instead of prop_list.
Example:
Segmentation fault (core dumped)
The backtrace as below:
Program received signal SIGSEGV, Segmentation fault.
0x00005555559af1a8 in error_get_pretty (err=0x0) at util/error.c:152
152 return err->msg;
(gdb) bt
func=0x55555574a6ca <device_help_func>, opaque=0x0, abort_on_failure=0) at util/qemu-option.c:1072
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 0722eba9450cb8be9713fec1caa0772330739586 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0722eba9450cb8be9713fec1caa0772330739586 | 2014-09-22 11:39:18+01:00 |
async: aio_context_new(): Handle event_notifier_init failure
On a system with a low limit of open files the initialization
of the event notifier could fail and QEMU exits without printing any
error information to the user.
The problem can be easily reproduced by enforcing a low limit of open
files and start QEMU with enough I/O threads to hit this limit.
The same problem raises, without the creation of I/O threads, while
QEMU initializes the main event loop by enforcing an even lower limit of
open files.
This commit adds an error message on failure:
# qemu [...] -object iothread,id=iothread0 -object iothread,id=iothread1
qemu: Failed to initialize event notifier: Too many open files in system
Signed-off-by: Chrysostomos Nanakos <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 2f78e491d7b46542158ce0b8132ee4e05bc0ade4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2f78e491d7b46542158ce0b8132ee4e05bc0ade4 | 2014-09-22 11:39:48+01:00 |
vhost-scsi: init backend features earlier
As vhost core can use backend_features during init, clear it earlier to
avoid using uninitialized memory.
This use would be harmless since vhost scsi ignores the result
anyway, but initializing earlier will help prevent valgrind errors,
and make scsi and net behave similarly.
Cc: [email protected]
Acked-by: Paolo Bonzini <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 3a1655fc53a2d0375dc0b8cd358405c2cae288e3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3a1655fc53a2d0375dc0b8cd358405c2cae288e3 | 2014-09-03 16:41:05+03:00 |
fuzz: Add fuzzing functions for entries of refcount table and blocks
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Maria Kustova <[email protected]>
Message-id: c9f4027b6f401c67e9d18f94aed29be445e81d48.1408450493.git.maria.k@catit.be
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 2e5be6b77ef428df9088a5d01586cd0cd0b1a107 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2e5be6b77ef428df9088a5d01586cd0cd0b1a107 | 2014-09-22 11:39:36+01:00 |
target-arm: Fix regression that disabled VFP for ARMv5 CPUs
Commit 2c7ffc414 added support for honouring the CPACR coprocessor
access control register bits which may disable access to VFP
and Neon instructions. However it failed to account for the
fact that the CPACR is only present starting from the ARMv6
architecture version, so it accidentally disabled VFP completely
for ARMv5 CPUs like the ARM926. Linux would detect this as
"no VFP present" and probably fall back to its own emulation,
but other guest OSes might crash or misbehave.
This fixes bug LP:1359930.
Reported-by: Jakub Jermar <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Cc: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| ed1f13d607e2c64c66bea49d6f4edaf278d3d246 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ed1f13d607e2c64c66bea49d6f4edaf278d3d246 | 2014-08-29 15:00:28+01:00 |
block/quorum: add simple read pattern support
This patch adds single read pattern to quorum driver and quorum vote is default
pattern.
For now we do a quorum vote on all the reads, it is designed for unreliable
underlying storage such as non-redundant NFS to make sure data integrity at the
cost of the read performance.
For some use cases as following:
VM
--------------
| |
v v
A B
Both A and B has hardware raid storage to justify the data integrity on its own.
So it would help performance if we do a single read instead of on all the nodes.
Further, if we run VM on either of the storage node, we can make a local read
request for better performance.
This patch generalize the above 2 nodes case in the N nodes. That is,
vm -> write to all the N nodes, read just one of them. If single read fails, we
try to read next node in FIFO order specified by the startup command.
The 2 nodes case is very similar to DRBD[1] though lack of auto-sync
functionality in the single device/node failure for now. But compared with DRBD
we still have some advantages over it:
- Suppose we have 20 VMs running on one(assume A) of 2 nodes' DRBD backed
storage. And if A crashes, we need to restart all the VMs on node B. But for
practice case, we can't because B might not have enough resources to setup 20 VMs
at once. So if we run our 20 VMs with quorum driver, and scatter the replicated
images over the data center, we can very likely restart 20 VMs without any
resource problem.
After all, I think we can build a more powerful replicated image functionality
on quorum and block jobs(block mirror) to meet various High Availibility needs.
E.g, Enable single read pattern on 2 children,
-drive driver=quorum,children.0.file.filename=0.qcow2,\
children.1.file.filename=1.qcow2,read-pattern=fifo,vote-threshold=1
[1] http://en.wikipedia.org/wiki/Distributed_Replicated_Block_Device
[Dropped \n from an error_setg() error message
--Stefan]
Cc: Benoit Canet <[email protected]>
Cc: Eric Blake <[email protected]>
Cc: Kevin Wolf <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Signed-off-by: Liu Yuan <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| a9db86b223030bd40bdd81b160788196bc95fe6f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a9db86b223030bd40bdd81b160788196bc95fe6f | 2014-08-29 10:46:58+01:00 |
slirp/misc: Use the GLib memory allocation APIs
Here we don't check the return value of malloc() which may fail.
Use the g_new() instead, which will abort the program when
there is not enough memory.
Also, use g_strdup instead of strdup and remove the unnecessary
strdup function.
Signed-off-by: zhanghailiang <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Reviewed-by: Benoît Canet <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 2fd5d864099dd38b43b595e9e3375dad2f76049b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2fd5d864099dd38b43b595e9e3375dad2f76049b | 2014-08-24 13:16:32+04:00 |
block: iotest - update 084 to test static VDI image creation
This updates the VDI corruption test to also test static VDI image
creation, as well as the default dynamic image creation.
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 23d20b5b4fb7bde102e6779b7a13b88375e4db66 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/23d20b5b4fb7bde102e6779b7a13b88375e4db66 | 2014-08-15 15:07:15+02:00 |
qemu-char: fix deadlock with "-monitor pty"
qemu_chr_be_generic_open cannot be called with the write lock taken,
because it calls client code that may call qemu_chr_fe_write. This
actually happens for the monitor:
0x00007ffff27dbf79 in __GI_raise (sig=sig@entry=6)
0x00007ffff27df388 in __GI_abort ()
0x00005555555ef489 in error_exit (err=<optimized out>, msg=msg@entry=0x5555559796d0 <__func__.5959> "qemu_mutex_lock")
0x00005555558f9080 in qemu_mutex_lock (mutex=mutex@entry=0x555556248a30)
0x0000555555713936 in qemu_chr_fe_write (s=0x555556248a30, buf=buf@entry=0x5555563d8870 "QEMU 2.0.90 monitor - type 'help' for more information\r\n", len=56)
0x00005555556217fd in monitor_flush_locked (mon=mon@entry=0x555556251fd0)
0x0000555555621a12 in monitor_flush_locked (mon=0x555556251fd0)
monitor_puts (mon=mon@entry=0x555556251fd0, str=0x55555634bfa7 "", str@entry=0x55555634bf70 "QEMU 2.0.90 monitor - type 'help' for more information\n")
0x0000555555624359 in monitor_vprintf (mon=0x555556251fd0, fmt=<optimized out>, ap=<optimized out>)
0x0000555555624414 in monitor_printf (mon=<optimized out>, fmt=fmt@entry=0x5555559105a0 "QEMU %s monitor - type 'help' for more information\n")
0x0000555555629806 in monitor_event (opaque=0x555556251fd0, event=<optimized out>)
0x000055555571343c in qemu_chr_be_generic_open (s=0x555556248a30)
To avoid this, defer the call to an idle callback, which will be
called as soon as the main loop is re-entered. In order to simplify
the cleanup and do it in one place only, change pty_chr_close to
call pty_chr_state.
To reproduce, run with "-monitor pty", then try to read from the
slave /dev/pts/FOO that it creates.
Fixes: 9005b2a7589540a3733b3abdcfbccfe7746cd1a1
Reported-by: Li Liang <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 7b3621f47a990c5099c6385728347f69a8d0e55c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7b3621f47a990c5099c6385728347f69a8d0e55c | 2014-07-14 16:13:58+02:00 |
image-fuzzer: Reduce number of generator functions in __init__
Some issues can be found only when a fuzzed image has a partial structure,
e.g. has L1/L2 tables but no refcount ones. Generation of an entirely
defined image limits these cases. Now the Image constructor creates only
a header and a backing file name (if any), other image elements are generated
in the 'create_image' API.
Signed-off-by: Maria Kustova <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 94c83a24c1956cd50ab979725a730f7d8649ac15 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/94c83a24c1956cd50ab979725a730f7d8649ac15 | 2014-08-15 18:03:14+01:00 |
quorum: Add the rewrite-corrupted parameter to quorum
On read operations when this parameter is set and some replicas are corrupted
while quorum can be reached quorum will proceed to rewrite the correct version
of the data to fix the corrupted replicas.
This will shine with SSD where the FTL will remap the same block at another
place on rewrite.
Signed-off-by: Benoit Canet <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| cf29a570a7aa7abab66bf256fdf9540873590811 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cf29a570a7aa7abab66bf256fdf9540873590811 | 2014-06-27 14:18:17+02:00 |
hw/arm/pxa2xx_gpio: Fix handling of GPSR/GPCR reads
The PXA2xx GPIO GPSR and GPCR registers are write-only, with reads being
undefined behaviour. Instead of having GPCR return 31337 and GPSR return
the value last written, make both log the guest error and return 0.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
| ab7a0f0b6dbe8836d490c736803abef6e3695e1f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ab7a0f0b6dbe8836d490c736803abef6e3695e1f | 2014-06-29 18:38:40+01:00 |
pc-dimm: add busy address check and address auto-allocation
- if 'addr' property is not specified on -device/device_add command,
treat the default value as request for assigning PCDIMMDevice to
the first free memory region.
- if 'addr' is provided with -device/device_add command, attempt to
use it or fail command if it's already occupied or falls inside
of an existing PCDIMMDevice memory region.
Note:
GCompareFunc(a, b) used by g_slist_insert_sorted() returns 'gint',
however it might be too small to fit difference between
2 addresses. So use 128bit to calculate the difference and normalize
result to -1/0/1 return values.
Signed-off-by: Igor Mammedov <[email protected]>
Signed-off-by: Tang Chen <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Tested-by: Andrey Korolyov <[email protected]>
MST: commit log tweaks
| 0b3125711606374f04e279aebefcb7275480f040 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0b3125711606374f04e279aebefcb7275480f040 | 2014-06-19 16:41:49+03:00 |
target-arm: Correct handling of UXN bit in ARMv8 LPAE page tables
In v8 page tables bit 54 in the PTE is UXN in the EL0/EL1 translation regimes
and XN elsewhere. In v7 the bit is always XN. Since we only emulate EL0/EL1 we
can just treat this bit as UXN whenever we are in v8 mode.
Also correctly extract the upper attributes from the PTE entry, the v8 version
tried to avoid extracting the CONTIG bit and ended up with the upper bits being
off-by-one. Instead behave the same as v7 and extract (but ignore) the CONTIG
bit.
This fixes "Bad mode in Synchronous Abort handler detected, code 0x8400000f"
seen when modprobing modules under Linux.
Signed-off-by: Ian Campbell <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Claudio Fontana <[email protected]>
Cc: Rob Herring <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| d615efac7c4dc0984de31791c5c7d6b06408aadb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d615efac7c4dc0984de31791c5c7d6b06408aadb | 2014-06-09 16:06:11+01:00 |
bsd-user/mmap.c: Don't try to override g_malloc/g_free
Trying to override the implementations of g_malloc and g_free is
a really bad idea -- it means statically linked builds fail to
link (because of the multiple definitions provided by this file
and by glib), and non-statically linked builds segfault as soon
as they try to do anything more complicated than printing the
usage message. Remove these overridden versions and just use
the glib ones.
This is sufficient that bsd-user can run basic x86-64
binaries on OpenBSD again; FreeBSD and NetBSD seem to have
further issues.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Sean Bruno <[email protected]>
Reviewed-by: Ed Maste <[email protected]>
| b7b5233ad7fdd9985bb6d05b7919f3a20723ff2c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b7b5233ad7fdd9985bb6d05b7919f3a20723ff2c | 2014-06-11 00:25:06+01:00 |
target-ppc: Copy and split gen_spr_7xx() for 970
This stops using 7xx common SPRs init function and adds separate set
of helpers for 970.
This does not copy ICTC SPR as neither 970 manual nor PowerISA mention it.
This defines 970/book3s PMU SPRs constants as they differs from the ones
used for 7XX.
This creates 2 helpers for PMU SPRs, one for supermode privileged SPRs and
one for user privileged SPRs as "sup" versions can be shared across
the family while "user" versions will behave different starting POWER8
(which will be addressed later).
This allows writing to Uxxxx SPRs from supermode. spr_write_ureg() is
implemented for this as a copy of already existing spr_read_ureg().
This allows writing to supervisor's SIAR - it used to be disabled
when gen_spr_7xx() was used.
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| fd51ff6328e3d981582436d1040f648c8da4a41f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fd51ff6328e3d981582436d1040f648c8da4a41f | 2014-06-16 13:24:42+02:00 |
block/vvfat: Plug memory leak in check_directory_consistency()
On error path. Introduced in commit a046433a. Spotted by Coverity.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 6262bbd363b53a1f19c473345d7cc40254dd5c73 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6262bbd363b53a1f19c473345d7cc40254dd5c73 | 2014-05-30 14:26:54+02:00 |
target-ppc: Add "compat" CPU option
PowerISA defines a compatibility mode for server POWERPC CPUs which
is supported by the PCR special register which is hypervisor privileged.
To support this mode for guests, SPAPR defines a set of virtual PVRs,
one per PowerISA spec version. When a hypervisor needs a guest to work in
a compatibility mode, it puts a virtual PVR value into @cpu-version
property of a CPU node.
This introduces a "compat" CPU option which defines maximal compatibility
mode enabled. The supported modes are power6/power7/power8.
This does not change the existing behaviour, new property will be used
by next patches.
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| 8dfa3a5e85eca94a93b1495136f49c5776fd5ada | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8dfa3a5e85eca94a93b1495136f49c5776fd5ada | 2014-06-16 13:24:37+02:00 |
tcg: Use "unspecified behavior" for shifts
Change the definition such that shifts are not allowed to crash
for any input.
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| 20022fa15f6a8ddc24a8f9d7d177312fecc7fb3a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/20022fa15f6a8ddc24a8f9d7d177312fecc7fb3a | 2014-04-18 16:57:36-07:00 |
libcacard: fix wrong array expansion logic
The currrent code in libcacard/vcard_emul_nss.c:vcard_emul_options()
has a weird bug in variable usage around expanding opts->vreader
array.
There's a helper variable, vreaderOpt, which is first needlessly
initialized to NULL, next, conditionally, only we have to expand
opts->vreader, receives array expansion from g_renew(), and next,
even if we don't actually perform expansion, the value of this
variable is assigned to the actual array, opts->vreader, which
was supposed to be expanded.
So, since we expand the array by READER_STEP increments, only
once in READER_STEP (=4) the code will work, in other 3/4 times
it will fail badly.
Fix this by not using this temp variable when expanding the
array, and by dropping the useless =NULL initializer too -
if it wasn't in place initially, compiler would have warned
us about this problem at the beginning.
Signed-off-by: Michael Tokarev <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| d09b8fa161ed6a61339d4d0870f76f13c033b2a3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d09b8fa161ed6a61339d4d0870f76f13c033b2a3 | 2014-05-26 10:40:04+04:00 |
nbd: Use return values instead of error_is_set(errp)
Using error_is_set(errp) to check whether a function call failed is
fragile: it breaks when errp is null. Check perfectly suitable return
values instead when possible. errp can't be null there now, but this
is more robust and more obviously correct
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 92de9012904cd6ada47565f48db545d53069d933 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/92de9012904cd6ada47565f48db545d53069d933 | 2014-04-25 18:05:06+02:00 |
linux-user: fix getrusage and wait4 failures with invalid rusage struct
Implementations of system calls getrusage and wait4 have not previously
handled correctly cases when incorrect address of struct rusage is
passed.
This change makes sure return values are correctly set for these cases.
Signed-off-by: Petar Jovanovic <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| a39fb273bddd315b440b0617783051456a148242 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a39fb273bddd315b440b0617783051456a148242 | 2014-05-05 15:21:05+03:00 |
target-arm: Implement AArch64 EL1 exception handling
Implement exception handling for AArch64 EL1. Exceptions from AArch64 or
AArch32 EL0 are supported.
Signed-off-by: Rob Herring <[email protected]>
[PMM: fixed minor style nits; updated to match changes in
previous patches; added some of the simpler cases of
illegal-exception-return support]
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
| 52e60cdd342dc48116edb81b443ba8c0a0c6f1a3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/52e60cdd342dc48116edb81b443ba8c0a0c6f1a3 | 2014-04-17 21:34:04+01:00 |
qcow2: Fix types in qcow2_alloc_clusters and alloc_clusters_noref
In order to avoid integer overflows.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| bb572aefbdac290363bfa5ca0e810ccce0a14ed6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bb572aefbdac290363bfa5ca0e810ccce0a14ed6 | 2014-04-01 15:22:34+02:00 |
Revert "qtest: Fix crash if SIGABRT during qtest_init()"
It turns out there are test cases that use multiple libqtest instances.
We cannot use a global qtest instance in the SIGABRT handler.
This reverts commit cb201b4872f16dfbce63f8648b2584631e2e965f.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| 96b8ca47f8f21ba32a60930cddbf5da27d36b20d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/96b8ca47f8f21ba32a60930cddbf5da27d36b20d | 2014-03-31 22:20:04+02:00 |
configure: Make stack-protector test check both compile and link
Since we use the -fstack-protector argument at both compile and
link time in the build, we must check that it works with both
a compile and a link:
* MacOSX only fails in the compile step, not linking
* some gcc cross environments only fail at the link stage (if they
require a libssp and it's not present for some reason)
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Tested-by: Alexey Kardashevskiy <[email protected]>
| 590e5dd98fcc926cc3b63aad35aed79235ca4c2a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/590e5dd98fcc926cc3b63aad35aed79235ca4c2a | 2014-04-14 12:11:18+01:00 |
linux-user: Don't return uninitialized value for atomic_barrier syscall
QEMU's implementation of the m68k atomic_barrier syscall, like the kernel's,
is just a no-op. However we still need to return a result code from it.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| 3b899ea7d405dc7634ac629aa7b0e7639d506d9f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3b899ea7d405dc7634ac629aa7b0e7639d506d9f | 2014-03-17 11:44:31+02:00 |
pl011: fix UARTRSR accesses corrupting the UARTCR value
Offset 4 is UARTRSR/UARTECR, not the UARTCR. The UARTCR would be
corrupted if the UARTRSR is ever written. Fix by implementing a correct
model of the UARTRSR/UARTECR register. Reads of this register simply
reflect the error bits in data register. Only breaks can be triggered in
QEMU. With the pl011_can_receive function, we effectively have flow
control between the host and the model. Framing and parity errors simply
don't make sense in the model and will never occur.
Signed-off-by: Rob Herring <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| ce8f0905a59232982c8a220169e11c14c73e7dea | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ce8f0905a59232982c8a220169e11c14c73e7dea | 2014-03-18 19:38:55+00:00 |
target-lm32: kill cpu_abort() calls
Instead of killing QEMU, translate instructions which are not available on
the CPU model as a noop and issue a log message at translation time.
On the real hardware CPU unknown opcodes results in undefined behaviour.
These changes prepare the removal of CPULM32State from DisasContext.
Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Andreas Färber <[email protected]>
| 3604a76fea6ff37738d4a8f596be38407be74a83 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3604a76fea6ff37738d4a8f596be38407be74a83 | 2014-02-04 19:34:30+01:00 |
blockdev: Fail blockdev-add with encrypted images
Encrypted images need a password before they can be used, and we don't
want blockdev-add to create BDSes that aren't fully initialised. So for
now simply forbid encrypted images; we can come back to it later if we
need the functionality.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 8ae8e904fcba484ff7c3f8f31339b56ebd88fbad | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8ae8e904fcba484ff7c3f8f31339b56ebd88fbad | 2014-03-06 17:27:23+01:00 |
elf-loader: add more return codes
The existing load_elf() just returns -1 if it fails to load ELF. However
it could be smarter than this and tell more about the failure such as
wrong endianness or incompatible platform.
This adds additional return codes for wrong architecture, wrong
endianness and if the image is not ELF at all.
This adds a load_elf_strerror() helper to convert return codes into
string messages.
This fixes handling of what load_elf() returns for s390x, other
callers just check the return value for <0 and this remains unchanged.
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| 18674b26788a9e47f1157170234e32ece2044367 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/18674b26788a9e47f1157170234e32ece2044367 | 2014-03-05 03:06:46+01:00 |
s390x/ipl: Fix crash of ELF images with arbitrary entry points
When loading S390 kernels, the current code expects an ELF file with the
start address 0x10000. Other ELF files cause a segmentation fault. To avoid
these crashes, we should get the start address from the ELF file instead
of always using a hard-coded address.
Signed-off-by: Thomas Huth <[email protected]>
Acked-by: Cornelia Huck <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
| 7f00eb30febf1054c74b163ced984afcdbf6e670 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7f00eb30febf1054c74b163ced984afcdbf6e670 | 2014-02-27 09:51:26+01:00 |
s390x/virtio-hcall: Specification exception for illegal subcodes
So far, the DIAG 500 hypervisor call was only setting -EINVAL in
R2 when a guest tried to call this function with an illegal subcode.
This patch now changes the behavior so that a specification exception
is thrown instead, since this is the common behavior of other DIAG
functions (and other CPU instructions) when being called with illegal
parameters.
Signed-off-by: Thomas Huth <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
| 77319f22635e3f0ef86730503b4d18dd9a833529 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/77319f22635e3f0ef86730503b4d18dd9a833529 | 2014-02-27 09:51:25+01:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.