checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.86k stars 576 forks source link

Preserve memfd exec()ability #2231

Closed osctobe closed 1 year ago

osctobe commented 1 year ago

We have a user (Sandbox2) which creates a memfd, writes some binary there and then calls execveat(fd, ... AT_EMPTY_PATH). Currently, if CRIU catches the process between memfd_create() and execveat(), then after restore the latter call will fail with ETXTBUSY, as fd points not to the original memfd, but a reopened /proc/*/fd.

Snorch commented 1 year ago

Obviousely you need to (same to all other your PRs):

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 87.50% and project coverage change: +0.04% :tada:

Comparison is base (6d0e785) 70.64% compared to head (bfcf798) 70.69%.

:exclamation: Current head bfcf798 differs from pull request most recent head 46cb225. Consider uploading reports for the commit 46cb225 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## criu-dev #2231 +/- ## ============================================ + Coverage 70.64% 70.69% +0.04% ============================================ Files 133 133 Lines 33318 33327 +9 ============================================ + Hits 23539 23559 +20 + Misses 9779 9768 -11 ``` | [Files Changed](https://app.codecov.io/gh/checkpoint-restore/criu/pull/2231?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=checkpoint-restore) | Coverage Δ | | |---|---|---| | [criu/memfd.c](https://app.codecov.io/gh/checkpoint-restore/criu/pull/2231?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=checkpoint-restore#diff-Y3JpdS9tZW1mZC5j) | `82.77% <87.50%> (+0.18%)` | :arrow_up: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/checkpoint-restore/criu/pull/2231/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=checkpoint-restore)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

avagin commented 1 year ago

lgtm