Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260842
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: question about commit "proc: make proc_fd_permission() thread-friendly" |
| Date | 2015-11-02 19:00 +0100 |
| Message-ID | <qqryF-8gz-9@gated-at.bofh.it> (permalink) |
| References | <qqryF-8gz-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Jin, (add lkml) On 11/02, Jin, Yihua wrote: > > --- a/fs/proc/fd.c<http://kernel.suse.com/cgit/kernel/tree/fs/proc/fd.c?h=SLE12&id=a3c039929d01f793c47922017b6c0ae438e11598> > +++ b/fs/proc/fd.c<http://kernel.suse.com/cgit/kernel/tree/fs/proc/fd.c?h=SLE12&id=96d0df79f2644fc823f26c06491e182d87a90c2a> > @@ -286,7 +286,7 @@ int proc_fd_permission(struct inode *inode, int mask) > int rv = generic_permission(inode, mask); > if (rv == 0) > return 0; > - if (task_pid(current) == proc_pid(inode)) > + if (task_tgid(current) == proc_pid(inode)) > rv = 0; > return rv; > } > > I understand the intention is to make sub-thread access /proc/self/fd/ OK, however, after this commit, access /proc/<tid>/fd/ is denied if the process is non-dumpable. > > This make application in a delimma: > Before your commit, application sub-thread can access /proc/<tid>/fd/, but not /proc/self/fd/, after your commit, application sub-thread can access /proc/self/fd/, but not /proc/<tid>/fd/. > This make application impossible to adapt both to kernel before the commit and kernel after the commit. Yes thanks... I'll try to think tomorrow. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: question about commit "proc: make proc_fd_permission() thread-friendly" Oleg Nesterov <oleg@redhat.com> - 2015-11-02 19:00 +0100
csiph-web