From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: /proc/pid/fd && anon_inode_fops Date: Sun, 25 Aug 2013 21:48:44 +0200 Message-ID: <20130825194844.GA16717@redhat.com> References: <20130822185317.GI31117@1wt.eu> <20130822201530.GL31117@1wt.eu> <20130824182939.GA23630@redhat.com> <20130824212432.GA9299@1wt.eu> <20130825052317.GZ27005@ZenIV.linux.org.uk> <20130825065039.GB9299@1wt.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Willy Tarreau , Al Viro , Andy Lutomirski , "security@kernel.org" , Ingo Molnar , Linux Kernel Mailing List , Linux FS Devel , Brad Spengler To: Linus Torvalds Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Cough. I am going off-topic again, but I can't resist... On 08/25, Linus Torvalds wrote: > > Look at the code that creates the fd stat information, for example. > It's in tid_fd_revalidate(), and it really doesn't make much sense to > use the task credentials for it. Or pid_revalidate(), but my concern is task_dumpable() logic. pid_revalidate() does inode->i_*id = GLOBAL_ROOT_*ID if task_dumpable() fails, but it can fail simply because ->mm = NULL. This means that almost everything in /proc/zombie-pid/ becomes root. Doesn't really hurt, but for what? Looks a bit strange imho. Oleg.