[Pkg-libvirt-commits] [Git][libvirt-team/libvirt][debian/latest] 2 commits: patches: Add backport/qemu-tpm-do-not-update-[...]

Andrea Bolognani (@abologna) gitlab at salsa.debian.org
Fri Dec 13 22:35:48 GMT 2024



Andrea Bolognani pushed to branch debian/latest at Libvirt Packaging Team / libvirt


Commits:
117e0dae by Andrea Bolognani at 2024-12-13T22:27:15+01:00
patches: Add backport/qemu-tpm-do-not-update-[...]

Closes: #1089616

- - - - -
45d2efea by Andrea Bolognani at 2024-12-13T22:29:36+01:00
Document changes and release 10.10.0-3

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/backport/qemu-tpm-do-not-update-profile-name-for-transient-domains.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+libvirt (10.10.0-3) unstable; urgency=medium
+
+  [ Heinrich Schuchardt ]
+  * [7e373ad] virt-aa-helper: allow riscv64 EDK II
+
+  [ Andrea Bolognani ]
+  * [117e0da] patches: Add backport/qemu-tpm-do-not-update-[...]
+    - Fixes daemon crash when transient domains with TPM are defined
+    - Closes: #1089616
+
+ -- Andrea Bolognani <eof at kiyuko.org>  Fri, 13 Dec 2024 22:27:38 +0100
+
 libvirt (10.10.0-2) experimental; urgency=medium
 
   [ Carles Pina i Estany ]


=====================================
debian/patches/backport/qemu-tpm-do-not-update-profile-name-for-transient-domains.patch
=====================================
@@ -0,0 +1,70 @@
+From: =?utf-8?q?J=C3=A1n_Tomko?= <jtomko at redhat.com>
+Date: Tue, 3 Dec 2024 12:00:08 +0100
+Subject: qemu: tpm: do not update profile name for transient domains
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+If we do not have a persistent definition, there's no point in
+looking for it since we cannot store it.
+
+Also skip the update if the tpm device(s) in the persistent
+definition are different.
+
+This fixes the crash when starting a transient domain.
+
+https://issues.redhat.com/browse/RHEL-69774
+https://gitlab.com/libvirt/libvirt/-/issues/715
+
+Fixes: d79542eec669eb9c449bb8228179e7a87e768017
+Signed-off-by: Ján Tomko <jtomko at redhat.com>
+Reviewed-by: Jiri Denemark <jdenemar at redhat.com>
+Reviewed-by: Stefan Berger <stefanb at linux.ibm.com>
+(cherry picked from commit 81da7a2c2a2d490cddaaa77d3e3b36e210b38bd7)
+
+Bug-Debian: https://bugs.debian.org/1089616
+
+Forwarded: not-needed
+Origin: https://gitlab.com/libvirt/libvirt/-/commit/81da7a2c2a2d490cddaaa77d3e3b36e210b38bd7
+---
+ src/qemu/qemu_extdevice.c | 13 ++++++++++++-
+ src/qemu/qemu_tpm.c       |  2 +-
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c
+index a6f31f9..954cb32 100644
+--- a/src/qemu/qemu_extdevice.c
++++ b/src/qemu/qemu_extdevice.c
+@@ -190,7 +190,18 @@ qemuExtDevicesStart(virQEMUDriver *driver,
+ 
+     for (i = 0; i < def->ntpms; i++) {
+         virDomainTPMDef *tpm = def->tpms[i];
+-        virDomainTPMDef *persistentTPMDef = persistentDef->tpms[i];
++        virDomainTPMDef *persistentTPMDef = NULL;
++
++        if (persistentDef) {
++            /* do not try to update the profile in the persistent definition
++             * if the device does not match */
++            if (persistentDef->ntpms == def->ntpms)
++                persistentTPMDef = persistentDef->tpms[i];
++            if (persistentTPMDef &&
++                (persistentTPMDef->type != tpm->type ||
++                 persistentTPMDef->model != tpm->model))
++                persistentTPMDef = NULL;
++        }
+ 
+         if (tpm->type == VIR_DOMAIN_TPM_TYPE_EMULATOR &&
+             qemuExtTPMStart(driver, vm, tpm, persistentTPMDef,
+diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
+index f223dcb..f5e0184 100644
+--- a/src/qemu/qemu_tpm.c
++++ b/src/qemu/qemu_tpm.c
+@@ -773,7 +773,7 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm,
+                                 incomingMigration) < 0)
+         goto error;
+ 
+-    if (run_setup && !incomingMigration &&
++    if (run_setup && !incomingMigration && persistentTPMDef &&
+         qemuTPMEmulatorUpdateProfileName(&tpm->data.emulator, persistentTPMDef,
+                                          cfg, saveDef) < 0)
+         goto error;


=====================================
debian/patches/series
=====================================
@@ -1,4 +1,5 @@
 backport/virt-aa-helper-allow-riscv64-EDK-II.patch
+backport/qemu-tpm-do-not-update-profile-name-for-transient-domains.patch
 debian/Debianize-libvirt-guests.patch
 debian/apparmor_profiles_local_include.patch
 debian/Use-sensible-editor-by-default.patch



View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt/-/compare/7e373ad80d2f827be99cb498c2fb6ba736b4202b...45d2efea0ba7592e5111ee21f8dcc8273c935d7f

-- 
View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt/-/compare/7e373ad80d2f827be99cb498c2fb6ba736b4202b...45d2efea0ba7592e5111ee21f8dcc8273c935d7f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-commits/attachments/20241213/d0381586/attachment-0001.htm>


More information about the Pkg-libvirt-commits mailing list