Date: Sat, 14 Sep 2002 02:07:31 -0700 (PDT) From: Nate Lawson <nate@root.org> To: Terry Lambert <tlambert2@mindspring.com> Cc: arch@freebsd.org Subject: Re: PATCH: vnode->v_tag to const char * Message-ID: <Pine.BSF.4.21.0209140204240.28608-100000@root.org> In-Reply-To: <Pine.BSF.4.21.0209131042460.27416-100000@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 13 Sep 2002, Nate Lawson wrote: > Sorry, this isn't helpful. See the start of this thread where I am > changing vp->v_tag. Since v_tag is not (and should never have > been) usable as a fs type id, I need something to replace it with to > detect a procfs vnode. Checking for VFCF_SYNTHETIC lumps devfs and > fdescfs in with procfs and thus programs like su no longer work (because > stdin is /dev/tty which is on devfs which, like procfs, has > VFCF_SYNTHETIC set). > > Another possibility I considered was checking for VFCF_SYNTHETIC and vtype > != VCHR (since procfs uses standard VDIR/VREG files). This didn't work > either (I was able to hang the system with "su < /proc/curproc/mem"). The panic is due to a recursive lock and was not added (or fixed) by the v_tag commit. I am testing a local fix for the lock problem and will commit it soon. > I need two things: > 1. To know all the filesystem types that are unsafe for set[ug]id > programs with open descriptors on 0-2. Procfs is one, but there are > probably others. Any fs where the semantics of the fd change across an > exec is suspect. > 2. A way to uniquely identify those fs types via a vnode. > > This may need to be a new flag somewhere (say, struct vfsconf). Pseudofs > already uses PFS_PROCDEP but this never gets propagated to a vnode. > > -Nate I did this by adding VV_PROCDEP to vnode.h and setting it in pseudofs when allocing a new vnode and the client fs (say procfs) has set PFS_PROCDEP. The latter is propagated to children, which works cleanly for the other fs like this (linprocfs). -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0209140204240.28608-100000>