[PATCH] hw/vfio-user: use a valid object ID for iothread

Daniel P. Berrangé posted 1 patch 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260520082459.1132051-2-berrange@redhat.com
Maintainers: John Levon <john.levon@nutanix.com>, Thanos Makatos <thanos.makatos@nutanix.com>, "Cédric Le Goater" <clg@redhat.com>
hw/vfio-user/proxy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] hw/vfio-user: use a valid object ID for iothread
Posted by Daniel P. Berrangé 1 week, 3 days ago
The objectg_new_with_propv/props methods failed to validate that the
QOM "id" was well formed. This allowed the vfio-user code to use an
invalid ID of "VFIO user" (space is not permitted) in its internal
code.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/vfio-user/proxy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c
index 314dfd23d8..3d0d72e8b7 100644
--- a/hw/vfio-user/proxy.c
+++ b/hw/vfio-user/proxy.c
@@ -933,7 +933,7 @@ VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp)
     qemu_cond_init(&proxy->close_cv);
 
     if (vfio_user_iothread == NULL) {
-        vfio_user_iothread = iothread_create("VFIO user", errp);
+        vfio_user_iothread = iothread_create("vfio-user", errp);
     }
 
     proxy->ctx = iothread_get_aio_context(vfio_user_iothread);
-- 
2.54.0


Re: [PATCH] hw/vfio-user: use a valid object ID for iothread
Posted by John Levon 4 days, 8 hours ago
On Wed, May 20, 2026 at 09:25:00AM +0100, Daniel P. Berrangé wrote:

> The objectg_new_with_propv/props methods failed to validate that the
> QOM "id" was well formed. This allowed the vfio-user code to use an
> invalid ID of "VFIO user" (space is not permitted) in its internal
> code.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  hw/vfio-user/proxy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c
> index 314dfd23d8..3d0d72e8b7 100644
> --- a/hw/vfio-user/proxy.c
> +++ b/hw/vfio-user/proxy.c
> @@ -933,7 +933,7 @@ VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp)
>      qemu_cond_init(&proxy->close_cv);
>  
>      if (vfio_user_iothread == NULL) {
> -        vfio_user_iothread = iothread_create("VFIO user", errp);
> +        vfio_user_iothread = iothread_create("vfio-user", errp);
>      }
>  
>      proxy->ctx = iothread_get_aio_context(vfio_user_iothread);

Reviewed-by: John Levon <john.levon@nutanix.com>
Re: [PATCH] hw/vfio-user: use a valid object ID for iothread
Posted by Mark Cave-Ayland 1 week, 3 days ago
On 20/05/2026 09:25, Daniel P. Berrangé wrote:

> The objectg_new_with_propv/props methods failed to validate that the
> QOM "id" was well formed. This allowed the vfio-user code to use an
> invalid ID of "VFIO user" (space is not permitted) in its internal
> code.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   hw/vfio-user/proxy.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c
> index 314dfd23d8..3d0d72e8b7 100644
> --- a/hw/vfio-user/proxy.c
> +++ b/hw/vfio-user/proxy.c
> @@ -933,7 +933,7 @@ VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp)
>       qemu_cond_init(&proxy->close_cv);
>   
>       if (vfio_user_iothread == NULL) {
> -        vfio_user_iothread = iothread_create("VFIO user", errp);
> +        vfio_user_iothread = iothread_create("vfio-user", errp);
>       }
>   
>       proxy->ctx = iothread_get_aio_context(vfio_user_iothread);

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>


ATB,

Mark.


Re: [PATCH] hw/vfio-user: use a valid object ID for iothread
Posted by Cédric Le Goater 1 week, 3 days ago
On 5/20/26 10:25, Daniel P. Berrangé wrote:
> The objectg_new_with_propv/props methods failed to validate that the
> QOM "id" was well formed. This allowed the vfio-user code to use an
> invalid ID of "VFIO user" (space is not permitted) in its internal
> code.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   hw/vfio-user/proxy.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c
> index 314dfd23d8..3d0d72e8b7 100644
> --- a/hw/vfio-user/proxy.c
> +++ b/hw/vfio-user/proxy.c
> @@ -933,7 +933,7 @@ VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp)
>       qemu_cond_init(&proxy->close_cv);
>   
>       if (vfio_user_iothread == NULL) {
> -        vfio_user_iothread = iothread_create("VFIO user", errp);
> +        vfio_user_iothread = iothread_create("vfio-user", errp);
>       }
>   
>       proxy->ctx = iothread_get_aio_context(vfio_user_iothread);

Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.