Skip to contentSkip to conversation

crypto: only include tls-cipher-suites in emulators

PATCH In review Paolo Bonzini 3 participants 3 messages Sep 28, 2023 – Oct 2, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: only include tls-cipher-suites in emulators

tls-cipher-suites is an object that is used to inject TLS configuration into the guest (via fw_cfg). It is never used for host-side TLS operation, and therefore it need not be available in the tools.

---
 crypto/meson.build   | 3 ++-
 hw/nvram/meson.build | 6 +-----
 2 files changed, 3 insertions(+), 6 deletions(-)
crypto/meson.build +2 -1
index 9ac1a898027..c46f9c22a7f 100644
@@ -46,7 +46,8 @@ endif
 if have_afalg
   crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
 endif
-crypto_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
+
+system_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
 
 util_ss.add(files(
   'aes.c',
hw/nvram/meson.build +1 -5
index 988dff6f8e5..75e415b1a01 100644
@@ -1,8 +1,4 @@
-if have_system or have_tools
-  # QOM interfaces must be available anytime QOM is used.
-  qom_ss.add(files('fw_cfg-interface.c'))
-endif
-
+system_ss.add(files('fw_cfg-interface.c'))
 system_ss.add(files('fw_cfg.c'))
 system_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c'))
 system_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Paolo Bonzini

tls-cipher-suites is an object that is used to inject TLS configuration into the guest (via fw_cfg). It is never used for host-side TLS operation, and therefore it need not be available in the tools.

---
 crypto/meson.build   | 3 ++-
 hw/nvram/meson.build | 6 +-----
 2 files changed, 3 insertions(+), 6 deletions(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 29 lines · Paolo Bonzini

tls-cipher-suites is an object that is used to inject TLS configuration into the guest (via fw_cfg). It is never used for host-side TLS operation, and therefore it need not be available in the tools.

---
  crypto/meson.build   | 3 ++-
  hw/nvram/meson.build | 6 +-----
  2 files changed, 3 insertions(+), 6 deletions(-)
crypto/meson.build +2 -1
index 9ac1a898027..c46f9c22a7f 100644
@@ -46,7 +46,8 @@ endif
  if have_afalg
    crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
  endif
-crypto_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
+
+system_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
 
  util_ss.add(files(
    'aes.c',
hw/nvram/meson.build +0 -0
index 988dff6f8e5..75e415b1a01 100644

hw/nvram/meson.build line 1

Quoted 6 lines
hw/nvram/meson.build +1 -5
@@ -1,8 +1,4 @@
-if have_system or have_tools
-  # QOM interfaces must be available anytime QOM is used.
-  qom_ss.add(files('fw_cfg-interface.c'))
-endif
-
+system_ss.add(files('fw_cfg-interface.c'))

Thanks, Richard mentioned it and I had it tagged as TODO, but forgot about it...
https://lore.kernel.org/qemu-devel/[email protected]/

FTR the original issue was:
https://lore.kernel.org/qemu-devel/[email protected]/

$ qemu-storage-daemon --object help
List of user creatable objects:
qemu-storage-daemon: missing interface 'fw_cfg-data-generator' for object 'tls-creds'
Aborted (core dumped)