From owner-freebsd-fs@FreeBSD.ORG Sun Oct 17 14:41:15 2004 Return-Path: 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 C974316A4CE; Sun, 17 Oct 2004 14:41:15 +0000 (GMT) Received: from gomez.cs.pitt.edu (gomez.cs.pitt.edu [130.49.220.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6715843D5A; Sun, 17 Oct 2004 14:41:15 +0000 (GMT) (envelope-from ywang4@cs.pitt.edu) Received: from selenium.cs.pitt.edu (selenium.cs.pitt.edu [130.49.220.33]) by gomez.cs.pitt.edu (8.12.10/8.12.5) with ESMTP id i9HEfFKW013493 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 17 Oct 2004 10:41:15 -0400 (envelope-from ywang4@cs.pitt.edu) Received: from selenium.cs.pitt.edu (localhost.localdomain [127.0.0.1]) by selenium.cs.pitt.edu (8.12.8/8.12.8) with ESMTP id i9HEfFvD002774; Sun, 17 Oct 2004 10:41:15 -0400 Received: from localhost (ywang4@localhost)i9HEfENi002770; Sun, 17 Oct 2004 10:41:14 -0400 X-Authentication-Warning: selenium.cs.pitt.edu: ywang4 owned process doing -bs Date: Sun, 17 Oct 2004 10:41:14 -0400 (EDT) From: Yan Wang To: freebsd-fs@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-security@freebsd.org Subject: TCFS on FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2004 14:41:15 -0000 Dear all, I tried to port Transparent Cryptographic File System (http://www.tcfs.it) OpenBSD version to FreeBSD 4.8, but failed. Has any one tried this before? How much modification is needed? Any info is appreciated. Thanks, Yan From owner-freebsd-fs@FreeBSD.ORG Mon Oct 18 08:20:47 2004 Return-Path: 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 A4CA316A4CE for ; Mon, 18 Oct 2004 08:20:47 +0000 (GMT) Received: from mgate.space.se (mgate.space.se [62.119.43.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5F5543D2F for ; Mon, 18 Oct 2004 08:20:46 +0000 (GMT) (envelope-from daniel.gustafsson@space.se) Received: from space.se (sunsrv1.space.se [10.112.201.15]) by mgate.space.se (Postfix) with ESMTP id 15A3D85A0 for ; Mon, 18 Oct 2004 10:20:35 +0200 (CEST) Received: from wxpsegbg1230 (wxpsegbg1230.space.se [10.114.140.76]) by space.se (8.12.8+Sun/8.12.8) with ESMTP id i9I8ET70015904 for ; Mon, 18 Oct 2004 10:14:59 +0200 (MEST) Message-Id: <200410180814.i9I8ET70015904@space.se> From: "Daniel Gustafsson" To: Date: Mon, 18 Oct 2004 10:19:54 +0200 Organization: Saab Ericsson Space AB MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcS06z1Ee88ouIaiSCSpz5/yaa5UGg== Subject: Extracting FFS from FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 08:20:47 -0000 Hello. I am working in a project which is in need of a stand-alone file system and I am interested in extracting FFS from BSD and modyfi it to a stand-alone module. I have some questions before I begin: 1. Is there any simple way to get FFS source code including all the layers nessesary to make a separate module (any tips and hints)? 2. Is there any Blockbased RAM driver available (or something like it) that can be used to test the system on RAM? 3. Can somebody give me some information about the footprint of FFS? 4. Does somebody have any tips of other file systems that already work as a stand-alone module (requirements: blocksize(4-16K), partitions(>=1GB))? Best Regards Daniel From owner-freebsd-fs@FreeBSD.ORG Mon Oct 18 10:48:22 2004 Return-Path: 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 E7ADC16A4CE for ; Mon, 18 Oct 2004 10:48:22 +0000 (GMT) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C7A443D41 for ; Mon, 18 Oct 2004 10:48:22 +0000 (GMT) (envelope-from ellard@eecs.harvard.edu) Received: from localhost (localhost.eecs.harvard.edu [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id B332254C690; Mon, 18 Oct 2004 06:48:21 -0400 (EDT) Received: from mail.eecs.harvard.edu ([127.0.0.1]) by localhost (bowser.eecs.harvard.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 33178-10; Mon, 18 Oct 2004 06:48:21 -0400 (EDT) Received: by mail.eecs.harvard.edu (Postfix, from userid 465) id 81A2B54C6A4; Mon, 18 Oct 2004 06:48:21 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id 7F14854C6A3; Mon, 18 Oct 2004 06:48:21 -0400 (EDT) Date: Mon, 18 Oct 2004 06:48:21 -0400 (EDT) From: Daniel Ellard To: Daniel Gustafsson In-Reply-To: <200410180814.i9I8ET70015904@space.se> Message-ID: <20041018064004.U32814@bowser.eecs.harvard.edu> References: <200410180814.i9I8ET70015904@space.se> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at eecs.harvard.edu cc: freebsd-fs@freebsd.org Subject: Re: Extracting FFS from FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 10:48:23 -0000 On Mon, 18 Oct 2004, Daniel Gustafsson wrote: > I am working in a project which is in need of a stand-alone file system and > I am interested in extracting FFS from BSD and modyfi it to a stand-alone > module. I have some questions before I begin: I also have some questions before you begin :-) They all follow from your last question. Do you really need FFS or will something simpler do the job? What functionality do you need to support? (Has anyone done this before?) My suspicion is that if all you need is a simple user-level file system, then you can find something already written that will do most or all of what you want -- unless you need something special. If you can't find anything, it's probably faster to write a simplistic file system on your own than to dis-tangle FFS from the rest of the kernel. -Dan From owner-freebsd-fs@FreeBSD.ORG Mon Oct 18 11:01:16 2004 Return-Path: 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 2C7CD16A4CF for ; Mon, 18 Oct 2004 11:01:16 +0000 (GMT) Received: from mgate.space.se (mgate.space.se [62.119.43.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D0F143D45 for ; Mon, 18 Oct 2004 11:01:15 +0000 (GMT) (envelope-from daniel.gustafsson@space.se) Received: from space.se (sunsrv1.space.se [10.112.201.15]) by mgate.space.se (Postfix) with ESMTP id 81CB784BA; Mon, 18 Oct 2004 13:01:04 +0200 (CEST) Received: from wxpsegbg1230 (wxpsegbg1230.space.se [10.114.140.76]) by space.se (8.12.8+Sun/8.12.8) with ESMTP id i9IAtK70006738; Mon, 18 Oct 2004 12:55:29 +0200 (MEST) Message-Id: <200410181055.i9IAtK70006738@space.se> From: "Daniel Gustafsson" To: "'Daniel Ellard'" Date: Mon, 18 Oct 2004 13:00:45 +0200 Organization: Saab Ericsson Space AB MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcS0/0kk8s72VYbYTcWClaNH4/RuOAAAUOZw In-Reply-To: <20041018064004.U32814@bowser.eecs.harvard.edu> cc: freebsd-fs@freebsd.org Subject: RE: Extracting FFS from FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 11:01:16 -0000 =20 It=B4s true that it may be overkill to extract FFS for my needs. The functionallity that I am after is: 1. Read/Write etc. 2. 1 GB Partitions. 3. Few reads and writes to disk. 4. RAM footprint between 200-800K 5. Blockbased (blocksize 4-8K). 6. Configurable. 7. Free. 8. Multi-user (I will integrate the FS with a RTOS) 9. Provides a RAM disk than can be modified to fit "any" secondary = storage used. NOTE: The above configuration is for the optimal FS. Does someone have any tips on file systems that fit this puropse. I have made some research but hasn't yet found anything adeuquate. //Daniel >-----Original Message----- >From: Daniel Ellard [mailto:ellard@eecs.harvard.edu]=20 >Sent: Monday, October 18, 2004 12:48 PM >To: Daniel Gustafsson >Cc: freebsd-fs@freebsd.org >Subject: Re: Extracting FFS from FreeBSD > >On Mon, 18 Oct 2004, Daniel Gustafsson wrote: > >> I am working in a project which is in need of a stand-alone=20 >file system and >> I am interested in extracting FFS from BSD and modyfi it to=20 >a stand-alone >> module. I have some questions before I begin: > >I also have some questions before you begin :-) They all follow from >your last question. > >Do you really need FFS or will something simpler do the job? What >functionality do you need to support? (Has anyone done this before?) > >My suspicion is that if all you need is a simple user-level file >system, then you can find something already written that will do most >or all of what you want -- unless you need something special. If you >can't find anything, it's probably faster to write a simplistic file >system on your own than to dis-tangle FFS from the rest of the kernel. > >-Dan > > From owner-freebsd-fs@FreeBSD.ORG Mon Oct 18 17:27:38 2004 Return-Path: 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 0E56716A4CE; Mon, 18 Oct 2004 17:27:38 +0000 (GMT) Received: from misty.eyesbeyond.com (glewis.dsl.xmission.com [166.70.56.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3BE243D2F; Mon, 18 Oct 2004 17:27:37 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) i9IHRXiU022500; Mon, 18 Oct 2004 11:27:34 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.12.11/8.12.11/Submit) id i9IHRVW7022499; Mon, 18 Oct 2004 11:27:31 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Mon, 18 Oct 2004 11:27:31 -0600 From: Greg Lewis To: Yan Wang Message-ID: <20041018172730.GA22441@misty.eyesbeyond.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: freebsd-fs@freebsd.org cc: freebsd-security@freebsd.org Subject: Re: TCFS on FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 17:27:38 -0000 On Sun, Oct 17, 2004 at 10:41:14AM -0400, Yan Wang wrote: > I tried to port Transparent Cryptographic File System > (http://www.tcfs.it) OpenBSD version to FreeBSD 4.8, but failed. Has > any one tried this before? How much modification is needed? Any info is > appreciated. I tried this a while ago. I got it to the point where the kernel compiled but unfortunately it would panic on boot. I didn't have the time to track down the problem unfortunately :(. I can probably dig up the patches if there is any interest, but they may need some forward porting (I think I was originally using 4.5). -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-fs@FreeBSD.ORG Tue Oct 19 08:41:16 2004 Return-Path: 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 A2E3816A4CE for ; Tue, 19 Oct 2004 08:41:16 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4609543D1D for ; Tue, 19 Oct 2004 08:41:16 +0000 (GMT) (envelope-from kerochan2@gmail.com) Received: by mproxy.gmail.com with SMTP id 79so273896rnk for ; Tue, 19 Oct 2004 01:41:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=gErREWXLVWozEoP6tVXYBgpoLfmGk+F6K+uU/HXRDcSy6+ouPSzwWs/23SBYZMdhv10OqEtR5PV1cxSgL9M0vPjgZtXc2BUeVT+TmUg3uAdmYxwRa6LJTFWuHbsDBrzDwicSWGjplKWeVvqqTzfa0xvB6W59SB5C9JLaLPUccTw Received: by 10.38.78.34 with SMTP id a34mr2050414rnb; Tue, 19 Oct 2004 01:41:13 -0700 (PDT) Received: by 10.38.75.26 with HTTP; Tue, 19 Oct 2004 01:41:13 -0700 (PDT) Message-ID: <3b793f1a041019014168692bc9@mail.gmail.com> Date: Tue, 19 Oct 2004 04:41:13 -0400 From: Kero-Chan To: Daniel Gustafsson In-Reply-To: <200410181055.i9IAtK70006738@space.se> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable References: <20041018064004.U32814@bowser.eecs.harvard.edu> <200410181055.i9IAtK70006738@space.se> cc: freebsd-fs@freebsd.org Subject: Re: Extracting FFS from FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Kero-Chan List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2004 08:41:16 -0000 On Mon, 18 Oct 2004 13:00:45 +0200, Daniel Gustafsson wrote: > It=B4s true that it may be overkill to extract FFS for my needs. >=20 > The functionallity that I am after is: > 1. Read/Write etc. > 2. 1 GB Partitions. > 3. Few reads and writes to disk. > 4. RAM footprint between 200-800K > 5. Blockbased (blocksize 4-8K). > 6. Configurable. > 7. Free. > 8. Multi-user (I will integrate the FS with a RTOS) > 9. Provides a RAM disk than can be modified to fit "any" secondary storag= e > used. >=20 > NOTE: The above configuration is for the optimal FS. >=20 > Does someone have any tips on file systems that fit this puropse. I have > made some research but hasn't yet found anything adeuquate. >=20 > //Daniel DOS FAT? My favourite embedded OS is using this: http://www.rtems.com/features.html#filesystems But it's not "multiuser" in the UNIX sense... If you're just looking for a simple UNIX FS, the MINIX file system is quite appropriate. And Linux has a fairly portable GPL implementation. [Sorry for advertising Linux on the FreeBSD list :] From owner-freebsd-fs@FreeBSD.ORG Tue Oct 19 09:06:28 2004 Return-Path: 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 DEAC916A4CE for ; Tue, 19 Oct 2004 09:06:28 +0000 (GMT) Received: from axe-inc.co.jp (axegw.axe-inc.co.jp [61.199.217.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEBE943D2D for ; Tue, 19 Oct 2004 09:06:27 +0000 (GMT) (envelope-from takawata@axe-inc.co.jp) Received: from localhost (localhost [127.0.0.1]) by axe-inc.co.jp (8.9.3+3.2W/3.7W) with SMTP id SAA28825; Tue, 19 Oct 2004 18:05:57 +0900 (JST) Message-Id: <200410190905.SAA28825@axe-inc.co.jp> X-Authentication-Warning: axegw.axe-inc.co.jp: localhost [127.0.0.1] didn't use HELO protocol To: "Daniel Gustafsson" In-reply-to: Your message of "Mon, 18 Oct 2004 10:19:54 +0200." <200410180814.i9I8ET70015904@space.se> Date: Tue, 19 Oct 2004 18:05:56 +0900 From: Takanori Watanabe cc: freebsd-fs@freebsd.org Subject: Re: Extracting FFS from FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2004 09:06:29 -0000 In message <200410180814.i9I8ET70015904@space.se>, "Daniel Gustafsson" wrote: > >Hello. > >I am working in a project which is in need of a stand-alone file system and >I am interested in extracting FFS from BSD and modyfi it to a stand-alone >module. I have some questions before I begin: > >1. Is there any simple way to get FFS source code including all the layers >nessesary to make a separate module (any tips and hints)? > >2. Is there any Blockbased RAM driver available (or something like it) that >can be used to test the system on RAM? > >3. Can somebody give me some information about the footprint of FFS? > >4. Does somebody have any tips of other file systems that already work as a >stand-alone module (requirements: blocksize(4-16K), partitions(>=1GB))? How about libstand(3) in /usr/src/lib/libstand, which is used in /boot/loader(8)? I don't think the FS support code in it does not support multi user. Following code is not work, but can be linked with %cc -nostdlib -ffreestanding -static hoge.c -lstand % file hoge hoge: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), statically linked, stripped % ls -l hoge -rwxr-xr-x 1 takawata wheel 16020 10 19 17:57 hoge %size hoge text data bss dec hex filename 13257 264 536 14057 36e9 hoge # size ufs.ko text data bss dec hex filename 203060 6404 452 209916 333fc ufs.ko ==hoge.c #include #define STUB struct fs_ops *file_system[] = { &ufs_fsops, NULL }; struct devsw mydev = { }; struct devsw *devsw[] = { &mydev, NULL }; #ifdef STUB int getchar(void) { return 0; } int ischar(void) { return 0; } void putchar(int c) { return ; } int devopen(struct open_file *of, const char *name,const char **file) { return EBUSY; } void panic(const char *msg, ...) { for(;;); } #endif main() { int a; } From owner-freebsd-fs@FreeBSD.ORG Wed Oct 20 14:49:11 2004 Return-Path: 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 371B016A4CE for ; Wed, 20 Oct 2004 14:49:11 +0000 (GMT) Received: from forrie.com (forrie.ne.client2.attbi.com [24.147.45.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FB2E43D1D for ; Wed, 20 Oct 2004 14:49:10 +0000 (GMT) (envelope-from forrie@forrie.com) Received: from [127.0.0.1] (i-99.forrie.net. [192.168.1.99]) by forrie.com with ESMTP id i9KEn2hi035584 for ; Wed, 20 Oct 2004 10:49:04 -0400 (EDT) (envelope-from forrie@forrie.com) Message-ID: <41767AA4.1050601@forrie.com> Date: Wed, 20 Oct 2004 10:48:04 -0400 From: Forrest Aldrich User-Agent: Mozilla Thunderbird 0.8 (Windows/20041019) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-RAVMilter-Version: 8.3.0(snapshot 20010925) (forrie.ne.client2.attbi.com) X-MailScanner-LocalNet: Found to be clean Subject: XFS for FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2004 14:49:11 -0000 I've been able to locate some postings that suggested there was an effort to get SGI's XFS ported to FreeBSD -- along with some concerns about licensing (GPL) issues. I'd like to get more information - is there an official project, who's heading it up, etc. etc. Thanks. From owner-freebsd-fs@FreeBSD.ORG Wed Oct 20 19:59:50 2004 Return-Path: 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 A905516A4CE for ; Wed, 20 Oct 2004 19:59:50 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D85B43D2F for ; Wed, 20 Oct 2004 19:59:50 +0000 (GMT) (envelope-from afields@afields.ca) Received: from afields.ca (localhost.afields.ca [127.0.0.1]) by afields.ca (8.12.11/8.12.11) with ESMTP id i9KJxmnv098353; Wed, 20 Oct 2004 15:59:48 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i9KJxlBu098352; Wed, 20 Oct 2004 15:59:47 -0400 (EDT) (envelope-from afields) Date: Wed, 20 Oct 2004 15:59:47 -0400 From: Allan Fields To: Daniel Gustafsson Message-ID: <20041020195947.GB74820@afields.ca> References: <20041018064004.U32814@bowser.eecs.harvard.edu> <200410181055.i9IAtK70006738@space.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410181055.i9IAtK70006738@space.se> User-Agent: Mutt/1.4i cc: freebsd-fs@freebsd.org Subject: Re: Extracting FFS from FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2004 19:59:50 -0000 Just a few more points to be raised on ffs usage/porting.. On Mon, Oct 18, 2004 at 01:00:45PM +0200, Daniel Gustafsson wrote: > It?s true that it may be overkill to extract FFS for my needs. > > The functionality that I am after is: > 1. Read/Write etc. standard filesystem primitives > 2. 1 GB Partitions. non-restrictive disk layout > 3. Few reads and writes to disk. i.e. something with an efficient disk layout that's fairly static, compact inode structures, good clustering and reasonable block i/o performance on the back end. Much of this ffs fulfills, but shouldn't be assumed the only option (look at the alternatives, etc.) > 4. RAM footprint between 200-800K Can you count on using a large buffer cache (and the additional memory this implies) so as to avoid duplicated reads or frequent writes? I'd think there is a compromise between 3 and 4. > 5. Blockbased (blocksize 4-8K). > 6. Configurable. > 7. Free. .. sane .. > 8. Multi-user (I will integrate the FS with a RTOS) Might you want even to look way back to a simpler time [tuhs.org] as a historical starting point? :) It might be useful to consider / compare other BSD implementations too such as NetBSD and decide then if ffs is the appropriate choice. Does this need to be compatible w/ existing file system layouts? Do you need anything past a very minimal FS? (As mentioned there are very much simplified *nix implementations w/ ffs support but w/o features such as soft updates and the snapshot code which are great for servers.) Do you need full UFS support? Are you planning on redoing the VFS layer to suite your needs too? > .. Using flash by any chance? If so, there are various papers/existing insight into FS using flash memory problem. On media independence ffs was designed primarily with Winchester disks in mind, not for instance CD-ROMs or flash cards. The chapter on Local Filestores in The Design and Implementation.. has a good outline of the original design work performed and explains the rational behind some of the decisions. > //Daniel -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 From owner-freebsd-fs@FreeBSD.ORG Thu Oct 21 05:08:33 2004 Return-Path: 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 F311B16A4CE for ; Thu, 21 Oct 2004 05:08:32 +0000 (GMT) Received: from mail.cyclades.com (mail.cyclades.com [64.186.161.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id E203543D48 for ; Thu, 21 Oct 2004 05:08:32 +0000 (GMT) (envelope-from sales@mail.cyclades.com) Received: by mail.cyclades.com (Postfix, from userid 1046) id BDF942DC903; Wed, 20 Oct 2004 22:08:32 -0700 (PDT) To: freebsd-fs@freebsd.org References: <20041021050828.C95798003E0@intra.cyclades.com> In-Reply-To: <20041021050828.C95798003E0@intra.cyclades.com> X-Loop: sales@cyclades.com Precedence: junk Message-Id: <20041021050832.BDF942DC903@mail.cyclades.com> Date: Wed, 20 Oct 2004 22:08:32 -0700 (PDT) From: sales@mail.cyclades.com (Sales Department) Subject: Re: {Virus?} Mail Delivery (failure sales@cyclades.com) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 05:08:33 -0000 Dear Customer: This automatic response is to acknowledge that your message has been received by Cyclades. A sales representative will be contacting you shortly. If you don't receive a response in 48 hours, please let us know. Cyclades Sales From owner-freebsd-fs@FreeBSD.ORG Thu Oct 21 07:37:18 2004 Return-Path: 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 882CE16A4CE for ; Thu, 21 Oct 2004 07:37:18 +0000 (GMT) Received: from mail5.dslextreme.com (mail5.dslextreme.com [66.51.199.81]) by mx1.FreeBSD.org (Postfix) with SMTP id 082F043D41 for ; Thu, 21 Oct 2004 07:37:18 +0000 (GMT) (envelope-from seva_t@dslextreme.com) Received: (qmail 30678 invoked from network); 21 Oct 2004 07:37:16 -0000 Received: from unknown (HELO dnepr) (66.159.224.147) by 192.168.8.93 with SMTP; Thu, 21 Oct 2004 07:37:16 +0000 From: "Seva Tonkonoh" To: Date: Thu, 21 Oct 2004 00:38:17 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Importance: Normal X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) Subject: acl question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 07:37:18 -0000 Hello, I am interested in the following problem: My process is running as root. I want to check if some user is allowed to access a file. Can I use ACL API to achieve that, or is there any other way? The process is multithreaded, so I am not sure if I can use setuid(). Thanks, Seva Tonkonoh From owner-freebsd-fs@FreeBSD.ORG Thu Oct 21 10:35:41 2004 Return-Path: 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 EEBEF16A4CE; Thu, 21 Oct 2004 10:35:40 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE6C243D2F; Thu, 21 Oct 2004 10:35:40 +0000 (GMT) (envelope-from afields@afields.ca) Received: from afields.ca (localhost.afields.ca [127.0.0.1]) by afields.ca (8.12.11/8.12.11) with ESMTP id i9LAZMRt001168; Thu, 21 Oct 2004 06:35:22 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i9LAZIs2001167; Thu, 21 Oct 2004 06:35:18 -0400 (EDT) (envelope-from afields) Date: Thu, 21 Oct 2004 06:35:18 -0400 From: Allan Fields To: Greg Lewis Message-ID: <20041021103518.GD74820@afields.ca> References: <20041018172730.GA22441@misty.eyesbeyond.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="69pVuxX8awAiJ7fD" Content-Disposition: inline In-Reply-To: <20041018172730.GA22441@misty.eyesbeyond.com> User-Agent: Mutt/1.4i cc: freebsd-fs@freebsd.org cc: freebsd-security@freebsd.org Subject: Re: TCFS on FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 10:35:41 -0000 --69pVuxX8awAiJ7fD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 18, 2004 at 11:27:31AM -0600, Greg Lewis wrote: > On Sun, Oct 17, 2004 at 10:41:14AM -0400, Yan Wang wrote: > > I tried to port Transparent Cryptographic File System > > (http://www.tcfs.it) OpenBSD version to FreeBSD 4.8, but failed. Has > > any one tried this before? How much modification is needed? Any info is > > appreciated. >=20 > I tried this a while ago. I got it to the point where the kernel compiled > but unfortunately it would panic on boot. I didn't have the time to track > down the problem unfortunately :(. >=20 > I can probably dig up the patches if there is any interest, but they may > need some forward porting (I think I was originally using 4.5). I'd be interested in this and would also like to take a look at the patches. Mind you my biggest constraint is also time. There is a lack of ports on FreeBSD of this type of crypt file system. While gbde offers a convenient device level approach, TCFS might be employed in other applications/to meet differing security requirements. Some have reported TCFS has/had problems on other platforms and porting would potentially require addressing these issues as well. Also see this effort for NetBSD: http://vaxn8.tripod.com/tcfs/ The author also was using various test tools. My approach would be to port to 5.x or HEAD, but if anyone is more interested in support on 4.x hosts given the relative lack of options, it makes sense to bring 4.x patches up to date as well. Remember of course 4.x users can still use good old cfs for the time being. It is in fact quite reliable from my tests but has several significant deficiencies including: - relatively dated security model/design - significantly bottlenecked I/O performance - lack of support for long filenames (you'll notice this almost immediately) - lack of support for extended characters: if I remember correctly, my tests had certain problems where files would be copied into the volume, but then become inaccessible, producing errors on each access and you'd have to work with the backing files to remove them (-- the very fact this can be done highlights another issue;) TCFS tries to address these problems in cfs, but I've wondered if it wouldn't be an idea to simply tweak aspects of cfs itself, but it'd still be inherently limited by the interface choice (NFS). Until something comprehensive comes along to deal with userside filesystem implementations, I'd assume that it will remain more efficient to implement as much as possible in the kernel which raises the idea of employing a vnode stacking approach such as cryptfs. > --=20 > Greg Lewis Email : glewis@eyesbeyond.com > Eyes Beyond Web : http://www.eyesbeyond.com > Information Technology FreeBSD : glewis@FreeBSD.org --=20 Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 --69pVuxX8awAiJ7fD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFBd5Dl90UNcjm0VUERApyBAJ9Wjd5DNrELuZci6i3HvQUvZrihzQCfd3y6 Gr/Xz+EoIWFJk8kyJ4J34LE= =Tq9u -----END PGP SIGNATURE----- --69pVuxX8awAiJ7fD-- From owner-freebsd-fs@FreeBSD.ORG Thu Oct 21 15:07:49 2004 Return-Path: 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 9DE7516A4CE; Thu, 21 Oct 2004 15:07:49 +0000 (GMT) Received: from misty.eyesbeyond.com (glewis.dsl.xmission.com [166.70.56.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDB1843D54; Thu, 21 Oct 2004 15:07:48 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) i9LF7YC1084927; Thu, 21 Oct 2004 09:07:34 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.12.11/8.12.11/Submit) id i9LF7X08084926; Thu, 21 Oct 2004 09:07:33 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Thu, 21 Oct 2004 09:07:32 -0600 From: Greg Lewis To: Allan Fields Message-ID: <20041021150732.GA84912@misty.eyesbeyond.com> References: <20041018172730.GA22441@misty.eyesbeyond.com> <20041021103518.GD74820@afields.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021103518.GD74820@afields.ca> User-Agent: Mutt/1.4.2.1i cc: freebsd-fs@FreeBSD.org cc: freebsd-security@FreeBSD.org Subject: Re: TCFS on FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 15:07:49 -0000 On Thu, Oct 21, 2004 at 06:35:18AM -0400, Allan Fields wrote: > On Mon, Oct 18, 2004 at 11:27:31AM -0600, Greg Lewis wrote: > > On Sun, Oct 17, 2004 at 10:41:14AM -0400, Yan Wang wrote: > > > I tried to port Transparent Cryptographic File System > > > (http://www.tcfs.it) OpenBSD version to FreeBSD 4.8, but failed. Has > > > any one tried this before? How much modification is needed? Any info is > > > appreciated. > > > > I tried this a while ago. I got it to the point where the kernel compiled > > but unfortunately it would panic on boot. I didn't have the time to track > > down the problem unfortunately :(. > > > > I can probably dig up the patches if there is any interest, but they may > > need some forward porting (I think I was originally using 4.5). > > I'd be interested in this and would also like to take a look at the > patches. Mind you my biggest constraint is also time. Several people have asked about this. I will dig them out in the next couple days (they are currently on a machine which is powered off). -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-fs@FreeBSD.ORG Thu Oct 21 18:53:50 2004 Return-Path: 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 F3E3516A4CE; Thu, 21 Oct 2004 18:53:49 +0000 (GMT) Received: from corbulon.video-collage.com (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E16643D2D; Thu, 21 Oct 2004 18:53:49 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from 250-217.customer.cloud9.net (195-11.customer.cloud9.net [168.100.195.11])i9LIridN028957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Oct 2004 14:53:45 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from localhost (mteterin@localhost [127.0.0.1]) i9LIrYSq057198; Thu, 21 Oct 2004 14:53:34 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) From: Mikhail Teterin Organization: Virtual Estates, Inc. To: freebsd-current@freebsd.org Date: Thu, 21 Oct 2004 14:53:33 -0400 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410211453.33750@misha-mx.virtual-estates.net> X-Virus-Scanned: clamd / ClamAV version devel-20040615, clamav-milter version 0.73a on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 cc: freebsd-fs@freebsd.org Subject: panic: ffs_blkfree: freeing free block X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 18:53:50 -0000 Hello! After suffering through http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/72451 and experiencing occasional ufs2 panics (rather than the usual system hangs), we recreated the troublesome partition as ufs1 without softupdates, with other newfs parameters being default. We also set the mpsafenet and mpsafevm to 0, as it seemed to have helped increase the system's uptime in the past. Under the load, the system eventually paniced with: 'ffs_blkfree: freeing free block'. The stack was: ffs_blkfree+0x433 ffs_indirtrunc+0x37c ffs_indirtrunc+0x33c ffs_truncate+0xd24 ufs_inactive+0x1d7 vput+0x113 kern_unlink+0x129 unlink+0x3e The machine runs fresh amd64-current on a single Opteron in a dual capable Tyan K8W motherboard. The troublesome harddrive is connected directly to the on-board SATA connector at SATA150 speed. We went through two drives, two SATA cables, already, and tried other on-board SATA connectors. Is this panic just as likely to hit us if we go back to RELENG_5? Could the bug be stemming from some unsafeness in ata's reset/reinit code -- testing these must be painfully difficult, I understand. Thanks! -mi From owner-freebsd-fs@FreeBSD.ORG Fri Oct 22 12:41:42 2004 Return-Path: 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 5B38416A4CE for ; Fri, 22 Oct 2004 12:41:42 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBAA643D5C for ; Fri, 22 Oct 2004 12:41:41 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id i9MCfMBr050481; Fri, 22 Oct 2004 08:41:22 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i9MCfLpK050478; Fri, 22 Oct 2004 08:41:22 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Fri, 22 Oct 2004 08:41:21 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Seva Tonkonoh In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-fs@freebsd.org Subject: Re: acl question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2004 12:41:42 -0000 On Thu, 21 Oct 2004, Seva Tonkonoh wrote: > I am interested in the following problem: > > My process is running as root. I want to check if some user is allowed > to access a file. Can I use ACL API to achieve that, or is there any > other way? > > The process is multithreaded, so I am not sure if I can use setuid(). Currently the only reliable way to check an ACL in place on a file against a credential is to adopt that credential for the duration of the system call. As you point out, this presents a problem for traditionally (POSIX) threaded apps, as they share a single process credential (although there can be slightly weak consistency: a thread maintains its credential from the start of the system call for the duration of the system call, regardless of changes by other threads). However, as the man page for access(2) and eaccess(2) point out, you have to be very careful about having user applications performing access control checks rather than adopting the right credential, as otherwise there's a risk of nasty races. It's also worth noting, btw, that in order to evaluate an ACL, you need not just the uid, but also a couplete set of groups for the user, so setuid() alone is not enough to set up for an access control check. Is there a way you can avoid this requirement in your application, or does the need to use threads (for performance or the like) prevent taking a more process-centric model? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research From owner-freebsd-fs@FreeBSD.ORG Fri Oct 22 23:41:56 2004 Return-Path: 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 37C4316A4CE for ; Fri, 22 Oct 2004 23:41:56 +0000 (GMT) Received: from mail.cableone.net (scanmail2.cableone.net [24.116.0.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id E72AD43D4C for ; Fri, 22 Oct 2004 23:41:55 +0000 (GMT) (envelope-from v.velox@vvelox.net) Received: from fennec (unverified [24.119.122.25]) by smail2.cableone.net (SurgeMail 1.9b) with ESMTP id 23128811 for ; Fri, 22 Oct 2004 16:40:35 -0700 Date: Fri, 22 Oct 2004 17:40:52 -0500 From: Vulpes Velox To: freebsd-fs@freebsd.org Message-ID: <20041022174052.4a203268@fennec> X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Server: High Performance Mail Server - http://surgemail.com Subject: Unionfs and nullfs question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2004 23:41:56 -0000 Just got reading the man for both of those. The thing I am wondering about is, under what circumstances are they dangerous to use. Mainly in unionfs, since I don't think it can be done using nullfs. Any ways, here is what is happening... I have two drives mounted, and I want the contents from both to appear in one dir. So I have one blank dir that those filesystems are union mounted too. The other thing I was wondering about is this... having a second home dir and union mounting it to ~ for the purpose of storing over ride configs for the base rcs.... mainly for making it some what easier for keeping seperate settings for some programs based on what machine it is on. Not tried this yet, but been thinking about it. Any ways, input is welcome :) I am guessing the answer, given the big warning in the man for both is that this is going to be a no that both are dangerous to the data and luck is mainly involved in not having the data screwed over, but just wanna check :) Thanks in advance! :) From owner-freebsd-fs@FreeBSD.ORG Sat Oct 23 07:56:55 2004 Return-Path: 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 2C4AF16A4CE for ; Sat, 23 Oct 2004 07:56:55 +0000 (GMT) Received: from mail5.dslextreme.com (mail5.dslextreme.com [66.51.199.81]) by mx1.FreeBSD.org (Postfix) with SMTP id F362743D55 for ; Sat, 23 Oct 2004 07:56:54 +0000 (GMT) (envelope-from seva_t@dslextreme.com) Received: (qmail 701 invoked from network); 23 Oct 2004 07:56:53 -0000 Received: from unknown (HELO dnepr) (66.159.224.147) by 192.168.8.93 with SMTP; Sat, 23 Oct 2004 07:56:53 +0000 From: "Seva Tonkonoh" To: "Robert Watson" Date: Sat, 23 Oct 2004 00:57:55 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 In-Reply-To: Importance: Normal X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) cc: freebsd-fs@freebsd.org Subject: RE: acl question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2004 07:56:55 -0000 I turned to ACL mostly because I thought it might be more "thread-friendly" than access() syscall. Yes, I would like to use threads because of the performance reasons, and just because it seems as a cleaner approach. Ideally, I'd love to have Windows-style "thread impersonation". >From what you said, it seems my only option would be to use multi-process design. Thanks a lot for your suggestions, Seva Tonkonoh -----Original Message----- From: Robert Watson [mailto:rwatson@freebsd.org] Sent: Friday, October 22, 2004 5:41 AM To: Seva Tonkonoh Cc: freebsd-fs@freebsd.org Subject: Re: acl question On Thu, 21 Oct 2004, Seva Tonkonoh wrote: > I am interested in the following problem: > > My process is running as root. I want to check if some user is allowed > to access a file. Can I use ACL API to achieve that, or is there any > other way? > > The process is multithreaded, so I am not sure if I can use setuid(). Currently the only reliable way to check an ACL in place on a file against a credential is to adopt that credential for the duration of the system call. As you point out, this presents a problem for traditionally (POSIX) threaded apps, as they share a single process credential (although there can be slightly weak consistency: a thread maintains its credential from the start of the system call for the duration of the system call, regardless of changes by other threads). However, as the man page for access(2) and eaccess(2) point out, you have to be very careful about having user applications performing access control checks rather than adopting the right credential, as otherwise there's a risk of nasty races. It's also worth noting, btw, that in order to evaluate an ACL, you need not just the uid, but also a couplete set of groups for the user, so setuid() alone is not enough to set up for an access control check. Is there a way you can avoid this requirement in your application, or does the need to use threads (for performance or the like) prevent taking a more process-centric model? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research From owner-freebsd-fs@FreeBSD.ORG Sat Oct 23 14:47:55 2004 Return-Path: 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 5F99816A4CE for ; Sat, 23 Oct 2004 14:47:55 +0000 (GMT) Received: from hub.org (hub.org [200.46.204.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A71443D2F for ; Sat, 23 Oct 2004 14:47:55 +0000 (GMT) (envelope-from scrappy@hub.org) Received: from localhost (unknown [200.46.204.144]) by hub.org (Postfix) with ESMTP id 0F2AA12B097; Sat, 23 Oct 2004 11:47:30 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 68723-03; Sat, 23 Oct 2004 14:47:31 +0000 (GMT) Received: from ganymede.hub.org (blk-222-46-91.eastlink.ca [24.222.46.91]) by hub.org (Postfix) with ESMTP id 4566812A7DA; Sat, 23 Oct 2004 11:47:29 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id 93F363C483; Sat, 23 Oct 2004 11:47:57 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 8DBF33A78E; Sat, 23 Oct 2004 11:47:57 -0300 (ADT) Date: Sat, 23 Oct 2004 11:47:57 -0300 (ADT) From: "Marc G. Fournier" To: Vulpes Velox In-Reply-To: <20041022174052.4a203268@fennec> Message-ID: <20041023113958.X16873@ganymede.hub.org> References: <20041022174052.4a203268@fennec> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org cc: freebsd-fs@freebsd.org Subject: Re: Unionfs and nullfs question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2004 14:47:55 -0000 On Fri, 22 Oct 2004, Vulpes Velox wrote: > I am guessing the answer, given the big warning in the man for both is > that this is going to be a no that both are dangerous to the data and > luck is mainly involved in not having the data screwed over, but just > wanna check :) I run over 200 VPSs over 4 machines with all application data (installed ports) mounted through unionfs to reduce disk space usage ... every once in a blue moon, I'll get a crash resulting from a bug in the unionfs code, but it isn't as bad as it was, say, a year ago ... but I am running production servers with it. There are a few things you can't do right now ... for instance, I don't have /var union mounted, as FIFO's/sockets tend to consistently blow it up ... but, my more loaded server looks like: # df -t union | wc -l 73 # uptime 11:41AM up 47 days, 22:25, 1 user, load averages: 12.12, 20.67, 22.46 There is an annoying 'bug' in fsck that Don Lewis has been working on correcting that is very exasperated by unionfs ... namely how the list of inodes to check is generated. If you, for instance, mount a blank file systems over top of /usr/ports, and then do a find of /usr/ports, the blank file system will fill up with a bunch of directories to 'mirror' ports ... the files don't come through, only the directories. On a crash, the OS leaves behind a bunch of ZERO LENGTH DIRECTORIES ... I've had fsck run for 12-14hrs after one of these, its that messy :( Don has been working on a patch to handle the ZLDs better, but it hasn't been committed to -stable yet, pending more testing ... I'm running it live here, but *knock on wood* haven't had a crash since putting it into place ... ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664