Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Freax13
Copy link

@Freax13 Freax13 commented Oct 31, 2024

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.

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.

Signed-off-by: Tom Dohrmann <[email protected]>
Signed-off-by: Tom Dohrmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant