From owner-freebsd-hackers@FreeBSD.ORG Sun May 16 01:28:34 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6490B16A4CF for ; Sun, 16 May 2004 01:28:34 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 599F043D41 for ; Sun, 16 May 2004 01:28:33 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 16 May 2004 09:28:29 +0100 (BST) Date: Sun, 16 May 2004 09:28:23 +0100 From: David Malone To: "Marc G. Fournier" Message-ID: <20040516082823.GA21655@walton.maths.tcd.ie> References: <20040516022353.V37455@ganymede.hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040516022353.V37455@ganymede.hub.org> User-Agent: Mutt/1.5.3i Sender: dwmalone@maths.tcd.ie cc: freebsd-hackers@freebsd.org Subject: Re: How do inodes work? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 08:28:34 -0000 On Sun, May 16, 2004 at 02:25:37AM -0300, Marc G. Fournier wrote: > so I take there are 'gaps' in the inode list? it doesn't re-use freed > ones but keeps climbing until maybe it rolls around or something? A particular numbered inode always lives in the same place on the disk. When choosing what inode to use for a new file, the filesystem tries to pick a inode to put the file close to the directory it is being created in. This is the dirpref optimisation introduced a few years ago - previously inodes were chosen from a part of a disk that had the most nearby free space. David. From owner-freebsd-hackers@FreeBSD.ORG Sat May 15 10:17:43 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA4FC16A4CE; Sat, 15 May 2004 10:17:43 -0700 (PDT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEAD243D2D; Sat, 15 May 2004 10:17:42 -0700 (PDT) (envelope-from schizik@mail.ru) Received: from [81.195.22.197] (port=59750 helo=ppp22-197.pppoe.mtu-net.ru) by mx2.mail.ru with esmtp id 1BP2n7-000Dmb-00; Sat, 15 May 2004 21:17:41 +0400 From: Schizik Organization: Special Threatment Facility for Mentally Sick Perverts To: freebsd-hackers@freebsd.org Date: Sat, 15 May 2004 21:16:01 +0400 User-Agent: KMail/1.6.1 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200405152116.04671.schizik@mail.ru> X-Spam: Not detected X-Mailman-Approved-At: Sun, 16 May 2004 05:26:41 -0700 cc: freebsd-firewire@freebsd.org Subject: Odd firewire pcmcia card behavior... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2004 17:17:43 -0000 Hello! Everyone! I have wrote about my PCMCIA firewire card problems some time ago, now I have cvsup'ed -CURRENT and it behaves completely different (but still is not working) Card is Domex Technology DMX-5140 Under 5.2.1-release it looked like: ------ cut here ------ cardbus0: Expecting link target, got 0x0 cardbus0: Resource not specified in CIS: id=10, size=800 cardbus0: Resource not specified in CIS: id=14, size=4000 cardbus0: Resource not specified in CIS: id=18, size=800 fwohci0: mem 0x88008000- 0x880087ff,0x88004000-0x88007fff,0x88008800-0x88008fff irq 11 at device 0.0 on cardbus0 fwohci0: OHCI version ff.ff (ROM=1) fwohci0: invalid OHCI version fwohci0: FireWire init failed device_probe_and_attach: fwohci0 attach returned 5 cbb0: CardBus card activation failed ------ cut here ------ Now with 5.2-current (as of yesterday) it looks like: ------ cut here ------ cardbus0: Resource not specified in CIS: id=10, size=1000000 cardbus0: Resource not specified in CIS: id=14, size=100 cardbus0: Resource not specified in CIS: id=18, size=1000 cardbus0: at device 0.0 (no driver attached) cbb0: CardBus card activation failed ------ cut here ------ if I'm in X session when card is inserted - X completely freezes. Any tips are much appreciated. Alex. p.s. please CC me, as I'm subscribed only to -questions. From owner-freebsd-hackers@FreeBSD.ORG Sun May 16 10:34:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CFED16A4CE for ; Sun, 16 May 2004 10:34:07 -0700 (PDT) Received: from ganymede.hub.org (u46n208.hfx.eastlink.ca [24.222.46.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA35243D41 for ; Sun, 16 May 2004 10:34:06 -0700 (PDT) (envelope-from scrappy@hub.org) Received: by ganymede.hub.org (Postfix, from userid 1000) id 3F8233733A; Sun, 16 May 2004 14:34:06 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 36F5E37337 for ; Sun, 16 May 2004 14:34:06 -0300 (ADT) Date: Sun, 16 May 2004 14:34:06 -0300 (ADT) From: "Marc G. Fournier" To: freebsd-hackers@freebsd.org Message-ID: <20040516143328.K52358@ganymede.hub.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: fsck: % done possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 17:34:07 -0000 right now, my fsck is reporting: ZERO LENGTH DIR I=9222075 OWNER=root MODE=40755 SIZE=0 MTIME=May 10 17:33 2004 CLEAR? yes any way of findign out what the max I= will be, so that one can know how close to the end things are? ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664 From owner-freebsd-hackers@FreeBSD.ORG Sun May 16 10:45:17 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8AC316A4CE for ; Sun, 16 May 2004 10:45:17 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 639E643D58 for ; Sun, 16 May 2004 10:45:17 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i4GHjGoB016100; Sun, 16 May 2004 12:45:16 -0500 (CDT) (envelope-from dan) Date: Sun, 16 May 2004 12:45:16 -0500 From: Dan Nelson To: "Marc G. Fournier" Message-ID: <20040516174516.GC80376@dan.emsphone.com> References: <20040516143328.K52358@ganymede.hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040516143328.K52358@ganymede.hub.org> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: fsck: % done possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 17:45:18 -0000 In the last episode (May 16), Marc G. Fournier said: > > right now, my fsck is reporting: > > ZERO LENGTH DIR I=9222075 OWNER=root MODE=40755 > SIZE=0 MTIME=May 10 17:33 2004 > CLEAR? yes > > any way of findign out what the max I= will be, so that one can know how > close to the end things are? Run "dumpfs /mountpoint | head", and multiply ncg by ipg. That'll give you your total inode count. 9 million inodes seems awfully high, so it's got to be near the end. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Sun May 16 11:51:52 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9586116A4CE for ; Sun, 16 May 2004 11:51:52 -0700 (PDT) Received: from ganymede.hub.org (u46n208.hfx.eastlink.ca [24.222.46.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EBC243D1F for ; Sun, 16 May 2004 11:51:52 -0700 (PDT) (envelope-from scrappy@hub.org) Received: by ganymede.hub.org (Postfix, from userid 1000) id ECACB37957; Sun, 16 May 2004 15:51:51 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id EB8E237951; Sun, 16 May 2004 15:51:51 -0300 (ADT) Date: Sun, 16 May 2004 15:51:51 -0300 (ADT) From: "Marc G. Fournier" To: Dan Nelson In-Reply-To: <20040516174516.GC80376@dan.emsphone.com> Message-ID: <20040516155138.Y52585@ganymede.hub.org> References: <20040516143328.K52358@ganymede.hub.org> <20040516174516.GC80376@dan.emsphone.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: fsck: % done possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 18:51:52 -0000 On Sun, 16 May 2004, Dan Nelson wrote: > In the last episode (May 16), Marc G. Fournier said: > > > > right now, my fsck is reporting: > > > > ZERO LENGTH DIR I=9222075 OWNER=root MODE=40755 > > SIZE=0 MTIME=May 10 17:33 2004 > > CLEAR? yes > > > > any way of findign out what the max I= will be, so that one can know how > > close to the end things are? > > Run "dumpfs /mountpoint | head", and multiply ncg by ipg. That'll give > you your total inode count. 9 million inodes seems awfully high, so > it's got to be near the end. Actually, it hit >14million by the time the fsck finished ... ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664 From owner-freebsd-hackers@FreeBSD.ORG Sun May 16 12:30:15 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4986A16A4CE for ; Sun, 16 May 2004 12:30:15 -0700 (PDT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D6F643D2D for ; Sun, 16 May 2004 12:30:14 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc12) with ESMTP id <2004051619301201200l84tqe>; Sun, 16 May 2004 19:30:13 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA13272; Sun, 16 May 2004 12:30:11 -0700 (PDT) Date: Sun, 16 May 2004 12:30:09 -0700 (PDT) From: Julian Elischer To: "Marc G. Fournier" In-Reply-To: <20040516143328.K52358@ganymede.hub.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: fsck: % done possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 19:30:15 -0000 how about just hitting ^T? On Sun, 16 May 2004, Marc G. Fournier wrote: > > right now, my fsck is reporting: > > ZERO LENGTH DIR I=9222075 OWNER=root MODE=40755 > SIZE=0 MTIME=May 10 17:33 2004 > CLEAR? yes > > any way of findign out what the max I= will be, so that one can know how > close to the end things are? > > ---- > Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) > Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Sun May 16 12:33:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94F9416A4CE for ; Sun, 16 May 2004 12:33:46 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0524843D58 for ; Sun, 16 May 2004 12:33:46 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9p2/8.12.9) with ESMTP id i4GJXa7E015975; Sun, 16 May 2004 12:33:41 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200405161933.i4GJXa7E015975@gw.catspoiler.org> Date: Sun, 16 May 2004 12:33:36 -0700 (PDT) From: Don Lewis To: dwmalone@maths.tcd.ie In-Reply-To: <20040516082823.GA21655@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-hackers@FreeBSD.org Subject: Re: How do inodes work? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 19:33:46 -0000 On 16 May, David Malone wrote: > On Sun, May 16, 2004 at 02:25:37AM -0300, Marc G. Fournier wrote: >> so I take there are 'gaps' in the inode list? it doesn't re-use freed >> ones but keeps climbing until maybe it rolls around or something? > > A particular numbered inode always lives in the same place on the > disk. When choosing what inode to use for a new file, the filesystem > tries to pick a inode to put the file close to the directory it is > being created in. This is the dirpref optimisation introduced a few > years ago - previously inodes were chosen from a part of a disk that > had the most nearby free space. The preferred location of inodes for regular files has always been in the same cylinder group as their parent directory. The dirpref optimization changed the policy for selecting the cylinder group when new directories are created. From owner-freebsd-hackers@FreeBSD.ORG Sun May 16 12:44:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A9F016A4CF for ; Sun, 16 May 2004 12:44:08 -0700 (PDT) Received: from ganymede.hub.org (u46n208.hfx.eastlink.ca [24.222.46.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2389F43D58 for ; Sun, 16 May 2004 12:44:08 -0700 (PDT) (envelope-from scrappy@hub.org) Received: by ganymede.hub.org (Postfix, from userid 1000) id 5C33A3566A; Sun, 16 May 2004 16:44:08 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 5945833CE1; Sun, 16 May 2004 16:44:08 -0300 (ADT) Date: Sun, 16 May 2004 16:44:08 -0300 (ADT) From: "Marc G. Fournier" To: Julian Elischer In-Reply-To: Message-ID: <20040516164218.I52585@ganymede.hub.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: fsck: % done possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 19:44:08 -0000 Cause I never knew about that? :) I take it that that is the SIGINFO refer'd in: If fsck receives a SIGINFO (see the ``status'' argument for stty(1)) sig- nal, a line will be written to the standard output indicating the name of the device currently being checked, the current phase number and phase- specific progress information. Wish I had known that yesterday ... :( On Sun, 16 May 2004, Julian Elischer wrote: > how about just hitting ^T? > > > On Sun, 16 May 2004, Marc G. Fournier wrote: > > > > > right now, my fsck is reporting: > > > > ZERO LENGTH DIR I=9222075 OWNER=root MODE=40755 > > SIZE=0 MTIME=May 10 17:33 2004 > > CLEAR? yes > > > > any way of findign out what the max I= will be, so that one can know how > > close to the end things are? > > > > ---- > > Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) > > Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664 > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > > ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664 From owner-freebsd-hackers@FreeBSD.ORG Sun May 16 16:06:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D011016A4CE; Sun, 16 May 2004 16:06:50 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id B104E43D39; Sun, 16 May 2004 16:06:49 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i4GN6jm6040921; Sun, 16 May 2004 17:06:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 16 May 2004 17:07:54 -0600 (MDT) Message-Id: <20040516.170754.107787280.imp@bsdimp.com> To: schizik@mail.ru From: "M. Warner Losh" In-Reply-To: <200405152116.04671.schizik@mail.ru> References: <200405152116.04671.schizik@mail.ru> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: freebsd-firewire@freebsd.org Subject: Re: Odd firewire pcmcia card behavior... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 23:06:51 -0000 In message: <200405152116.04671.schizik@mail.ru> Schizik writes: : cardbus0: Resource not specified in CIS: id=10, size=1000000 : cardbus0: Resource not specified in CIS: id=14, size=100 : cardbus0: Resource not specified in CIS: id=18, size=1000 : cardbus0: at device 0.0 (no driver attached) : cbb0: CardBus card activation failed This is almost certainly the bus numbering problem I recently introduced. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 04:32:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAD1116A4DE for ; Mon, 17 May 2004 04:32:09 -0700 (PDT) Received: from walton.kettenis.dyndns.org (e77109.upc-e.chello.nl [213.93.77.109]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81F9D43D41 for ; Mon, 17 May 2004 04:32:04 -0700 (PDT) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2])i4HBW25V002251; Mon, 17 May 2004 13:32:02 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) i4HBW2YR012701; Mon, 17 May 2004 13:32:02 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost)i4HBW0h5012696; Mon, 17 May 2004 13:32:00 +0200 (CEST) Date: Mon, 17 May 2004 13:32:00 +0200 (CEST) Message-Id: <200405171132.i4HBW0h5012696@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com X-Mailman-Approved-At: Mon, 17 May 2004 04:58:35 -0700 cc: freebsd-hackers@freebsd.org cc: tech-toolchain@netbsd.org Subject: [PATCH/RFC] *BSD kernel debugging X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 11:32:09 -0000 FreeBSD, NetBSD and OpenBSD all provide the kvm(3) interface for debugging kernel virtual memory images: kernel crash dumps and live kernels. All three include support for this interface in the version of GDB bundled with the OS, but this code was never contributed back. I've recently implemented support for kvm(3)-based debugging that works for all three BSD's. The interface is fairly simple, just start GDB on a kernel binary, i.e. # gdb /bsd GNU gdb 6.1 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-unknown-openbsd3.5"... (gdb) target kvm 0xffffffff8019c308 in mi_switch () (gdb) bt #0 0xffffffff8019c308 in mi_switch () #1 0xffffffff8019baea in ltsleep () #2 0xffffffff802a1246 in uvm_scheduler () #3 0xffffffff8018ae44 in main () The command "target kvm" accepts the name of a kernel dump as an optional third argument; without it, it uses the memory image of the currently running kernel. All that's needed is a bit of new code (bsd-kvm.[ch]) and a support function in the appropriate *-nat.c file; because it is built on top of kvm(3) this is native-only. I've added a preliminary patch with some sample code. If there are no objections I'll check this in in a week or so. Mark --- /dev/null Mon May 17 13:15:56 2004 +++ bsd-kvm.c Fri Apr 30 15:16:41 2004 @@ -0,0 +1,211 @@ +/* BSD Kernel Data Access Library (libkvm) interface. + + Copyright 2004 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "frame.h" +#include "regcache.h" +#include "target.h" + +#include "gdb_assert.h" +#include +#include +#include +#include "readline/readline.h" +#include +#include + +#include "bsd-kvm.h" + +/* Kernel memory interface descriptor. */ +kvm_t *core_kd; + +/* Address of process control block. */ +struct pcb *bsd_kvm_paddr; + +/* Target ops for libkvm interface. */ +struct target_ops bsd_kvm_ops; + +static void +bsd_kvm_open (char *filename, int from_tty) +{ + char errbuf[_POSIX2_LINE_MAX]; + char *execfile = NULL; + kvm_t *temp_kd; + + target_preopen (from_tty); + + if (filename) + { + char *temp; + + filename = tilde_expand (filename); + if (filename[0] != '/') + { + temp = concat (current_directory, "/", filename, NULL); + xfree (filename); + filename = temp; + } + } + + temp_kd = kvm_openfiles (execfile, filename, NULL, O_RDONLY, errbuf); + if (temp_kd == NULL) + error ("%s", errbuf); + + unpush_target (&bsd_kvm_ops); + core_kd = temp_kd; + push_target (&bsd_kvm_ops); + + target_fetch_registers (-1); + + flush_cached_frames (); + select_frame (get_current_frame ()); + print_stack_frame (get_selected_frame (), -1, 1); +} + +static void +bsd_kvm_close (int quitting) +{ + if (core_kd) + { + if (kvm_close (core_kd) == -1) + warning ("%s", kvm_geterr(core_kd)); + core_kd = NULL; + } +} + +static int +bsd_kvm_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, + int write, struct mem_attrib *attrib, + struct target_ops *ops) +{ + if (write) + return kvm_write (core_kd, memaddr, myaddr, len); + else + return kvm_read (core_kd, memaddr, myaddr, len); + + return -1; +} + +static int +bsd_kvm_fetch_pcb (struct pcb *paddr) +{ + struct pcb pcb; + + if (kvm_read (core_kd, (unsigned long) paddr, &pcb, sizeof pcb) == -1) + error ("%s", kvm_geterr (core_kd)); + + gdb_assert (bsd_kvm_supply_pcb); + return bsd_kvm_supply_pcb (current_regcache, &pcb); +} + +static void +bsd_kvm_fetch_registers (int regnum) +{ + struct nlist nl[2]; + + if (bsd_kvm_paddr) + bsd_kvm_fetch_pcb (bsd_kvm_paddr); + + /* On dumping core, BSD kernels store the faulting context (PCB) + in the variable "dumppcb". */ + memset (nl, 0, sizeof nl); + nl[0].n_name = "_dumppcb"; + + if (kvm_nlist (core_kd, nl) == -1) + error ("%s", kvm_geterr (core_kd)); + + if (nl[0].n_value != 0) + { + /* Found dumppcb. If it contains a valid context, return + immediately. */ + if (bsd_kvm_fetch_pcb ((struct pcb *) nl[0].n_value)) + return; + } + + /* Traditional BSD kernels have a process proc0 that should always + be present. The address of proc0's PCB is stored in the variable + "proc0paddr". */ + + memset (nl, 0, sizeof nl); + nl[0].n_name = "_proc0paddr"; + + if (kvm_nlist (core_kd, nl) == -1) + error ("%s", kvm_geterr (core_kd)); + + if (nl[0].n_value != 0) + { + struct pcb *paddr; + + /* Found proc0paddr. */ + if (kvm_read (core_kd, nl[0].n_value, &paddr, sizeof paddr) == -1) + error ("%s", kvm_geterr (core_kd)); + + bsd_kvm_fetch_pcb (paddr); + return; + } + +#ifdef HAVE_STRUCT_THREAD_TD_PCB + /* In FreeBSD kernels for 5.0-RELEASE and later, the PCB no longer + lives in `struct proc' but in `struct thread'. The `struct + thread' for the initial thread for proc0 can be found in the + variable "thread0". */ + + memset (nl, 0, sizeof nl); + nl[0].n_name = "_thread0"; + + if (kvm_nlist (core_kd, nl) == -1) + error ("%s", kvm_geterr (core_kd)); + + if (nl[0].n_value != 0) + { + struct pcb *paddr; + + /* Found thread0. */ + nl[1].n_value += offsetof (struct thread, td_pcb); + if (kvm_read (core_kd, nl[1].n_value, &paddr, sizeof paddr) == -1) + error ("%s", kvm_geterr (core_kd)); + + bsd_kvm_fetch_pcb (paddr); + return; + } +#endif + + error ("Cannot find a valid PCB"); +} + +void +_initialize_bsd_kvm (void) +{ + bsd_kvm_ops.to_shortname = "kvm"; + bsd_kvm_ops.to_longname = "Kernel memory interface"; + bsd_kvm_ops.to_doc = "XXX"; + bsd_kvm_ops.to_open = bsd_kvm_open; + bsd_kvm_ops.to_close = bsd_kvm_close; + bsd_kvm_ops.to_fetch_registers = bsd_kvm_fetch_registers; + bsd_kvm_ops.to_xfer_memory = bsd_kvm_xfer_memory; + bsd_kvm_ops.to_stratum = process_stratum; + bsd_kvm_ops.to_has_memory = 1; + bsd_kvm_ops.to_has_stack = 1; + bsd_kvm_ops.to_has_registers = 1; + bsd_kvm_ops.to_magic = OPS_MAGIC; + + add_target (&bsd_kvm_ops); +} --- /dev/null Mon May 17 13:15:56 2004 +++ bsd-kvm.h Fri Apr 30 13:46:54 2004 @@ -0,0 +1,30 @@ +/* BSD Kernel Data Access Library (libkvm) interface. + + Copyright 2004 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef BSD_KVM_H +#define BSD_KVM_H + +struct pcb; +struct regcache; + +extern int bsd_kvm_supply_pcb (struct regcache *regache, struct pcb *pcb); + +#endif /* bsd-kvm.h */ Index: amd64fbsd-nat.c =================================================================== RCS file: /cvs/src/src/gdb/amd64fbsd-nat.c,v retrieving revision 1.13 diff -u -p -r1.13 amd64fbsd-nat.c --- amd64fbsd-nat.c 4 Mar 2004 10:35:57 -0000 1.13 +++ amd64fbsd-nat.c 17 May 2004 11:18:55 -0000 @@ -145,6 +145,47 @@ fill_fpregset (fpregset_t *fpregsetp, in } +/* Support for debugging kernel virtual memory images. */ + +#include +#include + +#include "bsd-kvm.h" + +int +bsd_kvm_supply_pcb (struct regcache *regcache, struct pcb *pcb) +{ + /* The following is true for FreeBSD 5.2: + + The pcb contains %rip, %rbx, %rsp, %rbp, %r12, %r13, %r14, %r15, + %ds, %es, %fs and %gs. This accounts for all callee-saved + registers specified by the psABI and then some. Here %esp + contains the stack pointer at the point just after the call to + cpu_switch(). From this information we reconstruct the register + state as it would like when we just returned from cpu_switch(). */ + + /* The stack pointer shouldn't be zero. */ + if (pcb->pcb_rsp == 0) + return 0; + + pcb->pcb_rsp += 8; + regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &pcb->pcb_rip); + regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &pcb->pcb_rbx); + regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp); + regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp); + regcache_raw_supply (regcache, 12, &pcb->pcb_r12); + regcache_raw_supply (regcache, 13, &pcb->pcb_r13); + regcache_raw_supply (regcache, 14, &pcb->pcb_r14); + regcache_raw_supply (regcache, 15, &pcb->pcb_r15); + regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds); + regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es); + regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs); + regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs); + + return 1; +} + + /* Provide a prototype to silence -Wmissing-prototypes. */ void _initialize_amd64fbsd_nat (void); Index: amd64obsd-nat.c =================================================================== RCS file: /cvs/src/src/gdb/amd64obsd-nat.c,v retrieving revision 1.2 diff -u -p -r1.2 amd64obsd-nat.c --- amd64obsd-nat.c 25 Feb 2004 20:59:12 -0000 1.2 +++ amd64obsd-nat.c 17 May 2004 11:18:55 -0000 @@ -20,6 +20,8 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" +#include "gdbcore.h" +#include "regcache.h" #include "gdb_assert.h" @@ -54,6 +56,60 @@ static int amd64obsd32_r_reg_offset[] = 22 * 8, /* %fs */ 23 * 8 /* %gs */ }; + + +/* Support for debugging kernel virtual memory images. */ + +#include +#include +#include + +#include "bsd-kvm.h" + +int +bsd_kvm_supply_pcb (struct regcache *regcache, struct pcb *pcb) +{ + struct switchframe sf; + int regnum; + + /* The following is true for OpenBSD 3.5: + + The pcb contains the stack pointer at the point of the context + switch in cpu_switch(). At that point we have a stack frame as + described by `struct switchframe', which for OpenBSD 3.5 has the + following layout: + + interrupt level + %r15 + %r14 + %r13 + %r12 + %rbp + %rbx + return address + + Together with %rsp in the pcb, this accounts for all callee-saved + registers specified by the psABI. From this information we + reconstruct the register state as it would look when we just + returned from cpu_switch(). */ + + /* The stack pointer shouldn't be zero. */ + if (pcb->pcb_rsp == 0) + return 0; + + read_memory (pcb->pcb_rsp, (char *) &sf, sizeof sf); + pcb->pcb_rsp += sizeof (struct switchframe); + regcache_raw_supply (regcache, 12, &sf.sf_r12); + regcache_raw_supply (regcache, 13, &sf.sf_r13); + regcache_raw_supply (regcache, 14, &sf.sf_r14); + regcache_raw_supply (regcache, 15, &sf.sf_r15); + regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp); + regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &sf.sf_rbp); + regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &sf.sf_rbx); + regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf.sf_rip); + + return 1; +} /* Provide a prototype to silence -Wmissing-prototypes. */ Index: m68kbsd-nat.c =================================================================== RCS file: /cvs/src/src/gdb/m68kbsd-nat.c,v retrieving revision 1.1 diff -u -p -r1.1 m68kbsd-nat.c --- m68kbsd-nat.c 30 Apr 2004 23:28:51 -0000 1.1 +++ m68kbsd-nat.c 17 May 2004 11:18:55 -0000 @@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" +#include "gdbcore.h" #include "inferior.h" #include "regcache.h" @@ -167,4 +168,51 @@ store_inferior_registers (int regnum) (PTRACE_ARG3_TYPE) &fpregs, 0) == -1) perror_with_name ("Couldn't write floating point status"); } +} + + +/* Support for debugging kernel virtual memory images. */ + +#include +#include + +#include "bsd-kvm.h" + +/* OpenBSD doesn't have these. */ +#ifndef PCB_REGS_FP +#define PCB_REGS_FP 10 +#endif +#ifndef PCB_REGS_SP +#define PCB_REGS_SP 11 +#endif + +int +bsd_kvm_supply_pcb (struct regcache *regcache, struct pcb *pcb) +{ + int regnum, tmp; + int i = 0; + + /* The following is true for NetBSD 1.6.2: + + The pcb contains %d2...%d7, %a2...%a7 and %ps. This accounts for + all callee-saved registers. From this information we reconstruct + the register state as it would look when we just returned from + cpu_switch(). */ + + /* The stack pointer shouldn't be zero. */ + if (pcb->pcb_regs[PC_REGS_SP] == 0) + return 0; + + for (regnum = M68K_D2_REGNUM; regnum <= M68K_D7_REGNUM; regnum++) + regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]); + for (regnum = M68K_A2_REGNUM; regnum <= M68K_SP_REGNUM; regnum++) + regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]); + + tmp = pcb->pcb_ps & 0xffff; + regcache_raw_supply (regcache, M68K_PS_REGNUM, &tmp); + + read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (char *) &tmp, sizeof tmp); + regcache_raw_supply (regcache, M68K_PC_REGNUM, &tmp); + + return 1; } --- /dev/null Mon May 17 13:15:56 2004 +++ i386nbsd-nat.c Mon May 17 11:49:34 2004 @@ -0,0 +1,71 @@ +/* Native-dependent code for NetBSD/i386. + + Copyright 2004 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "gdbcore.h" +#include "regcache.h" + +#include "i386-tdep.h" + +/* Support for debugging kernel virtual memory images. */ + +#include +#include +#include + +#include "bsd-kvm.h" + +int +bsd_kvm_supply_pcb (struct regcache *regcache, struct pcb *pcb) +{ + struct switchframe sf; + + /* The following is true for NetBSD 1.6.2: + + The pcb contains %esp and %ebp at the point of the context switch + in cpu_switch(). At that point we have a stack frame as + described by `struct switchframe', which for NetBSD 1.6.2 has the + following layout: + + interrupt level + %edi + %esi + %ebx + %eip + + we reconstruct the register state as it would look when we just + returned from cpu_switch(). */ + + /* The stack pointer shouldn't be zero. */ + if (pcb->pcb_esp == 0) + return 0; + + read_memory (pcb->pcb_esp, (char *) &sf, sizeof sf); + pcb->pcb_esp += sizeof (struct switchframe); + regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi); + regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi); + regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp); + regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp); + regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx); + regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip); + + return 1; +} From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 06:04:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60CA616A4CE; Mon, 17 May 2004 06:04:59 -0700 (PDT) Received: from sdf.lonestar.org (ol.freeshell.org [192.94.73.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id D22E743D31; Mon, 17 May 2004 06:04:58 -0700 (PDT) (envelope-from pieckiel@sdf.lonestar.org) Received: from sdf.lonestar.org (IDENT:pieckiel@sverige.freeshell.org [192.94.73.4]) by sdf.lonestar.org (8.12.10/8.12.10) with ESMTP id i4HD4va6003116; Mon, 17 May 2004 13:04:57 GMT Received: (from pieckiel@localhost) by sdf.lonestar.org (8.12.10/8.12.8/Submit) id i4HD4vix025661; Mon, 17 May 2004 09:04:57 -0400 (EDT) Date: Mon, 17 May 2004 09:04:57 -0400 From: "Kevin A. Pieckiel" To: John Baldwin Message-ID: <20040517130456.GA21383@SDF.LONESTAR.ORG> Mail-Followup-To: John Baldwin , freebsd-hackers@FreeBSD.org References: <20040513171659.GA14716@SDF.LONESTAR.ORG> <200405141133.49502.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405141133.49502.jhb@FreeBSD.org> User-Agent: Mutt/1.4.2.1i cc: freebsd-hackers@FreeBSD.org Subject: Re: 5.2.1 panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 13:04:59 -0000 On Fri, May 14, 2004 at 11:33:49AM -0400, John Baldwin wrote: > Do 'l *0xc0519a64' in gdb to get the line that it actually faulted on. Since > this is likely a NULL pointer deref that might help you fix the bug or at > least find out its cause. Wow. That's interesting to me. I didn't expect this: (kgdb) l *0xc0519a64 0xc0519a64 is in quotactl (/usr/src/sys/kern/vfs_syscalls.c:206). 201 NDFREE(&nd, NDF_ONLY_PNBUF); 202 error = vn_start_write(nd.ni_vp, &mp, V_WAIT | PCATCH); 203 vrele(nd.ni_vp); 204 if (error) 205 return (error); 206 error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg, td); 207 vn_finished_write(mp); 208 return (error); 209 } 210 From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 07:42:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7F5E16A4CE; Mon, 17 May 2004 07:42:53 -0700 (PDT) Received: from sev.net.ua (sev.net.ua [212.86.233.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2155443D1F; Mon, 17 May 2004 07:42:52 -0700 (PDT) (envelope-from shadow@psoft.net) Received: from berloga.shadowland ([213.227.237.65]) by sev.net.ua (8.12.10/8.12.9) with ESMTP id i4HEgkPs098250; Mon, 17 May 2004 17:42:47 +0300 (EEST) (envelope-from shadow@psoft.net) Received: from berloga.shadowland (berloga.shadowland [127.0.0.1]) by berloga.shadowland (8.12.10/8.12.10) with ESMTP id i4HEgk89008216; Mon, 17 May 2004 17:42:46 +0300 Received: (from root@localhost) by berloga.shadowland (8.12.10/8.12.10/Submit) id i4HEgjgN008214; Mon, 17 May 2004 17:42:45 +0300 From: Alex Lyashkov To: "Kevin A. Pieckiel" In-Reply-To: <20040517130456.GA21383@SDF.LONESTAR.ORG> References: <20040513171659.GA14716@SDF.LONESTAR.ORG> <200405141133.49502.jhb@FreeBSD.org> <20040517130456.GA21383@SDF.LONESTAR.ORG> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable Organization: PSoft Message-Id: <1084804965.7881.2.camel@berloga.shadowland> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-1) Date: Mon, 17 May 2004 17:42:45 +0300 cc: freebsd-hackers@FreeBSD.org cc: John Baldwin Subject: Re: 5.2.1 panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 14:42:53 -0000 =F7 =F0=CE=C4, 17.05.2004, =D7 16:04, Kevin A. Pieckiel =D0=C9=DB=C5=D4: > On Fri, May 14, 2004 at 11:33:49AM -0400, John Baldwin wrote: >=20 > > Do 'l *0xc0519a64' in gdb to get the line that it actually faulted on. = Since=20 > > this is likely a NULL pointer deref that might help you fix the bug or = at=20 > > least find out its cause. >=20 > Wow. That's interesting to me. I didn't expect this: >=20 > (kgdb) l *0xc0519a64 > 0xc0519a64 is in quotactl (/usr/src/sys/kern/vfs_syscalls.c:206). > 201 NDFREE(&nd, NDF_ONLY_PNBUF); > 202 error =3D vn_start_write(nd.ni_vp, &mp, V_WAIT | PCATCH); > 203 vrele(nd.ni_vp); > 204 if (error) > 205 return (error); > 206 error =3D VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg, = td); > 207 vn_finished_write(mp); > 208 return (error); > 209 } > 210 Please update you source. It`s bug already fixed at src/sys/kern/vfs_syscalls.c v. 1.345 =3D=3D=3D=3D=3D Modified files: sys/kern vfs_syscalls.c=20 Log: Always use nd.ni_vp->v_mount as an argument for VFS_QUOTACTL(), just like in RELENG_4. =3D=3D=3D=3D=3D --=20 Alex Lyashkov PSoft From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 13:04:21 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26AD516A4CE for ; Mon, 17 May 2004 13:04:21 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C47E43D41 for ; Mon, 17 May 2004 13:04:20 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (localhost [127.0.0.1]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i4HK4He1067460; Mon, 17 May 2004 13:04:18 -0700 (PDT) (envelope-from marcel@ns1.xcllnt.net) Received: (from marcel@localhost) by ns1.xcllnt.net (8.12.11/8.12.11/Submit) id i4HK4HnU067459; Mon, 17 May 2004 13:04:17 -0700 (PDT) (envelope-from marcel) Date: Mon, 17 May 2004 13:04:17 -0700 From: Marcel Moolenaar To: Mark Kettenis Message-ID: <20040517200417.GA67285@ns1.xcllnt.net> References: <200405171132.i4HBW0h5012696@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405171132.i4HBW0h5012696@elgar.kettenis.dyndns.org> User-Agent: Mutt/1.5.5.1i cc: freebsd-hackers@freebsd.org cc: tech-toolchain@netbsd.org cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC] *BSD kernel debugging X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 20:04:21 -0000 On Mon, May 17, 2004 at 01:32:00PM +0200, Mark Kettenis wrote: > I've recently implemented support for kvm(3)-based debugging that > works for all three BSD's. The interface is fairly simple, just start > GDB on a kernel binary, i.e. *snip* > All that's needed is a bit of new code (bsd-kvm.[ch]) and a support > function in the appropriate *-nat.c file; because it is built on top > of kvm(3) this is native-only. I've added a preliminary patch with > some sample code. > > If there are no objections I'll check this in in a week or so. I've been working on a different scheme for FreeBSD that supports kernel threads and kernel modules and also works on non-i386 and non-amd64 systems without any gdb changes (at least, that's the intend -- I'm not far enough in the development to have a working prototype of all features). Anyway, it uses the remote protocol to establish an IPC pipe between gdb and some front-end that knows about the quirks of the kernel and its core files and isn't an inherently native solution. I cannot prevent you from committing this, but if it doesn't address the items mentioned above, it may not be used on FreeBSD. Unless I'm being relieved of gdb duties of course :-) FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 15:17:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C66016A4CE for ; Mon, 17 May 2004 15:17:06 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBEF243D5C for ; Mon, 17 May 2004 15:17:05 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (localhost [127.0.0.1]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i4HMH3lF068211; Mon, 17 May 2004 15:17:03 -0700 (PDT) (envelope-from marcel@ns1.xcllnt.net) Received: (from marcel@localhost) by ns1.xcllnt.net (8.12.11/8.12.11/Submit) id i4HMH3Vi068210; Mon, 17 May 2004 15:17:03 -0700 (PDT) (envelope-from marcel) Date: Mon, 17 May 2004 15:17:03 -0700 From: Marcel Moolenaar To: Mark Kettenis Message-ID: <20040517221703.GB67833@ns1.xcllnt.net> References: <200405171132.i4HBW0h5012696@elgar.kettenis.dyndns.org> <20040517200417.GA67285@ns1.xcllnt.net> <200405172045.i4HKjd4k014106@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405172045.i4HKjd4k014106@elgar.kettenis.dyndns.org> User-Agent: Mutt/1.5.5.1i cc: freebsd-hackers@freebsd.org cc: tech-toolchain@netbsd.org cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC] *BSD kernel debugging X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 22:17:06 -0000 On Mon, May 17, 2004 at 10:45:39PM +0200, Mark Kettenis wrote: > > I cannot prevent you from committing this, but if it doesn't address > the items mentioned above, it may not be used on FreeBSD. Unless I'm > being relieved of gdb duties of course :-) > > Let's see. My kvm stuff would still serve a purpose for older > releases. [still about FreeBSD] Yes, to certain extend. There's already a port for gdb6 in the ports collection and I presume it also works on FreeBSD 4.x. Nonetheless, I like having gdb work without local hacks, so from that perspective it's definitely valuable. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 16:28:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1379316A4CE; Mon, 17 May 2004 16:28:32 -0700 (PDT) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FF9B43D39; Mon, 17 May 2004 16:28:31 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.9p2/8.12.9) with ESMTP id i4HNSS3F035506; Tue, 18 May 2004 03:28:28 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.9p2/8.12.9/Submit) id i4HNSRDB035501; Tue, 18 May 2004 03:28:27 +0400 (MSD) (envelope-from yar) Date: Tue, 18 May 2004 03:28:27 +0400 From: Yar Tikhiy To: Cyrille Lefevre Message-ID: <20040517232827.GD27584@comp.chem.msu.su> References: <20040515092114.GB67531@comp.chem.msu.su> <042601c43a6b$cd1cb9a0$7890a8c0@dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <042601c43a6b$cd1cb9a0$7890a8c0@dyndns.org> User-Agent: Mutt/1.5.6i cc: arch@freebsd.org cc: hackers@freebsd.org Subject: Re: Interoperation of flock(2), fcntl(2), and lockf(3) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 23:28:32 -0000 On Sat, May 15, 2004 at 01:00:13PM +0200, Cyrille Lefevre wrote: > "Yar Tikhiy" wrote: > [snip] > > Considering all the above, I'd like to add the following paragraph > > to the flock(2), lockf(3), and fcntl(2) man pages (replacing the > > sentence quoted from lockf(3)): > > > > The flock(2), fcntl(2), and lockf(3) locks are compatible. > > Processes using different locking interfaces can cooperate > > over the same file safely. However, only one of such > > interfaces should be used within a process. If a file is > > s/a process/the same process/ ? Agreed, thanks! BTW, since no objections were raised and Kirk encouraged me to make the change (thank you Kirk!), I just did so. -- Yar From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 18:20:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F67716A4CF for ; Mon, 17 May 2004 18:20:47 -0700 (PDT) Received: from mtaw6.prodigy.net (mtaw6.prodigy.net [64.164.98.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3916E43D41 for ; Mon, 17 May 2004 18:20:47 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (27e3def6e3ab9c0fdb639a07176218a8@adsl-67-115-73-128.dsl.lsan03.pacbell.net [67.115.73.128]) by mtaw6.prodigy.net (8.12.10/8.12.10) with ESMTP id i4I1JOnl012006; Mon, 17 May 2004 18:19:25 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id ECE4451202; Mon, 17 May 2004 18:20:43 -0700 (PDT) Date: Mon, 17 May 2004 18:20:43 -0700 From: Kris Kennaway To: Marcel Moolenaar Message-ID: <20040518012043.GA47770@xor.obsecurity.org> References: <200405171132.i4HBW0h5012696@elgar.kettenis.dyndns.org> <20040517200417.GA67285@ns1.xcllnt.net> <200405172045.i4HKjd4k014106@elgar.kettenis.dyndns.org> <20040517221703.GB67833@ns1.xcllnt.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <20040517221703.GB67833@ns1.xcllnt.net> User-Agent: Mutt/1.4.2.1i cc: freebsd-hackers@freebsd.org cc: tech-toolchain@netbsd.org cc: Mark Kettenis cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC] *BSD kernel debugging X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 01:20:47 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 17, 2004 at 03:17:03PM -0700, Marcel Moolenaar wrote: > On Mon, May 17, 2004 at 10:45:39PM +0200, Mark Kettenis wrote: > >=20 > > I cannot prevent you from committing this, but if it doesn't address > > the items mentioned above, it may not be used on FreeBSD. Unless I'm > > being relieved of gdb duties of course :-) > >=20 > > Let's see. My kvm stuff would still serve a purpose for older > > releases. >=20 > [still about FreeBSD] Yes, to certain extend. There's already a port > for gdb6 in the ports collection and I presume it also works on > FreeBSD 4.x. Nonetheless, I like having gdb work without local hacks, > so from that perspective it's definitely valuable. Actually no version of gdb in the ports collection works on 4.x. Some don't even work on 5.x. Kris --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAqWTrWry0BWjoQKURAtDxAKDlU+7DwuYaDh43dq4GFdERiJRifgCg281q ZgougBprTK6UTqMSAi13DqE= =WMbH -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3-- From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 18:57:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03FB316A4CE for ; Mon, 17 May 2004 18:57:58 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF61643D1F for ; Mon, 17 May 2004 18:57:56 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i4I1vu90036601 for ; Mon, 17 May 2004 18:57:56 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <40A96DA2.4080306@freebsd.org> Date: Mon, 17 May 2004 18:57:54 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Wanted: Example tar files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 01:57:58 -0000 In order to test bsdtar's automatic format detection and support for variant tar formats, I'm looking for sample archives generated by a variety of tar programs. In particular, I'm looking for tar archives generated by: * Very old versions of tar (pre-1980 is especially interesting) * Various vendor implementations (AIX, HP-UX, Solaris, etc.) * Other programs that create tar archives? I've tested pretty thoroughly against the current versions of GNU tar, star, and Solaris 8 tar, so I don't need examples generated by those. An ideal test archive would not be too big (< 16k) and have as many as possible of the following: * regular file * directory * hardlink * symlink * fifo, socket, device node, etc. * regular file with very long pathname (>256 characters) * symlink to a file with a very long pathname * file with 8-bit character in the filename * file with 8-bit character in the user or group name * file with ACL, file flags, or other extended permissions Of course, if the system or tar program doesn't support some of these, don't bother. Be sure to extract it to a clean directory to make sure it really does contain what you think it does and send me the results of "ls -lR" so I can check that bsdtar does the right thing. And, of course, let me know what program/version/system generated it. If you have a sample for me that's UNDER TWENTY KILOBYTES, just gzip it and email it to me at . If you have something larger, please contact me first to make suitable arrangements to transfer it. Bonus points, of course, if you've tried to extract it with bsdtar and it failed. ;-) Thanks for your help, Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 20:33:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47F5716A4CE; Mon, 17 May 2004 20:33:11 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id C65E943D45; Mon, 17 May 2004 20:33:10 -0700 (PDT) (envelope-from max@love2party.net) Received: from [212.227.126.206] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BPvLp-0001hV-00; Tue, 18 May 2004 05:33:09 +0200 Received: from [216.58.85.218] (helo=[10.0.0.49]) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1BPvLp-0005Uw-00; Tue, 18 May 2004 05:33:09 +0200 From: Max Laier To: freebsd-hackers@freebsd.org Date: Tue, 18 May 2004 05:34:46 +0200 User-Agent: KMail/1.6.2 References: <40A96DA2.4080306@freebsd.org> In-Reply-To: <40A96DA2.4080306@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405180534.48284.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e28873fbe4dbe612ce62ab869898ff08 cc: Tim Kientzle Subject: Re: Wanted: Example tar files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 03:33:11 -0000 On Tuesday 18 May 2004 03:57, Tim Kientzle wrote: <...> > An ideal test archive would not be too big (< 16k) and > have as many as possible of the following: > * regular file > * directory > * hardlink > * symlink > * fifo, socket, device node, etc. > * regular file with very long pathname (>256 characters) > * symlink to a file with a very long pathname > * file with 8-bit character in the filename > * file with 8-bit character in the user or group name > * file with ACL, file flags, or other extended permissions How about posting such a tar somewhere so people can retar it with whatever they have? -- Best regards, | mlaier@freebsd.org Max Laier | ICQ #67774661 http://pf4freebsd.love2party.net/ | mlaier@EFnet From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 22:55:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FF1716A4CE; Mon, 17 May 2004 22:55:19 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id C045743D3F; Mon, 17 May 2004 22:55:16 -0700 (PDT) (envelope-from tim@kientzle.com) Received: from kientzle.com (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i4I4oP90037331; Mon, 17 May 2004 21:50:25 -0700 (PDT) (envelope-from tim@kientzle.com) Message-ID: <40A9960E.7050406@kientzle.com> Date: Mon, 17 May 2004 21:50:22 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Max Laier References: <40A96DA2.4080306@freebsd.org> <200405180534.48284.max@love2party.net> In-Reply-To: <200405180534.48284.max@love2party.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: Tim Kientzle Subject: Re: Wanted: Example tar files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 05:55:19 -0000 Max Laier wrote: > On Tuesday 18 May 2004 03:57, Tim Kientzle wrote: > <...> > >>An ideal test archive would not be too big (< 16k) and >>have as many as possible of the following: >> * regular file >> * directory >> * hardlink >> * symlink >> * fifo, socket, device node, etc. >> * regular file with very long pathname (>256 characters) >> * symlink to a file with a very long pathname >> * file with 8-bit character in the filename >> * file with 8-bit character in the user or group name >> * file with ACL, file flags, or other extended permissions > > > How about posting such a tar somewhere so people can retar it with whatever > they have? That would require that people be able to untar whatever I provide. There are enough differences among tar implementations (especially for things like long filenames, 8-bit characters, extended permissions, etc) that it's not really possible. This is part of why I want bsdtar to be able to identify and read so many different formats. ;-) I could scrape together a shell script to build a directory with a suitable set of files (can't quite cover all of the above with that, but can cover much of it). I'll see about that. Tim From owner-freebsd-hackers@FreeBSD.ORG Tue May 18 00:37:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53A8C16A4CE for ; Tue, 18 May 2004 00:37:04 -0700 (PDT) Received: from mailout1.informatik.tu-muenchen.de (mailout1.informatik.tu-muenchen.de [131.159.0.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id B928843D58 for ; Tue, 18 May 2004 00:37:01 -0700 (PDT) (envelope-from langd@informatik.tu-muenchen.de) Date: Tue, 18 May 2004 09:36:57 +0200 From: Daniel Lang To: Tim Kientzle Message-ID: <20040518073657.GA24207@atrbg11.informatik.tu-muenchen.de> References: <40A96DA2.4080306@freebsd.org> <200405180534.48284.max@love2party.net> <40A9960E.7050406@kientzle.com> Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <40A9960E.7050406@kientzle.com> X-Geek: GCS/CC d-- s: a- C++$ UBS++++$ P+++$ L- E-(---) W+++(--) N++ o K w--- O? M? V? PS+(++) PE--(+) Y+ PGP+ t++ 5+++ X R+(-) tv+ b+ DI++ D++ G++ e+++ h---(-) r+++ y+ User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at informatik.tu-muenchen.de cc: Max Laier cc: freebsd-hackers@freebsd.org Subject: Re: Wanted: Example tar files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 07:37:04 -0000 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Tim Kientzle wrote on Mon, May 17, 2004 at 09:50:22PM -0700: [..] > >How about posting such a tar somewhere so people can retar it with=20 > >whatever they have? >=20 > That would require that people be able to untar > whatever I provide. There are enough differences > among tar implementations (especially for things > like long filenames, 8-bit characters, extended > permissions, etc) that it's not really possible. [..] > I could scrape together a shell script to build > a directory with a suitable set of files (can't > quite cover all of the above with that, but can > cover much of it). I'll see about that. [..] Nearly everybody has access to GNU tar. Just create the sample-tarfile with gtar such that it can be extracted with gtar (possibly documenting required extract options to do it correctly). However, a shell skript might be an even better idea (although it might not work on a pre 1980 unix). Best regards, Daniel --=20 IRCnet: Mr-Spock - May His Shadow fall upon thee -=20 Daniel Lang * dl@leo.org * +49 89 289 18532 * http://www.leo.org/~dl/ --ibTvN161/egqYuK8 Content-Type: application/x-pkcs7-signature Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIIVcwYJKoZIhvcNAQcCoIIVZDCCFWACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC EugwggcAMIIF6KADAgECAgIj0zANBgkqhkiG9w0BAQUFADByMQswCQYDVQQGEwJERTERMA8G A1UEBxMITXVlbmNoZW4xDDAKBgNVBAoTA1RVTTELMAkGA1UECxMCSU4xGDAWBgNVBAMTD1JC Ry1CZW51dHplci1DQTEbMBkGCSqGSIb3DQEJARYMY2FAaW4udHVtLmRlMB4XDTA0MDQyMzEz MTU1OFoXDTA1MDUzMTAwMDAwMFowdzELMAkGA1UEBhMCREUxETAPBgNVBAcTCE11ZW5jaGVu MQwwCgYDVQQKEwNUVU0xCzAJBgNVBAsTAklOMRQwEgYDVQQDEwtEYW5pZWwgTGFuZzEkMCIG CSqGSIb3DQEJARYVZGFuaWVsLmxhbmdAaW4udHVtLmRlMIIBIjANBgkqhkiG9w0BAQEFAAOC AQ8AMIIBCgKCAQEAs1d9JUkGBG8T4m1wlzqfK2IU6pEZQcA00/hX1hlAVY5Jwv18rJncrOym 1dXSLubRIWZEEDRDPYCK0RhGHtaBYOTZpBSWezVkC2g6ioWS9wsnJpk0GIJN+o+k9L7+3vzE y/JemK2/ARtPIMo3jXMf7qD9rcZ6LD6SwUDtq8Tl3YE8pC8ptT4CROjS1SKHh7JI8a5vEUWw v/2C+a4VSW0blJu4G50Ze+UwAdHrEMxvCjXN09YyjcY4N/eUacWl7p/kMXuKErnibYRY8jJF wQnFzacWQrNRHjXO5mW06ZlbyvMzO5gQLSu7fAJMLXRZPT+bxNYZf4JUHJnNkn4Y8Ikg/QID AQABo4IDmTCCA5UwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUzXKq/vhVcUKYbsX7Z8ixXFhe F2YwgZMGA1UdIwSBizCBiIAUNiQ562ZHp7c9HjvDspUMZvpFEfuhbaRrMGkxCzAJBgNVBAYT AkRFMREwDwYDVQQHEwhNdWVuY2hlbjEMMAoGA1UEChMDVFVNMQswCQYDVQQLEwJJTjEPMA0G A1UEAxMGUkJHLUNBMRswGQYJKoZIhvcNAQkBFgxjYUBpbi50dW0uZGWCAQUwDgYDVR0PAQH/ BAQDAgSwMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDCBsQYDVR0RBIGpMIGmgQ9s YW5nZEBpbi50dW0uZGWBFWRhbmllbC5sYW5nQGluLnR1bS5kZYEfbGFuZ2RAaW5mb3JtYXRp ay50dS1tdWVuY2hlbi5kZYElZGFuaWVsLmxhbmdAaW5mb3JtYXRpay50dS1tdWVuY2hlbi5k ZYEQbGFuZ2RAY3MudHVtLmVkdYEWZGFuaWVsLmxhbmdAY3MudHVtLmVkdYEKZGxAbGVvLm9y ZzAJBgNVHRIEAjAAMDsGA1UdHwQ0MDIwMKAuoCyGKmh0dHA6Ly9jYS5pbi50dW0uZGUvY3Js cy9nMi91c2VyY2FfY3JsLmNybDARBglghkgBhvhCAQEEBAMCBaAwga4GCWCGSAGG+EIBDQSB oBaBnURpZXNlcyBaZXJ0aWZpa2F0IHd1cmRlIGF1c2dlc3RlbGx0IGZ1ZXIgRGFuaWVsIExh bmcgdm9uIGRlciBSQkctQmVudXR6ZXItQ0EgKDIuR2VuZXJhdGlvbiksIEZha3VsdGFldCBm dWVyIEluZm9ybWF0aWsgZGVyIFRlY2huaXNjaGVuIFVuaXZlcnNpdGFldCBNdWVuY2hlbi4w NgYJYIZIAYb4QgEDBCkWJ2h0dHA6Ly9jYS5pbi50dW0uZGUvY2dpLWJpbi91c2VyY2EtcmV2 PzAyBglghkgBhvhCAQQEJRYjaHR0cDovL2NhLmluLnR1bS5kZS9jZ2ktYmluL2NhLXJldj8w LAYJYIZIAYb4QgEIBB8WHWh0dHA6Ly9jYS5pbi50dW0uZGUvcG9saWNpZXMvMEcGA1UdIARA MD4wPAYNKwYBBAGBmD5lgUgBATArMCkGCCsGAQUFBwIBFh1odHRwOi8vY2EuaW4udHVtLmRl L3BvbGljaWVzLzANBgkqhkiG9w0BAQUFAAOCAQEAaFvwlYSJNc32QohD3O0xlEprR1sauebF q3DrhCttWooCxyOQs6SCUnk2Smv9Rl1P7NFqoKhfTFwhC0Oa5rXgTFyOv7w8M8RyFIDahfHb PA2kxf8UHlsZcSuumPEEToi5dm0c2FObAAOT0CV0yKCp6RI+xSbMF6qQD23+j5PtlESTeIYp f/aL8b4gUHS0KKsEgqjpOoqbJzYBskQCLenolaFKevZuZRpmhrgGzUyakRKgGu7jR/88CYh6 YyUkc/Fxk/i+vhLQV/7mJEO0/mf6Dx+26kPgamKZieGqDJSfEvMgbLEdhkx8KIC7BmF1xt/w Wqln6jvlyyNhzks5ivf+tTCCBeIwggTKoAMCAQICAQQwDQYJKoZIhvcNAQEFBQAwaTELMAkG A1UEBhMCREUxETAPBgNVBAcTCE11ZW5jaGVuMQwwCgYDVQQKEwNUVU0xCzAJBgNVBAsTAklO MQ8wDQYDVQQDEwZSQkctQ0ExGzAZBgkqhkiG9w0BCQEWDGNhQGluLnR1bS5kZTAeFw0wNDA0 MTQxMTM2MzRaFw0wOTA2MDEwMDAwMDBaMHAxCzAJBgNVBAYTAkRFMREwDwYDVQQHEwhNdWVu Y2hlbjEMMAoGA1UEChMDVFVNMQswCQYDVQQLEwJJTjEWMBQGA1UEAxMNUkJHLVNlcnZlci1D QTEbMBkGCSqGSIb3DQEJARYMY2FAaW4udHVtLmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEAoePWEn7xO39yf3DYb9gxjsS0uofT/t1QxfCFkqYDxU6C24ewtFEOMlR40Q4J 4HHBFOWc7rllw780sWuumYkzjdxswA37ZmZ171Zp99cZ9HLO1eWroaiewGiE69Yo30x1iePp 5/5MjbeQdyzfKVjppIgdH4Q7T7W6jV9xrerR955FoD7GKKj1B4azN1hmjkxyIcTTd3imk3yi 3IfLTUbNhPeedsNVRez7l+NRqt6vJC1u+Q3IBQ2PPRcgeVQJGkHPtEKcPtFrY4kV4YHmiBF/ Xl1co1OAddxYO3v+hns0ikxOFxMqEEw4nfeHCL7pVp11uXB2kc8NpEwzNZsq5ykmmQIDAQAB o4ICjDCCAogwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU3PUENjj/EeOdOtKDmBMZDy3I H/8wgZMGA1UdIwSBizCBiIAUAr3bGy+wsVe/6m0mADKJ8jIZOvyhbaRrMGkxCzAJBgNVBAYT AkRFMREwDwYDVQQHEwhNdWVuY2hlbjEMMAoGA1UEChMDVFVNMQswCQYDVQQLEwJJTjEPMA0G A1UEAxMGUkJHLUNBMRswGQYJKoZIhvcNAQkBFgxjYUBpbi50dW0uZGWCAQMwDgYDVR0PAQH/ BAQDAgEGMBMGA1UdJQQMMAoGCCsGAQUFBwMBMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly9j YS5pbi50dW0uZGUvY3Jscy9nMi9jYV9jcmwuY3JsMBEGCWCGSAGG+EIBAQQEAwICBDCBkwYJ YIZIAYb4QgENBIGFFoGCWmVydGlmaWthdCBmdWVyIFJCRy1TZXJ2ZXItQ0EgYXVzZ2VzdGVs bHQgdm9uIFJCRy1DQSAyLkdlbmVyYXRpb24sIEZha3VsdGFldCBmdWVyIEluZm9ybWF0aWsg ZGVyIFRlY2huaXNjaGVuIFVuaXZlcnNpdGFldCBNdWVuY2hlbjAyBglghkgBhvhCAQQEJRYj aHR0cDovL2NhLmluLnR1bS5kZS9jZ2ktYmluL2NhLXJldj8wPAYJYIZIAYb4QgEIBC8WLWh0 dHA6Ly9jYS5pbi50dW0uZGUvcG9saWNpZXMvc2VydmVyY2Fwb2wuaHRtbDBHBgNVHSAEQDA+ MDwGDSsGAQQBgZg+ZYFIAQEwKzApBggrBgEFBQcCARYdaHR0cDovL2NhLmluLnR1bS5kZS9w b2xpY2llcy8wDQYJKoZIhvcNAQEFBQADggEBAJdbHM31nJEU9hLrlFtsa653xed5gSFUwX3D hlUWRFDB+EknV0g+IeVYykNzpw8ILruy59S5O101ZH47br2rx9m3EUloAIyVRDFFX+aFuJ+i PDyo98aZDSdeuwAwSO4tv/rOudIZST5XFvHez7aiIoUHx07NZhcr3yFzOqTPtLkw67MDizY0 +nHvMH26Ch0nSQUdor+y0rPfYMRpOomrjV42U23VRtxnRo+KqUdvgg1WdUST9sMqBXQ1esfn N5LIt3xdahgCNz5F/2ai0LW8E2E/WWJNZfaKhC062T/FZzH6/qe+pmVlDgCWDPXci0D5HR4c lxUbEkbQ4olo0cdje3gwggX6MIIE4qADAgECAgEFMA0GCSqGSIb3DQEBBQUAMGkxCzAJBgNV BAYTAkRFMREwDwYDVQQHEwhNdWVuY2hlbjEMMAoGA1UEChMDVFVNMQswCQYDVQQLEwJJTjEP MA0GA1UEAxMGUkJHLUNBMRswGQYJKoZIhvcNAQkBFgxjYUBpbi50dW0uZGUwHhcNMDQwNDE0 MTEzODIxWhcNMDkwNjAxMDAwMDAwWjByMQswCQYDVQQGEwJERTERMA8GA1UEBxMITXVlbmNo ZW4xDDAKBgNVBAoTA1RVTTELMAkGA1UECxMCSU4xGDAWBgNVBAMTD1JCRy1CZW51dHplci1D QTEbMBkGCSqGSIb3DQEJARYMY2FAaW4udHVtLmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEAuUIL+0omWgx+ZdeQWWuiMSkOPHit3bZKDTMwW1uO1046KvcrBfSURAV/0Afx 4DiQtkFptNt18wMvJrJPf85TXxGXiOR1MUpx4GNQ0FtNg5AzIRSVQpEzOo6cBe3hU3owXnZZ 22d36XHXnKoz/zZMePSEggc2oMuj+OoChLROG/psUS58tT20ohl1ltfqTeB/9ldGaJomANv4 Q6HgvvMRB8VK6qGR+FADAEqpZJ+JewAMJaDpDatkLhZQ44ygGPErDIWbKnqZvPfiBTga65kB E3N/2Mt+x2q1duyEfS49P+Ss2Vf0v8xnvdmsUF+0MdgBQ2dKTMbCQwsbGDDUVbW7OwIDAQAB o4ICojCCAp4wDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUNiQ562ZHp7c9HjvDspUMZvpF EfswgZMGA1UdIwSBizCBiIAUAr3bGy+wsVe/6m0mADKJ8jIZOvyhbaRrMGkxCzAJBgNVBAYT AkRFMREwDwYDVQQHEwhNdWVuY2hlbjEMMAoGA1UEChMDVFVNMQswCQYDVQQLEwJJTjEPMA0G A1UEAxMGUkJHLUNBMRswGQYJKoZIhvcNAQkBFgxjYUBpbi50dW0uZGWCAQMwDgYDVR0PAQH/ BAQDAgEGMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDA3BgNVHR8EMDAuMCygKqAo hiZodHRwOi8vY2EuaW4udHVtLmRlL2NybHMvZzIvY2FfY3JsLmNybDAJBgNVHRIEAjAAMBEG CWCGSAGG+EIBAQQEAwIBBjCBlgYJYIZIAYb4QgENBIGIFoGFWmVydGlmaWthdCBmdWVyIFJC Ry1CZW51dHplci1DQSwgYXVzZ2VzdGVsbHQgdm9uIFJCRy1DQSAyLkdlbmVyYXRpb24sIEZh a3VsdGFldCBmdWVyIEluZm9ybWF0aWsgZGVyIFRlY2huaXNjaGVuIFVuaXZlcnNpdGFldCBN dWVuY2hlbjAyBglghkgBhvhCAQQEJRYjaHR0cDovL2NhLmluLnR1bS5kZS9jZ2ktYmluL2Nh LXJldj8wOgYJYIZIAYb4QgEIBC0WK2h0dHA6Ly9jYS5pbi50dW0uZGUvcG9saWNpZXMvdXNl cmNhcG9sLmh0bWwwRwYDVR0gBEAwPjA8Bg0rBgEEAYGYPmWBSAEBMCswKQYIKwYBBQUHAgEW HWh0dHA6Ly9jYS5pbi50dW0uZGUvcG9saWNpZXMvMA0GCSqGSIb3DQEBBQUAA4IBAQB0Fciq aObDs6d/ZW5OXQi6AfFy7SnagnAP3uqMAamMyTCtUn8/3AeGb5veesmtXUTrOL6v5q5VMuwa C6rvxLVpevnS6YrvhjijbqtuaJU/Rsw+zgAvGOj3VrolfC4pxNBPoKATBVWDOufrO3w9oFHY OaS3URFEURbhdQGCET0letBus3B8fCl0TOvF7ftE47+C8c0nYDzukMH2DNTlJ1Z33NA5CFyC QBjqdGFmRJezFyquWDP+ub/Aw/TeiY1vr/wsF+mcfNjFYvY6Q8tIWoeg5ED7Ex20T9PFk447 gWpEN6oyTUXd95SyMzWZ6RzUX/ox/mlcYfCqoUDiReZr/6+EMYICUzCCAk8CAQEweDByMQsw CQYDVQQGEwJERTERMA8GA1UEBxMITXVlbmNoZW4xDDAKBgNVBAoTA1RVTTELMAkGA1UECxMC SU4xGDAWBgNVBAMTD1JCRy1CZW51dHplci1DQTEbMBkGCSqGSIb3DQEJARYMY2FAaW4udHVt LmRlAgIj0zAJBgUrDgMCGgUAoIGxMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZI hvcNAQkFMQ8XDTA0MDUxODA3MzY1N1owIwYJKoZIhvcNAQkEMRYEFBk1LAxgVT/Ux65JjAEo F0P9jPWiMFIGCSqGSIb3DQEJDzFFMEMwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMA0G CCqGSIb3DQMCAgFAMAcGBSsOAwIHMA0GCCqGSIb3DQMCAgEoMA0GCSqGSIb3DQEBAQUABIIB AD/yQlex5qO1JeqmK3Z/+r3AnZWz5ze+QRwOjA10SIj/zBaO6INxWPLRpg+p6hD0udtKiuSV HgOfvOktrQ9N+pPmcR9FTf9IyA+xsERFDttAH492/Kjryo6yXuxfqrGU+uGuRcGhv9MkxvI4 G9lOJ+isZSstGr3SVKqb2dw5bMTFOQXaiSziAVa1wvzezhYx9UPuzjSxmvQJa2tpvQbONOsk T0ay/cM0yiiLgRzldr3qIwU21UbTs9GsYHNclzDAnQIOWd8q/A8zZbU9nai1wz7nFj0lEiFh dkDWGSdXx1UIwNob+taKLEwJbzWRO54jgxCMgmDbBODhFTGmWZj08sk= --ibTvN161/egqYuK8-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 18 02:08:41 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8924B16A4CE for ; Tue, 18 May 2004 02:08:41 -0700 (PDT) Received: from crf-consulting.co.uk (82-44-220-218.cable.ubr10.haye.blueyonder.co.uk [82.44.220.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C53643D39 for ; Tue, 18 May 2004 02:08:39 -0700 (PDT) (envelope-from nik@crf-consulting.co.uk) Received: from clan.nothing-going-on.org (clan.nothing-going-on.org [192.168.1.20])i4I98M5U080873; Tue, 18 May 2004 10:08:22 +0100 (BST) (envelope-from nik@catkin) Received: from clan.nothing-going-on.org (localhost [127.0.0.1]) i4I98MMY099141; Tue, 18 May 2004 10:08:22 +0100 (BST) (envelope-from nik@clan.nothing-going-on.org) Received: (from nik@localhost)i4I98LfJ099140; Tue, 18 May 2004 10:08:21 +0100 (BST) (envelope-from nik) Date: Tue, 18 May 2004 10:08:20 +0100 From: Nik Clayton To: "Marc G. Fournier" Message-ID: <20040518090820.GA98416@clan.nothing-going-on.org> References: <20040516164218.I52585@ganymede.hub.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <20040516164218.I52585@ganymede.hub.org> User-Agent: Mutt/1.4.2.1i Organization: FreeBSD Project cc: freebsd-hackers@freebsd.org cc: Julian Elischer Subject: Re: fsck: % done possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 09:08:41 -0000 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 16, 2004 at 04:44:08PM -0300, Marc G. Fournier wrote: > Cause I never knew about that? :) I take it that that is the SIGINFO > refer'd in: >=20 > If fsck receives a SIGINFO (see the ``status'' argument for stty(1))= sig- > nal, a line will be written to the standard output indicating the na= me of > the device currently being checked, the current phase number and pha= se- > specific progress information. Quite a few commands support SIGINFO now. cp(1) for example. N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ (__) FreeBSD Documentation Project http://www.freebsd.org/docproj/ \\\'',) \/ \= ^ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- .\._/= _) --huq684BweRXVnRxX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAqdKEk6gHZCw343URAoSuAJ96mKg952GGZtT0W/IPR9WUDUwCHQCgkuk2 lRSpOPCPxKEaiYvq9hdzZmQ= =kol+ -----END PGP SIGNATURE----- --huq684BweRXVnRxX-- From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 08:04:34 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80E6316A4CE for ; Mon, 17 May 2004 08:04:34 -0700 (PDT) Received: from fepC.post.tele.dk (fepC.post.tele.dk [80.160.77.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B87B43D5C for ; Mon, 17 May 2004 08:04:33 -0700 (PDT) (envelope-from mir@mail.tele.dk) Received: from post.tele.dk ([195.41.46.146]) by fepC.post.tele.dk (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP id <20040517150431.LCNC2423.fepC.post.tele.dk@post.tele.dk> for ; Mon, 17 May 2004 17:04:31 +0200 From: mir@mail.tele.dk To: freebsd-hackers@freebsd.org Date: Mon, 17 May 2004 17:04:31 +0200 MIME-Version: 1.0 X-Mailer: TDC Online webmail (version opasia/4.0.4) X-Originating-IP: 217.157.152.66 Content-Type: text/plain; charset=iso-8859-1 Message-Id: <20040517150431.LCNC2423.fepC.post.tele.dk@post.tele.dk> X-Mailman-Approved-At: Tue, 18 May 2004 05:03:33 -0700 Subject: install.cfg X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 15:04:34 -0000 Hi all. I have a question concerning freebsd unattended install. Is it possible somehow to load a install.cfg from a tftp/ftp -server instead of the one in mfsroot.gz.? If anybody knows how, i would be most grateful. Thanks in advance. /mir From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 12:49:17 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3544816A4CE for ; Mon, 17 May 2004 12:49:16 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44BAD43D48 for ; Mon, 17 May 2004 12:49:16 -0700 (PDT) (envelope-from cagney@gnu.org) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i4HJnERm011646; Mon, 17 May 2004 15:49:14 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151])i4HJn6027339; Mon, 17 May 2004 15:49:10 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0D1292B9D; Mon, 17 May 2004 15:49:00 -0400 (EDT) Message-ID: <40A9172B.9000300@gnu.org> Date: Mon, 17 May 2004 15:48:59 -0400 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 X-Accept-Language: en, en-us MIME-Version: 1.0 To: Mark Kettenis References: <200405171132.i4HBW0h5012696@elgar.kettenis.dyndns.org> In-Reply-To: <200405171132.i4HBW0h5012696@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 18 May 2004 05:03:33 -0700 cc: freebsd-hackers@freebsd.org cc: tech-toolchain@netbsd.org cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC] *BSD kernel debugging X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 19:49:17 -0000 > +void > +_initialize_bsd_kvm (void) > +{ > + bsd_kvm_ops.to_shortname = "kvm"; > + bsd_kvm_ops.to_longname = "Kernel memory interface"; > + bsd_kvm_ops.to_doc = "XXX"; > + bsd_kvm_ops.to_open = bsd_kvm_open; > + bsd_kvm_ops.to_close = bsd_kvm_close; > + bsd_kvm_ops.to_fetch_registers = bsd_kvm_fetch_registers; > + bsd_kvm_ops.to_xfer_memory = bsd_kvm_xfer_memory; > + bsd_kvm_ops.to_stratum = process_stratum; > + bsd_kvm_ops.to_has_memory = 1; > + bsd_kvm_ops.to_has_stack = 1; > + bsd_kvm_ops.to_has_registers = 1; > + bsd_kvm_ops.to_magic = OPS_MAGIC; > + > + add_target (&bsd_kvm_ops); > +} Can the deck chairs be re-arange a little here? Instead of having: bsd_kvm_supply_pcb picked up by accident, add an _initialize to the *-nat.c files where they can do something more explicit vis: _initialize_foobsd_nat () { add_bsd_kvm_target (foobsd_kvm_supply_pcb); } Andrew From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 13:45:43 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79D0116A4CE for ; Mon, 17 May 2004 13:45:43 -0700 (PDT) Received: from walton.kettenis.dyndns.org (e77109.upc-e.chello.nl [213.93.77.109]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25B6543D45 for ; Mon, 17 May 2004 13:45:42 -0700 (PDT) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2])i4HKje5V003317; Mon, 17 May 2004 22:45:40 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) i4HKjeYR014109; Mon, 17 May 2004 22:45:40 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost)i4HKjd4k014106; Mon, 17 May 2004 22:45:39 +0200 (CEST) Date: Mon, 17 May 2004 22:45:39 +0200 (CEST) Message-Id: <200405172045.i4HKjd4k014106@elgar.kettenis.dyndns.org> From: Mark Kettenis To: marcel@xcllnt.net In-reply-to: <20040517200417.GA67285@ns1.xcllnt.net> (message from Marcel Moolenaar on Mon, 17 May 2004 13:04:17 -0700) References: <200405171132.i4HBW0h5012696@elgar.kettenis.dyndns.org> <20040517200417.GA67285@ns1.xcllnt.net> X-Mailman-Approved-At: Tue, 18 May 2004 05:03:33 -0700 cc: freebsd-hackers@freebsd.org cc: tech-toolchain@netbsd.org cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFC] *BSD kernel debugging X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 20:45:43 -0000 Date: Mon, 17 May 2004 13:04:17 -0700 From: Marcel Moolenaar > All that's needed is a bit of new code (bsd-kvm.[ch]) and a support > function in the appropriate *-nat.c file; because it is built on top > of kvm(3) this is native-only. I've added a preliminary patch with > some sample code. > > If there are no objections I'll check this in in a week or so. I've been working on a different scheme for FreeBSD that supports kernel threads and kernel modules and also works on non-i386 and non-amd64 systems without any gdb changes (at least, that's the intend -- I'm not far enough in the development to have a working prototype of all features). Anyway, it uses the remote protocol to establish an IPC pipe between gdb and some front-end that knows about the quirks of the kernel and its core files and isn't an inherently native solution. This makes a lot of sense: a gdbserver-like stub that's part of the kernel en gets build as part of "make buildworld". I cannot prevent you from committing this, but if it doesn't address the items mentioned above, it may not be used on FreeBSD. Unless I'm being relieved of gdb duties of course :-) Let's see. My kvm stuff would still serve a purpose for older releases. Mark From owner-freebsd-hackers@FreeBSD.ORG Tue May 18 05:34:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62E8716A4CE for ; Tue, 18 May 2004 05:34:36 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CCF243D1D for ; Tue, 18 May 2004 05:34:01 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000217210.msg for ; Tue, 18 May 2004 13:32:17 +0100 Message-ID: <006a01c43cd4$5ee166a0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: , References: <20040517150431.LCNC2423.fepC.post.tele.dk@post.tele.dk> Date: Tue, 18 May 2004 13:33:48 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Tue, 18 May 2004 13:32:17 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Tue, 18 May 2004 13:32:20 +0100 Subject: Re: install.cfg X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 12:34:36 -0000 For the installs we do, we just create an mfsroot.gz with a custom install.cfg in it. Works fine. Steve ----- Original Message ----- From: To: Sent: Monday, May 17, 2004 4:04 PM Subject: install.cfg > Hi all. > > I have a question concerning freebsd unattended install. > > Is it possible somehow to load a install.cfg from a tftp/ftp -server > instead of the one in mfsroot.gz.? > > If anybody knows how, i would be most grateful. > > Thanks in advance. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Tue May 18 05:58:16 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CE6816A4CE for ; Tue, 18 May 2004 05:58:16 -0700 (PDT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08C5343D8E for ; Tue, 18 May 2004 05:56:15 -0700 (PDT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i4ICtTf1061067; Tue, 18 May 2004 22:25:32 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 18 May 2004 22:25:28 +0930 User-Agent: KMail/1.6.2 References: <20040517150431.LCNC2423.fepC.post.tele.dk@post.tele.dk> <006a01c43cd4$5ee166a0$b3db87d4@multiplay.co.uk> In-Reply-To: <006a01c43cd4$5ee166a0$b3db87d4@multiplay.co.uk> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200405182225.28866.doconnor@gsoft.com.au> X-Spam-Score: -4.8 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02,TO_BE_REMOVED_REPLY,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: mir@mail.tele.dk cc: Steven Hartland Subject: Re: install.cfg X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 12:58:16 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 18 May 2004 22:03, Steven Hartland wrote: > For the installs we do, we just create an mfsroot.gz with a custom > install.cfg in it. Works fine. It would be nice if it could be separate though, that way you could more=20 easily change the script (or even serve per-client scripts.. :) I don't think it would be that hard to add either (speaking to mir here :)= =20 have a look in dispatch.c and see how dispatch_load_floppy() works. You can= =20 probably add something into main() to call a function pretty easily. > Steve > ----- Original Message ----- > From: > To: > Sent: Monday, May 17, 2004 4:04 PM > Subject: install.cfg > > > Hi all. > > > > I have a question concerning freebsd unattended install. > > > > Is it possible somehow to load a install.cfg from a tftp/ftp -server > > instead of the one in mfsroot.gz.? > > > > If anybody knows how, i would be most grateful. > > > > Thanks in advance. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > This e.mail is private and confidential between Multiplay (UK) Ltd. and t= he > person or entity to whom it is addressed. In the event of misdirection, t= he > recipient is prohibited from using, copying, printing or otherwise > disseminating it or any information contained in it. > > In the event of misdirection, illegible or incomplete transmission please > telephone (023) 8024 3137 or return the E.mail to > postmaster@multiplay.co.uk. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAqgfA5ZPcIHs/zowRAjISAKCg7bNsr3VY8r/pJ7oOXgsAbGAGuQCfdZb2 sJRqbC4oJQFoTuKKQdcDn04=3D =3DWTwn =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue May 18 16:25:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D98216A4F0; Tue, 18 May 2004 16:25:29 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89E5043D2F; Tue, 18 May 2004 16:25:28 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i4IMI390041921; Tue, 18 May 2004 15:18:03 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <40AA8B96.3030903@freebsd.org> Date: Tue, 18 May 2004 15:17:58 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tim Kientzle References: <40A96DA2.4080306@freebsd.org> In-Reply-To: <40A96DA2.4080306@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: Wanted: Example tar files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 23:25:29 -0000 Tim Kientzle wrote: > In order to test bsdtar's automatic format detection and > support for variant tar formats, I'm looking for sample > archives generated by a variety of tar programs. By popular demand, I've created a shell script that builds a directory with a variety of interesting and unusual things in it. The script is called "TarTest.sh" and it can be downloaded from: http://people.freebsd.org/~kientzle/libarchive/src/ Note that this script does some pretty obscure and sometimes unpleasant things. Expect to do a little editing to get it to work on your system, and expect to experiment a bit with tar options to try to find a way to get your tar program to archive as many of the details as possible. Thanks in advance for all your help, Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Tue May 18 19:56:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AB9416A4CE for ; Tue, 18 May 2004 19:56:38 -0700 (PDT) Received: from Princeton.EDU (postoffice02.Princeton.EDU [128.112.130.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46E4C43D2F for ; Tue, 18 May 2004 19:56:38 -0700 (PDT) (envelope-from yruan@cs.princeton.edu) Received: from smtpserver1.Princeton.EDU (smtpserver1.Princeton.EDU [128.112.129.65]) by Princeton.EDU (8.12.9/8.12.9) with ESMTP id i4J2u7rq027706 for ; Tue, 18 May 2004 22:56:37 -0400 (EDT) Received: from cs.princeton.edu (targe.CS.Princeton.EDU [128.112.139.194]) (authenticated bits=0)i4J2u6aE003421 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Tue, 18 May 2004 22:56:06 -0400 (EDT) Message-ID: <40AACCA0.757478CF@cs.princeton.edu> Date: Tue, 18 May 2004 22:55:28 -0400 From: Yaoping Ruan X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Vnode exclusive locking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 02:56:38 -0000 Hi, Could someone here give me some optimization advice/reference about vnode locking? Recently we find that vnode lookup locking has significant negative impact on I/O latency. We trace down to two places in the source code which initiated the locking: 1. the vn_lock( ) in lookup( ), kern/vfs_lookup.c, which locks the current directory vnode. I suppose it is released until the target leaf vnode is found. Does this lock need to be exclusive? 2. the two vget() calls in kern/vfs_cache.c. After looking at the source code changing logs, it seems that there's a "LOCKSHARED" option to solve the problem. But this option is not included until release 5.0 or 5.1. So my question is why it used EXCLUSIVE lock for lookup (which is a cache hit path)? And is there any other issues if using SHARED lock? Any explanation and points to references would be greatly appreciated. -Yaoping From owner-freebsd-hackers@FreeBSD.ORG Tue May 18 23:21:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97F8B16A621 for ; Tue, 18 May 2004 23:21:28 -0700 (PDT) Received: from ns.mmk.ru (ns1.mmk.ru [193.16.208.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26E8943D45 for ; Tue, 18 May 2004 23:21:23 -0700 (PDT) (envelope-from freebsd@mmk.ru) Received: from antivirus.mmk.ru (antivirus [161.8.100.3]) by ns.mmk.ru (8.12.9p1/8.12.9) with ESMTP id i4J6Lo3K031426 for ; Wed, 19 May 2004 12:21:50 +0600 (YEKST) (envelope-from freebsd@mmk.ru) Received: from wall.mmk.ru (localhost [127.0.0.1]) by antivirus.mmk.ru (8.12.9/8.12.9) with ESMTP id i4J6J8Te002299 for ; Wed, 19 May 2004 12:19:09 +0600 (YEKST) Received: from wall (localhost [127.0.0.1]) by wall.mmk.ru (8.12.10/8.12.10) with SMTP id i4J6LBFC021500 for ; Wed, 19 May 2004 12:21:11 +0600 (YEKST) (envelope-from freebsd@mmk.ru) Message-ID: <026201c43d69$b0d695d0$02010101@wall> From: "Dmitry A. Bondareff" To: Date: Wed, 19 May 2004 12:22:41 +0600 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: IP frag need X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 06:21:47 -0000 Hello hackers! I have two office in the Internet. And now I trying to make VPN between it. I using mpd for it. Client ---> (mtu=3D1500) FreeBSD (mtu=3D1024) = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D VPN over Internet =3D=3D=3D=3D=3D=3D> (mtu=3D1024)FreeBSD (mtu=3D1500)---> WindowsNT Client trying to use mounted disk from WindowsNT 11.8.24.25 - WindowsNT 11.8.11.1 - FreeBSD tcpdump info: 17:26:55.100097 11.8.24.25.139 > 11.8.11.1.1049: tcp 1460 (DF) 17:26:55.100175 11.8.11.1 > 11.8.24.25: icmp: 11.8.11.1 unreachable - = need to frag (mtu 1024) (DF) 17:26:57.287737 11.8.24.25.139 > 11.8.11.1.1049: tcp 1460 (DF) 17:26:57.287813 11.8.11.1 > 11.8.24.25: icmp: 11.8.11.1 unreachable - = need to frag (mtu 1024) (DF) As you can see IP frag needed, but WindowsNT don't want to do it. What I cat do on FreeBSD box to solve the problem ?? Dmitry. (Sorry for my English) From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 01:17:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 030A316A4CE for ; Wed, 19 May 2004 01:17:06 -0700 (PDT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 7347143D2F for ; Wed, 19 May 2004 01:17:04 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 2174 invoked from network); 19 May 2004 08:07:45 -0000 Received: from office.sbnd.net (HELO straylight.m.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 19 May 2004 08:07:44 -0000 Received: (qmail 59891 invoked by uid 1000); 19 May 2004 08:16:17 -0000 Date: Wed, 19 May 2004 11:16:17 +0300 From: Peter Pentchev To: "Dmitry A. Bondareff" Message-ID: <20040519081617.GE988@straylight.m.ringlet.net> Mail-Followup-To: "Dmitry A. Bondareff" , freebsd-hackers@freebsd.org References: <026201c43d69$b0d695d0$02010101@wall> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="69pVuxX8awAiJ7fD" Content-Disposition: inline In-Reply-To: <026201c43d69$b0d695d0$02010101@wall> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: IP frag need X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 08:17:06 -0000 --69pVuxX8awAiJ7fD Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 19, 2004 at 12:22:41PM +0600, Dmitry A. Bondareff wrote: > Hello hackers! >=20 > I have two office in the Internet. > And now I trying to make VPN between it. >=20 > I using mpd for it. >=20 >=20 > Client ---> (mtu=3D1500) FreeBSD (mtu=3D1024) =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D VPN over Internet > =3D=3D=3D=3D=3D=3D> (mtu=3D1024)FreeBSD (mtu=3D1500)---> WindowsNT >=20 > Client trying to use mounted disk from WindowsNT >=20 > 11.8.24.25 - WindowsNT > 11.8.11.1 - FreeBSD >=20 > tcpdump info: > 17:26:55.100097 11.8.24.25.139 > 11.8.11.1.1049: tcp 1460 (DF) > 17:26:55.100175 11.8.11.1 > 11.8.24.25: icmp: 11.8.11.1 unreachable - need > to frag (mtu 1024) (DF) > 17:26:57.287737 11.8.24.25.139 > 11.8.11.1.1049: tcp 1460 (DF) > 17:26:57.287813 11.8.11.1 > 11.8.24.25: icmp: 11.8.11.1 unreachable - need > to frag (mtu 1024) (DF) >=20 > As you can see IP frag needed, but WindowsNT don't want to do it. >=20 > What I cat do on FreeBSD box to solve the problem ?? If you are using a recent version of mpd, try putting the following line: set iface enable tcpmssfix in your bundle definition in mpd.conf. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 No language can express every thought unambiguously, least of all this one. --69pVuxX8awAiJ7fD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAqxfR7Ri2jRYZRVMRAmzQAJ40Mls6g8ofe1luBN99AL488HVpogCfTngf /ZZUvwH8la6KjNsa/TfzUlM= =br6Y -----END PGP SIGNATURE----- --69pVuxX8awAiJ7fD-- From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 01:28:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1253516A4CF for ; Wed, 19 May 2004 01:28:36 -0700 (PDT) Received: from siue.dnsalias.net (13spidialup18.famvid.com [66.94.203.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15D7D43D54 for ; Wed, 19 May 2004 01:28:35 -0700 (PDT) (envelope-from wgrim@siue.edu) Received: from siue.edu (persephone.bsdaemon.org [192.168.0.101]) by siue.dnsalias.net (Postfix) with ESMTP id 9DC10233D10; Wed, 19 May 2004 03:29:24 -0500 (CDT) Message-ID: <40AB1AE4.4050100@siue.edu> Date: Wed, 19 May 2004 03:29:24 -0500 From: "William M. Grim" Organization: SIUE User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3 X-Accept-Language: en MIME-Version: 1.0 To: "Dmitry A. Bondareff" References: <026201c43d69$b0d695d0$02010101@wall> In-Reply-To: <026201c43d69$b0d695d0$02010101@wall> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: IP frag need X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 08:28:36 -0000 Dmitry A. Bondareff wrote: >Hello hackers! > >I have two office in the Internet. >And now I trying to make VPN between it. > >I using mpd for it. > > >Client ---> (mtu=1500) FreeBSD (mtu=1024) ========== VPN over Internet >======> (mtu=1024)FreeBSD (mtu=1500)---> WindowsNT > >Client trying to use mounted disk from WindowsNT > >11.8.24.25 - WindowsNT >11.8.11.1 - FreeBSD > >tcpdump info: >17:26:55.100097 11.8.24.25.139 > 11.8.11.1.1049: tcp 1460 (DF) >17:26:55.100175 11.8.11.1 > 11.8.24.25: icmp: 11.8.11.1 unreachable - need >to frag (mtu 1024) (DF) >17:26:57.287737 11.8.24.25.139 > 11.8.11.1.1049: tcp 1460 (DF) >17:26:57.287813 11.8.11.1 > 11.8.24.25: icmp: 11.8.11.1 unreachable - need >to frag (mtu 1024) (DF) > >As you can see IP frag needed, but WindowsNT don't want to do it. > >What I cat do on FreeBSD box to solve the problem ?? > >Dmitry. >(Sorry for my English) > >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > > Please send these types of questions to freebsd-questions@freebsd.org. I'm not an admin here, but I think that place would be more appropriate. -- William Michael Grim Student, Southern Illinois University at Edwardsville Unix Network Administrator, SIUE, Computer Science dept. Phone: (217) 341-6552 Email: wgrim@siue.edu From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 03:36:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B524716A4CE for ; Wed, 19 May 2004 03:36:54 -0700 (PDT) Received: from cicero0.cybercity.dk (cicero0.cybercity.dk [212.242.40.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EA7543D53 for ; Wed, 19 May 2004 03:36:54 -0700 (PDT) (envelope-from db@traceroute.dk) Received: from user3.cybercity.dk (user3.cybercity.dk [212.242.41.36]) by cicero0.cybercity.dk (Postfix) with ESMTP id A82182A47C for ; Wed, 19 May 2004 12:36:30 +0200 (CEST) Received: from main.trunet.dk (port132.ds1-arsy.adsl.cybercity.dk [212.242.239.73]) by user3.cybercity.dk (Postfix) with ESMTP id 4729793EBE for ; Wed, 19 May 2004 12:36:30 +0200 (CEST) From: db Date: Wed, 19 May 2004 12:41:50 +0200 User-Agent: KMail/1.6.2 To: hackers@freebsd.org MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405191241.50871.db@traceroute.dk> Subject: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 10:36:54 -0000 Hi all I'm trying to get grub working on my FreeBSD 4.9 test-box. So far I've done: cd /usr/ports/sysutils/grub make install clean mkdir /boot/grub cp /usr/local/share/grub-0.94/i386-freebsd/* /boot/grub/ In /boot/grub I created a fil called menu.lst and wrote this in it: default 0 # By default, boot the first entry. timeout 5 # Boot automatically after 30 secs. title FreeBSD root (hd0,0) kernel /boot/loader My box is just a test box with one harddisk, so I've made one huge / and then given about 256 mb to swap. I've read that the safest way to install grub is by making a bootdisk, boot and run setup, so I made the disk: # cd /boot/grub # dd if=stage1 of=/dev/afd0 bs=512 count=1 1+0 records in 1+0 records out # dd if=stage2 of=/dev/afd0 bs=512 seek=1 153+1 records in 153+1 records out And I booted on it just fine, but I can't install grub because it by default dones't support ffs drives. I know there is a ffs_stage1_5 in /boot/grub, but how do I use it? Anyway I rebooted in FreeBSD and ran "grub" and made the install successfully, but then booting the system again I get an "error 18". So how do I fix it? I've also tried getting network support built into grub, but I can't figure out which driver to use (FreeBSD use de0), any ideas? Best regards db From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 04:06:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2969E16A4CE for ; Wed, 19 May 2004 04:06:11 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7180943D2F for ; Wed, 19 May 2004 04:06:10 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000219347.msg for ; Wed, 19 May 2004 11:41:53 +0100 Message-ID: <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "db" , References: <200405191241.50871.db@traceroute.dk> Date: Wed, 19 May 2004 11:43:22 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Wed, 19 May 2004 11:41:53 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Wed, 19 May 2004 11:41:55 +0100 Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 11:06:11 -0000 chainloader is your friend here I found as u correctly state it doesn't seem to support ffs drives even though the devs seem to say it does. Steve ----- Original Message ----- From: "db" To: Sent: Wednesday, May 19, 2004 11:41 AM Subject: Grub and FreeBSD 4.9 > Hi all > > I'm trying to get grub working on my FreeBSD 4.9 test-box. So far I've done: > cd /usr/ports/sysutils/grub > make install clean > mkdir /boot/grub > cp /usr/local/share/grub-0.94/i386-freebsd/* /boot/grub/ > In /boot/grub I created a fil called menu.lst and wrote this in it: > default 0 # By default, boot the first entry. > timeout 5 # Boot automatically after 30 secs. > > title FreeBSD > root (hd0,0) > kernel /boot/loader > > My box is just a test box with one harddisk, so I've made one huge / and then > given about 256 mb to swap. > > I've read that the safest way to install grub is by making a bootdisk, boot > and run setup, so I made the disk: > # cd /boot/grub > # dd if=stage1 of=/dev/afd0 bs=512 count=1 > 1+0 records in > 1+0 records out > # dd if=stage2 of=/dev/afd0 bs=512 seek=1 > 153+1 records in > 153+1 records out > And I booted on it just fine, but I can't install grub because it by default > dones't support ffs drives. I know there is a ffs_stage1_5 in /boot/grub, but > how do I use it? > > Anyway I rebooted in FreeBSD and ran "grub" and made the install > successfully, but then booting the system again I get an "error 18". So how > do I fix it? > > I've also tried getting network support built into grub, but I can't figure > out which driver to use (FreeBSD use de0), any ideas? > > Best regards > db > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 04:41:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36FE416A4CE for ; Wed, 19 May 2004 04:41:48 -0700 (PDT) Received: from cicero2.cybercity.dk (cicero2.cybercity.dk [212.242.40.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id E16F143D55 for ; Wed, 19 May 2004 04:41:47 -0700 (PDT) (envelope-from db@traceroute.dk) Received: from user1.cybercity.dk (user1.cybercity.dk [212.242.41.34]) by cicero2.cybercity.dk (Postfix) with ESMTP id 72AE419134A; Wed, 19 May 2004 13:41:25 +0200 (CEST) Received: from main.trunet.dk (port132.ds1-arsy.adsl.cybercity.dk [212.242.239.73]) by user1.cybercity.dk (Postfix) with ESMTP id D710274FFF8; Wed, 19 May 2004 13:41:24 +0200 (CEST) From: db To: "Steven Hartland" Date: Wed, 19 May 2004 13:46:45 +0200 User-Agent: KMail/1.6.2 References: <200405191241.50871.db@traceroute.dk> <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> In-Reply-To: <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405191346.45766.db@traceroute.dk> cc: hackers@freebsd.org Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 11:41:48 -0000 On Wednesday 19 May 2004 12:43, you wrote: > chainloader is your friend here I found as u correctly state it doesn't > seem to support ffs drives even though the devs seem to say it does. If I boot with the bootdisk I can loade FreeBSD (with the chainloader), but if I'm using grub on the disk I get: -------------------------------------------------- GRUB loading stage1.5. GRUB loading, pelase wait... Error 18 -------------------------------------------------- I've edited the menu.lst to make sure FreeBSD is loaded with the chainloader, but I don't think that is the problem. Stage1.5 is not on the floppy, so maybe it is having problems finding it? If yes, do I have to reinstall FreeBSD and place /boot differently in order to make it work? br db From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 04:48:28 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CE8D16A4D2 for ; Wed, 19 May 2004 04:48:28 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FAC043D1F for ; Wed, 19 May 2004 04:48:27 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000219518.msg for ; Wed, 19 May 2004 12:46:03 +0100 Message-ID: <00a901c43d97$14642540$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "db" References: <200405191241.50871.db@traceroute.dk> <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> <200405191346.45766.db@traceroute.dk> Date: Wed, 19 May 2004 12:47:34 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Wed, 19 May 2004 12:46:03 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Wed, 19 May 2004 12:46:06 +0100 cc: hackers@freebsd.org Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 11:48:28 -0000 Oh quite possibly I have the grub install on a linux partition. just creating a small boot partition of a format that grub can load should be good enough though. If someone else can find out how to get grub to load read an ffs partition I'd be certainly interested as well. Steve / K ----- Original Message ----- From: "db" To: "Steven Hartland" > If I boot with the bootdisk I can loade FreeBSD (with the chainloader), but if > I'm using grub on the disk I get:.... ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 04:58:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 839F916A4CE for ; Wed, 19 May 2004 04:58:47 -0700 (PDT) Received: from aiel.daemonz.org (aiel.daemonz.org [213.222.53.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id A175043D4C for ; Wed, 19 May 2004 04:58:46 -0700 (PDT) (envelope-from tacho@orbitel.bg) Received: by aiel.daemonz.org (Postfix, from userid 1001) id CEB5BC2A1; Wed, 19 May 2004 14:58:41 +0300 (EEST) Date: Wed, 19 May 2004 14:58:41 +0300 From: Stanislav Grozev To: Steven Hartland Message-ID: <20040519115841.GC947@aiel.daemonz.org> References: <200405191241.50871.db@traceroute.dk> <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> <200405191346.45766.db@traceroute.dk> <00a901c43d97$14642540$b3db87d4@multiplay.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00a901c43d97$14642540$b3db87d4@multiplay.co.uk> User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 11:58:47 -0000 On Wed, May 19, 2004 at 12:47:34PM +0100, Steven Hartland wrote: > Oh quite possibly I have the grub install on a linux partition. > just creating a small boot partition of a format that grub can load > should be good enough though. If someone else can find out > how to get grub to load read an ffs partition I'd be certainly > interested as well. mine works fine. i am with 5-current (UFS2, but it works with UFS1 also) install the grub port # mkdir /boot/grub # cp /usr/local/share/grub/i386-freebsd/* /boot/grub make a /boot/grub/menu.lst: ---begin menu.lst--- default=0 timeout=10 title FreeBSD root (hd0,1,a) kernel /boot/loader ---end menu.lst--- (adjust the root directive accordingly - mine is first hard disk, second slice, partition 'a') format a msdos diskette then install grub on it: # mount -t msdos /dev/fd0 /mnt # mkdir /mnt/grub # cp /boot/grub/* /mnt/grub/ # umount /mnt # grub grub> root (fd0) grub> setup (fd0) grub> quit reboot from the diskette: grub> root (hd0,1,a) # again, adjust accordingly grub> setup (hd0) # install in MBR then reboot and you should be all set PS. I'm typing this from memory, but this is pretty much how I install it -tacho -- 0x44fc3339 || [02b5 798b 4bd1 97fb f8db 72e4 dca4 be03 44fc 3339] From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 04:51:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81E5B16A4CE for ; Wed, 19 May 2004 04:51:20 -0700 (PDT) Received: from pohoda.cz (pohoda.pohoda.cz [194.228.111.151]) by mx1.FreeBSD.org (Postfix) with SMTP id 63C2443D2D for ; Wed, 19 May 2004 04:51:19 -0700 (PDT) (envelope-from plusik@pohoda.cz) Received: (qmail 2735 invoked from network); 19 May 2004 11:50:45 -0000 Received: from plusik@pohoda.cz by pohoda.cz by uid 500 with qmail-scanner-1.15 ( Clear:. Processed in 0.012689 secs); 19 kvì 2004 11:50:45 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 19 May 2004 11:50:45 -0000 Date: Wed, 19 May 2004 13:50:45 +0200 (CEST) From: Tomas Pluskal To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on pohoda.cz X-Spam-Status: No, hits=-4.9 required=6.5 tests=BAYES_00 autolearn=ham version=2.61 X-Spam-Level: X-Mailman-Approved-At: Wed, 19 May 2004 05:02:55 -0700 Subject: copyin() EFAULT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 11:51:20 -0000 Hello, I would like to ask you for help or explanation - why do I get EFAULT when invoking copyin() or fubyte() etc. I am writing a kernel module, and I need to read all process memory (e.g. to do something like a coredump). I have copied the __elfN(coredump)(td, vp, limit) function from /sys/kern/imgact_elf.c, but it doesn't work, I get EFAULT on some memory blocks (but different blocks every time!). I have prepared a simple module, which demonstrates the situation. You can see it here: http://plusik.pohoda.cz/pokus.tgz It is using callout...() to run the perform_pokus() function every second, and this function tries to read all memory blocks of a certain process (the process PID is found in kern.pokuspid sysctl variable). When I load the module and set the kern.pokuspid to e.g. 359, I get on console: copying process 359 [sh] copyin 0x8061000 err 0 copyin 0x8064000 err 14 copyin 0x2807f000 err 0 copyin 0x28080000 err 0 copyin 0x28084000 err 14 copyin 0x280a9000 err 0 copyin 0x280c3000 err 0 copyin 0x2818a000 err 14 copyin 0x2818f000 err 14 copyin 0x281d8000 err 14 copyin 0x281e0000 err 14 copyin 0xbfbe0000 err 14 So copying of some blocks was OK, and on some blocks it returned EFAULT. Why? My system is FreeBSD 5.2-CURRENT #5: Wed Apr 28 16:03:52 CEST 2004. Thanks, Tomas Pluskal From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 05:29:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBB3416A4CE for ; Wed, 19 May 2004 05:29:11 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE27743D5D for ; Wed, 19 May 2004 05:29:11 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id C40AA5C7EA; Wed, 19 May 2004 05:29:07 -0700 (PDT) Date: Wed, 19 May 2004 05:29:07 -0700 From: Alfred Perlstein To: hackers@freebsd.org Message-ID: <20040519122907.GO81341@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: api for sharing memory from kernel to userspace? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 12:29:11 -0000 I need to share about 100megs of memory between kernel and userspace. The memory can not be paged and should appear contig in the process's address space. Any suggestions? I need a way to either: map user memory into the kernel's address space. map kernel memory into the user's address space. I was looking at pmap_qenter() but it didn't see attractive because it's for "short term mappings", this mapping will exist for quite a while. -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684 From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 06:34:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D63416A4CE for ; Wed, 19 May 2004 06:34:58 -0700 (PDT) Received: from nord.interexc.com (nord.interexc.com [193.108.123.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C3C543D31 for ; Wed, 19 May 2004 06:34:57 -0700 (PDT) (envelope-from nick@nord.interexc.com) Received: from nord.interexc.com (localhost.interexc.com [127.0.0.1]) by nord.interexc.com (8.12.10/8.12.10) with ESMTP id i4JDYgIW090097 for ; Wed, 19 May 2004 16:34:42 +0300 (EEST) (envelope-from nick@nord.interexc.com) Received: (from nick@localhost) by nord.interexc.com (8.12.10/8.12.10/Submit) id i4JDYgHW090096 for hackers@freebsd.org; Wed, 19 May 2004 16:34:42 +0300 (EEST) (envelope-from nick) Date: Wed, 19 May 2004 16:34:42 +0300 From: Nick Strebkov To: hackers@freebsd.org Message-ID: <20040519133442.GA90053@nord.interexc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-u Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 5.2.1-RELEASE-p5 X-Real-Name: =?koi8-u?B?89TSxcLLz9cgSMnLz8zByiDhzsHU?= =?koi8-u?B?z8zYxdfJ3g==?= Subject: obtaining a kernel crash dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 13:34:58 -0000 Hi there. I can't obtain a crash dump. % cat /sys/i386/conf/DEVEL | grep makeoptions makeoptions DEBUG=-g % cat /etc/rc.conf| grep dump dumpdev="/dev/ar0s1b" dumpdir="/var/crash" I'm testing my kernel patch and the following is what I see in /var/log/messages: May 19 16:17:00 devel /kernel: Fatal trap 12: page fault while in kernel mode May 19 16:17:00 devel /kernel: fault virtual address = 0x20a4e920 May 19 16:17:00 devel /kernel: fault code = supervisor write, page not present May 19 16:17:00 devel /kernel: instruction pointer = 0x8:0xc01920d3 May 19 16:17:00 devel /kernel: stack pointer = 0x10:0xe7951e80 May 19 16:17:00 devel /kernel: frame pointer = 0x10:0xe7951ea4 May 19 16:17:00 devel /kernel: code segment = base 0x0, limit 0xfffff, type 0x1b May 19 16:17:00 devel /kernel: = DPL 0, pres 1, def32 1, gran 1 May 19 16:17:00 devel /kernel: processor eflags = interrupt enabled, resume, IOPL = 0 May 19 16:17:00 devel /kernel: current process = 637 (rtpslave) May 19 16:17:00 devel /kernel: interrupt mask = net May 19 16:17:00 devel /kernel: trap number = 12 May 19 16:17:00 devel /kernel: panic: page fault May 19 16:17:00 devel /kernel: May 19 16:17:00 devel /kernel: syncing disks... 60 3 2 [dd boot kernel messages] May 19 16:17:00 devel savecore: no core dump Thanks in advance. -- Nick Strebkov Public key: http://humgat.org/~nick/pubkey.txt fpr: 552C 88D6 895B 6E64 F277 D367 8A70 8132 47F5 C1B6 From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 07:20:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A83216A4D4 for ; Wed, 19 May 2004 07:20:27 -0700 (PDT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 6CDA443D1D for ; Wed, 19 May 2004 07:20:11 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 3961 invoked from network); 19 May 2004 14:11:31 -0000 Received: from office.sbnd.net (HELO straylight.m.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 19 May 2004 14:11:31 -0000 Received: (qmail 35292 invoked by uid 1000); 19 May 2004 14:20:04 -0000 Date: Wed, 19 May 2004 17:20:04 +0300 From: Peter Pentchev To: Nick Strebkov Message-ID: <20040519142004.GA5125@straylight.m.ringlet.net> Mail-Followup-To: Nick Strebkov , hackers@freebsd.org References: <20040519133442.GA90053@nord.interexc.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <20040519133442.GA90053@nord.interexc.com> User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org Subject: Re: obtaining a kernel crash dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 14:20:27 -0000 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 19, 2004 at 04:34:42PM +0300, Nick Strebkov wrote: > Hi there. >=20 > I can't obtain a crash dump. >=20 > % cat /sys/i386/conf/DEVEL | grep makeoptions > makeoptions DEBUG=3D-g > % cat /etc/rc.conf| grep dump > dumpdev=3D"/dev/ar0s1b" > dumpdir=3D"/var/crash" >=20 > I'm testing my kernel patch and the following is what I see in > /var/log/messages: Can you force the kernel to dump by using DDB? Place 'options DDB' in your kernel config, then, when the system is quiescent, hit Ctrl-Alt-Esc and type 'panic' at the DDB prompt. If this works, and you get a crash dump, then the problem might be that with your kernel patch, the kernel is panicking in a low-level layer, like memory management or disk drivers or something like that, and it simply cannot make a crash dump, since that would mean invoking code that depends on bad data or something. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 Hey, out there - is it *you* reading me, or is it someone else? --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAq20U7Ri2jRYZRVMRAujtAJ418FPmaizEdEeS3MnhXSXvEnVkVgCfUPqW c+cyqGcK0/PYg8L+b4I/sGU= =boaY -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G-- From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 07:35:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0265116A4CE; Wed, 19 May 2004 07:35:11 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D5B243D2D; Wed, 19 May 2004 07:35:10 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 0082BACAF1; Wed, 19 May 2004 16:34:53 +0200 (CEST) Date: Wed, 19 May 2004 16:34:53 +0200 From: Pawel Jakub Dawidek To: Alfred Perlstein Message-ID: <20040519143453.GZ845@darkness.comp.waw.pl> References: <20040519122907.GO81341@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MiVqRLlIC2csOnh8" Content-Disposition: inline In-Reply-To: <20040519122907.GO81341@elvis.mu.org> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: hackers@freebsd.org Subject: Re: api for sharing memory from kernel to userspace? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 14:35:11 -0000 --MiVqRLlIC2csOnh8 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 19, 2004 at 05:29:07AM -0700, Alfred Perlstein wrote: +> I need to share about 100megs of memory between kernel and userspace. +>=20 +> The memory can not be paged and should appear contig in the process's +> address space. Any suggestions? +>=20 +> I need a way to either: +> map user memory into the kernel's address space. +> map kernel memory into the user's address space. +>=20 +> I was looking at pmap_qenter() but it didn't see attractive because +> it's for "short term mappings", this mapping will exist for quite a +> while. In mapping kernel memory into user's address space I am interested as well for GEOM Gate and other evil projects. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --MiVqRLlIC2csOnh8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAq3CNForvXbEpPzQRAgeOAKDx5UH/QPBE6mqZ09wtzSyicESs6gCgx38y JPB1As1wMlLu2bqm9ARAIPI= =gIGa -----END PGP SIGNATURE----- --MiVqRLlIC2csOnh8-- From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 08:29:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7688F16A4CF for ; Wed, 19 May 2004 08:29:55 -0700 (PDT) Received: from hourri.hittite.isp.9tel.net (hourri.hittite.isp.9tel.net [62.62.156.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3AC343D45 for ; Wed, 19 May 2004 08:29:54 -0700 (PDT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (unknown [81.185.48.180]) by hourri.hittite.isp.9tel.net (Postfix) with SMTP id 6CBC1157C42; Wed, 19 May 2004 18:05:10 +0200 (CEST) Message-ID: <01d401c43db6$077fba50$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: "Steven Hartland" , "db" , References: <200405191241.50871.db@traceroute.dk> <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> Date: Wed, 19 May 2004 17:28:49 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 15:29:55 -0000 "Steven Hartland" wrote: > chainloader is your friend here I found as u correctly state it doesn't > seem to support ffs drives even though the devs seem to say it does. chainloader +1 is for windows friends :P some samples : title FreeBSD (primary - SCSI) root (hd4,0,a) kernel /boot/loader title FreeBSD (secondary - SCSI) root (hd7,0,a) kernel /boot/loader title FreeBSD 4.x (primary - IDE) root (hd0,2,a) kernel /boot/loader title Windows (primary) rootnoverify (hd0,0) chainloader +1 # For loading DOS if Windows NT/2K is installed # chainload /bootsect.dos title Windows (secondary) map (hd0) (hd1) map (hd1) (hd0) rootnoverify (hd1,0) chainloader +1 title FreeBSD (floppy) root (fd0,a) kernel /boot/loader title Install GRUB (primary - SCSI) root (hd4,0,a) setup (hd4,0) title Install GRUB (secondary - SCSI) root (hd7,0,a) setup (hd7,0) title Install GRUB (primary - IDE) root (hd0,2,a) setup (hd0,2) title Install GRUB (floppy) root (fd0) setup (fd0) Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 08:29:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 344D416A4D1 for ; Wed, 19 May 2004 08:29:58 -0700 (PDT) Received: from hourri.hittite.isp.9tel.net (hourri.hittite.isp.9tel.net [62.62.156.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0000543D39 for ; Wed, 19 May 2004 08:29:57 -0700 (PDT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (unknown [81.185.48.180]) by hourri.hittite.isp.9tel.net (Postfix) with SMTP id 03818157661; Wed, 19 May 2004 18:05:12 +0200 (CEST) Message-ID: <01d501c43db6$083e9d80$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: "db" , References: <200405191241.50871.db@traceroute.dk> Date: Wed, 19 May 2004 17:28:53 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 15:29:58 -0000 "db" wrote: > > I'm trying to get grub working on my FreeBSD 4.9 test-box. So far I've done: > cd /usr/ports/sysutils/grub > make install clean > mkdir /boot/grub > cp /usr/local/share/grub-0.94/i386-freebsd/* /boot/grub/ > In /boot/grub I created a fil called menu.lst and wrote this in it: > default 0 # By default, boot the first entry. > timeout 5 # Boot automatically after 30 secs. > > title FreeBSD > root (hd0,0) root(hd0,0,a) would be better :) > kernel /boot/loader Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 08:39:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92BAF16A4CE for ; Wed, 19 May 2004 08:39:44 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id E877343D39 for ; Wed, 19 May 2004 08:39:43 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000220051.msg for ; Wed, 19 May 2004 16:37:18 +0100 Message-ID: <018901c43db7$63a4f100$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Cyrille Lefevre" , "db" , References: <200405191241.50871.db@traceroute.dk> <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> <01d401c43db6$077fba50$7890a8c0@dyndns.org> Date: Wed, 19 May 2004 16:38:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Wed, 19 May 2004 16:37:18 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Wed, 19 May 2004 16:37:19 +0100 Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 15:39:44 -0000 Just plain doesn't work here moans that it cant mount the FS where as chainloader works fine. Steve ----- Original Message ----- From: "Cyrille Lefevre" > chainloader +1 is for windows friends :P > > some samples : > > title FreeBSD (primary - SCSI) > root (hd4,0,a) > kernel /boot/loader > > title FreeBSD (secondary - SCSI) > root (hd7,0,a) > kernel /boot/loader > > title FreeBSD 4.x (primary - IDE) > root (hd0,2,a) > kernel /boot/loader > > title Windows (primary) > rootnoverify (hd0,0) > chainloader +1 > # For loading DOS if Windows NT/2K is installed > # chainload /bootsect.dos > > title Windows (secondary) > map (hd0) (hd1) > map (hd1) (hd0) > rootnoverify (hd1,0) > chainloader +1 > > title FreeBSD (floppy) > root (fd0,a) > kernel /boot/loader > > title Install GRUB (primary - SCSI) > root (hd4,0,a) > setup (hd4,0) > > title Install GRUB (secondary - SCSI) > root (hd7,0,a) > setup (hd7,0) > > title Install GRUB (primary - IDE) > root (hd0,2,a) > setup (hd0,2) > > title Install GRUB (floppy) > root (fd0) > setup (fd0) > > Cyrille Lefevre. > -- > home: mailto:cyrille.lefevre@laposte.net > > ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 09:40:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48B9C16A4CE for ; Wed, 19 May 2004 09:40:51 -0700 (PDT) Received: from kestrel.alerce.com (kestrel.alerce.com [209.182.219.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF9A843D41 for ; Wed, 19 May 2004 09:40:50 -0700 (PDT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (rosebud.lbl.gov [131.243.193.115]) (authenticated bits=128) by kestrel.alerce.com (8.12.10/8.12.10) with ESMTP id i4JGeZ0F012771 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 May 2004 09:40:36 -0700 (PDT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (localhost [127.0.0.1]) by rosebud.alerce.com (8.12.9p2/8.12.9) with ESMTP id i4JGehDr003047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 May 2004 09:40:44 -0700 (PDT) (envelope-from hartzell@rosebud.alerce.com) Received: (from hartzell@localhost) by rosebud.alerce.com (8.12.9p2/8.12.9/Submit) id i4JGeeUh003044; Wed, 19 May 2004 09:40:40 -0700 (PDT) (envelope-from hartzell) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16555.36360.340284.245230@rosebud.alerce.com> Date: Wed, 19 May 2004 09:40:40 -0700 To: db In-Reply-To: <200405191241.50871.db@traceroute.dk> References: <200405191241.50871.db@traceroute.dk> X-Mailer: VM 7.14 under 21.4 (patch 14) "Reasonable Discussion" XEmacs Lucid X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: hackers@freebsd.org Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hartzell@kestrel.alerce.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 16:40:51 -0000 db writes: > Hi all > > I'm trying to get grub working on my FreeBSD 4.9 test-box. > [...] Here's a description of how I did it, from the freebsd-current list in late Februrary 2003. It was part of an ongoing thread that you might find useful. g. George Hartzell writes: > Andrew Boothman writes: > > [...] > > OK Guys, I think I'm still a little confused here. > > > > I've just had a few botched installs of GRUB so I think I need a little more > > direction, if you could :) > > > > I've got GRUB on a floppy and it boots fine. If I type : > > rootnoverify (hd0,0) > > makeactive > > chainloader +1 > > boot > > > > I get Win2k booted no problem! > > > > So, following the instructions in the Grub Manual, I typed > > root(fd0) > > setup(hd0) > > > > I remove the floppy from the drive and reboot > > > > On boot I get "Loading GRUB... Please Wait..." but after that I get "GRUB > > Error 17" which according to the manual means that GRUB doesn't know how to > > load the selected partition. Even though when I boot from the floppy it > > starts no problem and I can type commands to get it to boot Win2k.... > > That told it to install GRUB into the beginning of (hd0) [e.g. the > Master Boot record], but configured it to use (fd0) as the root of the > place to find stuff. Since the floppy wasn't in when you booted, it > didn't do anything useful. > > There are some grub things that need to be on the disk that you give > the "root" designation too, e.g. "stage1", etc... > > I don't know how/where to install those files into an NTFS partition, > I assume that GRUB can read NTFS filesystems, and you could tuck them > there, but I don't know for sure. > > Here's what I'd do. > > Get yourself booted into freebsd any way that you can. > > PRINT OUT THE INFORMATION ABOUT YOUR BIOS PARTITION TABLE AND YOUR > FREEBSD DISKLABEL, AND SAVE IT. "fdisk -s" and "disklabel -r > diskname" are your friends!!!! > > Build grub from the ports tree and install it. It installs all of the > juicy bits into some directory in > /usr/local/share/grub/i386-freebsd/..., which doesn't seem to be a > place where grub can find it. I make a directory called /boot/grub > and copy all of them there. > > Start grub (e.g. boot from your grub floppy). Under the 5.0 systems, > GEOM is picky about letting you doink with disks that you have > mounted, so you either need the "let me shoot myself in the foot > sysctl patch > (ftp://ftp.jurai.net/users/winter/patches/geom-foot.patch) or boot > from something else (e.g. floppy, live cdrom, ...) > > Make sure that grub can see it's various interesting bits: > > grub> find /boot/grub/stage1 > > and it should say: > > (hd0,1,a) > > assuming that you have Something Else (e.g. windows) in the first > primary BIOS partition/slice, a set of FreeBSD slices in the second > primary BIOS partition/slice, and the /boot/grub stuff is in the first > ("a") BSD_DISKLABEL/slice. > > If you have the grub bits living in a Linux filesystem in the third > primary BIOS partition, it'd say (hd0,2). If you had them in a Linux > filesystem living in the first extended partition, it'd say (hd0,4), > etc.... > > That's the drive that you want to declare as your root, which just > configures the low level grub code that "setup" installs so that it > knows where to look for it's various useful bits. > > e.g. > > grub> root (hd0,1,a) > > Then you need to install grub onto somewhere where the computer will > trip over it and boot it. > > One possibility is to install it into the master boot record, which > would be: > > grub> setup (hd0) > > Here you boot process would be > > power on->bios->load the MBR which is really GRUB->grub loads its stage1,... > > Or you could leave a "normal" MBR at the beginning of the disk and > install GRUB into the beginning of the FreeBSD BIOS partition > (assuming that FreeBSD is in the second primary parition): > > grub> setup (hd0,1) > > If that's all that you do, thing's won't quite boot. You'll need to > also mark that partition active, so that the stock MBR code will jump > to it. I always do that by getting to this point, booting by hook or > by crook (e.g. a grub boot floppy, a bootable freebsd CD, a bootable > linux CD) and using some utility (e.g. partition magic from windows, > fdisk from windows, fdisk from freebsd, fdisk or cfdisk from linux) to > mark the partition active. I prefer partition magic because I believe > that it has the most robust partition table integrity checks, but > whatever you trust.... > > Now, your boot process will look like: > > power on->bios->"real" MBR which jumps to the active parition -> (next line) > > ... -> GRUB at the beginning of active partition -> GRUB stage1,... > > When grub get's up and running, it'll look for a file called menu.lst > (unless you override the name when you "setup") which contains the > info for the boot menu. Here's mine (notice that there are a bunch of > mutually exclusive things that I've tucked into the 3rd BIOS partition > at various times and I just keep the info around for reference. As > long as I don't actually choose any of the "wrong" selections, there's > no trouble. > > default=0 > timeout=10 > title FreeBSD 4.7 > root (hd0,1,a) > kernel /boot/loader > title FreeBSD 5.0 > root (hd0,2,a) > kernel /boot/loader > title Redhat Linux 8.0 > root (hd0,2) > kernel /boot/vmlinuz-2.4.18-14 ro root=/dev/hda3 > initrd /boot/initrd-2.4.18-14.img > title Redhat Linux 8.0 (hires) > root (hd0,2) > kernel /boot/vmlinuz-2.4.18-14 ro root=/dev/hda3 vga=791 > initrd /boot/initrd-2.4.18-14.img > title Windows 2000 > rootnoverify (hd0,0) > chainloader +1 > > > I then used "fdisk /mbr" on a Windows 98 boot disk to remove GRUB and get me > > back to a normal Win2k boot. But that doesn't help me get FreeBSD dual > > booting..... > > > > Can you offer any insight into how to make this work? I remember using GRUB > > before and being very happy with it, but it was installed for me by > > RedHat.... > > *REMEMBER* > > run an "fdisk -s" and print out the output > run and "disklabel -r ad0" (or whatever device) and print out the info. > > BEFORE you start playing around!!!! > > g. > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 11:15:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43F0C16A4CE for ; Wed, 19 May 2004 11:15:11 -0700 (PDT) Received: from postman.ripe.net (postman.ripe.net [193.0.0.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id A906043D45 for ; Wed, 19 May 2004 11:15:10 -0700 (PDT) (envelope-from marks@dell-laptop.6bone.nl) Received: by postman.ripe.net (Postfix, from userid 8) id 0221C55C34; Wed, 19 May 2004 20:15:06 +0200 (CEST) Received: from birch.ripe.net (birch.ripe.net [193.0.1.96]) by postman.ripe.net (Postfix) with ESMTP id AB38B4EE5F; Wed, 19 May 2004 20:15:05 +0200 (CEST) Received: from dell-laptop.6bone.nl (cow.ripe.net [193.0.1.239]) by birch.ripe.net (8.12.10/8.11.6) with SMTP id i4JIF5lT030876; Wed, 19 May 2004 20:15:05 +0200 Received: (nullmailer pid 1651 invoked by uid 1001); Wed, 19 May 2004 17:18:40 -0000 Date: Wed, 19 May 2004 19:18:40 +0200 From: Mark Santcroos To: Nick Strebkov Message-ID: <20040519171840.GA1571@laptop.6bone.nl> References: <20040519133442.GA90053@nord.interexc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040519133442.GA90053@nord.interexc.com> User-Agent: Mutt/1.4.2.1i X-Handles: MS6-6BONE, MS18417-RIPE X-RIPE-Spam-Level: X-RIPE-Spam-Status: N 0.009680 / 0.0 / 0.0 / disabled X-RIPE-Signature: ca93305f5935960a47a848715dc79a23 cc: hackers@freebsd.org Subject: Re: obtaining a kernel crash dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 18:15:11 -0000 On Wed, May 19, 2004 at 04:34:42PM +0300, Nick Strebkov wrote: > I can't obtain a crash dump. Can you, on a clean -current, break into DDB and force a panic by simply typing "panic" ? Please report whether the kernel dumps core in this case. Some systems have problems with ATA that prevents them from dumping. Mark From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 15:29:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5355116A4CE; Wed, 19 May 2004 15:29:20 -0700 (PDT) Received: from wattres.Watt.COM (wattres.watt.com [66.93.133.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 104D043D58; Wed, 19 May 2004 15:29:19 -0700 (PDT) (envelope-from steve@Watt.COM) Received: (from steve@localhost) by wattres.Watt.COM (8.12.11/8.12.11) id i4JMT95J087312; Wed, 19 May 2004 15:29:09 -0700 (PDT) (envelope-from steve) Message-Id: <200405192229.i4JMT95J087312@wattres.Watt.COM> X-Newsgroups: local.freebsd-hackers In-Reply-To: <20040519143453.GZ845@darkness.comp.waw.pl> References: <20040519122907.GO81341@elvis.mu.org> Organization: Watt Consultants, San Jose, CA, USA From: steve@Watt.COM (Steve Watt) Date: Wed, 19 May 2004 15:29:09 -0700 X-Mailer: Mail User's Shell (7.2.6 beta(5) jp(8) 11/23/00) To: pjd@freebsd.org cc: hackers@freebsd.org Subject: Re: api for sharing memory from kernel to userspace? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 22:29:20 -0000 In article <20040519143453.GZ845@darkness.comp.waw.pl> you write: > >On Wed, May 19, 2004 at 05:29:07AM -0700, Alfred Perlstein wrote: >+> I need to share about 100megs of memory between kernel and userspace. >+> >+> The memory can not be paged and should appear contig in the process's >+> address space. Any suggestions? >+> >+> I need a way to either: >+> map user memory into the kernel's address space. >+> map kernel memory into the user's address space. >+> >+> I was looking at pmap_qenter() but it didn't see attractive because >+> it's for "short term mappings", this mapping will exist for quite a >+> while. > >In mapping kernel memory into user's address space I am interested as well >for GEOM Gate and other evil projects. The way we accomplished this in some other operating system was to create a shared memory segment with an implementation-reserved name, and then have the application shm_open the name and mmap it in. Shouldn't be hard with a device driver. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9" Internet: steve @ Watt.COM Whois: SW32 Free time? There's no such thing. It just comes in varying prices... From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 15:54:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA86716A4CE for ; Wed, 19 May 2004 15:54:08 -0700 (PDT) Received: from hourri.hittite.isp.9tel.net (hourri.hittite.isp.9tel.net [62.62.156.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F77643D2D for ; Wed, 19 May 2004 15:54:08 -0700 (PDT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (115-120-118-80.kaptech.net [80.118.120.115]) by hourri.hittite.isp.9tel.net (Postfix) with SMTP id 8D30A15794F; Thu, 20 May 2004 01:29:58 +0200 (CEST) Message-ID: <025901c43df4$272f43a0$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: "Steven Hartland" , "db" , References: <200405191241.50871.db@traceroute.dk> <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> <01d401c43db6$077fba50$7890a8c0@dyndns.org> <018901c43db7$63a4f100$b3db87d4@multiplay.co.uk> Date: Thu, 20 May 2004 00:51:02 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 22:54:08 -0000 "Steven Hartland" wrote: > Just plain doesn't work here moans that it cant mount the FS > where as chainloader works fine. do you add ",a" in "root (hd0,0,a)" ? Cyrille Lefevre. -- mailto:clefevre-lists@9online.fr From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 17:11:15 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 816B016A4CE for ; Wed, 19 May 2004 17:11:15 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id D35A943D2F for ; Wed, 19 May 2004 17:11:14 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000221158.msg for ; Thu, 20 May 2004 01:01:48 +0100 Message-ID: <002e01c43dfd$df971fe0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Cyrille Lefevre" , "db" , References: <200405191241.50871.db@traceroute.dk> <008401c43d8e$1da1a640$b3db87d4@multiplay.co.uk> <01d401c43db6$077fba50$7890a8c0@dyndns.org> <018901c43db7$63a4f100$b3db87d4@multiplay.co.uk> <025901c43df4$272f43a0$7890a8c0@dyndns.org> Date: Thu, 20 May 2004 01:03:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Thu, 20 May 2004 01:01:48 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Thu, 20 May 2004 01:01:50 +0100 Subject: Re: Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 00:11:15 -0000 Tried that tried root (sd0,0) root (sd0,0,a) in both cases it finds the partition even knows the type then fails to mount it. Its not a worry for me though as the chainloader works just fine. Thanks for asking though. Steve ----- Original Message ----- From: "Cyrille Lefevre" > do you add ",a" in "root (hd0,0,a)" ? ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 03:17:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3344B16A4CE; Thu, 20 May 2004 03:17:32 -0700 (PDT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0107043D1F; Thu, 20 May 2004 03:17:32 -0700 (PDT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id DA4D6653DF; Thu, 20 May 2004 11:17:22 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 99984-05-6; Thu, 20 May 2004 11:17:22 +0100 (BST) Received: from empiric.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 1956B653D2; Thu, 20 May 2004 11:17:22 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 5A2E2612E; Thu, 20 May 2004 11:17:21 +0100 (BST) Date: Thu, 20 May 2004 11:17:21 +0100 From: Bruce M Simpson To: Steve Watt Message-ID: <20040520101721.GB30196@empiric.dek.spc.org> References: <20040519122907.GO81341@elvis.mu.org> <200405192229.i4JMT95J087312@wattres.Watt.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405192229.i4JMT95J087312@wattres.Watt.COM> cc: hackers@freebsd.org cc: pjd@freebsd.org Subject: Re: api for sharing memory from kernel to userspace? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 10:17:32 -0000 On Wed, May 19, 2004 at 03:29:09PM -0700, Steve Watt wrote: > >On Wed, May 19, 2004 at 05:29:07AM -0700, Alfred Perlstein wrote: > >+> I need to share about 100megs of memory between kernel and userspace. > >+> > >+> The memory can not be paged and should appear contig in the process's > >+> address space. Any suggestions? > >+> > > The way we accomplished this in some other operating system was to > create a shared memory segment with an implementation-reserved > name, and then have the application shm_open the name and mmap it in. > > Shouldn't be hard with a device driver. This sounds like the way to go. The way I achieved this with a PCMCIA memory card was to kmem_alloc_nofault() a range and then pmap_map() it, then handle mmap() as per the regular character device case. Do bear in mind that 100 megs is quite large in relative terms, so it's possible that kmem_alloc_nofault() would fail. Regards, BMS From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 08:13:52 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E07C516A4CE for ; Wed, 19 May 2004 08:13:52 -0700 (PDT) Received: from starling.mail.pas.earthlink.net (starling.mail.pas.earthlink.net [207.217.120.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB5F243D1D for ; Wed, 19 May 2004 08:13:52 -0700 (PDT) (envelope-from welchsm@earthlink.net) Received: from c-66-41-232-103.mn.client2.attbi.com ([66.41.232.103] helo=NitroPhys.welchsmnet.net) by starling.mail.pas.earthlink.net with asmtp (TLSv1:AES256-SHA:256) (Exim 3.36 #4) id 1BQSl2-0003eY-00; Wed, 19 May 2004 08:13:40 -0700 Received: from NitroPhys.welchsmnet.net (localhost [127.0.0.1]) i4JFBhuS004289; Wed, 19 May 2004 10:12:04 -0500 (CDT) (envelope-from welchsm@localhost.welchsmnet.net) Received: (from welchsm@localhost)i4JFBLK0004287; Wed, 19 May 2004 10:11:22 -0500 (CDT) (envelope-from welchsm) Date: Wed, 19 May 2004 10:11:21 -0500 From: Sean Welch To: db@traceroute.dk Message-ID: <20040519151121.GA4157@NitroPhys.welchsmnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-ELNK-Trace: 15d86f98c8ef8acad780f4a490ca69564776905774d2ac4b2e75ec1950d82943a70591279ec30b28350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Mailman-Approved-At: Thu, 20 May 2004 04:54:24 -0700 cc: hackers@freebsd.org Subject: Re:Grub and FreeBSD 4.9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Sean_Welch@alum.wofford.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 15:13:53 -0000 I think you are making things too difficult for yourself. I've been using grub since it first appeared in the ports tree and the procedure is relatively simple compared to what you've been trying to do. The latest version also supports ufs2 quite nicely. Here is what my menu.lst looks like: timeout 5 default 4 password --md5 ************************************************** title Windows ME lock rootnoverify (hd0,0) chainloader +1 title S2D resume lock rootnoverify (hd0,1) chainloader +1 title FreeBSD 5.2-Current root (hd0,2,a) kernel /boot/loader title FreeBSD 4.9-Release root (hd0,3,a) kernel /boot/loader title FreeBSD 5.2.1-Release (default) root (hd0,3,d) kernel /boot/loader (I have obviously replaced the password listing for security.) The trick is that after you install grub via the port you must copy the correct supporting pieces to /boot/grub from /usr/local/share/grub/i386-freebsd/ directory. Namely: ffs_stage1_5 stage1 stage2 You also need a device.map file (because grub expects linux terminology). Mine contains the following: (fd0) /dev/fd0 (hd0) /dev/ad0 Once you have also placed your menu.lst file there you can follow the directions found in `info grub` to get it installed to the disk. To give a short tutorial, here is what a session looks like for me: NitroPhys# grub Probing devices to guess BIOS drives. This may take a long time. GNU GRUB version 0.94 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grub> find /boot/grub/stage1 (hd0,3,a) (hd0,3,d) grub> root (hd0,3,d) Filesystem type is ffs, partition type 0xa5 grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/ffs_stage1_5" exists... yes Running "embed /boot/grub/ffs_stage1_5 (hd0)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,3,d)/boot/grub/stage 2 /boot/grub/menu.lst"... succeeded Done. grub> quit NitroPhys# That should get you going without any fooling around with floppies and such. Let me know if you still can't get it working properly. Sean From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 14:13:49 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC74516A4CE for ; Wed, 19 May 2004 14:13:49 -0700 (PDT) Received: from asarian-host.net (mail.asarian-host.net [194.109.160.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C99643D2F for ; Wed, 19 May 2004 14:13:49 -0700 (PDT) SRS0=KJZjZPG8=IN=asarian-host.net=admin@asarian-host.net) Comments: To protect the identity of the sender, certain header fields are either not shown, or masked. Anonymous email accounts can be requested by filling in the appropriate form at: https://asarian-host.net/cgi-bin/signup.cgi Received: (from root@localhost) by mail.asarian-host.net (8.12.11/8.12.11) id i4JLDNP4003842 for freebsd-hackers@freebsd.org; Wed, 19 May 2004 23:13:23 +0200 (CEST) (envelope-from admin@asarian-host.net) From: Mark Received-SPF: pass (asarian-host.net: domain of admin@asarian-host.net designates sender IP as SASL permitted sender) Message-Id: <200405192113.I4JLDLWG003825@asarian-host.net> Date: Wed, 19 May 2004 21:13:23 GMT X-Authenticated-Sender: admin@asarian-host.net X-Trace: 2m9C5VtGmYrRdOOvohf5cFk5Ugz/mkigkpMyZmKRoZK3iiAI7SbALp3A9XirLRetfiS22tMfriuE2+vF+8UlSA== X-Complaints-To: abuse@asarian-host.net X-Abuse-Info: Please be sure to forward a copy of ALL headers, otherwise we are unable to process your complaint Organization: Asarian-host To: MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Auth: Asarian-host PGP signature iQEVAwUAQKvN8zFqW1BleBN9AQFWYAf+Mo9voENNFd/ZZtmny72RGKehy9yCUtQW q/70lkuOScBS9nLiv9HyaQXbGH9GjmnwRFb5Qe0PTmBNva2KbJcXEeQhi5rK5s2B 4gup1WJLxGhjXE84WM8dS0DD7PtjwSGUDG3xhP/ktOniyCrw4O4M9QKVfiZLbd7k cXtLeoPDnW+QIQF6D7wVUAPcRGsUTncDRI1U+EwrbiKOo3q9oiR0jnoB0LN+UDlb 7D8Q3fItDsPvoKxqzYQXv4+MPIiHGw9vYaMwo9PeX0lRQE8bQ84iZXlrq1NuvQk3 A0+LprMIW0cPnedlUMDwYQFfHz2tpobhAzNuxfm18ZaDi++l77Fhgw== =VrKq X-Mailman-Approved-At: Thu, 20 May 2004 04:54:24 -0700 Subject: Re: third IDE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 21:13:50 -0000 Ok, I bought the Promise Ultra133, and now FreeBSD (4.9R) recognized my = third IDE port: ATA channel 2: Master: ad4 ATA/ATAPI rev 7 Slave: no device present But I cannot mount it! "mount /dev/ad4s1a /backup" says: "mount: /dev/ad4s1a: No such file or directory" And /dev/ad4 does not exist in /dev/. How do I create it?? Thanks,=20 - Mark From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 05:54:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB5B816A4CE for ; Thu, 20 May 2004 05:54:58 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9507E43D39 for ; Thu, 20 May 2004 05:54:58 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i4KCscqM018314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 May 2004 08:54:38 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i4KCsXHY028128; Thu, 20 May 2004 08:54:33 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16556.43657.379465.516798@grasshopper.cs.duke.edu> Date: Thu, 20 May 2004 08:54:33 -0400 (EDT) To: Bruce M Simpson In-Reply-To: <20040520101721.GB30196@empiric.dek.spc.org> References: <20040519122907.GO81341@elvis.mu.org> <200405192229.i4JMT95J087312@wattres.Watt.COM> <20040520101721.GB30196@empiric.dek.spc.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: hackers@freebsd.org Subject: Re: api for sharing memory from kernel to userspace? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 12:54:59 -0000 Bruce M Simpson writes: > On Wed, May 19, 2004 at 03:29:09PM -0700, Steve Watt wrote: > > >On Wed, May 19, 2004 at 05:29:07AM -0700, Alfred Perlstein wrote: > > >+> I need to share about 100megs of memory between kernel and userspace. > > >+> > > >+> The memory can not be paged and should appear contig in the process's > > >+> address space. Any suggestions? > > >+> > > > > The way we accomplished this in some other operating system was to > > create a shared memory segment with an implementation-reserved > > name, and then have the application shm_open the name and mmap it in. > > > > Shouldn't be hard with a device driver. > > This sounds like the way to go. > > The way I achieved this with a PCMCIA memory card was to kmem_alloc_nofault() > a range and then pmap_map() it, then handle mmap() as per the regular > character device case. Why not simply use malloc(9) to allocate the memory and then mmap() it out via a normal character driver's mmap() routine? > Do bear in mind that 100 megs is quite large in relative terms, so it's > possible that kmem_alloc_nofault() would fail. Speaking of this, is there any method that a driver can use to allocate unmapped physical memory in the kernel? For a variety of reasons, I need to allocate this memory in the kernel and mmap() it out. It can not be paged out, and there can be a lot of it. I'm currently using malloc(9), but I run into kmem size limits, and pmap 4MB page bugs on x86. I was thinking about just using vm_page_alloc(..,VM_ALLOC_NOOBJ) and mmap'ing out the memory. Would that work? Or could it still be paged? Drew From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 06:00:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5742B16A4CE for ; Thu, 20 May 2004 06:00:07 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1360E43D3F for ; Thu, 20 May 2004 06:00:07 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i4KD04qM018895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 May 2004 09:00:04 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i4KCxwtM028135; Thu, 20 May 2004 08:59:58 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16556.43982.226708.375607@grasshopper.cs.duke.edu> Date: Thu, 20 May 2004 08:59:58 -0400 (EDT) To: Nick Strebkov In-Reply-To: <20040519133442.GA90053@nord.interexc.com> References: <20040519133442.GA90053@nord.interexc.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: hackers@freebsd.org Subject: Re: obtaining a kernel crash dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 13:00:07 -0000 Nick Strebkov writes: > May 19 16:17:00 devel /kernel: > May 19 16:17:00 devel /kernel: syncing disks... 60 3 2 > > [dd boot kernel messages] Try disabling sync-on-panic. It almost always causes problems for me when trying to get dumps. % cat /etc/sysctl.conf kern.sync_on_panic=0 If you are running a newer version of FreeBSD with the DDB_TRACE options, you want to enable DDB and DDB_TRACE. This will get you a stack trace on console, which is a heck of a lot better than nothing if your crashdumps don't work. options DDB #Enable the kernel debugger options DDB_TRACE Sometimes I have problems getting a dump on 5.x if I've dropped into ddb, so I use the following to prevent the system from dropping to a DDB prompt at panic: options DDB_UNATTENDED Drew From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 07:47:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A68B716A4CE for ; Thu, 20 May 2004 07:47:24 -0700 (PDT) Received: from temp.interexc.com (temp.interexc.com [193.108.123.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EC5D43D3F for ; Thu, 20 May 2004 07:47:23 -0700 (PDT) (envelope-from nick@temp.interexc.com) Received: from temp.interexc.com (localhost [127.0.0.1]) by temp.interexc.com (8.12.10/8.12.10) with ESMTP id i4JF4Vb1004192; Wed, 19 May 2004 18:04:31 +0300 (EEST) (envelope-from nick@temp.interexc.com) Received: (from nick@localhost) by temp.interexc.com (8.12.10/8.12.10/Submit) id i4JF4VQ0004191; Wed, 19 May 2004 18:04:31 +0300 (EEST) (envelope-from nick) Date: Wed, 19 May 2004 18:04:31 +0300 From: Nick Strebkov To: Peter Pentchev Message-ID: <20040519145945.GA3821@temp.interexc.com> References: <20040519133442.GA90053@nord.interexc.com> <20040519142004.GA5125@straylight.m.ringlet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-u Content-Disposition: inline In-Reply-To: <20040519142004.GA5125@straylight.m.ringlet.net> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 5.2.1-RELEASE-p6 X-Real-Name: =?koi8-u?B?89TSxcLLz9cgSMnLz8zByiDhzsHU?= =?koi8-u?B?z8zYxdfJ3g==?= cc: hackers@freebsd.org Subject: Re: obtaining a kernel crash dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 14:47:24 -0000 On Wed, May 19, 2004 at 05:20:04PM +0300, Peter Pentchev wrote: > On Wed, May 19, 2004 at 04:34:42PM +0300, Nick Strebkov wrote: > > Hi there. > > > > I can't obtain a crash dump. > > > > % cat /sys/i386/conf/DEVEL | grep makeoptions > > makeoptions DEBUG=-g > > % cat /etc/rc.conf| grep dump > > dumpdev="/dev/ar0s1b" > > dumpdir="/var/crash" > > > > I'm testing my kernel patch and the following is what I see in > > /var/log/messages: > > Can you force the kernel to dump by using DDB? Place 'options DDB' in > your kernel config, then, when the system is quiescent, hit Ctrl-Alt-Esc > and type 'panic' at the DDB prompt. > > If this works, and you get a crash dump, then the problem might be that > with your kernel patch, the kernel is panicking in a low-level layer, > like memory management or disk drivers or something like that, and it > simply cannot make a crash dump, since that would mean invoking code > that depends on bad data or something. Thanks a lot. I'll try. I modify the ip_input.c in the manner like IPFW do. -- Nick Strebkov Public key: http://humgat.org/~nick/pubkey.txt fpr: 552C 88D6 895B 6E64 F277 D367 8A70 8132 47F5 C1B6 From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 08:28:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47F1316A4CE for ; Thu, 20 May 2004 08:28:27 -0700 (PDT) Received: from web50901.mail.yahoo.com (web50901.mail.yahoo.com [206.190.38.121]) by mx1.FreeBSD.org (Postfix) with SMTP id D16BF43D2D for ; Thu, 20 May 2004 08:28:26 -0700 (PDT) (envelope-from b_oshea@yahoo.com) Message-ID: <20040520152810.72336.qmail@web50901.mail.yahoo.com> Received: from [24.6.40.205] by web50901.mail.yahoo.com via HTTP; Thu, 20 May 2004 08:28:10 PDT Date: Thu, 20 May 2004 08:28:10 -0700 (PDT) From: Brian O'Shea To: Mark In-Reply-To: <200405192113.I4JLDLWG003825@asarian-host.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: Hackers FreeBSD Subject: Re: third IDE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 15:28:27 -0000 Hello Mark, Use the MAKEDEV script in /dev . Unfortunately I don't have a 4.x system available to look up the arguments for you, and it has been removed from 5.x since devfs became mandatory. But the man page for MAKEDEV(8) on a 4.x system should help. Cheers, -brian --- Mark wrote: > Ok, I bought the Promise Ultra133, and now FreeBSD (4.9R) recognized my third > IDE port: > > ATA channel 2: > Master: ad4 ATA/ATAPI rev 7 > Slave: no device present > > But I cannot mount it! "mount /dev/ad4s1a /backup" says: > > "mount: /dev/ad4s1a: No such file or directory" > > And /dev/ad4 does not exist in /dev/. How do I create it?? > > Thanks, > > - Mark > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" __________________________________ Do you Yahoo!? Yahoo! Domains – Claim yours for only $14.70/year http://smallbusiness.promotions.yahoo.com/offer From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 12:40:30 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E200D16A4CE for ; Thu, 20 May 2004 12:40:29 -0700 (PDT) Received: from seven.Alameda.net (seven.alameda.net [64.81.53.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id A914743D1D for ; Thu, 20 May 2004 12:40:27 -0700 (PDT) (envelope-from ulf@Alameda.net) Received: by seven.Alameda.net (Postfix, from userid 1000) id 78CFB3A201; Thu, 20 May 2004 12:40:27 -0700 (PDT) Date: Thu, 20 May 2004 12:40:27 -0700 From: Ulf Zimmermann To: hackers@FreeBSD.org Message-ID: <20040520194027.GH58545@seven.alameda.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Organization: Alameda Networks, Inc. X-Operating-System: FreeBSD 4.8-RELEASE-p5 Subject: Problem with a 5.2.1 system and downloading X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ulf@Alameda.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 19:40:30 -0000 I got in my office two machines. One works fine, the other doesn't. Office has a Netscreen-10 as firewall which connects then to a Cisco with a T1 Frame Relay to the Internet. One machine is 4.9-REL and it works like a charm. The other is a 5.2.1-REL (cvsup'ed to latest today). It has a single CPU, PAE kernel (6GB memory). This 5 machine hangs often at different spots during fetch for ports. Today I captured the tcp connections and here is what it shows: Initial TCP setup: 12:26:25.895246 10.1.42.42.49190 > 128.125.253.59.80: S 3565497776:3565497776(0) win 65535 (DF) 12:26:25.919572 128.125.253.59.80 > 10.1.42.42.49190: S 1889662716:1889662716(0) ack 3565497777 win 5840 (DF) 12:26:25.919592 10.1.42.42.49190 > 128.125.253.59.80: . ack 1 win 32850 (DF) Now follows the HTTP request to download a file (part of linux_base-8 in this case) ... Here are the last 4 packets back and forth going correctly: 12:26:29.052678 128.125.253.59.80 > 10.1.42.42.49190: . 487518:488978(1460) ack 194 win 5840 (DF) 12:26:29.052689 10.1.42.42.49190 > 128.125.253.59.80: . ack 424738 win 32850 (DF) 12:26:29.060577 128.125.253.59.80 > 10.1.42.42.49190: . 488978:490438(1460) ack 194 win 5840 (DF) 12:26:29.060589 10.1.42.42.49190 > 128.125.253.59.80: . ack 424738 win 32850 (DF) And now the last data packet comes in: 12:26:29.069061 128.125.253.59.80 > 10.1.42.42.49190: . 424738:426198(1460) ack 194 win 5840 (DF) And now look at the ack: 12:26:29.069087 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 0 (DF) 12:26:29.069250 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 1790 (DF) 12:26:29.069342 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 3326 (DF) 12:26:29.069461 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 4862 (DF) 12:26:29.069491 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 6398 (DF) 12:26:29.069530 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 7934 (DF) 12:26:29.069559 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 9470 (DF) 12:26:29.069585 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 11006 (DF) 12:26:29.069689 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 12542 (DF) 12:26:29.069719 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 14078 (DF) 12:26:29.069748 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 15614 (DF) 12:26:29.069772 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 17150 (DF) 12:26:29.069809 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 18686 (DF) 12:26:29.069878 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 20222 (DF) 12:26:29.069907 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 21758 (DF) 12:26:29.069932 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 23294 (DF) 12:26:29.069970 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 24830 (DF) 12:26:29.069999 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 26366 (DF) 12:26:29.070064 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 27902 (DF) 12:26:29.070092 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 29438 (DF) 12:26:29.070127 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 30974 (DF) 12:26:29.070155 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 32510 (DF) 35 seconds later I press CTRL-C: 12:27:04.113639 10.1.42.42.49190 > 128.125.253.59.80: F 194:194(0) ack 490438 win 32850 (DF) 12:27:04.353830 10.1.42.42.49190 > 128.125.253.59.80: F 194:194(0) ack 490438 win 32850 (DF) 12:27:04.653851 10.1.42.42.49190 > 128.125.253.59.80: F 194:194(0) ack 490438 win 32850 (DF) ... So does this look normal to anyone ? -- Regards, Ulf. --------------------------------------------------------------------- Ulf Zimmermann, 1525 Pacific Ave., Alameda, CA-94501, #: 510-865-0204 You can find my resume at: http://seven.Alameda.net/~ulf/resume.html From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 12:54:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06E4316A4CE for ; Thu, 20 May 2004 12:54:56 -0700 (PDT) Received: from postfix3-2.free.fr (postfix3-2.free.fr [213.228.0.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9446C43D1D for ; Thu, 20 May 2004 12:54:55 -0700 (PDT) (envelope-from jose-marcio.martins@ensmp.fr) Received: from ensmp.fr (alesia-10-82-226-38-60.fbx.proxad.net [82.226.38.60]) by postfix3-2.free.fr (Postfix) with ESMTP id BB2F4C1CB for ; Thu, 20 May 2004 21:54:44 +0200 (CEST) Message-ID: <40AD0C95.9080904@ensmp.fr> Date: Thu, 20 May 2004 21:52:53 +0200 From: "Jose-Marcio.Martins@ensmp.fr" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: A problem with poll X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jose-Marcio.Martins@ensmp.fr List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 19:54:56 -0000 Hello, I'm using a pipe to communicate between threads in the same process. In fact, I've a thread waiting (using poll) for data available on some set of file descriptors. From time to time I need to interrupt the poll call in order to add a new file descriptor. I do this with the pipe. I add p[0] to the poll set and I write to p[1] when I want to interrupt the poll call. The problem is that poll returns as expected, but the read on the file descriptor blocks. Before the poll call, I set events flags to POLLIN | POLLPRI. When poll returns, events is set to POLLIN [ POLLPRI, and revents is 0. Value returned by poll is the good number of file descriptors ready. What I'm doing wrong ? Thanks for your help Joe -- --------------------------------------------------------------- Jose Marcio MARTINS DA CRUZ Tel. :(33) 01.40.51.93.41 Ecole des Mines de Paris http://j-chkmail.ensmp.fr 60, bd Saint Michel http://www.ensmp.fr/~martins 75272 - PARIS CEDEX 06 mailto:Jose-Marcio.Martins@ensmp.fr From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 12:59:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54FA016A4CE for ; Thu, 20 May 2004 12:59:35 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA4E243D4C for ; Thu, 20 May 2004 12:59:34 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i4KJxOI1014957; Thu, 20 May 2004 14:59:24 -0500 (CDT) (envelope-from dan) Date: Thu, 20 May 2004 14:59:24 -0500 From: Dan Nelson To: Ulf Zimmermann Message-ID: <20040520195924.GB19455@dan.emsphone.com> References: <20040520194027.GH58545@seven.alameda.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040520194027.GH58545@seven.alameda.net> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org Subject: Re: Problem with a 5.2.1 system and downloading X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 19:59:35 -0000 In the last episode (May 20), Ulf Zimmermann said: > I got in my office two machines. One works fine, the other doesn't. > Office has a Netscreen-10 as firewall which connects then to a Cisco > with a T1 Frame Relay to the Internet. > > One machine is 4.9-REL and it works like a charm. The other is a > 5.2.1-REL (cvsup'ed to latest today). It has a single CPU, PAE kernel > (6GB memory). This 5 machine hangs often at different spots during > fetch for ports. > > Today I captured the tcp connections and here is what it shows: > > Initial TCP setup: > > 12:26:25.895246 10.1.42.42.49190 > 128.125.253.59.80: S 3565497776:3565497776(0) win 65535 (DF) > 12:26:25.919572 128.125.253.59.80 > 10.1.42.42.49190: S 1889662716:1889662716(0) ack 3565497777 win 5840 (DF) > 12:26:25.919592 10.1.42.42.49190 > 128.125.253.59.80: . ack 1 win 32850 (DF) > > Here are the last 4 packets back and forth going correctly: > > 12:26:29.052678 128.125.253.59.80 > 10.1.42.42.49190: . 487518:488978(1460) ack 194 win 5840 (DF) > 12:26:29.052689 10.1.42.42.49190 > 128.125.253.59.80: . ack 424738 win 32850 (DF) > 12:26:29.060577 128.125.253.59.80 > 10.1.42.42.49190: . 488978:490438(1460) ack 194 win 5840 (DF) > 12:26:29.060589 10.1.42.42.49190 > 128.125.253.59.80: . ack 424738 win 32850 (DF) > > And now the last data packet comes in: > > 12:26:29.069061 128.125.253.59.80 > 10.1.42.42.49190: . 424738:426198(1460) ack 194 win 5840 (DF) > > And now look at the ack: > > 12:26:29.069087 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 0 (DF) > 12:26:29.069250 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 1790 (DF) > 12:26:29.069342 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 3326 (DF) Looks reasonable. Note the last two acks you pasted were acking data pretty early in the window. The remote end finally resends that packet, and your server bumps the ack point up to the last byte it received. The client process hasn't had a change to empty the socket buffer yet, though, so the window slams shut. > 12:26:29.069461 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 4862 (DF) ... > 12:26:29.070155 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 32510 (DF) The client process has read all its data and the window opens up. The server isn't sending any more packets for some reason, though. > So does this look normal to anyone ? Your end looks fine. Once your system started sending acks with a nonzero window, the remote end should have started sending more data. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 13:18:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EEA7F16A4CE for ; Thu, 20 May 2004 13:18:03 -0700 (PDT) Received: from seven.Alameda.net (seven.alameda.net [64.81.53.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E23043D2D for ; Thu, 20 May 2004 13:18:03 -0700 (PDT) (envelope-from ulf@Alameda.net) Received: by seven.Alameda.net (Postfix, from userid 1000) id 4940A3A207; Thu, 20 May 2004 13:18:03 -0700 (PDT) Date: Thu, 20 May 2004 13:18:03 -0700 From: Ulf Zimmermann To: Dan Nelson Message-ID: <20040520201802.GJ58545@seven.alameda.net> References: <20040520194027.GH58545@seven.alameda.net> <20040520195924.GB19455@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040520195924.GB19455@dan.emsphone.com> User-Agent: Mutt/1.4.1i Organization: Alameda Networks, Inc. X-Operating-System: FreeBSD 4.8-RELEASE-p5 cc: hackers@freebsd.org cc: Ulf Zimmermann Subject: Re: Problem with a 5.2.1 system and downloading X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ulf@Alameda.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 20:18:04 -0000 On Thu, May 20, 2004 at 02:59:24PM -0500, Dan Nelson wrote: > In the last episode (May 20), Ulf Zimmermann said: > > I got in my office two machines. One works fine, the other doesn't. > > Office has a Netscreen-10 as firewall which connects then to a Cisco > > with a T1 Frame Relay to the Internet. > > > > One machine is 4.9-REL and it works like a charm. The other is a > > 5.2.1-REL (cvsup'ed to latest today). It has a single CPU, PAE kernel > > (6GB memory). This 5 machine hangs often at different spots during > > fetch for ports. > > > > Today I captured the tcp connections and here is what it shows: > > > > Initial TCP setup: > > > > 12:26:25.895246 10.1.42.42.49190 > 128.125.253.59.80: S 3565497776:3565497776(0) win 65535 (DF) > > 12:26:25.919572 128.125.253.59.80 > 10.1.42.42.49190: S 1889662716:1889662716(0) ack 3565497777 win 5840 (DF) > > 12:26:25.919592 10.1.42.42.49190 > 128.125.253.59.80: . ack 1 win 32850 (DF) > > > > Here are the last 4 packets back and forth going correctly: > > > > 12:26:29.052678 128.125.253.59.80 > 10.1.42.42.49190: . 487518:488978(1460) ack 194 win 5840 (DF) > > 12:26:29.052689 10.1.42.42.49190 > 128.125.253.59.80: . ack 424738 win 32850 (DF) > > 12:26:29.060577 128.125.253.59.80 > 10.1.42.42.49190: . 488978:490438(1460) ack 194 win 5840 (DF) > > 12:26:29.060589 10.1.42.42.49190 > 128.125.253.59.80: . ack 424738 win 32850 (DF) > > > > And now the last data packet comes in: > > > > 12:26:29.069061 128.125.253.59.80 > 10.1.42.42.49190: . 424738:426198(1460) ack 194 win 5840 (DF) > > > > And now look at the ack: > > > > 12:26:29.069087 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 0 (DF) > > 12:26:29.069250 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 1790 (DF) > > 12:26:29.069342 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 3326 (DF) > > Looks reasonable. Note the last two acks you pasted were acking data > pretty early in the window. The remote end finally resends that > packet, and your server bumps the ack point up to the last byte it > received. The client process hasn't had a change to empty the socket > buffer yet, though, so the window slams shut. > > > 12:26:29.069461 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 4862 (DF) > ... > > 12:26:29.070155 10.1.42.42.49190 > 128.125.253.59.80: . ack 490438 win 32510 (DF) > > The client process has read all its data and the window opens up. The > server isn't sending any more packets for some reason, though. > > > So does this look normal to anyone ? > > Your end looks fine. Once your system started sending acks with a > nonzero window, the remote end should have started sending more data. > > -- > Dan Nelson > dnelson@allantgroup.com I only got the problems with sites where I go through the netscreen. Fetching the same files via the 4.9 box, everything works. Looking at the full dump, my 5 box never really has to catch up (most of the time its one data packet, one ack), which is why the change from "win 32850" to "win 0" (and then climbing) looks strange to me. -- Regards, Ulf. --------------------------------------------------------------------- Ulf Zimmermann, 1525 Pacific Ave., Alameda, CA-94501, #: 510-865-0204 You can find my resume at: http://seven.Alameda.net/~ulf/resume.html From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 15:58:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E54316A4CE for ; Thu, 20 May 2004 15:58:27 -0700 (PDT) Received: from VARK.homeunix.com (adsl-68-122-7-9.dsl.pltn13.pacbell.net [68.122.7.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 523F043D48 for ; Thu, 20 May 2004 15:58:27 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.10/8.12.10) with ESMTP id i4KMvYAd023894; Thu, 20 May 2004 15:57:34 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.10/8.12.10/Submit) id i4KMvYIa023893; Thu, 20 May 2004 15:57:34 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 20 May 2004 15:57:34 -0700 From: David Schultz To: Tomas Pluskal Message-ID: <20040520225734.GA23802@VARK.homeunix.com> Mail-Followup-To: Tomas Pluskal , hackers@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: hackers@FreeBSD.ORG Subject: Re: copyin() EFAULT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 22:58:27 -0000 On Wed, May 19, 2004, Tomas Pluskal wrote: > I would like to ask you for help or explanation - why do I get EFAULT when > invoking copyin() or fubyte() etc. I am writing a kernel module, and I [...] > So copying of some blocks was OK, and on some blocks it returned EFAULT. > Why? You will get EFAULT when you try to copy pages that are not mapped in the user process. From owner-freebsd-hackers@FreeBSD.ORG Fri May 21 06:58:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AAE016A4CF; Fri, 21 May 2004 06:58:09 -0700 (PDT) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 331EF43D31; Fri, 21 May 2004 06:58:05 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.9p2/8.12.9) with ESMTP id i4LDw03F060447; Fri, 21 May 2004 17:58:00 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.9p2/8.12.9/Submit) id i4LDw04F060442; Fri, 21 May 2004 17:58:00 +0400 (MSD) (envelope-from yar) Date: Fri, 21 May 2004 17:58:00 +0400 From: Yar Tikhiy To: hackers@freebsd.org, net@freebsd.org Message-ID: <20040521135759.GE57132@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: Bugfix for checksum offload in bge(4) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 13:58:09 -0000 Hi folks, While sweeping network interface drivers for incorrect usage of the capabilities framework, I noticed some bugs in bge(4). Unfortunately, I have no such card and I don't know its internals. Therefore I made a patch fixing hw-independent bugs and marking some questionable spots. It would be nice if somebody possessing the knowledge on bge(4) reviewed this patch and used it to really fix the things. If nobody undertakes that, I'll just commit my change since it doesn't seem to affect the functionality while it brings the code into the shape. Thanks! The issues addressed by the patch are as follows: 1. The code responsible for initiating RX csum offload is ifdef'd out with a comment reading there were problems with that. Despite this fact, the RX csum offload is marked as supported and active in the if_cap* fields, and a user is allowed to toggle the bit, which is misleading. 2. The code for RX csum offload should not consult ifp->if_hwassist. The latter field is for informing the TCP/IP stack about available _TX_ offload features. The driver itself should use ifp->if_capenable to see which capabilities are active. 3. Presently bge(4) doesn't advertise its ability to compute the TCP/UDP checksum over a fragmented packet. However, there's code handling this case. Consequently, that code is ineffective. Since I knew nothing about the availability of the feature in bge(4), I just marked the spot with an XXX comment. 4. A network interface driver should keep if_hwassist in sync with if_capenable when the latter is altered through ioctl(); bge(4) fails to do so. -- Yar Index: if_bge.c =================================================================== RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v retrieving revision 1.63 diff -u -p -r1.63 if_bge.c --- if_bge.c 13 Jan 2004 11:31:09 -0000 1.63 +++ if_bge.c 21 May 2004 13:23:36 -0000 @@ -2371,7 +2371,8 @@ bge_attach(dev) ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_maxlen = BGE_TX_RING_CNT - 1; ifp->if_hwassist = BGE_CSUM_FEATURES; - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING | + /* XXX the code for RX csum offload is disabled for now */ + ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; @@ -2722,7 +2723,7 @@ bge_rxeof(sc) m->m_pkthdr.rcvif = ifp; #if 0 /* currently broken for some packets, possibly related to TCP options */ - if (ifp->if_hwassist) { + if (ifp->if_capenable & IFCAP_RXCSUM) { m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED; if ((cur_rx->bge_ip_csum ^ 0xffff) == 0) m->m_pkthdr.csum_flags |= CSUM_IP_VALID; @@ -3136,6 +3137,11 @@ bge_start_locked(ifp) /* * XXX + * The code inside the if() block is never reached since we + * must mark CSUM_IP_FRAGS in our if_hwassist to start getting + * requests to checksum TCP/UDP in a fragmented packet. + * + * XXX * safety overkill. If this is a fragmented packet chain * with delayed TCP/UDP checksums, then only encapsulate * it if we have enough descriptors to handle the entire @@ -3478,11 +3484,13 @@ bge_ioctl(ifp, command, data) break; case SIOCSIFCAP: mask = ifr->ifr_reqcap ^ ifp->if_capenable; - if (mask & IFCAP_HWCSUM) { - if (IFCAP_HWCSUM & ifp->if_capenable) - ifp->if_capenable &= ~IFCAP_HWCSUM; + /* XXX the code for RX csum offload is disabled for now */ + if (mask & IFCAP_TXCSUM) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if (IFCAP_TXCSUM & ifp->if_capenable) + ifp->if_hwassist = BGE_CSUM_FEATURES; else - ifp->if_capenable |= IFCAP_HWCSUM; + ifp->if_hwassist = 0; } error = 0; break; From owner-freebsd-hackers@FreeBSD.ORG Fri May 21 07:26:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAE3C16A4CE; Fri, 21 May 2004 07:26:44 -0700 (PDT) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EC0543D49; Fri, 21 May 2004 07:26:38 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.9p2/8.12.9) with ESMTP id i4LEQT3F062041; Fri, 21 May 2004 18:26:29 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.9p2/8.12.9/Submit) id i4LEQSns062040; Fri, 21 May 2004 18:26:29 +0400 (MSD) (envelope-from yar) Date: Fri, 21 May 2004 18:26:28 +0400 From: Yar Tikhiy To: "George V.Neville-Neil" Message-ID: <20040521142628.GA61458@comp.chem.msu.su> References: <20040521135759.GE57132@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org cc: net@freebsd.org Subject: Re: Bugfix for checksum offload in bge(4) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 14:26:45 -0000 On Fri, May 21, 2004 at 11:11:41PM +0900, George V.Neville-Neil wrote: > > > > While sweeping network interface drivers for incorrect usage of the > > capabilities framework, I noticed some bugs in bge(4). Unfortunately, > > I have no such card and I don't know its internals. Therefore I > > made a patch fixing hw-independent bugs and marking some questionable > > spots. It would be nice if somebody possessing the knowledge on > > bge(4) reviewed this patch and used it to really fix the things. If > > nobody undertakes that, I'll just commit my change since it doesn't > > seem to affect the functionality while it brings the code into the shape. > > Thanks! > > I have such a card and can look into this. It may take a bit though, > perhaps a week or so. Thank you George, that would be great. A week is not a problem after it took me two months to spare time to make the patch :-) -- Yar From owner-freebsd-hackers@FreeBSD.ORG Fri May 21 07:50:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2620A16A4CE; Fri, 21 May 2004 07:50:56 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50E9E43D31; Fri, 21 May 2004 07:50:51 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from steven ([193.123.241.40]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000225093.msg; Fri, 21 May 2004 15:39:25 +0100 Message-ID: <00d401c43f41$eeea1980$7b07000a@int.mediasurface.com> From: "Steven Hartland" To: "Yar Tikhiy" , "George V.Neville-Neil" References: <20040521135759.GE57132@comp.chem.msu.su> <20040521142628.GA61458@comp.chem.msu.su> Date: Fri, 21 May 2004 15:42:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Fri, 21 May 2004 15:39:25 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 193.123.241.40 X-Return-Path: killing@multiplay.co.uk X-MDAV-Processed: multiplay.co.uk, Fri, 21 May 2004 15:39:27 +0100 cc: hackers@freebsd.org cc: net@freebsd.org Subject: Re: Bugfix for checksum offload in bge(4) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 14:50:56 -0000 While on the subject of bge any idea why it performs so poorly in 100Mb mode when compared to the humble fxp in the following results. FreeBSD 5.1.2 (i386) local: 22834.872368421 records per second fxp 100Mb: 3854.06863517 records per second bge 100Mb: 2501.66999862 records per second bge 1Gb: 3281.65229885 records per second Connection is TCP based with fairly small packets but at high volumes fxp was pushing 4k packets / s where bge would only do around 2.5k Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Fri May 21 14:47:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12B2016A4CE for ; Fri, 21 May 2004 14:47:07 -0700 (PDT) Received: from diaspar.rdsnet.ro (diaspar.rdsnet.ro [213.157.165.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DDBF43D4C for ; Fri, 21 May 2004 14:47:06 -0700 (PDT) (envelope-from dudu@diaspar.rdsnet.ro) Received: (qmail 8524 invoked by uid 89); 21 May 2004 21:46:57 -0000 Received: from unknown (HELO diaspar.rdsnet.ro) (dudu@diaspar.rdsnet.ro@213.157.165.224) by 0 with AES256-SHA encrypted SMTP; 21 May 2004 21:46:57 -0000 Date: Sat, 22 May 2004 00:46:54 +0300 From: Vlad GALU To: freebsd-hackers@freebsd.org Message-Id: <20040522004654.4775c097.dudu@diaspar.rdsnet.ro> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="Signature=_Sat__22_May_2004_00_46_54_+0300_n4gY6x1G.oxbSFte" Subject: FreeBSD book recommendation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 21:47:07 -0000 --Signature=_Sat__22_May_2004_00_46_54_+0300_n4gY6x1G.oxbSFte Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit I'd like to buy a book about FreeBSD kernel internals: data structures, VM layout, reasons for various implementations, sort of a traver through the sourcecode, along with explaining each design decision that has been taken. I'm interested of improving both my personal experience and my fellows'. Do you know any good titles ? Something that can be bought online with price varying betweek $50-200. Thanks in advance for any pointers. ---- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. --Signature=_Sat__22_May_2004_00_46_54_+0300_n4gY6x1G.oxbSFte Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFArnjQP5WtpVOrzpcRApopAKCUOE8mDIsI6i2OgGcqNirRzKupnQCeI423 4jHDjWwo5x8yZ5ww2ebIfsc= =Ysyo -----END PGP SIGNATURE----- --Signature=_Sat__22_May_2004_00_46_54_+0300_n4gY6x1G.oxbSFte-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 21 14:50:45 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9369816A4CE for ; Fri, 21 May 2004 14:50:45 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A7F343D31 for ; Fri, 21 May 2004 14:50:45 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.10) with ESMTP id i4LLogs0002821; Fri, 21 May 2004 14:50:42 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i4LLogHk002820; Fri, 21 May 2004 14:50:42 -0700 Date: Fri, 21 May 2004 14:50:42 -0700 From: Brooks Davis To: Vlad GALU Message-ID: <20040521215042.GB1549@Odin.AC.HMC.Edu> References: <20040522004654.4775c097.dudu@diaspar.rdsnet.ro> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kXdP64Ggrk/fb43R" Content-Disposition: inline In-Reply-To: <20040522004654.4775c097.dudu@diaspar.rdsnet.ro> User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD book recommendation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 21:50:45 -0000 --kXdP64Ggrk/fb43R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 22, 2004 at 12:46:54AM +0300, Vlad GALU wrote: >=20 > I'd like to buy a book about FreeBSD kernel internals: data structures, > VM layout, reasons for various implementations, sort of a traver through > the sourcecode, along with explaining each design decision that has been > taken. I'm interested of improving both my personal experience and my > fellows'. > Do you know any good titles ? Something that can be bought online with > price varying betweek $50-200. If you can wait a few months "The Design and Implemenation of the FreeBSD Operating System" is probably what you want. http://www.mckusick.com/FreeBSDbook.html For now, the previous book, "The Design and Implemenation of the 4.4 BSD Operating System" is probably your best bet. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --kXdP64Ggrk/fb43R Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFArnmxXY6L6fI4GtQRAlDvAKDd+oT7FtxK3UPKxZpRbXG6WeZ9vgCfeTjo Nc4VEU9ssyJ+Lq/hWd+1SGs= =8+ms -----END PGP SIGNATURE----- --kXdP64Ggrk/fb43R-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 21 18:42:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDC2216A4CE for ; Fri, 21 May 2004 18:42:38 -0700 (PDT) Received: from web21509.mail.yahoo.com (web21509.mail.yahoo.com [66.163.169.58]) by mx1.FreeBSD.org (Postfix) with SMTP id AC01343D46 for ; Fri, 21 May 2004 18:42:38 -0700 (PDT) (envelope-from jiafu_he@yahoo.com) Message-ID: <20040522014238.28796.qmail@web21509.mail.yahoo.com> Received: from [151.196.118.13] by web21509.mail.yahoo.com via HTTP; Fri, 21 May 2004 18:42:38 PDT Date: Fri, 21 May 2004 18:42:38 -0700 (PDT) From: Jiafu He To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: mini-howto: Grub on FreeBSD (UFS2) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 01:42:38 -0000 hi, folks, I saw some questions on Grub for FreeBSD. Here I have a short mini-howto on how to use Grub on FreeBSD, which originated from the notes I took. Hope it can provide a tiny bit help. Thanks. Jiafu --------------------------------- Do you Yahoo!? Yahoo! Domains - Claim yours for only $14.70/year From owner-freebsd-hackers@FreeBSD.ORG Fri May 21 18:48:05 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 762A016A4CF for ; Fri, 21 May 2004 18:48:05 -0700 (PDT) Received: from web21505.mail.yahoo.com (web21505.mail.yahoo.com [66.163.169.16]) by mx1.FreeBSD.org (Postfix) with SMTP id 526C443D4C for ; Fri, 21 May 2004 18:48:05 -0700 (PDT) (envelope-from jiafu_he@yahoo.com) Message-ID: <20040522014749.9700.qmail@web21505.mail.yahoo.com> Received: from [151.196.118.13] by web21505.mail.yahoo.com via HTTP; Fri, 21 May 2004 18:47:49 PDT Date: Fri, 21 May 2004 18:47:49 -0700 (PDT) From: Jiafu He To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: mini-howto: Grub on FreeBSD (UFS2) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 01:48:05 -0000 Sorry, forgot the main part. see it here: =================================================== ######## How to Use Grub Bootloader on FreeBSD ######## ######## jiafu_he@yahoo.com, 05/18/2004 ######## This mini-howto is written as a dummy introduction on how to get, install, setup and use GNU/Grub bootloader on FreeBSD. If you need more detailed information, go read the Grub mannual at http://www.gnu.org/manual/grub/html_mono/grub.html Note: UFS2 is supported starting from the verion Grub-0.94_3. 1. Obtaining Grub files: To use Grub on FreeBSD UFS2, you need files "stage1", "stage2" and "ufs2_stage1_5". To handle other types of file systems, you need other stage 1.5 files like "ffs_stage1_5", "e2fs_stage1_5", or "fat_stage1_5" etc. You can obtain the files from either i. the GNU/Grub website http://www.gnu.org/software/grub/ ii. or FreeBSD Grub port. Grub-0.94_3 requires freebsd 5.2.1 or current. To install Grub-0.94_3, do the following: ------------------------------- #cd /usr/ports/sysutils/grub /* go to the grub freebsd port dir */ #make install clean /* install it */ ------------------------------- If all goes well, the Grub files are generated in directory /usr/local/share/grub/i386-freebsd/ and the executable "grub" is installed under /usr/local/sbin/ 2. Installing Grub on UFS2 partition: i. Create /boot/grub/ directory (or alternatively /grub/) on your HD and copy files in it: ----------------------------------------------- #cd /boot;mkdir grub #cp -Rf /usr/local/share/grub/i386-freebsd grub ----------------------------------------------- Make sure at least files "stage1" and "stage2" are under /boot/grub/. To be complete, the pertinent stage 1.5 file (here "ufs2_stage1_5") is also needed. ii. Create Grub boot floppy. You can either a. using "dd" (recommended): ----------------------------------------------- #dd if=stage1 of=/dev/fd0 bs=512 count=1 /* stage1 to block #1 */ 1+0 records in 1+0 records out #dd if=stage2 of=/dev/fd0 bs=512 seek=1 /* stage2 starting from block #2 */ 153+1 records in 153+1 records out # ----------------------------------------------- b. or alternatively using Grub "setup" under FreeBSD: ----------------------------------------------- #fdformat -f1440 /dev/fd0 /* low level format the floppy if you want to */ #newfs -LGrubBoot -O1 /dev/fd0 /* format into UFS1 */ #mount /dev/fd0 /mnt #mkdir /mnt/boot #cp -Rf /usr/local/share/grub/i386-freebsd /mnt/boot/grub #touch /mnt/boot/grub/menu.lst /* touch and edit menu.lst, see step 3 */ #umount /mnt #grub grub> device (fd0) /dev/fd0 /* set the device map */ grub> root (fd0) Filesystem type is ffs, using whole disk grub> find /boot/grub/stage1 /* verify whether the required files are there */ (fd0) grub> setup (fd0) /* setup the floppy */ Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/ffs_stage1_5" exists... yes Running "embed /boot/grub/ffs_stage1_5 (fd0)"... failed (this is not fatal) Running "embed /boot/grub/ffs_stage1_5 (fd0)"... failed (this is not fatal) Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p /boot/grub/menu.lst " ... succeeded Done. ----------------------------------------------- 3. Touch and edit "/boot/grub/menu.lst". An example is given below, assuming that - partition 0: Windows XP; - partition 1: FreeBSD; - partition 2: Linux. ------------------------------------------- default saved # boot the last selection. Work together with savedefault below timeout 10 # timeout 10 seconds password --md5 $1$rEjBN0$0J06NigS.2ImTaipPOh0w/ # md5 passwd encryption: "testgrub" # Boot Windows XP. You have to chainloading. title Windows XP Professional # display boot title on the Grub prompt root (hd0,0) # set the root device or partition makeactive # set the partition active so that next time it can be automatically # booted after timing-out chainloader +1 # Here we have to chainload savedefault # save this selection as the default for next bootstrap # Boot FreeBSD title FreeBSD 5.1_p16 root (hd0,1,a) kernel /boot/loader # specify the kernel or kernel loader makeactive savedefault # Boot Redhat Linux title Redhat Linux root (hd0,2) kernel /boot/vmlinuz-2.4.18-14smp ro root=LABEL=/ hdc=ide-scsi initrd /boot/initrd-2.4.18-14smp.img makeactive savedefault # Install Grub on Slice 1 (the FreeBSD partition) title Install Grub on FreeBSD (Slice 1) root (hd0,1,a) setup (hd0) savedefault --------------------------------------------- 4. Install Grub to MBR on your hard disk (using grub native way): i. Boot the machine using the floppy just created; ii. on the Grub menu screen, you can either make use of the last menu entry (see menu.lst above) or do the following: ----------------------------------- : (Grub menu screen) : p # password is needed since the password line is in config file. password: testgrub c # enter command prompt Then you enter the command prompt: grub> find /boot/grub/stage1 /* find which partition has Grub files */ (hd0,1,a) /* it will display the found parition */ grub> root (hd0,1,a) Filesystem type is ufs2, partition type 0xa5 grub> setup (hd0) /* install Grub in MBR */ Checking if "/boot/grub/stage1" exists ... yes Checking if "/boot/grub/stage2" exists ... yes Checking if "/boot/grub/ufs2_stage1_5" exists ... yes Running "embed /boot/grub/ufs2_stage1_5 (hd0)"... 16 sectors embeded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,1,a)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded ------------------------------------ 5. Finally how to generate md5-encrypted password: Enter any Grub command prompt: grub> md5crypt /* call the md5 password encryption utility */ password: yourDesiredPassword /* passwd are replaced by same number of "*" */ EncryptedPassword /* encrypted password is returned here, put it in config file */ That is pretty much it. Enjoy! ########### End of MiniHowto: Grub on FreeBSD ############# ==================================================== Jiafu He wrote: hi, folks, I saw some questions on Grub for FreeBSD. Here I have a short mini-howto on how to use Grub on FreeBSD, which originated from the notes I took. Hope it can provide a tiny bit help. Thanks. Jiafu --------------------------------- Do you Yahoo!? Yahoo! Domains - Claim yours for only $14.70/year --------------------------------- Do you Yahoo!? Yahoo! Domains - Claim yours for only $14.70/year From owner-freebsd-hackers@FreeBSD.ORG Fri May 21 19:06:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E48B16A4CE; Fri, 21 May 2004 19:06:11 -0700 (PDT) Received: from blount.mail.mindspring.net (blount.mail.mindspring.net [207.69.200.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C73243D2F; Fri, 21 May 2004 19:06:11 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from [192.168.167.44] (helo=wamui06.slb.atl.earthlink.net) by blount.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BRLtq-000863-00; Fri, 21 May 2004 22:06:10 -0400 Message-ID: <7860222.1085191570767.JavaMail.root@wamui06.slb.atl.earthlink.net> Date: Fri, 21 May 2004 19:06:10 -0700 (GMT-07:00) From: Terry Lambert To: Alfred Perlstein , hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Earthlink Zoo Mail 1.0 Subject: Re: api for sharing memory from kernel to userspace? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Terry Lambert List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 02:06:11 -0000 Alfred Perlstein writes: > I need to share about 100megs of memory between kernel and userspace. > > The memory can not be paged and should appear contig in the process's > address space. Any suggestions? > > I need a way to either: > map user memory into the kernel's address space. > map kernel memory into the user's address space. > > I was looking at pmap_qenter() but it didn't see attractive because > it's for "short term mappings", this mapping will exist for quite a > while. Given your "non-paged" requirement, the allocation needs to take place in the kernel. Visible in a single process, or in all of them? If all of them, set the PG_U bit; it will have the same address in user space as it does in the kernel, and be visible to all processes. If only one of them, the best general solution is to use a pseudo-device, and support mmap() on it. -- Terry From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 11:34:22 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D8E716A4CE for ; Sat, 22 May 2004 11:34:22 -0700 (PDT) Received: from chaos.evolve.za.net (chaos.evolve.za.net [196.34.172.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EA7643D31 for ; Sat, 22 May 2004 11:34:21 -0700 (PDT) (envelope-from cole@opteqint.net) Received: from root by chaos.evolve.za.net with scanned-ok (Exim 3.36 #1) id 1BRbJz-000Bye-00 for freebsd-hackers@freebsd.org; Sat, 22 May 2004 20:34:11 +0200 Received: from [196.39.126.250] (helo=stalker) by chaos.evolve.za.net with asmtp (TLSv1:RC4-MD5:128) (Exim 3.36 #1) id 1BRbJz-000ByT-00 for freebsd-hackers@freebsd.org; Sat, 22 May 2004 20:34:11 +0200 Message-ID: <000701c4402b$a54e73d0$4206000a@stalker> From: "Cole" To: Date: Sat, 22 May 2004 20:36:04 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Virus-Scanned: by Opteq - www.optec.co.za Subject: Memory Leak X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 18:34:22 -0000 Hey I just wanted to know what programs any of you have used to track down a memory leak in your programs? Also wondering if there is maybe a good tutorial on the subject under FreeBSD or even linux if possible. Im running FreeBSD 4.9 so just looking for something try to help me track it down. Unless there is someone willing to help me with this since ive never really had to do anything like this, else i can easily read something, just kinda need to know a good memory tracing program or something of the sorts. Thanks /Cole From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 11:53:34 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E974816A4CE for ; Sat, 22 May 2004 11:53:34 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D84B43D41 for ; Sat, 22 May 2004 11:53:34 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i4MIqQ90068057; Sat, 22 May 2004 11:52:26 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <40AFA163.4020109@freebsd.org> Date: Sat, 22 May 2004 11:52:19 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Cole References: <000701c4402b$a54e73d0$4206000a@stalker> In-Reply-To: <000701c4402b$a54e73d0$4206000a@stalker> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Memory Leak X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 18:53:35 -0000 Cole wrote: > Hey > > I just wanted to know what programs any of you have used to track down a > memory leak in your programs? > Also wondering if there is maybe a good tutorial on the subject under > FreeBSD or even linux if possible. > > Im running FreeBSD 4.9 so just looking for something try to help me track it > down. > > Unless there is someone willing to help me with this since ive never really > had to do anything like this, else i can easily read something, just kinda > need to know a good memory tracing program or something of the sorts. I've had pretty good luck with dmalloc from ports. Just add #include to the *END* of your includes and link against the dmalloc library. The tracing is controlled by environment variables; you can use the 'dmalloc' program to help set those. The one problem I've had is that dmalloc.h redefines some standard functions, which can cause gcc to complain. I've locally modified some of the standard system headers to not define malloc/free/strdup/calloc/realloc/etc if DMALLOC is defined. It's a hack, but it works. dmalloc also gives good statistics about malloc usage. I've used it to identify over-use of malloc in bsdtar, with some concrete performance improvements. (For example, by switching from heap-allocated buffers to stack-allocated buffers or by re-using buffers to avoid repeated malloc/free calls.) The FreeBSD standard malloc also has some nice debugging features. I've found that switching between dmalloc and the libc malloc helps a lot, as each catches different sorts of problems. Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 12:38:41 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9987116A4CE for ; Sat, 22 May 2004 12:38:41 -0700 (PDT) Received: from chaos.evolve.za.net (chaos.evolve.za.net [196.34.172.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F30B43D46 for ; Sat, 22 May 2004 12:38:40 -0700 (PDT) (envelope-from cole@opteqint.net) Received: from root by chaos.evolve.za.net with scanned-ok (Exim 3.36 #1) id 1BRcJb-000Dhe-00 for freebsd-hackers@freebsd.org; Sat, 22 May 2004 21:37:51 +0200 Received: from [196.39.126.250] (helo=stalker) by chaos.evolve.za.net with asmtp (TLSv1:RC4-MD5:128) (Exim 3.36 #1) id 1BRcJa-000DhD-00 for freebsd-hackers@freebsd.org; Sat, 22 May 2004 21:37:50 +0200 Message-ID: <000701c44034$89dbffb0$4206000a@stalker> From: "Cole" To: Date: Sat, 22 May 2004 21:39:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Virus-Scanned: by Opteq - www.optec.co.za Subject: Pthread_create and memory issues. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 19:38:41 -0000 Hi Ok this is just a more direct question that the thread Memory Leak. I have a program using pthread_create, and it runs fine, no compile errors or warnings, it all works fine, not a single issue, but it very very slowly uses up memory. The program creates a fixed number of threads, and after each one has run to completion it stores them for a while for use again if needed soon, else it destroys them after a specified amount of time. Now i have tried to use ElectricFence to try track down the program, and it created cores all pointing round about to pthread_create. So then i tried to use mpatrol, and it either doesnt even crash, or cause errors, or it creates a core file that is so large with so many instructions, that is well over 1000 instruction calls, but as far as i can see they both seem to be pointing to pthread_create. With mpatrol i set MPATROL_OPTIONS=LEAKTABLE, but it never produces any output and crashes before i can even test the program. It also uses up close to 100% of the cpu before crashing. I was just wondering if anyone else has had any other memory debugging program suggestions, or has had any issues with pthread_create. If you want i can post the code or at the very least my pthread_create call. Thanks /Cole From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 12:47:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F00D16A52C; Sat, 22 May 2004 12:47:04 -0700 (PDT) Received: from mailout1.informatik.tu-muenchen.de (mailout1.informatik.tu-muenchen.de [131.159.0.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7309F43D3F; Sat, 22 May 2004 12:47:03 -0700 (PDT) (envelope-from barner@in.tum.de) Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id B6BDB4885; Sat, 22 May 2004 21:46:32 +0200 (CEST) Date: Sat, 22 May 2004 21:46:32 +0200 From: Simon Barner To: Cole Message-ID: <20040522194632.GB30506@zi025.glhnet.mhn.de> Mail-Followup-To: ports@freebsd.org References: <000701c4402b$a54e73d0$4206000a@stalker> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V" Content-Disposition: inline In-Reply-To: <000701c4402b$a54e73d0$4206000a@stalker> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at informatik.tu-muenchen.de cc: ports@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Looking for a ports committer for valgrind (Re: Memory Leak) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 19:47:05 -0000 --uQr8t48UFsdbeI+V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > I just wanted to know what programs any of you have used to track down a > memory leak in your programs? this reminds me of something... :-/ I created a port for Doug Rabson's FreeBSD port[1] of valgrind [2]. He considered my work ready for the ports tree, but he also said that that he doesn't do any ports commits these days. So, could somebody please have a look at the ports (there is a stable and a development version of valgrind) to be found at [3]? If they get committed, PR ports/65585 can be closed as well (also approved by Doug). It's a pity that I forgot that excellent memory debugging tool, most notably because all the work has already been done, and the ports were only rotting around. :-( Cole, in order two answer your question at least a little bit: valgrind is great at detecting memory leaks and much more, e.g. out-of-bound array access, ... Simon [f'up2 ports@ set] [1] http://www.rabson.org/#valgrind [2] http://valgrind.kde.org/ [3] http://home.leo.org/~barner/freebsd/valgrind/ --uQr8t48UFsdbeI+V Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAr64YCkn+/eutqCoRAhhHAKDVLT9xkSZF1ysp7OpVigpOOxE/WACfX8ZG EZ+7Vxs/2yJw8JARf2y1kS4= =sH5/ -----END PGP SIGNATURE----- --uQr8t48UFsdbeI+V-- From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 13:14:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43C2D16A4CE; Sat, 22 May 2004 13:14:01 -0700 (PDT) Received: from regina.plastikos.com (216-107-106-250.wan.networktel.net [216.107.106.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9416143D1D; Sat, 22 May 2004 13:14:00 -0700 (PDT) (envelope-from fullermd@over-yonder.net) Received: from mortis.over-yonder.net (adsl-19-159-58.jan.bellsouth.net [68.19.159.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by regina.plastikos.com (Postfix) with ESMTP id D87E96EEB9; Sat, 22 May 2004 16:13:32 -0400 (EDT) Received: by mortis.over-yonder.net (Postfix, from userid 100) id BA2DA20F2F; Sat, 22 May 2004 15:13:30 -0500 (CDT) Date: Sat, 22 May 2004 15:13:30 -0500 From: "Matthew D. Fuller" To: Tim Kientzle Message-ID: <20040522201330.GU37882@over-yonder.net> References: <000701c4402b$a54e73d0$4206000a@stalker> <40AFA163.4020109@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40AFA163.4020109@freebsd.org> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.6i-fullermd.2 cc: freebsd-hackers@freebsd.org Subject: Re: Memory Leak X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 20:14:01 -0000 On Sat, May 22, 2004 at 11:52:19AM -0700 I heard the voice of Tim Kientzle, and lo! it spake thus: > > The one problem I've had is that dmalloc.h redefines some standard > functions, which can cause gcc to complain. I usually just have a flag in my Makefile to enable dmalloc (adding a -D to the cc line to enable including the header file which is inside #ifdef's, adding the linking of the library, etc), which turns off all -W flags. gcc's quiet about it then. Personally, I find its insistence that free(NULL); is an error to be far more irritating. There's a config flag for it somewhere in the compile process, though. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ "The only reason I'm burning my candle at both ends, is because I haven't figured out how to light the middle yet" From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 13:57:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32FDD16A4CE for ; Sat, 22 May 2004 13:57:20 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA27643D2D for ; Sat, 22 May 2004 13:57:19 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i4MKup8Q026435; Sat, 22 May 2004 16:56:52 -0400 (EDT) Date: Sat, 22 May 2004 16:56:51 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Cole In-Reply-To: <000701c44034$89dbffb0$4206000a@stalker> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Pthread_create and memory issues. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 20:57:20 -0000 On Sat, 22 May 2004, Cole wrote: > Hi > > Ok this is just a more direct question that the thread Memory Leak. > > I have a program using pthread_create, and it runs fine, no compile errors > or warnings, it all works fine, not a single issue, but it very very slowly > uses up memory. The program creates a fixed number of threads, and after > each one has run to completion it stores them for a while for use again if > needed soon, else it destroys them after a specified amount of time. The threads library (at least libpthread) caches threads and KSE/KSEGs for re-use. Threads also have to be detached (or joined to) in order to reclaim their space. -- Dan Eischen From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 14:21:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE2E616A4CE for ; Sat, 22 May 2004 14:21:50 -0700 (PDT) Received: from enigma.barak.net.il (enigma.barak.net.il [212.150.48.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1780E43D53 for ; Sat, 22 May 2004 14:21:50 -0700 (PDT) (envelope-from alex@hightemplar.com) Received: from hydralisk ([212.150.124.244]) by enigma.barak.net.il e5bc39f1001e7dfa47fa92d56cd12779) with ESMTP id <20040522212129.ZGSM17173.enigma@hydralisk>; Sun, 23 May 2004 00:21:29 +0300 From: Alex Keahan To: "Cole" , Date: Sun, 23 May 2004 00:20:09 +0300 User-Agent: KMail/1.5.1 References: <000701c44034$89dbffb0$4206000a@stalker> In-Reply-To: <000701c44034$89dbffb0$4206000a@stalker> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200405230020.09482.alex@hightemplar.com> Subject: Re: Pthread_create and memory issues. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 21:21:51 -0000 On Saturday 22 May 2004 10:39 pm, Cole wrote: > Hi > > Ok this is just a more direct question that the thread Memory Leak. > > I have a program using pthread_create, and it runs fine, no compile errors > or warnings, it all works fine, not a single issue, but it very very slowly > uses up memory. The program creates a fixed number of threads, and after > each one has run to completion it stores them for a while for use again if > needed soon, else it destroys them after a specified amount of time. Cole, Are you certain it's not a bug in your code? A thread's resources are not immediately released at termination, unless the thread was created with the detachstate attribute set to PTHREAD_CREATE_DETACHED, or if pthread_detach has been called for its pthread_t. An undetached thread remains in the terminated state until its identifier is passed to pthread_join or pthread_detach. At a minimum, a terminated thread retains its pthread_t identifier and the return value that was returned from the thread's run function (or the value specified in a call to pthread_exit). To sum it up, you have three options: 1) create your threads detached (PTHREAD_CREATE_DETACHED attribute), 2) detach them after creation (pthread_detach), or 3) join with the terminated threads to recycle them (pthread_join). Alex Keahan > > Now i have tried to use ElectricFence to try track down the program, and it > created cores all pointing round about to pthread_create. So then i tried > to use mpatrol, and it either doesnt even crash, or cause errors, or it > creates a core file that is so large with so many instructions, that is > well over 1000 instruction calls, but as far as i can see they both seem to > be pointing to pthread_create. With mpatrol i set > MPATROL_OPTIONS=LEAKTABLE, but it never produces any output and crashes > before i can even test the program. It also uses up close to 100% of the > cpu before crashing. > > I was just wondering if anyone else has had any other memory debugging > program suggestions, or has had any issues with pthread_create. > > If you want i can post the code or at the very least my pthread_create > call. > > Thanks > /Cole From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 18:03:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81F7D16A4CE for ; Sat, 22 May 2004 18:03:59 -0700 (PDT) Received: from siue.dnsalias.net (11spidialup76.famvid.com [208.5.212.76]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37BEC43D2D for ; Sat, 22 May 2004 18:03:58 -0700 (PDT) (envelope-from wgrim@siue.edu) Received: from siue.edu (persephone.bsdaemon.org [192.168.0.101]) by siue.dnsalias.net (Postfix) with ESMTP id 0BC6A233D10 for ; Sat, 22 May 2004 20:04:52 -0500 (CDT) Message-ID: <40AFF8B3.40009@siue.edu> Date: Sat, 22 May 2004 20:04:51 -0500 From: "William M. Grim" Organization: SIUE User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3 X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: multipart/mixed; boundary="------------000701030804000503040700" X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Jails: An rc.d script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 01:03:59 -0000 This is a multi-part message in MIME format. --------------000701030804000503040700 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi! I've written an rc.d script that can start/stop/restart jails, if they follow a certain pattern of setup. I'm strongly considering the placement of this in ports or base (ports seems most appropriate). Basically, if you have jails in /usr/local/var/jail/, my script can start it up automatically, as long as the IP is reachable by `host` (I know, it requires a little more work to remove this dependency for 192.168. addresses, etc). However, I was wondering if anyone would want to test it? All you have to do is take my attached script and place it in /usr/local/etc/rc.d/. If you have your jails located somewhere else, then edit the JAILBASE= line in the script. I would appreciate any constructive criticism about this script so that I can make it better. If you have any improvements you make, feel free to send them to me as well. I'll attempt to make it better over time and to write a man page for it. Many thanks. -- William Michael Grim Student, Southern Illinois University at Edwardsville Unix Network Administrator, SIUE, Computer Science dept. Phone: (217) 341-6552 Email: wgrim@siue.edu --------------000701030804000503040700-- From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 18:18:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 668E016A4CE for ; Sat, 22 May 2004 18:18:36 -0700 (PDT) Received: from siue.dnsalias.net (11spidialup76.famvid.com [208.5.212.76]) by mx1.FreeBSD.org (Postfix) with ESMTP id D266A43D39 for ; Sat, 22 May 2004 18:18:34 -0700 (PDT) (envelope-from wgrim@siue.edu) Received: from siue.edu (persephone.bsdaemon.org [192.168.0.101]) by siue.dnsalias.net (Postfix) with ESMTP id E7892233D10 for ; Sat, 22 May 2004 20:19:32 -0500 (CDT) Message-ID: <40AFFC24.6050501@siue.edu> Date: Sat, 22 May 2004 20:19:32 -0500 From: "William M. Grim" Organization: SIUE User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3 X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org References: <40AFF8B3.40009@siue.edu> In-Reply-To: <40AFF8B3.40009@siue.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Jails: An rc.d script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 01:18:36 -0000 Very odd, my jails.sh script was not allowed to pass or something. So, I'm pasting it into this email. #!/bin/sh # # Start the jails at boot-up. # The only jails it can start properly are the ones in directories labelled # with an IP address. JAILBASE=/usr/local/var/jail LS="/bin/ls" JLS="/usr/sbin/jls" AWK="/usr/bin/awk" GREP="/usr/bin/grep" HOST="/usr/bin/host" MOUNT="/sbin/mount" UMOUNT="/sbin/umount" SH="/bin/sh" JAIL="/usr/sbin/jail" KILLALL="/usr/bin/killall" start_jails() { for JAILIP in `${LS} -1 ${JAILBASE}`; do ${MOUNT} -t devfs devfs ${JAILBASE}/${JAILIP}/dev ${MOUNT} -t procfs proc ${JAILBASE}/${JAILIP}/proc JAILHOST=`${HOST} ${JAILIP} | ${AWK} '{ print $5; }'` ${JAIL} ${JAILBASE}/${JAILIP} ${JAILHOST} ${JAILIP} ${SH} /etc/rc done } stop_jails() { echo "Even though you are stopping the jails, the JID may show up" echo "when doing \`jls\`. This is most likely because some connections" echo "are waiting to timeout." for JID in `${JLS} | ${GREP} -v JID | ${AWK} '{ print $1; }'`; do ${KILLALL} -j ${JID} echo "Killing JID: ${JID}" done for JAILIP in `\ls -1 ${JAILBASE}`; do ${UMOUNT} -f ${JAILBASE}/${JAILIP}/proc ${UMOUNT} -f ${JAILBASE}/${JAILIP}/dev done } case "$1" in start) start_jails ;; restart) stop_jails sleep 1 start_jails ;; stop) stop_jails ;; esac Thanks again, and sorry for the confusion. William M. Grim wrote: > Hi! > > I've written an rc.d script that can start/stop/restart jails, if they > follow a certain pattern of setup. I'm strongly considering the > placement of this in ports or base (ports seems most appropriate). > > Basically, if you have jails in /usr/local/var/jail/, my script > can start it up automatically, as long as the IP is reachable by > `host` (I know, it requires a little more work to remove this > dependency for 192.168. addresses, etc). > > However, I was wondering if anyone would want to test it? All you > have to do is take my attached script and place it in > /usr/local/etc/rc.d/. If you have your jails located somewhere else, > then edit the JAILBASE= line in the script. > > I would appreciate any constructive criticism about this script so > that I can make it better. If you have any improvements you make, > feel free to send them to me as well. I'll attempt to make it better > over time and to write a man page for it. > > Many thanks. > >------------------------------------------------------------------------ > >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > -- William Michael Grim Student, Southern Illinois University at Edwardsville Unix Network Administrator, SIUE, Computer Science dept. Phone: (217) 341-6552 Email: wgrim@siue.edu From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 21:33:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AAEA16A4CE for ; Sat, 22 May 2004 21:33:31 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id E331C43D2F for ; Sat, 22 May 2004 21:33:30 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i4N4WQ2a065619; Sat, 22 May 2004 22:32:26 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 22 May 2004 22:32:33 -0600 (MDT) Message-Id: <20040522.223233.44318739.imp@bsdimp.com> To: cole@opteqint.net From: "M. Warner Losh" In-Reply-To: <000701c44034$89dbffb0$4206000a@stalker> References: <000701c44034$89dbffb0$4206000a@stalker> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Pthread_create and memory issues. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 04:33:31 -0000 In message: <000701c44034$89dbffb0$4206000a@stalker> "Cole" writes: : I was just wondering if anyone else has had any other memory debugging : program suggestions, or has had any issues with pthread_create. We greate hundreds of threads over time in our embedded applications. We saw a bona fide leak in the 3.x timeframe. However, in 4.x we've not seen any leaks. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 21:33:42 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4656816A4CE; Sat, 22 May 2004 21:33:42 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id C374243D39; Sat, 22 May 2004 21:33:41 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i4N4UZt3065604; Sat, 22 May 2004 22:30:35 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 22 May 2004 22:30:42 -0600 (MDT) Message-Id: <20040522.223042.41645314.imp@bsdimp.com> To: kientzle@freebsd.org From: "M. Warner Losh" In-Reply-To: <40AFA163.4020109@freebsd.org> References: <000701c4402b$a54e73d0$4206000a@stalker> <40AFA163.4020109@freebsd.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Memory Leak X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 04:33:42 -0000 In message: <40AFA163.4020109@freebsd.org> Tim Kientzle writes: : Cole wrote: : > Hey : > : > I just wanted to know what programs any of you have used to track down a : > memory leak in your programs? : > Also wondering if there is maybe a good tutorial on the subject under : > FreeBSD or even linux if possible. : > : > Im running FreeBSD 4.9 so just looking for something try to help me track it : > down. : > : > Unless there is someone willing to help me with this since ive never really : > had to do anything like this, else i can easily read something, just kinda : > need to know a good memory tracing program or something of the sorts. : : I've had pretty good luck with dmalloc from ports. : : Just add : #include : to the *END* of your includes and link against : the dmalloc library. The tracing is controlled : by environment variables; you can use the 'dmalloc' : program to help set those. The one problem I've had : is that dmalloc.h redefines some standard functions, : which can cause gcc to complain. I've locally : modified some of the standard system headers to : not define malloc/free/strdup/calloc/realloc/etc : if DMALLOC is defined. It's a hack, but it works. : : dmalloc also gives good statistics about malloc : usage. I've used it to identify over-use of : malloc in bsdtar, with some concrete performance : improvements. (For example, by switching from : heap-allocated buffers to stack-allocated buffers : or by re-using buffers to avoid repeated : malloc/free calls.) : : The FreeBSD standard malloc also has some nice debugging : features. I've found that switching between dmalloc : and the libc malloc helps a lot, as each catches : different sorts of problems. Any suggestions for leak detectors that work in real-time or in response to some external signal? In a threaded application would be ideal. I've hacked malloc to add the stack traceback to the utrace info that's output by malloc. However, for applications that run for days, and tend to allocate and free a lot of memory, you gotta have lots of local storage. The restrictions in the kernel that requires this to be a real file makes it harder. Also, there's a difference between what's in use and what is leaking.. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 22:12:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC32C16A4CE for ; Sat, 22 May 2004 22:12:32 -0700 (PDT) Received: from mail.tacorp.net (mail.tacorp.net [64.246.111.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 278FA43D1D for ; Sat, 22 May 2004 22:12:32 -0700 (PDT) (envelope-from raistlin@tacorp.net) Received: from mail.tacorp.net (raistlin@localhost [127.0.0.1]) by mail.tacorp.net (8.12.10/8.12.10) with ESMTP id i4N5CHCl039161 for ; Sun, 23 May 2004 01:12:18 -0400 (EDT) (envelope-from raistlin@tacorp.net) Received: from localhost (raistlin@localhost)i4N5CHvJ039158 for ; Sun, 23 May 2004 01:12:17 -0400 (EDT) (envelope-from raistlin@tacorp.net) X-Authentication-Warning: mail.tacorp.net: raistlin owned process doing -bs Date: Sun, 23 May 2004 01:12:17 -0400 (EDT) From: Jason Slagle To: freebsd-hackers@freebsd.org Message-ID: <20040523011049.O88310@mail.tacorp.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: bge machines... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 05:12:32 -0000 If anyone testing the bge changes needs access to a pair of machines that are linked back to back via bge's, I can provide it - root and all - for testing. I'm currently testing -CURRENT on a pair of Poweredge 2650's that aren't in production yet and would be willing to let them be used for the cause for a bit since it'll be a month or more before I deploy them. Jason -- Jason Slagle - CCNP - CCDP /"\ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \ / ASCII Ribbon Campaign . X - NO HTML/RTF in e-mail . / \ - NO Word docs in e-mail . From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 22:15:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C36D616A4CE for ; Sat, 22 May 2004 22:15:20 -0700 (PDT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABA4B43D39 for ; Sat, 22 May 2004 22:15:17 -0700 (PDT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i4N5F8Kh050569; Sun, 23 May 2004 14:45:09 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sun, 23 May 2004 14:45:07 +0930 User-Agent: KMail/1.6.2 References: <000701c4402b$a54e73d0$4206000a@stalker> In-Reply-To: <000701c4402b$a54e73d0$4206000a@stalker> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200405231445.07562.doconnor@gsoft.com.au> X-Spam-Score: -4.9 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) Subject: Re: Memory Leak X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 05:15:20 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, 23 May 2004 04:06, Cole wrote: > I just wanted to know what programs any of you have used to track down a > memory leak in your programs? > Also wondering if there is maybe a good tutorial on the subject under > FreeBSD or even linux if possible. > > Im running FreeBSD 4.9 so just looking for something try to help me track > it down. > > Unless there is someone willing to help me with this since ive never real= ly > had to do anything like this, else i can easily read something, just kinda > need to know a good memory tracing program or something of the sorts. There is valgrind.. http://www.rabson.org/#valgrind I thought it was in ports but I can't see it. =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAsDNb5ZPcIHs/zowRAjd4AJ9PjPd7Qec6BnAk5dpXC1A1MPvCCwCfeOss YxNApv3HvP9P5L74f+k/9HQ=3D =3DfXHH =2D----END PGP SIGNATURE-----