Re: [v4,resend,2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-09-17 Thread Eugene Syromiatnikov
On Mon, Apr 24, 2017 at 06:39:28PM +0300, Cyrill Gorcunov wrote: > With current epoll architecture target files are addressed > with file_struct and file descriptor number, where the last > is not unique. Moreover files can be transferred from another > process via unix socket, added into queue and

Re: [patch v4 resend 2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-05-13 Thread Cyrill Gorcunov
On Sat, May 13, 2017 at 09:55:14AM +0300, Cyrill Gorcunov wrote: > On Fri, May 12, 2017 at 06:45:09PM -0700, Andrei Vagin wrote: > > On Sat, May 13, 2017 at 01:53:40AM +0300, Cyrill Gorcunov wrote: > > > On Sat, May 13, 2017 at 12:41:30AM +0200, Jann Horn wrote: > > > > [resending as plaintext] > >

Re: [patch v4 resend 2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-05-12 Thread Cyrill Gorcunov
On Fri, May 12, 2017 at 06:45:09PM -0700, Andrei Vagin wrote: > On Sat, May 13, 2017 at 01:53:40AM +0300, Cyrill Gorcunov wrote: > > On Sat, May 13, 2017 at 12:41:30AM +0200, Jann Horn wrote: > > > [resending as plaintext] > > > > > > I realize that the existing kcmp code has the same issue, but:

Re: [patch v4 resend 2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-05-12 Thread Andrei Vagin
On Sat, May 13, 2017 at 01:53:40AM +0300, Cyrill Gorcunov wrote: > On Sat, May 13, 2017 at 12:41:30AM +0200, Jann Horn wrote: > > [resending as plaintext] > > > > I realize that the existing kcmp code has the same issue, but: > > > > Why are you not taking a reference to filp or filp_tgt? This ca

Re: [patch v4 resend 2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-05-12 Thread Cyrill Gorcunov
On Sat, May 13, 2017 at 12:41:30AM +0200, Jann Horn wrote: > [resending as plaintext] > > I realize that the existing kcmp code has the same issue, but: > > Why are you not taking a reference to filp or filp_tgt? This can end up > performing a comparison between a pointer to a freed struct file a

Re: [patch v4 resend 2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-05-12 Thread Jann Horn
[resending as plaintext] On Mon, Apr 24, 2017 at 5:39 PM, Cyrill Gorcunov wrote: > With current epoll architecture target files are addressed > with file_struct and file descriptor number, where the last > is not unique. Moreover files can be transferred from another > process via unix socket, ad

Re: [patch v4 resend 2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-05-12 Thread Cyrill Gorcunov
On Fri, May 12, 2017 at 03:00:18PM -0700, Andrew Morton wrote: > On Mon, 24 Apr 2017 18:39:28 +0300 Cyrill Gorcunov wrote: > > That's quite a bit more code. Is there a neat way of making it depend > on a new CONFIG_foo, then select CONFIG_foo if > CONFIG_CHECKPOINT_RESTORE? Sure, will do on top

Re: [patch v4 resend 2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-05-12 Thread Andrew Morton
On Mon, 24 Apr 2017 18:39:28 +0300 Cyrill Gorcunov wrote: > With current epoll architecture target files are addressed > with file_struct and file descriptor number, where the last > is not unique. Moreover files can be transferred from another > process via unix socket, added into queue and clos

[patch v4 resend 2/2] kcmp: Add KCMP_EPOLL_TFD mode to compare epoll target files

2017-04-24 Thread Cyrill Gorcunov
With current epoll architecture target files are addressed with file_struct and file descriptor number, where the last is not unique. Moreover files can be transferred from another process via unix socket, added into queue and closed then so we won't find this descriptor in the task fdinfo list. T