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

CDH | Fix ttrpc memory bug and gRPC lock bug #727

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

Xynnn007
Copy link
Member

@Xynnn007 Xynnn007 commented Sep 27, 2024

Please see the commit message for details.

Fixes #688

@mythi
Copy link
Contributor

mythi commented Oct 2, 2024

this PR could also undo/revert e3c3fef, right?

@Xynnn007
Copy link
Member Author

Xynnn007 commented Oct 3, 2024

this PR could also undo/revert e3c3fef, right?

right. Added the commit

Fixes confidential-containers#688

This commit will copy only the pointer of CDH to implement different
APIs. In old version, each CDH instance will serve for one API, thus
occupies multiple times of memory.

Signed-off-by: Xynnn007 <[email protected]>
The pull_image API of CDH is marked as Fn not FnMut thus we do not need
a RwLock to protect the synchronization. Also, fixes a bug that CDH does
not support image pull gRPC.

Signed-off-by: Xynnn007 <[email protected]>
Upstream ttrpc crate has fixed the usage of boxed pointers. Thus we do
not need to declare explicitly the lint error ignorance.

Signed-off-by: Xynnn007 <[email protected]>
@Xynnn007 Xynnn007 marked this pull request as ready for review October 8, 2024 05:46
@Xynnn007 Xynnn007 requested a review from a team as a code owner October 8, 2024 05:46
This commit adds a Makefile option `lint` for attestation-agent to test
the lint of all sub projects of AA. Before this patch, some ttrpc codes
are not covered by CI.

Signed-off-by: Xynnn007 <[email protected]>
Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Xynnn007
Copy link
Member Author

Xynnn007 commented Oct 9, 2024

Hey @mythi Could you help to get another look?

Copy link
Member

@ChengyuZhu6 ChengyuZhu6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @Xynnn007

Copy link
Contributor

@mythi mythi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I wonder if rebasing is needed to get a clean merge (OTOH, github does not complain about merge conflicts so I guess it's good)

@Xynnn007 Xynnn007 merged commit 2322b0f into confidential-containers:main Oct 17, 2024
20 checks passed
@Xynnn007 Xynnn007 deleted the fix-cdh-memory branch October 18, 2024 02:20
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.

CDH | Multiple CDH instances in ttrpc CDH process
4 participants