From owner-freebsd-fs Mon Dec 23 11: 1:16 2002 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 B033F37B401 for ; Mon, 23 Dec 2002 11:01:15 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56CF143EEA for ; Mon, 23 Dec 2002 11:01:15 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gBNJ1FNS087970 for ; Mon, 23 Dec 2002 11:01:15 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gBNJ1E8t087946 for fs@freebsd.org; Mon, 23 Dec 2002 11:01:14 -0800 (PST) Date: Mon, 23 Dec 2002 11:01:14 -0800 (PST) Message-Id: <200212231901.gBNJ1E8t087946@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: fs@FreeBSD.org Subject: Current problem reports assigned to you Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Current FreeBSD problem reports Critical problems Serious problems Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- a [2000/10/06] kern/21807 fs [patches] Make System attribute correspon 1 problem total. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Dec 23 13:31:14 2002 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 EAC7B37B401 for ; Mon, 23 Dec 2002 13:31:12 -0800 (PST) Received: from callisto.acsu.buffalo.edu (callisto.acsu.buffalo.edu [128.205.7.122]) by mx1.FreeBSD.org (Postfix) with SMTP id 26A3B43EF2 for ; Mon, 23 Dec 2002 13:31:12 -0800 (PST) (envelope-from asthana@buffalo.edu) Received: (qmail 22822 invoked by uid 87418); 23 Dec 2002 21:31:11 -0000 Date: Mon, 23 Dec 2002 16:31:11 -0500 (EST) From: Somil Asthana X-Sender: asthana@callisto.acsu.buffalo.edu To: freebsd-fs@freebsd.org Subject: Stackable FileSystem. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi All: I am trying to develop a simple encrypted stackable file system. Instead of making a new stackable file system I modified nullfs code itself. I added null_read() and null_write() functions. null_read() internally calls VOP_READ() and null_write() calls VOP_WRITE() (it bypass control to lower vnode vectors VOPS). The code of null_write() function is such that before calling VOP_WRITE() it increments each character pointed by uio_iov->iov_base[i] by 1 and null_read() does the opposite ie it decrement each character pointed by uio_iov->iov_base[i] by 1 after calling VOP_READ. So for example if I open a file and store "ABCDE" it actually gets stored as "BCDEF" but when I read it back using cat program or read system call I get "BCDEF" not "ABCDE".I can see the code is going to null_read() and uio_iov->iov_base[i] is actually printing "ABCDE" on console. Whats surprising is that user space cat or read system call are not giving the correct output or I should say that modified uio structure is not reflected in user space. I am mounting using this command sudo mount -t null /mnt/ /TMP/ So in /TMP dir has a nullfs is on top of ufs Am I missing something here ? I can see that the control is actually going to null_read and null_write and I have tested that nullfs is on top of ufs in /TMP directory. thank you Somil To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Dec 23 15:37:36 2002 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 39B3537B401 for ; Mon, 23 Dec 2002 15:37:33 -0800 (PST) Received: from pollux.cse.buffalo.edu (pollux.cse.Buffalo.EDU [128.205.35.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EB0743EDE for ; Mon, 23 Dec 2002 15:37:32 -0800 (PST) (envelope-from tgogoi@cse.Buffalo.EDU) Received: (from tgogoi@localhost) by pollux.cse.buffalo.edu (8.11.6+Sun/8.10.1) id gBNNbVM25742; Mon, 23 Dec 2002 18:37:31 -0500 (EST) Date: Mon, 23 Dec 2002 18:37:31 -0500 (EST) From: Tony Gogoi To: Subject: Question on the NULLFS file-system Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi everyone, I was referred by someone to post my question here. Will be very grateful if someone would respond.... I modified sys/miscfs/nullfs/null_vnops.c so that it now includes a null_write and a null_read system call. The purpose is simple encryption. Any file that has its first 3 characters as "---" would be encrpted such that whats stored in the lowest layer (ufs) would be one ascii character higher. Example if I do "vi N" and then store ---ABCD in the file, it gets stored as ---BCDE ( i don't encrypt the -'s). This works when I use 'vi' BUT when I write a simple program which has something like /* start of test program */ #include #include int main() { int fd = 0; char buff[100]; fd = open("N",O_RDWR|O_CREAT); if(fd < 0) { perror("open failed\n"); exit(1); } write(fd,"---Tony\nabcdefg",17); close(fd); return 0; } /* end of test program */ /***************************************. Then the kernel crashes. It crashes whenever the first 3 characters of the file are "---" sa then encryption needs to be performed. Why does null_write system call work properly when I use "vi" but crashes when i write such a simple test program ? Below if the code I worte for null_write : /***************************************************************************/ static int null_write(ap) struct vop_write_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; struct ucred *a_cred; } */ *ap; { int error; char *ptr_buffer; int i, j, Limit, Flag ; ptr_buffer = ap->a_uio->uio_iov[0].iov_base; if(ap->a_uio->uio_iovcnt > 1) { Limit = 3; } else { if(ap->a_uio->uio_iov[0].iov_len > 3) Limit = 3; else Limit = ap->a_uio->uio_iov[0].iov_len; } Flag = 1; /*************************************************************************/ /* check if encryption requested */ if(Limit==3) { if(ptr_buffer[0]=='-' && ptr_buffer[1]=='-' && ptr_buffer[2]=='-') { Flag = 0; } } /*************************************************************************/ if(Flag==0) { for(i=0;ia_uio->uio_iovcnt;i++) { ptr_buffer = ap->a_uio->uio_iov[i].iov_base; for(j=0;ja_uio->uio_iov[i].iov_len;j++) { if((ptr_buffer[j] != '-') && (ptr_buffer[j] != '\n')) { ptr_buffer[j] = ptr_buffer[j] + 1; } } } } if ((error = null_bypass((struct vop_generic_args *)ap)) != 0) return (error); return(0); } /* end of null_write code */ /*****************************************************************************************/ thanks for your time. Tony Gogoi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Dec 24 10:37:10 2002 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 684BC37B401 for ; Tue, 24 Dec 2002 10:37:09 -0800 (PST) Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0067F43EA9 for ; Tue, 24 Dec 2002 10:37:08 -0800 (PST) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from agora.fsl.cs.sunysb.edu (IDENT:UXO9qTflfSaG5+/jEq3QxkZVVC6W1LPl@agora.fsl.cs.sunysb.edu [130.245.126.12]) by filer.fsl.cs.sunysb.edu (8.11.6/8.11.6) with ESMTP id gBOIav922485 for ; Tue, 24 Dec 2002 13:36:57 -0500 Received: (from ezk@localhost) by agora.fsl.cs.sunysb.edu (8.11.6/8.11.6) id gBO39j020548; Mon, 23 Dec 2002 22:09:45 -0500 Date: Mon, 23 Dec 2002 22:09:45 -0500 Message-Id: <200212240309.gBO39j020548@agora.fsl.cs.sunysb.edu> From: Erez Zadok To: Tony Gogoi Cc: freebsd-fs@freebsd.org Subject: Re: Question on the NULLFS file-system In-reply-to: Your message of "Mon, 23 Dec 2002 18:37:31 EST." X-MailKey: Erez Zadok Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message , Tony Gogoi writes: > Hi everyone, > > I was referred by someone to post my question here. Will be very grateful > if someone would respond.... > > I modified sys/miscfs/nullfs/null_vnops.c so that it now includes a > null_write and a null_read system call. The purpose is simple encryption. Wow, what a coincidence: two people from the same university (you and Somil Asthana ) asking questions about the same topic on the same day on the same mailing list --- a topic you don't hear about this list very often. You two aren't by any chance trying to get people on this mailing list to do you homework, right? :-) Erez. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Dec 24 10:37:11 2002 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 6F9D737B405 for ; Tue, 24 Dec 2002 10:37:09 -0800 (PST) Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03C7843EB2 for ; Tue, 24 Dec 2002 10:37:08 -0800 (PST) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from agora.fsl.cs.sunysb.edu (IDENT:UXO9qTflfSaG5+/jEq3QxkZVVC6W1LPl@agora.fsl.cs.sunysb.edu [130.245.126.12]) by filer.fsl.cs.sunysb.edu (8.11.6/8.11.6) with ESMTP id gBOIav922482 for ; Tue, 24 Dec 2002 13:36:57 -0500 Received: (from ezk@localhost) by agora.fsl.cs.sunysb.edu (8.11.6/8.11.6) id gBO2xSo20507; Mon, 23 Dec 2002 21:59:28 -0500 Date: Mon, 23 Dec 2002 21:59:28 -0500 Message-Id: <200212240259.gBO2xSo20507@agora.fsl.cs.sunysb.edu> From: Erez Zadok To: Somil Asthana Cc: freebsd-fs@freebsd.org Subject: Re: Stackable FileSystem. In-reply-to: Your message of "Mon, 23 Dec 2002 16:31:11 EST." X-MailKey: Erez Zadok Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org You might want to take a look at my (old) cryptfs, part of the fist stackable file system templates: http://www.cs.columbia.edu/~ezk/research/fist/ Erez. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Dec 24 10:57: 7 2002 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 1688E37B401 for ; Tue, 24 Dec 2002 10:57:06 -0800 (PST) Received: from catamount.cse.Buffalo.EDU (catamount.cse.Buffalo.EDU [128.205.35.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 355CF43EA9 for ; Tue, 24 Dec 2002 10:57:05 -0800 (PST) (envelope-from tgogoi@cse.Buffalo.EDU) Received: (from tgogoi@localhost) by catamount.cse.Buffalo.EDU (8.11.6+Sun/8.10.1) id gBOIuWN00400; Tue, 24 Dec 2002 13:56:32 -0500 (EST) Date: Tue, 24 Dec 2002 13:56:31 -0500 (EST) From: Tony Gogoi To: Erez Zadok Cc: Subject: Re: Question on the NULLFS file-system In-Reply-To: <200212240309.gBO39j020548@agora.fsl.cs.sunysb.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Dr Zadok, I asked you some clarifications on the nullfs by personal mail in Summer to which I didn't get any reply after i read ur paper. This problem is actually mine. This is not homework, but some extra work i'm doing. I asked Somil Asthana to post for me on the bsd newsgroups he knows. what he posted was what i asked him to post. After working the last 3 nights as my vacations have started, I figured out that the bug lay in the iovectors which was overlooked by misleading printf statements.......So its not necsasry for anyone to respond but any discussion on nullfs and its idiosyncracies would be appreciated. tony On Mon, 23 Dec 2002, Erez Zadok wrote: > In message , Tony Gogoi writes: > > Hi everyone, > > > > I was referred by someone to post my question here. Will be very grateful > > if someone would respond.... > > > > I modified sys/miscfs/nullfs/null_vnops.c so that it now includes a > > null_write and a null_read system call. The purpose is simple encryption. > > Wow, what a coincidence: two people from the same university (you and Somil > Asthana ) asking questions about the same topic > on the same day on the same mailing list --- a topic you don't hear about > this list very often. > > You two aren't by any chance trying to get people on this mailing list to do > you homework, right? :-) > > Erez. > Tony Gogoi Graduate Student and Teaching Assistant Office : Trailer A-16 Dept of Computer Science and Engineering State University of New York at Buffalo ___________________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Dec 25 8:13: 1 2002 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 E610737B401; Wed, 25 Dec 2002 08:12:52 -0800 (PST) Received: from adelphia.net (ah-c-13f6.adsl.wanadoo.nl [212.129.147.246]) by mx1.FreeBSD.org (Postfix) with SMTP id 3CF1B43EE1; Wed, 25 Dec 2002 08:11:30 -0800 (PST) (envelope-from pecorici417@adelphia.net) Reply-To: Message-ID: <030c21e40b3e$3535c3b7$7ce03ad2@lgrloq> From: To: AOL@FreeBSD.ORG, Users@FreeBSD.ORG Subject: WARNING: Virus Detected! Date: Wed, 25 Dec 2002 08:07:52 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 1 (High) X-MSMail-Priority: High X-Mailer: QUALCOMM Windows Eudora Version 5.1 Importance: Normal Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org WARNING: Your computer is at risk. Over 350,000 personal computers were destroyed last year by computer viruses. Businesses reported record losses of nearly 120 billion dollars because of malicious virus code. Don't be a victim! PROTECT YOUR COMPUTER TODAY with Norton Antivirus 2003! Norton Antivirus 2003 is the world's most trusted anti-virus solution. Now it repairs common virus infections automatically, without interrupting your work. It scans and cleans both incoming and outgoing email, and defends against script-based viruses such as "I Love You" even between virus definition updates. It works in the background 24 hours a day to defend your PC against viruses and other malicious Internet code. It automatically scans incoming attachments in many popular email programs, and works in the background to detect viruses in attachments from other programs. The automatic Live Update™ technology in Norton AntiVirus checks for new virus definitions when you're online, so you don't have to remember to do it yourself. PROTECT yourself against the latest deadly worms like Code Red and SirCam! Symantec Norton AntiVirus 2003 Key Features: ** NEW! Instant Messaging Scanning: Scanning for virus infections and automatic removal in Instant Messaging systems. ** NEW! Worm Blocking: Detecting and blocking worms in outgoing email to prevent them from sending themselves out and spreading through email address books. ** Enhanced Automatic removal of Trojans and worms: Worms and Trojan horses are malicious programs that should be deleted. Norton AntiVirus 2003 will automatically delete Worms and Trojan horses without interrupting user’s work. ** Automatic removal of many viruses lets you work without interruption. ** Script Blocking detects script-based threats such as the "I Love You" and "Anna Kournikova" viruses, even before new virus definitions are created for them. ** Scans and cleans outgoing email messages to prevent sending infected files from your PC. ** Integration with Windows Explorer lets you use many common Norton AntiVirus functions from the Explorer menus for easy access. ** Built-in links take you directly to the Symantec Security Response Web site (formerly known as Symantec AntiVirus Research Center) for additional information on specific viruses just when you need it most. ** Automatic LiveUpdate checks for and installs new virus definitions when you're connected to the Internet to keep your system updated against the latest viruses. ** Automatically scans email messages and attachments in standard POP3 clients, including Microsoft Outlook, Eudora, and Netscape Mail. ** Protects against viruses, Trojan horses, and malicious ActiveX code and Java applets, even in compressed files. ** Quarantine feature isolates infected files in a protected area of your hard disk until they can be repaired. ** Scan and Deliver wizard makes it easy to send infected files to Symantec Security Response experts for analysis. ** Receive 1 Full Year Of Virus Definition Updates (LiveUpdate) With Online Registration Of Symantec Norton AntiVirus 2003 To order Norton Antivirus 2003 right now for only $34.99, click on the link below to visit our secure server: http://lonewplace.nease.net/images/nortonantivirus.htm b-two 5405SMhE1-l9 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Dec 25 16:18:22 2002 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 7421237B401 for ; Wed, 25 Dec 2002 16:18:21 -0800 (PST) Received: from pollux.cse.buffalo.edu (pollux.cse.Buffalo.EDU [128.205.35.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 838FD43EA9 for ; Wed, 25 Dec 2002 16:18:20 -0800 (PST) (envelope-from tgogoi@cse.Buffalo.EDU) Received: (from tgogoi@localhost) by pollux.cse.buffalo.edu (8.11.6+Sun/8.10.1) id gBQ0IE701471; Wed, 25 Dec 2002 19:18:14 -0500 (EST) Date: Wed, 25 Dec 2002 19:18:14 -0500 (EST) From: Tony Gogoi To: Subject: Pointer to proc structure In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I've 2 questions... 1) how do I join this newsgroup ? I've never joined a newgroup before so have no clue... 2) Lets say there's a function "Func" in the BSD kernel....Is there any way I could get a pointer to the proc structure to which "Func" belongs... void Func() { struct proc *p; p = ???????? } I mean, how could I get "p" to point to the current proc structure.... The reason i asked this is NDINIT() requires the proc structure to be passed as an argument, and only after that the vnode can be accessed. If there is a way in BSD to get the vnode just by giving the pathname as an argument, that would be very helpful. Thank You tony To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Dec 25 20: 2: 0 2002 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 E7A3B37B401 for ; Wed, 25 Dec 2002 20:01:58 -0800 (PST) Received: from smtp03.iprimus.com.au (smtp03.iprimus.com.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6586843E4A for ; Wed, 25 Dec 2002 20:01:57 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from smtp02.iprimus.net.au (210.50.76.70) by smtp03.iprimus.com.au (6.7.010) id 3E026CA70007AE05 for freebsd-fs@FreeBSD.org; Thu, 26 Dec 2002 15:01:45 +1100 Received: from dilbert.robbins.dropbear.id.au ([210.50.112.99]) by smtp02.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.5600); Thu, 26 Dec 2002 15:01:44 +1100 Received: from dilbert.robbins.dropbear.id.au (w6qubam4hrjf8nri@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id gBQ42OCv007163; Thu, 26 Dec 2002 15:02:24 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id gBQ42NlR007134; Thu, 26 Dec 2002 15:02:23 +1100 (EST) (envelope-from tim) Date: Thu, 26 Dec 2002 15:02:23 +1100 From: Tim Robbins To: Tony Gogoi Cc: freebsd-fs@FreeBSD.org Subject: Re: Pointer to proc structure Message-ID: <20021226150223.B10752@dilbert.robbins.dropbear.id.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from tgogoi@cse.Buffalo.EDU on Wed, Dec 25, 2002 at 07:18:14PM -0500 X-OriginalArrivalTime: 26 Dec 2002 04:01:45.0211 (UTC) FILETIME=[81784CB0:01C2AC93] Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Dec 25, 2002 at 07:18:14PM -0500, Tony Gogoi wrote: > I've 2 questions... > > 1) how do I join this newsgroup ? I've never joined a newgroup before so > have no clue... http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/eresources.html#ERESOURCES-MAIL > > 2) Lets say there's a function "Func" in the BSD kernel....Is there any > way I could get a pointer to the proc structure to which "Func" belongs... > > void Func() { > > struct proc *p; > > p = ???????? > > } > > I mean, how could I get "p" to point to the current proc structure.... You probably want `curproc', prototyped in on FreeBSD 4.x: extern struct proc *curproc; /* Current running proc. */ It is a macro defined in on FreeBSD 5.x. > The reason i asked this is NDINIT() requires the proc structure to be > passed as an argument, and only after that the vnode can be accessed. You could use curproc, but it would be better to use the proc pointer passed in to the vnode operation. For example struct vop_open_args, passed to your xxx_open() function, will contain a proc pointer to use. > If there is a way in BSD to get the vnode just by giving the pathname as > an argument, that would be very helpful. Should be a fairly simple matter of calling NDINIT() then vn_open(). Check out open() in vfs_syscalls.c for ideas. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Fri Dec 27 14: 5:52 2002 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 973F737B401 for ; Fri, 27 Dec 2002 14:05:51 -0800 (PST) Received: from prioris.mini.pw.edu.pl (prioris.mini.pw.edu.pl [194.29.178.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D60FA43EA9 for ; Fri, 27 Dec 2002 14:05:50 -0800 (PST) (envelope-from P.Dawidek@prioris.mini.pw.edu.pl) Received: from localhost (localhost.mini.pw.edu.pl [127.0.0.1]) by prioris.mini.pw.edu.pl (Postfix) with ESMTP id 3DDAC7D2F7 for ; Fri, 27 Dec 2002 23:05:43 +0100 (CET) Received: by prioris.mini.pw.edu.pl (Postfix, from userid 1091) id 248D57D2F6; Fri, 27 Dec 2002 23:05:38 +0100 (CET) Date: Fri, 27 Dec 2002 23:05:37 +0100 From: Pawel Jakub Dawidek To: freebsd-fs@freebsd.org Subject: Recovering data after fdisk -BI. Message-ID: <20021227220537.GA32737@prioris.mini.pw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.4i X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.7-STABLE i386 X-Virus-Scanned: by AMaViS (prioris) Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello... There is a chance to recover data after: # fdisk -BI /dev/ad0 then I've run fdisk from /stand/sysinstall and I've set partitions again (I think I remember correct sizes of partitions). So now I got /dev/ad0s1 and /dev/ad0s2, I haven't run disklabel yet. Erlier there was /dev/ad0s2a and /dev/ad0s2b (swap) and I think I remember their sizes as well. Please tell me, that there is some way to recover /dev/ad0s2a. -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Fri Dec 27 15: 3:49 2002 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 1474A37B401 for ; Fri, 27 Dec 2002 15:03:48 -0800 (PST) Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2206E43ED8 for ; Fri, 27 Dec 2002 15:03:47 -0800 (PST) (envelope-from ezk@fsl.cs.sunysb.edu) Received: from agora.fsl.cs.sunysb.edu (IDENT:gyb/OFICBqh6vWinCnN5ulgKgiFEV4QW@agora.fsl.cs.sunysb.edu [130.245.126.12]) by filer.fsl.cs.sunysb.edu (8.11.6/8.11.6) with ESMTP id gBRN35913373; Fri, 27 Dec 2002 18:03:05 -0500 Received: (from ezk@localhost) by agora.fsl.cs.sunysb.edu (8.11.6/8.11.6) id gBRN35i11095; Fri, 27 Dec 2002 18:03:05 -0500 Date: Fri, 27 Dec 2002 18:03:05 -0500 Message-Id: <200212272303.gBRN35i11095@agora.fsl.cs.sunysb.edu> From: Erez Zadok To: Tony Gogoi Cc: Erez Zadok , freebsd-fs@freebsd.org Subject: Re: Question on the NULLFS file-system In-reply-to: Your message of "Tue, 24 Dec 2002 13:56:31 EST." X-MailKey: Erez Zadok Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message , Tony Gogoi writes: > Dr Zadok, > > I asked you some clarifications on the nullfs by personal mail in Summer > to which I didn't get any reply after i read ur paper. This problem is > actually mine. > > This is not homework, but some extra work i'm doing. I asked Somil Asthana > to post for me on the bsd newsgroups he knows. what he posted was what i > asked him to post. After working the last 3 nights as my vacations have > started, I figured out that the bug lay in the iovectors which > was overlooked by misleading printf statements.......So its not > necsasry for anyone to respond but any discussion on nullfs and its > idiosyncracies would be appreciated. > > tony Either way, you're in luck. We've just released a new fistgen-0.0.6, which includes freebsd 4.5 and 4.6 templates. You can download the latest one from ftp://shekel.mcl.cs.columbia.edu/pub/fist/ Happy Stacking, Erez. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Sat Dec 28 10:50:21 2002 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 9CCA737B401 for ; Sat, 28 Dec 2002 10:50:20 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A32743EC5 for ; Sat, 28 Dec 2002 10:50:20 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gBSIoK1Z022294; Sat, 28 Dec 2002 13:50:20 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sat, 28 Dec 2002 13:50:20 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Pawel Jakub Dawidek Cc: freebsd-fs@freebsd.org Subject: Re: Recovering data after fdisk -BI. In-Reply-To: <20021227220537.GA32737@prioris.mini.pw.edu.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 27 Dec 2002, Pawel Jakub Dawidek wrote: > Hello... > > There is a chance to recover data after: > > # fdisk -BI /dev/ad0 > > then I've run fdisk from /stand/sysinstall and I've set partitions again > (I think I remember correct sizes of partitions). > > So now I got /dev/ad0s1 and /dev/ad0s2, I haven't run disklabel yet. > Erlier there was /dev/ad0s2a and /dev/ad0s2b (swap) and I think I remember > their sizes as well. > > Please tell me, that there is some way to recover /dev/ad0s2a. Try: http://www.watson.org/~robert/scan_ffs_freebsd4.tgz This is an adaptation of the OpenBSD scan_ffs(8) tool, which searches for superblocks and reconstructs a disk label from the results. It's not perfect, but actually works surprisingly well. It recognizes only UFS1 file systems, but could do UFS2 with fairly trivial changes. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Sat Dec 28 12:34:54 2002 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 8121937B401; Sat, 28 Dec 2002 12:34:53 -0800 (PST) Received: from prioris.mini.pw.edu.pl (prioris.mini.pw.edu.pl [194.29.178.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0B7343E4A; Sat, 28 Dec 2002 12:34:52 -0800 (PST) (envelope-from P.Dawidek@prioris.mini.pw.edu.pl) Received: from localhost (localhost.mini.pw.edu.pl [127.0.0.1]) by prioris.mini.pw.edu.pl (Postfix) with ESMTP id E09977D2F7; Sat, 28 Dec 2002 21:34:50 +0100 (CET) Received: by prioris.mini.pw.edu.pl (Postfix, from userid 1091) id 666B47D2F6; Sat, 28 Dec 2002 21:34:46 +0100 (CET) Date: Sat, 28 Dec 2002 21:34:46 +0100 From: Pawel Jakub Dawidek To: Robert Watson Cc: freebsd-fs@freebsd.org Subject: Re: Recovering data after fdisk -BI. Message-ID: <20021228203446.GA45177@prioris.mini.pw.edu.pl> References: <20021227220537.GA32737@prioris.mini.pw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.7-STABLE i386 X-Virus-Scanned: by AMaViS (prioris) Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, Dec 28, 2002 at 01:50:20PM -0500, Robert Watson wrote: +> > Please tell me, that there is some way to recover /dev/ad0s2a. +> +> Try: +> +> http://www.watson.org/~robert/scan_ffs_freebsd4.tgz +> +> This is an adaptation of the OpenBSD scan_ffs(8) tool, which searches for +> superblocks and reconstructs a disk label from the results. It's not +> perfect, but actually works surprisingly well. It recognizes only UFS1 +> file systems, but could do UFS2 with fairly trivial changes. Thanks, but too late... I'm rebuilding system now. But this could be interesting. My problems starts when I couldn't boot machine. After selecting boot partition (F2) it shows me, that there is no kernel and I couldn't boot machine even in single mode. I've try to write BootMgr once again, but this doesn't help. I've mount partitions without any problems, but I couldn't boot from this disk. It is Seagate Barracuda ATA IV, 80GB. I'm successful boot from this disk for few times and I'm booting new, just rebuilded system too. I've have no idea what and when fucked up. Disk is new and it seems to be ok. This was UFS2 if I remeber well. BTW. fetch: http://www.watson.org/~robert/scan_ffs_freebsd4.tgz: Not Found What is correct URL? It could be useable for me in a future. -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Sat Dec 28 14:55:17 2002 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 4682637B401 for ; Sat, 28 Dec 2002 14:55:16 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE47343E4A for ; Sat, 28 Dec 2002 14:55:15 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gBSMtG1Z085806; Sat, 28 Dec 2002 17:55:16 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sat, 28 Dec 2002 17:55:15 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Pawel Jakub Dawidek Cc: freebsd-fs@freebsd.org Subject: Re: Recovering data after fdisk -BI. In-Reply-To: <20021228203446.GA45177@prioris.mini.pw.edu.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, 28 Dec 2002, Pawel Jakub Dawidek wrote: > Thanks, but too late... I'm rebuilding system now. > > But this could be interesting. My problems starts when I couldn't boot > machine. After selecting boot partition (F2) it shows me, that there is > no kernel and I couldn't boot machine even in single mode. I've try to > write BootMgr once again, but this doesn't help. > > I've mount partitions without any problems, but I couldn't boot from > this disk. It is Seagate Barracuda ATA IV, 80GB. I'm successful boot > from this disk for few times and I'm booting new, just rebuilded system > too. I've have no idea what and when fucked up. Disk is new and it seems > to be ok. This was UFS2 if I remeber well. Did your kernel and userland get out of sync? At some point prior to the RELENG_5_0 branch, the format of the superblock for UFS2 changed -- on booting a new kernel, the superblock was upgraded, but older kernels and boot loaders could no longer read it, so you had to make sure to upgrade the boot blocks also. > fetch: http://www.watson.org/~robert/scan_ffs_freebsd4.tgz: Not Found Sorry, should be: http://www.watson.org/~robert/freebsd/scan_ffs_freebsd4.tgz > What is correct URL? It could be useable for me in a future. I should update it for FreeBSD 5 -- there may already patches floating around for that. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message