mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
hypervisor: use right size of host_data
Use right and exact size 32 bytes for host data field for completing the isolated import. This way OOB can be avoided during a function call. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
parent
433d4ddc0c
commit
cbcbf635ab
@ -1814,7 +1814,7 @@ impl vm::Vm for MshvVm {
|
||||
fn complete_isolated_import(
|
||||
&self,
|
||||
snp_id_block: IGVM_VHS_SNP_ID_BLOCK,
|
||||
host_data: &[u8],
|
||||
host_data: [u8; 32],
|
||||
id_block_enabled: u8,
|
||||
) -> vm::Result<()> {
|
||||
let mut auth_info = hv_snp_id_auth_info {
|
||||
@ -1847,7 +1847,7 @@ impl vm::Vm for MshvVm {
|
||||
policy: get_default_snp_guest_policy(),
|
||||
},
|
||||
id_auth_info: auth_info,
|
||||
host_data: host_data[0..32].try_into().unwrap(),
|
||||
host_data,
|
||||
id_block_enabled,
|
||||
author_key_enabled: 0,
|
||||
},
|
||||
|
@ -385,7 +385,7 @@ pub trait Vm: Send + Sync + Any {
|
||||
fn complete_isolated_import(
|
||||
&self,
|
||||
_snp_id_block: IGVM_VHS_SNP_ID_BLOCK,
|
||||
_host_data: &[u8],
|
||||
_host_data: [u8; 32],
|
||||
_id_block_enabled: u8,
|
||||
) -> Result<()> {
|
||||
unimplemented!()
|
||||
|
Loading…
Reference in New Issue
Block a user