From owner-freebsd-arch Sun May 19 0:45:18 2002 Delivered-To: freebsd-arch@freebsd.org Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by hub.freebsd.org (Postfix) with ESMTP id AFFFC37B403 for ; Sun, 19 May 2002 00:45:14 -0700 (PDT) Received: from blossom.cjclark.org ([12.234.91.48]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020519074513.UMRP8004.sccrmhc01.attbi.com@blossom.cjclark.org>; Sun, 19 May 2002 07:45:13 +0000 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.6) id g4J7jCh76189; Sun, 19 May 2002 00:45:12 -0700 (PDT) (envelope-from crist.clark@attbi.com) X-Authentication-Warning: blossom.cjclark.org: cjc set sender to crist.clark@attbi.com using -f Date: Sun, 19 May 2002 00:45:12 -0700 From: "Crist J. Clark" To: Brian Somers Cc: arch@FreeBSD.ORG Subject: Re: Restricting umasks in periodic scripts Message-ID: <20020519004512.C67779@blossom.cjclark.org> Reply-To: "Crist J. Clark" References: <200205171420.g4HEKSWs093218@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200205171420.g4HEKSWs093218@hak.lan.Awfulhak.org>; from brian@Awfulhak.org on Fri, May 17, 2002 at 03:20:28PM +0100 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, May 17, 2002 at 03:20:28PM +0100, Brian Somers wrote: > Hi, > > I'd like to poll arch for opinions on the attached patch. Whilst > I believe I've plugged all of the existing umask-type problems in > -current (soon to be MFC'd re@ willing), it's usually better to be > safe. Personally, I don't like. I'd rather not have to use root to review {mount,dmesg}.{to,yester}day for example, and there is no reason to try to hide the information they contain. But I understand why some files should default to no world or group read permissions. Maybe customizing this is something we can work into the NetBSD-style startup? :) As for -STABLE, I haven't really heard any complaints? Might be a bit late to change the status quo before 4.6-RELEASE. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sun May 19 2:27: 6 2002 Delivered-To: freebsd-arch@freebsd.org Received: from localhost.com (hkg-tgn-rwe-vty5.as.wcom.net [63.12.174.5]) by hub.freebsd.org (Postfix) with SMTP id 2747237B400 for ; Sun, 19 May 2002 02:26:58 -0700 (PDT) From: freebsd-arch@FreeBSD.org Reply-To: pni123456789@hotmail.com To: freebsd-arch@FreeBSD.org Date: Sun, 19 May 2002 16:56:24 +0700 Subject: วันนี้คุณรู้สึกอย่างไร 19/5/2002 16:56:24 X-Mailer: QuickSender 1.05 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message-Id: <20020519092658.2747237B400@hub.freebsd.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dear freebsd-arch =2C =C7=D1=B9=B9=D5=E9 =A4=D8=B3=C3=D9=E9=CA=D6=A1=C7=E8=D2=E0=A7=D4=B9=E0=B4=D7=CD=B9=B7=D5=E8=A4=D8=B3=E4=B4=E9=C3=D1=BA=E4=C1=E8=A4=D8=E9=C1=A4=E8=D2=A1=D1=BA=A4=C7=D2=C1=CA=D2=C1=D2=C3=B6=A2=CD=A7=A4=D8=B3 =C7=D1=B9=B9=D5=E9 =A4=D8=B3=C3=D9=E9=CA=D6=A1=C7=E8=D2=E0=BE=D7=E8=CD=B9=C3=E8=C7=C1=A7=D2=B9=A1=E9=D2=C7=CB=B9=E9=D2 =E3=B9=A2=B3=D0=B7=D5=E8=A4=D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E8=A7=E4=BB=C2=D1=A7=A4=D8=B3=E2=B4=C2=BA=D1=A7=E0=CD=D4=AD =CB=D2=A1=A4=D8=B3=B5=E9=CD=A7=A1=D2=C3=E3=CB=E9=C3=D2=C2=AA=D7=E8=CD=B6=D9=A1=C5=BA=CD=CD=A1 =09=A1=C3=D8=B3=D2 click =B7=D5=E8=B9=D5=E8 http=3A=2F=2Fwww=2Ethaiworkathome=2Ecom=2Funsubscribe=2Easp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sun May 19 13:29: 6 2002 Delivered-To: freebsd-arch@freebsd.org Received: from kayak.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by hub.freebsd.org (Postfix) with ESMTP id C3ACC37B405; Sun, 19 May 2002 13:29:02 -0700 (PDT) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by kayak.xcllnt.net (8.11.6/8.11.4) with ESMTP id g4JKT1J28012; Sun, 19 May 2002 13:29:01 -0700 (PDT) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.3/8.12.3) with ESMTP id g4JKTQfp017034; Sun, 19 May 2002 13:29:26 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.3/8.12.3/Submit) id g4JKTPVi017033; Sun, 19 May 2002 13:29:25 -0700 (PDT) Date: Sun, 19 May 2002 13:29:25 -0700 From: Marcel Moolenaar To: "Crist J. Clark" Cc: Brian Somers , arch@FreeBSD.ORG Subject: Re: Restricting umasks in periodic scripts Message-ID: <20020519202925.GA17015@dhcp01.pn.xcllnt.net> References: <200205171420.g4HEKSWs093218@hak.lan.Awfulhak.org> <20020519004512.C67779@blossom.cjclark.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020519004512.C67779@blossom.cjclark.org> User-Agent: Mutt/1.3.99i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, May 19, 2002 at 12:45:12AM -0700, Crist J. Clark wrote: > > As for -STABLE, I haven't really heard any complaints? Might be a bit > late to change the status quo before 4.6-RELEASE. Wouldn't it be a POLA violation anyway or is there enough security concern to overrule POLA? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sun May 19 14:51:56 2002 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (port757.uc1-esp.isdn-lan.cybercity.dk [212.242.98.245]) by hub.freebsd.org (Postfix) with ESMTP id 4AE2737B40A for ; Sun, 19 May 2002 14:51:53 -0700 (PDT) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.3/8.12.2) with ESMTP id g4JLoxOw007120 for ; Sun, 19 May 2002 23:51:04 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: arch@freebsd.org Subject: Marking deGianted functions ? From: Poul-Henning Kamp Date: Sun, 19 May 2002 23:50:59 +0200 Message-ID: <7119.1021845059@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Do we have a convention for marking functions which have been deGianted() ? If not, could we make some kind of comment convention so people can determine the liberated parts ? as more and more parts of the kernel gets out from under giant this becomes more and more of an issue. I realize that marking the non-safe entrypoints is the "logical" thing to do, but probably less practical, or ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sun May 19 15:14:31 2002 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 3D15437B40C; Sun, 19 May 2002 15:14:29 -0700 (PDT) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.3/8.9.1) with ESMTP id g4JMEThU081621; Sun, 19 May 2002 15:14:29 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.3/8.12.3/Submit) id g4JMETM0081620; Sun, 19 May 2002 15:14:29 -0700 (PDT) Date: Sun, 19 May 2002 15:14:29 -0700 (PDT) From: Matthew Dillon Message-Id: <200205192214.g4JMETM0081620@apollo.backplane.com> To: Poul-Henning Kamp Cc: arch@FreeBSD.ORG Subject: Re: Marking deGianted functions ? References: <7119.1021845059@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG fgrep MPSAFE */*.c. The convention is: /* * (other comments) * MPSAFE */ -Matt Matthew Dillon :Do we have a convention for marking functions which have been deGianted() ? : :If not, could we make some kind of comment convention so people can :determine the liberated parts ? as more and more parts of the kernel :gets out from under giant this becomes more and more of an issue. : :I realize that marking the non-safe entrypoints is the "logical" thing :to do, but probably less practical, or ? : :-- :Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 :phk@FreeBSD.ORG | TCP/IP since RFC 956 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sun May 19 16:16:27 2002 Delivered-To: freebsd-arch@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 9345D37B405; Sun, 19 May 2002 16:16:22 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [IPv6:fec0::1:12]) by Awfulhak.org (8.12.3/8.12.3) with ESMTP id g4JNGIva074503; Mon, 20 May 2002 00:16:18 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.12.3/8.12.3) with ESMTP id g4JNGFDV007627; Mon, 20 May 2002 00:16:15 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200205192316.g4JNGFDV007627@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Marcel Moolenaar Cc: "Crist J. Clark" , Brian Somers , arch@FreeBSD.ORG Subject: Re: Restricting umasks in periodic scripts In-Reply-To: Message from Marcel Moolenaar of "Sun, 19 May 2002 13:29:25 PDT." <20020519202925.GA17015@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 20 May 2002 00:16:15 +0100 From: Brian Somers Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Sun, May 19, 2002 at 12:45:12AM -0700, Crist J. Clark wrote: > > > > As for -STABLE, I haven't really heard any complaints? Might be a bit > > late to change the status quo before 4.6-RELEASE. > > Wouldn't it be a POLA violation anyway or is there enough security > concern to overrule POLA? Well, I guess that's why I'm soliciting comments. I personally set $daily_local in /etc/periodic.conf to run things. They're in the spirit of the existing periodic scripts - ie, they just report on things and don't update system files, but if people out there have been using $*_local to do other things like maintenance tasks, a restrictive umask may break things. The flip side of the argument is that our security scripts were (until recently) creating world-readable temporary files in /var/run that contained things such as output from ipfw(8) - something that a non-privileged user shouldn't see. If *we*'re doing this, our users are probably falling foul of the same sort of thing.... I'm leaning towards being cautious here. People ``know'' that the default umask is 022. If they write stuff that depends on that without explicitly setting the umask, I don't think it's up to us to surprise them. > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon May 20 14:25:38 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 7722137B400 for ; Mon, 20 May 2002 14:24:59 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1920) id 59857AE163; Mon, 20 May 2002 14:24:59 -0700 (PDT) Date: Mon, 20 May 2002 14:24:59 -0700 From: Maxime Henrion To: arch@FreeBSD.org Subject: a virtual fs to allow root mounting of any fs without special code Message-ID: <20020520212459.GH496@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello all, I've written a small virtual filesystem called rootfs which solves the chicken and egg problem of root mounting quite nicely. Currently, we need special code in each filesystem to allow root mounting. The reason for this is that the VFS_MOUNT operations of the filesystems generally need to do a lookup to get a device file (e.g. /dev/ad0s1a), so they need devfs to be there, and they need lookups to work. rootfs is nothing more than a 3-vnodes filesystem (/, /dev and /root). To mount the root filesystem with rootfs, I do the following : - initialize rootfs - mount devfs on /dev (on top of rootfs) - mount the real fs on /root - umount devfs from /dev - translate vnodes so that / is now the /root - remount devfs on /dev (on top of the real fs) - terminate rootfs The attached patch implements the above idea with several restrictions. First, the filesystem has to be converted to the nmount(2) API for this to work (of course you also need devfs but it is the default). Second, this patch includes the bits necessary to convert ufs to nmount, but not the various userland updates that are needed to get this to work (I've got those in my tree, but I wait for UFS2 to be committed to avoid unnecessary conflicts). I just give it as a proof of concept, since it runs fine on my box, but don't try to compile a kernel with it :-P I also have converted cd9660fs to nmount here and I will test it as soon as possible, but it's likely to work without further modifications. NFS will require a bit more tricks however (it apparently has to configure the interface with ifioctl() before being able to talk to the server). Comments are of course much appreciated. Cheers, Maxime --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rootfs.diff" Index: fs/rootfs/rootfs.h =================================================================== RCS file: fs/rootfs/rootfs.h diff -N fs/rootfs/rootfs.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ fs/rootfs/rootfs.h 16 May 2002 22:39:18 -0000 @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2002 Maxime Henrion + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _FS_ROOTFS_ROOTFS_H_ +#define _FS_ROOTFS_ROOTFS_H_ + +#define ROOTFS_NONE 0 +#define ROOTFS_ROOT 1 +#define ROOTFS_DIR 2 + +struct rootfs_node { + int de_type; + const char *de_name; + int de_namelen; + struct vnode *de_vnode; +}; + +void rootfs_init(struct vnode **); +void rootfs_fini(void); + +#endif /* _FS_ROOTFS_ROOTFS_H_ */ Index: fs/rootfs/rootfs_vnops.c =================================================================== RCS file: fs/rootfs/rootfs_vnops.c diff -N fs/rootfs/rootfs_vnops.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ fs/rootfs/rootfs_vnops.c 17 May 2002 00:03:13 -0000 @@ -0,0 +1,251 @@ +/*- + * Copyright (c) 2002 Maxime Henrion + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +static int rootfs_access(struct vop_access_args *); +static int rootfs_lookup(struct vop_lookup_args *); +static int rootfs_reclaim(struct vop_reclaim_args *); +static int rootfs_allocv(struct rootfs_node *, struct vnode **, + struct thread *); + +static struct rootfs_node rootfs_nodes[] = { + { ROOTFS_ROOT, NULL, 0, NULL }, + { ROOTFS_DIR, "dev", 3, NULL }, + { ROOTFS_DIR, "root", 4, NULL }, + { ROOTFS_NONE, NULL, 0, NULL } +}; + +/* + * Rootfs is used internally in the kernel when + * doing root mounting only. We don't need + * to do real access control at this time. + */ +static int +rootfs_access(struct vop_access_args *ap) +{ + int error; + + error = suser(ap->a_td); + KASSERT(error == 0, ("%s: uid is not root", __func__)); + return (error); +} + +/* + * Translation of a component pathname. + */ +static int +rootfs_lookup(struct vop_lookup_args *ap) +{ + struct vnode *dvp, **vpp; + struct componentname *cnp; + struct rootfs_node *de; + struct thread *td; + char *pname; + int error, flags, nameiop, namelen; + + dvp = ap->a_dvp; + vpp = ap->a_vpp; + cnp = ap->a_cnp; + pname = cnp->cn_nameptr; + namelen = cnp->cn_namelen; + nameiop = cnp->cn_nameiop; + td = cnp->cn_thread; + flags = cnp->cn_flags; + + printf("%s: resolving %s (len %d)\n", __func__, pname, namelen); + + if ((flags & ISLASTCN) && (nameiop != LOOKUP)) + panic("nameiop != LOOKUP in rootfs"); + + /* self */ + if (namelen == 1 && *pname == '.') { + *vpp = dvp; + VREF(dvp); + return (0); + } + + /* parent */ + if (flags & ISDOTDOT) { + de = (struct rootfs_node *)dvp->v_data; + if (de->de_type != ROOTFS_DIR) + goto notfound; + VOP_UNLOCK(dvp, 0, td); + /* + * Since we support only one level of directories, + * we always return the vnode for /. + */ + de = rootfs_nodes; + error = rootfs_allocv(de, vpp, td); + if (error) { + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td); + return (error); + } + if ((flags & LOCKPARENT) && (flags & ISLASTCN)) + error = vn_lock(dvp, LK_EXCLUSIVE, td); + if (error) + vput(*vpp); + return (error); + } + + /* directory entry */ + de = (struct rootfs_node *)dvp->v_data; + if (de->de_type != ROOTFS_ROOT) + goto notfound; + de = rootfs_nodes + 1; /* First dir is at offset 1 */ + while (de->de_type != ROOTFS_NONE) { + if (de->de_namelen == namelen && + (bcmp(de->de_name, pname, namelen) == 0)) { + error = rootfs_allocv(de, vpp, td); + if (error) + return (error); + if (!(flags & LOCKPARENT) || !(flags & ISLASTCN)) + VOP_UNLOCK(dvp, 0, td); + return (0); + } + de++; + } + +notfound: + if ((nameiop == CREATE || nameiop == RENAME) && + (flags & (LOCKPARENT | WANTPARENT)) && (flags & ISLASTCN)) { + cnp->cn_flags |= SAVENAME; + if (!(flags & LOCKPARENT)) + VOP_UNLOCK(dvp, 0, td); + return (EJUSTRETURN); + } + return (ENOENT); +} + +static int +rootfs_reclaim(struct vop_reclaim_args *ap) +{ + struct rootfs_node *de; + struct vnode *vp; + + vp = ap->a_vp; + de = (struct rootfs_node *)vp; + if (de != NULL) { + de->de_vnode = NULL; + vp->v_data = NULL; + } + return (0); +} + +static vop_t **rootfs_vnodeop_p; +static struct vnodeopv_entry_desc rootfs_vnodeop_entries[] = { + { &vop_default_desc, (vop_t *) vop_defaultop }, + { &vop_access_desc, (vop_t *) rootfs_access }, + { &vop_islocked_desc, (vop_t *) vop_stdislocked }, + { &vop_lock_desc, (vop_t *) vop_stdlock }, + { &vop_lookup_desc, (vop_t *) rootfs_lookup }, + { &vop_reclaim_desc, (vop_t *) rootfs_reclaim }, + { &vop_unlock_desc, (vop_t *) vop_stdunlock }, + { NULL, NULL } +}; +static struct vnodeopv_desc rootfs_vnodeop_opv_desc = + { &rootfs_vnodeop_p, rootfs_vnodeop_entries }; + +VNODEOP_SET(rootfs_vnodeop_opv_desc); + +/* + * Returns with the root vnode locked. + */ +void +rootfs_init(struct vnode **vpp) +{ + struct vnode *vp; + int error; + + error = rootfs_allocv(rootfs_nodes, &vp, curthread); + vp->v_type = VDIR; + vp->v_flag |= VROOT; + *vpp = vp; +} + +/* + * Check that our vnodes are not referenced anymore. + * Only /root should still be referenced. + */ +void +rootfs_fini(void) +{ + struct rootfs_node *de; + struct vnode *vp; + + de = rootfs_nodes; + while (de->de_type != ROOTFS_NONE) { + if (de->de_vnode != NULL) { + vp = de->de_vnode; + printf("%s: directory entry %s has v_usecount == %d\n", + __func__, de->de_name, vp->v_usecount); + /* vrele(vp); */ + } + de++; + } +} + +static int +rootfs_allocv(de, vpp, td) + struct rootfs_node *de; + struct vnode **vpp; + struct thread *td; +{ + struct vnode *vp; + int i; + + i = 0; + +loop: + vp = de->de_vnode; + if (vp != NULL) { + if (vget(vp, LK_EXCLUSIVE, td)) + goto loop; + *vpp = vp; + return (0); + } + + getnewvnode(VT_NON, NULL, rootfs_vnodeop_p, &vp); + vp->v_type = VDIR; + vp->v_data = (void *)de; + de->de_vnode = vp; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + *vpp = vp; + return (0); +} Index: kern/init_main.c =================================================================== RCS file: /home/ncvs/src/sys/kern/init_main.c,v retrieving revision 1.194 diff -u -p -r1.194 init_main.c --- kern/init_main.c 2 May 2002 20:27:42 -0000 1.194 +++ kern/init_main.c 16 May 2002 22:43:04 -0000 @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -76,6 +77,8 @@ #include #include +#include + void mi_startup(void); /* Should be elsewhere */ /* Components of the first process -- never freed. */ @@ -478,6 +481,10 @@ start_init(void *dummy) char *ucp, **uap, *arg0, *arg1; struct thread *td; struct proc *p; + struct mount *mp; + struct nameidata nd; + struct vnode *oldvp, *vp; + char *from, *fstype; int init_does_devfs = 0; mtx_lock(&Giant); @@ -487,11 +494,58 @@ start_init(void *dummy) td = curthread; p = td->td_proc; - vfs_mountroot(NULL); + printf("Calling rootfs_init()...\n"); + rootfs_init(&rootvnode); + + /* + * Set cdir and rdir to make namei() work. + */ + FILEDESC_LOCK(p->p_fd); + p->p_fd->fd_cdir = rootvnode; + VREF(p->p_fd->fd_cdir); + p->p_fd->fd_rdir = rootvnode; + VREF(p->p_fd->fd_rdir); + FILEDESC_UNLOCK(p->p_fd); + VOP_UNLOCK(rootvnode, 0, td); + + error = kernel_vmount(0, "fstype", "devfs", "fspath", "/dev", NULL); + if (error) + panic("unable to mount devfs, error = %d", error); + fstype = getenv("vfs.root.mountfrom"); + from = index(fstype, ':'); + if (from == NULL) + panic("Illegal vfs.root.mountfrom environment string"); + *from++ = '\0'; + printf("Mounting root from %s:%s\n", fstype, from); + error = kernel_vmount(MNT_RDONLY, "fstype", fstype, "fspath", "/root", + "from", from, NULL); + if (error) + panic("unable to mount root filesystem, error = %d", error); + freeenv(fstype); + /* Unmount devfs. */ + error = kernel_umount("/dev", MNT_FORCE, td); + if (error) + panic("Unable to umount devfs, error = %d\n", error); + printf("Successfully umounted devfs\n"); + + /* + * Do the vnode translation trick. + */ + oldvp = rootvnode; + /* Get the real vnode for '/'. */ + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, "/root", td); + if ((error = namei(&nd)) != 0) + panic("can't find /root vnode, error = %d", error); + vp = nd.ni_vp; + NDFREE(&nd, NDF_ONLY_PNBUF); + rootvnode = vp; + mp = vp->v_mount; + strcpy(mp->mnt_stat.f_mntonname, "/"); - /* Get the vnode for '/'. Set p->p_fd->fd_cdir to reference it. */ - if (VFS_ROOT(TAILQ_FIRST(&mountlist), &rootvnode)) - panic("cannot find root vnode"); + printf("Evil vnode translation in progress...\n"); + /* + * Properly reset the init0 filedesc structure. + */ FILEDESC_LOCK(p->p_fd); p->p_fd->fd_cdir = rootvnode; VREF(p->p_fd->fd_cdir); @@ -500,21 +554,27 @@ start_init(void *dummy) FILEDESC_UNLOCK(p->p_fd); VOP_UNLOCK(rootvnode, 0, td); - if (devfs_present) { - /* - * For disk based systems, we probably cannot do this yet - * since the fs will be read-only. But a NFS root - * might be ok. It is worth a shot. - */ - error = vn_mkdir("/dev", 0700, UIO_SYSSPACE, td); - if (error == EEXIST) - error = 0; - if (error == 0) - error = kernel_vmount(0, "fstype", "devfs", - "fspath", "/dev", NULL); - if (error != 0) - init_does_devfs = 1; + /* Undo the two references we set earlier. */ + vrele(oldvp); + vrele(oldvp); + + /* + * Finally, try to remount devfs. + * For disk based systems, we probably cannot do this yet + * since the fs will be read-only. But a NFS root + * might be ok. It is worth a shot. + */ + error = vn_mkdir("/dev", 0700, UIO_SYSSPACE, td); + if (error == EEXIST) + error = 0; + if (error == 0) + error = kernel_vmount(0, "fstype", "devfs", + "fspath", "/dev", NULL); + if (error) { + printf("unable to remount devfs"); + init_does_devfs = 1; } + rootfs_fini(); /* * Need just enough stack to hold the faked-up "execve()" arguments. Index: kern/vfs_syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v retrieving revision 1.253 diff -u -p -r1.253 vfs_syscalls.c --- kern/vfs_syscalls.c 14 May 2002 21:59:49 -0000 1.253 +++ kern/vfs_syscalls.c 16 May 2002 23:36:09 -0000 @@ -434,24 +434,23 @@ vfs_nmount(td, fsflags, fsoptions) mp->mnt_flag |= fsflags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE | MNT_SNAPSHOT); VOP_UNLOCK(vp, 0, td); - mp->mnt_optnew = optlist; goto update; } /* * If the user is not root, ensure that they own the directory * onto which we are attempting to mount. */ - error = VOP_GETATTR(vp, &va, td->td_ucred, td); + error = suser(td); if (error) { - vput(vp); - goto bad; - } - if (va.va_uid != td->td_ucred->cr_uid) { - error = suser(td); + error = VOP_GETATTR(vp, &va, td->td_ucred, td); if (error) { vput(vp); goto bad; } + if (va.va_uid != td->td_ucred->cr_uid) { + vput(vp); + goto bad; + } } if ((error = vinvalbuf(vp, V_SAVE, td->td_ucred, td, 0, 0)) != 0) { vput(vp); @@ -528,8 +527,8 @@ vfs_nmount(td, fsflags, fsoptions) mp->mnt_iosize_max = DFLTPHYS; VOP_UNLOCK(vp, 0, td); - mp->mnt_opt = optlist; update: + mp->mnt_optnew = optlist; /* * Check if the fs implements the new VFS_NMOUNT() * function, since the new system call was used. @@ -567,6 +566,17 @@ update: * get. No freeing of cn_pnbuf. */ error = VFS_NMOUNT(mp, &nd, td); + if (!error) { + if (mp->mnt_opt != NULL) + vfs_freeopts(mp->mnt_opt); + mp->mnt_opt = mp->mnt_optnew; + } else + vfs_freeopts(mp->mnt_optnew); + /* + * Prevent external consumers of mount + * options to read mnt_optnew. + */ + mp->mnt_optnew = NULL; if (mp->mnt_flag & MNT_UPDATE) { if (mp->mnt_kern_flag & MNTK_WANTRDWR) mp->mnt_flag &= ~MNT_RDONLY; @@ -576,10 +586,6 @@ update: if (error) { mp->mnt_flag = flag; mp->mnt_kern_flag = kern_flag; - vfs_freeopts(mp->mnt_optnew); - } else { - vfs_freeopts(mp->mnt_opt); - mp->mnt_opt = mp->mnt_optnew; } if ((mp->mnt_flag & MNT_RDONLY) == 0) { if (mp->mnt_syncer == NULL) @@ -619,10 +625,8 @@ update: if ((mp->mnt_flag & MNT_RDONLY) == 0) error = vfs_allocate_syncvnode(mp); vfs_unbusy(mp, td); - if ((error = VFS_START(mp, 0, td)) != 0) { + if ((error = VFS_START(mp, 0, td)) != 0) vrele(vp); - goto bad; - } } else { mtx_lock(&vp->v_interlock); vp->v_flag &= ~VMOUNT; @@ -631,9 +635,8 @@ update: vfs_unbusy(mp, td); free((caddr_t)mp, M_MOUNT); vput(vp); - goto bad; } - return (0); + return (error); bad: vfs_freeopts(optlist); return (error); @@ -1185,6 +1188,30 @@ dounmount(mp, flags, td) vfs_freeopts(mp->mnt_opt); free((caddr_t)mp, M_MOUNT); return (0); +} + +int +kernel_umount(path, flags, td) + const char *path; + int flags; + struct thread *td; +{ + register struct vnode *vp; + struct mount *mp; + int error; + struct nameidata nd; + + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, path, td); + if ((error = namei(&nd)) != 0) + return (error); + vp = nd.ni_vp; + NDFREE(&nd, NDF_ONLY_PNBUF); + mp = vp->v_mount; + KASSERT(vp->v_flag & VROOT, ("%s(%s): vnode is not VROOT", + __func__, path)); + vput(vp); + error = dounmount(mp, flags, td); + return (error); } /* Index: ufs/ffs/ffs_extern.h =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_extern.h,v retrieving revision 1.47 diff -u -p -r1.47 ffs_extern.h --- ufs/ffs/ffs_extern.h 19 Mar 2002 22:40:46 -0000 1.47 +++ ufs/ffs/ffs_extern.h 11 May 2002 16:39:26 -0000 @@ -71,9 +71,7 @@ int ffs_isblock(struct fs *, u_char *, u int ffs_isfreeblock(struct fs *, unsigned char *, ufs_daddr_t); int ffs_mountfs(struct vnode *, struct mount *, struct thread *, struct malloc_type *); -int ffs_mountroot(void); -int ffs_mount(struct mount *, char *, caddr_t, struct nameidata *, - struct thread *); +int ffs_mount(struct mount *, struct nameidata *, struct thread *); int ffs_reallocblks(struct vop_reallocblks_args *); int ffs_realloccg(struct inode *, ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **); Index: ufs/ffs/ffs_snapshot.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_snapshot.c,v retrieving revision 1.35 diff -u -p -r1.35 ffs_snapshot.c --- ufs/ffs/ffs_snapshot.c 12 May 2002 20:21:40 -0000 1.35 +++ ufs/ffs/ffs_snapshot.c 16 May 2002 22:22:07 -0000 @@ -138,7 +138,7 @@ ffs_snapshot(mp, snapfile) * Create the snapshot file. */ restart: - NDINIT(&nd, CREATE, LOCKPARENT | LOCKLEAF, UIO_USERSPACE, snapfile, td); + NDINIT(&nd, CREATE, LOCKPARENT | LOCKLEAF, UIO_SYSSPACE, snapfile, td); if ((error = namei(&nd)) != 0) return (error); if (nd.ni_vp != NULL) { Index: ufs/ffs/ffs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_vfsops.c,v retrieving revision 1.178 diff -u -p -r1.178 ffs_vfsops.c --- ufs/ffs/ffs_vfsops.c 13 May 2002 09:22:28 -0000 1.178 +++ ufs/ffs/ffs_vfsops.c 16 May 2002 23:39:18 -0000 @@ -72,7 +72,7 @@ static int ffs_oldfscompat(struct fs *); static int ffs_init(struct vfsconf *); static struct vfsops ufs_vfsops = { - ffs_mount, + NULL, ufs_start, ffs_unmount, ufs_root, @@ -90,6 +90,7 @@ static struct vfsops ufs_vfsops = { #else vfs_stdextattrctl, #endif + ffs_mount, }; VFS_SET(ufs_vfsops, ufs, 0); @@ -100,17 +101,8 @@ VFS_SET(ufs_vfsops, ufs, 0); * Called when mounting local physical media * * PARAMETERS: - * mountroot - * mp mount point structure - * path NULL (flag for root mount!!!) - * data - * ndp - * p process (user credentials check [statfs]) - * * mount * mp mount point structure - * path path to mount point - * data pointer to argument struct in user space * ndp mount point namei() return (used for * credentials on reload), reused to look * up block device. @@ -126,47 +118,32 @@ VFS_SET(ufs_vfsops, ufs, 0); * EXIT * mount point is locked * - * NOTES: - * A NULL path can be used for a flag since the mount - * system call will fail with EFAULT in copyinstr in - * namei() if it is a genuine NULL from the user. */ int -ffs_mount(mp, path, data, ndp, td) +ffs_mount(mp, ndp, td) struct mount *mp; /* mount struct pointer*/ - char *path; /* path to mount point*/ - caddr_t data; /* arguments to FS specific mount*/ struct nameidata *ndp; /* mount point credentials*/ struct thread *td; /* process requesting mount*/ { - size_t size; struct vnode *devvp; - struct ufs_args args; struct ufsmount *ump = 0; + struct vfsoptlist *opts; struct fs *fs; - int error, flags; + struct export_args export; + char *path, *fspec; + int error, flags, len; mode_t accessmode; + opts = mp->mnt_optnew; /* - * Use NULL path to indicate we are mounting the root file system. - */ - if (path == NULL) { - if ((error = bdevvp(rootdev, &rootvp))) { - printf("ffs_mountroot: can't find rootvp\n"); - return (error); - } - - if ((error = ffs_mountfs(rootvp, mp, td, M_FFSNODE)) != 0) - return (error); - (void)VFS_STATFS(mp, &mp->mnt_stat, td); - return (0); - } - - /* - * Mounting non-root file system or updating a file system + * The fspath mount option is always present + * and is always a string. */ - if ((error = copyin(data, (caddr_t)&args, sizeof(struct ufs_args)))!= 0) - return (error); + vfs_getopt(opts, "fspath", (void **)&path, NULL); + fspec = NULL; + error = vfs_getopt(opts, "from", (void **)&fspec, &len); + if (!error && fspec[len - 1] != '\0') + return (EINVAL); /* * If updating, check whether changing from read-only to @@ -280,20 +257,27 @@ ffs_mount(mp, path, data, ndp, td) /* * If not updating name, process export requests. */ - if (args.fspec == 0) - return (vfs_export(mp, &args.export)); + if (fspec == NULL) { + error = vfs_getopt(opts, "export", (void **)&export, + &len); + if (error || len != sizeof(struct export_args)) + return (EINVAL); + return (vfs_export(mp, &export)); + } /* * If this is a snapshot request, take the snapshot. */ if (mp->mnt_flag & MNT_SNAPSHOT) - return (ffs_snapshot(mp, args.fspec)); + return (ffs_snapshot(mp, fspec)); } /* * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); + if (fspec == NULL) + return (EINVAL); + NDINIT(ndp, LOOKUP, FOLLOW, UIO_SYSSPACE, fspec, td); if ((error = namei(ndp)) != 0) return (error); NDFREE(ndp, NDF_ONLY_PNBUF); @@ -350,8 +334,8 @@ ffs_mount(mp, path, data, ndp, td) /* * Save "mounted from" device name info for mount point (NULL pad). */ - copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); - bzero( mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); + strncpy(mp->mnt_stat.f_mntfromname, fspec, MNAMELEN - 1); + mp->mnt_stat.f_mntfromname[MNAMELEN] = '\0'; /* * Initialize filesystem stat information in mount struct. */ --KN5l+BnMqAQyZLvT-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Mon May 20 14:28:38 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 1EFB737B406 for ; Mon, 20 May 2002 14:28:01 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1920) id CFCDFAE147; Mon, 20 May 2002 14:28:00 -0700 (PDT) Date: Mon, 20 May 2002 14:28:00 -0700 From: Maxime Henrion To: arch@FreeBSD.org Subject: Re: a virtual fs to allow root mounting of any fs without special code Message-ID: <20020520212800.GI496@elvis.mu.org> References: <20020520212459.GH496@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="JwB53PgKC5A7+0Ej" Content-Disposition: inline In-Reply-To: <20020520212459.GH496@elvis.mu.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --JwB53PgKC5A7+0Ej Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Maxime Henrion wrote: > The attached patch implements the above idea with several restrictions. Oops! This was an old patch, please consider this one instead. Sorry, Maxime --JwB53PgKC5A7+0Ej Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rootfs.diff" Index: fs/rootfs/rootfs.h =================================================================== RCS file: fs/rootfs/rootfs.h diff -N fs/rootfs/rootfs.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ fs/rootfs/rootfs.h 19 May 2002 22:57:17 -0000 @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2002 Maxime Henrion + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _FS_ROOTFS_ROOTFS_H_ +#define _FS_ROOTFS_ROOTFS_H_ + +#define ROOTFS_NONE 0 +#define ROOTFS_ROOT 1 +#define ROOTFS_DIR 2 + +struct rootfs_node { + int de_type; + const char *de_name; + int de_namelen; + struct vnode *de_vnode; +}; + +void rootfs_init(void); +void rootfs_fini(void); + +#endif /* _FS_ROOTFS_ROOTFS_H_ */ Index: fs/rootfs/rootfs_vnops.c =================================================================== RCS file: fs/rootfs/rootfs_vnops.c diff -N fs/rootfs/rootfs_vnops.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ fs/rootfs/rootfs_vnops.c 19 May 2002 23:04:14 -0000 @@ -0,0 +1,272 @@ +/*- + * Copyright (c) 2002 Maxime Henrion + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +static int rootfs_access(struct vop_access_args *); +static int rootfs_getattr(struct vop_getattr_args *); +static int rootfs_inactive(struct vop_inactive_args *); +static int rootfs_lookup(struct vop_lookup_args *); +static int rootfs_reclaim(struct vop_reclaim_args *); +static int rootfs_allocv(struct rootfs_node *, struct vnode **, + struct thread *); + +static struct rootfs_node rootfs_nodes[] = { + { ROOTFS_ROOT, NULL, 0, NULL }, + { ROOTFS_DIR, "dev", 3, NULL }, + { ROOTFS_DIR, "root", 4, NULL }, + { ROOTFS_NONE, NULL, 0, NULL } +}; + +/* + * Rootfs is used internally in the kernel when + * doing root mounting only. We don't need + * to do real access control at this time. + */ +static int +rootfs_access(struct vop_access_args *ap) +{ + int error; + + error = suser(ap->a_td); + KASSERT(error == 0, ("%s: uid is not root", __func__)); + return (error); +} + +/* + * Translation of a component pathname. + */ +static int +rootfs_lookup(struct vop_lookup_args *ap) +{ + struct vnode *dvp, **vpp; + struct componentname *cnp; + struct rootfs_node *de; + struct thread *td; + char *pname; + int error, flags, nameiop, namelen; + + dvp = ap->a_dvp; + vpp = ap->a_vpp; + cnp = ap->a_cnp; + pname = cnp->cn_nameptr; + namelen = cnp->cn_namelen; + nameiop = cnp->cn_nameiop; + td = cnp->cn_thread; + flags = cnp->cn_flags; + + if ((flags & ISLASTCN) && (nameiop != LOOKUP)) + panic("nameiop != LOOKUP in rootfs"); + + /* self */ + if (namelen == 1 && *pname == '.') { + *vpp = dvp; + VREF(dvp); + return (0); + } + + /* parent */ + if (flags & ISDOTDOT) { + de = (struct rootfs_node *)dvp->v_data; + if (de->de_type != ROOTFS_DIR) + goto notfound; + VOP_UNLOCK(dvp, 0, td); + /* + * Since we support only one level of directories, + * we always return the vnode for /. + */ + de = rootfs_nodes; + error = rootfs_allocv(de, vpp, td); + if (error) { + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td); + return (error); + } + if ((flags & LOCKPARENT) && (flags & ISLASTCN)) + error = vn_lock(dvp, LK_EXCLUSIVE, td); + if (error) + vput(*vpp); + return (error); + } + + /* directory entry */ + de = (struct rootfs_node *)dvp->v_data; + if (de->de_type != ROOTFS_ROOT) + goto notfound; + de = rootfs_nodes + 1; /* First dir is at offset 1 */ + while (de->de_type != ROOTFS_NONE) { + if (de->de_namelen == namelen && + (bcmp(de->de_name, pname, namelen) == 0)) { + error = rootfs_allocv(de, vpp, td); + if (error) + return (error); + if (!(flags & LOCKPARENT) || !(flags & ISLASTCN)) + VOP_UNLOCK(dvp, 0, td); + return (0); + } + de++; + } + +notfound: + return (ENOENT); +} + +/* + * This is for the VOP_GETATTR() call in vfs_nmount(). + */ +static int +rootfs_getattr(struct vop_getattr_args *ap) +{ + struct vattr *vap; + + vap = ap->a_vap; + vattr_null(vap); + vap->va_uid = 0; + return (0); +} + +static int +rootfs_reclaim(struct vop_reclaim_args *ap) +{ + struct rootfs_node *de; + struct vnode *vp; + + vp = ap->a_vp; + de = (struct rootfs_node *)vp->v_data; + if (de != NULL) { + de->de_vnode = NULL; + vp->v_data = NULL; + } + return (0); +} + +static int +rootfs_inactive(struct vop_inactive_args *ap) +{ + struct thread *td; + struct vnode *vp; + + vp = ap->a_vp; + td = ap->a_td; + VOP_UNLOCK(vp, 0, td); + vrecycle(vp, NULL, td); + return (0); +} + +static vop_t **rootfs_vnodeop_p; +static struct vnodeopv_entry_desc rootfs_vnodeop_entries[] = { + { &vop_default_desc, (vop_t *) vop_defaultop }, + { &vop_access_desc, (vop_t *) rootfs_access }, + { &vop_getattr_desc, (vop_t *) rootfs_getattr }, + { &vop_inactive_desc, (vop_t *) rootfs_inactive }, + { &vop_islocked_desc, (vop_t *) vop_stdislocked }, + { &vop_lock_desc, (vop_t *) vop_stdlock }, + { &vop_lookup_desc, (vop_t *) rootfs_lookup }, + { &vop_reclaim_desc, (vop_t *) rootfs_reclaim }, + { &vop_unlock_desc, (vop_t *) vop_stdunlock }, + { NULL, NULL } +}; +static struct vnodeopv_desc rootfs_vnodeop_opv_desc = + { &rootfs_vnodeop_p, rootfs_vnodeop_entries }; + +VNODEOP_SET(rootfs_vnodeop_opv_desc); + +/* + * Returns with the root vnode locked. + */ +void +rootfs_init() +{ + struct thread *td; + struct vnode *vp; + int error; + + td = curthread; + error = rootfs_allocv(rootfs_nodes, &vp, td); + vp->v_type = VDIR; + vp->v_flag |= VROOT; + rootvnode = vp; +} + +/* + * Release our vnodes. + */ +void +rootfs_fini() +{ + struct rootfs_node *de; + struct vnode *vp; + + de = rootfs_nodes; + while (de->de_type != ROOTFS_NONE) { + if (de->de_vnode != NULL) { + vp = de->de_vnode; + vrele(vp); + } + de++; + } +} + +static int +rootfs_allocv(de, vpp, td) + struct rootfs_node *de; + struct vnode **vpp; + struct thread *td; +{ + struct vnode *vp; + int i; + + i = 0; + +loop: + vp = de->de_vnode; + if (vp != NULL) { + if (vget(vp, LK_EXCLUSIVE, td)) + goto loop; + *vpp = vp; + return (0); + } + + getnewvnode(VT_NON, NULL, rootfs_vnodeop_p, &vp); + vp->v_type = VDIR; + vp->v_data = (void *)de; + de->de_vnode = vp; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + *vpp = vp; + return (0); +} Index: kern/init_main.c =================================================================== RCS file: /home/ncvs/src/sys/kern/init_main.c,v retrieving revision 1.194 diff -u -p -r1.194 init_main.c --- kern/init_main.c 2 May 2002 20:27:42 -0000 1.194 +++ kern/init_main.c 19 May 2002 22:58:35 -0000 @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -76,6 +77,8 @@ #include #include +#include + void mi_startup(void); /* Should be elsewhere */ /* Components of the first process -- never freed. */ @@ -487,34 +490,20 @@ start_init(void *dummy) td = curthread; p = td->td_proc; - vfs_mountroot(NULL); - - /* Get the vnode for '/'. Set p->p_fd->fd_cdir to reference it. */ - if (VFS_ROOT(TAILQ_FIRST(&mountlist), &rootvnode)) - panic("cannot find root vnode"); - FILEDESC_LOCK(p->p_fd); - p->p_fd->fd_cdir = rootvnode; - VREF(p->p_fd->fd_cdir); - p->p_fd->fd_rdir = rootvnode; - VREF(p->p_fd->fd_rdir); - FILEDESC_UNLOCK(p->p_fd); - VOP_UNLOCK(rootvnode, 0, td); - - if (devfs_present) { - /* - * For disk based systems, we probably cannot do this yet - * since the fs will be read-only. But a NFS root - * might be ok. It is worth a shot. - */ - error = vn_mkdir("/dev", 0700, UIO_SYSSPACE, td); - if (error == EEXIST) - error = 0; - if (error == 0) - error = kernel_vmount(0, "fstype", "devfs", - "fspath", "/dev", NULL); - if (error != 0) - init_does_devfs = 1; - } + vfs_mountroot(); + /* + * For disk based systems, we probably cannot do this yet + * since the fs will be read-only. But a NFS root + * might be ok. It is worth a shot. + */ + error = vn_mkdir("/dev", 0700, UIO_SYSSPACE, td); + if (error == EEXIST) + error = 0; + if (error == 0) + error = kernel_vmount(0, "fstype", "devfs", + "fspath", "/dev", NULL); + if (error) + init_does_devfs = 1; /* * Need just enough stack to hold the faked-up "execve()" arguments. Index: kern/vfs_conf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_conf.c,v retrieving revision 1.68 diff -u -p -r1.68 vfs_conf.c --- kern/vfs_conf.c 17 Apr 2002 13:06:36 -0000 1.68 +++ kern/vfs_conf.c 19 May 2002 23:33:55 -0000 @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,8 @@ #include #include +#include + #include "opt_ddb.h" #ifdef DDB @@ -100,7 +103,7 @@ dev_t rootdev = NODEV; * Find and mount the root filesystem */ void -vfs_mountroot(void *foo __unused) +vfs_mountroot(void) { char *cp; int i, error; @@ -181,20 +184,20 @@ vfs_mountroot(void *foo __unused) static int vfs_mountroot_try(char *mountfrom) { - struct mount *mp; - char *vfsname, *path; - int error; - char patt[32]; - int s; - - vfsname = NULL; - path = NULL; - mp = NULL; - error = EINVAL; + struct thread *td; + struct mount *mp; + struct nameidata nd; + struct proc *p; + struct vnode *vp; + char *vfsname, *path; + char patt[32]; + int error, mntflags, s; if (mountfrom == NULL) - return(error); /* don't complain */ + return (EINVAL); /* don't complain */ + td = curthread; + p = td->td_proc; s = splcam(); /* Overkill, but annoying without it */ printf("Mounting root from %s\n", mountfrom); splx(s); @@ -202,63 +205,91 @@ vfs_mountroot_try(char *mountfrom) /* parse vfs name and path */ vfsname = malloc(MFSNAMELEN, M_MOUNT, M_WAITOK); path = malloc(MNAMELEN, M_MOUNT, M_WAITOK); - vfsname[0] = path[0] = 0; + vfsname[0] = path[0] = '\0'; sprintf(patt, "%%%d[a-z0-9]:%%%ds", MFSNAMELEN, MNAMELEN); - if (sscanf(mountfrom, patt, vfsname, path) < 1) - goto done; - - /* allocate a root mount */ - error = vfs_rootmountalloc(vfsname, path[0] != 0 ? path : ROOTNAME, - &mp); - if (error != 0) { - printf("Can't allocate root mount for filesystem '%s': %d\n", - vfsname, error); + if (sscanf(mountfrom, patt, vfsname, path) < 1) { + error = EINVAL; goto done; } - mp->mnt_flag |= MNT_ROOTFS; /* do our best to set rootdev */ if ((path[0] != 0) && setrootbyname(path)) printf("setrootbyname failed\n"); + rootfs_init(); + + /* + * Set cdir and rdir to make namei() work. + */ + FILEDESC_LOCK(p->p_fd); + p->p_fd->fd_cdir = rootvnode; + VREF(p->p_fd->fd_cdir); + p->p_fd->fd_rdir = rootvnode; + VREF(p->p_fd->fd_rdir); + FILEDESC_UNLOCK(p->p_fd); + VOP_UNLOCK(rootvnode, 0, td); + + error = kernel_vmount(0, "fstype", "devfs", "fspath", "/dev", NULL); + if (error) + panic("%s: unable to mount devfs on rootfs, error = %d", + __func__, error); + /* If the root device is a type "memory disk", mount RW */ if (rootdev != NODEV && devsw(rootdev) && (devsw(rootdev)->d_flags & D_MEMDISK)) - mp->mnt_flag &= ~MNT_RDONLY; + mntflags = 0; + else + mntflags = MNT_RDONLY; + + error = kernel_vmount(mntflags, "fstype", vfsname, "fspath", "/root", + "from", path, NULL); + if (error) + panic("%s: unable to mount root filesystem, error = %d", + __func__, error); + /* Unmount devfs. */ + error = kernel_umount("/dev", MNT_FORCE, td); + if (error) + panic("%s: unable to unmount devfs, error = %d\n", + __func__, error); + /* + * Do the vnode translation trick. + * Here we assume that rootfs mounted the real + * fs in /root. + */ + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, "/root", td); + if ((error = namei(&nd)) != 0) + panic("%s: can't find /root vnode, error = %d", + __func__, error); + vp = nd.ni_vp; + NDFREE(&nd, NDF_ONLY_PNBUF); + rootvnode = vp; + mp = vp->v_mount; /* - * Set the mount path to be something useful, because the - * filesystem code isn't responsible now for initialising - * f_mntonname unless they want to override the default - * (which is `path'.) + * f_mntonname now contains "/root", change it to "/". */ strncpy(mp->mnt_stat.f_mntonname, "/", MNAMELEN); + rootfs_fini(); - error = VFS_MOUNT(mp, NULL, NULL, NULL, curthread); + /* + * Properly reset the filedesc structure with the new rootvnode. + */ + FILEDESC_LOCK(p->p_fd); + vrele(p->p_fd->fd_cdir); + p->p_fd->fd_cdir = rootvnode; + VREF(p->p_fd->fd_cdir); + vrele(p->p_fd->fd_rdir); + p->p_fd->fd_rdir = rootvnode; + VREF(p->p_fd->fd_rdir); + FILEDESC_UNLOCK(p->p_fd); + VOP_UNLOCK(rootvnode, 0, td); done: - if (vfsname != NULL) - free(vfsname, M_MOUNT); - if (path != NULL) - free(path, M_MOUNT); - if (error != 0) { - if (mp != NULL) { - vfs_unbusy(mp, curthread); - free(mp, M_MOUNT); - } + if (error) printf("Root mount failed: %d\n", error); - } else { - - /* register with list of mounted filesystems */ - mtx_lock(&mountlist_mtx); - TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list); - mtx_unlock(&mountlist_mtx); - - /* sanity check system clock against root filesystem timestamp */ + else /* initialize the time of day register */ inittodr(mp->mnt_time); - vfs_unbusy(mp, curthread); - } - return(error); + return (error); } /* Index: kern/vfs_syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v retrieving revision 1.253 diff -u -p -r1.253 vfs_syscalls.c --- kern/vfs_syscalls.c 14 May 2002 21:59:49 -0000 1.253 +++ kern/vfs_syscalls.c 18 May 2002 16:12:00 -0000 @@ -434,7 +434,6 @@ vfs_nmount(td, fsflags, fsoptions) mp->mnt_flag |= fsflags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE | MNT_SNAPSHOT); VOP_UNLOCK(vp, 0, td); - mp->mnt_optnew = optlist; goto update; } /* @@ -528,8 +527,8 @@ vfs_nmount(td, fsflags, fsoptions) mp->mnt_iosize_max = DFLTPHYS; VOP_UNLOCK(vp, 0, td); - mp->mnt_opt = optlist; update: + mp->mnt_optnew = optlist; /* * Check if the fs implements the new VFS_NMOUNT() * function, since the new system call was used. @@ -567,6 +566,17 @@ update: * get. No freeing of cn_pnbuf. */ error = VFS_NMOUNT(mp, &nd, td); + if (!error) { + if (mp->mnt_opt != NULL) + vfs_freeopts(mp->mnt_opt); + mp->mnt_opt = mp->mnt_optnew; + } else + vfs_freeopts(mp->mnt_optnew); + /* + * Prevent external consumers of mount + * options to read mnt_optnew. + */ + mp->mnt_optnew = NULL; if (mp->mnt_flag & MNT_UPDATE) { if (mp->mnt_kern_flag & MNTK_WANTRDWR) mp->mnt_flag &= ~MNT_RDONLY; @@ -576,10 +586,6 @@ update: if (error) { mp->mnt_flag = flag; mp->mnt_kern_flag = kern_flag; - vfs_freeopts(mp->mnt_optnew); - } else { - vfs_freeopts(mp->mnt_opt); - mp->mnt_opt = mp->mnt_optnew; } if ((mp->mnt_flag & MNT_RDONLY) == 0) { if (mp->mnt_syncer == NULL) @@ -619,10 +625,8 @@ update: if ((mp->mnt_flag & MNT_RDONLY) == 0) error = vfs_allocate_syncvnode(mp); vfs_unbusy(mp, td); - if ((error = VFS_START(mp, 0, td)) != 0) { + if ((error = VFS_START(mp, 0, td)) != 0) vrele(vp); - goto bad; - } } else { mtx_lock(&vp->v_interlock); vp->v_flag &= ~VMOUNT; @@ -631,9 +635,8 @@ update: vfs_unbusy(mp, td); free((caddr_t)mp, M_MOUNT); vput(vp); - goto bad; } - return (0); + return (error); bad: vfs_freeopts(optlist); return (error); @@ -1185,6 +1188,30 @@ dounmount(mp, flags, td) vfs_freeopts(mp->mnt_opt); free((caddr_t)mp, M_MOUNT); return (0); +} + +int +kernel_umount(path, flags, td) + const char *path; + int flags; + struct thread *td; +{ + struct mount *mp; + struct nameidata nd; + struct vnode *vp; + int error; + + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, path, td); + if ((error = namei(&nd)) != 0) + return (error); + vp = nd.ni_vp; + NDFREE(&nd, NDF_ONLY_PNBUF); + mp = vp->v_mount; + KASSERT(vp->v_flag & VROOT, ("%s(%s): vnode is not VROOT", + __func__, path)); + vput(vp); + error = dounmount(mp, flags, td); + return (error); } /* Index: ufs/ffs/ffs_extern.h =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_extern.h,v retrieving revision 1.47 diff -u -p -r1.47 ffs_extern.h --- ufs/ffs/ffs_extern.h 19 Mar 2002 22:40:46 -0000 1.47 +++ ufs/ffs/ffs_extern.h 11 May 2002 16:39:26 -0000 @@ -71,9 +71,7 @@ int ffs_isblock(struct fs *, u_char *, u int ffs_isfreeblock(struct fs *, unsigned char *, ufs_daddr_t); int ffs_mountfs(struct vnode *, struct mount *, struct thread *, struct malloc_type *); -int ffs_mountroot(void); -int ffs_mount(struct mount *, char *, caddr_t, struct nameidata *, - struct thread *); +int ffs_mount(struct mount *, struct nameidata *, struct thread *); int ffs_reallocblks(struct vop_reallocblks_args *); int ffs_realloccg(struct inode *, ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **); Index: ufs/ffs/ffs_snapshot.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_snapshot.c,v retrieving revision 1.35 diff -u -p -r1.35 ffs_snapshot.c --- ufs/ffs/ffs_snapshot.c 12 May 2002 20:21:40 -0000 1.35 +++ ufs/ffs/ffs_snapshot.c 16 May 2002 22:22:07 -0000 @@ -138,7 +138,7 @@ ffs_snapshot(mp, snapfile) * Create the snapshot file. */ restart: - NDINIT(&nd, CREATE, LOCKPARENT | LOCKLEAF, UIO_USERSPACE, snapfile, td); + NDINIT(&nd, CREATE, LOCKPARENT | LOCKLEAF, UIO_SYSSPACE, snapfile, td); if ((error = namei(&nd)) != 0) return (error); if (nd.ni_vp != NULL) { Index: ufs/ffs/ffs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_vfsops.c,v retrieving revision 1.178 diff -u -p -r1.178 ffs_vfsops.c --- ufs/ffs/ffs_vfsops.c 13 May 2002 09:22:28 -0000 1.178 +++ ufs/ffs/ffs_vfsops.c 16 May 2002 23:39:18 -0000 @@ -72,7 +72,7 @@ static int ffs_oldfscompat(struct fs *); static int ffs_init(struct vfsconf *); static struct vfsops ufs_vfsops = { - ffs_mount, + NULL, ufs_start, ffs_unmount, ufs_root, @@ -90,6 +90,7 @@ static struct vfsops ufs_vfsops = { #else vfs_stdextattrctl, #endif + ffs_mount, }; VFS_SET(ufs_vfsops, ufs, 0); @@ -100,17 +101,8 @@ VFS_SET(ufs_vfsops, ufs, 0); * Called when mounting local physical media * * PARAMETERS: - * mountroot - * mp mount point structure - * path NULL (flag for root mount!!!) - * data - * ndp - * p process (user credentials check [statfs]) - * * mount * mp mount point structure - * path path to mount point - * data pointer to argument struct in user space * ndp mount point namei() return (used for * credentials on reload), reused to look * up block device. @@ -126,47 +118,32 @@ VFS_SET(ufs_vfsops, ufs, 0); * EXIT * mount point is locked * - * NOTES: - * A NULL path can be used for a flag since the mount - * system call will fail with EFAULT in copyinstr in - * namei() if it is a genuine NULL from the user. */ int -ffs_mount(mp, path, data, ndp, td) +ffs_mount(mp, ndp, td) struct mount *mp; /* mount struct pointer*/ - char *path; /* path to mount point*/ - caddr_t data; /* arguments to FS specific mount*/ struct nameidata *ndp; /* mount point credentials*/ struct thread *td; /* process requesting mount*/ { - size_t size; struct vnode *devvp; - struct ufs_args args; struct ufsmount *ump = 0; + struct vfsoptlist *opts; struct fs *fs; - int error, flags; + struct export_args export; + char *path, *fspec; + int error, flags, len; mode_t accessmode; + opts = mp->mnt_optnew; /* - * Use NULL path to indicate we are mounting the root file system. - */ - if (path == NULL) { - if ((error = bdevvp(rootdev, &rootvp))) { - printf("ffs_mountroot: can't find rootvp\n"); - return (error); - } - - if ((error = ffs_mountfs(rootvp, mp, td, M_FFSNODE)) != 0) - return (error); - (void)VFS_STATFS(mp, &mp->mnt_stat, td); - return (0); - } - - /* - * Mounting non-root file system or updating a file system + * The fspath mount option is always present + * and is always a string. */ - if ((error = copyin(data, (caddr_t)&args, sizeof(struct ufs_args)))!= 0) - return (error); + vfs_getopt(opts, "fspath", (void **)&path, NULL); + fspec = NULL; + error = vfs_getopt(opts, "from", (void **)&fspec, &len); + if (!error && fspec[len - 1] != '\0') + return (EINVAL); /* * If updating, check whether changing from read-only to @@ -280,20 +257,27 @@ ffs_mount(mp, path, data, ndp, td) /* * If not updating name, process export requests. */ - if (args.fspec == 0) - return (vfs_export(mp, &args.export)); + if (fspec == NULL) { + error = vfs_getopt(opts, "export", (void **)&export, + &len); + if (error || len != sizeof(struct export_args)) + return (EINVAL); + return (vfs_export(mp, &export)); + } /* * If this is a snapshot request, take the snapshot. */ if (mp->mnt_flag & MNT_SNAPSHOT) - return (ffs_snapshot(mp, args.fspec)); + return (ffs_snapshot(mp, fspec)); } /* * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); + if (fspec == NULL) + return (EINVAL); + NDINIT(ndp, LOOKUP, FOLLOW, UIO_SYSSPACE, fspec, td); if ((error = namei(ndp)) != 0) return (error); NDFREE(ndp, NDF_ONLY_PNBUF); @@ -350,8 +334,8 @@ ffs_mount(mp, path, data, ndp, td) /* * Save "mounted from" device name info for mount point (NULL pad). */ - copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); - bzero( mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); + strncpy(mp->mnt_stat.f_mntfromname, fspec, MNAMELEN - 1); + mp->mnt_stat.f_mntfromname[MNAMELEN] = '\0'; /* * Initialize filesystem stat information in mount struct. */ --JwB53PgKC5A7+0Ej-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 4: 7:46 2002 Delivered-To: freebsd-arch@freebsd.org Received: from vbook.express.ru (asplinux.ru [195.133.213.194]) by hub.freebsd.org (Postfix) with ESMTP id 55F6137B40A; Tue, 21 May 2002 04:07:37 -0700 (PDT) Received: from vova by vbook.express.ru with local (Exim 3.36 #1) id 17A7UN-000A7i-00; Tue, 21 May 2002 15:07:35 +0400 Subject: Re: cvs commit: src Makefile.inc1 src/usr.bin/elf2aout elf2aout.c From: "Vladimir B. " Grebenschikov To: Ruslan Ermilov Cc: David O'Brien , Jake Burkholder , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, arch@freebsd.org In-Reply-To: <20020521075006.GC53675@sunbay.com> References: <200205201442.g4KEgnK08485@freefall.freebsd.org> <20020520144724.GB73296@sunbay.com> <20020520121640.B62759@locore.ca> <20020520161035.GQ73296@sunbay.com> <20020520122736.C62759@locore.ca> <20020520172004.GA96582@sunbay.com> <20020520165910.A77554@dragon.nuxi.com> <20020521075006.GC53675@sunbay.com> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Mailer: Ximian Evolution 1.0.5 Date: 21 May 2002 15:07:35 +0400 Message-Id: <1021979255.24428.39.camel@vbook.express.ru> Mime-Version: 1.0 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG =F7 Tue, 21.05.2002, =D7 11:50, Ruslan Ermilov =CE=C1=D0=C9=D3=C1=CC: > > > I expect that by time we release 5.0, we will officially support > > > X.any -> X+1.0 upgrade paths (including cross-updates). > >=20 > > Uh, no. Discuss this amongst all the developers before you push your > > personal desire on all of us. > >=20 > I would probably scare you, some would even like to see FreeBSD can > build on any POSIX.1-YYYY compliant system. :-) Hm seems good idea. I have tried to build Linux kernel in FreeBSD environment - success, but FreeBSD kernel in Linux envirnment - fail :-( > Cheers, > --=20 > Ruslan Ermilov Sysadmin and DBA, > ru@sunbay.com Sunbay Software AG, > ru@FreeBSD.org FreeBSD committer, > +380.652.512.251 Simferopol, Ukraine >=20 > http://www.FreeBSD.org The Power To Serve > http://www.oracle.com Enabling The Information Age --=20 Vladimir B. Grebenschikov vova@sw.ru, SWsoft, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 6:34:49 2002 Delivered-To: freebsd-arch@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id C389037B408; Tue, 21 May 2002 06:34:42 -0700 (PDT) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.3/8.12.3) with SMTP id g4LDYNb5021157; Tue, 21 May 2002 09:34:23 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 21 May 2002 09:34:23 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Maxime Henrion Cc: arch@freebsd.org Subject: Re: a virtual fs to allow root mounting of any fs without special code In-Reply-To: <20020520212459.GH496@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Spiffy. Once the nmount conversion is done, I'd love to have this in the base system. As we discussed out of band, my only real concern was that it wasn't quite a "real mount" in the sense that you don't use a 'struct mount' when bootstrapping. And, as we discussed, that's probably fine for this limited scenario, from my perspective, although you don't want people doing "mount -t rootfs foo /mnt" or anything. I'd be interested in hearing from others if they think the lack of a "heavy weight mount" is a problem. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services On Mon, 20 May 2002, Maxime Henrion wrote: > Hello all, > > > I've written a small virtual filesystem called rootfs which solves the > chicken and egg problem of root mounting quite nicely. Currently, we > need special code in each filesystem to allow root mounting. The reason > for this is that the VFS_MOUNT operations of the filesystems generally > need to do a lookup to get a device file (e.g. /dev/ad0s1a), so they > need devfs to be there, and they need lookups to work. > > rootfs is nothing more than a 3-vnodes filesystem (/, /dev and /root). > To mount the root filesystem with rootfs, I do the following : > > - initialize rootfs > - mount devfs on /dev (on top of rootfs) > - mount the real fs on /root > - umount devfs from /dev > - translate vnodes so that / is now the /root > - remount devfs on /dev (on top of the real fs) > - terminate rootfs > > The attached patch implements the above idea with several restrictions. > First, the filesystem has to be converted to the nmount(2) API for this > to work (of course you also need devfs but it is the default). Second, > this patch includes the bits necessary to convert ufs to nmount, but not > the various userland updates that are needed to get this to work (I've > got those in my tree, but I wait for UFS2 to be committed to avoid > unnecessary conflicts). I just give it as a proof of concept, since it > runs fine on my box, but don't try to compile a kernel with it :-P > > I also have converted cd9660fs to nmount here and I will test it as soon > as possible, but it's likely to work without further modifications. NFS > will require a bit more tricks however (it apparently has to configure > the interface with ifioctl() before being able to talk to the server). > > Comments are of course much appreciated. > > Cheers, > Maxime > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 13:30: 6 2002 Delivered-To: freebsd-arch@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 7A1F937B405 for ; Tue, 21 May 2002 13:30:02 -0700 (PDT) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id NAA80390 for ; Tue, 21 May 2002 13:27:44 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g4LKRD058396 for freebsd-arch@freebsd.org; Tue, 21 May 2002 13:27:13 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200205212027.g4LKRD058396@arch20m.dellroad.org> Subject: question about atomic.h To: freebsd-arch@freebsd.org Date: Tue, 21 May 2002 13:27:13 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi- I'm trying to understand the logic behind the atomic_{add,subtract}_{char,short,int,long}() functions. Looking at i386/include/atomic.h, it appears all of these functions return void. It seems like they would be more useful if they returned the new value.. is that possible? In any case, the comment is misleading in this respect-- it should include a (void) cast, e.g.: -atomic_add_short(P, V) (*(u_short*)(P) += (V)) +atomic_add_short(P, V) (void)(*(u_short*)(P) += (V)) The example in mind is a function that decrements a reference count on an object without obtaining the object's mutex. If the ref count goes to zero you want to free the object (and in this case there is no need to acquire the mutex because you have the only reference). With atomic_subtract_int() returning void, there's no way to do that without acquiring the mutex, because you can't atomically decrement *and* read the reference count. Thanks for any insights, -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 13:43:25 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id ECF2B37B404 for ; Tue, 21 May 2002 13:43:18 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id C55ACAE25A; Tue, 21 May 2002 13:43:18 -0700 (PDT) Date: Tue, 21 May 2002 13:43:18 -0700 From: Alfred Perlstein To: Archie Cobbs Cc: freebsd-arch@freebsd.org Subject: Re: question about atomic.h Message-ID: <20020521204318.GJ54960@elvis.mu.org> References: <200205212027.g4LKRD058396@arch20m.dellroad.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200205212027.g4LKRD058396@arch20m.dellroad.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Archie Cobbs [020521 13:30] wrote: > > With atomic_subtract_int() returning void, there's no way to do > that without acquiring the mutex, because you can't atomically > decrement *and* read the reference count. Check the mbuf subsystem for the way they do the atomic "decerement and let me know if it went to zero" operation. it's something like atomic_int_acq or something. :) -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 13:58:39 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by hub.freebsd.org (Postfix) with ESMTP id D8D0D37B407 for ; Tue, 21 May 2002 13:58:35 -0700 (PDT) Received: (qmail 15257 invoked from network); 21 May 2002 20:58:34 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 21 May 2002 20:58:34 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g4LKwWF96221; Tue, 21 May 2002 16:58:32 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020521204318.GJ54960@elvis.mu.org> Date: Tue, 21 May 2002 16:58:09 -0400 (EDT) From: John Baldwin To: Alfred Perlstein Subject: Re: question about atomic.h Cc: freebsd-arch@freebsd.org, Archie Cobbs Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 21-May-2002 Alfred Perlstein wrote: > * Archie Cobbs [020521 13:30] wrote: >> >> With atomic_subtract_int() returning void, there's no way to do >> that without acquiring the mutex, because you can't atomically >> decrement *and* read the reference count. > > Check the mbuf subsystem for the way they do the atomic "decerement > and let me know if it went to zero" operation. > > it's something like atomic_int_acq or something. :) You can use an atomic_cmpset loop, but it would be nice to have a atomic_fetchadd() that did the add and returned the value. We can't return that value using normal x86 'addl %eax,[foo_mem]' since there would be a race to read the value at foo_mem to return it again. On x86 we can use the 486+ xadd instruction to do this, but that is what atomic_fetchadd() would basically be. However, this could be used to implement a little refcount API that would remove the need for mutexes that just protect simple refcounts. It's on the todo list (well, should be.) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 14:17:25 2002 Delivered-To: freebsd-arch@freebsd.org Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id 78D3A37B408; Tue, 21 May 2002 14:17:19 -0700 (PDT) Received: from pool0213.cvx22-bradley.dialup.earthlink.net ([209.179.198.213] helo=mindspring.com) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #2) id 17AH0Q-00053A-00; Tue, 21 May 2002 14:17:18 -0700 Message-ID: <3CEAB940.25FC9F7B@mindspring.com> Date: Tue, 21 May 2002 14:16:48 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Robert Watson Cc: Maxime Henrion , arch@freebsd.org Subject: Re: a virtual fs to allow root mounting of any fs without special code References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Robert Watson wrote: > Spiffy. Once the nmount conversion is done, I'd love to have this in the > base system. As we discussed out of band, my only real concern was that > it wasn't quite a "real mount" in the sense that you don't use a 'struct > mount' when bootstrapping. And, as we discussed, that's probably fine for > this limited scenario, from my perspective, although you don't want people > doing "mount -t rootfs foo /mnt" or anything. I'd be interested in > hearing from others if they think the lack of a "heavy weight mount" is a > problem. You need to do exactly what you said you don't want people doing, in order to achieve proper jails that are indistinguishable by way of the root mounts. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 14:30:40 2002 Delivered-To: freebsd-arch@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 3221037B410; Tue, 21 May 2002 14:30:35 -0700 (PDT) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.3/8.12.3) with SMTP id g4LLUCb5026107; Tue, 21 May 2002 17:30:16 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 21 May 2002 17:30:11 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Terry Lambert Cc: Maxime Henrion , arch@freebsd.org Subject: Re: a virtual fs to allow root mounting of any fs without special code In-Reply-To: <3CEAB940.25FC9F7B@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 21 May 2002, Terry Lambert wrote: > Robert Watson wrote: > > Spiffy. Once the nmount conversion is done, I'd love to have this in the > > base system. As we discussed out of band, my only real concern was that > > it wasn't quite a "real mount" in the sense that you don't use a 'struct > > mount' when bootstrapping. And, as we discussed, that's probably fine for > > this limited scenario, from my perspective, although you don't want people > > doing "mount -t rootfs foo /mnt" or anything. I'd be interested in > > hearing from others if they think the lack of a "heavy weight mount" is a > > problem. > > You need to do exactly what you said you don't want people doing, in > order to achieve proper jails that are indistinguishable by way of the > root mounts. What I'm saying is that if it's a limited-purpose file system that doesn't follow the normal conventions for vnodes and their relationship to a struct mount, we need to prevent people from mis-using the file system, as it will violate existing code assumptions about the presence of a struct mount under certain circumstances. If we would like people to be able to mount it just about anywhere following boot (as with any other synthetic file system), we'll need a heavy-weight struct mount, which rootfs currently doesn't have. That said, I'm not sure what you're saying applies. There's nothing special about "rootfs" itself, it's pretty minimalist, what's special about it is that it gives you a place to stick devfs during the bootstrap (etc) so that you can get rid of special mountroot mounting procedures for other file systems. I.e., the magic in Maxime's patch is in the general-purpose root mounting case in the boot code, not in rootfs itself. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 14:45:25 2002 Delivered-To: freebsd-arch@freebsd.org Received: from falcon.prod.itd.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id C0F4137B410; Tue, 21 May 2002 14:45:18 -0700 (PDT) Received: from pool0213.cvx22-bradley.dialup.earthlink.net ([209.179.198.213] helo=mindspring.com) by falcon.prod.itd.earthlink.net with esmtp (Exim 3.33 #2) id 17AHRV-0000u7-00; Tue, 21 May 2002 14:45:18 -0700 Message-ID: <3CEABFCF.35B80817@mindspring.com> Date: Tue, 21 May 2002 14:44:47 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Robert Watson Cc: Maxime Henrion , arch@freebsd.org Subject: Re: a virtual fs to allow root mounting of any fs without special code References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Robert Watson wrote: > > You need to do exactly what you said you don't want people doing, in > > order to achieve proper jails that are indistinguishable by way of the > > root mounts. > > What I'm saying is that if it's a limited-purpose file system that doesn't > follow the normal conventions for vnodes and their relationship to a > struct mount, we need to prevent people from mis-using the file system, as > it will violate existing code assumptions about the presence of a struct > mount under certain circumstances. If we would like people to be able to > mount it just about anywhere following boot (as with any other synthetic > file system), we'll need a heavy-weight struct mount, which rootfs > currently doesn't have. I think if it's integrated, it needs a "struct mount". Personally, I'd like to see the "real" root union mounted over it. > That said, I'm not sure what you're saying applies. There's nothing > special about "rootfs" itself, it's pretty minimalist, what's special > about it is that it gives you a place to stick devfs during the bootstrap > (etc) so that you can get rid of special mountroot mounting procedures for > other file systems. I.e., the magic in Maxime's patch is in the > general-purpose root mounting case in the boot code, not in rootfs itself. I was really torn on this patch, so I didn't say anything previously: it implements part of one of my suggestions, but it tends to encourage people to not implement the correct solution to root vs. non-root mounting, since it offers a workable workaround to doing the right thing (seperating the mount-into-mountlist from the mount-into-fs-hierarchy is the cannonically correct approach). Now that you've implied the very thing I feared, I guess I need to say something. I would be really unhappy if the mount during boot ended up being significantly different than the mounting after boot. 8-(. There really needs to be a new VFSOP "MOUNTEDON", used to set the "last mounted on" information, which is the main difference (from an FS perspective) between root and non-root mounts. The vnode overlay is also a difference, but it's really obvious how this could be handed in an FS independent manner in higher level FS independent code (this is where the mount-into-fs-hierarchy should be done). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 15:57:21 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 473B037B405 for ; Tue, 21 May 2002 15:57:14 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1920) id 1C78BAE03F; Tue, 21 May 2002 15:57:14 -0700 (PDT) Date: Tue, 21 May 2002 15:57:14 -0700 From: Maxime Henrion To: arch@FreeBSD.org Cc: Terry Lambert Subject: Re: a virtual fs to allow root mounting of any fs without special code Message-ID: <20020521225713.GJ496@elvis.mu.org> References: <3CEABFCF.35B80817@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CEABFCF.35B80817@mindspring.com> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Terry Lambert wrote: > Robert Watson wrote: > > > You need to do exactly what you said you don't want people doing, in > > > order to achieve proper jails that are indistinguishable by way of the > > > root mounts. > > > > What I'm saying is that if it's a limited-purpose file system that doesn't > > follow the normal conventions for vnodes and their relationship to a > > struct mount, we need to prevent people from mis-using the file system, as > > it will violate existing code assumptions about the presence of a struct > > mount under certain circumstances. If we would like people to be able to > > mount it just about anywhere following boot (as with any other synthetic > > file system), we'll need a heavy-weight struct mount, which rootfs > > currently doesn't have. > > I think if it's integrated, it needs a "struct mount". Why ? I used to have a "struct mount" in my code. It's just not needed, and makes the code bigger. I've monitored all VOP calls during the root mounting sequence. rootfs never gets called from anything else but the code I added in vfs_conf.c and by the VFS_MOUNT functions of the root filesystem (which is the purpose of it). All 3 vnodes get recycled after the root mounting (VOP_RECLAIM + VOP_INACTIVE). > Personally, I'd like to see the "real" root union mounted over it. I've already tried this. There are exactly 3 hooks for MNT_UNION in the code, one in lookup(), one in getdirentries(), and one in getdirentries(). If you look at the code, you will see that these hooks only occur when looking for a file while at the VROOT vnode. So when I have devfs in /dev (as I need it to be for the filesystem to mount) and when I mount the real fs on top of it on /, the mount union is actually between the real fs and rootfs, which in my tests was getting lookup for /.profile (as I don't have it on my real fs). To have MNT_UNION working you would need to ensure that the real fs has no /dev directory (an empty /dev is not enough), so that the lookup for "/dev" fails and that you are able to give the devfs /dev for hte rest of the lookup to work. It also has the disadvantage of leaving rootfs active in the kernel during its whole lifetime whereas in my code it gets only used at root mounting. There is however one thing I could do to simplify rootfs even more, which is before mounting the real fs on /, do a lookup for /dev, retain the vnode, then mount the real fs normally on /, and call dounmount() to unmount the devfs under it after this. This could reduce rootfs to a 2-vnodes filesystem but I didn't test it yet. > > That said, I'm not sure what you're saying applies. There's nothing > > special about "rootfs" itself, it's pretty minimalist, what's special > > about it is that it gives you a place to stick devfs during the bootstrap > > (etc) so that you can get rid of special mountroot mounting procedures for > > other file systems. I.e., the magic in Maxime's patch is in the > > general-purpose root mounting case in the boot code, not in rootfs itself. > > I was really torn on this patch, so I didn't say anything > previously: it implements part of one of my suggestions, but > it tends to encourage people to not implement the correct > solution to root vs. non-root mounting, since it offers a > workable workaround to doing the right thing (seperating the > mount-into-mountlist from the mount-into-fs-hierarchy is the > cannonically correct approach). > > Now that you've implied the very thing I feared, I guess I > need to say something. > > I would be really unhappy if the mount during boot ended up > being significantly different than the mounting after boot. > 8-(. Fine, my patch precisely intends to make them the same, since with it we are now able to mount the root filesystem the very same way we mount other filesystems, that is, via their VFS_MOUNT function without any special code. BTW, if you use MNT_UNION, you are the one making things more different. > There really needs to be a new VFSOP "MOUNTEDON", used to set > the "last mounted on" information, which is the main difference > (from an FS perspective) between root and non-root mounts. The > vnode overlay is also a difference, but it's really obvious how > this could be handed in an FS independent manner in higher level > FS independent code (this is where the mount-into-fs-hierarchy > should be done). I don't think I understand what you're saying. Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 17:33:12 2002 Delivered-To: freebsd-arch@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 2C9BB37B405; Tue, 21 May 2002 17:33:05 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 22 May 2002 01:33:04 +0100 (BST) To: Maxime Henrion Cc: arch@freebsd.org, Terry Lambert Subject: Re: a virtual fs to allow root mounting of any fs without special code In-Reply-To: Your message of "Tue, 21 May 2002 15:57:14 PDT." <20020521225713.GJ496@elvis.mu.org> Date: Wed, 22 May 2002 01:33:02 +0100 From: Ian Dowse Message-ID: <200205220133.aa58608@salmon.maths.tcd.ie> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20020521225713.GJ496@elvis.mu.org>, Maxime Henrion writes: >There is however one thing I could do to simplify rootfs even more, >which is before mounting the real fs on /, do a lookup for /dev, retain >the vnode, then mount the real fs normally on /, and call dounmount() to >unmount the devfs under it after this. This could reduce rootfs to a >2-vnodes filesystem but I didn't test it yet. Of course, one further simplification would be to do away with rootfs entirely; mount devfs on /, create a "dev -> ." symlink within devfs, mount the real root, and then unmount the underlying devfs :-) Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Tue May 21 17:41:58 2002 Delivered-To: freebsd-arch@freebsd.org Received: from evilpete.dyndns.org (12-232-26-46.client.attbi.com [12.232.26.46]) by hub.freebsd.org (Postfix) with ESMTP id D1EE837B406; Tue, 21 May 2002 17:41:54 -0700 (PDT) Received: from overcee.wemm.org ([10.0.0.3]) by evilpete.dyndns.org (8.11.6/8.11.6) with ESMTP id g4M0fs131155; Tue, 21 May 2002 17:41:54 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id CDF5B3A9A; Tue, 21 May 2002 17:41:53 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Maxime Henrion Cc: arch@FreeBSD.ORG Subject: Re: a virtual fs to allow root mounting of any fs without special code In-Reply-To: <20020520212459.GH496@elvis.mu.org> Date: Tue, 21 May 2002 17:41:53 -0700 From: Peter Wemm Message-Id: <20020522004153.CDF5B3A9A@overcee.wemm.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Maxime Henrion wrote: > I've written a small virtual filesystem called rootfs which solves the > chicken and egg problem of root mounting quite nicely. Currently, we > need special code in each filesystem to allow root mounting. The reason > for this is that the VFS_MOUNT operations of the filesystems generally > need to do a lookup to get a device file (e.g. /dev/ad0s1a), so they > need devfs to be there, and they need lookups to work. > > rootfs is nothing more than a 3-vnodes filesystem (/, /dev and /root). > To mount the root filesystem with rootfs, I do the following : > > - initialize rootfs > - mount devfs on /dev (on top of rootfs) > - mount the real fs on /root > - umount devfs from /dev > - translate vnodes so that / is now the /root > - remount devfs on /dev (on top of the real fs) > - terminate rootfs You know, this sounds an awful lot like what linux does with their 'initrd' ramdisk and pivot_root(2). The main difference is that instead of the rootfs being a synthetic file system, it is a real file system that is read/write mounted and you can have init etc living in there. One thing you didn't clarify above, where does starting init live in the sequence of events above? Or is this all pre-exec-init stage? It would be nice to be able to fsck/remount the /root fs while we have the devfs nodes available. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Wed May 22 5:36:13 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id A66D237B40F for ; Wed, 22 May 2002 05:36:10 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1920) id 80FA3AE1CA; Wed, 22 May 2002 05:36:10 -0700 (PDT) Date: Wed, 22 May 2002 05:36:10 -0700 From: Maxime Henrion To: arch@FreeBSD.org Cc: Peter Wemm Subject: Re: a virtual fs to allow root mounting of any fs without special code Message-ID: <20020522123610.GL496@elvis.mu.org> References: <20020520212459.GH496@elvis.mu.org> <20020522004153.CDF5B3A9A@overcee.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020522004153.CDF5B3A9A@overcee.wemm.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Wemm wrote: > Maxime Henrion wrote: > > I've written a small virtual filesystem called rootfs which solves the > > chicken and egg problem of root mounting quite nicely. Currently, we > > need special code in each filesystem to allow root mounting. The reason > > for this is that the VFS_MOUNT operations of the filesystems generally > > need to do a lookup to get a device file (e.g. /dev/ad0s1a), so they > > need devfs to be there, and they need lookups to work. > > > > rootfs is nothing more than a 3-vnodes filesystem (/, /dev and /root). > > To mount the root filesystem with rootfs, I do the following : > > > > - initialize rootfs > > - mount devfs on /dev (on top of rootfs) > > - mount the real fs on /root > > - umount devfs from /dev > > - translate vnodes so that / is now the /root > > - remount devfs on /dev (on top of the real fs) > > - terminate rootfs > > You know, this sounds an awful lot like what linux does with their > 'initrd' ramdisk and pivot_root(2). The main difference is that instead > of the rootfs being a synthetic file system, it is a real file system > that is read/write mounted and you can have init etc living in there. > > One thing you didn't clarify above, where does starting init live > in the sequence of events above? Or is this all pre-exec-init stage? > It would be nice to be able to fsck/remount the /root fs while we have the > devfs nodes available. All this is pre-exec-init stage. Cheers, Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Thu May 23 3:14:26 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mail.cscoms.com (mail.cscoms.com [202.183.255.23]) by hub.freebsd.org (Postfix) with ESMTP id 2E88D37B41B for ; Thu, 23 May 2002 03:14:06 -0700 (PDT) Received: from mail.cscoms.com (dial-301.ras-2.bkk.c.cscoms.com [203.170.146.175]) by mail.cscoms.com (8.11.1/8.11.1) with SMTP id g4NAE1J25612 for ; Thu, 23 May 2002 17:14:01 +0700 (GMT) Message-Id: <1022149102.530@cscoms.com> Date: Thu, 23 May 2002 17:18:22 0700 To: freebsd-arch@FreeBSD.org From: "richy" Subject: งาน Part Time สร้างรายได้ดี ใช้เทคโนโลยีทำงานแทนคุณ MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII"; format=flowed Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG งาน Part Time ใช้เทคโนโลยีทำงานแทนคุณ ไม่กระทบต่อชีวิตประจำวันของคุณ ไม่ว่าคุณจะเป็นใคร คุณต้องการงานอย่างนี้หรือเปล่า ?? - โอกาสที่จะเป็นเจ้าของกิจการแบบง่าย ๆ - มีธุรกิจของตนเองบน Internet ( E-Commerce ) - เปิดดำเนินงานตลอด 24 ชั่วโมงต่อวัน 7วันต่อสัปดาห์ 365วันในหนึ่งปีไม่มีวันหยุด - เงินลงทุนต่ำ รายได้สูง Part Time 15,000 บาทขึ้นไปต่อเดือน / Full Time 45,000 บาทขึ้นไป - ไม่ต้องจ้างพนักงานขาย ไม่ต้องปวดหัวเรื่องขึ้นค่าแรง การนัดหยุดงาน และไม่ต้องจ่ายสวัสดิการ - ใช้เทคโนโลยีทำงานแทนคุณ ไม่กระทบต่อการดำเนินชีวิตประจำวันของคุณ เพียงแค่วันละ 2-3 ชั่วโมง - ทำงานจากที่ไหนก็ได้ แต่สามารถมีธุรกิจได้ทั่วโลก - ไม่ต้องกักตุนสินค้า ไม่เสี่ยงต่อทุนจม - มีระบบจัดส่งสินค้า ทั้งในและต่างประเทศ - ไม่ใช่การ Knock Door ขายสินค้า แต่ลูกค้าจะวิ่งเข้ามาหาคุณ ฯลฯ ถ้าคุณอยากมีกิจการของตัวเองและยังสามารถใช้เวลาส่วนใหญ่กับสิ่งที่คุณชอบ คุณทำได้แน่นอน พบเราได้ที่นี่ http://www.thaiworkathome.com/win โทร 0-2277-7850 ต่อ 57 ==คุณอาจในได้พบในสิ่งที่คุณหามานานในชีวิตการทำงาน== ขออภัยหากคุณไม่ต้องการแต่ได้รับ mail นี้ หากไม่ต้องการรับข่าวสารจากเราอีก กรุณา CLICK ไปที่ http://www.thaiworkathome.com/unsubscribe.asp กรอก email-address ของท่าน และ submit To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Thu May 23 16:33:43 2002 Delivered-To: freebsd-arch@freebsd.org Received: from evilpete.dyndns.org (12-232-26-46.client.attbi.com [12.232.26.46]) by hub.freebsd.org (Postfix) with ESMTP id 8A72E37B406; Thu, 23 May 2002 16:33:39 -0700 (PDT) Received: from overcee.wemm.org ([10.0.0.3]) by evilpete.dyndns.org (8.11.6/8.11.6) with ESMTP id g4NNXc139906; Thu, 23 May 2002 16:33:39 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 9A812380F; Thu, 23 May 2002 16:33:38 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Maxime Henrion Cc: arch@freebsd.org Subject: Re: a virtual fs to allow root mounting of any fs without special code In-Reply-To: <20020522123610.GL496@elvis.mu.org> Date: Thu, 23 May 2002 16:33:38 -0700 From: Peter Wemm Message-Id: <20020523233338.9A812380F@overcee.wemm.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Maxime Henrion wrote: > Peter Wemm wrote: > > Maxime Henrion wrote: > > > I've written a small virtual filesystem called rootfs which solves the > > > chicken and egg problem of root mounting quite nicely. Currently, we > > > need special code in each filesystem to allow root mounting. The reason > > > for this is that the VFS_MOUNT operations of the filesystems generally > > > need to do a lookup to get a device file (e.g. /dev/ad0s1a), so they > > > need devfs to be there, and they need lookups to work. > > > > > > rootfs is nothing more than a 3-vnodes filesystem (/, /dev and /root). > > > To mount the root filesystem with rootfs, I do the following : > > > > > > - initialize rootfs > > > - mount devfs on /dev (on top of rootfs) > > > - mount the real fs on /root > > > - umount devfs from /dev > > > - translate vnodes so that / is now the /root > > > - remount devfs on /dev (on top of the real fs) > > > - terminate rootfs > > > > You know, this sounds an awful lot like what linux does with their > > 'initrd' ramdisk and pivot_root(2). The main difference is that instead > > of the rootfs being a synthetic file system, it is a real file system > > that is read/write mounted and you can have init etc living in there. > > > > One thing you didn't clarify above, where does starting init live > > in the sequence of events above? Or is this all pre-exec-init stage? > > It would be nice to be able to fsck/remount the /root fs while we have the > > devfs nodes available. > > All this is pre-exec-init stage. So, this is to replace the pre-mountroot bdevvp etc kludges that we have? How do we solve the problem with the root fs being mounted read only and not having a /dev directory? Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Fri May 24 0: 2: 4 2002 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id DFD9737B409; Fri, 24 May 2002 00:01:56 -0700 (PDT) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.3/8.12.2) with ESMTP id g4O710pA005731; Fri, 24 May 2002 09:01:00 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) Date: Fri, 24 May 2002 09:01:00 +0200 Message-ID: <5729.1022223660@critter.freebsd.dk> From: Poul-Henning Kamp Subject: UFS2 patch available MIME-Version: 1.0 Content-Type: multipart/digest; boundary="----- =_aaaaaaaaaa" To: undisclosed-recipients:; Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ------- =_aaaaaaaaaa Subject: UFS2 patch available Date: Fri, 24 May 2002 09:01:00 +0200 Message-ID: <5729.1022223660@critter.freebsd.dk> From: Poul-Henning Kamp Bcc: Blind Distribution List: ; MIME-Version: 1.0 (Forwarded for Kirk:) > I am looking for folks that are willing to try out the changes > for UFS2. A set of diffs (relative to -current as of May 20th) > is available at http://www.freebsd.org:~mckusick/UFS2.tar.gz. > The tarball contains a single directory `UFS2' which is designed > to be placed in /usr/src. It contains a README file with information > on how to apply the patch and how to report problems, so I will > not repeat that information here. If the testing goes well, it > will be integrated into -current during the week of June 17th. > > Kirk McKusick Kirk is at various conferences the next coupld of weeks, so please report problems/patches/issues to both him and me. Poul-Henning ------- =_aaaaaaaaaa-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Fri May 24 16:55: 4 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 0E37837B407 for ; Fri, 24 May 2002 16:55:02 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1920) id E2A4DAE1D7; Fri, 24 May 2002 16:55:01 -0700 (PDT) Date: Fri, 24 May 2002 16:55:01 -0700 From: Maxime Henrion To: arch@FreeBSD.org Cc: Peter Wemm Subject: Re: a virtual fs to allow root mounting of any fs without special code Message-ID: <20020524235501.GH496@elvis.mu.org> References: <20020522123610.GL496@elvis.mu.org> <20020523233338.9A812380F@overcee.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020523233338.9A812380F@overcee.wemm.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Wemm wrote: > So, this is to replace the pre-mountroot bdevvp etc kludges that we have? Exactly. > How do we solve the problem with the root fs being mounted read only and > not having a /dev directory? This patch doesn't address these problems. I guess I'll have either to fix MNT_UNION so that it's actually useful, or write yet another mount flag to solve this problem. Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sat May 25 3:31:44 2002 Delivered-To: freebsd-arch@freebsd.org Received: from www.sibinfo.ru (sibinfo.ict.nsk.su [193.124.243.29]) by hub.freebsd.org (Postfix) with ESMTP id E6E5137B406; Sat, 25 May 2002 03:29:33 -0700 (PDT) Received: from ser ([192.168.0.32]) by www.sibinfo.ru (8.9.3/8.9.3) with SMTP id UAA23647 for ; Wed, 22 May 2002 20:15:11 +0700 Message-ID: <002c01c20193$cca04130$2000a8c0@sibinfocenter.sibinfo.ru> From: "List Manager" To: Subject: =?koi8-r?B?6c7Gz9LNwcPJz87Oz8Ug0MnT2M3P?= Date: Wed, 22 May 2002 20:23:02 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0029_01C201CE.78EB4310" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_0029_01C201CE.78EB4310 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable =20 =20 =20 =20 =F3=E9=E2=E9=EE=E6=EF=E3=E5=EE=F4=F2 =20 =20 =F2=C1=D3=D0=C9=D3=C1=CE=C9=C5 =CB=D5=D2=D3=CF=D7 =20 =20 =EB=CF=CE=D3=D5=CC=D8=D4=C1=C3=C9=C9=20 =20 =E4=C9=DA=C1=CA=CE-=D3=D4=D5=C4=C9=D1 =20 =20 =F5=D7=C1=D6=C1=C5=CD=D9=C5 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CD=C9=CE=C9=D3=D4=D2=C9=D2=CF=D7=C1=CE=C9=C5 10-14 =C9=C0=CE=D1 =20 =E1=C4=CD=C9=CE=C9=D3=D4=D2=C1=D4=CF=D2 Oracle8i, = =DE=C1=D3=D4=D8 1B: =D2=C5=DA=C5=D2=D7=CE=CF=C5 = =CB=CF=D0=C9=D2=CF=D7=C1=CE=C9=C5 =C9 = =D7=CF=D3=D3=D4=C1=CE=CF=D7=CC=C5=CE=C9=C5 15-18 =C9=C0=CE=D1=20 =E1=C4=CD=C9=CE=C9=D3=D4=D2=C1=D4=CF=D2 Oracle8i, = =DE=C1=D3=D4=D8 3: =C1=C4=CD=C9=CE=C9=D3=D4=D2=C9=D2=CF=D7=C1=CE=C9=C5 = =D3=C5=D4=C5=CA 19-20 =C9=C0=CE=D1 =20 =E1=C4=CD=C9=CE=C9=D3=D4=D2=C1=D4=CF=D2 Oracle8i, = =DE=C1=D3=D4=D8 2: = =D0=D2=CF=C9=DA=D7=CF=C4=C9=D4=C5=CC=D8=CE=CF=D3=D4=D8 =C9 = =CE=C1=D3=D4=D2=CF=CA=CB=C1 =20 Oracle 9i Application Server: = =E1=C4=CD=C9=CE=C9=D3=D4=D2=C9=D2=CF=D7=C1=CE=C9=C5 27-28 =CD=C1=D1 =20 Oracle 9i Application Server: = =F2=C1=DA=D2=C1=C2=CF=D4=CB=C1 Web-=D0=D2=C9=CC=CF=D6=C5=CE=C9=CA =D3 = =D0=CF=CD=CF=DD=D8=C0 PL/SQL 29-30 =CD=C1=D1=20 Oracle Forms Developer 6i: Build Internet Applications = I 10-14 =C9=C0=CE=D1=20 Oracle Reports Developer 6i: Build Internet Reports = 17-21 =C9=C0=CE=D1 =20 Oracle Forms Developer 6i: Build Internet Applications = II 24-26 =C9=C0=CE=D1 =20 =CE=C1 =C1=D7=D4=CF=D2=C9=DA=CF=D7=C1=CE=CE=D9=C5 = =CB=D5=D2=D3=D9 Microsoft: =EE=C1=C9=CD=C5=CE=CF=D7=C1=CE=C9=C5 =CB=D5=D2=D3=C1 = =E4=C1=D4=C1=20 Adminisreting a Microsoft SQL Server 2000 Database 3-7 = =C9=C0=CE=D1 =20 Programming a Microsoft SQL Server 2000 Database 10-14 = =C9=C0=CE=D1 =20 Implementing and Managing Microsoft Exchange 2000 = 17-21 =CD=C1=CA=20 Designing Microsoft Exchange 2000 for the Enterprise = 24-26 =CD=C1=CA=20 =CE=C1 =C1=D7=D4=CF=D2=C9=DA=CF=D7=C1=CE=CE=D9=C5 = =CB=D5=D2=D3=D9 Cisco (=D3=CF=D7=CD=C5=D3=D4=CE=CF =D3 = =F2=E5=E4=E3=E5=EE=F4=F2): =EE=C1=C9=CD=C5=CE=CF=D7=C1=CE=C9=C5 =CB=D5=D2=D3=C1 = =E4=C1=D4=C1=20 =E9=D3=D0=CF=CC=D8=DA=CF=D7=C1=CE=C9=C5 = =D3=C5=D4=C5=D7=CF=C7=CF =CF=C2=CF=D2=D5=C4=CF=D7=C1=CE=C9=D1 Cisco = 24-28 =C9=C0=CE=D1=20 =F0=CF=D3=D4=D2=CF=C5=CE=C9=C5 = =CD=C1=D3=DB=D4=C1=C2=C9=D2=D5=C5=CD=D9=C8 =D3=C5=D4=C5=CA Cisco 1-5 = =C9=C0=CC=D1 =20 =CE=C1 =C1=D7=D4=CF=D2=C9=DA=CF=D7=C1=CE=CE=D9=C5 = =CB=D5=D2=D3=D9 Sun (=D3=CF=D7=CD=C5=D3=D4=CE=CF =D3 = =F2=E5=E4=E3=E5=EE=F4=F2): =EE=C1=C9=CD=C5=CE=CF=D7=C1=CE=C9=C5 =CB=D5=D2=D3=C1 = =E4=C1=D4=C1=20 =EF=D3=CE=CF=D7=D9 =D3=C9=D3=D4=C5=CD=CE=CF=C7=CF = =C1=C4=CD=C9=CE=C9=D3=D4=D2=C9=D2=CF=D7=C1=CE=C9=D1 Solaris 8 18-21 = =C9=C0=CE=D1=20 =F3=C9=D3=D4=C5=CD=CE=CF=C5 = =C1=C4=CD=C9=CE=C9=D3=D4=D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=20 ------=_NextPart_000_0029_01C201CE.78EB4310 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable


  =F3=E9=E2=E9=EE=E6=EF=E3=E5=EE=F4=F2
   
  =F2=C1=D3=D0=C9=D3=C1=CE=C9=C5=20 =CB=D5=D2=D3=CF=D7
   
  =EB=CF=CE=D3=D5=CC=D8=D4=C1=C3=C9=C9
   
  =E4=C9=DA=C1=CA=CE-=D3=D4=D5=C4=C9=D1=20


=F5=D7=C1=D6=C1=C5=CD=D9=C5 = =C7=CF=D3=D0=CF=C4=C1!

=F3=E9=E2=E9=EE=E6=EF=E3=E5=EE=F4=F2 - = =C1=D7=D4=CF=D2=C9=DA=CF=D7=C1=CE=CE=D9=CA =D5=DE=C5=C2=CE=D9=CA = =C3=C5=CE=D4=D2=20 Oracle =C9 Microsoft, =D0=D2=C9=C7=CC=C1=DB=C1=C5=D4 = IT-=D3=D0=C5=C3=C9=C1=CC=C9=D3=D4=CF=D7 =D0=D2=CF=CA=D4=C9 = =CF=C2=D5=DE=C5=CE=C9=C5 =D7=20 =EE=CF=D7=CF=D3=C9=C2=C9=D2=D3=CB=C5 =D0=CF = =D0=D2=CF=C7=D2=C1=CD=CD=C1=CD =D0=CF=C4=C7=CF=D4=CF=D7=CB=C9 Oracle, = Microsoft, Sun=20 Microsystems, Cisco, Rational Software.

=E4=C5=D7=C9=DA=20 =F3=E9=E2=E9=EE=E6=EF=E3=E5=EE=F4=F2=C1: = "=ED=D9 =D5=DE=C9=CD =D4=CF=CD=D5, =DE=C5=CD =D3=C1=CD=C9 = =D7=CC=C1=C4=C5=C5=CD=20 =D0=D2=CF=C6=C5=D3=D3=C9=CF=CE=C1=CC=D8=CE=CF".
=F3=E9=E2
=E9=EE=E6=EF=E3=E5=EE=F4=F2 - = =DC=D4=CF =D5=DE=C5=C2=CE=D9=CA =C3=C5=CE=D4=D2, =D7 = =CB=CF=D4=CF=D2=CF=CD=20 =D3=C5=D2=D4=C9=C6=C9=C3=C9=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C5=CE=C9=CA =D3 =D0=CF=CD=CF=DD=D8=C0=20 PL/SQL 29-30=20 =CD=C1=D1
Oracle=20 Forms Developer 6i: Build Internet Applications I = 10-14=20 =C9=C0=CE=D1
Oracle=20 Reports Developer 6i: Build Internet = Reports 17-21 =C9=C0=CE=D1=20
Oracle=20 Forms Developer 6i: Build Internet Applications = II 24-26 =C9=C0=CE=D1=20

=CE=C1=20 =C1=D7=D4=CF=D2=C9=DA=CF=D7=C1=CE=CE=D9=C5 =CB=D5=D2=D3=D9 = Microsoft:

=EE=C1=C9=CD=C5=CE=CF=D7=C1=CE=C9=C5 = =CB=D5=D2=D3=C1 =E4=C1=D4=C1
Adminisreting a Microsoft SQL Server 2000=20 Database 3-7 =C9=C0=CE=D1=20
Programming a Microsoft SQL Server 2000=20 Database 10-14 =C9=C0=CE=D1=20
Implementing and Managing Microsoft Exchange = 2000=20 17-21=20 =CD=C1=CA
Designing=20 Microsoft Exchange 2000 for the Enterprise = 24-26=20 =CD=C1=CA

=CE=C1=20 =C1=D7=D4=CF=D2=C9=DA=CF=D7=C1=CE=CE=D9=C5 =CB=D5=D2=D3=D9 = Cisco (=D3=CF=D7=CD=C5=D3=D4=CE=CF =D3=20 =F2=E5=E4=E3=E5=EE=F4=F2):

=EE=C1=C9=CD=C5=CE=CF=D7=C1=CE=C9=C5 = =CB=D5=D2=D3=C1 =E4=C1=D4=C1
=E9=D3=D0=CF=CC=D8=DA=CF=D7=C1=CE=C9=C5 = =D3=C5=D4=C5=D7=CF=C7=CF =CF=C2=CF=D2=D5=C4=CF=D7=C1=CE=C9=D1 = Cisco 24-28=20 =C9=C0=CE=D1
=F0=CF=D3=D4=D2=CF=C5=CE=C9=C5=20 =CD=C1=D3=DB=D4=C1=C2=C9=D2=D5=C5=CD=D9=C8 = =D3=C5=D4=C5=CA Cisco 1-5 =C9=C0=CC=D1=20

=CE=C1=20 =C1=D7=D4=CF=D2=C9=DA=CF=D7=C1=CE=CE=D9=C5 =CB=D5=D2=D3=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D9=C5 =D0=C5=D2=C5=C4=CF=D7=D9=C5 = =C5=D6=C5=CE=C5=C4=C5=CC=D8=CE=D9=C5 IT-=CE=CF=D7=CF=D3=D4=C9, =F7=D9 = =CD=CF=D6=C5=D4=C5 =D0=CF=C4=D0=C9=D3=C1=D4=D8=D3=D1 =CE=C1=20 =CE=CF=D7=CF=D3=D4=C9 =CB=CF=CD=D0=C1=CE=C9=C9 = "=F3=C9=C2=C9=CE=C6=CF=C3=C5=CE=D4=D2" =D0=CF =C1=C4=D2=C5=D3=D5: http://www.sibinfo.ru/
=


3D""
=20
www.sibinfo.ru
courses@sibinfo.ru
------=_NextPart_000_0029_01C201CE.78EB4310-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message From owner-freebsd-arch Sat May 25 12:30:52 2002 Delivered-To: freebsd-arch@freebsd.org Received: from evilpete.dyndns.org (12-232-26-46.client.attbi.com [12.232.26.46]) by hub.freebsd.org (Postfix) with ESMTP id 4A2C037B401; Sat, 25 May 2002 12:30:49 -0700 (PDT) Received: from overcee.wemm.org ([10.0.0.3]) by evilpete.dyndns.org (8.11.6/8.11.6) with ESMTP id g4PJUm149129; Sat, 25 May 2002 12:30:49 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 6CF503807; Sat, 25 May 2002 12:30:48 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Maxime Henrion Cc: arch@freebsd.org Subject: Re: a virtual fs to allow root mounting of any fs without special code In-Reply-To: <20020524235501.GH496@elvis.mu.org> Date: Sat, 25 May 2002 12:30:48 -0700 From: Peter Wemm Message-Id: <20020525193048.6CF503807@overcee.wemm.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Maxime Henrion wrote: > Peter Wemm wrote: > > So, this is to replace the pre-mountroot bdevvp etc kludges that we have? > > Exactly. > > > How do we solve the problem with the root fs being mounted read only and > > not having a /dev directory? > > This patch doesn't address these problems. I guess I'll have either to > fix MNT_UNION so that it's actually useful, or write yet another mount > flag to solve this problem. Or figure out a way to mount a file system on a non-existing directory entry.. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message