Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1583592

Re: [RFC 1/2] fs,eventpoll: Add ability to install target file by its number

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [RFC 1/2] fs,eventpoll: Add ability to install target file by its number
Date 2017-02-17 18:00 +0100
Message-ID <tbU30-6Np-9@gated-at.bofh.it> (permalink)
References <tbMf7-1Su-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 17, 2017 at 12:30 AM, Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> When we checkpoint a process we look into /proc/<pid>/fdinfo/<fd> of eventpoll
> file and parse target files list from there. In most situations this is fine
> because target file is present in the /proc/<pid>/fd/ list. But in case if file
> descriptor was dup'ed or transferred via unix socket and closed after,
> it might not be in the list and we can't figure out which file descriptor
> to pass into epoll_ctl call.
>
> To resolve this tie lets add EPOLL_CTL_DUP operation which simply takes
> target file descriptor number and installs it into a caller's file table,
> thus we can use kcmp() syscall and figure out which exactly file to be
> added into eventpoll on restore procedure.

This is a scary thing to let an unprivileged process do.

I'm wondering if there might be a nicer way to address this using a
better interface in /proc.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 1/2] fs,eventpoll: Add ability to install target file by its number Cyrill Gorcunov <gorcunov@openvz.org> - 2017-02-17 09:40 +0100
  Re: [RFC 1/2] fs,eventpoll: Add ability to install target file by its number Andy Lutomirski <luto@amacapital.net> - 2017-02-17 18:00 +0100
    Re: [RFC 1/2] fs,eventpoll: Add ability to install target file by  its number Cyrill Gorcunov <gorcunov@gmail.com> - 2017-02-17 18:20 +0100
      Re: [RFC 1/2] fs,eventpoll: Add ability to install target file by its number Andy Lutomirski <luto@amacapital.net> - 2017-02-17 18:30 +0100
        Re: [RFC 1/2] fs,eventpoll: Add ability to install target file by  its number Cyrill Gorcunov <gorcunov@gmail.com> - 2017-02-17 19:10 +0100
          Re: [RFC 1/2] fs,eventpoll: Add ability to install target file by its  number Jason Baron <jbaron@akamai.com> - 2017-02-17 19:40 +0100
            Re: [RFC 1/2] fs,eventpoll: Add ability to install target file by  its number Cyrill Gorcunov <gorcunov@gmail.com> - 2017-02-17 20:50 +0100

csiph-web