From owner-freebsd-bugs@FreeBSD.ORG Sat May 21 14:00:27 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 138FD1065690 for ; Sat, 21 May 2011 14:00:26 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 657378FC1D for ; Sat, 21 May 2011 14:00:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4LE0Lkn050958 for ; Sat, 21 May 2011 14:00:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4LE0LGC050957; Sat, 21 May 2011 14:00:21 GMT (envelope-from gnats) Date: Sat, 21 May 2011 14:00:21 GMT Message-Id: <201105211400.p4LE0LGC050957@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Patrick Lamaiziere Cc: Subject: Re: kern/157234: //proc/curproc/file returns "unknown" with a binary called via a nullfs mountpoint X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Patrick Lamaiziere List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 May 2011 14:00:27 -0000 The following reply was made to PR kern/157234; it has been noted by GNATS. From: Patrick Lamaiziere To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/157234: //proc/curproc/file returns "unknown" with a binary called via a nullfs mountpoint Date: Sat, 21 May 2011 15:34:18 +0200 --MP_/VpgKIUX=tHLi5_qY/Vc1a2+ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline Le Sat, 21 May 2011 11:18:00 GMT, Patrick Lamaiziere a écrit : > /proc/curproc/file returns "unknown" with a binary called via a > nullfs mountpoint, but not if called directly. Well, i've looked a bit the procfs code and this behavior seems more or less intented by the function vn_fullpath(9). procstat(1) is affected too : procstat: sysctl: kern.proc.pathname: 2265: No such file or directory So it looks to be a limitation instead of a bug. I would like to suggest to reclassify this PR into the doc section and the attached patch to document the nulls manual page (as usual feel free to change the text as english is not my natural language). Thanks, regards --MP_/VpgKIUX=tHLi5_qY/Vc1a2+ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=nullfs.5.patch --- nullfs.5.org 2011-05-21 14:37:23.000000000 +0200 +++ nullfs.5 2011-05-21 15:00:38.000000000 +0200 @@ -56,6 +56,16 @@ file system: .Pp .Dl "mount_nullfs /usr/ports /home/devel/ports" +.Sh CAVEAT +The +.Nm +file system prevents to convert a vnode reference to a full pathname, given a +process context. This will prevent an application to retrieve its path +to process binary. For example, applications using the +.Xr procfs 5 +file system /proc/curproc/file or the +.Xr sysctl 8 +kern.proc.pathname .Sh SEE ALSO .Xr fstab 5 , .Xr mount_nullfs 8 --MP_/VpgKIUX=tHLi5_qY/Vc1a2+--