From owner-freebsd-arch Fri Jun 8 2:10:45 2001 Delivered-To: freebsd-arch@freebsd.org Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by hub.freebsd.org (Postfix) with ESMTP id A4ADB37B401; Fri, 8 Jun 2001 02:10:40 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.245.138.245.Dial1.SanJose1.Level3.net [209.245.138.245]) by hawk.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id CAA29987; Fri, 8 Jun 2001 02:10:38 -0700 (PDT) Message-ID: <3B2096AB.309B2D14@mindspring.com> Date: Fri, 08 Jun 2001 02:11:07 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "Patrick W. Penzias Dirks" Cc: FreeBSD-FS@FreeBSD.ORG, FreeBSD-Arch@FreeBSD.ORG Subject: Re: Support for pivot_root-like system call? References: <200106072103.f57L37l26327@scv2.apple.com> 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 "Patrick W. Penzias Dirks" wrote: > > Hi, > > I'm the filesystems tech lead in Apple's Mac OS X Core OS group. > Prompted by the needs of, among others, virus protection software > developers who want to be able to mount "on" the root directory to > intercept ALL filesystem calls in the system, I'm contemplating > implementation of a new system call in Mac OS X to do something like > Linux's pivot_root system call: > > int pivot_root(const char *new_root, const char *put_old); > > (which basically installs "new_root" as the new "/" [root_vnode] in > the system and transfers the current root directory to the pathname > specified my "put_old") It doesn't work in FreeBSD proper because of cache coherency bugs that have been around since 1995, but: mount -t nullfs / /put_old # or wherever mount -t / Would do what you want, I think. Really, the BSD way of doing this is to stack an FS with the feature you want on top of the one without the feature in it. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message