All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: question about commit "proc: make proc_fd_permission() thread-friendly"
       [not found] <B4C772D477996F45A8F9B1CF31AE3AF3119C4F46@SHSMSX104.ccr.corp.intel.com>
@ 2015-11-02 18:46 ` Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2015-11-02 18:46 UTC (permalink / raw)
  To: Jin, Yihua; +Cc: linux-kernel

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-02 17:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <B4C772D477996F45A8F9B1CF31AE3AF3119C4F46@SHSMSX104.ccr.corp.intel.com>
2015-11-02 18:46 ` question about commit "proc: make proc_fd_permission() thread-friendly" Oleg Nesterov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.