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

memfd_secret: add memfd-secret file support #2247

Open
wants to merge 5 commits into
base: criu-dev
Choose a base branch
from

Conversation

warusadura
Copy link
Member

@warusadura warusadura commented Aug 17, 2023

Fixes: #2188

criu/memfd-secret.c Fixed Show fixed Hide fixed
criu/secretmem.c Fixed Show fixed Hide fixed
images/vma.proto Outdated Show resolved Hide resolved
criu/kerndat.c Outdated Show resolved Hide resolved
criu/include/magic.h Outdated Show resolved Hide resolved
criu/include/memfd-secret.h Outdated Show resolved Hide resolved
criu/kerndat.c Outdated Show resolved Hide resolved
criu/include/memfd-secret.h Outdated Show resolved Hide resolved
criu/kerndat.c Outdated Show resolved Hide resolved
criu/kerndat.c Show resolved Hide resolved
criu/kerndat.c Show resolved Hide resolved
criu/memfd-secret.c Outdated Show resolved Hide resolved
criu/proc_parse.c Outdated Show resolved Hide resolved
criu/secretmem.c Outdated Show resolved Hide resolved
@warusadura warusadura force-pushed the memfd-secret branch 4 times, most recently from 8c259b7 to f73cefa Compare August 28, 2023 11:04
@Snorch
Copy link
Member

Snorch commented Aug 28, 2023

Patch naming is not confirming to our usual style of patches to zdtm:
memfd_secret: add test for memfd_secret should be zdtm: add test for memfd_secret

@warusadura warusadura force-pushed the memfd-secret branch 4 times, most recently from 2e8fba6 to 3123230 Compare August 31, 2023 12:29
@warusadura warusadura force-pushed the memfd-secret branch 3 times, most recently from 58938e1 to d98451b Compare September 5, 2023 08:47
@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2023

Codecov Report

Attention: 142 lines in your changes are missing coverage. Please review.

Comparison is base (561f845) 70.85% compared to head (382a7b4) 70.22%.

❗ Current head 382a7b4 differs from pull request most recent head b20cf07. Consider uploading reports for the commit b20cf07 to get more accurate results

Files Patch % Lines
criu/memfd-secret.c 2.02% 97 Missing ⚠️
criu/kerndat.c 20.51% 31 Missing ⚠️
criu/proc_parse.c 14.28% 6 Missing ⚠️
criu/page-xfer.c 44.44% 5 Missing ⚠️
criu/files.c 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           criu-dev    #2247      +/-   ##
============================================
- Coverage     70.85%   70.22%   -0.63%     
============================================
  Files           133      134       +1     
  Lines         32734    33683     +949     
============================================
+ Hits          23193    23655     +462     
- Misses         9541    10028     +487     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rppt rppt left a comment

Choose a reason for hiding this comment

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

Overall LGTM, there a few nits here and there

criu/kerndat.c Show resolved Hide resolved
criu/memfd-secret.c Show resolved Hide resolved
criu/memfd-secret.c Show resolved Hide resolved
images/memfd-secret.proto Outdated Show resolved Hide resolved
test/zdtm/static/memfd-secret00.c Outdated Show resolved Hide resolved
test/zdtm/static/memfd-secret00.desc Show resolved Hide resolved
test/zdtm/static/memfd-secret00.c Outdated Show resolved Hide resolved
@warusadura warusadura force-pushed the memfd-secret branch 7 times, most recently from f1c308b to ae06b26 Compare October 9, 2023 05:58
criu/kerndat.c Outdated Show resolved Hide resolved
Copy link

A friendly reminder that this PR had no activity for 30 days.

Adds protobuf definitions needed to checkpoint and restore
memfd_secret fd.

Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
Adds support to save secretmem page stats when C/R a memfd_secret
fd containing process.

Updates images/stats.proto to add statistics about C/R
memfd_secret fd.

Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
See "man 2 memfd_secret".

Fixes: checkpoint-restore#2188

Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
These changes update `check_pages_counts()` to support
`secmempages_written` stat.

Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
Adds a zdtm test to test checkpoint/restore a memfd_secret fd
containing process.

Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
@github-actions github-actions bot removed the stale-pr label Dec 17, 2023
@avagin avagin added the no-auto-close Don't auto-close as a stale issue label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-auto-close Don't auto-close as a stale issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRIU can't dump memfd_secret fd containing process
7 participants