From owner-freebsd-fs@FreeBSD.ORG Sun Sep 18 22:57:57 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C20716A41F for <freebsd-fs@freebsd.org>; Sun, 18 Sep 2005 22:57:57 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD5D443D53 for <freebsd-fs@freebsd.org>; Sun, 18 Sep 2005 22:57:56 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from agora.fsl.cs.sunysb.edu (agora.fsl.cs.sunysb.edu [130.245.126.12]) by filer.fsl.cs.sunysb.edu (8.12.8/8.12.8) with ESMTP id j8IMvs9P032522; Sun, 18 Sep 2005 18:57:54 -0400 Received: from agora.fsl.cs.sunysb.edu (localhost.localdomain [127.0.0.1]) by agora.fsl.cs.sunysb.edu (8.13.1/8.13.1) with ESMTP id j8IMvrVH008171; Sun, 18 Sep 2005 18:57:53 -0400 Received: (from ezk@localhost) by agora.fsl.cs.sunysb.edu (8.13.1/8.12.8/Submit) id j8IMvqgb008168; Sun, 18 Sep 2005 18:57:52 -0400 Date: Sun, 18 Sep 2005 18:57:52 -0400 Message-Id: <200509182257.j8IMvqgb008168@agora.fsl.cs.sunysb.edu> From: Erez Zadok <ezk@cs.sunysb.edu> To: freebsd-fs@freebsd.org X-MailKey: Erez_Zadok Cc: christos@zoulas.com Subject: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 18 Sep 2005 22:57:57 -0000 Summary: Freebsd doesn't seem to have a way to turn off the NFS attribute cache, which breaks the Amd automounter so badly that I do not recommend using Amd on FreeBSD for heavy use, not until this is fixed. Details: I'm the lead maintainer of the am-utils package (www.am-utils.org), the so-called Amd Berkeley Automounter. Amd is a user-level NFSv2 server that manages automounts of all other file systems. The kernel contacts Amd via RPCs, and Amd in turn performs the actual mounts, and then responds back to the kernel's RPCs. Every kernel caches attributes of files, in a Directory Name Lookup Cache (DNLC). Amd manages its namespace in the user level, but the kernel caches names itself. So the two must coordinate to ensure that both namespaces are in sync. If the kernel uses a cached entry from the DNLC, without consulting Amd, users may see corruption of the automounter namespace (symlinks pointing to the wrong places, ESTALE errors, and more). For example, suppose Amd timed out an entry and removed the entry from Amd's namespace. Amd has to tell the kernel to purge its corresponding DNLC entry too. The way Amd often does that is by incrementing the mtime of the parent directory. This is the most common method for kernels to check if their DNLC entries are stale: if the parent dir mtime is newer, the kernel will discard all cached entries for that directory, and will re-issue lookup methods. Those lookups will result in NFS_GETATTR/NFS_LOOKUP calls sent to Amd, and Amd can then properly inform the kernel of the new state of automounted entries. In order to ensure that Amd is "in charge" of its namespace w/o interference from the kernel, Amd will try to turn off the NFS attribute cache. It does so by using the NFSMNT_NOAC flag, if it exists, or setting various "cache timeout" fields in struct nfs_args to 0. We have released a major new version of am-utils, version 6.1, a few months ago. Since then, a lot of people have experimented with Amd, in anticipation of migrating from the very old am-utils 6.0 to the new 6.1. For a couple of months now, we have received reports of problems with Amd, especially under heavy use. Users reported getting ESTALE errors from time to time, or seeing automounted entries whose symlinks don't point to where it should be. After much debugging, we traced it to a few places in Amd where it wasn't updating the parent dir mtime as it should have. So we fixed it and verified that it was working (on Solaris and Linux, where the actual user bug reports came from). After fixing this in Amd, I went on to verify that things work for other OSs. When I got to FreeBSD 4.6, I found that it always caches directory entries, and there is no way to turn it off completely. Specifically, if I set the ac{reg,dir}{min,max} fields in struct nfs_args all to zero, the kernel seems to cache the entries for a default number of seconds (I counted something like 5 seconds). On some OSs, setting these four fields to 0 turns off the attribute cache, but not on FreeBSD 4.6. I was able to verify this using Amd and a script that exercises the interaction of the kernel's attrcache and Amd. I didn't look at the kernel sources (yet) but I'm pretty certain of this behavior. I then experimented by setting the ac{reg,dir}{min,max} fields in struct nfs_args all to 1, the smallest non-zero value I could. When I ran my Amd exercising script, I found that the value of 1 reduced the race between the DNLC and Amd, and the script took a little longer to run before it detected an incoherency. That makes sense: the smaller the DNLC cache interval is, the shorter the window of vulnerability is. (BTW, the mount_nfs man page says that the ac{reg,dir}{min,max} fields use a 1 second resolution, but my experimentation indicated it was in 0.1 second units -- is that right?) Clearly, setting the ac{reg,dir}{min,max} fields to 0 is worse than setting it to 1 on FreeBSD. So the current (ugly) workaround I've used in am-utils is to set the global parameter auto_attrcache=1 in the /etc/amd.conf file. The near term solution is for FreeBSD to support a true 'noac' flag, which can be added fairly easily. This'd make Amd work reliably. The long term solution is to implement Autofs support for all OSs and to support it in Amd. Luckily, there is autofs support for freebsd now, but Amd doesn't support autofs yet on freebsd (we support the solaris and linux autofs as of now). Still, we found that even with autofs support, many sysadmins still prefer to use the good 'ol non-autofs mode. For what it's worth, I've confirmed that OpenBSD 3.7 and NetBSD 2.0.2 also do not have a way to turn off the attribute cache and both suffer from the same problem. I've reported it to Christos Zoulas (NetBSD) who said that they will fix this. It is my hope that FreeBSD will implement a "noac" flag ASAP; it's crucial if you want people to use FreeBSD+Amd in heavy-use production-level environments. I also plan to test this attrcache behavior on all OSs I have access to and report the same to each. Finally, I'll be happy to work with anyone to provide more details, scripts to exercise these bugs, submit official bug reports, and even implement a "noac" flag for any BSD kernel. Sincerely, Erez. From owner-freebsd-fs@FreeBSD.ORG Sun Sep 18 23:07:17 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAA0E16A41F for <freebsd-fs@freebsd.org>; Sun, 18 Sep 2005 23:07:17 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fileserver.fields.utoronto.ca (fileserver.fields.utoronto.ca [128.100.216.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBDD643D45 for <freebsd-fs@freebsd.org>; Sun, 18 Sep 2005 23:07:15 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fields.fields.utoronto.ca (fields.localdomain [192.168.216.11]) by fileserver.fields.utoronto.ca (8.12.8/8.12.8/Fields 6.0) with ESMTP id j8IN770r028576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Sep 2005 19:07:07 -0400 Received: from obsecurity.dyndns.org (localhost.localdomain [127.0.0.1]) by fields.fields.utoronto.ca (8.12.8/8.12.8/Fields WS 6.0) with ESMTP id j8IN766P009863; Sun, 18 Sep 2005 19:07:06 -0400 Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id D9E74511F8; Sun, 18 Sep 2005 19:07:05 -0400 (EDT) Date: Sun, 18 Sep 2005 19:07:05 -0400 From: Kris Kennaway <kris@obsecurity.org> To: Erez Zadok <ezk@cs.sunysb.edu> Message-ID: <20050918230705.GA54054@xor.obsecurity.org> References: <200509182257.j8IMvqgb008168@agora.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <200509182257.j8IMvqgb008168@agora.fsl.cs.sunysb.edu> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@freebsd.org, christos@zoulas.com Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 18 Sep 2005 23:07:17 -0000 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Sep 18, 2005 at 06:57:52PM -0400, Erez Zadok wrote: > After fixing this in Amd, I went on to verify that things work for other > OSs. When I got to FreeBSD 4.6, I found that it always caches directory > entries, and there is no way to turn it off completely. Specifically, if I > set the ac{reg,dir}{min,max} fields in struct nfs_args all to zero, the > kernel seems to cache the entries for a default number of seconds (I counted > something like 5 seconds). On some OSs, setting these four fields to 0 > turns off the attribute cache, but not on FreeBSD 4.6. I was able to verify > this using Amd and a script that exercises the interaction of the kernel's > attrcache and Amd. I didn't look at the kernel sources (yet) but I'm pretty > certain of this behavior. FreeBSD 4.6 is, frankly, ancient..are you certain this still applies to modern versions? Kris --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDLfMYWry0BWjoQKURAuPZAJ4mmuTjutcTlrASTsMjJogD4cPD7wCfW9wX ivA394W6wtdqa+G3rB9A/zc= =wQ4m -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx-- From owner-freebsd-fs@FreeBSD.ORG Sun Sep 18 23:16:39 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBFCE16A41F for <freebsd-fs@freebsd.org>; Sun, 18 Sep 2005 23:16:39 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 437C843D45 for <freebsd-fs@freebsd.org>; Sun, 18 Sep 2005 23:16:39 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from agora.fsl.cs.sunysb.edu (agora.fsl.cs.sunysb.edu [130.245.126.12]) by filer.fsl.cs.sunysb.edu (8.12.8/8.12.8) with ESMTP id j8INGV9P000300; Sun, 18 Sep 2005 19:16:31 -0400 Received: from agora.fsl.cs.sunysb.edu (localhost.localdomain [127.0.0.1]) by agora.fsl.cs.sunysb.edu (8.13.1/8.13.1) with ESMTP id j8INGULA008481; Sun, 18 Sep 2005 19:16:30 -0400 Received: (from ezk@localhost) by agora.fsl.cs.sunysb.edu (8.13.1/8.12.8/Submit) id j8INGU8P008478; Sun, 18 Sep 2005 19:16:30 -0400 Date: Sun, 18 Sep 2005 19:16:30 -0400 Message-Id: <200509182316.j8INGU8P008478@agora.fsl.cs.sunysb.edu> From: Erez Zadok <ezk@cs.sunysb.edu> To: Kris Kennaway <kris@obsecurity.org> In-reply-to: Your message of "Sun, 18 Sep 2005 19:07:05 EDT." <20050918230705.GA54054@xor.obsecurity.org> X-MailKey: Erez_Zadok Cc: freebsd-fs@freebsd.org, Erez Zadok <ezk@cs.sunysb.edu>, christos@zoulas.com Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 18 Sep 2005 23:16:39 -0000 In message <20050918230705.GA54054@xor.obsecurity.org>, Kris Kennaway writes: > FreeBSD 4.6 is, frankly, ancient..are you certain this still applies > to modern versions? > > Kris Argh. My bad. I tested in on 5.4, but my finger wrote 4.6. Too many OSs; too many versions. :-) Yes, the problem is definitely there in 5.4. I didn't test 6.0 yet. Erez. From owner-freebsd-fs@FreeBSD.ORG Sun Sep 18 23:57:32 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FF3E16A41F for <freebsd-fs@freebsd.org>; Sun, 18 Sep 2005 23:57:32 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fileserver.fields.utoronto.ca (fileserver.fields.utoronto.ca [128.100.216.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C295143D46 for <freebsd-fs@freebsd.org>; Sun, 18 Sep 2005 23:57:31 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fields.fields.utoronto.ca (fields.localdomain [192.168.216.11]) by fileserver.fields.utoronto.ca (8.12.8/8.12.8/Fields 6.0) with ESMTP id j8INvP0r032697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Sep 2005 19:57:25 -0400 Received: from obsecurity.dyndns.org (localhost.localdomain [127.0.0.1]) by fields.fields.utoronto.ca (8.12.8/8.12.8/Fields WS 6.0) with ESMTP id j8INvO6P013779; Sun, 18 Sep 2005 19:57:25 -0400 Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 579C0511FD; Sun, 18 Sep 2005 19:57:24 -0400 (EDT) Date: Sun, 18 Sep 2005 19:57:24 -0400 From: Kris Kennaway <kris@obsecurity.org> To: Erez Zadok <ezk@cs.sunysb.edu> Message-ID: <20050918235724.GA67621@xor.obsecurity.org> References: <20050918230705.GA54054@xor.obsecurity.org> <200509182316.j8INGU8P008478@agora.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <200509182316.j8INGU8P008478@agora.fsl.cs.sunysb.edu> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@freebsd.org, christos@zoulas.com, Kris Kennaway <kris@obsecurity.org> Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 18 Sep 2005 23:57:32 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 18, 2005 at 07:16:30PM -0400, Erez Zadok wrote: > In message <20050918230705.GA54054@xor.obsecurity.org>, Kris Kennaway wri= tes: >=20 > > FreeBSD 4.6 is, frankly, ancient..are you certain this still applies > > to modern versions? > >=20 > > Kris >=20 > Argh. My bad. I tested in on 5.4, but my finger wrote 4.6. Too many OS= s; > too many versions. :-) >=20 > Yes, the problem is definitely there in 5.4. I didn't test 6.0 yet. Thanks for clarifying...6.0 is unlikely to have fixed this. Kris --envbJBWh7q8WU6mo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDLf7jWry0BWjoQKURAlvyAJ9NTWWMazdUBsRJFfvatK6Tbbb2WACg7lWK 25/sLVeLn4Z9lWCzq2WgAu8= =F/SZ -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo-- From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 00:00:17 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C67C16A41F for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 00:00:17 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7BAE43D45 for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 00:00:12 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from agora.fsl.cs.sunysb.edu (agora.fsl.cs.sunysb.edu [130.245.126.12]) by filer.fsl.cs.sunysb.edu (8.12.8/8.12.8) with ESMTP id j8J0059P001448; Sun, 18 Sep 2005 20:00:05 -0400 Received: from agora.fsl.cs.sunysb.edu (localhost.localdomain [127.0.0.1]) by agora.fsl.cs.sunysb.edu (8.13.1/8.13.1) with ESMTP id j8J004Jv014893; Sun, 18 Sep 2005 20:00:04 -0400 Received: (from ezk@localhost) by agora.fsl.cs.sunysb.edu (8.13.1/8.12.8/Submit) id j8J0046l014890; Sun, 18 Sep 2005 20:00:04 -0400 Date: Sun, 18 Sep 2005 20:00:04 -0400 Message-Id: <200509190000.j8J0046l014890@agora.fsl.cs.sunysb.edu> From: Erez Zadok <ezk@cs.sunysb.edu> To: Kris Kennaway <kris@obsecurity.org> In-reply-to: Your message of "Sun, 18 Sep 2005 19:57:24 EDT." <20050918235724.GA67621@xor.obsecurity.org> X-MailKey: Erez_Zadok Cc: freebsd-fs@freebsd.org, Erez Zadok <ezk@cs.sunysb.edu>, christos@zoulas.com Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 19 Sep 2005 00:00:17 -0000 In message <20050918235724.GA67621@xor.obsecurity.org>, Kris Kennaway writes: > > Thanks for clarifying...6.0 is unlikely to have fixed this. > > Kris Is 6.0 frozen enough that it's unlikely to be fixed in 6.0? Erez. From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 00:01:42 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71FB216A426 for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 00:01:42 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fileserver.fields.utoronto.ca (fileserver.fields.utoronto.ca [128.100.216.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFE8F43D45 for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 00:01:41 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fields.fields.utoronto.ca (fields.localdomain [192.168.216.11]) by fileserver.fields.utoronto.ca (8.12.8/8.12.8/Fields 6.0) with ESMTP id j8J01Z0r000598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Sep 2005 20:01:35 -0400 Received: from obsecurity.dyndns.org (localhost.localdomain [127.0.0.1]) by fields.fields.utoronto.ca (8.12.8/8.12.8/Fields WS 6.0) with ESMTP id j8J01Z6P014120; Sun, 18 Sep 2005 20:01:35 -0400 Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id DBF0751226; Sun, 18 Sep 2005 20:01:34 -0400 (EDT) Date: Sun, 18 Sep 2005 20:01:34 -0400 From: Kris Kennaway <kris@obsecurity.org> To: Erez Zadok <ezk@cs.sunysb.edu> Message-ID: <20050919000134.GA67976@xor.obsecurity.org> References: <20050918235724.GA67621@xor.obsecurity.org> <200509190000.j8J0046l014890@agora.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <200509190000.j8J0046l014890@agora.fsl.cs.sunysb.edu> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@freebsd.org, christos@zoulas.com, Kris Kennaway <kris@obsecurity.org> Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 19 Sep 2005 00:01:42 -0000 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 18, 2005 at 08:00:04PM -0400, Erez Zadok wrote: > In message <20050918235724.GA67621@xor.obsecurity.org>, Kris Kennaway wri= tes: > >=20 > > Thanks for clarifying...6.0 is unlikely to have fixed this. > >=20 > > Kris >=20 > Is 6.0 frozen enough that it's unlikely to be fixed in 6.0? At this point, maybe. If someone can come up with a simple fix quick enough there might be some chance though. Kris --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDLf/eWry0BWjoQKURAni/AKD2Ci+eE8lurk7I1TJKUDS+SrOaoACgxDLs KU10GqAqrkbWGwoFG7wywvM= =BxnE -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 00:12:42 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DED7316A41F for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 00:12:42 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EAF043D46 for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 00:12:39 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id j8J0CScX021752; Sun, 18 Sep 2005 18:12:29 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <432E0274.4010704@samsco.org> Date: Sun, 18 Sep 2005 18:12:36 -0600 From: Scott Long <scottl@samsco.org> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Kennaway <kris@obsecurity.org> References: <20050918235724.GA67621@xor.obsecurity.org> <200509190000.j8J0046l014890@agora.fsl.cs.sunysb.edu> <20050919000134.GA67976@xor.obsecurity.org> In-Reply-To: <20050919000134.GA67976@xor.obsecurity.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: freebsd-fs@freebsd.org, Erez Zadok <ezk@cs.sunysb.edu>, christos@zoulas.com Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 19 Sep 2005 00:12:43 -0000 Kris Kennaway wrote: > On Sun, Sep 18, 2005 at 08:00:04PM -0400, Erez Zadok wrote: > >>In message <20050918235724.GA67621@xor.obsecurity.org>, Kris Kennaway writes: >> >>>Thanks for clarifying...6.0 is unlikely to have fixed this. >>> >>>Kris >> >>Is 6.0 frozen enough that it's unlikely to be fixed in 6.0? > > > At this point, maybe. If someone can come up with a simple fix quick > enough there might be some chance though. > > Kris There are about 2 more weeks before the window closes on fixing this, assuming that whatever fix is to be had is fairly simple and non-disruptive. Scott From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 00:14:39 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9622716A41F for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 00:14:39 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DB5C43D48 for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 00:14:39 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from agora.fsl.cs.sunysb.edu (agora.fsl.cs.sunysb.edu [130.245.126.12]) by filer.fsl.cs.sunysb.edu (8.12.8/8.12.8) with ESMTP id j8J0EU9P001604; Sun, 18 Sep 2005 20:14:31 -0400 Received: from agora.fsl.cs.sunysb.edu (localhost.localdomain [127.0.0.1]) by agora.fsl.cs.sunysb.edu (8.13.1/8.13.1) with ESMTP id j8J0ET0k015318; Sun, 18 Sep 2005 20:14:29 -0400 Received: (from ezk@localhost) by agora.fsl.cs.sunysb.edu (8.13.1/8.12.8/Submit) id j8J0ETOf015305; Sun, 18 Sep 2005 20:14:29 -0400 Date: Sun, 18 Sep 2005 20:14:29 -0400 Message-Id: <200509190014.j8J0ETOf015305@agora.fsl.cs.sunysb.edu> From: Erez Zadok <ezk@cs.sunysb.edu> To: Scott Long <scottl@samsco.org> In-reply-to: Your message of "Sun, 18 Sep 2005 18:12:36 MDT." <432E0274.4010704@samsco.org> X-MailKey: Erez_Zadok Cc: freebsd-fs@freebsd.org, Erez Zadok <ezk@cs.sunysb.edu>, christos@zoulas.com, Kris Kennaway <kris@obsecurity.org> Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 19 Sep 2005 00:14:39 -0000 In message <432E0274.4010704@samsco.org>, Scott Long writes: > There are about 2 more weeks before the window closes on fixing this, > assuming that whatever fix is to be had is fairly simple and non-disruptive. > > Scott I'll give it a shot in beta4 and see if I can get a simple fix made. I'll post what I have here on -fs for comments. Erez. From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 02:25:53 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D211516A420 for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 02:25:53 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A76443D4C for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 02:25:53 +0000 (GMT) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from agora.fsl.cs.sunysb.edu (agora.fsl.cs.sunysb.edu [130.245.126.12]) by filer.fsl.cs.sunysb.edu (8.12.8/8.12.8) with ESMTP id j8J2Pj9P014911; Sun, 18 Sep 2005 22:25:45 -0400 Received: from agora.fsl.cs.sunysb.edu (localhost.localdomain [127.0.0.1]) by agora.fsl.cs.sunysb.edu (8.13.1/8.13.1) with ESMTP id j8J2Pi7m016628; Sun, 18 Sep 2005 22:25:44 -0400 Received: (from ezk@localhost) by agora.fsl.cs.sunysb.edu (8.13.1/8.12.8/Submit) id j8J2PclG016625; Sun, 18 Sep 2005 22:25:38 -0400 Date: Sun, 18 Sep 2005 22:25:38 -0400 Message-Id: <200509190225.j8J2PclG016625@agora.fsl.cs.sunysb.edu> From: Erez Zadok <ezk@cs.sunysb.edu> To: Scott Long <scottl@samsco.org>, Kris Kennaway <kris@obsecurity.org>, Erez Zadok <ezk@cs.sunysb.edu>, freebsd-fs@freebsd.org, christos@zoulas.com In-reply-to: Your message of "Sun, 18 Sep 2005 18:12:36 MDT." <432E0274.4010704@samsco.org> X-MailKey: Erez_Zadok Cc: Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 19 Sep 2005 02:25:54 -0000 Good news! After browsing the 6.0 kernel sources, I found out that freebsd DOES indeed have a way of turning off the attribute cache. It's not enough to just set nfs_args->acregmin and friends, but you also need to nfs_args->flags |= NFSMNT_ACREGMIN Otherwise, the kernel ignores what you set in the ->acregmin field. So, to completely turn off the attrcache on freebsd, you have to set four fields in struct nfs_args to 0, and turn four flags on in ->flags. It's cumbersome, but it works. You may still want to consider offering a "noac" flag for convenience, which'd set all eight values as needed (as some OSs do). At the very least, please document specifically in the mount_nfs man page how one turns off the attribute cache completely. Anyway, I was able to verify this in 5.4 and 6.0 (SNAP001). And it looks like the NFSMNT_ACREGMIN type of flags have existed as far back as 4.x, so I suspect that as long as the implementation was correct, even old versions of BSD should work well now with Amd. I'll release a quick new version of am-utils (6.1.2.1) with this fix, specifically because I have a few freebsd users who complained about this bug. I would like to ask whomever is responsible for maintaining am-utils for FreeBSD to consider importing 6.1.2.1 into your ports tree. Currently you're stuck at an ancient 6.0.10. 6.1.x fixes numerous bugs other than this latest one, plus it offers a host of new performance and security features. Thanks, Erez. From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 03:06:18 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0C5316A41F for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 03:06:17 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D6F143D48 for <freebsd-fs@freebsd.org>; Mon, 19 Sep 2005 03:06:14 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id j8J3646K022369; Sun, 18 Sep 2005 21:06:04 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <432E2B24.5040607@samsco.org> Date: Sun, 18 Sep 2005 21:06:12 -0600 From: Scott Long <scottl@samsco.org> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Erez Zadok <ezk@cs.sunysb.edu> References: <200509190225.j8J2PclG016625@agora.fsl.cs.sunysb.edu> In-Reply-To: <200509190225.j8J2PclG016625@agora.fsl.cs.sunysb.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: freebsd-fs@freebsd.org, christos@zoulas.com, Kris Kennaway <kris@obsecurity.org> Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 19 Sep 2005 03:06:18 -0000 Erez Zadok wrote: > Good news! > > After browsing the 6.0 kernel sources, I found out that freebsd DOES indeed > have a way of turning off the attribute cache. It's not enough to just set > nfs_args->acregmin and friends, but you also need to > > nfs_args->flags |= NFSMNT_ACREGMIN > > Otherwise, the kernel ignores what you set in the ->acregmin field. So, to > completely turn off the attrcache on freebsd, you have to set four fields in > struct nfs_args to 0, and turn four flags on in ->flags. > > It's cumbersome, but it works. You may still want to consider offering a > "noac" flag for convenience, which'd set all eight values as needed (as some > OSs do). At the very least, please document specifically in the mount_nfs > man page how one turns off the attribute cache completely. > > Anyway, I was able to verify this in 5.4 and 6.0 (SNAP001). And it looks > like the NFSMNT_ACREGMIN type of flags have existed as far back as 4.x, so I > suspect that as long as the implementation was correct, even old versions of > BSD should work well now with Amd. > > I'll release a quick new version of am-utils (6.1.2.1) with this fix, > specifically because I have a few freebsd users who complained about this > bug. > > I would like to ask whomever is responsible for maintaining am-utils for > FreeBSD to consider importing 6.1.2.1 into your ports tree. Currently > you're stuck at an ancient 6.0.10. 6.1.x fixes numerous bugs other than > this latest one, plus it offers a host of new performance and security > features. > > Thanks, > Erez. Thanks for looking into this and adapting am-utils for it. Would you mind submitting a report to the bug database so that we can track this? http://www.freebsd.org/send-pr.html. As for importing a newer am-utils, it's been talked about, but I don't expect it to happen for 6.0. Thanks! Scott From owner-freebsd-fs@FreeBSD.ORG Tue Sep 20 14:59:32 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 922F116A420 for <freebsd-fs@FreeBSD.org>; Tue, 20 Sep 2005 14:59:32 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 357DE43D46 for <freebsd-fs@FreeBSD.org>; Tue, 20 Sep 2005 14:59:32 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 9B5CF46B9C for <freebsd-fs@FreeBSD.org>; Tue, 20 Sep 2005 10:59:31 -0400 (EDT) Date: Tue, 20 Sep 2005 15:59:31 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> X-X-Sender: robert@fledge.watson.org To: freebsd-fs@FreeBSD.org Message-ID: <20050920155903.S34322@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: File System ACLs: Where to go from here in FreeBSD? (fwd) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 20 Sep 2005 14:59:32 -0000 FYI, a conversation relating to the following post is on-going on trustedbsd-discuss. If this is a topic that interests you, please join in over there :-). Thanks, Robert N M Watson ---------- Forwarded message ---------- Date: Sat, 17 Sep 2005 13:19:31 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: trustedbsd-discuss@TrustedBSD.org Cc: astrodog@gmail.com Subject: File System ACLs: Where to go from here in FreeBSD? The FreeBSD ACL implementation is currently based on a late POSIX.1e draft, and is similar in functionality to the ACL support in Solaris, IRIX, and Linux. It was developed along a similar timeline to the Linux ACL support, and Andreas and I chatted a fair amount along the way so the parallels are strong -- in fact, the Samba ACL support is almost identical, and the ACL API man pages on Linux are directly derived from our ACL man pages (and maybe some of the code?). Differences lie primarily in three areas: (1) We follow the POSIX.1e specification for file creation modes, in which the ACL and umask are combined with the cmode to generate a conservative ACL. This was the same as IRIX, but different from Solaris; Linux adopted the Solaris model. Since then, IRIX has (I believe) also switched to the Solaris model. Our model is "conservative" in that it will never offer broader rights on a file than the umask permits, but it turns out to be quite useful in some environments to allow the ACL on a directory to overide the umask of a program writing files there. (2) We offer a few fewer support routines in user space, such as routines to copy an ACL from one file to another. This has been getting gradually fleshed out over time. (3) We don't offer Solaris-compatible NFSv3 extensions to allow remote management of ACLs via NFS, although the ACLs are enforced on the server so they are "implemented". I'm not sure if these patches were merged to Linux or not, but they were floating around for quite a while. As I see it, there are two directions we can take file system ACL support, and here-in lies the Big Question: (a) We can continue down the POSIX.1e branch of the ACL world, continuing to enhance and refine our support. For example, continuing to flesh out a few missing spots in user space, move over to the now predominent model for generating new file permissions (non-conservative ACL override), implement NFSv3 RPCs. This is some, work, but not a huge amount of work. Or, the a new option that has basically become feasible over the last six years since the POSIX.1e direction was the one we selected: (b) We can consider a migration to NT/NFSv4-style ACLs, which is the route that Darwin has taken. They use the FreeBSD user space ACL library and POSIX.1e interfaces, but use ACLs with more NT-like semantics. In particular, they have notions of taking ownership, slightly finer grained directory controls, etc. This is a lot of work. Option (b) is an interesting new choice as compared to 1999, when NTFS ACLs were in the distinct minority in terms of the syntax and semantics they offered. However, they become much more appealing if we consider that there appears to be a much clearer mapping from NTFS ACLs to NFSv4 ACLs than there is from POSIX.1e ACLs to NFSv4 ACLs. And the fact that Mike Smith at Apple has taken the time to make it sit behind our library for the Darwin implementation on HFS+, etc, is also quite interesting. When I implemented the library, it was my hope that it would support that sort of thing, but we never actually tried :-). If we don't start considering a move to Darwin/NTFS ACLs, then we run into a problem when it comes to implementing NFSv4 ACLs: the mapping and behavior is rather poor and unclear. There's an ID on the topic, which I basically read as saying "This is all rather hard and rather non-ideal". Apple has identified that, for them, compatibility with NT (and possibly NFSv4?) is the way to go, and they may be right. On the other hand, the result is much reduced possibility of clean interoperability with Linux, Solaris, IRIX, and so on. So there's a definite trade-off. If we do make this change, I'd like to also simultaneously consider a change to add an array size field in the ACL structure -- right now, we have a fixed maximum size, and there's a field that says how much of that space is used, but not how much space is available. If we want to support longer ACLs in the future, having a variable array size will improve efficiency and add flexibility. If we want to consider switching to the Darwin ACL model, it sounds like the strategy would be something like the following: (1) Investigate the model closely, and compare it to NTFS. Identify whether any of the significant semantic differences is a problem. (2) Investigate the NFSv4 model closely, and decide if there is a clean and useful mapping or not. If there are nits, approach Apple and decide whether the nits are necessary or not. (3) Produce an implementation on top of UFS2 to experiment with, and see what happens. Specifically, how our current in-kernel APIs and data structures work with it. (4) See whether there is a sensible mapping from existing POSIX.1e ACLs to the newer ACL style, which could be performed at run-time when reading an existing ACL-enabled partition. Specifically, in the long term will we need to support two ACL modes -- a legacy POSIX.1e mode and a new Darwin/NTFS/NFSv4 mode, or can we run entirely in the new mode and run-time translate old ACLs to support a migration path? (6) Investigate what the implications are for applications, especially relating to supporting two ACL models. Will applications get stuck figuring out how they co-exist, or can the kernel help to hide it? (7) Investigate what the implications are for users, who may find that the semantic changes are significant -- and disruptive, potentially. Apple has chosen to provide separate tools for managing ACLs, rather than the POSIX.2e ones, and we might find the same is necessary. It would be interesting to know if systems other than Darwin have started exploring this route. For example, Sun has always been quite interested in NFSv4 -- are they considering or have they made an ACL change that corresponds with the integration of NFSv4 support? My feeling is that NFSv4 might be the compelling argument to consider a migration, and that if we are going to migrate, the sooner we get started with the implementation work, the better. Any thoughts here are welcome. Robert N M Watson To Unsubscribe: send mail to majordomo@trustedbsd.org with "unsubscribe trustedbsd-discuss" in the body of the message From owner-freebsd-fs@FreeBSD.ORG Fri Sep 23 21:30:04 2005 Return-Path: <owner-freebsd-fs@FreeBSD.ORG> X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC8DB16A446 for <freebsd-fs@freebsd.org>; Fri, 23 Sep 2005 21:30:04 +0000 (GMT) (envelope-from teleologically@lebreton.net) Received: from chb63.neoplus.adsl.tpnet.pl (chb63.neoplus.adsl.tpnet.pl [83.30.255.63]) by mx1.FreeBSD.org (Postfix) with SMTP id 781C943D49 for <freebsd-fs@freebsd.org>; Fri, 23 Sep 2005 21:30:02 +0000 (GMT) (envelope-from teleologically@lebreton.net) Received: from 103.101.185.48 (EHLO abed) by chb63.neoplus.adsl.tpnet.pl with SMTP; Fri, 23 Sep 2005 23:29:59 +0200 id 1520237085tackle9346 for freebsd-fs@freebsd.org; Fri, 23 Sep 2005 23:29:59 +0200 Mime-Version: 1.0 (Apple Message framework v728) Content-Transfer-Encoding: 7bit Message-Id: <11505467970.2649469307@chb63.neoplus.adsl.tpnet.pl> Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-fs@freebsd.org From: Eveline <teleologically@lebreton.net> Date: Fri, 23 Sep 2005 23:29:58 +0200 X-Mailer: Apple Mail (2.728) Subject: Super software, swell prices, splendid service. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 23 Sep 2005 21:30:04 -0000 cheap oem soft shipping worldwide http://hyfqkn.hfmh565n5057zhhu4zzumhzh.restesibmb.com/?uoyxqw Absence of proof is not proof of absence. I'd give you my seat, but I'm sitting in it. Sanity is a madness put to good use. Ambition is putting a ladder against the sky. Little by little, one travels far. Dig where the gold is…unless you just need some exercise.