mbox series

[v6,0/3] ui/console: Private QemuDmaBuf struct

Message ID 20240417040954.55641-1-dongwon.kim@intel.com
Headers show
Series ui/console: Private QemuDmaBuf struct | expand

Message

Kim, Dongwon April 17, 2024, 4:09 a.m. UTC
From: Dongwon Kim <dongwon.kim@intel.com>

This series introduces privacy enhancements to the QemuDmaBuf struct
and its contained data to bolster security. it accomplishes this by
introducing of helper functions for allocating, deallocating, and
accessing individual fields within the struct and replacing all direct
references to individual fields in the struct with methods using helpers
throughout the codebase.

This change was made based on a suggestion from Marc-André Lureau
<marcandre.lureau@redhat.com>

(Resumitting same patch series with this new cover-leter)

v6: fixed some typos in patch - 
    ui/console: Introduce dpy_gl_qemu_dmabuf_get_..() helpers)

Dongwon Kim (3):
  ui/console: Introduce dpy_gl_qemu_dmabuf_get_..() helpers
  ui/console: Introduce dpy_gl_qemu_dmabuf_set_..() helpers
  ui/console: Introduce dpy_gl_qemu_dmabuf_new() and free() helpers

 include/hw/vfio/vfio-common.h   |   2 +-
 include/hw/virtio/virtio-gpu.h  |   4 +-
 include/ui/console.h            |  28 +++++
 hw/display/vhost-user-gpu.c     |  32 +++---
 hw/display/virtio-gpu-udmabuf.c |  27 ++---
 hw/vfio/display.c               |  35 ++++---
 ui/console.c                    | 180 +++++++++++++++++++++++++++++++-
 ui/dbus-console.c               |   9 +-
 ui/dbus-listener.c              |  71 +++++++------
 ui/egl-headless.c               |  23 ++--
 ui/egl-helpers.c                |  59 ++++++-----
 ui/gtk-egl.c                    |  52 +++++----
 ui/gtk-gl-area.c                |  41 +++++---
 ui/gtk.c                        |   8 +-
 ui/spice-display.c              |  50 +++++----
 15 files changed, 449 insertions(+), 172 deletions(-)

Comments

Daniel P. Berrangé April 17, 2024, 11:15 a.m. UTC | #1
On Tue, Apr 16, 2024 at 09:09:51PM -0700, dongwon.kim@intel.com wrote:
> From: Dongwon Kim <dongwon.kim@intel.com>
> 
> This series introduces privacy enhancements to the QemuDmaBuf struct
> and its contained data to bolster security. it accomplishes this by
> introducing of helper functions for allocating, deallocating, and
> accessing individual fields within the struct and replacing all direct
> references to individual fields in the struct with methods using helpers
> throughout the codebase.

This series feels incomplete wrt the stated goal, because
the QemuDmaBuf struct definition remains public in
console.h at the end.  Ideally only "typedef struct QemuDmaBuf"
should remain in the header, with the struct definiton private
in a .c file.  Is there something that prevents this final step
being done ?


With regards,
Daniel