confidential-containers / td-shim

Confidential Containers Shim Firmware
Other
97 stars 53 forks source link

tdx-tdcall: Errors scans by MIRAI #541

Closed liuw1 closed 1 year ago

liuw1 commented 1 year ago
Checking tdx-tdcall v0.1.0 (/home/liuwei/td-shim/tdx-tdcall) error[E0507]: cannot move out of self.report_mac which is behind a shared reference --> tdx-tdcall/src/tdreport.rs:158:5 156 #[derive(Debug, Pread, Pwrite)] ----- in this derive macro expansion 157 pub struct TdxReport { 158 pub report_mac: ReportMac, ^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because self.report_mac has type tdreport::ReportMac, which does not implement the Copy trait
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0507]: cannot move out of self.tee_tcb_info which is behind a shared reference --> tdx-tdcall/src/tdreport.rs:159:5 156 #[derive(Debug, Pread, Pwrite)] ----- in this derive macro expansion ... 159 pub tee_tcb_info: TeeTcbInfo, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because self.tee_tcb_info has type tdreport::TeeTcbInfo, which does not implement the Copy trait
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0507]: cannot move out of self.td_info which is behind a shared reference --> tdx-tdcall/src/tdreport.rs:161:5 156 #[derive(Debug, Pread, Pwrite)] ----- in this derive macro expansion ... 161 pub td_info: TdInfo, ^^^^^^^^^^^^^^^^^^^ move occurs because self.td_info has type tdreport::TdInfo, which does not implement the Copy trait
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)