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

kdat: make kerndat_uffd differentiate -EPERM and -1 from uffd_open #1493

Merged

Conversation

Snorch
Copy link
Member

@Snorch Snorch commented May 31, 2021

Else "Failed to get uffd API" and "Incompatible uffd API ..." errors are
just ignored, which is probably not what we want.

Fixes: cfdeac4 ("kerndat: Handle non-root mode when checking uffd")
Signed-off-by: Pavel Tikhomirov [email protected]

@Snorch
Copy link
Member Author

Snorch commented May 31, 2021

Note: I'm not sure this is a best way to fix it, probable se should just add "int *err" argument to uffd_open to return errno... Please feel free to give an advice.

criu/kerndat.c Outdated Show resolved Hide resolved
criu/kerndat.c Outdated Show resolved Hide resolved
Previousely kerndat_uffd could not differentiate -EPERM and -1 returned
from uffd_open(). That way "Failed to get uffd API" and "Incompatible
uffd API ..." errors were just ignored, which is probably not what we
want.

v2: rework with extra argument of uffd_open for errno, rename err
label in uffd_open for readability

Fixes: cfdeac4 ("kerndat: Handle non-root mode when checking uffd")
Signed-off-by: Pavel Tikhomirov <[email protected]>
@Snorch Snorch force-pushed the kdat-fix-usage-of-uffd_open branch from 22a2c4a to 960fe12 Compare June 2, 2021 07:10
@Snorch Snorch requested review from xemul and rppt June 7, 2021 07:48
@avagin avagin merged commit 1407614 into checkpoint-restore:criu-dev Jun 15, 2021
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.

4 participants