* [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06
@ 2013-10-06 9:32 Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 01/14] .gitignore: ignore tests/qemu-iotests/socket_scm_helper Michael Tokarev
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel
Here's another trivial patche pull request, for patches collected
in last 2 weeks (2 instead of 1 because both week were more or
less quiet and there weren't many patches). There's nothing
exciting in here, but there are a few minor fixes for small but
annoying-in-some-environments issues.
Please pull.
Thanks,
/mjt
The following changes since commit a684f3cf9b9b9c3cb82be87aafc463de8974610c:
Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging (2013-09-30 17:15:27 -0500)
are available in the git repository at:
git://git.corpit.ru/qemu.git trivial-patches
for you to fetch changes up to 387eedebf60a463ba30833588f10123da296ba4d:
migration: Fix compiler warning ('caps' may be used uninitialized) (2013-10-05 14:02:29 +0400)
----------------------------------------------------------------
Amos Kong (1):
exec: cleanup DEBUG_SUBPAGE
Daniel P. Berrange (1):
hw/9pfs: Fix errno value for xattr functions
Fam Zheng (1):
.gitignore: ignore tests/qemu-iotests/socket_scm_helper
Guenter Roeck (1):
sh4: Fix serial line access for Linux kernels later than 3.2
Ján Veselý (1):
pci-ohci: Add missing 'break' in ohci_service_td
Markus Armbruster (3):
tests: Update .gitignore for test-int128 and test-bitops
tests: Fix schema parser test for in-tree build
vl: Clean up unnecessary boot_order complications
Michael Tokarev (1):
migration: Fix compiler warning ('caps' may be used uninitialized)
Stefan Weil (5):
block: Remove unused assignment (fixes warning from clang)
target-i386: Fix compiler warning (integer constant is too large)
hw/alpha: Fix compiler warning (integer constant is too large)
qemu-char: Fix potential out of bounds access to local arrays
util/path: Fix type which is longer than 8 bit for MinGW
blockdev.c | 1 -
exec.c | 18 +++++++++---------
hw/9pfs/virtio-9p-xattr.c | 6 +++---
hw/alpha/typhoon.c | 2 +-
hw/char/sh_serial.c | 2 --
hw/usb/hcd-ohci.c | 2 ++
migration.c | 1 +
qemu-char.c | 4 ++--
target-i386/arch_memory_mapping.c | 2 +-
tests/.gitignore | 3 +++
tests/Makefile | 8 ++++----
tests/qemu-iotests/.gitignore | 1 +
util/path.c | 4 ++--
vl.c | 6 ++----
14 files changed, 31 insertions(+), 29 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 01/14] .gitignore: ignore tests/qemu-iotests/socket_scm_helper
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 02/14] tests: Update .gitignore for test-int128 and test-bitops Michael Tokarev
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, Fam Zheng, qemu-devel
From: Fam Zheng <famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Wenchao Xia<xiawenc@linux.vnet.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
tests/qemu-iotests/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/qemu-iotests/.gitignore b/tests/qemu-iotests/.gitignore
index 62b4002..0541f80 100644
--- a/tests/qemu-iotests/.gitignore
+++ b/tests/qemu-iotests/.gitignore
@@ -2,6 +2,7 @@ check.log
check.time
*.out.bad
*.notrun
+socket_scm_helper
# ignore everything in the scratch directory
scratch/
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 02/14] tests: Update .gitignore for test-int128 and test-bitops
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 01/14] .gitignore: ignore tests/qemu-iotests/socket_scm_helper Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 03/14] tests: Fix schema parser test for in-tree build Michael Tokarev
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori
Cc: qemu-trivial, qemu-stable, Michael Tokarev, Markus Armbruster,
qemu-devel
From: Markus Armbruster <armbru@redhat.com>
Forgotten in commit 6046c62 and 3464700.
Cc: qemu-stable@nongnu.org
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
tests/.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/.gitignore b/tests/.gitignore
index ae5280e..f94ce04 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -5,9 +5,11 @@ check-qjson
check-qlist
check-qstring
test-aio
+test-bitops
test-throttle
test-cutils
test-hbitmap
+test-int128
test-iov
test-mul64
test-qapi-types.[ch]
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 03/14] tests: Fix schema parser test for in-tree build
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 01/14] .gitignore: ignore tests/qemu-iotests/socket_scm_helper Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 02/14] tests: Update .gitignore for test-int128 and test-bitops Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 04/14] exec: cleanup DEBUG_SUBPAGE Michael Tokarev
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori
Cc: qemu-trivial, qemu-stable, Michael Tokarev, Markus Armbruster,
qemu-devel
From: Markus Armbruster <armbru@redhat.com>
Commit 4f193e3 added the test, but screwed up in-tree builds
(SRCDIR=.): the tests's output overwrites the expected output, and is
thus compared to itself.
Cc: qemu-stable@nongnu.org
Reported-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
tests/.gitignore | 1 +
tests/Makefile | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/.gitignore b/tests/.gitignore
index f94ce04..425757c 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -23,3 +23,4 @@ test-thread-pool
test-x86-cpuid
test-xbzrle
*-test
+qapi-schema/*.test.*
diff --git a/tests/Makefile b/tests/Makefile
index 994fef1..915ae5e 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -261,10 +261,10 @@ check-tests/test-qapi.py: tests/test-qapi.py
.PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
$(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
- $(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.out 2>$*.err; echo $$? >$*.exit, " TEST $*.out")
- @diff -q $(SRC_PATH)/$*.out $*.out
- @diff -q $(SRC_PATH)/$*.err $*.err
- @diff -q $(SRC_PATH)/$*.exit $*.exit
+ $(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.test.out 2>$*.test.err; echo $$? >$*.test.exit, " TEST $*.out")
+ @diff -q $(SRC_PATH)/$*.out $*.test.out
+ @diff -q $(SRC_PATH)/$*.err $*.test.err
+ @diff -q $(SRC_PATH)/$*.exit $*.test.exit
# Consolidated targets
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 04/14] exec: cleanup DEBUG_SUBPAGE
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (2 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 03/14] tests: Fix schema parser test for in-tree build Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 05/14] block: Remove unused assignment (fixes warning from clang) Michael Tokarev
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Amos Kong, Michael Tokarev, qemu-devel
From: Amos Kong <akong@redhat.com>
Touched some error after enabling DEBUG_SUBPAGE.
Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
exec.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/exec.c b/exec.c
index 26681ce..51c2369 100644
--- a/exec.c
+++ b/exec.c
@@ -1573,7 +1573,7 @@ static uint64_t subpage_read(void *opaque, hwaddr addr,
uint8_t buf[4];
#if defined(DEBUG_SUBPAGE)
- printf("%s: subpage %p len %d addr " TARGET_FMT_plx "\n", __func__,
+ printf("%s: subpage %p len %u addr " TARGET_FMT_plx "\n", __func__,
subpage, len, addr);
#endif
address_space_read(subpage->as, addr + subpage->base, buf, len);
@@ -1596,7 +1596,7 @@ static void subpage_write(void *opaque, hwaddr addr,
uint8_t buf[4];
#if defined(DEBUG_SUBPAGE)
- printf("%s: subpage %p len %d addr " TARGET_FMT_plx
+ printf("%s: subpage %p len %u addr " TARGET_FMT_plx
" value %"PRIx64"\n",
__func__, subpage, len, addr, value);
#endif
@@ -1617,16 +1617,16 @@ static void subpage_write(void *opaque, hwaddr addr,
}
static bool subpage_accepts(void *opaque, hwaddr addr,
- unsigned size, bool is_write)
+ unsigned len, bool is_write)
{
subpage_t *subpage = opaque;
#if defined(DEBUG_SUBPAGE)
- printf("%s: subpage %p %c len %d addr " TARGET_FMT_plx "\n",
+ printf("%s: subpage %p %c len %u addr " TARGET_FMT_plx "\n",
__func__, subpage, is_write ? 'w' : 'r', len, addr);
#endif
return address_space_access_valid(subpage->as, addr + subpage->base,
- size, is_write);
+ len, is_write);
}
static const MemoryRegionOps subpage_ops = {
@@ -1646,8 +1646,8 @@ static int subpage_register (subpage_t *mmio, uint32_t start, uint32_t end,
idx = SUBPAGE_IDX(start);
eidx = SUBPAGE_IDX(end);
#if defined(DEBUG_SUBPAGE)
- printf("%s: %p start %08x end %08x idx %08x eidx %08x mem %ld\n", __func__,
- mmio, start, end, idx, eidx, memory);
+ printf("%s: %p start %08x end %08x idx %08x eidx %08x section %d\n",
+ __func__, mmio, start, end, idx, eidx, section);
#endif
for (; idx <= eidx; idx++) {
mmio->sub_section[idx] = section;
@@ -1668,8 +1668,8 @@ static subpage_t *subpage_init(AddressSpace *as, hwaddr base)
"subpage", TARGET_PAGE_SIZE);
mmio->iomem.subpage = true;
#if defined(DEBUG_SUBPAGE)
- printf("%s: %p base " TARGET_FMT_plx " len %08x %d\n", __func__,
- mmio, base, TARGET_PAGE_SIZE, subpage_memory);
+ printf("%s: %p base " TARGET_FMT_plx " len %08x\n", __func__,
+ mmio, base, TARGET_PAGE_SIZE);
#endif
subpage_register(mmio, 0, TARGET_PAGE_SIZE-1, PHYS_SECTION_UNASSIGNED);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 05/14] block: Remove unused assignment (fixes warning from clang)
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (3 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 04/14] exec: cleanup DEBUG_SUBPAGE Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 06/14] target-i386: Fix compiler warning (integer constant is too large) Michael Tokarev
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
blockdev.c:1929:13: warning: Value stored to 'ret' is never read
ret = 0;
^ ~
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
blockdev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index 8aa66a9..8c83f6f 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1926,7 +1926,6 @@ void qmp_drive_mirror(const char *device, const char *target,
} else {
switch (mode) {
case NEW_IMAGE_MODE_EXISTING:
- ret = 0;
break;
case NEW_IMAGE_MODE_ABSOLUTE_PATHS:
/* create new image with backing file */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 06/14] target-i386: Fix compiler warning (integer constant is too large)
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (4 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 05/14] block: Remove unused assignment (fixes warning from clang) Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 07/14] hw/alpha: " Michael Tokarev
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
>From buildbot default_i386_rhel61:
CC i386-softmmu/target-i386/arch_memory_mapping.o
target-i386/arch_memory_mapping.c: In function 'walk_pde':
target-i386/arch_memory_mapping.c:110: warning:
integer constant is too large for 'long' type
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target-i386/arch_memory_mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c
index 2566a04..462f984 100644
--- a/target-i386/arch_memory_mapping.c
+++ b/target-i386/arch_memory_mapping.c
@@ -75,7 +75,7 @@ static void walk_pte2(MemoryMappingList *list,
}
/* PAE Paging or IA-32e Paging */
-#define PLM4_ADDR_MASK 0xffffffffff000 /* selects bits 51:12 */
+#define PLM4_ADDR_MASK 0xffffffffff000ULL /* selects bits 51:12 */
static void walk_pde(MemoryMappingList *list, hwaddr pde_start_addr,
int32_t a20_mask, target_ulong start_line_addr)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 07/14] hw/alpha: Fix compiler warning (integer constant is too large)
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (5 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 06/14] target-i386: Fix compiler warning (integer constant is too large) Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 08/14] sh4: Fix serial line access for Linux kernels later than 3.2 Michael Tokarev
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
>From buildbot default_i386_rhel61:
CC alpha-softmmu/hw/alpha/typhoon.o
hw/alpha/typhoon.c: In function 'typhoon_translate_iommu':
hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type
hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/alpha/typhoon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index aac9a32..59e1bb8 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -700,7 +700,7 @@ static IOMMUTLBEntry typhoon_translate_iommu(MemoryRegion *iommu, hwaddr addr)
}
}
- if (addr >= 0x80000000000 && addr <= 0xfffffffffff) {
+ if (addr >= 0x80000000000ull && addr <= 0xfffffffffffull) {
/* Check the fourth window for DAC enable and window enable. */
if ((pchip->win[3].wba & 0x80000000001ull) == 0x80000000001ull) {
uint64_t pte_addr;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 08/14] sh4: Fix serial line access for Linux kernels later than 3.2
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (6 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 07/14] hw/alpha: " Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 09/14] pci-ohci: Add missing 'break' in ohci_service_td Michael Tokarev
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel, Guenter Roeck
From: Guenter Roeck <linux@roeck-us.net>
With Linux kernel version 3.3 or later, qemu fails with the following message:
sh_serial: unsupported read from 0x18
Aborted
Reported-and-analyzed-by: Rob Landley <rob@landley.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/char/sh_serial.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c
index 6223a55..9328dd1 100644
--- a/hw/char/sh_serial.c
+++ b/hw/char/sh_serial.c
@@ -248,11 +248,9 @@ static uint64_t sh_serial_read(void *opaque, hwaddr offs,
s->flags &= ~SH_SERIAL_FLAG_RDF;
}
break;
-#if 0
case 0x18:
ret = s->fcr;
break;
-#endif
case 0x1c:
ret = s->rx_cnt;
break;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 09/14] pci-ohci: Add missing 'break' in ohci_service_td
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (7 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 08/14] sh4: Fix serial line access for Linux kernels later than 3.2 Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 10/14] qemu-char: Fix potential out of bounds access to local arrays Michael Tokarev
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: Ján Veselý, qemu-trivial, Michael Tokarev, qemu-devel
From: Ján Veselý <jano.vesely@gmail.com>
Device communication errors need to be reported to driver.
Add a debug message while at it.
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Acked-by: Gerd Hoffmann <kraxel@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/usb/hcd-ohci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 35f0878..0396e33 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -1143,7 +1143,9 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed)
switch (ret) {
case USB_RET_IOERROR:
case USB_RET_NODEV:
+ DPRINTF("usb-ohci: got DEV ERROR\n");
OHCI_SET_BM(td.flags, TD_CC, OHCI_CC_DEVICENOTRESPONDING);
+ break;
case USB_RET_NAK:
DPRINTF("usb-ohci: got NAK\n");
return 1;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 10/14] qemu-char: Fix potential out of bounds access to local arrays
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (8 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 09/14] pci-ohci: Add missing 'break' in ohci_service_td Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 11/14] vl: Clean up unnecessary boot_order complications Michael Tokarev
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori
Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel,
qemu-stable
From: Stefan Weil <sw@weilnetz.de>
Latest gcc-4.8 supports a new option -fsanitize=address which activates
an AddressSanitizer. This AddressSanitizer stops the QEMU system emulation
very early because two character arrays of size 8 are potentially written
with 9 bytes.
Commit 6ea314d91439741e95772dfbab98b4135e04bebb added the code.
There is no obvious reason why width or height could need 8 characters,
so reduce it to 7 characters which together with the terminating '\0'
fit into the arrays.
Cc: qemu-stable <qemu-stable@nongnu.org>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Alex Bennée <alex@bennee.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-char.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index f7f5464..6d393e6 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2989,11 +2989,11 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
if (strstart(filename, "vc", &p)) {
qemu_opt_set(opts, "backend", "vc");
if (*p == ':') {
- if (sscanf(p+1, "%8[0-9]x%8[0-9]", width, height) == 2) {
+ if (sscanf(p+1, "%7[0-9]x%7[0-9]", width, height) == 2) {
/* pixels */
qemu_opt_set(opts, "width", width);
qemu_opt_set(opts, "height", height);
- } else if (sscanf(p+1, "%8[0-9]Cx%8[0-9]C", width, height) == 2) {
+ } else if (sscanf(p+1, "%7[0-9]Cx%7[0-9]C", width, height) == 2) {
/* chars */
qemu_opt_set(opts, "cols", width);
qemu_opt_set(opts, "rows", height);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 11/14] vl: Clean up unnecessary boot_order complications
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (9 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 10/14] qemu-char: Fix potential out of bounds access to local arrays Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 12/14] hw/9pfs: Fix errno value for xattr functions Michael Tokarev
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, Markus Armbruster, qemu-devel
From: Markus Armbruster <armbru@redhat.com>
Messed up in commit 8281abd.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
vl.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/vl.c b/vl.c
index 983cdc6..7e1f408 100644
--- a/vl.c
+++ b/vl.c
@@ -2825,7 +2825,7 @@ int main(int argc, char **argv, char **envp)
const char *icount_option = NULL;
const char *initrd_filename;
const char *kernel_filename, *kernel_cmdline;
- const char *boot_order = NULL;
+ const char *boot_order;
DisplayState *ds;
int cyls, heads, secs, translation;
QemuOpts *hda_opts = NULL, *opts, *machine_opts;
@@ -4050,9 +4050,7 @@ int main(int argc, char **argv, char **envp)
initrd_filename = qemu_opt_get(machine_opts, "initrd");
kernel_cmdline = qemu_opt_get(machine_opts, "append");
- if (!boot_order) {
- boot_order = machine->default_boot_order;
- }
+ boot_order = machine->default_boot_order;
opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL);
if (opts) {
char *normal_boot_order;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 12/14] hw/9pfs: Fix errno value for xattr functions
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (10 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 11/14] vl: Clean up unnecessary boot_order complications Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 13/14] util/path: Fix type which is longer than 8 bit for MinGW Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 14/14] migration: Fix compiler warning ('caps' may be used uninitialized) Michael Tokarev
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel
From: "Daniel P. Berrange" <berrange@redhat.com>
If there is no operation driver for the xattr type the
functions return '-1' and set errno to '-EOPNOTSUPP'.
When the calling code sets 'ret = -errno' this turns
into a large positive number.
In Linux 3.11, the kernel has switched to using 9p
version 9p2000.L, instead of 9p2000.u, which enables
support for xattr operations. This on its own is harmless,
but for another change which makes it request the xattr
with a name 'security.capability'.
The result is that the guest sees a succesful return
of 95 bytes of data, instead of a failure with errno
set to 95. Since the kernel expects a maximum of 20
bytes for an xattr return this gets translated to the
unexpected errno ERANGE.
This all means that when running a binary off a 9p fs
in 3.11 kernels you get a fun result of:
# ./date
sh: ./date: Numerical result out of range
The only workaround is to pass 'version=9p2000.u' when
mounting the 9p fs in the guest, to disable all use of
xattrs.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/9pfs/virtio-9p-xattr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/9pfs/virtio-9p-xattr.c b/hw/9pfs/virtio-9p-xattr.c
index 90ae565..3fae557 100644
--- a/hw/9pfs/virtio-9p-xattr.c
+++ b/hw/9pfs/virtio-9p-xattr.c
@@ -36,7 +36,7 @@ ssize_t v9fs_get_xattr(FsContext *ctx, const char *path,
if (xops) {
return xops->getxattr(ctx, path, name, value, size);
}
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
@@ -123,7 +123,7 @@ int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
if (xops) {
return xops->setxattr(ctx, path, name, value, size, flags);
}
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
@@ -135,7 +135,7 @@ int v9fs_remove_xattr(FsContext *ctx,
if (xops) {
return xops->removexattr(ctx, path, name);
}
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 13/14] util/path: Fix type which is longer than 8 bit for MinGW
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (11 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 12/14] hw/9pfs: Fix errno value for xattr functions Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 14/14] migration: Fix compiler warning ('caps' may be used uninitialized) Michael Tokarev
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel
From: Stefan Weil <sw@weilnetz.de>
While dirent->d_type is 8 bit for most systems, it is 32 bit for MinGW.
Reducing it to 8 bit results in a compiler warning because the macro
is_dir_maybe compares that 8 bit value with 32 bit constants.
Using 'unsigned' instead of 'unsigned char' matches the declaration for
MinGW and does not harm the other systems.
MinGW-w64 is not affected: it does not declare d_type.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
util/path.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/path.c b/util/path.c
index f0c6962..623219e 100644
--- a/util/path.c
+++ b/util/path.c
@@ -39,7 +39,7 @@ static int strneq(const char *s1, unsigned int n, const char *s2)
}
static struct pathelem *add_entry(struct pathelem *root, const char *name,
- unsigned char type);
+ unsigned type);
static struct pathelem *new_entry(const char *root,
struct pathelem *parent,
@@ -82,7 +82,7 @@ static struct pathelem *add_dir_maybe(struct pathelem *path)
}
static struct pathelem *add_entry(struct pathelem *root, const char *name,
- unsigned char type)
+ unsigned type)
{
struct pathelem **e;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 14/14] migration: Fix compiler warning ('caps' may be used uninitialized)
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
` (12 preceding siblings ...)
2013-10-06 9:32 ` [Qemu-devel] [PULL 13/14] util/path: Fix type which is longer than 8 bit for MinGW Michael Tokarev
@ 2013-10-06 9:32 ` Michael Tokarev
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2013-10-06 9:32 UTC (permalink / raw
To: aliguori; +Cc: qemu-trivial, Michael Tokarev, qemu-devel
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
---
migration.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/migration.c b/migration.c
index b4f8462..2b1ab20 100644
--- a/migration.c
+++ b/migration.c
@@ -150,6 +150,7 @@ MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp)
MigrationState *s = migrate_get_current();
int i;
+ caps = NULL; /* silence compiler warning */
for (i = 0; i < MIGRATION_CAPABILITY_MAX; i++) {
if (head == NULL) {
head = g_malloc0(sizeof(*caps));
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-10-06 9:49 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-06 9:32 [Qemu-devel] [PULL 00/14] Trivial patches for 2013-10-06 Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 01/14] .gitignore: ignore tests/qemu-iotests/socket_scm_helper Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 02/14] tests: Update .gitignore for test-int128 and test-bitops Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 03/14] tests: Fix schema parser test for in-tree build Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 04/14] exec: cleanup DEBUG_SUBPAGE Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 05/14] block: Remove unused assignment (fixes warning from clang) Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 06/14] target-i386: Fix compiler warning (integer constant is too large) Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 07/14] hw/alpha: " Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 08/14] sh4: Fix serial line access for Linux kernels later than 3.2 Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 09/14] pci-ohci: Add missing 'break' in ohci_service_td Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 10/14] qemu-char: Fix potential out of bounds access to local arrays Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 11/14] vl: Clean up unnecessary boot_order complications Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 12/14] hw/9pfs: Fix errno value for xattr functions Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 13/14] util/path: Fix type which is longer than 8 bit for MinGW Michael Tokarev
2013-10-06 9:32 ` [Qemu-devel] [PULL 14/14] migration: Fix compiler warning ('caps' may be used uninitialized) Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.