[CRIU] [PATCH 5/6] kdat: Check for KCMP_EPOLL_TFD

Dmitry Safonov 0x7f454c46 at gmail.com
Tue Apr 3 21:01:36 MSK 2018


Hi Cyrill,

Thanks for splitting this and adding kdat feature first,

2018-04-03 18:46 GMT+01:00 Cyrill Gorcunov <gorcunov at gmail.com>:
[..]
> +
> +       ret = syscall(SYS_kcmp, getpid(), getpid(),
> +                     KCMP_EPOLL_TFD, pipefd[1], (void *)&epoll_slot);
> +       if (ret == 0)
> +               kdat.has_kcmp_epoll_tfd = true;
> +
> +out:
> +       close(pipefd[0]);
> +       close(pipefd[1]);
> +       close(epollfd);
> +       return ret;

Does that mean that if kcmp() with KCMP_EPOLL_TFD fails
(no support for the feature), than kerndat_has_kcmp_epoll_tfd() will return
error - which will lead to stopping generating kdat and aborting, rather than
proceeding with kdat.has_kcmp_epoll_tfd = false?

> +}
> +
>  int __attribute__((weak)) kdat_x86_has_ptrace_fpu_xsave_bug(void)
>  {
>         return 0;
> @@ -1124,6 +1184,8 @@ int kerndat_init(void)
>                 ret = kerndat_x86_has_ptrace_fpu_xsave_bug();
>         if (!ret)
>                 ret = kerndat_has_inotify_setnextwd();
> +       if (!ret)
> +               ret = kerndat_has_kcmp_epoll_tfd();
>
>         kerndat_lsm();
>         kerndat_mmap_min_addr();

-- 
             Dmitry


More information about the CRIU mailing list