From 5bf80e3ae4fa69da19b0df5e4d342a012bb7adce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 10:22:11 +0000 Subject: [PATCH 1/2] build(deps): update zerocopy requirement in /az-cvm-vtpm Updates the requirements on [zerocopy](https://github.com/google/zerocopy) to permit the latest version. - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](https://github.com/google/zerocopy/compare/v0.7.26...v0.7.35) --- updated-dependencies: - dependency-name: zerocopy dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- az-cvm-vtpm/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/az-cvm-vtpm/Cargo.toml b/az-cvm-vtpm/Cargo.toml index 47f99c7..313f1eb 100644 --- a/az-cvm-vtpm/Cargo.toml +++ b/az-cvm-vtpm/Cargo.toml @@ -47,5 +47,5 @@ serde_json = "1.0.107" thiserror = "2.0.3" sev = "6.2.1" ureq = { version = "2.6.2", default-features = false, features = ["json"] } -zerocopy = { version = "0.7.26", features = ["derive"] } +zerocopy = { version = "0.8.26", features = ["derive"] } hex = "0.4" From a87789403bfa643e1f5ab3040334d242cfa49759 Mon Sep 17 00:00:00 2001 From: Magnus Kulke Date: Wed, 30 Jul 2025 12:31:44 +0200 Subject: [PATCH 2/2] chore: update derives for zerocopy 0.8 Signed-off-by: Magnus Kulke --- az-cvm-vtpm/az-tdx-vtpm/src/imds.rs | 2 +- az-cvm-vtpm/src/tdx/mod.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/az-cvm-vtpm/az-tdx-vtpm/src/imds.rs b/az-cvm-vtpm/az-tdx-vtpm/src/imds.rs index f9501d4..66bf82c 100644 --- a/az-cvm-vtpm/az-tdx-vtpm/src/imds.rs +++ b/az-cvm-vtpm/az-tdx-vtpm/src/imds.rs @@ -4,7 +4,7 @@ use az_cvm_vtpm::tdx::TdReport; use serde::Deserialize; use thiserror::Error; -use zerocopy::AsBytes; +use zerocopy::IntoBytes; const IMDS_QUOTE_URL: &str = "http://169.254.169.254/acc/tdquote"; diff --git a/az-cvm-vtpm/src/tdx/mod.rs b/az-cvm-vtpm/src/tdx/mod.rs index 097f8a3..d1e0111 100644 --- a/az-cvm-vtpm/src/tdx/mod.rs +++ b/az-cvm-vtpm/src/tdx/mod.rs @@ -6,10 +6,10 @@ use serde::{Deserialize, Serialize}; use serde_big_array::BigArray; -use zerocopy::AsBytes; +use zerocopy::{Immutable, IntoBytes}; #[repr(C)] -#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct ReportType { pub r#type: u8, pub subtype: u8, @@ -18,7 +18,7 @@ pub struct ReportType { } #[repr(C)] -#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct ReportMac { pub reporttype: ReportType, pub _reserved_1: [u8; 12], @@ -34,14 +34,14 @@ pub struct ReportMac { } #[repr(C)] -#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct Rtmr { #[serde(with = "BigArray")] pub register_data: [u8; 48], } #[repr(C)] -#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct TdInfo { pub attributes: [u8; 8], pub xfam: [u8; 8], @@ -59,7 +59,7 @@ pub struct TdInfo { } #[repr(C)] -#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct TdReport { pub report_mac: ReportMac, #[serde(with = "BigArray")]