From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753366Ab3H0PMC (ORCPT ); Tue, 27 Aug 2013 11:12:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55607 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570Ab3H0PMA (ORCPT ); Tue, 27 Aug 2013 11:12:00 -0400 Date: Tue, 27 Aug 2013 17:05:35 +0200 From: Oleg Nesterov To: Willy Tarreau Cc: Linus Torvalds , Andrew Morton , Al Viro , Andy Lutomirski , Ingo Molnar , Linux Kernel Mailing List , Linux FS Devel , Brad Spengler , "Eric W. Biederman" Subject: Re: [PATCH] proc: make proc_fd_permission() thread-friendly Message-ID: <20130827150535.GD19425@redhat.com> References: <20130825065039.GB9299@1wt.eu> <20130825194844.GA16717@redhat.com> <20130826153301.GA15890@redhat.com> <20130826163704.GA21763@redhat.com> <20130826175441.GA28856@redhat.com> <20130826202028.GB24065@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130826202028.GB24065@1wt.eu> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/26, Willy Tarreau wrote: > > On Mon, Aug 26, 2013 at 12:35:26PM -0700, Linus Torvalds wrote: > (...) > > Yes, it would be semantically different, but it would mean that > > "/proc/self/fd/" would actually make sense in a way that it currently > > does *not* - which would seem fairly important, since the primary use > > for it tends to be /dev/stdin. > > I remember another user, don't know if that has changed. UPX used to build > self-extract binaries that opened /proc/self/fd/3. But /proc//fd and /proc//fd should be the same. Unless it plays with unshare() or clone(CLONE_THREAD /* no CLONE_FILES */). Unlike, but: > because it's typically a usage that > could be discovered to be broken months after the change! Oh yes, I agree. This change is trivial but nasty, god knows what people actually do with /proc/self. Oleg.