#
e7b79428 |
| 18-Feb-2022 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
Drop qemu_foo() socket API wrapper
The socket API wrappers were initially introduced in commit 00aa0040 ("Wrap recv to avoid warnings"), but made redundant with commit a2d96af4 ("osdep: add wrappers
Drop qemu_foo() socket API wrapper
The socket API wrappers were initially introduced in commit 00aa0040 ("Wrap recv to avoid warnings"), but made redundant with commit a2d96af4 ("osdep: add wrappers for socket functions") which fixes the win32 declarations and thus removed the earlier warnings.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
Revision tags: v6.2.0 |
|
#
0021c476 |
| 30-Sep-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* SGX implementation for x86 * Miscellaneous bugfixes * Fix dependencies from ROMs to qtests
# gpg: Signature ma
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* SGX implementation for x86 * Miscellaneous bugfixes * Fix dependencies from ROMs to qtests
# gpg: Signature made Thu 30 Sep 2021 14:30:35 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini-gitlab/tags/for-upstream: (33 commits) meson_options.txt: Switch the default value for the vnc option to 'auto' build-sys: add HAVE_IPPROTO_MPTCP memory: Add tracepoint for dirty sync memory: Name all the memory listeners target/i386: Fix memory leak in sev_read_file_base64() tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs meson: unpack edk2 firmware even if --disable-blobs target/i386: Add the query-sgx-capabilities QMP command target/i386: Add HMP and QMP interfaces for SGX docs/system: Add SGX documentation to the system manual sgx-epc: Add the fill_device_info() callback support i440fx: Add support for SGX EPC q35: Add support for SGX EPC i386: acpi: Add SGX EPC entry to ACPI tables i386/pc: Add e820 entry for SGX EPC section(s) hw/i386/pc: Account for SGX EPC sections when calculating device memory hw/i386/fw_cfg: Set SGX bits in feature control fw_cfg accordingly Adjust min CPUID level to 0x12 when SGX is enabled i386: Propagate SGX CPUID sub-leafs to KVM i386: kvm: Add support for exposing PROVISIONKEY to guest ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
653163fc |
| 07-Sep-2021 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
build-sys: add HAVE_IPPROTO_MPTCP
The QAPI schema shouldn't rely on C system headers #define, but on configure-time project #define, so we can express the build condition in a C-independent way.
Si
build-sys: add HAVE_IPPROTO_MPTCP
The QAPI schema shouldn't rely on C system headers #define, but on configure-time project #define, so we can express the build condition in a C-independent way.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210907121943.3498701-3-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
de8ed105 |
| 27-Sep-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-25-v2' into staging
QAPI patches patches for 2021-09-25
# gpg: Signature made Mon 27 Sep 2021 13:44:23 BST # gpg:
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-25-v2' into staging
QAPI patches patches for 2021-09-25
# gpg: Signature made Mon 27 Sep 2021 13:44:23 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2021-09-25-v2: (25 commits) tests/qapi-schema: Make test-qapi.py -u work when files are absent tests/qapi-schema: Use Python OSError instead of outmoded IOError test-clone-visitor: Correct an accidental rename tests/qapi-schema: Rename flat-union-* test cases to union-* qapi: Drop simple unions tests/qapi-schema: Purge simple unions from tests tests/qapi-schema: Drop simple union __org.qemu_x-Union1 test-clone-visitor: Wean off __org.qemu_x-Union1 tests/qapi-schema: Rewrite simple union TestIfUnion to be flat tests/qapi-schema: Simple union UserDefListUnion is now unused, drop tests/qapi-schema: Wean off UserDefListUnion test-clone-visitor: Wean off UserDefListUnion test-qobject-output-visitor: Wean off UserDefListUnion test-qobject-input-visitor: Wean off UserDefListUnion tests/qapi-schema: Prepare for simple union UserDefListUnion removal qapi: Convert simple union TransactionAction to flat one qapi: Convert simple union ImageInfoSpecific to flat one qapi: Convert simple union SocketAddressLegacy to flat one qapi: Convert simple union ChardevBackend to flat one qapi: Convert simple union MemoryDeviceInfo to flat one ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
935a867c |
| 17-Sep-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Convert simple union SocketAddressLegacy to flat one
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been using simple
qapi: Convert simple union SocketAddressLegacy to flat one
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been using simple unions in new code for a long time, because they are less flexible and somewhat awkward on the wire.
To prepare for their removal, convert simple union SocketAddressLegacy to an equivalent flat one, with existing enum SocketAddressType replacing implicit enum type SocketAddressLegacyKind. Adds some boilerplate to the schema, which is a bit ugly, but a lot easier to maintain than the simple union feature.
Cc: "Daniel P. Berrangé" <berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-9-armbru@redhat.com>
show more ...
|
#
a61c30b8 |
| 07-Sep-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/mjt/tags/patch-fetch' into staging
qemu-socket unix socket bugfix 2021-09-06
# gpg: Signature made Mon 06 Sep 2021 16:19:32 BST # gpg: using RSA
Merge remote-tracking branch 'remotes/mjt/tags/patch-fetch' into staging
qemu-socket unix socket bugfix 2021-09-06
# gpg: Signature made Mon 06 Sep 2021 16:19:32 BST # gpg: using RSA key 7B73BAD68BE7A2C289314B22701B4F6B1A693E59 # gpg: issuer "mjt@tls.msk.ru" # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" [full] # gpg: aka "Michael Tokarev <mjt@corpit.ru>" [full] # gpg: aka "Michael Tokarev <mjt@debian.org>" [full] # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931 4B22 701B 4F6B 1A69 3E59
* remotes/mjt/tags/patch-fetch: qemu-sockets: fix unix socket path copy (again)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
118d527f |
| 01-Sep-2021 |
Michael Tokarev <mjt@tls.msk.ru> |
qemu-sockets: fix unix socket path copy (again)
Commit 4cfd970ec188558daa6214f26203fe553fb1e01f added an assert which ensures the path within an address of a unix socket returned from the kernel is
qemu-sockets: fix unix socket path copy (again)
Commit 4cfd970ec188558daa6214f26203fe553fb1e01f added an assert which ensures the path within an address of a unix socket returned from the kernel is at least one byte and does not exceed sun_path buffer. Both of this constraints are wrong:
A unix socket can be unnamed, in this case the path is completely empty (not even \0)
And some implementations (notable linux) can add extra trailing byte (\0) _after_ the sun_path buffer if we passed buffer larger than it (and we do).
So remove the assertion (since it causes real-life breakage) but at the same time fix the usage of sun_path. Namely, we should not access sun_path[0] if kernel did not return it at all (this is the case for unnamed sockets), and use the returned salen when copyig actual path as an upper constraint for the amount of bytes to copy - this will ensure we wont exceed the information provided by the kernel, regardless whenever there is a trailing \0 or not. This also helps with unnamed sockets.
Note the case of abstract socket, the sun_path is actually a blob and can contain \0 characters, - it should not be passed to g_strndup and the like, it should be accessed by memcpy-like functions.
Fixes: 4cfd970ec188558daa6214f26203fe553fb1e01f Fixes: http://bugs.debian.org/993145 Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> CC: qemu-stable@nongnu.org
show more ...
|
Revision tags: v6.1.0 |
|
#
287d5339 |
| 05-Aug-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/marcandre/tags/chr-fix-pull-request' into staging
Chardev-related fixes
Hi
Here are some bug fixes worthy for 6.1.
thanks
# gpg: Signature made Thu 05 Aug 2
Merge remote-tracking branch 'remotes/marcandre/tags/chr-fix-pull-request' into staging
Chardev-related fixes
Hi
Here are some bug fixes worthy for 6.1.
thanks
# gpg: Signature made Thu 05 Aug 2021 13:52:03 BST # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5
* remotes/marcandre/tags/chr-fix-pull-request: chardev: report a simpler error about duplicated id chardev: give some context on chardev-add error chardev: fix qemu_chr_open_fd() with fd_in==fd_out chardev: fix qemu_chr_open_fd() being called with fd=-1 chardev: fix fd_chr_add_watch() when in != out chardev: mark explicitly first argument as poisoned chardev/socket: print a more correct command-line address util: fix abstract socket path copy
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
4cfd970e |
| 19-Jul-2021 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
util: fix abstract socket path copy
Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket support" neglected to update socket_sockaddr_to_address_unix() and copied the whole sun_path with
util: fix abstract socket path copy
Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket support" neglected to update socket_sockaddr_to_address_unix() and copied the whole sun_path without taking "salen" into account.
Later, commit 3b14b4ec49 "sockets: Fix socket_sockaddr_to_address_unix() for abstract sockets" handled the abstract UNIX path, by stripping the leading \0 character and fixing address details, but didn't use salen either.
Not taking "salen" into account may result in incorrect "path" being returned in monitors commands, as we read past the address which is not necessarily \0-terminated.
Fixes: 776b97d3605ed0fc94443048fdf988c7725e38a9 Fixes: 3b14b4ec49a801067da19d6b8469eb1c1911c020 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: xiaoqiang zhao <zxq_yx_007@163.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
e4bfa6cd |
| 20-Jun-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-06-15-v2' into staging
nbd patches for 2021-06-15
- bug fixes in coroutine aio context handling - rework NBD client connection logic t
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-06-15-v2' into staging
nbd patches for 2021-06-15
- bug fixes in coroutine aio context handling - rework NBD client connection logic to perform more work in coroutine
# gpg: Signature made Fri 18 Jun 2021 18:29:39 BST # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* remotes/ericb/tags/pull-nbd-2021-06-15-v2: (34 commits) block/nbd: safer transition to receiving request block/nbd: add nbd_client_connected() helper block/nbd: reuse nbd_co_do_establish_connection() in nbd_open() nbd/client-connection: add option for non-blocking connection attempt block/nbd: split nbd_co_do_establish_connection out of nbd_reconnect_attempt block-coroutine-wrapper: allow non bdrv_ prefix nbd/client-connection: return only one io channel block/nbd: drop BDRVNBDState::sioc block/nbd: don't touch s->sioc in nbd_teardown_connection() block/nbd: use negotiation of NBDClientConnection block/nbd: split nbd_handle_updated_info out of nbd_client_handshake() nbd/client-connection: shutdown connection on release nbd/client-connection: implement connection retry nbd/client-connection: add possibility of negotiation nbd/client-connection: use QEMU_LOCK_GUARD nbd: move connection code from block/nbd to nbd/client-connection block/nbd: introduce nbd_client_connection_release() block/nbd: introduce nbd_client_connection_new() block/nbd: rename NBDConnectThread to NBDClientConnection block/nbd: make nbd_co_establish_connection_cancel() bs-independent ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
c5423704 |
| 10-Jun-2021 |
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> |
qemu-sockets: introduce socket_address_parse_named_fd()
Add function that transforms named fd inside SocketAddress structure into number representation. This way it may be then used in a context whe
qemu-sockets: introduce socket_address_parse_named_fd()
Add function that transforms named fd inside SocketAddress structure into number representation. This way it may be then used in a context where current monitor is not available.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210610100802.5888-6-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: comment tweak] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
7fe7fae8 |
| 09-Jun-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-migration-20210609a' into staging
Migration pull for 2021-06-09
Yank crash fix from Leo RDMA fix from Li mptcp support from me dirty-
Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-migration-20210609a' into staging
Migration pull for 2021-06-09
Yank crash fix from Leo RDMA fix from Li mptcp support from me dirty-rate changes from Hyman and Peter
(Note I've switched to the gitlab I've been using for virtiofs pulls)
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
# gpg: Signature made Wed 09 Jun 2021 15:40:01 BST # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7
* remotes/dgilbert-gitlab/tags/pull-migration-20210609a: hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds migration/dirtyrate: make sample page count configurable sockets: Support multipath TCP migration/socket: Close the listener at the end migration: Add cleanup hook for inwards migration io/net-listener: Call the notifier during finalize channel-socket: Only set CLOEXEC if we have space for fds migration/rdma: Fix cm event use after free yank: Unregister function when using TLS migration
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
8bd1078a |
| 21-Apr-2021 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
sockets: Support multipath TCP
Multipath TCP allows combining multiple interfaces/routes into a single socket, with very little work for the user/admin.
It's enabled by 'mptcp' on most socket addre
sockets: Support multipath TCP
Multipath TCP allows combining multiple interfaces/routes into a single socket, with very little work for the user/admin.
It's enabled by 'mptcp' on most socket addresses:
./qemu-system-x86_64 -nographic -incoming tcp:0:4444,mptcp
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20210421112834.107651-6-dgilbert@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
#
da9076f3 |
| 21-May-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-05-11' into staging
nbd patches for 2021-05-11
- fix fd passing to qemu-storage-daemon --nbd-server
# gpg: Signature made Tue 11 May
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-05-11' into staging
nbd patches for 2021-05-11
- fix fd passing to qemu-storage-daemon --nbd-server
# gpg: Signature made Tue 11 May 2021 20:26:22 BST # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* remotes/ericb/tags/pull-nbd-2021-05-11: sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
37179e9e |
| 10-Mar-2021 |
Stefan Hajnoczi <stefanha@redhat.com> |
sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog
socket_get_fd() fails with the error "socket_get_fd: too many connections" if the given listen backlog value is not 1.
Not all callers set t
sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog
socket_get_fd() fails with the error "socket_get_fd: too many connections" if the given listen backlog value is not 1.
Not all callers set the backlog to 1. For example, commit 582d4210eb2f2ab5baac328fe4b479cd86da1647 ("qemu-nbd: Use SOMAXCONN for socket listen() backlog") uses SOMAXCONN. This will always fail with in socket_get_fd().
This patch calls listen(2) on the fd to update the backlog value. The socket may already be in the listen state. I have tested that this works on Linux 5.10 and macOS Catalina.
As a bonus this allows us to detect when the fd cannot listen. Now we'll be able to catch unbound or connected fds in socket_listen().
Drop the num argument from socket_get_fd() since this function is also called by socket_connect() where a listen backlog value does not make sense.
Fixes: e5b6353cf25c99c3f08bf51e29933352f7140e8f ("socket: Add backlog parameter to socket_listen") Reported-by: Richard W.M. Jones <rjones@redhat.com> Cc: Juan Quintela <quintela@redhat.com> Cc: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20210310173004.420190-1-stefanha@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|
Revision tags: v5.2.0 |
|
#
ad262888 |
| 03-Nov-2020 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/berrange-gitlab/tags/sock-next-pull-request' into staging
- Fix inverted logic in abstract socket QAPI support - Only report abstract socket support in QAPI o
Merge remote-tracking branch 'remotes/berrange-gitlab/tags/sock-next-pull-request' into staging
- Fix inverted logic in abstract socket QAPI support - Only report abstract socket support in QAPI on Linux hosts - Expand test coverage - Misc other code cleanups
# gpg: Signature made Tue 03 Nov 2020 14:00:53 GMT # gpg: using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full] # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" [full] # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF
* remotes/berrange-gitlab/tags/sock-next-pull-request: sockets: Make abstract UnixSocketAddress depend on CONFIG_LINUX sockets: Bypass "replace empty @path" for abstract unix sockets char-socket: Fix qemu_chr_socket_address() for abstract sockets sockets: Fix socket_sockaddr_to_address_unix() for abstract sockets sockets: Fix default of UnixSocketAddress member @tight test-util-sockets: Test the complete abstract socket matrix test-util-sockets: Synchronize properly, don't sleep(1) test-util-sockets: Factor out test_socket_unix_abstract_one() test-util-sockets: Clean up SocketAddress construction test-util-sockets: Correct to set has_abstract, has_tight test-util-sockets: Plug file descriptor leak
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
8acefc79 |
| 02-Nov-2020 |
Markus Armbruster <armbru@redhat.com> |
sockets: Make abstract UnixSocketAddress depend on CONFIG_LINUX
The abstract socket namespace is a non-portable Linux extension. An attempt to use it elsewhere should fail with ENOENT (the abstract
sockets: Make abstract UnixSocketAddress depend on CONFIG_LINUX
The abstract socket namespace is a non-portable Linux extension. An attempt to use it elsewhere should fail with ENOENT (the abstract address looks like a "" pathname, which does not resolve). We report this failure like
Failed to connect socket abc: No such file or directory
Tolerable, although ENOTSUP would be better.
However, introspection lies: it has @abstract regardless of host support. Easy enough to fix: since Linux provides them since 2.2, 'if': 'defined(CONFIG_LINUX)' should do.
The above failure becomes
Parameter 'backend.data.addr.data.abstract' is unexpected
I consider this an improvement.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
ef298e38 |
| 02-Nov-2020 |
Markus Armbruster <armbru@redhat.com> |
sockets: Bypass "replace empty @path" for abstract unix sockets
unix_listen_saddr() replaces empty @path by unique value. It obtains the value by creating and deleting a unique temporary file with
sockets: Bypass "replace empty @path" for abstract unix sockets
unix_listen_saddr() replaces empty @path by unique value. It obtains the value by creating and deleting a unique temporary file with mkstemp(). This is racy, as the comment explains. It's also entirely undocumented as far as I can tell. Goes back to commit d247d25f18 "sockets: helper functions for qemu (Gerd Hoffman)", v0.10.0.
Since abstract socket addresses have no connection with filesystem pathnames, making them up with mkstemp() seems inappropriate. Bypass the replacement of empty @path.
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
3b14b4ec |
| 02-Nov-2020 |
Markus Armbruster <armbru@redhat.com> |
sockets: Fix socket_sockaddr_to_address_unix() for abstract sockets
Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket support" neglected to update socket_sockaddr_to_address_unix().
sockets: Fix socket_sockaddr_to_address_unix() for abstract sockets
Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket support" neglected to update socket_sockaddr_to_address_unix(). The function returns a non-abstract socket address for abstract sockets (wrong) with a null @path (also wrong; a non-optional QAPI str member must never be null).
The null @path is due to confused code going back all the way to commit 17c55decec "sockets: add helpers for creating SocketAddress from a socket".
Add the required special case, and simplify the confused code.
Fixes: 776b97d3605ed0fc94443048fdf988c7725e38a9 Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
b08cc97d |
| 02-Nov-2020 |
Markus Armbruster <armbru@redhat.com> |
sockets: Fix default of UnixSocketAddress member @tight
An optional bool member of a QAPI struct can be false, true, or absent. The previous commit demonstrated that socket_listen() and socket_conne
sockets: Fix default of UnixSocketAddress member @tight
An optional bool member of a QAPI struct can be false, true, or absent. The previous commit demonstrated that socket_listen() and socket_connect() are broken for absent @tight, and indeed QMP chardev- add also defaults absent member @tight to false instead of true.
In C, QAPI members are represented by two fields, has_MEMBER and MEMBER. We have:
has_MEMBER MEMBER false true false true true true absent false false/ignore
When has_MEMBER is false, MEMBER should be set to false on write, and ignored on read.
For QMP, the QAPI visitors handle absent @tight by setting both @has_tight and @tight to false. unix_listen_saddr() and unix_connect_saddr() however use @tight only, disregarding @has_tight. This is wrong and means that absent @tight defaults to false whereas it should default to true.
The same is true for @has_abstract, though @abstract defaults to false and therefore has the same behavior for all of QMP, HMP and CLI. Fix unix_listen_saddr() and unix_connect_saddr() to check @has_abstract/@has_tight, and to default absent @tight to true.
However, this is only half of the story. HMP chardev-add and CLI -chardev so far correctly defaulted @tight to true, but defaults to false again with the above fix for HMP and CLI. In fact, the "tight" and "abstract" options now break completely.
Digging deeper, we find that qemu_chr_parse_socket() also ignores @has_tight, leaving it false when it sets @tight. That is also wrong, but the two wrongs cancelled out. Fix qemu_chr_parse_socket() to set @has_tight and @has_abstract; writing testcases for HMP and CLI is left for another day.
Fixes: 776b97d3605ed0fc94443048fdf988c7725e38a9 Reported-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
5e6464f9 |
| 31-Oct-2020 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/berrange-gitlab/tags/misc-next-pull-request' into staging
Misc fixes
* Improve socket cnnection failure error reporting * Fix LGPL version number
# gpg: Sig
Merge remote-tracking branch 'remotes/berrange-gitlab/tags/misc-next-pull-request' into staging
Misc fixes
* Improve socket cnnection failure error reporting * Fix LGPL version number
# gpg: Signature made Thu 29 Oct 2020 10:00:47 GMT # gpg: using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full] # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" [full] # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF
* remotes/berrange-gitlab/tags/misc-next-pull-request: util: include the target address in socket connect failures io: Don't use '#' flag of printf format authz: Fix Lesser GPL version number crypt: Fix Lesser GPL version number io: Fix Lesser GPL version number
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
dfc00eb7 |
| 18-Sep-2020 |
Daniel P. Berrangé <berrange@redhat.com> |
util: include the target address in socket connect failures
Reporting "Failed to connect socket" is essentially useless for a user attempting to diagnose failure. It needs to include the target addr
util: include the target address in socket connect failures
Reporting "Failed to connect socket" is essentially useless for a user attempting to diagnose failure. It needs to include the target address details. Similarly when failing to create a socket we should include the socket family info, so the user understands what particular feature was missing in their kernel build (IPv6, VSock in particular).
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
b7092cda |
| 09-Oct-2020 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2020-10-09' into staging
Monitor patches for 2020-10-09
# gpg: Signature made Fri 09 Oct 2020 06:16:51 BST # gpg: using
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2020-10-09' into staging
Monitor patches for 2020-10-09
# gpg: Signature made Fri 09 Oct 2020 06:16:51 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-monitor-2020-10-09: block: Convert 'block_resize' to coroutine block: Add bdrv_lock()/unlock() block: Add bdrv_co_enter()/leave() util/async: Add aio_co_reschedule_self() hmp: Add support for coroutine command handlers qmp: Move dispatcher to a coroutine qapi: Add a 'coroutine' flag for commands monitor: Make current monitor a per-coroutine property qmp: Call monitor_set_cur() only in qmp_dispatch() qmp: Assert that no other monitor is active hmp: Update current monitor only in handle_hmp_command() monitor: Use getter/setter functions for cur_mon monitor: Add Monitor parameter to monitor_get_cpu_index() monitor: Add Monitor parameter to monitor_set_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
947e4744 |
| 05-Oct-2020 |
Kevin Wolf <kwolf@redhat.com> |
monitor: Use getter/setter functions for cur_mon
cur_mon really needs to be coroutine-local as soon as we move monitor command handlers to coroutines and let them yield. As a first step, just remove
monitor: Use getter/setter functions for cur_mon
cur_mon really needs to be coroutine-local as soon as we move monitor command handlers to coroutines and let them yield. As a first step, just remove all direct accesses to cur_mon so that we can implement this in the getter function later.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-4-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
8c1c0792 |
| 24-Sep-2020 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
This includes the atomic_ -> qatomic_ rename that touches many files and is prone to conflicts.
#
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
This includes the atomic_ -> qatomic_ rename that touches many files and is prone to conflicts.
# gpg: Signature made Wed 23 Sep 2020 17:08:43 BST # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request: qemu/atomic.h: rename atomic_ to qatomic_ tests: add test-fdmon-epoll fdmon-poll: reset npfd when upgrading to fdmon-epoll gitmodules: add qemu.org vbootrom submodule gitmodules: switch to qemu.org meson mirror gitmodules: switch to qemu.org qboot mirror docs/system: clarify deprecation schedule virtio-crypto: don't modify elem->in/out_sg virtio-blk: undo destructive iov_discard_*() operations util/iov: add iov_discard_undo() virtio: add vhost-user-fs-ccw device libvhost-user: handle endianness as mandated by the spec MAINTAINERS: add Stefan Hajnoczi as block/nvme.c maintainer
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|