diff --git a/kernel/src/protocols/vtpm.rs b/kernel/src/protocols/vtpm.rs index 66333cfb9..05dd80435 100644 --- a/kernel/src/protocols/vtpm.rs +++ b/kernel/src/protocols/vtpm.rs @@ -239,6 +239,7 @@ fn vtpm_command_request(params: &RequestParams) -> Result<(), SvsmReqError> { return Err(SvsmReqError::unsupported_call()); } + // SAFETY: vaddr is just mapped, and its size is PAGE_SIZE let buffer = unsafe { from_raw_parts_mut(vaddr.as_mut_ptr::(), PAGE_SIZE) }; let response_size = match cmd {