public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
	"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server 2/3] swtpm: check that format of tpmstate volume is raw
Date: Thu, 12 Dec 2024 10:11:36 +0100	[thread overview]
Message-ID: <43c56783-dde0-4e62-b01a-f52180245e4d@proxmox.com> (raw)
In-Reply-To: <20241212085149.138679-3-f.gruenbichler@proxmox.com>

Am 12.12.24 um 09:51 schrieb Fabian Grünbichler:
> since swtpm currently doesn't support anything else, and might overwrite a file
> using qcow2 or vmdk format by accident..
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

Except the nit below

Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>

> ---
>  PVE/QemuServer.pm | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 8192599a..fe7984eb 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -3212,6 +3212,8 @@ sub start_swtpm {
>      my $tpm = parse_drive("tpmstate0", $tpmdrive);
>      my ($storeid, $volname) = PVE::Storage::parse_volume_id($tpm->{file}, 1);
>      if ($storeid) {
> +	my $format = checked_volume_format($storecfg, $tpm->{file});
> +	die "swtpm currently only supports 'raw' state volumes" if $format ne 'raw';

Missing newline after error message.

Can we add a format check in create_disks() when creating/adding the
volume as tpmstate0 too, please :)?

>  	$state = PVE::Storage::map_volume($storecfg, $tpm->{file});
>      } else {
>  	$state = $tpm->{file};



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

  reply	other threads:[~2024-12-12  9:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12  8:51 [pve-devel] [PATCH qemu-server 0/3] fix tpmstate format issues Fabian Grünbichler
2024-12-12  8:51 ` [pve-devel] [PATCH qemu-server 1/3] api: clone: always do a full clone of tpmstate volumes Fabian Grünbichler
2024-12-12  9:11   ` Fiona Ebner
2024-12-12  8:51 ` [pve-devel] [PATCH qemu-server 2/3] swtpm: check that format of tpmstate volume is raw Fabian Grünbichler
2024-12-12  9:11   ` Fiona Ebner [this message]
2024-12-12  9:13     ` Fiona Ebner
2024-12-12  8:51 ` [pve-devel] [PATCH qemu-server 3/3] swtpm: drop unused $volname variable Fabian Grünbichler
2024-12-12  9:11   ` Fiona Ebner
2024-12-12  9:48 ` [pve-devel] applied-series: [PATCH qemu-server 0/3] fix tpmstate format issues Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43c56783-dde0-4e62-b01a-f52180245e4d@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal