[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 79dd77: linux-user: correct msgrcv()
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 79dd77: linux-user: correct msgrcv() |
Date: |
Wed, 06 Feb 2013 17:00:13 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 79dd77de124c47263f54e5f686273487e0016a8f
https://github.com/qemu/qemu/commit/79dd77de124c47263f54e5f686273487e0016a8f
Author: Laurent Vivier <address@hidden>
Date: 2013-01-30 (Wed, 30 Jan 2013)
Changed paths:
M linux-user/syscall.c
Log Message:
-----------
linux-user: correct msgrcv()
All parameters must be swapped before the call of do_msgrcv().
Allow faked (debian fakeroot daemon) to work properly.
WITHOUT this patch:
$ faked-sysv --foreground --debug
using 1723744788 as msg key
msg_key=1723744788
1723744788:431
FAKEROOT: msg=131072, key=1723744788
FAKEROOT: r=-1, received message type=-150996052, message=-160219330
FAKEROOT, get_msg: Bad address
r=14, EINTR=4
fakeroot: clearing up message queues and semaphores, signal=-1
fakeroot: database save FAILED
WITH this patch:
$ faked-sysv --foreground --debug
using 1569385744 as msg key
msg_key=1569385744
1569385744:424
FAKEROOT: msg=0, key=1569385744
^C
fakeroot: clearing up message queues and semaphores, signal=2
fakeroot: database save FAILED
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Commit: 910ee4e5f4a1df5b1bd144dfca1ae466e2a86a78
https://github.com/qemu/qemu/commit/910ee4e5f4a1df5b1bd144dfca1ae466e2a86a78
Author: Laurent Vivier <address@hidden>
Date: 2013-01-30 (Wed, 30 Jan 2013)
Changed paths:
M linux-user/strace.c
Log Message:
-----------
linux-user: correct print_timeval() swap tv_sec and tv_usec
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Commit: 1b09aeb90827c1d91383a9eae42ce8f25909857b
https://github.com/qemu/qemu/commit/1b09aeb90827c1d91383a9eae42ce8f25909857b
Author: Laurent Vivier <address@hidden>
Date: 2013-01-30 (Wed, 30 Jan 2013)
Changed paths:
M linux-user/syscall.c
Log Message:
-----------
linux-user: correct setsockopt()
SO_SNDTIMEO and SO_RCVTIMEO take a struct timeval, not an int
To test this, you can use :
QEMU_STRACE= ping localhost 2>&1 |grep TIMEO
568 setsockopt(3,SOL_SOCKET,SO_SNDTIMEO,{1,0},8) = 0
568 setsockopt(3,SOL_SOCKET,SO_RCVTIMEO,{1,0},8) = 0
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Commit: c07ecc6866f8c5eb2e0b23ba20214000310355e0
https://github.com/qemu/qemu/commit/c07ecc6866f8c5eb2e0b23ba20214000310355e0
Author: Laurent Vivier <address@hidden>
Date: 2013-01-30 (Wed, 30 Jan 2013)
Changed paths:
M linux-user/syscall.c
Log Message:
-----------
linux-user: correct reboot()
According to man reboot(2), the 4th argument is only used with
LINUX_REBOOT_CMD_RESTART2. In other cases, trying to convert
the value can generate EFAULT.
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Commit: fb3a508531227bc7fb7eee22c51d30bf2ceb15f5
https://github.com/qemu/qemu/commit/fb3a508531227bc7fb7eee22c51d30bf2ceb15f5
Author: Markus Armbruster <address@hidden>
Date: 2013-02-05 (Tue, 05 Feb 2013)
Changed paths:
M trace/simple.c
Log Message:
-----------
trace: Fix simple trace dropped event record for big endian
We use atomic operations to keep track of dropped events.
Inconveniently, GLib supports only int and void * atomics, but the
counter dropped_events is uint64_t. Can't stop commit 62bab732: a
quick (gint *)&dropped_events bludgeons the compiler into submission.
That cast is okay only when int is exactly 64 bits wide, which it
commonly isn't.
If int is even wider, we clobber whatever follows dropped_events. Not
worth worrying about, as none of the machines that interest us have
such morbidly obese ints.
That leaves the common case: int narrower than 64 bits.
Harmless on little endian hosts: we just don't access the most
significant bits of dropped_events. They remain zero.
On big endian hosts, we use only the most significant bits of
dropped_events as counter. The least significant bits remain zero.
However, we write out the full value, which is the correct counter
shifted left a bunch of places.
Fix by changing the variables involved to int.
There's another, equally suspicious-looking (gint *)&trace_idx
argument to g_atomic_int_compare_and_exchange(), but that one casts
unsigned *, so it's okay. But it's also superfluous, because GLib's
atomic int operations work just fine for unsigned. Drop it.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: e722d705ae7648a6bd94848319a11eb0afd58a17
https://github.com/qemu/qemu/commit/e722d705ae7648a6bd94848319a11eb0afd58a17
Author: Markus Armbruster <address@hidden>
Date: 2013-02-05 (Tue, 05 Feb 2013)
Changed paths:
M trace/simple.c
Log Message:
-----------
trace: Direct access of atomics is verboten, use the API
The GLib Reference Manual says:
It is very important that all accesses to a particular integer or
pointer be performed using only this API and that different sizes
of operation are not mixed or used on overlapping memory
regions. Never read or assign directly from or to a value --
always use this API.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Harsh Prateek Bora <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: b6b2c9628084f1672b92393cf84039a075a95301
https://github.com/qemu/qemu/commit/b6b2c9628084f1672b92393cf84039a075a95301
Author: Markus Armbruster <address@hidden>
Date: 2013-02-05 (Tue, 05 Feb 2013)
Changed paths:
M trace/simple.c
Log Message:
-----------
trace: Clean up the "try to update atomic until it worked" loops
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Harsh Prateek Bora <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: 8f44015e4600041e200506720e39de7728c5cde9
https://github.com/qemu/qemu/commit/8f44015e4600041e200506720e39de7728c5cde9
Author: Markus Armbruster <address@hidden>
Date: 2013-02-05 (Tue, 05 Feb 2013)
Changed paths:
M docs/tracing.txt
Log Message:
-----------
trace: Fix location of simpletrace.py in docs
Missed when commit 4c3b5a48 moved it.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Harsh Prateek Bora <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: f38f7a847e316def8606d25441878d723de84b65
https://github.com/qemu/qemu/commit/f38f7a847e316def8606d25441878d723de84b65
Author: Stefan Weil <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M target-m68k/translate.c
Log Message:
-----------
target-m68k: Fix comment
* spelling fix ito -> into
* reorder to match load/store
Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: 2a0e1ad66e4177dddc6c8fb7aeadc095aafac828
https://github.com/qemu/qemu/commit/2a0e1ad66e4177dddc6c8fb7aeadc095aafac828
Author: Michael Tokarev <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M ui/vnc_keysym.h
Log Message:
-----------
vnc: recognize Hungarian doubleacutes
As reported in http://bugs.debian.org/697641 , some Hungarian keys
does not work with qemu when using vnc display.
This is because while the Hungarian keymap mentions these symbols,
qemu know nothing about them. So add them.
This patch is applicable to -stable for all previous releases.
Signed-off-by: Michael Tokarev <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: 82e59a676c01b3df3b53998d428d0a64a55f2439
https://github.com/qemu/qemu/commit/82e59a676c01b3df3b53998d428d0a64a55f2439
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M hmp.c
M qapi-schema.json
M qemu-char.c
M qmp-commands.hx
Log Message:
-----------
qmp: Fix design bug and read beyond buffer in memchar-write
Command memchar-write takes data and size parameter. Begs the
question what happens when data doesn't match size.
With format base64, qmp_memchar_write() copies the full data argument,
regardless of size argument.
With format utf8, qmp_memchar_write() copies size bytes from data,
happily reading beyond data. Copies crap from the heap or even
crashes.
Drop the size parameter, and always copy the full data argument.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 3ab651fc819178cf6a518af5860cc49f42cff455
https://github.com/qemu/qemu/commit/3ab651fc819178cf6a518af5860cc49f42cff455
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M hmp.c
M qapi-schema.json
M qemu-char.c
M qmp-commands.hx
Log Message:
-----------
qmp: Clean up design of memchar-read
The data returned has a well-defined size, which makes the size
returned along with it redundant at best. Drop it.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 1a69278e53a0e5060c8c6cc825449a122634ce3b
https://github.com/qemu/qemu/commit/1a69278e53a0e5060c8c6cc825449a122634ce3b
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qapi-schema.json
M qemu-char.c
Log Message:
-----------
qmp: Use generic errors in memchar-read, memchar-write
New errors should be generic unless there's a real use case for rich
errors.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: c4f331b6b3b5fe260128f316ee9f01997f7c428d
https://github.com/qemu/qemu/commit/c4f331b6b3b5fe260128f316ee9f01997f7c428d
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qemu-char.c
Log Message:
-----------
qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read()
Const-correctness, consistently use standard C types instead of mixing
them with GLib types.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 13289fb5a716e06fb06febb880e5e116d485f82b
https://github.com/qemu/qemu/commit/13289fb5a716e06fb06febb880e5e116d485f82b
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qemu-char.c
Log Message:
-----------
qmp: Plug memory leaks in memchar-write, memchar-read
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: c287e99fe47b179e6ef6b212139821b4d78934c1
https://github.com/qemu/qemu/commit/c287e99fe47b179e6ef6b212139821b4d78934c1
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qemu-char.c
Log Message:
-----------
qmp: Drop superfluous special case "empty" in qmp_memchar_read()
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 44f3bcd2c7991cc9d096e51e38864135543ea1ce
https://github.com/qemu/qemu/commit/44f3bcd2c7991cc9d096e51e38864135543ea1ce
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qemu-char.c
Log Message:
-----------
qmp: Drop wasteful zero-initialization in qmp_memchar_read()
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 094c8c2c67c486bcbc03c5e6327edc6ad3e5e29a
https://github.com/qemu/qemu/commit/094c8c2c67c486bcbc03c5e6327edc6ad3e5e29a
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qemu-char.c
Log Message:
-----------
qemu-char: Fix chardev "memory" not to drop IAC characters
Undocumented misfeature, get rid of it while we can.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 6fd5b66950fc5551d371ba5017d0e0858b7c800b
https://github.com/qemu/qemu/commit/6fd5b66950fc5551d371ba5017d0e0858b7c800b
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qemu-char.c
Log Message:
-----------
qemu-char: Drop undocumented chardev "memory" compatibility syntax
This is a new device, so there's no compatibility to maintain, and its
use case isn't common enough to justify shorthand syntax.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 5c230105cdea8ac9338bd5b4485c6ae80ec1fa18
https://github.com/qemu/qemu/commit/5c230105cdea8ac9338bd5b4485c6ae80ec1fa18
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qemu-char.c
Log Message:
-----------
qemu-char: General chardev "memory" code cleanup
Inline trivial cirmem_chr_is_empty() into its only caller.
Rename qemu_chr_cirmem_count() to cirmem_count().
Fast ring buffer index wraparound. Without this, there's no point in
restricting size to a power two.
qemu_is_chr(chr, "memory") returns *zero* when chr is a memory
character device, which isn't what I'd expect. Replace it by the
saner and more obviously correct chr_is_cirmem(). Also avoids
encouraging testing for specific character devices elsewhere.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 3949e59414fccefadc50ae65650d676cc734048c
https://github.com/qemu/qemu/commit/3949e59414fccefadc50ae65650d676cc734048c
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M hmp-commands.hx
M hmp.c
M hmp.h
M qapi-schema.json
M qemu-char.c
M qemu-options.hx
M qmp-commands.hx
Log Message:
-----------
qemu-char: Saner naming of memchar stuff & doc fixes
New device, has never been released, so we can still improve things
without worrying about compatibility.
Naming is a mess. The code calls the device driver CirMemCharDriver,
the public API calls it "memory", "memchardev", or "memchar", and the
special commands are named like "memchar-FOO". "memory" is a
particularly unfortunate choice, because there's another character
device driver called MemoryDriver. Moreover, the device's distinctive
property is that it's a ring buffer, not that's in memory. Therefore:
* Rename CirMemCharDriver to RingBufCharDriver, and call the thing a
"ringbuf" in the API.
* Rename QMP and HMP commands from memchar-FOO to ringbuf-FOO.
* Rename device parameter from maxcapacity to size (simple words are
good for you).
* Clearly mark the parameter as optional in documentation.
* Fix error reporting so that chardev-add reports to current monitor,
not stderr.
* Replace cirmem in C identifiers by ringbuf.
* Rework documentation. Document the impact of our crappy UTF-8
handling on reading.
* QMP examples that even work.
I could split this up into multiple commits, but they'd change the
same documentation lines multiple times. Not worth it.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: de1cc36e1039faf65b1739d28bef9f2a4e230eb6
https://github.com/qemu/qemu/commit/de1cc36e1039faf65b1739d28bef9f2a4e230eb6
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M qemu-char.c
Log Message:
-----------
qemu-char: Support suffixed ringbuf size arguments like "size=64K"
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 543f34126b7bfc85b05d0e371e3ce0695444f433
https://github.com/qemu/qemu/commit/543f34126b7bfc85b05d0e371e3ce0695444f433
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M hmp-commands.hx
M hmp.c
Log Message:
-----------
hmp: make memchar-read escape ASCII control chars except \n and \t
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 8a14952c9d2f5fa2b3caa6dc286b62ed5d26bca7
https://github.com/qemu/qemu/commit/8a14952c9d2f5fa2b3caa6dc286b62ed5d26bca7
Author: Markus Armbruster <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M hmp-commands.hx
Log Message:
-----------
hmp: Disable chardev-add and chardev-remove
As a general rule, HMP commands must be built on top of the QMP API.
Luiz and others have worked long & hard to make HMP conform to this
rule.
Commit f1088908 added chardev-add, in violation of this rule. QMP
command chardev-add was added right before, with minimal features, and
the idea to complete it step by step, then switch over the HMP command
to use it.
Unfortunately, we're not there, yet, and we don't want to release with
chardev-add in a "HMP is more powerful than QMP" state.
Disable the HMP command for now, along with its chardev-remove buddy.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 3f23624c848b8f1c88e4305fe01e19b2520bfd3d
https://github.com/qemu/qemu/commit/3f23624c848b8f1c88e4305fe01e19b2520bfd3d
Author: Anthony Liguori <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M target-m68k/translate.c
Log Message:
-----------
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
# By Michael Tokarev (1) and Stefan Weil (1)
# Via Stefan Hajnoczi
* stefanha/trivial-patches:
vnc: recognize Hungarian doubleacutes
target-m68k: Fix comment
Commit: 5b2cd9857d945cc1e9b6f596c757f70e25aed60c
https://github.com/qemu/qemu/commit/5b2cd9857d945cc1e9b6f596c757f70e25aed60c
Author: Anthony Liguori <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M docs/tracing.txt
M trace/simple.c
Log Message:
-----------
Merge remote-tracking branch 'stefanha/tracing' into staging
# By Markus Armbruster
# Via Stefan Hajnoczi
* stefanha/tracing:
trace: Fix location of simpletrace.py in docs
trace: Clean up the "try to update atomic until it worked" loops
trace: Direct access of atomics is verboten, use the API
trace: Fix simple trace dropped event record for big endian
Commit: f565235b71b7be66f3f6b385a5377969f5ed26f7
https://github.com/qemu/qemu/commit/f565235b71b7be66f3f6b385a5377969f5ed26f7
Author: Peter Maydell <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M hw/pxa2xx.c
Log Message:
-----------
hw/pxa2xx: Fix transposed crn/crm values for pxa2xx cp14 perf regs
When the pxa2xx performance counter related cp14 registers were converted
from a switch-statement implementation to the new table driven cpregs
format in commit dc2a9045c, the crn and crm values for all these
registers were accidentally transposed. Fix this mistake, which was
causing OpenBSD for Zaurus to fail to boot.
Reported-by: Jonathan Gray <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: 0bc8ce9460c1f51211e797a825432e55327b70c6
https://github.com/qemu/qemu/commit/0bc8ce9460c1f51211e797a825432e55327b70c6
Author: Peter Maydell <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M linux-user/qemu.h
Log Message:
-----------
linux-user: Restore cast to target type in get_user()
Commit 658f2dc97 accidentally dropped the cast to the target type of
the value loaded by get_user(). The most visible effect of this would
be that the sequence "uint64_t v; get_user_u32(v, addr)" would sign
extend the 32 bit loaded value into v rather than zero extending as
would be expected for a _u32 accessor. Put the cast back again to
restore the old behaviour.
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Commit: bd4bd24ed3e33f4f0ffa9dde23b8b85430592dc6
https://github.com/qemu/qemu/commit/bd4bd24ed3e33f4f0ffa9dde23b8b85430592dc6
Author: Anthony Liguori <address@hidden>
Date: 2013-02-06 (Wed, 06 Feb 2013)
Changed paths:
M linux-user/strace.c
M linux-user/syscall.c
Log Message:
-----------
Merge branch 'for-linux-user' of
https://git.gitorious.org/qemu-m68k/qemu-m68k into staging
* 'for-linux-user' of https://git.gitorious.org/qemu-m68k/qemu-m68k:
linux-user: correct reboot()
linux-user: correct setsockopt()
linux-user: correct print_timeval() swap tv_sec and tv_usec
linux-user: correct msgrcv()
Signed-off-by: Anthony Liguori <address@hidden>
Compare: https://github.com/qemu/qemu/compare/15af6321f4d1...bd4bd24ed3e3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 79dd77: linux-user: correct msgrcv(),
GitHub <=