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
⌀ |
---|---|---|---|---|---|---|---|
qdev: Fix use after free in qdev_init_nofail error path
Since 69382d8b (qdev: Fix object reference leak in case device.realize()
fails), object_property_set_bool could release the object. The error
path wants the type name, so hold an reference before realizing it.
Cc: Igor Mammedov <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
0d4104e5760221547fad158bbbb655a4e4c22b50
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/0d4104e5760221547fad158bbbb655a4e4c22b50
|
2016-08-03 18:44:57+02:00
|
tests: fix vhost-user-test leak
Spotted by valgrind.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
|
69179fe2fc0b91f68699012ba72d329e74ff629e
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/69179fe2fc0b91f68699012ba72d329e74ff629e
|
2016-07-29 00:33:49+03:00
|
virtio: error out if guest exceeds virtqueue size
A broken or malicious guest can submit more requests than the virtqueue
size permits, causing unbounded memory allocation in QEMU.
The guest can submit requests without bothering to wait for completion
and is therefore not bound by virtqueue size. This requires reusing
vring descriptors in more than one request, which is not allowed by the
VIRTIO 1.0 specification.
In "3.2.1 Supplying Buffers to The Device", the VIRTIO 1.0 specification
says:
1. The driver places the buffer into free descriptor(s) in the
descriptor table, chaining as necessary
and
Note that the above code does not take precautions against the
available ring buffer wrapping around: this is not possible since the
ring buffer is the same size as the descriptor table, so step (1) will
prevent such a condition.
This implies that placing more buffers into the virtqueue than the
descriptor table size is not allowed.
QEMU is missing the check to prevent this case. Processing a request
allocates a VirtQueueElement leading to unbounded memory allocation
controlled by the guest.
Exit with an error if the guest provides more requests than the
virtqueue size permits. This bounds memory allocation and makes the
buggy guest visible to the user.
This patch fixes CVE-2016-5403 and was reported by Zhenhao Hong from 360
Marvel Team, China.
Reported-by: Zhenhao Hong <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
|
afd9096eb1882f23929f5b5c177898ed231bac66
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/afd9096eb1882f23929f5b5c177898ed231bac66
|
2016-07-27 14:04:40+01:00
|
Disable warn about left shifts of negative values
It seems like there's no good reason for the compiler to exploit the
undefinedness of left shifts. GCC explicitly documents that they do not
use at all this possibility and, while they also say this is subject
to change, they have been saying this for 10 years (since the wording
appeared in the GCC 4.0 manual).
Disable these warnings by passing in -Wno-shift-negative-value.
Cc: Peter Maydell <[email protected]>
Cc: Markus Armbruster <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
[pranith: forward-port part of patch to 2.7]
Signed-off-by: Pranith Kumar <[email protected]>
|
435405ac59b9334b06285e1192c693b497282a31
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/435405ac59b9334b06285e1192c693b497282a31
|
2016-08-09 22:57:36+02:00
|
qemu-sockets: use qapi_free_SocketAddress in cleanup
Commit 74b6ce43e3 uses the wrong free API for a SocketAddress, that
may leak some linked data.
Signed-off-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
73f40c1895980dc705b6b0594ace6580b3f68537
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/73f40c1895980dc705b6b0594ace6580b3f68537
|
2016-07-12 18:31:27+02:00
|
ppc64: disable gen_pause() for linux-user mode
While trying to install a fedora container with
"lxc-create -t fedora -- -I qemu-ppc64" the installation abort with
the following error:
qemu: fatal: Unknown exception 0x65537. Aborting
NIP 0000004000927924 LR 00000040009e325c CTR 0000004000927480 XER 0000000000000000 CPU#0
MSR 9000000102806000 HID0 0000000000000000 HF 9000000002806000 iidx 3 didx 3
TB 00248932 1069155773327487
GPR00 00000040009e325c 00000040007ff800 0000004000aba098 0000000000000000
GPR04 00000040007ff878 0000004000dcb588 0000004000dcb830 0000004000a7a098
GPR08 0000000000000000 0000000000000000 00000040007ff878 0000004000927960
GPR12 0000000022022448 0000004000e2aef0 0000000000000000 0000000000000000
GPR16 0000000000000000 0000000000000000 0000000000000002 0000000000000001
GPR20 0000000000000000 0000000000000000 0000000000000000 0000004000800699
GPR24 0000004000e13320 0000000000000000 0000004000ac9ad8 0000004000ac9ae0
GPR28 0000000000000001 00000000100210a0 0000000000000000 0000000000000038
CR 22022442 [ E E - E E G G E ] RES ffffffffffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 0000000000000000
/usr/share/lxc/templates/lxc-fedora: line 487: 26661 Aborted (core dumped) chroot . yum -y --nogpgcheck --installroot /run/install install python rpm yum
I've bisected until the commit:
commit b68e60e6f0d2865e961a800fb8db96a7fc6494c4
Author: Benjamin Herrenschmidt <[email protected]>
Date: Tue May 3 18:03:33 2016 +0200
ppc: Get out of emulation on SMT "OR" ops
Otherwise tight loops at smt_low for example, which OPAL does,
eat so much CPU that we can't boot a kernel anymore. With that,
I can boot 8 CPUs just fine with powernv.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: David Gibson <[email protected]>
We can fix that by preventing to send EXCP_HLT in the case of linux-user mode,
as the main loop doesn't know how to manage it.
Signed-off-by: Laurent Vivier <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
7f2b1744b3ea0f9860ece4bd9493d88286601408
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/7f2b1744b3ea0f9860ece4bd9493d88286601408
|
2016-06-22 11:12:17+10:00
|
mirror: follow AioContext change gracefully
Add block_job_pause_point() calls to mark quiescent points and make sure
to complete in-flight requests when switching AioContexts.
This patch solves undefined behavior in the mirror block job when the
BDS AioContext is changed by dataplane.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
|
565ac01f8d35236844dd0257a185f81425cd4b6a
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/565ac01f8d35236844dd0257a185f81425cd4b6a
|
2016-06-20 14:25:41+01:00
|
block: fix race in bdrv_co_discard with drive-mirror
Actually we must set dirty bitmap dirty after we have written all our
zeroes for correct processing in drive mirror code. In the other case
we can face not zeroes in this area in mirror_iteration.
Signed-off-by: Denis V. Lunev <[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy<[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
CC: Stefan Hajnoczi <[email protected]>
CC: Kevin Wolf <[email protected]>
CC: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
|
968d8b0627d3585d6b82da4239b9adf98614ab7c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/968d8b0627d3585d6b82da4239b9adf98614ab7c
|
2016-06-20 11:44:12+01:00
|
block: drop support for using qcow[2] encryption with system emulators
Back in the 2.3.0 release we declared qcow[2] encryption as
deprecated, warning people that it would be removed in a future
release.
commit a1f688f4152e65260b94f37543521ceff8bfebe4
Author: Markus Armbruster <[email protected]>
Date: Fri Mar 13 21:09:40 2015 +0100
block: Deprecate QCOW/QCOW2 encryption
The code still exists today, but by a (happy?) accident we entirely
broke the ability to use qcow[2] encryption in the system emulators
in the 2.4.0 release due to
commit 8336aafae1451d54c81dd2b187b45f7c45d2428e
Author: Daniel P. Berrange <[email protected]>
Date: Tue May 12 17:09:18 2015 +0100
qcow2/qcow: protect against uninitialized encryption key
This commit was designed to prevent future coding bugs which
might cause QEMU to read/write data on an encrypted block
device in plain text mode before a decryption key is set.
It turns out this preventative measure was a little too good,
because we already had a long standing bug where QEMU read
encrypted data in plain text mode during system emulator
startup, in order to guess disk geometry:
Thread 10 (Thread 0x7fffd3fff700 (LWP 30373)):
#0 0x00007fffe90b1a28 in raise () at /lib64/libc.so.6
#1 0x00007fffe90b362a in abort () at /lib64/libc.so.6
#2 0x00007fffe90aa227 in __assert_fail_base () at /lib64/libc.so.6
#3 0x00007fffe90aa2d2 in () at /lib64/libc.so.6
#4 0x000055555587ae19 in qcow2_co_readv (bs=0x5555562accb0, sector_num=0, remaining_sectors=1, qiov=0x7fffffffd260) at block/qcow2.c:1229
#5 0x000055555589b60d in bdrv_aligned_preadv (bs=bs@entry=0x5555562accb0, req=req@entry=0x7fffd3ffea50, offset=offset@entry=0, bytes=bytes@entry=512, align=align@entry=512, qiov=qiov@entry=0x7fffffffd260, flags=0) at block/io.c:908
#6 0x000055555589b8bc in bdrv_co_do_preadv (bs=0x5555562accb0, offset=0, bytes=512, qiov=0x7fffffffd260, flags=<optimized out>) at block/io.c:999
#7 0x000055555589c375 in bdrv_rw_co_entry (opaque=0x7fffffffd210) at block/io.c:544
#8 0x000055555586933b in coroutine_thread (opaque=0x555557876310) at coroutine-gthread.c:134
#9 0x00007ffff64e1835 in g_thread_proxy (data=0x5555562b5590) at gthread.c:778
#10 0x00007ffff6bb760a in start_thread () at /lib64/libpthread.so.0
#11 0x00007fffe917f59d in clone () at /lib64/libc.so.6
Thread 1 (Thread 0x7ffff7ecab40 (LWP 30343)):
#0 0x00007fffe91797a9 in syscall () at /lib64/libc.so.6
#1 0x00007ffff64ff87f in g_cond_wait (cond=cond@entry=0x555555e085f0 <coroutine_cond>, mutex=mutex@entry=0x555555e08600 <coroutine_lock>) at gthread-posix.c:1397
#2 0x00005555558692c3 in qemu_coroutine_switch (co=<optimized out>) at coroutine-gthread.c:117
#3 0x00005555558692c3 in qemu_coroutine_switch (from_=0x5555562b5e30, to_=to_@entry=0x555557876310, action=action@entry=COROUTINE_ENTER) at coroutine-gthread.c:175
#4 0x0000555555868a90 in qemu_coroutine_enter (co=0x555557876310, opaque=0x0) at qemu-coroutine.c:116
#5 0x0000555555859b84 in thread_pool_completion_bh (opaque=0x7fffd40010e0) at thread-pool.c:187
#6 0x0000555555859514 in aio_bh_poll (ctx=ctx@entry=0x5555562953b0) at async.c:85
#7 0x0000555555864d10 in aio_dispatch (ctx=ctx@entry=0x5555562953b0) at aio-posix.c:135
#8 0x0000555555864f75 in aio_poll (ctx=ctx@entry=0x5555562953b0, blocking=blocking@entry=true) at aio-posix.c:291
#9 0x000055555589c40d in bdrv_prwv_co (bs=bs@entry=0x5555562accb0, offset=offset@entry=0, qiov=qiov@entry=0x7fffffffd260, is_write=is_write@entry=false, flags=flags@entry=(unknown: 0)) at block/io.c:591
#10 0x000055555589c503 in bdrv_rw_co (bs=bs@entry=0x5555562accb0, sector_num=sector_num@entry=0, buf=buf@entry=0x7fffffffd2e0 "\321,", nb_sectors=nb_sectors@entry=21845, is_write=is_write@entry=false, flags=flags@entry=(unknown: 0)) at block/io.c:614
#11 0x000055555589c562 in bdrv_read_unthrottled (nb_sectors=21845, buf=0x7fffffffd2e0 "\321,", sector_num=0, bs=0x5555562accb0) at block/io.c:622
#12 0x000055555589c562 in bdrv_read_unthrottled (bs=0x5555562accb0, sector_num=sector_num@entry=0, buf=buf@entry=0x7fffffffd2e0 "\321,", nb_sectors=nb_sectors@entry=21845) at block/io.c:634
nb_sectors@entry=1) at block/block-backend.c:504
#14 0x0000555555752e9f in guess_disk_lchs (blk=blk@entry=0x5555562a5290, pcylinders=pcylinders@entry=0x7fffffffd52c, pheads=pheads@entry=0x7fffffffd530, psectors=psectors@entry=0x7fffffffd534) at hw/block/hd-geometry.c:68
#15 0x0000555555752ff7 in hd_geometry_guess (blk=0x5555562a5290, pcyls=pcyls@entry=0x555557875d1c, pheads=pheads@entry=0x555557875d20, psecs=psecs@entry=0x555557875d24, ptrans=ptrans@entry=0x555557875d28) at hw/block/hd-geometry.c:133
#16 0x0000555555752b87 in blkconf_geometry (conf=conf@entry=0x555557875d00, ptrans=ptrans@entry=0x555557875d28, cyls_max=cyls_max@entry=65536, heads_max=heads_max@entry=16, secs_max=secs_max@entry=255, errp=errp@entry=0x7fffffffd5e0) at hw/block/block.c:71
#17 0x0000555555799bc4 in ide_dev_initfn (dev=0x555557875c80, kind=IDE_HD) at hw/ide/qdev.c:174
#18 0x0000555555768394 in device_realize (dev=0x555557875c80, errp=0x7fffffffd640) at hw/core/qdev.c:247
#19 0x0000555555769a81 in device_set_realized (obj=0x555557875c80, value=<optimized out>, errp=0x7fffffffd730) at hw/core/qdev.c:1058
#20 0x00005555558240ce in property_set_bool (obj=0x555557875c80, v=<optimized out>, opaque=0x555557875de0, name=<optimized out>, errp=0x7fffffffd730)
at qom/object.c:1514
#21 0x0000555555826c87 in object_property_set_qobject (obj=obj@entry=0x555557875c80, value=value@entry=0x55555784bcb0, name=name@entry=0x55555591cb3d "realized", errp=errp@entry=0x7fffffffd730) at qom/qom-qobject.c:24
#22 0x0000555555825760 in object_property_set_bool (obj=obj@entry=0x555557875c80, value=value@entry=true, name=name@entry=0x55555591cb3d "realized", errp=errp@entry=0x7fffffffd730) at qom/object.c:905
#23 0x000055555576897b in qdev_init_nofail (dev=dev@entry=0x555557875c80) at hw/core/qdev.c:380
#24 0x0000555555799ead in ide_create_drive (bus=bus@entry=0x555557629630, unit=unit@entry=0, drive=0x5555562b77e0) at hw/ide/qdev.c:122
#25 0x000055555579a746 in pci_ide_create_devs (dev=dev@entry=0x555557628db0, hd_table=hd_table@entry=0x7fffffffd830) at hw/ide/pci.c:440
#26 0x000055555579b165 in pci_piix3_ide_init (bus=<optimized out>, hd_table=0x7fffffffd830, devfn=<optimized out>) at hw/ide/piix.c:218
#27 0x000055555568ca55 in pc_init1 (machine=0x5555562960a0, pci_enabled=1, kvmclock_enabled=<optimized out>) at /home/berrange/src/virt/qemu/hw/i386/pc_piix.c:256
#28 0x0000555555603ab2 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4249
So the safety net is correctly preventing QEMU reading cipher
text as if it were plain text, during startup and aborting QEMU
to avoid bad usage of this data.
For added fun this bug only happens if the encrypted qcow2
file happens to have data written to the first cluster,
otherwise the cluster won't be allocated and so qcow2 would
not try the decryption routines at all, just return all 0's.
That no one even noticed, let alone reported, this bug that
has shipped in 2.4.0, 2.5.0 and 2.6.0 shows that the number
of actual users of encrypted qcow2 is approximately zero.
So rather than fix the crash, and backport it to stable
releases, just go ahead with what we have warned users about
and disable any use of qcow2 encryption in the system
emulators. qemu-img/qemu-io/qemu-nbd are still able to access
qcow2 encrypted images for the sake of data conversion.
In the future, qcow2 will gain support for the alternative
luks format, but when this happens it'll be using the
'-object secret' infrastructure for getting keys, which
avoids this problematic scenario entirely.
Signed-off-by: Daniel P. Berrange <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
8c0dcbc4ad2bf4f9f3b27c637b357e87cad70ec7
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8c0dcbc4ad2bf4f9f3b27c637b357e87cad70ec7
|
2016-06-16 15:19:55+02:00
|
nbd: Quit server after any write error
We should never ignore failure from nbd_negotiate_send_rep(); if
we are unable to write to the client, then it is not worth trying
to continue the negotiation. Fortunately, the problem is not
too severe - chances are that the errors being ignored here (mainly
inability to write the reply to the client) are indications of
a closed connection or something similar, which will also affect
the next attempt to interact with the client and eventually reach
a point where the errors are detected to end the loop.
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
63d5ef869e5e57de4875cd64b6f197cbb5763adf
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/63d5ef869e5e57de4875cd64b6f197cbb5763adf
|
2016-06-16 18:39:05+02:00
|
ppc: Do not take exceptions on unknown SPRs in privileged mode
The architecture specifies that mtspr/mfspr on an unknown SPR number
should act as a nop in privileged mode.
I haven't removed the warning however as it can be useful for
diagnosing.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
4d6a0680fa425230748a2d91d81be9afe050eeb3
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/4d6a0680fa425230748a2d91d81be9afe050eeb3
|
2016-06-07 13:10:45+10:00
|
linux-user: Provide safe_syscall for fixing races between signals and syscalls
If a signal is delivered immediately before a blocking system call the
handler will only be called after the system call returns, which may be a
long time later or never.
This is fixed by using a function (safe_syscall) that checks if a guest
signal is pending prior to making a system call, and if so does not call the
system call and returns -TARGET_ERESTARTSYS. If a signal is received between
the check and the system call host_signal_handler() rewinds execution to
before the check. This rewinding has the effect of closing the race window
so that safe_syscall will reliably either (a) go into the host syscall
with no unprocessed guest signals pending or or (b) return
-TARGET_ERESTARTSYS so that the caller can deal with the signals.
Implementing this requires a per-host-architecture assembly language
fragment.
This will also resolve the mishandling of the SA_RESTART flag where
we would restart a host system call and not call the guest signal handler
until the syscall finally completed -- syscall restarting now always
happens at the guest syscall level so the guest signal handler will run.
(The host syscall will never be restarted because if the host kernel
rewinds the PC to point at the syscall insn for a restart then our
host_signal_handler() will see this and arrange the guest PC rewind.)
This commit contains the infrastructure for implementing safe_syscall
and the assembly language fragment for x86-64, but does not change any
syscalls to use it.
Signed-off-by: Timothy Edward Baldwin <[email protected]>
Message-id: 1441497448-32489-14-git-send-email-T.E.Baldwin99@members.leeds.ac.uk
[PMM:
* Avoid having an architecture if-ladder in configure by putting
linux-user/host/$(ARCH) on the include path and including
safe-syscall.inc.S from it
* Avoid ifdef ladder in signal.c by creating new hostdep.h to hold
host-architecture-specific things
* Added copyright/license header to safe-syscall.inc.S
* Rewrote commit message
* Added comments to safe-syscall.inc.S
* Changed calling convention of safe_syscall() to match syscall()
(returns -1 and host error in errno on failure)
* Added a long comment in qemu.h about how to use safe_syscall()
to implement guest syscalls.
]
RV: squashed Peters "fixup! linux-user: compile on non-x86-64 hosts"
patch
Signed-off-by: Peter Maydell <[email protected]>
|
4d330cee37a21aabfc619a1948953559e66951a4
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/4d330cee37a21aabfc619a1948953559e66951a4
|
2016-05-27 14:49:51+03:00
|
log: Fix qemu_set_log_filename() error handling
When qemu_set_log_filename() detects an invalid file name, it reports
an error, closes the log file (if any), and starts logging to stderr
(unless daemonized or nothing is being logged).
This is wrong. Asking for an invalid log file on the command line
should be fatal. Asking for one in the monitor should fail without
messing up an existing logfile.
Fix by converting qemu_set_log_filename() to Error. Pass it
&error_fatal, except for hmp_logfile report errors.
This also permits testing without a subprocess, so do that.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
|
daa76aa416b1e18ab1fac650ff53d966d8f21f68
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/daa76aa416b1e18ab1fac650ff53d966d8f21f68
|
2016-06-20 16:39:08+02:00
|
PPC/KVM: early validation of vcpu id
The KVM API restricts vcpu ids to be < KVM_CAP_MAX_VCPUS. On PowerPC
targets, depending on the number of threads per core in the host and
in the guest, some topologies do generate higher vcpu ids actually.
When this happens, QEMU bails out with the following error:
kvm_init_vcpu failed: Invalid argument
The KVM_CREATE_VCPU ioctl has several EINVAL return paths, so it is
not possible to fully disambiguate.
This patch adds a check in the code that computes vcpu ids, so that
we can detect the error earlier, and print a friendlier message instead
of calling KVM_CREATE_VCPU with an obviously bogus vcpu id.
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
41264b385c2b324fea026204e5de9bef980733b1
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/41264b385c2b324fea026204e5de9bef980733b1
|
2016-05-27 09:40:23+10:00
|
i386: kvmvapic: initialise imm32 variable
When processing Task Priorty Register(TPR) access, it could leak
automatic stack variable 'imm32' in patch_instruction().
Initialise the variable to avoid it.
Reported by: Donghai Zdh <[email protected]>
Cc: [email protected]
Signed-off-by: Prasad J Pandit <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
691a02e2ce0c413236a78dee6f2651c937b09fb0
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/691a02e2ce0c413236a78dee6f2651c937b09fb0
|
2016-05-23 16:53:43+02:00
|
virtio-gpu: check early scanout id
Before accessing the g->scanout array, in order to avoid potential
out-of-bounds access.
Signed-off-by: Marc-André Lureau <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
|
fe89fdebcaab696d525f2905b33d7b303111eade
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/fe89fdebcaab696d525f2905b33d7b303111eade
|
2016-05-23 13:30:03+02:00
|
vga: make sure vga register setup for vbe stays intact (CVE-2016-3712).
Call vbe_update_vgaregs() when the guest touches GFX, SEQ or CRT
registers, to make sure the vga registers will always have the
values needed by vbe mode. This makes sure the sanity checks
applied by vbe_fixup_regs() are effective.
Without this guests can muck with shift_control, can turn on planar
vga modes or text mode emulation while VBE is active, making qemu
take code paths meant for CGA compatibility, but with the very
large display widths and heigts settable using VBE registers.
Which is good for one or another buffer overflow. Not that
critical as they typically read overflows happening somewhere
in the display code. So guests can DoS by crashing qemu with a
segfault, but it is probably not possible to break out of the VM.
Fixes: CVE-2016-3712
Reported-by: Zuozhi Fzz <[email protected]>
Reported-by: P J P <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
|
fd3c136b3e1482cd0ec7285d6bc2a3e6a62c38d7
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/fd3c136b3e1482cd0ec7285d6bc2a3e6a62c38d7
|
2016-05-02 16:02:59+02:00
|
replay: Fix dangling location bug in replay_configure()
replay_configure() pushes and pops a Location with automatic storage
duration. Except it fails to pop when -icount parameter "rr" isn't
given. cur_loc then points to unused stack space, and will most
likely get clobbered in short order.
Clobbered cur_loc can make loc_pop() and error_print_loc() crash or
report bogus locations.
Broken in commit 890ad55.
I didn't take the time to find a reproducer.
Cc: Eduardo Habkost <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
|
d9d3aaea0b3fbb5028e20316bdb93359487cd01f
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d9d3aaea0b3fbb5028e20316bdb93359487cd01f
|
2016-04-28 08:19:20+02:00
|
qemu-ga: do not run qga test when guest agent disabled
When configure with --disable-guest-agent, make check will fail with:
ERROR:tests/test-qga.c:74:fixture_setup: assertion failed (error == NULL):
Failed to execute child process "/home/xx/qemu/qemu-ga" (No such file or
directory) (g-exec-error-quark, 8)
make: *** [check-tests/test-qga] Error 1
This check was commented out by bab47d9a75a. I think that was by
mistake, because the commit message of that commit didn't mention
this change.
Signed-off-by: Yang Hongyang <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: Michael Roth <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
Cc: [email protected]
|
fb91f30bb9716c391ce0441942fffa601ad99684
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/fb91f30bb9716c391ce0441942fffa601ad99684
|
2016-04-19 16:51:15-05:00
|
nbd: Don't fail handshake on NBD_OPT_LIST descriptions
The NBD Protocol states that NBD_REP_SERVER may set
'length > sizeof(namelen) + namelen'; in which case the rest
of the packet is a UTF-8 description of the export. While we
don't know of any NBD servers that send this description yet,
we had better consume the data so we don't choke when we start
to talk to such a server.
Also, a (buggy/malicious) server that replies with length <
sizeof(namelen) would cause us to block waiting for bytes that
the server is not sending, and one that replies with super-huge
lengths could cause us to temporarily allocate up to 4G memory.
Sanity check things before blindly reading incorrectly.
Signed-off-by: Eric Blake <[email protected]>
Message-id: [email protected]
Reviewed-by: Alex Bligh <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
|
200650d49f558d8394625ef7ee452a093efdb921
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/200650d49f558d8394625ef7ee452a093efdb921
|
2016-04-15 17:56:56+02:00
|
nbd: Don't kill server on client that doesn't request TLS
Upstream NBD documents (as of commit 4feebc95) that servers MAY
choose to operate in a conditional mode, where it is up to the
client whether to use TLS. For qemu's case, we want to always be
in FORCEDTLS mode, because of the risk of man-in-the-middle
attacks, and since we never export more than one device; likewise,
the qemu client will ALWAYS send NBD_OPT_STARTTLS as its first
option. But now that SELECTIVETLS servers exist, it is feasible
to encounter a (non-qemu) client that is programmed to talk to
such a server, and does not do NBD_OPT_STARTTLS first, but rather
wants to probe if it can use a non-encrypted export.
The NBD protocol documents that we should let such a client
continue trying, on the grounds that maybe the client will get the
hint to send NBD_OPT_STARTTLS, rather than immediately dropping
the connection.
Note that NBD_OPT_EXPORT_NAME is a special case: since it is the
only option request that can't have an error return, we have to
(continue to) drop the connection on that one; rather, what we are
fixing here is that all other replies prior to TLS initiation tell
the client NBD_REP_ERR_TLS_REQD, but keep the connection alive.
Signed-off-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Max Reitz <[email protected]>
|
d1129a8ad96af6bc47404490769a637bcd860493
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d1129a8ad96af6bc47404490769a637bcd860493
|
2016-04-15 17:56:56+02:00
|
virtio-blk: use aio handler for data plane
In addition to handling IO in vcpu thread and in io thread, dataplane
introduces yet another mode: handling it by AioContext.
This reuses the same handler as previous modes, which triggers races as
these were not designed to be reentrant. Use a separate handler just
for aio, and disable regular handlers when dataplane is active.
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
|
8a2fad57eb124ec0633f6f2b1c74c991fc7501bd
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8a2fad57eb124ec0633f6f2b1c74c991fc7501bd
|
2016-04-07 19:57:33+03:00
|
vfio: convert to 128 bit arithmetic calculations when adding mem regions
vfio_listener_region_add for a iommu mr results in
an overflow assert since iommu memory region is initialized
with UINT64_MAX. Convert calculations to 128 bit arithmetic
for iommu memory regions and let int128_get64 assert for non iommu
regions if there's an overflow.
Suggested-by: Alex Williamson <[email protected]>
Signed-off-by: Bandan Das <[email protected]>
[missed (end - 1) on 2nd trace call, move llsize closer to use]
Signed-off-by: Alex Williamson <[email protected]>
|
55efcc537d330f1659d3fa171a66eebc9327e91b
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/55efcc537d330f1659d3fa171a66eebc9327e91b
|
2016-03-28 13:27:49-06:00
|
pc: acpi: tpm: add missing MMIO resource to PCI0._CRS
Windows will fail initialize TMP driver with the reason:
'device cannot find enough free resources'
That happens because parent BUS doesn't describe
MMIO resources used by TPM child device.
Fix it by describing it in top-most parent bus scope PCI0.
It was 'regressed' by commit
5cb18b3d TPM2 ACPI table support
with following fixup
9e472263 acpi: add missing ssdt
which did the right thing by moving TPM to BUS
it belongs to but lacked a proper resource declaration.
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
|
2b1c2e8e5f1990f0a201a8cbf9d366fca60f4aa8
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/2b1c2e8e5f1990f0a201a8cbf9d366fca60f4aa8
|
2016-04-13 19:52:34+03:00
|
target-arm: In v8, make illegal AArch32 mode changes set PSTATE.IL
In v8, the illegal mode changes which are UNPREDICTABLE in v7 are
given architected behaviour:
* the mode field is unchanged
* PSTATE.IL is set (so any subsequent instructions will UNDEF)
* any other CPSR fields are written to as normal
This is pretty much the same behaviour we picked for our
UNPREDICTABLE handling, with the exception that for v8 we
need to set the IL bit.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Sergey Fedorov <[email protected]>
Message-id: [email protected]
|
81907a582901671c15be36a63b5063f88f3487e2
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/81907a582901671c15be36a63b5063f88f3487e2
|
2016-02-26 15:09:41+00:00
|
throttle: Add support for burst periods
This patch adds support for burst periods to the throttling code.
With this feature the user can keep performing bursts as defined by
the LeakyBucket.max rate for a configurable period of time.
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
100f8f26086ad85a9361f2883edd55bc337ce594
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/100f8f26086ad85a9361f2883edd55bc337ce594
|
2016-02-22 14:08:05+01:00
|
throttle: Set always an average value when setting a maximum value
When testing the ranges of valid values, set_cfg_value() creates
sometimes invalid throttling configurations by setting bucket.max
while leaving bucket.avg uninitialized.
While this doesn't break the current tests, it will as soon as
we unify all functions that check the validity of the throttling
configuration.
This patch ensures that the value of bucket.avg is valid when setting
bucket.max.
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
6f9b6d57ae3cd8a5f82e06f79d22e7a591116b5b
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6f9b6d57ae3cd8a5f82e06f79d22e7a591116b5b
|
2016-02-22 14:08:05+01:00
|
spice: init dcl before registering qxl interface
Without this spice might callback into qemu before ssd->dcl.con is
initialized, resulting in a segfault due to NULL pointer dereference.
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
|
b5e751b51f14cffada6be647aa576b79f1755d7e
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/b5e751b51f14cffada6be647aa576b79f1755d7e
|
2016-02-23 12:04:39+01:00
|
cadence_gem: fix buffer overflow
gem_transmit copies a packet from guest into an tx_packet[2048]
array on stack, with size limited by descriptor length set by guest. If
guest is malicious and specifies a descriptor length that is too large,
and should packet size exceed array size, this results in a buffer
overflow.
Reported-by: 刘令 <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
|
d7f053652fef48bee7c461c162c8d4d2c96ab157
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d7f053652fef48bee7c461c162c8d4d2c96ab157
|
2016-02-04 13:22:06+08:00
|
block: Rewrite bdrv_close_all()
This patch rewrites bdrv_close_all(): Until now, all root BDSs have been
force-closed. This is bad because it can lead to cached data not being
flushed to disk.
Instead, try to make all reference holders relinquish their reference
voluntarily:
1. All BlockBackend users are handled by making all BBs simply eject
their BDS tree. Since a BDS can never be on top of a BB, this will
not cause any of the issues as seen with the force-closing of BDSs.
The references will be relinquished and any further access to the BB
will fail gracefully.
2. All BDSs which are owned by the monitor itself (because they do not
have a BB) are relinquished next.
3. Besides BBs and the monitor, block jobs and other BDSs are the only
things left that can hold a reference to BDSs. After every remaining
block job has been canceled, there should not be any BDSs left (and
the loop added here will always terminate (as long as NDEBUG is not
defined), because either all_bdrv_states will be empty or there will
not be any block job left to cancel, failing the assertion).
Signed-off-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
ca9bd24cf1d53775169ba9adc17e265554d1afed
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ca9bd24cf1d53775169ba9adc17e265554d1afed
|
2016-02-02 17:50:46+01:00
|
target-ppc: Add new TLB invalidate by HPTE call for hash64 MMUs
When HPTEs are removed or modified by hypercalls on spapr, we need to
invalidate the relevant pages in the qemu TLB.
Currently we do that by doing some complicated calculations to work out the
right encoding for the tlbie instruction, then passing that to
ppc_tlb_invalidate_one()... which totally ignores the argument and flushes
the whole tlb.
Avoid that by adding a new flush-by-hpte helper in mmu-hash64.c.
Signed-off-by: David Gibson <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Reviewed-by: Alexander Graf <[email protected]>
|
61a36c9b5a12889994e6c45f4a175efcd63936db
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/61a36c9b5a12889994e6c45f4a175efcd63936db
|
2016-01-30 23:49:27+11:00
|
target-arm: Implement remaining illegal return event checks
We already implement almost all the checks for the illegal
return events from AArch64 state described in the ARM ARM section
D1.11.2. Add the two missing ones:
* return to EL2 when EL3 is implemented and SCR_EL3.NS is 0
* return to Non-secure EL1 when EL2 is implemented and HCR_EL2.TGE is 1
(We don't implement external debug, so the case of "debug state exit
from EL0 using AArch64 state to EL0 using AArch32 state" doesn't apply
for QEMU.)
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Edgar E. Iglesias <[email protected]>
|
e393f339af87da7210f6c86902b321df6a2e8bf5
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/e393f339af87da7210f6c86902b321df6a2e8bf5
|
2016-01-21 14:15:09+00:00
|
fsdev-proxy-helper: avoid TOC/TOU race
There is a minor time of check/time of use race between statfs and chroot.
It can be fixed easily by stat-ing the root after it has been changed.
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
|
49f817caaf4460f4a8dfca190f31a57569fc9efe
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/49f817caaf4460f4a8dfca190f31a57569fc9efe
|
2015-11-30 12:31:53+01:00
|
qjson: Don't crash when input exceeds nesting limit
We limit nesting depth and input size to defend against input
triggering excessive heap or stack memory use (commit 29c75dd
json-streamer: limit the maximum recursion depth and maximum token
count). However, when the nesting limit is exceeded,
parser_context_peek_token()'s assertion fails.
Broken in commit 65c0f1e "json-parser: don't replicate tokens at each
level of recursion".
To reproduce stuff 1025 open braces or brackets into QMP.
Fix by taking the error exit instead of the normal one.
Reported-by: Eric Blake <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
|
0753113a26bb8c77f951b1ea91fd4f36d099c37a
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/0753113a26bb8c77f951b1ea91fd4f36d099c37a
|
2015-11-26 09:18:04+01:00
|
qjson: Apply nesting limit more sanely
The nesting limit from commit 29c75dd "json-streamer: limit the
maximum recursion depth and maximum token count" applies separately to
braces and brackets. This makes no sense. Apply it to their sum,
because that's actually a measure of recursion depth.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
|
4f2d31fbc0bfdf41feea7d1be49f4f7ffa005534
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/4f2d31fbc0bfdf41feea7d1be49f4f7ffa005534
|
2015-11-26 09:17:57+01:00
|
qemu-io: Account for failed, invalid and flush operations
Signed-off-by: Alberto Garcia <[email protected]>
Message-id: 78a7662a8636e55991737ece50003a2dc5a5f3e0.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
556c2b60714e7dae3ed0eb3488910435263dc09f
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/556c2b60714e7dae3ed0eb3488910435263dc09f
|
2015-11-12 16:22:46+01:00
|
qapi: Fix up commit 7618b91's clash sanity checking change
This hunk
@@ -964,6 +965,7 @@ class QAPISchemaObjectType(QAPISchemaType):
members = []
seen = {}
for m in members:
+ assert c_name(m.name) not in seen
seen[m.name] = m
for m in self.local_members:
m.check(schema, members, seen)
is plainly broken.
Asserting the members inherited from base don't clash is somewhat
redundant, because self.base.check() just checked that. But it
doesn't hurt.
The idea to use c_name(m.name) instead of m.name for collision
checking is sound, because we need to catch clashes between the m.name
and between the c_name(m.name), and when two m.name clash, then their
c_name() also clash.
However, using c_name(m.name) instead of m.name in one of several
places doesn't work. See the very next line.
Keep the assertion, but drop the c_name() for now. A future commit
will bring it back.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
[change TABs in commit message to space]
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
|
08683353fc46b5d462199c9e8cff6f6c67f20f65
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/08683353fc46b5d462199c9e8cff6f6c67f20f65
|
2015-12-17 08:21:26+01:00
|
qapi: Test failure in middle of array parse
Our generated list visitors have the same problem as has been
mentioned elsewhere (see commit 2f52e20): they allocate data
even on failure. An upcoming patch will correct things to
provide saner guarantees, but first we need to expose the
behavior in the testsuite to ensure we aren't introducing any
memory usage bugs.
There are more test cases throughout the test-qmp-input-* tests
that already deal with partial allocation; a later commit will
clean up all visit_type_FOO(), without marking all of the tests
with FIXME at this time.
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
|
dd5ee2c2d3e3a17647ddd9bfa97935b8cb5dfa40
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/dd5ee2c2d3e3a17647ddd9bfa97935b8cb5dfa40
|
2015-11-10 08:09:14+01:00
|
ide: remove hardcoded 2GiB transactional limit
Not that you can request a >2GiB transaction, but that's why checking
for it makes no sense anymore.
With the newer 'limit' parameter to prepare_buf, we no longer need a
static limit. The maximum limit is still 2GiB, but the limit parameter
is set to the current transaction size, which cannot surpass 32MiB
(512 * 65536). If the PRDT surpasses the transactional size, then,
we'll just carry out the normative underflow handling pathways instead
of needing an extra, strange pathway that worries about hitting some
logistical cap for the largest sglist we can support -- we'll never
even attempt to build one that big anymore.
Reported-by: Kevin Wolf <[email protected]>
Signed-off-by: John Snow <[email protected]>
Acked-by: Stefan Hajnoczi <[email protected]>
Message-id: [email protected]
|
9fbf0fa81fca8f527669dd4fa72662d66e7d6329
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9fbf0fa81fca8f527669dd4fa72662d66e7d6329
|
2015-11-06 14:09:00-05:00
|
qfloat qint: Make conversion from QObject * accept null
qobject_to_qfloat() and qobject_to_qint() crash on null, which is a
trap for the unwary. Return null instead, and simplify a few callers.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Luiz Capitulino <[email protected]>
|
fcf73f66a67f5e58c18216f8c8651e38cf4d90af
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/fcf73f66a67f5e58c18216f8c8651e38cf4d90af
|
2015-10-29 14:34:45+01:00
|
ivshmem-client: check the number of vectors
Check the number of vectors received from the server, to avoid
out of bound array access.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Claudio Fontana <[email protected]>
|
95204aa951ceb28eb6d4ce43bce09a58cbad83d8
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/95204aa951ceb28eb6d4ce43bce09a58cbad83d8
|
2015-10-24 18:03:16+02:00
|
piix: fix resource leak reported by Coverity
config_fd should be closed before return, or there will
be a resource leak error.
Signed-off-by: zhanghailiang <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
|
e3fce97cf500c61f23df8e0245e08625fc375295
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/e3fce97cf500c61f23df8e0245e08625fc375295
|
2015-10-22 14:34:50+03:00
|
qga: do not override configuration verbosity
Move the default verbosity settings before loading the configuration
file, or it will overwrite it. Found thanks to writing qga tests :)
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael Roth <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
|
6eaeae37a5fdd0a1ef88ed9ab4b807669ffc0e2d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6eaeae37a5fdd0a1ef88ed9ab4b807669ffc0e2d
|
2015-10-19 18:28:06-05:00
|
net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_done_update_stats()' expects it to be properly set.
Refine header length validation in 'vmxnet_tx_pkt_parse_headers'.
Check its return value during packet processing flow.
As a side effect, in case IPv4 and IPv6 header validation failure,
corrupt packets will be dropped.
Signed-off-by: Dana Rubin <[email protected]>
Signed-off-by: Shmulik Ladkani <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
|
a7278b36fcab9af469563bd7b9dadebe2ae25e48
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/a7278b36fcab9af469563bd7b9dadebe2ae25e48
|
2015-10-12 13:19:29+08:00
|
cpus.c: qemu_mutex_lock_iothread fix race condition at cpu thread init
When QEMU starts the RCU thread executes qemu_mutex_lock_thread
causing error "qemu:qemu_cpu_kick_thread: No such process" and exits.
This isn't occur frequently but in glibc the thread id can exist and
this not guarantee that the thread is on active/running state. If is
inserted a sleep(1) after newthread assignment [1] the issue appears.
So not make assumption that thread exist if first_cpu->thread is set
then change the validation of cpu to created that is set into cpu
threads (kvm, tcg, dummy).
[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_create.c;h=d10f4ea8004e1d8f3a268b95cc0f8d93b8d89867;hb=HEAD#l621
Cc: [email protected]
Signed-off-by: Aníbal Limón <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
46036b2462c7ff56c0af6466ea6b9248197a38a8
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/46036b2462c7ff56c0af6466ea6b9248197a38a8
|
2015-09-07 18:14:03+02:00
|
rtl8139: check TCP Data Offset field (CVE-2015-5165)
The TCP Data Offset field contains the length of the header. Make sure
it is valid and does not exceed the IP data length.
Reported-by: 朱东海(启路) <[email protected]>
Reviewed-by: Jason Wang <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
|
8357946b15f0a31f73dd691b7da95f29318ed310
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8357946b15f0a31f73dd691b7da95f29318ed310
|
2015-08-03 13:08:10+01:00
|
hw/display/cg3.c: Fix memory leak
Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
|
22b2aeb82c811b227862c21e7a607087efbe5563
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/22b2aeb82c811b227862c21e7a607087efbe5563
|
2015-06-23 20:23:39+03:00
|
util/qemu-sockets: improve ai_flag hints for ipv6 hosts
*) Do not use AI_ADDRCONFIG on listening sockets, because this flag
makes it impossible to explicitly listen on '127.0.0.1' if no global
ipv4 address is configured additionally, making this a very
uncomfortable option.
*) Add AI_V4MAPPED hint for connecting sockets.
If your system is globally only connected via ipv6 you often still want
to be able to use '127.0.0.1' and 'localhost' (even if localhost doesn't
also have an ipv6 entry).
For example, PVE - unless explicitly asking for insecure mode - uses
ipv4 loopback addresses with QEMU for live migrations tunneled over SSH.
These fail to start because AI_ADDRCONFIG makes getaddrinfo refuse to
work with '127.0.0.1'.
As for the AI_V4MAPPED flag: glibc uses it by default, and providing
non-0 flags removes it. I think it makes sense to use it.
I also want to point out that glibc explicitly sidesteps POSIX standards
when passing 0 as hints by then assuming both AI_V4MAPPED and
AI_ADDRCONFIG (the latter being a rather weird choice IMO), while
according to POSIX.1-2001 it should be assumed 0. (glibc considers its
choice an improvement.)
Since either AI_CANONNAME or AI_PASSIVE are passed in our cases, glibc's
default flags in turn are disabled again unless explicitly added, which
I do with this patch.
Signed-off-by: Wolfgang Bumiller <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
|
3de3d698d942d1116152417f882c897b26b44e41
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3de3d698d942d1116152417f882c897b26b44e41
|
2015-06-23 20:23:39+03:00
|
net/net: Record usage status of mac address
Currently QEMU dynamically generates mac address for the NIC which
doesn't specify the mac address. But when we hotplug a NIC without
specifying mac address, the mac address will increase for the same NIC
along with hotplug and hot-unplug, and at last it will overflow. And if
we codeplug one NIC with mac address e.g. "52:54:00:12:34:56", then
hotplug one NIC without specifying mac address and the mac address of
the hotplugged NIC is duplicate of "52:54:00:12:34:56".
This patch add a mac_table to record the usage status and free the mac
address when the NIC is unrealized.
Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
|
2bc22a58e16f0650e56dccfac9495e5aef58e2ef
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/2bc22a58e16f0650e56dccfac9495e5aef58e2ef
|
2015-05-27 10:34:07+01:00
|
vmdk: Fix next_cluster_sector for compressed write
This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster
allocation).
Sometimes, write_len could be larger than cluster size, because it
contains both data and marker. We must advance next_cluster_sector in
this case, otherwise the image gets corrupted.
Cc: [email protected]
Reported-by: Antoni Villalonga <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
5e82a31eb967db135fc4e688b134fb0972d62de3
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/5e82a31eb967db135fc4e688b134fb0972d62de3
|
2015-05-22 17:08:00+02:00
|
hw/arm/vexpress: 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]>
|
db25a15817f98c46c5f0eea4f414249d8fbb96b1
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/db25a15817f98c46c5f0eea4f414249d8fbb96b1
|
2015-04-01 17:57:29+01:00
|
exec: avoid possible overwriting of mmaped area in qemu_ram_remap
It is not necessary to munmap an area before remapping it with MAP_FIXED;
if the memory region specified by addr and len overlaps pages of any
existing mapping, then the overlapped part of the existing mapping will
be discarded.
On the other hand, if QEMU does munmap the pages, there is a small
probability that another mmap sneaks in and catches the just-freed
portion of the address space. In effect, munmap followed by
mmap(MAP_FIXED) is a use-after-free error, and Coverity flags it
as such. Fix it.
Reviewed-by: Gonglei <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
f18c69cfc554cf9776eb3c35b7510e17541afacb
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/f18c69cfc554cf9776eb3c35b7510e17541afacb
|
2015-03-26 10:43:54+01:00
|
arm: fix memory leak
Cc: Michael Tokarev <[email protected]>
Cc: Peter Maydell <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
|
6e05a12f8f7f32a3fecbeb0c572d549a5f6e9177
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6e05a12f8f7f32a3fecbeb0c572d549a5f6e9177
|
2015-03-19 11:11:55+03:00
|
target-mips: fix hflags modified in delay / forbidden slot
All instructions which may change hflags terminate tb. However, this doesn't
work if such an instruction is placed in delay or forbidden slot.
gen_branch() clears MIPS_HFLAG_BMASK in ctx->hflags and then generates code
to overwrite hflags with ctx->hflags, consequently we loose any execution-time
hflags modifications. For example, in the following scenario hflag related to
Status.CU1 will not be updated:
/* Set Status.CU1 in delay slot */
mfc0 $24, $12, 0
lui $25, 0x2000
or $25, $25, $24
b check_Status_CU1
mtc0 $25, $12, 0
With this change we clear MIPS_HFLAG_BMASK in execution-time hflags if
instruction in delay or forbidden slot wants to terminate tb for some reason
(i.e. ctx->bstate != BS_NONE).
Also, die early and loudly if "unknown branch" is encountered as this should
never happen.
Signed-off-by: Leon Alrae <[email protected]>
|
a5f533909e746ca6e534b232fb42c9c6fd81b468
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/a5f533909e746ca6e534b232fb42c9c6fd81b468
|
2015-03-18 09:58:15+00:00
|
monitor: Plug memory leak in monitor_read_bdrv_key_start()
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
|
988e0f06621fde11ec0d319a6fd0ab3ccef0602f
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/988e0f06621fde11ec0d319a6fd0ab3ccef0602f
|
2015-03-17 14:11:43+01:00
|
queue: fix QSLIST_INSERT_HEAD_ATOMIC race
There is a not-so-subtle race in QSLIST_INSERT_HEAD_ATOMIC.
Because atomic_cmpxchg returns the old value instead of a success flag,
QSLIST_INSERT_HEAD_ATOMIC was checking for success by comparing against
the second argument to atomic_cmpxchg. Unfortunately, this only works
if the second argument is a local or thread-local variable.
If it is in memory, it can be subject to common subexpression elimination
(and then everything's fine) or reloaded after the atomic_cmpxchg,
depending on the compiler's whims. If the latter happens, the race can
happen. A thread can sneak in, doing something on elm->field.sle_next
after the atomic_cmpxchg and before the comparison. This causes a wrong
failure, and then two threads are using "elm" at the same time. In the
case discovered by Christian, the sequence was likely something like this:
thread 1 | thread 2
QSLIST_INSERT_HEAD_ATOMIC |
atomic_cmpxchg succeeds |
elm added to list |
| steal release_pool
| QSLIST_REMOVE_HEAD
| elm removed from list
| ...
| QSLIST_INSERT_HEAD_ATOMIC
| (overwrites sle_next)
spurious failure |
atomic_cmpxchg succeeds |
elm added to list again |
|
steal release_pool |
QSLIST_REMOVE_HEAD |
elm removed again |
The last three steps could be done by a third thread as well.
A reproducer that failed in a matter of seconds is as follows:
- the guest has 32 VCPUs on a 28 core host (hyperthreading was enabled),
memory was 16G just to err on the safe side (the host has 64G, but hey
at least you need no s390)
- the guest has 24 null-aio virtio-blk devices using dataplane
(-object iothread,id=ioN -drive if=none,id=blkN,driver=null-aio,size=500G
-device virtio-blk-pci,iothread=ioN,drive=blkN)
- the guest also has a single network interface. It's only doing loopback
tests so slirp vs. tap and the model doesn't matter.
- the guest is running fio with the following script:
[global]
rw=randread
blocksize=16k
ioengine=libaio
runtime=10m
buffered=0
fallocate=none
time_based
iodepth=32
[virtio1a]
filename=/dev/block/252\:16
[virtio1b]
filename=/dev/block/252\:16
...
[virtio24a]
filename=/dev/block/252\:384
[virtio24b]
filename=/dev/block/252\:384
[listen1]
protocol=tcp
ioengine=net
port=12345
listen
rw=read
bs=4k
size=1000g
[connect1]
protocol=tcp
hostname=localhost
ioengine=net
port=12345
protocol=tcp
rw=write
startdelay=1
size=1000g
...
[listen8]
protocol=tcp
ioengine=net
port=12352
listen
rw=read
bs=4k
size=1000g
[connect8]
protocol=tcp
hostname=localhost
ioengine=net
port=12352
rw=write
startdelay=1
size=1000g
Moral of the story: I should refrain from writing more clever stuff.
At least it looks like it is not too clever to be undebuggable.
Reported-by: Christian Borntraeger <[email protected]>
Tested-by: Christian Borntraeger <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Fixes: c740ad92d0d958fa785e5d7aa1b67ecaf30a6a54
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
|
2120465fbb87a69bd60283ec4034a0963766a7ef
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/2120465fbb87a69bd60283ec4034a0963766a7ef
|
2015-03-12 17:41:23+00:00
|
tpm: Move memory subregion function into realize function
Move the memory subregion function into the DeviceClass realize function
due to isa_address_space (now) crashing if called in the instance init
function.
Signed-off-by: Stefan Berger <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
|
9dfd24ed848228643293e37c36848b5ac520ab98
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9dfd24ed848228643293e37c36848b5ac520ab98
|
2015-03-11 18:24:13+01:00
|
libqos: Solve bug in interrupt checking when using MSIX in virtio-pci.c
The MSIX interrupt was always acked without checking its value, which caused a
race condition. If the ISR was raised between the read and the acking, the ISR
was never detected and it timed out.
Signed-off-by: Marc Marí <[email protected]>
Reviewed-by: John Snow <[email protected]>
Tested-by: John Snow <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
1e34cf9681ec549e26f30daaabc1ce58d60446f7
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/1e34cf9681ec549e26f30daaabc1ce58d60446f7
|
2015-03-10 14:02:23+01:00
|
cpus: fix deadlock and segfault in qemu_mutex_lock_iothread
When two threads (other than the low-priority TCG VCPU thread)
are competing for the iothread lock, a deadlock can happen. This
is because iothread_requesting_mutex is set to false by the first
thread that gets the mutex, and then the VCPU thread might never
yield from the execution loop. If iothread_requesting_mutex is
changed from a bool to a counter, the deadlock is fixed.
However, there is another bug in qemu_mutex_lock_iothread that
can be triggered by the new call_rcu thread. The bug happens
if qemu_mutex_lock_iothread is called before the CPUs are
created. In that case, first_cpu is NULL and the caller
segfaults in qemu_mutex_lock_iothread. To fix this, just
do not do the kick if first_cpu is NULL.
Reported-by: Leon Alrae <[email protected]>
Reported-by: Andreas Gustafsson <[email protected]>
Tested-by: Leon Alrae <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
6b49809c597331803ea941eadda813e5bb4e8fe2
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6b49809c597331803ea941eadda813e5bb4e8fe2
|
2015-03-02 10:57:07+01:00
|
iotests: add O_DIRECT alignment probing test
This test case checks that image files can be opened even if I/O
produces EIO errors. QEMU should not refuse opening failed disks since
the guest may be configured for multipath I/O where accessing failed
disks is expected.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
1a6e597995c8c0125d1f305b583d6de083e44c73
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/1a6e597995c8c0125d1f305b583d6de083e44c73
|
2015-03-10 14:02:24+01:00
|
acpi: update RSDP on guest access
RSDT offset can change across reboots and that makes
immutable RSDP, which is build at startup, point to
incorrect place in ACPI table blob. That results in
BIOS corrupting tables and guest OS failing to find
ACPI tables.
We really should have put it in a ROM region, but
we can't change that for old machine types,
let's just set the callback and update it explicitly.
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
|
d70414a5788c3d51f8ce4d2f437e669e6b99dc59
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d70414a5788c3d51f8ce4d2f437e669e6b99dc59
|
2015-02-26 12:42:19+01:00
|
acpi-build: fix memory leak with bridge hp off
When bridge hotplug is disabled for old machine types,
we never free memory allocated for temporary tables.
Fix this up.
Cc: [email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
|
16771613a89838020ee6d84be40b46c6a8180824
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/16771613a89838020ee6d84be40b46c6a8180824
|
2015-02-26 12:42:15+01:00
|
s390x/mmu: Fix exception types when checking the ASCEs
If an ASCE has illegal bits set, an ASCE-type exception should be
generated instead of a translation specification exception.
Signed-off-by: Thomas Huth <[email protected]>
Signed-off-by: Jens Freimann <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
|
d267571be419d389184916b56f862a8f143e67c5
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d267571be419d389184916b56f862a8f143e67c5
|
2015-02-18 09:37:14+01:00
|
target-arm: check that LSB <= MSB in BFI instruction
The documentation states that if LSB > MSB in BFI instruction behaviour
is unpredictable. Currently QEMU crashes because of assertion failure in
this case:
tcg/tcg-op.h:2061: tcg_gen_deposit_i32: Assertion `len <= 32' failed.
While assertion failure may meet the "unpredictable" definition this
behaviour is undesirable because it allows an unprivileged guest program
to crash the emulator with the OS and other programs.
This patch addresses the issue by throwing illegal instruction exception
if LSB > MSB. Only ARM decoder is affected because Thumb decoder already
has this check in place.
To reproduce issue run the following program
int main(void) {
asm volatile (".long 0x07c00c12" :: );
return 0;
}
compiled with
gcc -marm -static badop_arm.c -o badop_arm
Signed-off-by: Kirill Batuzov <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
|
45140a57675ecb4b0daee71bf145c24dbdf9429c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/45140a57675ecb4b0daee71bf145c24dbdf9429c
|
2015-02-05 13:37:22+00:00
|
cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessors
Use inline functions rather than macros for cpu_ld/st accessors
for the *-user configurations, as we already do for softmmu.
This has a two advantages:
* we can actually typecheck our arguments
* we don't need to leak the _raw macros everywhere
Since the _kernel functions were only used by target-i386/seg_helper.c,
put the definitions for them in that file too. (It already has the
similar template include code to define them for the softmmu case,
so it makes sense to have it deal with defining them for user-only.)
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]
|
9220fe54c679d145232a28df6255e166ebf91bab
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9220fe54c679d145232a28df6255e166ebf91bab
|
2015-01-20 15:19:34+00:00
|
tests/multiboot: Add test for modules
This test case is meant to detect corruptions of the Multiboot modules
as well as the multiboot modules list and the module command lines.
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
a9c837d8ef573604328e4cb61e2e0cab61bba319
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/a9c837d8ef573604328e4cb61e2e0cab61bba319
|
2015-01-26 12:22:44+01:00
|
hmp: fix regression of HMP device_del auto-completion
The commits:
- 6a1fa9f5 (monitor: add del completion for peripheral device)
- 66e56b13 (qdev: add qdev_build_hotpluggable_device_list helper)
cause a QEMU crash when trying to use HMP device_del auto-completion.
It can be easily reproduced by:
<qemu-bin> -enable-kvm ~/images/fedora.qcow2 -monitor stdio -device virtio-net-pci,id=vnet
(qemu) device_del
/home/mapfelba/git/upstream/qemu/hw/core/qdev.c:941:qdev_build_hotpluggable_device_list: Object 0x7f6ce04e4fe0 is not an instance of type device
Aborted (core dumped)
The root cause is qdev_build_hotpluggable_device_list going recursively over
all peripherals and their children assuming all are devices. It doesn't work
since PCI devices have at least on child which is a memory region (bus master).
Solved by observing that all devices appear as direct children of
/machine/peripheral container. No need of going recursively
over all the children.
Signed-off-by: Marcel Apfelbaum <[email protected]>
Reported-by: Gal Hammer <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
|
4cae4d5acaea23f3def84c8dc67ef5106323e5cb
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/4cae4d5acaea23f3def84c8dc67ef5106323e5cb
|
2014-11-27 14:36:20+00:00
|
virtio-serial: avoid crash when port has no name
It seems "name" is not mandatory, and the following command line (based
on one generated by current libvirt) will crash qemu at start:
qemu-system-x86_64 \
-device virtio-serial-pci \
-device virtserialport,name=foo \
-device virtconsole
Program received signal SIGSEGV, Segmentation fault.
__strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:210
210 movlpd (%rsi), %xmm2
Missing separate debuginfos, use: debuginfo-install
python-libs-2.7.5-13.fc20.x86_64
(gdb) bt
#0 __strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:210
#1 0x000055555566bdc6 in find_port_by_name (name=0x0) at /home/elmarco/src/qemu/hw/char/virtio-serial-bus.c:67
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Amos Kong <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
|
7eb7311427a6e2a9e080c1224f86a897f077282f
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/7eb7311427a6e2a9e080c1224f86a897f077282f
|
2014-11-07 10:27:11+05:30
|
target-arm: handle address translations that start at level 3
The ARMv8 address translation system defines that a page table walk
starts at a level which depends on the translation granule size
and the number of bits of virtual address that need to be resolved.
Where the translation granule is 64KB and the guest sets the
TCR.TxSZ field to between 35 and 39, it's actually possible to
start at level 3 (the final level). QEMU's implementation failed
to handle this case, and so we would set level to 2 and behave
incorrectly (including invoking the C undefined behaviour of
shifting left by a negative number). Correct the code that
determines the starting level to deal with the start-at-3 case,
by replacing the if-else ladder with an expression derived from
the ARM ARM pseudocode version.
This error was detected by the Coverity scan, which spotted
the potential shift by a negative number.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
|
d6be29e3fb5659102ac0e48e295d177cb67e32c5
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d6be29e3fb5659102ac0e48e295d177cb67e32c5
|
2014-11-17 19:30:28+00:00
|
qom: Add error handler for object_property_print()
Avoid the caller of object_property_print() leaking string
argument's memory, such as qdev_print_props() when
encounter errors.
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
|
3a53009fa044a554dbdeacf30a6b8ea3eb02fe63
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3a53009fa044a554dbdeacf30a6b8ea3eb02fe63
|
2014-10-15 05:02:55+02:00
|
vga: Remove some "should be done in BIOS" comments
Not all platforms have a VGA BIOS, powerpc typically relies on
using the DISPI interface to initialize the card.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: David Gibson <[email protected]>
|
ace89b8ff21cc3fb20986a334e54e6e6a1ccf729
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ace89b8ff21cc3fb20986a334e54e6e6a1ccf729
|
2014-09-30 13:34:09+02:00
|
virtio-rng: use aliases instead of duplicate qdev properties
virtio-rng-{pci, s390, ccw} all duplicate the
qdev properties of their VirtIORNG 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
VirtIORNG 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]>
|
8ee486ae339f0e5236f4a9ab988fc963edcc73b5
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8ee486ae339f0e5236f4a9ab988fc963edcc73b5
|
2014-09-30 11:09:21+02:00
|
tcg-sparc: Fix setcond_i32 uninitialized value
We failed to swap c1 and c2 correctly for NE c2 == 0.
Signed-off-by: Richard Henderson <[email protected]>
|
321b6c058544c136341bf9cc6055f127f307f03e
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/321b6c058544c136341bf9cc6055f127f307f03e
|
2014-09-29 14:55:27-04:00
|
target-arm: Don't handle c15_cpar changes via tb_flush()
At the moment we try to handle c15_cpar with the strategy of:
* emit generated code which makes assumptions about its value
* when the register value changes call tb_flush() to throw
away the now-invalid generated code
This works because XScale CPUs are always uniprocessor, but
it's confusing because it suggests that the same approach can
be taken for other registers. It also means we do a tb_flush()
on CPU reset, which makes multithreaded linux-user binaries
even more likely to fail than would otherwise be the case.
Replace it with a combination of TB flags for the access
checks done on cp0/cp1 for the XScale and iwMMXt instructions,
plus a runtime check for cp2..cp13 coprocessor accesses.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
|
c0f4af171999eda4e49de5169906ce98246457f0
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/c0f4af171999eda4e49de5169906ce98246457f0
|
2014-09-29 18:48:48+01:00
|
vmdk: fix buf leak in vmdk_parse_extents()
vmdk_open_sparse() does not take ownership of buf so the caller always
needs to free it.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
|
b6b1d31f098eef8cd13556d343e46c213fac972a
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/b6b1d31f098eef8cd13556d343e46c213fac972a
|
2014-09-08 11:12:44+01:00
|
libqtest: launch QEMU with QEMU_AUDIO_DRV=none
No test case actually uses the audio backend. Disable audio to prevent
warnings on hosts with no sound hardware present:
GTESTER check-qtest-aarch64
sdl: SDL_OpenAudio failed
sdl: Reason: No available audio device
sdl: SDL_OpenAudio failed
sdl: Reason: No available audio device
audio: Failed to create voice `lm4549.out'
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
|
6b029216056b8e64a6b5b7c43d1342cd4ef7ebc0
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6b029216056b8e64a6b5b7c43d1342cd4ef7ebc0
|
2014-08-28 13:42:25+01:00
|
Revert "memory: Use canonical path component as the name"
This reverts commit b0225c2c0d89200a29dc3d0b59d2e87a79cbaeb8
(which breaks building with Xen enabled and also leaks memory).
Signed-off-by: Peter Maydell <[email protected]>
|
302fa283789a2f9b1199c327047cfad2258a23a2
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/302fa283789a2f9b1199c327047cfad2258a23a2
|
2014-08-19 20:05:46+01:00
|
qcow2: Handle failure for potentially large allocations
Some code in the block layer makes potentially huge allocations. Failure
is not completely unexpected there, so avoid aborting qemu and handle
out-of-memory situations gracefully.
This patch addresses the allocations in the qcow2 block driver.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
|
de82815db1c89da058b7fb941dab137d6d9ab738
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/de82815db1c89da058b7fb941dab137d6d9ab738
|
2014-08-15 15:07:15+02:00
|
bochs: Handle failure for potentially large allocations
Some code in the block layer makes potentially huge allocations. Failure
is not completely unexpected there, so avoid aborting qemu and handle
out-of-memory situations gracefully.
This patch addresses the allocations in the bochs block driver.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
|
7bf665ee3504ab0ca4b8c29e1f603829a8272a26
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/7bf665ee3504ab0ca4b8c29e1f603829a8272a26
|
2014-08-15 15:07:15+02:00
|
ppc: fix -mem-path failure
commit e938ba0c tried to enable -mem-path for ppc but breaked some ppc
boards.
The problems are:
1. it fails when allocating memory for rom, sram whose sizes are less
than huge page size:
./ppc-softmmu/qemu-system-ppc -m 512 -mem-path /hugepages/ \
-kernel /home/hutao/Downloads/vmlinux-ppc -initrd \
/home/hutao/Downloads/initrd-ppc.gz
qemu-system-ppc: /mnt/data/projects/qemu/exec.c:1184: qemu_ram_set_idstr: Assertion `new_block' failed.
2. if there is a numa node backed by memory backend object, qemu fails
with message:
./ppc-softmmu/qemu-system-ppc -m 512 \
-object memory-backend-file,size=512M,mem-path=/hugepages,id=f0 \
-numa node,nodeid=0,memdev=f0 \
-kernel /home/hutao/Downloads/vmlinux-ppc \
-initrd /home/hutao/Downloads/initrd-ppc.gz
qemu-system-ppc: memory backend f0 is used multiple times. Each -numa option must use a different memdev value.
This patch does following:
1. replaces memory_region_allocate_system_memory() with
memory_region_init_ram() for rom, sram. Then only system memory
is backed by hugepages when specifying mem-path.
2. for memory banks, allocates all ram with
one memory_region_allocate_system_memory(), and use
memory_region_init_alias() to initialize memory banks.
Tested machines: default(g3beige), mac99, taihu, bamboo, ref405ep.
Signed-off-by: Hu Tao <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
|
e206ad48333c50373663945746828fc893b50700
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/e206ad48333c50373663945746828fc893b50700
|
2014-07-22 17:37:25+02:00
|
virtio: add endian-ambivalent support to VirtIODevice
Some CPU families can dynamically change their endianness. This means we
can have little endian ppc or big endian arm guests for example. This has
an impact on legacy virtio data structures since they are target endian.
We hence introduce a new property to track the endianness of each virtio
device. It is reasonnably assumed that endianness won't change while the
device is in use : we hence capture the device endianness when it gets
reset.
We migrate this property in a subsection, after the device descriptor. This
means the load code must not rely on it until it is restored. As a consequence,
the vring sanity checks had to be moved after the call to vmstate_load_state().
We enforce paranoia by poisoning the property at the begining of virtio_load().
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
|
616a655219a92ae7cf5d6a7862e6489c6282009e
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/616a655219a92ae7cf5d6a7862e6489c6282009e
|
2014-06-29 19:39:42+03:00
|
linux-user: allow NULL arguments to mount
Calls to the mount syscall can legitimately provide NULL as the value
for the source of filesystemtype arguments, which QEMU would previously
reject & return -EFAULT to the target program. An example of this is
remounting an already mounted filesystem with different properties.
Instead of rejecting such syscalls with -EFAULT, pass NULL along to the
kernel as the target program expects.
Additionally this patch fixes a potential memory leak when DEBUG_REMAP
is enabled and lock_user_string fails on the target or filesystemtype
arguments but a prior argument was non-NULL and already locked.
Since the patch already touched most lines of the TARGET_NR_mount case,
it fixes the indentation & coding style for good measure.
Signed-off-by: Paul Burton <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
|
356d771b30071b44fcb19d2f8d911784b9b276be
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/356d771b30071b44fcb19d2f8d911784b9b276be
|
2014-06-29 14:19:59+03:00
|
hw/arm/strongarm: Fix handling of GPSR/GPCR reads
The StrongARM 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]>
|
92335a0d4021a3b44ccc88c9fc6c0fd2113f1882
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/92335a0d4021a3b44ccc88c9fc6c0fd2113f1882
|
2014-06-29 18:38:39+01:00
|
nbd: Don't validate from and len in NBD_CMD_DISC.
These values aren't used in this case.
Currently, the from field in the request sent by the nbd kernel module leading
to a false error message when ending the connection with the client.
$ qemu-nbd some.img -v
// After nbd-client -d /dev/nbd0
nbd.c:nbd_trip():L1031: From: 18446744073709551104, Len: 0, Size: 20971520,
Offset: 0
nbd.c:nbd_trip():L1032: requested operation past EOF--bad client?
nbd.c:nbd_receive_request():L638: read failed
Signed-off-by: Hani Benhabiles <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
|
8c5d1abbb79193dca8e4823ef53d8d1e650362ae
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8c5d1abbb79193dca8e4823ef53d8d1e650362ae
|
2014-06-27 16:06:48+02:00
|
test: add test cases for qapi event
These cases will verify whether the expected qdict is built.
Signed-off-by: Wenchao Xia <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
|
f6dadb0242029e11640d9434efd39ec8211ea868
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/f6dadb0242029e11640d9434efd39ec8211ea868
|
2014-06-23 11:01:25-04:00
|
linux-user: Don't overrun guest buffer in sched_getaffinity
If the guest's "long" type is smaller than the host's, then
our sched_getaffinity wrapper needs to round the buffer size
up to a multiple of the host sizeof(long). This means that when
we copy the data back from the host buffer to the guest's
buffer there might be more than we can fit. Rather than
overflowing the guest's buffer, handle this case by returning
EINVAL or ignoring the unused extra space, as appropriate.
Note that only guests using the syscall interface directly might
run into this bug -- the glibc wrappers around it will always
use a buffer whose size is a multiple of 8 regardless of guest
architecture.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
|
be3bd286bc06bb68cdc71748d9dd4edcd57b2b24
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/be3bd286bc06bb68cdc71748d9dd4edcd57b2b24
|
2014-06-17 09:21:41+03:00
|
spapr_pci: Advertise MSI quota
Hotplug of multiple disks fails due to MSI vector quota check.
Number of MSI vectors default to 8 allowing only 4 devices.
This happens on RHEL6.5 guest. RHEL7 and SLES11 guests fallback
to INTX.
One way to workaround the issue is to increase total MSIs,
so that MSI quota check allows us to hotplug multiple disks.
This sets the quota to the maximum number of interupts XICS has
which is 1024 now (XICS_IRQS). This moves XICS_IRQS from spapr.c
to xics.h for wider visibility.
Signed-off-by: Badari Pulavarty <[email protected]>
[aik: put XICS_IRQS=1024 instead of 64i, fixed endianness and size]
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
|
9dbae97723e964692364fb43012c6fa5448a661f
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9dbae97723e964692364fb43012c6fa5448a661f
|
2014-06-16 13:24:46+02:00
|
PPC: Fail on leaking temporaries
When QEMU gets compiled with --enable-debug-tcg we can check for temporary
leakage. Implement the necessary target code for this and fail emulation
when we hit a leakage.
This hopefully ensures that we don't get new leaks.
Signed-off-by: Alexander Graf <[email protected]>
|
3de31797825e94fd67ee7c2e877127acc3d2edbd
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3de31797825e94fd67ee7c2e877127acc3d2edbd
|
2014-06-16 13:24:34+02:00
|
block: acquire AioContext in bdrv_drain_all()
Modify bdrv_drain_all() to take into account that BlockDriverState
instances may be running in different AioContexts.
This patch changes the implementation of bdrv_drain_all() while
preserving the semantics. Previously kicking throttled requests and
checking for pending requests were done across all BlockDriverState
instances in sequence. Now we process each BlockDriverState in turn,
making sure to acquire and release its AioContext.
This prevents race conditions between the thread executing
bdrv_drain_all() and the thread running the AioContext.
Signed-off-by: Stefan Hajnoczi <[email protected]>
|
9b536adcbefb72090f43c9715ce042e37e47af73
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9b536adcbefb72090f43c9715ce042e37e47af73
|
2014-06-04 09:56:11+02:00
|
aio: fix qemu_bh_schedule() bh->ctx race condition
qemu_bh_schedule() is supposed to be thread-safe at least the first time
it is called. Unfortunately this is not quite true:
bh->scheduled = 1;
aio_notify(bh->ctx);
Since another thread may run the BH callback once it has been scheduled,
there is a race condition if the callback frees the BH before
aio_notify(bh->ctx) has a chance to run.
Reported-by: Stefan Priebe <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Tested-by: Stefan Priebe <[email protected]>
|
924fe1293c3e7a3c787bbdfb351e7f168caee3e9
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/924fe1293c3e7a3c787bbdfb351e7f168caee3e9
|
2014-06-04 09:56:06+02:00
|
block/vvfat: Plug memory leak in enable_write_target()
I figure the leak originated in bdrv_create2(), and was duplicated
into callers when commit 91a073a dropped that function. Looks like
the other places have since been fixed.
Spotted by Coverity.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
75e347d66ab81944b5b657d17cc90ef92af3f016
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/75e347d66ab81944b5b657d17cc90ef92af3f016
|
2014-05-30 14:26:54+02:00
|
libcacard/vreader: Drop broken recovery from failed assertion
We suppress some code when we got unexpected status and assertion
checking is off:
assert(card_status == VCARD_DONE);
if (card_status == VCARD_DONE) {
int size = MIN(*receive_buf_len, response->b_total_len);
memcpy(receive_buf, response->b_data, size);
*receive_buf_len = size;
}
Such "recovery" is of dubious value even when it works. This one
doesn't: it fails to assign to receive_buf[] and *receive_buf_len,
which the callers expect.
Make the code unconditional.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Alon Levy <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
|
fa5912a17b51b807c4ec78a4aa914891c7770781
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/fa5912a17b51b807c4ec78a4aa914891c7770781
|
2014-05-24 00:46:01+04:00
|
libcacard: Plug memory leaks around vreader_get_reader_list()
Spotted by Coverity.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Alon Levy <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
|
124fe7fb1b7a1db8cb2ebb9edae84716ffaf37ce
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/124fe7fb1b7a1db8cb2ebb9edae84716ffaf37ce
|
2014-05-24 00:45:57+04:00
|
qcow1: Validate L2 table size (CVE-2014-0222)
Too large L2 table sizes cause unbounded allocations. Images actually
created by qemu-img only have 512 byte or 4k L2 tables.
To keep things consistent with cluster sizes, allow ranges between 512
bytes and 64k (in fact, down to 1 entry = 8 bytes is technically
working, but L2 table sizes smaller than a cluster don't make a lot of
sense).
This also means that the number of bytes on the virtual disk that are
described by the same L2 table is limited to at most 8k * 64k or 2^29,
preventively avoiding any integer overflows.
Cc: [email protected]
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
|
42eb58179b3b215bb507da3262b682b8a2ec10b5
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/42eb58179b3b215bb507da3262b682b8a2ec10b5
|
2014-05-19 11:36:49+02:00
|
virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path
Spotted by Coverity.
Signed-off-by: Markus Armbruster <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
|
91e7fcca4743cf694eb0c8e7a8d938cf359b5bd8
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/91e7fcca4743cf694eb0c8e7a8d938cf359b5bd8
|
2014-05-16 17:52:28+02:00
|
hw/arm/omap1: Avoid unintended sign extension writing omap_rtc YEARS_REG
When writing to the YEARS_REG register, if the year value is
99 then the multiplication by 31536000 will overflow into
the sign bit of a 32 bit value and then be erroneously
sign-extended if time_t is 64 bits. Add a cast to avoid this.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
|
7e7e5858f83ae711b08d11e2268c6fc6f8385fb7
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/7e7e5858f83ae711b08d11e2268c6fc6f8385fb7
|
2014-05-13 16:09:39+01:00
|
hw/audio/intel-hda: Avoid shift into sign bit
Add a U suffix to avoid shifting into the sign bit (which is
undefined behaviour in C).
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
|
b1fe60cd3525871a4c593ad8c2b39b89c19c00d0
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/b1fe60cd3525871a4c593ad8c2b39b89c19c00d0
|
2014-05-20 08:49:21+02:00
|
tcg: Avoid undefined behaviour patching code at unaligned addresses
To avoid C undefined behaviour when patching generated code,
provide wrappers tcg_patch8/16/32/64 which use the usual memcpy
trick, and use them in the i386 backend.
Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
|
5c53bb812152c3d7919cadfd47c210b181bf89ac
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/5c53bb812152c3d7919cadfd47c210b181bf89ac
|
2014-05-12 10:03:04-07:00
|
spapr: Implement processor compatibility in ibm, client-architecture-support
Modern Linux kernels support last POWERPC CPUs so when a kernel boots,
in most cases it can find a matching cpu_spec in the kernel's cpu_specs
list. However if the kernel is quite old, it may be missing a definition
of the actual CPU. To provide an ability for old kernels to work on modern
hardware, a Processor Compatibility Mode has been introduced
by the PowerISA specification.
>From the hardware prospective, it is supported by the Processor
Compatibility Register (PCR) which is defined in PowerISA. The register
enables one of the compatibility modes (2.05/2.06/2.07).
Since PCR is a hypervisor privileged register and cannot be
directly accessed from the guest, the mode selection is done via
ibm,client-architecture-support (CAS) RTAS call using which the guest
specifies what "raw" and "architected" CPU versions it supports.
QEMU works out the best match, changes a "cpu-version" property of
every CPU and notifies the guest about the change by setting these
properties in the buffer passed as a response on a custom H_CAS hypercall.
This implements ibm,client-architecture-support parameters parsing
(now only for PVRs) and cooks the device tree diff with new values for
"cpu-version", "ibm,ppc-interrupt-server#s" and
"ibm,ppc-interrupt-server#s" properties.
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
|
3794d5482d74dc0031cee6d5be2c61c88ca723bd
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3794d5482d74dc0031cee6d5be2c61c88ca723bd
|
2014-06-16 13:24:38+02:00
|
exec-all.h: Use stl_p to avoid undefined behaviour patching x86 jumps
The code which patches x86 jump instructions assumes it can do an
unaligned write of a uint32_t. This is actually safe on x86, but it's
still undefined behaviour. We have infrastructure for doing efficient
unaligned accesses which doesn't engage in undefined behaviour, so
use it.
This is technically fractionally less efficient, at least with gcc 4.6;
instead of one instruction:
7b2: 89 3e mov %edi,(%rsi)
we get an extra spurious store to the stack slot:
7b2: 89 7c 24 64 mov %edi,0x64(%rsp)
7b6: 89 3e mov %edi,(%rsi)
Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
|
86360ad71df0070283469b8ae59f33cdd013501d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/86360ad71df0070283469b8ae59f33cdd013501d
|
2014-05-12 10:03:04-07:00
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.