confidential-containers / td-shim

Confidential Containers Shim Firmware
Other
97 stars 53 forks source link

tdx-tdcall: don't use heap allocated buffers for TD reports #745

Open Freax13 opened 2 weeks ago

Freax13 commented 2 weeks ago

There's little reason to use a heap-allocated buffer for requesting TD reports putting it behind a global lock. Furthermore, the TDX module doesn't require the additional data to be inside the TD report buffer. Instead, put the buffer on the stack and directly pass a pointer to the additional data. Note that with and without this patch, the memory passed to the TDX module must be identity-mapped.