-
Notifications
You must be signed in to change notification settings - Fork 592
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: make memfd_open() skip fd attributes not needed for vma mapping #2244
Conversation
5971864
to
4d15648
Compare
The inhfd tests have been broken.
|
Ah, it seems they are not run by the default zdtm.py invocation. I'll take a look tomorrow. |
It looks like a test bug. Before, we didn't restore file positions for inherited descriptors. In case of memfd, it doesn't look like a right behavior. I think this pr fixes this problem but we need to adjust the test too. I think the following patch should work:
|
765a0ea
to
0a14072
Compare
lgtm |
pls fix DCO. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## criu-dev #2244 +/- ##
============================================
- Coverage 70.62% 70.61% -0.01%
============================================
Files 133 133
Lines 33322 33315 -7
============================================
- Hits 23532 23525 -7
Misses 9790 9790
☔ View full report in Codecov by Sentry. |
I'm lost as to what it expects from me:
|
|
There is only one user of memfd_open() outside of memfd.c: open_filemap(). It is restoring a file-backed mapping and doesn't need nor expect to update F_SETOWN nor the fd's position. Check the inherited_fd() handling in the callers to simplify the code. Signed-off-by: Michał Mirosław <[email protected]>
Ok, it was a non-breaking space in my |
There is only one user of memfd_open() outside of memfd.c: open_filemap(). It is restoring a file-backed mapping and doesn't need to F_SETOWN nor update the fd's position.
An optimization / cleanup.