[CRIU] [PATCH 1/4] syscall: add memfd_create()
Pavel Emelyanov
xemul at parallels.com
Mon Oct 13 23:50:16 PDT 2014
Would you also
> @@ -232,6 +233,8 @@ int kerndat_init(void)
> if (!ret)
> ret = get_last_cap();
>
> + kerndat_has_memfd_create();
Fail the kerndat_init() in case sys_memfd_create
reported some "real" error?
> +
> return ret;
> }
>
> @@ -251,3 +254,18 @@ int kerndat_init_rst(void)
>
> return ret;
> }
> +
> +bool kerndat_has_memfd_create(void)
> +{
> + static int supported = -1;
Follow the kerndat style that "features" are described
just by global boolean variables. I have plans to collect
all this stuff into a structure.
> + int ret;
> +
> + if (supported != -1)
> + return !!supported;
> +
> + ret = sys_memfd_create(NULL, 0);
> + supported = (ret != -ENOSYS);
> +
> + return !!supported;
> +}
> +
>
More information about the CRIU
mailing list