From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 02:39: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 B141E16A4CE for ; Sun, 5 Sep 2004 02:39:50 +0000 (GMT) Received: from ds.netgate.net (ds.netgate.net [205.214.170.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 861C743D45 for ; Sun, 5 Sep 2004 02:39:50 +0000 (GMT) (envelope-from ctodd@chrismiller.com) Received: (qmail 3168 invoked from network); 5 Sep 2004 02:39:50 -0000 Received: from vp4.netgate.net (ibrew@205.214.170.248) by ds.netgate.net with SMTP; 5 Sep 2004 02:39:50 -0000 Date: Sat, 4 Sep 2004 19:39:50 -0700 (PDT) From: ctodd@chrismiller.com X-X-Sender: ibrew@vp4.netgate.net To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: KLD and USB driver 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, 05 Sep 2004 02:39:50 -0000 I'm working on a usb device driver I've derived from existing drivers in sys/dev/usb (4.10-RELEASE). I can successfully load and unload the module, but the usb subsystem does not appear to see the driver. However if I compile my driver in the kernel, the usb sub system uses the driver correctly. Unfortunately this is making it time consuming to test changes to my driver code as I have to compile the kernel each time. I haven't see this used in the existing usb drivers code, but I tried using the "KLD Skeleton" from the FreeBSD Architecture Handbook. Although I see the uprintf output at the terminal when load/unloading the module, the usb subsystem does not use my driver. Like the existing usb drivers, I'm using USB_DECLARE_DRIVER and DRIVER_MODULE statements. Is the KLD DECLARE_MODULE code really necessary for this driver (doesn't USB_DECLARE_DRIVER make the driver available already)? How can I determine why the driver works when compiled in the kernel, but not when dynamically loaded? I'm able to load/unload the uhid and ugen drivers and they work as expected. Any wisdom in this area would be much appreciated. Chris From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 19:19:14 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 6891316A4CE for ; Sun, 5 Sep 2004 19:19:14 +0000 (GMT) Received: from vsmtp14.tin.it (vsmtp14.tin.it [212.216.176.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7A6743D31 for ; Sun, 5 Sep 2004 19:19:13 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from ims3a.cp.tin.it (192.168.70.103) by vsmtp14.tin.it (7.0.027) id 40967D8E01512A1B; Sun, 5 Sep 2004 21:19:13 +0200 Received: from [192.168.70.183] by ims3a.cp.tin.it with HTTP; Sun, 5 Sep 2004 21:19:12 +0200 Date: Sun, 5 Sep 2004 21:19:12 +0200 Message-ID: <411972290001A708@ims3a.cp.tin.it> In-Reply-To: From: gerarra@tin.it To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable cc: ctodd@chrismiller.com Subject: RE: KLD and USB driver 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, 05 Sep 2004 19:19:14 -0000 >I'm working on a usb device driver I've derived from existing drivers in= >sys/dev/usb (4.10-RELEASE). > >I can successfully load and unload the module, but the usb subsystem doe= s >not appear to see the driver. However if I compile my driver in the >kernel, the usb sub system uses the driver correctly. Unfortunately this= >is making it time consuming to test changes to my driver code as I have to >compile the kernel each time. > >I haven't see this used in the existing usb drivers code, but I tried >using the "KLD Skeleton" from the FreeBSD Architecture Handbook. >Although I see the uprintf output at the terminal when load/unloading th= e >module, the usb subsystem does not use my driver. Like the existing usb >drivers, I'm using USB_DECLARE_DRIVER and DRIVER_MODULE statements. > >Is the KLD DECLARE_MODULE code really necessary for this driver (doesn't= >USB_DECLARE_DRIVER make the driver available already)? How can I determi= ne >why the driver works when compiled in the kernel, but not when dynamical= ly >loaded? I'm able to load/unload the uhid and ugen drivers and they work as >expected. FreeBSD is dived into subsystems and every subsystem contains a certain number of components. To mantain specific order starting subsystems SYSIN= IT macro is provided by the kernel; very struct sysinit obj has a double-cod= e priority referencing subsystem priority and priority within the subsystem= (you can give a look to them in sys/kernel.h, enum sysinit_sub_id and enu= m sysinit_elem_order enumerations). When you code a generic KLD, DECLARE_MO= DULE macro is provided to manage linking; between the other things a struct sy= sinit obj is done (through a call to SYSINIT macro) and initialized within a sp= ecified subsystem and with a specified priority inside the subsystem, to let modu= le start properly. DRIVER_MODULE just does that: among the other things, cal= ls DECLARE_MODULE linking the new module in the DRIVERS subsystems. USB_DECL= ARE_DRIVER, instead, just defines some functions to manage your usb driver. In the en= d, the real linking is done by DRIVER_MODULE and you should not use DECLARE_= MODULE (DRIVER_MODULE alredy does). However for a review of the code the complet= e source code might be provided. greetings rookie From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 20:52: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 DC15A16A4CE; Sun, 5 Sep 2004 20:52:52 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id E793943D39; Sun, 5 Sep 2004 20:52:51 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i85Kqne6081379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 6 Sep 2004 00:52:50 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i85KqnMw081378; Mon, 6 Sep 2004 00:52:49 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Mon, 6 Sep 2004 00:52:49 +0400 From: Gleb Smirnoff To: luigi@freebsd.org Message-ID: <20040905205249.GA81337@cell.sick.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org cc: net@freebsd.org Subject: bridge callbacks in if_ed.c? 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, 05 Sep 2004 20:52:53 -0000 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Luigi, I see that bridge callbacks are still living in if_ed.c from FreeBSD 2.x times. See if_ed.c:2816. I think this is not correct. Bridge code is called from ether_input(), which is indirectly called from if_ed.c:2836. Any objections about attached patch? [ccing hackers@ and net@ to get more eyes reviewing] -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="if_ed.c.diff" Index: if_ed.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ed/if_ed.c,v retrieving revision 1.233 diff -u -r1.233 if_ed.c --- if_ed.c 13 Aug 2004 23:04:23 -0000 1.233 +++ if_ed.c 5 Sep 2004 20:48:19 -0000 @@ -2810,26 +2810,9 @@ eh = mtod(m, struct ether_header *); /* - * Don't read in the entire packet if we know we're going to drop it - * and no bpf is active. + * Get packet, including link layer address, from interface. */ - if (!ifp->if_bpf && BDG_ACTIVE( (ifp) ) ) { - struct ifnet *bif; - - ed_ring_copy(sc, buf, (char *)eh, ETHER_HDR_LEN); - bif = bridge_in_ptr(ifp, eh) ; - if (bif == BDG_DROP) { - m_freem(m); - return; - } - if (len > ETHER_HDR_LEN) - ed_ring_copy(sc, buf + ETHER_HDR_LEN, - (char *)(eh + 1), len - ETHER_HDR_LEN); - } else - /* - * Get packet, including link layer address, from interface. - */ - ed_ring_copy(sc, buf, (char *)eh, len); + ed_ring_copy(sc, buf, (char *)eh, len); m->m_pkthdr.len = m->m_len = len; --sdtB3X0nJg68CQEu-- From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 21:20:37 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 309BA16A4CE; Sun, 5 Sep 2004 21:20:37 +0000 (GMT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5A1A43D41; Sun, 5 Sep 2004 21:20:36 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i85LKaIb023271; Sun, 5 Sep 2004 14:20:36 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i85LKaVv023270; Sun, 5 Sep 2004 14:20:36 -0700 (PDT) (envelope-from rizzo) Date: Sun, 5 Sep 2004 14:20:36 -0700 From: Luigi Rizzo To: Gleb Smirnoff Message-ID: <20040905142036.A23213@xorpc.icir.org> References: <20040905205249.GA81337@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040905205249.GA81337@cell.sick.ru>; from glebius@freebsd.org on Mon, Sep 06, 2004 at 12:52:49AM +0400 cc: hackers@freebsd.org cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? 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, 05 Sep 2004 21:20:37 -0000 On Mon, Sep 06, 2004 at 12:52:49AM +0400, Gleb Smirnoff wrote: > Luigi, > > I see that bridge callbacks are still living in if_ed.c > from FreeBSD 2.x times. See if_ed.c:2816. I think this is > not correct. > > Bridge code is called from ether_input(), which is > indirectly called from if_ed.c:2836. > > Any objections about attached patch? there are performance reasons to do this way -- grabbing the entire packet is expensive because it is done via programmed I/O, so the current code only grabs the header, does the filtering, and grabs the rest of the packet only if needed. Probably the current code runs bridge_in_ptr() twice, but I believe this is still cheaper than grabbing all packets entirely. I'd rather not apply the patch unless you can show that the current code leads to incorrect behaviour. cheers luigi > [ccing hackers@ and net@ to get more eyes reviewing] > > -- > Totus tuus, Glebius. > GLEBIUS-RIPN GLEB-RIPE > Index: if_ed.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/ed/if_ed.c,v > retrieving revision 1.233 > diff -u -r1.233 if_ed.c > --- if_ed.c 13 Aug 2004 23:04:23 -0000 1.233 > +++ if_ed.c 5 Sep 2004 20:48:19 -0000 > @@ -2810,26 +2810,9 @@ > eh = mtod(m, struct ether_header *); > > /* > - * Don't read in the entire packet if we know we're going to drop it > - * and no bpf is active. > + * Get packet, including link layer address, from interface. > */ > - if (!ifp->if_bpf && BDG_ACTIVE( (ifp) ) ) { > - struct ifnet *bif; > - > - ed_ring_copy(sc, buf, (char *)eh, ETHER_HDR_LEN); > - bif = bridge_in_ptr(ifp, eh) ; > - if (bif == BDG_DROP) { > - m_freem(m); > - return; > - } > - if (len > ETHER_HDR_LEN) > - ed_ring_copy(sc, buf + ETHER_HDR_LEN, > - (char *)(eh + 1), len - ETHER_HDR_LEN); > - } else > - /* > - * Get packet, including link layer address, from interface. > - */ > - ed_ring_copy(sc, buf, (char *)eh, len); > + ed_ring_copy(sc, buf, (char *)eh, len); > > m->m_pkthdr.len = m->m_len = len; > > _______________________________________________ > 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 Sep 5 21:37: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 82C4216A4CE; Sun, 5 Sep 2004 21:37:31 +0000 (GMT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E4D443D1D; Sun, 5 Sep 2004 21:37:31 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) i85LbVla053076; Sun, 5 Sep 2004 14:37:31 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id i85LbV1V053075; Sun, 5 Sep 2004 14:37:31 -0700 (PDT) (envelope-from dillon) Date: Sun, 5 Sep 2004 14:37:31 -0700 (PDT) From: Matthew Dillon Message-Id: <200409052137.i85LbV1V053075@apollo.backplane.com> To: Luigi Rizzo References: <20040905205249.GA81337@cell.sick.ru> <20040905142036.A23213@xorpc.icir.org> cc: hackers@freebsd.org cc: Gleb Smirnoff cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? 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, 05 Sep 2004 21:37:31 -0000 Well, wait a second... are we talking about a lot of packets being discarded by the filter in 'normal' operation, or are we talking about an attack? Because if we are takling about an attack the LAST ethernet device anyone would ever want to use would be ED. i.e. they would be under a major cpu load anyway and would be far better served using a better ethernet card. It seems silly to leave a major hack in the system just to support attacks on an ethernet device that nobody in their right mind would use if they expected to be attacked! Also, most ED devices are limited to 10BaseT (?), it's hard to imagine how the added load could possibly make things any worse then they would otherwise be, and similarly hard to imagine why anyone would want to use a programmed-I/O interface at 100BaseT or greater speeds (I'd say that the poor guy would deserve what he gets from that!). -Matt :there are performance reasons to do this way -- grabbing :the entire packet is expensive because it is done via programmed :I/O, so the current code only grabs the header, does the :filtering, and grabs the rest of the packet only if :needed. : :Probably the current code runs bridge_in_ptr() twice, but I :believe this is still cheaper than grabbing all packets :entirely. : :I'd rather not apply the patch unless you can show that :the current code leads to incorrect behaviour. : :cheers :luigi From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 21:38:26 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 B473916A4CE; Sun, 5 Sep 2004 21:38:26 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id F178F43D45; Sun, 5 Sep 2004 21:38:25 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i85LcNiE081695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 6 Sep 2004 01:38:24 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i85LcNHO081694; Mon, 6 Sep 2004 01:38:23 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Mon, 6 Sep 2004 01:38:23 +0400 From: Gleb Smirnoff To: Luigi Rizzo Message-ID: <20040905213823.GA81610@cell.sick.ru> References: <20040905205249.GA81337@cell.sick.ru> <20040905142036.A23213@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20040905142036.A23213@xorpc.icir.org> User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? 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, 05 Sep 2004 21:38:26 -0000 On Sun, Sep 05, 2004 at 02:20:36PM -0700, Luigi Rizzo wrote: L> > I see that bridge callbacks are still living in if_ed.c L> > from FreeBSD 2.x times. See if_ed.c:2816. I think this is L> > not correct. L> > L> > Bridge code is called from ether_input(), which is L> > indirectly called from if_ed.c:2836. L> > L> > Any objections about attached patch? L> L> there are performance reasons to do this way -- grabbing L> the entire packet is expensive because it is done via programmed L> I/O, so the current code only grabs the header, does the L> filtering, and grabs the rest of the packet only if L> needed. Well, what percentage of packets is usually dropped by bridge in normal operation? Performance degradation applies only to them. L> Probably the current code runs bridge_in_ptr() twice, but I L> believe this is still cheaper than grabbing all packets L> entirely. L> I'd rather not apply the patch unless you can show that L> the current code leads to incorrect behaviour. The problem is with layer intermixing. ed(4) is a device driver, it must pass its frames to Ethernet stack without any hacks. By the way ed(4) is the only driver which does this. Actually I'm working on the problem decribed here http://lists.freebsd.org/mailman/htdig/freebsd-net/2004-May/003881.html and one of the approaches I'm considering is to push the block (lines 569-615) from if_ethersubr.c into bridge.c. This probably requires small changes to bridge_in()/bdg_forward() logic, so it's caller must take care. We have only two callers now - ether_input(), which is OK and if_ed, which looks like a hack. P.S. Sam said, that there are plans to convert bridge to use pfil-hooks. If this happens, the code in if_ed.c will be on the way again. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 21:53: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 A40F316A4CF for ; Sun, 5 Sep 2004 21:53:44 +0000 (GMT) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A315E43D49 for ; Sun, 5 Sep 2004 21:53:43 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 26414 invoked from network); 5 Sep 2004 21:50:42 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 5 Sep 2004 21:50:42 -0000 Message-ID: <413B8AE7.F211C23@freebsd.org> Date: Sun, 05 Sep 2004 23:53:43 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Gleb Smirnoff References: <20040905205249.GA81337@cell.sick.ru> <20040905213823.GA81610@cell.sick.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Luigi Rizzo cc: hackers@freebsd.org cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? 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, 05 Sep 2004 21:53:44 -0000 Gleb Smirnoff wrote: > > On Sun, Sep 05, 2004 at 02:20:36PM -0700, Luigi Rizzo wrote: > L> > I see that bridge callbacks are still living in if_ed.c > L> > from FreeBSD 2.x times. See if_ed.c:2816. I think this is > L> > not correct. > L> > > L> > Bridge code is called from ether_input(), which is > L> > indirectly called from if_ed.c:2836. > L> > > L> > Any objections about attached patch? > L> > L> there are performance reasons to do this way -- grabbing > L> the entire packet is expensive because it is done via programmed > L> I/O, so the current code only grabs the header, does the > L> filtering, and grabs the rest of the packet only if > L> needed. > > Well, what percentage of packets is usually dropped by bridge in > normal operation? Performance degradation applies only to them. That depends on how many systems are behind the bridge. Every packet not needing to go to the other side is dropped. > L> Probably the current code runs bridge_in_ptr() twice, but I > L> believe this is still cheaper than grabbing all packets > L> entirely. > L> I'd rather not apply the patch unless you can show that > L> the current code leads to incorrect behaviour. > > The problem is with layer intermixing. ed(4) is a device > driver, it must pass its frames to Ethernet stack > without any hacks. By the way ed(4) is the only driver > which does this. Yes. And I fully agree with Matt here. Nobody in their right mind would use ed(4) for *anything* these days. The best would probably to remove ed(4) alltogether. (Only half kidding). I fully support removing this hack from ed(4) to get the API right again. *If* someone is actually affected by this I'm going to buy him a shiny fxp card off Ebay for $3.59. I don't want to offend Luigi at all but the times are over to support such major layering violations these days for such an obscure piece of hardware. This 6-current now and we don't even support 386 CPUs anymore. > Actually I'm working on the problem decribed here > > http://lists.freebsd.org/mailman/htdig/freebsd-net/2004-May/003881.html > > and one of the approaches I'm considering is to push the > block (lines 569-615) from if_ethersubr.c into bridge.c. This > probably requires small changes to bridge_in()/bdg_forward() > logic, so it's caller must take care. We have only two callers > now - ether_input(), which is OK and if_ed, which looks like > a hack. I'm not sure if I can follow the graph correctly. Shouldn't the straight line between where ng_ether_input and ng_ether_rcvdata branch be disconnected? The way it is drawn there looks like the packet is arrving double in the upper half? > P.S. Sam said, that there are plans to convert bridge to use pfil-hooks. > If this happens, the code in if_ed.c will be on the way again. No. What will move to pfil_hooks is the firewalling within the bridge code and the layer2 ethernet firewalling. The bridging code as such will stay where it is. -- Andre From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 23:01: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 1824216A4CE; Sun, 5 Sep 2004 23:01:03 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 387CF43D1F; Sun, 5 Sep 2004 23:01:03 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i85N11ip082369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 6 Sep 2004 03:01:02 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i85N10r6082352; Mon, 6 Sep 2004 03:01:00 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Mon, 6 Sep 2004 03:01:00 +0400 From: Gleb Smirnoff To: Luigi Rizzo Message-ID: <20040905230100.GA82214@cell.sick.ru> References: <20040905205249.GA81337@cell.sick.ru> <20040905142036.A23213@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20040905142036.A23213@xorpc.icir.org> User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? 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, 05 Sep 2004 23:01:04 -0000 On Sun, Sep 05, 2004 at 02:20:36PM -0700, Luigi Rizzo wrote: L> there are performance reasons to do this way -- grabbing L> the entire packet is expensive because it is done via programmed L> I/O, so the current code only grabs the header, does the L> filtering, and grabs the rest of the packet only if L> needed. Well, thinking deeply I have to admit that percentage of dropped packets can be high under normal operation. If we are connected to non-swithced network (e.g. coax) percentage of dropped packets is high... But my position didn't change, I absolutely agree with Andre. We can't keep this hack for the sake of very old and rare hardware. L> I'd rather not apply the patch unless you can show that L> the current code leads to incorrect behaviour. I suspect that packets dropped by bridge_in() called from if_ed will not be captured by bpf(4). This is incorrect. System administrators expect bpf(4) to be at the lowest possible layer, thinking "if packet came on wire - tcpdump must show it". -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 23:35: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 C55A116A4CE for ; Sun, 5 Sep 2004 23:35:01 +0000 (GMT) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id F37B543D55 for ; Sun, 5 Sep 2004 23:35:00 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 27045 invoked from network); 5 Sep 2004 23:31:58 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 5 Sep 2004 23:31:58 -0000 Message-ID: <413BA2A3.6E1FD0DF@freebsd.org> Date: Mon, 06 Sep 2004 01:34:59 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Sam Leffler References: <20040905205249.GA81337@cell.sick.ru> <20040905213823.GA81610@cell.sick.ru> <413B8AE7.F211C23@freebsd.org> <200409051623.59851.sam@errno.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org cc: freebsd-net@freebsd.org cc: Luigi Rizzo cc: Gleb Smirnoff cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? 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, 05 Sep 2004 23:35:02 -0000 Sam Leffler wrote: > > No. What will move to pfil_hooks is the firewalling within the bridge > > code and the layer2 ethernet firewalling. The bridging code as such > > will stay where it is. > > Well, that's what _you_ want to do :). What I started on last year was a > complete purge of special-purpose hooks in the network stack; replacing them > with pfil hooks (adding new hooks to do this). Revamping the bridge code was > part of this work and to do it I had to eliminate the API used by the ed > driver. As to whether you're planning to follow the path I started is > another matter (I pointed Gleb at you because you seemed to be going in that > direction and I figured you'd "see the light" after looking at the p4 branch > code I sent you :)). Ok, I still haven't looked at your code in p4. Will do that together with mlaier and then we'll make up our mind. ;-) P4web seems to be working fine again. Even if we take the one-step-at-a-time approach there is nothing preventing us from going the full way eventually and implementing your vision. -- Andre From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 6 05:29: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 B7E7C16A4CE; Mon, 6 Sep 2004 05:29:54 +0000 (GMT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92E2343D53; Mon, 6 Sep 2004 05:29:54 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i865TsIb026559; Sun, 5 Sep 2004 22:29:54 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i865TsCM026558; Sun, 5 Sep 2004 22:29:54 -0700 (PDT) (envelope-from rizzo) Date: Sun, 5 Sep 2004 22:29:54 -0700 From: Luigi Rizzo To: Gleb Smirnoff Message-ID: <20040905222954.A26501@xorpc.icir.org> References: <20040905205249.GA81337@cell.sick.ru> <20040905142036.A23213@xorpc.icir.org> <20040905230100.GA82214@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040905230100.GA82214@cell.sick.ru>; from glebius@freebsd.org on Mon, Sep 06, 2004 at 03:01:00AM +0400 cc: hackers@freebsd.org cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? 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, 06 Sep 2004 05:29:54 -0000 On Mon, Sep 06, 2004 at 03:01:00AM +0400, Gleb Smirnoff wrote: ... > L> I'd rather not apply the patch unless you can show that > L> the current code leads to incorrect behaviour. > > I suspect that packets dropped by bridge_in() called from if_ed will > not be captured by bpf(4). This is incorrect. if you read the code you see that the bpf behaviour is as it should be, and your suspect is unfounded. - if (!ifp->if_bpf && BDG_ACTIVE( (ifp) ) ) { (my summary and pov on the discussion in a separate email) cheers luigi From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 6 06:14: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 DF31A16A4CE; Mon, 6 Sep 2004 06:14:24 +0000 (GMT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id B115743D1F; Mon, 6 Sep 2004 06:14:24 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i866ELIb026902; Sun, 5 Sep 2004 23:14:21 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i866ELXh026901; Sun, 5 Sep 2004 23:14:21 -0700 (PDT) (envelope-from rizzo) Date: Sun, 5 Sep 2004 23:14:21 -0700 From: Luigi Rizzo To: Matthew Dillon Message-ID: <20040905231421.B26501@xorpc.icir.org> References: <20040905205249.GA81337@cell.sick.ru> <20040905142036.A23213@xorpc.icir.org> <200409052137.i85LbV1V053075@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200409052137.i85LbV1V053075@apollo.backplane.com>; from dillon@apollo.backplane.com on Sun, Sep 05, 2004 at 02:37:31PM -0700 cc: hackers@freebsd.org cc: Gleb Smirnoff cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? (My pov) 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, 06 Sep 2004 06:14:25 -0000 On Sun, Sep 05, 2004 at 02:37:31PM -0700, Matthew Dillon wrote: > Well, wait a second... are we talking about a lot of packets being > discarded by the filter in 'normal' operation, or are we talking about > an attack? Because if we are takling about an attack the LAST ethernet ... Sure, in this thread we are talking of a performance hack for a specific piece of hardware, which may be obsolete and poorly performing, but is also one of the few widespread ones supporting coax. Once upon a time, this hack was basically the only way to make a coax bridge perform decently and not saturate the bus (ISA or PCMCIA). Granted, these days maybe nobody uses coax anymore or has a desire to upgrade these boxes. If the existing code is broken (but please make a reasonable effort to prove it, don't just hint things) or gets in the way because e.g. it would complicate locking for everyone else, or because the bridge_in_ptr() or BDG_ACTIVE() calls disappear from the API, then i am all for the suggested change. But if the suggested change is something in preparation for other changes that may never see the light, then i'd rather just add a comment/reminder in the relevant bridging file, and nuke the code in if_ed.c and everywhere else when this becomes necessary. After all the problem (alleged layering violation) is well understood, and the offender (assuming this is the only one -- the way to check would be rename bridge_in_ptr() and BDG_ACTIVE() to something different and try a build of the kernel and modules) and the trivial fix are known so postponing the change is not going to harm anyone. Speaking about layering violation -- sure, the above bridge thing is a small one, but there are much worse (and more critical) offenders. E.g. the device driver preferably should not know who is going to consume its packets, and you are pointing the finger at the bridging code -- but this applies to bpf as well, yet several drivers still have explicit if (ifp->if_bpf) bpf_mtap(ifp, m_head); or implicit BPF_MTAP(ifp, m_head); bpf hooks. And another huge one is the support for delayed checksums, which permeates the entire network stack and breaks bpf feeding it with packets carrying invalid checksums. I guess the above means "do what you like, just don't put an 'Approved by: luigi' line in the commit msg" :) cheers luigi From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 6 11:13:00 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 3A5EF16A4CE for ; Mon, 6 Sep 2004 11:13:00 +0000 (GMT) Received: from mail.vanmaaren.org (maaren.demon.nl [82.161.132.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC49543D41 for ; Mon, 6 Sep 2004 11:12:59 +0000 (GMT) (envelope-from paul@vanmaaren.org) Received: by mail.vanmaaren.org (Postfix, from userid 1000) id 56775F1EF; Mon, 6 Sep 2004 13:13:03 +0200 (CEST) Date: Mon, 6 Sep 2004 13:13:02 +0200 From: paul@vanmaaren.org To: freebsd-hackers@freebsd.org Message-ID: <20040906111302.GB14506@fw1-lan.vanmaaren.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i Subject: MAC address change on 21040 "Tulip" Ethernet Adapter does not 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: Mon, 06 Sep 2004 11:13:00 -0000 Hello, On a FreeBSD 4.9 machine I want to change the MAC address on a DecChip 21040 "Tulip" Ethernet Adapter. So I type the following: # ifconfig de0 down # ifconfig de0 link 00:00:00:12:34:56 # ifconfig de0 de0: flags=8802 mtu 1500 ether 00:00:00:12:34:56 media: Ethernet autoselect (10baseT/UTP) status: active # dhclient de0 In another window: # tcpdump -n -e -i de0 tcpdump: listening on de0 12:33:40.010093 8:0:2b:e6:d4:26 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68 > 255.255.255.255.67: xid:0x8a4f8e11 ether 0:0:0:12:34:56 [|bootp] [tos 0x10] 12:33:40.019187 0:10:60:e7:6a:39 0:0:0:12:34:56 0800 342: 172.16.0.1.67 > 172.16.0.33.68: xid:0x8a4f8e11 Y:172.16.0.33 S:172.16.0.1 [|bootp] [tos 0x10] 12:33:40.105308 8:0:2b:e6:d4:26 ff:ff:ff:ff:ff:ff 0806 42: arp who-has 172.16.0.33 tell 172.16.0.33 >From the above is clear that the specified mac address is not used for putting things on the wire. It is used inside the packet though. Is this a known problem, and if so, can it be fixed? -- Regards, Paul From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 23:19: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 48A0316A4CE; Sun, 5 Sep 2004 23:19:47 +0000 (GMT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6FF443D1D; Sun, 5 Sep 2004 23:19:46 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.91] ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id i85NJkWi080781 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 5 Sep 2004 16:19:46 -0700 (PDT) (envelope-from sam@errno.com) From: Sam Leffler Organization: Errno Consulting To: freebsd-net@freebsd.org Date: Sun, 5 Sep 2004 16:23:59 -0700 User-Agent: KMail/1.6.2 References: <20040905205249.GA81337@cell.sick.ru> <20040905213823.GA81610@cell.sick.ru> <413B8AE7.F211C23@freebsd.org> In-Reply-To: <413B8AE7.F211C23@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409051623.59851.sam@errno.com> X-Mailman-Approved-At: Mon, 06 Sep 2004 12:03:53 +0000 cc: hackers@freebsd.org cc: Luigi Rizzo cc: Gleb Smirnoff cc: Andre Oppermann cc: net@freebsd.org Subject: Re: bridge callbacks in if_ed.c? 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, 05 Sep 2004 23:19:47 -0000 On Sunday 05 September 2004 02:53 pm, Andre Oppermann wrote: > Gleb Smirnoff wrote: > > On Sun, Sep 05, 2004 at 02:20:36PM -0700, Luigi Rizzo wrote: > > L> > I see that bridge callbacks are still living in if_ed.c > > L> > from FreeBSD 2.x times. See if_ed.c:2816. I think this is > > L> > not correct. > > L> > > > L> > Bridge code is called from ether_input(), which is > > L> > indirectly called from if_ed.c:2836. > > L> > > > L> > Any objections about attached patch? > > L> > > L> there are performance reasons to do this way -- grabbing > > L> the entire packet is expensive because it is done via programmed > > L> I/O, so the current code only grabs the header, does the > > L> filtering, and grabs the rest of the packet only if > > L> needed. > > > > Well, what percentage of packets is usually dropped by bridge in > > normal operation? Performance degradation applies only to them. > > That depends on how many systems are behind the bridge. Every packet > not needing to go to the other side is dropped. > > > L> Probably the current code runs bridge_in_ptr() twice, but I > > L> believe this is still cheaper than grabbing all packets > > L> entirely. > > L> I'd rather not apply the patch unless you can show that > > L> the current code leads to incorrect behaviour. > > > > The problem is with layer intermixing. ed(4) is a device > > driver, it must pass its frames to Ethernet stack > > without any hacks. By the way ed(4) is the only driver > > which does this. > > Yes. And I fully agree with Matt here. Nobody in their right mind > would use ed(4) for *anything* these days. The best would probably > to remove ed(4) alltogether. (Only half kidding). > > I fully support removing this hack from ed(4) to get the API right > again. *If* someone is actually affected by this I'm going to buy > him a shiny fxp card off Ebay for $3.59. I don't want to offend > Luigi at all but the times are over to support such major layering > violations these days for such an obscure piece of hardware. This > 6-current now and we don't even support 386 CPUs anymore. > > > Actually I'm working on the problem decribed here > > > > http://lists.freebsd.org/mailman/htdig/freebsd-net/2004-May/003881.html > > > > and one of the approaches I'm considering is to push the > > block (lines 569-615) from if_ethersubr.c into bridge.c. This > > probably requires small changes to bridge_in()/bdg_forward() > > logic, so it's caller must take care. We have only two callers > > now - ether_input(), which is OK and if_ed, which looks like > > a hack. > > I'm not sure if I can follow the graph correctly. Shouldn't the > straight line between where ng_ether_input and ng_ether_rcvdata > branch be disconnected? The way it is drawn there looks like the > packet is arrving double in the upper half? > > > P.S. Sam said, that there are plans to convert bridge to use pfil-hooks. > > If this happens, the code in if_ed.c will be on the way again. > > No. What will move to pfil_hooks is the firewalling within the bridge > code and the layer2 ethernet firewalling. The bridging code as such > will stay where it is. Well, that's what _you_ want to do :). What I started on last year was a complete purge of special-purpose hooks in the network stack; replacing them with pfil hooks (adding new hooks to do this). Revamping the bridge code was part of this work and to do it I had to eliminate the API used by the ed driver. As to whether you're planning to follow the path I started is another matter (I pointed Gleb at you because you seemed to be going in that direction and I figured you'd "see the light" after looking at the p4 branch code I sent you :)). Back to the original question, the issue is that for some devices you can save a lot by fetching only the header in order to do the bridge-routing logic. However since modern devices dma the entire packet into a pre-allocated buffer you typically gain little by this optimizatoin. This can still be a win as you can short-circuit some work by making this check before forming a complete packet and passing it up the stack but for most systems I don't figure this is important. If you're trying to build a high-performance bridge you're likely going to collapse a lot of this logic anyway and the bridge code in question would be combined with other logic. So my vote is to nuke the special code in the ed driver (and anywhere else; I recall there being one other driver that had similar logic) and make the bridge api more opaque. Sam From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 18:38: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 7BFD516A4CE for ; Sun, 5 Sep 2004 18:38:58 +0000 (GMT) Received: from smtp2.volja.net (smtp2.volja.net [217.72.64.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99C3943D2D for ; Sun, 5 Sep 2004 18:38:57 +0000 (GMT) (envelope-from huko8@volja.net) Received: from daniah8z5d8sqt (vo254-93.dial-up.volja.net [217.72.93.254]) by smtp2.volja.net (Postfix) with SMTP id AC21E154D6 for ; Sun, 5 Sep 2004 20:38:52 +0200 (CEST) Message-ID: <000801c492ae$75096010$fe5d48d9@daniah8z5d8sqt> From: "huko" To: Date: Sat, 4 Sep 2004 20:39:04 +0200 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 X-Mailman-Approved-At: Mon, 06 Sep 2004 12:05:11 +0000 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: problem 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, 05 Sep 2004 18:38:58 -0000 Sorry to steal your time. But I have a problem and I don=B4t know how to = fiksed it. I have a problem by the installation. The installation proceds normaly, but when I am going to configure my = grafick card and my monitor then stops all. The monitor paints black and the computer don=B4t responses anymore. And allso when a login and I tipe the command startx the computer = returns me an eror.=20 I have the Geforce 4 Fx5200 grafic card and the e-yama LCD 17" monitor. I think it has somethink to do with this. From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 6 22:12:18 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 6B6F916A4CE for ; Mon, 6 Sep 2004 22:12:18 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18E4443D41 for ; Mon, 6 Sep 2004 22:12:18 +0000 (GMT) (envelope-from caelian@gmail.com) Received: by mproxy.gmail.com with SMTP id 77so146532rnl for ; Mon, 06 Sep 2004 15:12:08 -0700 (PDT) Received: by 10.38.82.8 with SMTP id f8mr1622011rnb; Mon, 06 Sep 2004 15:12:08 -0700 (PDT) Received: by 10.38.79.10 with HTTP; Mon, 6 Sep 2004 15:12:08 -0700 (PDT) Message-ID: Date: Mon, 6 Sep 2004 15:12:08 -0700 From: Pascal Hofstee To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: pthread_mutex_trylock and glib-2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Pascal Hofstee List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 22:12:18 -0000 After a few hours of digging through both the glib-2 as well as the beep-media-player sources i finally managed to figure out why beep-media-player apprently crashes on startup when using libpthread, but not when using libc_r. i filed a bugreport against this problem on bugzilla.gnome.org ... in the hope to get some feedback from glib-developers ... http://bugzilla.gnome.org/show_bug.cgi?id=152009 The problem is with the actual return value of pthread_mutex_trylock returning EDEADLK instead of EBUSY. from what i have been able to glance from this previous discussion regarding this particular subject (http://lists.freebsd.org/pipermail/freebsd-threads/2004-January/001539.html) pthread_mutex_trylock should behave identical to pthread_mutex_lock except return immediately in case of a blocking mutex, which would suggest EDEADLK as a possible return value. This Seems to be the current implementation of both libpthread as well as libthr ... with libc_r being the sole exception. The pthread_mutex_trylock manpage however does not reflect this actual implementation and only mentions EBUSY and EINVAL. I was wondering assuming the implementation is actually correct if this could be rectified in the pthread_mutex_trylock manpage ... and if my assumption is wrong if the implementation could be changed to reflect the manpage. In the former case i will have to bug the glib-devs to change the implementation of their pthread_mutex_trylock wrapper ... to also check for EDEADLK. -- With kind regards, Pascal Hofstee From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 02:06: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 C090916A4CE; Tue, 7 Sep 2004 02:06:58 +0000 (GMT) Received: from mail.wolves.k12.mo.us (duey.wolves.k12.mo.us [207.160.214.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F32943D41; Tue, 7 Sep 2004 02:06:58 +0000 (GMT) (envelope-from cdillon@wolves.k12.mo.us) Received: from localhost (localhost [127.0.0.1]) by mail.wolves.k12.mo.us (Postfix) with ESMTP id DB2BE1FE27; Mon, 6 Sep 2004 21:06:57 -0500 (CDT) Received: from mail.wolves.k12.mo.us ([127.0.0.1]) by localhost (mail.wolves.k12.mo.us [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25501-01-5; Mon, 6 Sep 2004 21:06:56 -0500 (CDT) Received: by mail.wolves.k12.mo.us (Postfix, from userid 1001) id 1BE2F1FE25; Mon, 6 Sep 2004 21:06:56 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.wolves.k12.mo.us (Postfix) with ESMTP id 1A0E01A902; Mon, 6 Sep 2004 21:06:56 -0500 (CDT) Date: Mon, 6 Sep 2004 21:06:56 -0500 (CDT) From: Chris Dillon To: "Ralf S. Engelschall" In-Reply-To: <20040903113657.I4214@sasami.jurai.net> Message-ID: <20040906205640.U25187@duey.wolves.k12.mo.us> References: <20040903151831.GA84131@engelschall.com> <20040903113657.I4214@sasami.jurai.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at wolves.k12.mo.us cc: freebsd-hackers@FreeBSD.ORG cc: "Matthew N. Dodd" Subject: Re: Request for Review: UFS2 Snapshot Management Environment 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, 07 Sep 2004 02:06:58 -0000 On Fri, 3 Sep 2004, Matthew N. Dodd wrote: > On Fri, 3 Sep 2004, Ralf S. Engelschall wrote: > ... >> | $ cat /snap/home:hourly.1/rse/foo.txt /snap/home:hourly.0/rse/foo.txt >> foo.txt > > Now you just need to hack sys/kern/vfs_lookup.c to do the right > thing when you ask for /path/.snapshot. I recently set up a FreeBSD 5.3 box running Samba to hold all of our Windows users home directories. I've already had to restore a few files from the daily backups because somebody hosed their files in one way or another. Having hourly snapshots like this will be great. Currently I will have to set up special Samba access to the snapshot area which will make using them a bit harder, but having a '.snapshot' directory inside each directory would be ideal. Great work! From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 03:38: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 076AD16A4CE for ; Tue, 7 Sep 2004 03:38:22 +0000 (GMT) Received: from web53903.mail.yahoo.com (web53903.mail.yahoo.com [206.190.36.126]) by mx1.FreeBSD.org (Postfix) with SMTP id 7DB4343D54 for ; Tue, 7 Sep 2004 03:38:21 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040907033820.27882.qmail@web53903.mail.yahoo.com> Received: from [202.168.70.130] by web53903.mail.yahoo.com via HTTP; Mon, 06 Sep 2004 20:38:20 PDT Date: Mon, 6 Sep 2004 20:38:20 -0700 (PDT) From: Dennis George 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: Binding process to a fixed processor 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, 07 Sep 2004 03:38:22 -0000 Hi all, I am working on a intel based multi processor system. I like to know how can I bind one process permanently to one processor..... and other one for general use..... thanks in advance Dennis --------------------------------- Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 04:04: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 28EC416A4CE for ; Tue, 7 Sep 2004 04:04:32 +0000 (GMT) Received: from pimout3-ext.prodigy.net (pimout3-ext.prodigy.net [207.115.63.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39EF343D49 for ; Tue, 7 Sep 2004 04:04:31 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-69-104-103-54.dsl.snfc21.pacbell.net [69.104.103.54])i8744T3d160976; Tue, 7 Sep 2004 00:04:29 -0400 Message-ID: <413D334C.7040702@elischer.org> Date: Mon, 06 Sep 2004 21:04:28 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Dennis George References: <20040907033820.27882.qmail@web53903.mail.yahoo.com> In-Reply-To: <20040907033820.27882.qmail@web53903.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Binding process to a fixed processor 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, 07 Sep 2004 04:04:32 -0000 Dennis George wrote: > Hi all, > > I am working on a intel based multi processor system. I like to know > how can I bind one process permanently to one processor..... and other > one for general use..... > > thanks in advance > > Dennis > which version of the system are you using? > > > > --------------------------------- > Do you Yahoo!? > Win 1 of 4,000 free domain names from Yahoo! Enter now. > _______________________________________________ > 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 Tue Sep 7 04:09: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 69BA016A4CF for ; Tue, 7 Sep 2004 04:09:24 +0000 (GMT) Received: from web53908.mail.yahoo.com (web53908.mail.yahoo.com [206.190.36.218]) by mx1.FreeBSD.org (Postfix) with SMTP id E120243D4C for ; Tue, 7 Sep 2004 04:09:23 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040907040923.80287.qmail@web53908.mail.yahoo.com> Received: from [202.168.70.130] by web53908.mail.yahoo.com via HTTP; Mon, 06 Sep 2004 21:09:23 PDT Date: Mon, 6 Sep 2004 21:09:23 -0700 (PDT) From: Dennis George To: freebsd-hackers@freebsd.org In-Reply-To: <20040907033820.27882.qmail@web53903.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Support for SMT in latest FreeBSD 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, 07 Sep 2004 04:09:24 -0000 Hi all, I looking for SMT capability in freeBSD...... And found the following extract in a document... saying that 4.3 BSD has no support for SMT..... does the current/latest version of freeBSCD (5.2 or 6.0) has the support for SMT ?????? >>It (4.3 BSD) has no support for processor affinity or binding. It also has no mechanism for distinguishing between CPUs of varying capability, which is important for SMT (Symmetric Multi-Threading). Thanks in advance....... Dennis --------------------------------- Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 04:13: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 360DD16A4CE for ; Tue, 7 Sep 2004 04:13:08 +0000 (GMT) Received: from web53903.mail.yahoo.com (web53903.mail.yahoo.com [206.190.36.126]) by mx1.FreeBSD.org (Postfix) with SMTP id BC3E543D5A for ; Tue, 7 Sep 2004 04:13:05 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040907041305.35057.qmail@web53903.mail.yahoo.com> Received: from [202.168.70.130] by web53903.mail.yahoo.com via HTTP; Mon, 06 Sep 2004 21:13:05 PDT Date: Mon, 6 Sep 2004 21:13:05 -0700 (PDT) From: Dennis George To: Julian Elischer In-Reply-To: <413D334C.7040702@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-hackers@freebsd.org Subject: Re: Binding process to a fixed processor 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, 07 Sep 2004 04:13:08 -0000 Hi, I am working on freeBSD 5.2. Dennis Julian Elischer wrote: Dennis George wrote: > Hi all, > > I am working on a intel based multi processor system. I like to know > how can I bind one process permanently to one processor..... and other > one for general use..... > > thanks in advance > > Dennis > which version of the system are you using? > > > > --------------------------------- > Do you Yahoo!? > Win 1 of 4,000 free domain names from Yahoo! Enter now. > _______________________________________________ > 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!? New and Improved Yahoo! Mail - 100MB free storage! From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 04:58: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 1689D16A4CE for ; Tue, 7 Sep 2004 04:58:11 +0000 (GMT) Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E4BA43D49 for ; Tue, 7 Sep 2004 04:58:10 +0000 (GMT) (envelope-from stijn@pcwin002.win.tue.nl) Received: from pcwin002.win.tue.nl (localhost [127.0.0.1]) by pcwin002.win.tue.nl (8.13.1/8.13.1) with ESMTP id i874w9YE035157; Tue, 7 Sep 2004 06:58:09 +0200 (CEST) (envelope-from stijn@pcwin002.win.tue.nl) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.13.1/8.13.1/Submit) id i874w9vb035156; Tue, 7 Sep 2004 06:58:09 +0200 (CEST) (envelope-from stijn) Date: Tue, 7 Sep 2004 06:58:09 +0200 From: Stijn Hoop To: Pascal Hofstee Message-ID: <20040907045809.GB10111@pcwin002.win.tue.nl> Mail-Followup-To: Stijn Hoop , Pascal Hofstee , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pvezYHf7grwyp3Bc" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Bright-Idea: Let's abolish HTML mail! cc: freebsd-hackers@freebsd.org Subject: Re: pthread_mutex_trylock and glib-2 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, 07 Sep 2004 04:58:11 -0000 --pvezYHf7grwyp3Bc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, thanks for digging at this! On Mon, Sep 06, 2004 at 03:12:08PM -0700, Pascal Hofstee wrote: > After a few hours of digging through both the glib-2 as well as the > beep-media-player sources i finally managed to figure out why > beep-media-player apprently crashes on startup when using libpthread, > but not when using libc_r. >=20 > i filed a bugreport against this problem on bugzilla.gnome.org ... in > the hope to get some feedback from glib-developers ... >=20 > http://bugzilla.gnome.org/show_bug.cgi?id=3D152009 >=20 > The problem is with the actual return value of pthread_mutex_trylock > returning EDEADLK instead of EBUSY. >=20 > from what i have been able to glance from this previous discussion > regarding this particular subject > (http://lists.freebsd.org/pipermail/freebsd-threads/2004-January/001539.h= tml) >=20 > pthread_mutex_trylock should behave identical to pthread_mutex_lock > except return immediately in case of a blocking mutex, which would > suggest EDEADLK as a possible return value. Well, according to http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_trylo= ck.html (linked from the discussion above), I would read this: %%% The pthread_mutex_trylock() function shall fail if: [EBUSY] The mutex could not be acquired because it was already locked.=20 The pthread_mutex_lock() function may fail if: [EDEADLK] A deadlock condition was detected or the current thread already owns th= e mutex.=20 %%% as the glib developers apparently did -- namely that pthread_mutex_trylock cannot return EDEADLK, only EBUSY. The fact that it is the current thread that has already locked the mutex is only required to be detected by the pthread_mutex_lock function. In other words, I agree with Mike Makonnen in your quoted e-mail, but apparently the implementation does not. In any case, modifying glib to also check for EDEADLK would probably be appropriate. --Stijn --=20 I wish there was a knob on the TV to turn up the intelligence. There's a k= nob called `brightness', but it doesn't work." -- Gallagher --pvezYHf7grwyp3Bc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBPT/gY3r/tLQmfWcRAi2qAJwNTIPa4eiOzG5wBbxgXsBUKqiV+wCfVOuQ 7s7cSOgMe1ic28Q3j5XaoK0= =3mdA -----END PGP SIGNATURE----- --pvezYHf7grwyp3Bc-- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 05:22:33 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 1946116A4CE for ; Tue, 7 Sep 2004 05:22:33 +0000 (GMT) Received: from pimout2-ext.prodigy.net (pimout2-ext.prodigy.net [207.115.63.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4EC043D1D for ; Tue, 7 Sep 2004 05:22:32 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-69-104-103-54.dsl.snfc21.pacbell.net [69.104.103.54])i875MUvd246450; Tue, 7 Sep 2004 01:22:31 -0400 Message-ID: <413D4595.5000104@elischer.org> Date: Mon, 06 Sep 2004 22:22:29 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Dennis George References: <20040907040923.80287.qmail@web53908.mail.yahoo.com> In-Reply-To: <20040907040923.80287.qmail@web53908.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Support for SMT in latest FreeBSD 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, 07 Sep 2004 05:22:33 -0000 Dennis George wrote: > Hi all, > > I looking for SMT capability in freeBSD...... And found the following extract > in a document... saying that 4.3 BSD has no support for SMT..... does the > current/latest version of freeBSCD (5.2 or 6.0) has the support for SMT > ?????? > yes.. it's the current area of development. what do you want and I can tell you how well we support you.. > >>> It (4.3 BSD) has no support for processor affinity or binding. It also >>> has no mechanism for distinguishing between CPUs of varying capability, >>> which is important for SMT (Symmetric Multi-Threading). > > Thanks in advance....... Dennis > > > --------------------------------- Do you Yahoo!? Take Yahoo! Mail with you! > Get it on your mobile phone. _______________________________________________ > 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 Tue Sep 7 05:33:12 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 297F616A4CE for ; Tue, 7 Sep 2004 05:33:12 +0000 (GMT) Received: from pimout3-ext.prodigy.net (pimout3-ext.prodigy.net [207.115.63.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBD9F43D39 for ; Tue, 7 Sep 2004 05:33:11 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-69-104-103-54.dsl.snfc21.pacbell.net [69.104.103.54])i875X43d188038; Tue, 7 Sep 2004 01:33:05 -0400 Message-ID: <413D4810.7030904@elischer.org> Date: Mon, 06 Sep 2004 22:33:04 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Dennis George References: <20040907041305.35057.qmail@web53903.mail.yahoo.com> In-Reply-To: <20040907041305.35057.qmail@web53903.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Binding process to a fixed processor 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, 07 Sep 2004 05:33:12 -0000 Dennis George wrote: > Hi, > > I am working on freeBSD 5.2. > > Dennis > > Julian Elischer wrote: > Dennis George wrote: > >>Hi all, >> >>I am working on a intel based multi processor system. I like to know >>how can I bind one process permanently to one processor..... and other >>one for general use..... You can bind a thread to one processor, in the kernel, but I don't know offhand if there is a user interface for it however.. (I'd have to go look at the code again). (goes to look) There is code that can bind a thread to the current processor that it is on, but nothing uses it that I can see.. If you wrote a kernel module you could write your own syscall to use it.. This is of course different from binding a thread to a processor EXCLUSIVELY so that no other thread can use it. >> >>thanks in advance >> >>Dennis >> > > > which version of the system are you using? > > >> >> >>--------------------------------- >>Do you Yahoo!? >>Win 1 of 4,000 free domain names from Yahoo! Enter now. >>_______________________________________________ >>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!? > New and Improved Yahoo! Mail - 100MB free storage! > _______________________________________________ > 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 Tue Sep 7 06:18: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 8777B16A4CE for ; Tue, 7 Sep 2004 06:18:34 +0000 (GMT) Received: from web53909.mail.yahoo.com (web53909.mail.yahoo.com [206.190.36.219]) by mx1.FreeBSD.org (Postfix) with SMTP id 0527743D62 for ; Tue, 7 Sep 2004 06:18:34 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040907061832.14100.qmail@web53909.mail.yahoo.com> Received: from [202.168.70.130] by web53909.mail.yahoo.com via HTTP; Mon, 06 Sep 2004 23:18:32 PDT Date: Mon, 6 Sep 2004 23:18:32 -0700 (PDT) From: Dennis George To: freebsd-hackers@freebsd.org In-Reply-To: <413D4810.7030904@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: Binding process to a fixed processor 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, 07 Sep 2004 06:18:34 -0000 Actually I am looking for some command or system call which I can execute from my user level program so that I can bind one of my process to a processor............. like pbind command in Linux.............. Or do I have to write a system call to do that ?????????? Dennis Julian Elischer wrote: Dennis George wrote: > Hi, > > I am working on freeBSD 5.2. > > Dennis > > Julian Elischer wrote: > Dennis George wrote: > >>Hi all, >> >>I am working on a intel based multi processor system. I like to know >>how can I bind one process permanently to one processor..... and other >>one for general use..... You can bind a thread to one processor, in the kernel, but I don't know offhand if there is a user interface for it however.. (I'd have to go look at the code again). (goes to look) There is code that can bind a thread to the current processor that it is on, but nothing uses it that I can see.. If you wrote a kernel module you could write your own syscall to use it.. This is of course different from binding a thread to a processor EXCLUSIVELY so that no other thread can use it. >> >>thanks in advance >> >>Dennis >> > > > which version of the system are you using? > > >> >> >>--------------------------------- >>Do you Yahoo!? >>Win 1 of 4,000 free domain names from Yahoo! Enter now. >>_______________________________________________ >>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!? > New and Improved Yahoo! Mail - 100MB free storage! > _______________________________________________ > 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!? Y! Messenger - Communicate in real time. Download now. From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 06:20: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 DDED716A4D0 for ; Tue, 7 Sep 2004 06:20:28 +0000 (GMT) Received: from web53905.mail.yahoo.com (web53905.mail.yahoo.com [206.190.36.215]) by mx1.FreeBSD.org (Postfix) with SMTP id D8FC243D6A for ; Tue, 7 Sep 2004 06:20:12 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040907062012.39412.qmail@web53905.mail.yahoo.com> Received: from [202.168.70.130] by web53905.mail.yahoo.com via HTTP; Mon, 06 Sep 2004 23:20:12 PDT Date: Mon, 6 Sep 2004 23:20:12 -0700 (PDT) From: Dennis George To: Julian Elischer In-Reply-To: <413D4595.5000104@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-hackers@freebsd.org Subject: Re: Support for SMT in latest FreeBSD 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, 07 Sep 2004 06:20:29 -0000 Hi, Acutally I was wondering if there is no support for SMT / SMP then can freeBSD support dual processors..... Or can I utlize dual-processor in its fullness ????????? Dennis Julian Elischer wrote: Dennis George wrote: > Hi all, > > I looking for SMT capability in freeBSD...... And found the following extract > in a document... saying that 4.3 BSD has no support for SMT..... does the > current/latest version of freeBSCD (5.2 or 6.0) has the support for SMT > ?????? > yes.. it's the current area of development. what do you want and I can tell you how well we support you.. > >>> It (4.3 BSD) has no support for processor affinity or binding. It also >>> has no mechanism for distinguishing between CPUs of varying capability, >>> which is important for SMT (Symmetric Multi-Threading). > > Thanks in advance....... Dennis > > > --------------------------------- Do you Yahoo!? Take Yahoo! Mail with you! > Get it on your mobile phone. _______________________________________________ > 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!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 07:15: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 9D5FE16A4CE for ; Tue, 7 Sep 2004 07:15:16 +0000 (GMT) Received: from pimout3-ext.prodigy.net (pimout3-ext.prodigy.net [207.115.63.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5252743D5A for ; Tue, 7 Sep 2004 07:15:16 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-69-104-103-54.dsl.snfc21.pacbell.net [69.104.103.54])i877FE3d203688; Tue, 7 Sep 2004 03:15:14 -0400 Message-ID: <413D6001.8000609@elischer.org> Date: Tue, 07 Sep 2004 00:15:13 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Dennis George References: <20040907062012.39412.qmail@web53905.mail.yahoo.com> In-Reply-To: <20040907062012.39412.qmail@web53905.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Support for SMT in latest FreeBSD 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, 07 Sep 2004 07:15:16 -0000 Dennis George wrote: > Hi, > > Acutally I was wondering if there is no support for SMT / SMP then can > freeBSD support dual processors..... Or can I utlize dual-processor in its > fullness ????????? yes. in 5.3 or 6.0 very yes in 5.2 yes in 4.x mostly yes :-) > > Dennis > > Julian Elischer wrote: Dennis George wrote: > >> Hi all, >> >> I looking for SMT capability in freeBSD...... And found the following >> extract in a document... saying that 4.3 BSD has no support for SMT..... >> does the current/latest version of freeBSCD (5.2 or 6.0) has the support >> for SMT ?????? >> > > > yes.. it's the current area of development. > > what do you want and I can tell you how well we support you.. > > > >>>> It (4.3 BSD) has no support for processor affinity or binding. It also >>>> has no mechanism for distinguishing between CPUs of varying capability, >>>> which is important for SMT (Symmetric Multi-Threading). >> >> Thanks in advance....... Dennis >> >> >> --------------------------------- Do you Yahoo!? Take Yahoo! Mail with you! >> Get it on your mobile phone. >> _______________________________________________ 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!? Tired of > spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 11:31:57 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 85DFC16A4CE for ; Tue, 7 Sep 2004 11:31:57 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3084643D54 for ; Tue, 7 Sep 2004 11:31:57 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i87BVrjf026625; Tue, 7 Sep 2004 07:31:54 -0400 (EDT) Date: Tue, 7 Sep 2004 07:31:53 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Julian Elischer In-Reply-To: <413D6001.8000609@elischer.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: freebsd-hackers@freebsd.org cc: Dennis George Subject: Re: Support for SMT in latest FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2004 11:31:57 -0000 On Tue, 7 Sep 2004, Julian Elischer wrote: > Dennis George wrote: > > Hi, > > > > Acutally I was wondering if there is no support for SMT / SMP then can > > freeBSD support dual processors..... Or can I utlize dual-processor in its > > fullness ????????? Actually, I think he's more insterested in threading across multiple processors, so: > > yes. > in 5.3 or 6.0 very yes With libpthread or libthr in 5.3 and -current, yes. With libc_r, no. > in 5.2 yes With libkse (renamed to libpthread in 5.3 and -current) and libthr, yes, but both are experimental in this release. You really want 5.3 or -current if you want to use libpthread or libthr. With libc_r, no. > in 4.x mostly yes Only with the linuxthreads port. With libc_r, no. Neither libpthread nor libthr are available for 4.x (and won't be). There is no pbind() or processor_bind() (ala Solaris) in FreeBSD (yet). Julian has to add them ;-) -- Dan Eischen From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 14:26: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 9F2A316A4E2 for ; Tue, 7 Sep 2004 14:26:08 +0000 (GMT) Received: from mailserv1.neuroflux.com (mailserv1.neuroflux.com [204.228.228.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40B0B43D53 for ; Tue, 7 Sep 2004 14:26:08 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: (qmail 51435 invoked by uid 89); 7 Sep 2004 14:32:14 -0000 Received: from unknown (HELO www2.neuroflux.com) (127.0.0.1) by localhost with SMTP; 7 Sep 2004 14:32:14 -0000 Received: from 208.4.77.15 (SquirrelMail authenticated user ryans@gamersimpact.com) by www2.neuroflux.com with HTTP; Tue, 7 Sep 2004 08:32:14 -0600 (MDT) Message-ID: <57396.208.4.77.15.1094567534.squirrel@www2.neuroflux.com> Date: Tue, 7 Sep 2004 08:32:14 -0600 (MDT) From: "Ryan Sommers" To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal Subject: IPFIREWALL_VERBOSE stopped logging? 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, 07 Sep 2004 14:26:08 -0000 I'm trying to figure out why my firewall has stopped logging to /var/log/security. The last entry was from Aug 17 and there has been at least one restart and a few hundred thousand packets denied. FreeBSD ***** 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #1: Thu Jul 1 18:24:26 CDT 2004 root@moleman:/usr/obj/usr/src/sys/MOLEMAN i386 (root@node15):~:#ipfw list | tail -2 03000 deny log tcp from any to any in via xl0 setup 65535 deny ip from any to any (root@node15):~:#sysctl net.inet.ip.fw net.inet.ip.fw.enable: 1 net.inet.ip.fw.autoinc_step: 100 net.inet.ip.fw.one_pass: 1 net.inet.ip.fw.debug: 1 net.inet.ip.fw.verbose: 1 net.inet.ip.fw.verbose_limit: 0 (truncated) (root@node15):~:#grep security /etc/syslog.conf security.* /var/log/security What am I missing? -- Ryan "leadZERO" Sommers Gamer's Impact President ryans@gamersimpact.com ICQ: 1019590 AIM/MSN: leadZERO -= http://www.gamersimpact.com =- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 16:08:18 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 3E77F16A4CE for ; Tue, 7 Sep 2004 16:08:18 +0000 (GMT) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 546B343D48 for ; Tue, 7 Sep 2004 16:08:17 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received-SPF: pass (mp2.macomnet.net: domain of maxim@macomnet.ru designates 127.0.0.1 as permitted sender) receiver=mp2.macomnet.net; client_ip=127.0.0.1; envelope-from=maxim@macomnet.ru; Received: from localhost (kphbwai7@localhost [127.0.0.1]) by mp2.macomnet.net (8.12.11/8.12.11) with ESMTP id i87G8EFA026572; Tue, 7 Sep 2004 20:08:15 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Tue, 7 Sep 2004 20:08:14 +0400 (MSD) From: Maxim Konovalov To: Ryan Sommers In-Reply-To: <57396.208.4.77.15.1094567534.squirrel@www2.neuroflux.com> Message-ID: <20040907200411.M26459@mp2.macomnet.net> References: <57396.208.4.77.15.1094567534.squirrel@www2.neuroflux.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: IPFIREWALL_VERBOSE stopped logging? 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, 07 Sep 2004 16:08:18 -0000 On Tue, 7 Sep 2004, 08:32-0600, Ryan Sommers wrote: > I'm trying to figure out why my firewall has stopped logging to > /var/log/security. The last entry was from Aug 17 and there has been at > least one restart and a few hundred thousand packets denied. > > FreeBSD ***** 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #1: Thu Jul 1 > 18:24:26 CDT 2004 root@moleman:/usr/obj/usr/src/sys/MOLEMAN i386 > > (root@node15):~:#ipfw list | tail -2 > 03000 deny log tcp from any to any in via xl0 setup > 65535 deny ip from any to any > > (root@node15):~:#sysctl net.inet.ip.fw > net.inet.ip.fw.enable: 1 > net.inet.ip.fw.autoinc_step: 100 > net.inet.ip.fw.one_pass: 1 > net.inet.ip.fw.debug: 1 > net.inet.ip.fw.verbose: 1 > net.inet.ip.fw.verbose_limit: 0 > (truncated) > > (root@node15):~:#grep security /etc/syslog.conf > security.* /var/log/security > > What am I missing? Previous ipfw rules, 'ipfw sh' instead of 'ipfw list' and a tail of the /var/log/security :-) -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 18:35:30 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 815) id C397316A553; Tue, 7 Sep 2004 18:35:09 +0000 (GMT) Date: Tue, 7 Sep 2004 18:35:09 +0000 From: Murray Stokely To: hackers@freebsd.org Message-ID: <20040907183509.GD8296@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-GPG-Key-ID: 1024D/0E451F7D X-GPG-Key-Fingerprint: E2CA 411D DD44 53FD BB4B 3CB5 B4D7 10A2 0E45 1F7D Subject: Large FreeBSD Users / Impressive Metrics 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, 07 Sep 2004 18:35:31 -0000 I'm working on updating our advocacy material used on the website, in the Handbook, and now in a set of generic slides that can be used or adapted for presentations. If you have ideas about cool new functionality that we should do a better job of touting, know of large FreeBSD users (I could especially use more pointers to embedded uses of FreeBSD), or otherwise have impressive statistics or benchmarks that we should be getting more leverage out of, please let me know. Thanks! - Murray ----- Forwarded message from Murray Stokely ----- From: Murray Stokely Date: Tue, 7 Sep 2004 18:09:32 +0000 (UTC) To: doc-committers@FreeBSD.org, cvs-doc@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: doc/en_US.ISO8859-1/slides/common freebsd-users.xml murray 2004-09-07 18:09:32 UTC FreeBSD doc repository Added files: en_US.ISO8859-1/slides/common freebsd-users.xml Log: Add three slides about users of FreeBSD. * General (large websites, Netcraft numbers, etc..) * FreeBSD in the Banking Industry * FreeBSD used in Internet Infrastructure This could really use a slide about FreeBSD in the high-end embedded market. Revision Changes Path 1.1 +86 -0 doc/en_US.ISO8859-1/slides/common/freebsd-users.xml (new) ----- End forwarded message ----- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 18:47: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 E510C16A4CE; Tue, 7 Sep 2004 18:47:47 +0000 (GMT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1944A43D49; Tue, 7 Sep 2004 18:47:47 +0000 (GMT) (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.2.R) with ESMTP id md50000532067.msg; Tue, 07 Sep 2004 19:42:13 +0100 Message-ID: <028501c4950b$23f675f0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Murray Stokely" , References: <20040907183509.GD8296@hub.freebsd.org> Date: Tue, 7 Sep 2004 19:47:07 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Spam-Processed: multiplay.co.uk, Tue, 07 Sep 2004 19:42:13 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDAV-Processed: multiplay.co.uk, Tue, 07 Sep 2004 19:42:16 +0100 Subject: Re: Large FreeBSD Users / Impressive Metrics 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, 07 Sep 2004 18:47:48 -0000 Possibly of interest for you then, we run around 100 machines providing public and clan based game servers mainly on FreeBSD. A few months back did some benchmarking OS vs OS some of the highlights are here: http://gaming.multiplay.co.uk/stats/server_os_comparison.htm FreeBSD does very well in a number of tests. Steve ----- Original Message ----- From: "Murray Stokely" To: Sent: Tuesday, September 07, 2004 7:35 PM Subject: Large FreeBSD Users / Impressive Metrics > I'm working on updating our advocacy material used on the website, in > the Handbook, and now in a set of generic slides that can be used or > adapted for presentations. > > If you have ideas about cool new functionality that we should do a > better job of touting, know of large FreeBSD users (I could especially > use more pointers to embedded uses of FreeBSD), or otherwise have > impressive statistics or benchmarks that we should be getting more > leverage out of, please let me know. ================================================ 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 Sep 7 19:57: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 A8C7C16A4CE for ; Tue, 7 Sep 2004 19:57:19 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BE8343D54 for ; Tue, 7 Sep 2004 19:57:19 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 4541 invoked from network); 7 Sep 2004 19:57:19 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 7 Sep 2004 19:57:18 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i87Jv1Fo006626; Tue, 7 Sep 2004 15:57:15 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Tue, 7 Sep 2004 14:57:32 -0400 User-Agent: KMail/1.6.2 References: <20040907183509.GD8296@hub.freebsd.org> In-Reply-To: <20040907183509.GD8296@hub.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409071457.32711.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: hackers@FreeBSD.org cc: Murray Stokely Subject: Re: Large FreeBSD Users / Impressive Metrics 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, 07 Sep 2004 19:57:19 -0000 On Tuesday 07 September 2004 02:35 pm, Murray Stokely wrote: > I'm working on updating our advocacy material used on the website, in > the Handbook, and now in a set of generic slides that can be used or > adapted for presentations. > > If you have ideas about cool new functionality that we should do a > better job of touting, know of large FreeBSD users (I could especially > use more pointers to embedded uses of FreeBSD), or otherwise have > impressive statistics or benchmarks that we should be getting more > leverage out of, please let me know. The Weather Channel uses FreeBSD to do realtime audio/video presentation in hundreds of locations across the US serving content to millions of cable and satellite customers in a "smart device". (I'm not sure a 4U box really qualifies as "embedded", at least via traditional definitions of "embedded". :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 19:57: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 B8E5216A4D0 for ; Tue, 7 Sep 2004 19:57:19 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B87A43D58 for ; Tue, 7 Sep 2004 19:57:19 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 4541 invoked from network); 7 Sep 2004 19:57:19 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 7 Sep 2004 19:57:18 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i87Jv1Fo006626; Tue, 7 Sep 2004 15:57:15 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Tue, 7 Sep 2004 14:57:32 -0400 User-Agent: KMail/1.6.2 References: <20040907183509.GD8296@hub.freebsd.org> In-Reply-To: <20040907183509.GD8296@hub.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409071457.32711.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: hackers@FreeBSD.org cc: Murray Stokely Subject: Re: Large FreeBSD Users / Impressive Metrics 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, 07 Sep 2004 19:57:19 -0000 On Tuesday 07 September 2004 02:35 pm, Murray Stokely wrote: > I'm working on updating our advocacy material used on the website, in > the Handbook, and now in a set of generic slides that can be used or > adapted for presentations. > > If you have ideas about cool new functionality that we should do a > better job of touting, know of large FreeBSD users (I could especially > use more pointers to embedded uses of FreeBSD), or otherwise have > impressive statistics or benchmarks that we should be getting more > leverage out of, please let me know. The Weather Channel uses FreeBSD to do realtime audio/video presentation in hundreds of locations across the US serving content to millions of cable and satellite customers in a "smart device". (I'm not sure a 4U box really qualifies as "embedded", at least via traditional definitions of "embedded". :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 20:03: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 0375416A4CE for ; Tue, 7 Sep 2004 20:03:52 +0000 (GMT) Received: from ds.netgate.net (ds.netgate.net [205.214.170.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id E843E43D5C for ; Tue, 7 Sep 2004 20:03:51 +0000 (GMT) (envelope-from ctodd@chrismiller.com) Received: (qmail 30594 invoked from network); 7 Sep 2004 20:03:51 -0000 Received: from vp4.netgate.net (ibrew@205.214.170.248) by ds.netgate.net with SMTP; 7 Sep 2004 20:03:51 -0000 Date: Tue, 7 Sep 2004 13:03:51 -0700 (PDT) From: ctodd@chrismiller.com X-X-Sender: ibrew@vp4.netgate.net To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Booting encrypted 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, 07 Sep 2004 20:03:52 -0000 Has any work been done to boot from an encrypted filesystem, or otherwise modify the loader to support GBDE with a "compiled-in" passphrase? The purpose would be to prevent reverse engineering of an appliance based on FreeBSD. Thoughts, ideas? Thanks! Chris From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 20:22: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 3336616A4CE for ; Tue, 7 Sep 2004 20:22:09 +0000 (GMT) Received: from wattres.Watt.COM (wattres.watt.com [66.93.133.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 113DA43D2D for ; Tue, 7 Sep 2004 20:22:09 +0000 (GMT) (envelope-from steve@Watt.COM) Received: (from steve@localhost) by wattres.Watt.COM (8.12.11/8.12.11) id i87KM7Kf049770; Tue, 7 Sep 2004 13:22:07 -0700 (PDT) (envelope-from steve) Message-Id: <200409072022.i87KM7Kf049770@wattres.Watt.COM> X-Newsgroups: local.freebsd-hackers In-Reply-To: Organization: Watt Consultants, San Jose, CA, USA From: steve@Watt.COM (Steve Watt) Date: Tue, 7 Sep 2004 13:22:07 -0700 X-Mailer: Mail User's Shell (7.2.6 beta(5) jp(8) 11/23/00) To: ctodd@chrismiller.com cc: hackers@freebsd.org Subject: Re: Booting encrypted 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, 07 Sep 2004 20:22:09 -0000 In article you write: > >Has any work been done to boot from an encrypted filesystem, or otherwise >modify the loader to support GBDE with a "compiled-in" passphrase? The >purpose would be to prevent reverse engineering of an appliance based on >FreeBSD. Thoughts, ideas? Having the password compiled in to something that's necessarily clear-text on the same media? You're not adding anything resembling a challenge for someone who's really interested in reverse-engineering your system. Any user (I won't call such a person *acker) incapable of getting around such a thing probably won't be trying to reverse-engineer it anyhow. -- 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 Tue Sep 7 20:33: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 0DD8616A4CE; Tue, 7 Sep 2004 20:33:53 +0000 (GMT) Received: from prioris.mini.pw.edu.pl (prioris.mini.pw.edu.pl [194.29.178.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3BF943D49; Tue, 7 Sep 2004 20:33:52 +0000 (GMT) (envelope-from zaks@prioris.mini.pw.edu.pl) Received: from localhost (localhost.mini.pw.edu.pl [127.0.0.1]) by prioris.mini.pw.edu.pl (Postfix) with ESMTP id 811C3367E5A; Tue, 7 Sep 2004 22:33:50 +0200 (CEST) Received: by prioris.mini.pw.edu.pl (Postfix, from userid 250) id 45507367E54; Tue, 7 Sep 2004 22:33:41 +0200 (CEST) Date: Tue, 7 Sep 2004 22:33:41 +0200 From: Slawek Zak To: current@freebsd.org, hackers@freebsd.org, m.hunker@hefel.at Message-ID: <20040907203340.GA79170@prioris.mini.pw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Virus-Scanned: by AMaViS (prioris) Subject: Some SuCon 02 Photos 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, 07 Sep 2004 20:33:53 -0000 Hi, You can find some admittedly amateur photos taken at SuCon 2004 here: http://prioris.mini.pw.edu.pl/~zaks/SuCon%202004/ /S From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 20:54: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 311CB16A4CE for ; Tue, 7 Sep 2004 20:54:44 +0000 (GMT) Received: from ds.netgate.net (ds.netgate.net [205.214.170.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 076B843D2D for ; Tue, 7 Sep 2004 20:54:44 +0000 (GMT) (envelope-from ctodd@chrismiller.com) Received: (qmail 9654 invoked from network); 7 Sep 2004 20:54:43 -0000 Received: from vp4.netgate.net (ibrew@205.214.170.248) by ds.netgate.net with SMTP; 7 Sep 2004 20:54:43 -0000 Date: Tue, 7 Sep 2004 13:54:43 -0700 (PDT) From: ctodd@chrismiller.com X-X-Sender: ibrew@vp4.netgate.net To: Steve Watt In-Reply-To: <200409072022.i87KM7Kf049770@wattres.Watt.COM> Message-ID: References: <200409072022.i87KM7Kf049770@wattres.Watt.COM> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: Booting encrypted 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, 07 Sep 2004 20:54:44 -0000 > Having the password compiled in to something that's necessarily clear-text > on the same media? If the authorization mechanism is limited to plain text, then yes. I know that "strings" can be used to attempt to find the passphrase in the load, but there may be ways to prevent the passphrase from being retrieved in this manner. > You're not adding anything resembling a challenge for someone who's really > interested in reverse-engineering your system. Any user (I won't call such > a person *acker) incapable of getting around such a thing probably won't > be trying to reverse-engineer it anyhow. Well the point is to have a system where the entire filesystem (except the loader of coarse) is encrypted. Runtime access to the system via the shell would be removed or locked down. I wasn't able to find any info about booting encrypted filesystems, but I can't believe I'm the only one that has raised the question. Chris From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 21:15:10 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 B76F016A57C for ; Tue, 7 Sep 2004 21:15:10 +0000 (GMT) Received: from wattres.Watt.COM (wattres.watt.com [66.93.133.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 929A343D4C for ; Tue, 7 Sep 2004 21:15:10 +0000 (GMT) (envelope-from steve@Watt.COM) Received: (from steve@localhost) by wattres.Watt.COM (8.12.11/8.12.11) id i87LF9HS053419; Tue, 7 Sep 2004 14:15:09 -0700 (PDT) (envelope-from steve) Message-Id: <200409072115.i87LF9HS053419@wattres.Watt.COM> From: steve@Watt.COM (Steve Watt) Date: Tue, 7 Sep 2004 14:15:09 -0700 In-Reply-To: ctodd@chrismiller.com "Re: Booting encrypted" (Sep 7, 13:54) X-Mailer: Mail User's Shell (7.2.6 beta(5) jp(8) 11/23/00) To: ctodd@chrismiller.com cc: hackers@freebsd.org Subject: Re: Booting encrypted 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, 07 Sep 2004 21:15:10 -0000 On Sep 7, 13:54, ctodd@chrismiller.com wrote: } Subject: Re: Booting encrypted } } > Having the password compiled in to something that's necessarily clear-text } > on the same media? } } If the authorization mechanism is limited to plain text, then yes. I know } that "strings" can be used to attempt to find the passphrase in the load, } but there may be ways to prevent the passphrase from being retrieved in } this manner. It can be a 256-bit AES key for all I care -- it simply must be the key necessary to decrypt the remaining contents of the filesystem available in a way that it can be fed to the crypto algorithm and get plain-text of the filesystem out. And the key must be in plain-text, because you don't have any keys available to decrypt the key... } > You're not adding anything resembling a challenge for someone who's really } > interested in reverse-engineering your system. Any user (I won't call such } > a person *acker) incapable of getting around such a thing probably won't } > be trying to reverse-engineer it anyhow. } } Well the point is to have a system where the entire filesystem (except the } loader of coarse) is encrypted. Runtime access to the system via the shell } would be removed or locked down. } } I wasn't able to find any info about booting encrypted filesystems, but I } can't believe I'm the only one that has raised the question. Because it doesn't contribute any security to the system to have the bootable partition encrypted, or else you wind up requiring a password to boot (not necessarily a bad thing, but probably not appropriate for your application). -- 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 Tue Sep 7 21:41: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 6C0E416A4CE for ; Tue, 7 Sep 2004 21:41:22 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5A5A43D2F for ; Tue, 7 Sep 2004 21:41:21 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id D169B651F7; Tue, 7 Sep 2004 22:41:19 +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 62808-01-2; Tue, 7 Sep 2004 22:41:19 +0100 (BST) Received: from empiric.dek.spc.org (dhcp113.icir.org [192.150.187.113]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 6E741651F4; Tue, 7 Sep 2004 22:41:18 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 784576427; Tue, 7 Sep 2004 14:41:16 -0700 (PDT) Date: Tue, 7 Sep 2004 14:41:16 -0700 From: Bruce M Simpson To: ctodd@chrismiller.com Message-ID: <20040907214116.GB815@empiric.icir.org> References: <200409072022.i87KM7Kf049770@wattres.Watt.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: Steve Watt cc: hackers@freebsd.org Subject: Re: Booting encrypted 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, 07 Sep 2004 21:41:22 -0000 On Tue, Sep 07, 2004 at 01:54:43PM -0700, ctodd@chrismiller.com wrote: > If the authorization mechanism is limited to plain text, then yes. I know > that "strings" can be used to attempt to find the passphrase in the load, > but there may be ways to prevent the passphrase from being retrieved in > this manner. On the other hand, you could use TCPA. Support for the TCPA chips found in many recent IBM machines, particularly the ThinkPad T4x series, was written for NetBSD by the folks at CITI. It's on my wishlist. You could probably teach GDBE about TCPA key retrieval, but the upshot is, you still need to log in to the TCPA chip. However, if you activated TCPA and only allowed it to boot your FreeBSD-derived product OS, by means of their signature mechanism, then you might well achieve your stated aims. BMS From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 00:08: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 3C16916A4CE for ; Wed, 8 Sep 2004 00:08:20 +0000 (GMT) Received: from north-zone.net (wh1.north-zone.net [65.110.60.200]) by mx1.FreeBSD.org (Postfix) with SMTP id 7B46543D1F for ; Wed, 8 Sep 2004 00:08:15 +0000 (GMT) (envelope-from nicobn@quebecbsd.org) Received: (qmail 73971 invoked by uid 80); 8 Sep 2004 00:08:50 -0000 Received: from 69.70.227.33 (SquirrelMail authenticated user nicobn@quebecbsd.org) by webmail.north-zone.net with HTTP; Wed, 8 Sep 2004 00:08:50 -0000 (GMT) Message-ID: <3124.69.70.227.33.1094602130.squirrel@webmail.north-zone.net> Date: Wed, 8 Sep 2004 00:08:50 -0000 (GMT) From: Nicolas =?iso-8859-1?Q?B=E9rard_Nault?= To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal Subject: Re: Large FreeBSD Users / Impressive Metrics X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: nicobn@quebecbsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 00:08:20 -0000 Correct me if I'm wrong but those servers have to run in linux emulation ? If I'm right, that could explain why it can be slower sometimes. Also, do your servers use STABLE or CURRENT ? Steven Hartland said: > Possibly of interest for you then, we run around 100 machines > providing public and clan based game servers mainly on FreeBSD. > A few months back did some benchmarking OS vs OS some of > the highlights are here: > http://gaming.multiplay.co.uk/stats/server_os_comparison.htm > > FreeBSD does very well in a number of tests. > > Steve > ----- Original Message ----- > From: "Murray Stokely" > To: > Sent: Tuesday, September 07, 2004 7:35 PM > Subject: Large FreeBSD Users / Impressive Metrics > > >> I'm working on updating our advocacy material used on the website, in the Handbook, and now in a set of generic slides that can be used or adapted for presentations. >> >> If you have ideas about cool new functionality that we should do a better job of touting, know of large FreeBSD users (I could especially use more pointers to embedded uses of FreeBSD), or otherwise have impressive statistics or benchmarks that we should be getting more leverage out of, please let me know. > > > ================================================ > 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. > > _______________________________________________ > 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" > -- Nicolas Bérard Nault (nicobn@quebecbsd.org) http://staff.xeatech.net/nicobn PGP public key: 0x64159509 From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 01:27: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 75C0D16A4CE for ; Wed, 8 Sep 2004 01:27:16 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 016AC43D5A for ; Wed, 8 Sep 2004 01:27:16 +0000 (GMT) (envelope-from caelian@gmail.com) Received: by mproxy.gmail.com with SMTP id 77so230574rnl for ; Tue, 07 Sep 2004 18:27:15 -0700 (PDT) Received: by 10.38.82.8 with SMTP id f8mr2400010rnb; Tue, 07 Sep 2004 18:27:14 -0700 (PDT) Received: by 10.38.79.10 with HTTP; Tue, 7 Sep 2004 18:27:14 -0700 (PDT) Message-ID: Date: Tue, 7 Sep 2004 18:27:14 -0700 From: Pascal Hofstee To: freebsd-hackers@freebsd.org In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_171_15976079.1094606834411" References: cc: gnome@FreeBSD.org Subject: Re: pthread_mutex_trylock and glib-2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Pascal Hofstee List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 01:27:16 -0000 ------=_Part_171_15976079.1094606834411 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, 6 Sep 2004 15:12:08 -0700, Pascal Hofstee wrote: > After a few hours of digging through both the glib-2 as well as the > beep-media-player sources i finally managed to figure out why > beep-media-player apprently crashes on startup when using libpthread, > but not when using libc_r. > > i filed a bugreport against this problem on bugzilla.gnome.org ... in > the hope to get some feedback from glib-developers ... > > http://bugzilla.gnome.org/show_bug.cgi?id=152009 > > The problem is with the actual return value of pthread_mutex_trylock > returning EDEADLK instead of EBUSY. > > from what i have been able to glance from this previous discussion > regarding this particular subject > (http://lists.freebsd.org/pipermail/freebsd-threads/2004-January/001539.html) > > pthread_mutex_trylock should behave identical to pthread_mutex_lock > except return immediately in case of a blocking mutex, which would > suggest EDEADLK as a possible return value. > > This Seems to be the current implementation of both libpthread as well > as libthr ... with libc_r being the sole exception. > > The pthread_mutex_trylock manpage however does not reflect this actual > implementation and only mentions EBUSY and EINVAL. > > I was wondering assuming the implementation is actually correct if > this could be rectified in the pthread_mutex_trylock manpage ... and > if my assumption is wrong if the implementation could be changed to > reflect the manpage. > > In the former case i will have to bug the glib-devs to change the > implementation of their pthread_mutex_trylock wrapper ... to also > check for EDEADLK. I am hereby including an updated /usr/ports/devel/glib20/files/patch-gthread_gthread-posix.c that includes the additional check for EDEADLK besides EBUSY in glib's g_mutex_trylock_posix_impl function. With this fix applied to my installation of glib beep-media-player now works as expected with libpthread, and this is very likely to resolve similar behaviour with other ports that try to use glib's threading functions. I CC-ed glib20 port-maintainer (gnome@FreeBSD.org) in the hope this (or appropriate alternative) fix makes it in time for 5.3-RELEASE. -- Pascal Hofstee ------=_Part_171_15976079.1094606834411 Content-Type: application/octet-stream; name="patch-gthread_gthread-posix.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-gthread_gthread-posix.c" LS0tIGd0aHJlYWQvZ3RocmVhZC1wb3NpeC5jLm9yaWcJVHVlIFNlcCAgNyAxNzo1Nzo1MyAyMDA0 CisrKyBndGhyZWFkL2d0aHJlYWQtcG9zaXguYwlUdWUgU2VwICA3IDE3OjU4OjMwIDIwMDQKQEAg LTExNiw2ICsxMTYsNyBAQAogI2VuZGlmIC8qIFBPU0lYX01JTl9QUklPUklUWSAmJiBQT1NJWF9N QVhfUFJJT1JJVFkgKi8KIAogc3RhdGljIGd1bG9uZyBnX3RocmVhZF9taW5fc3RhY2tfc2l6ZSA9 IDA7CitzdGF0aWMgZ3Vsb25nIGdfdGhyZWFkX2RlZmF1bHRfc3RhY2tfc2l6ZSA9IDB4MTAwMDAw OwogCiAjZGVmaW5lIEdfTVVURVhfU0laRSAoc2l6ZW9mIChwdGhyZWFkX211dGV4X3QpKQogCkBA IC0xMjUsNyArMTI2LDggQEAKIGdfdGhyZWFkX2ltcGxfaW5pdCgpCiB7CiAjaWZkZWYgX1NDX1RI UkVBRF9TVEFDS19NSU4KLSAgZ190aHJlYWRfbWluX3N0YWNrX3NpemUgPSBNQVggKHN5c2NvbmYg KF9TQ19USFJFQURfU1RBQ0tfTUlOKSwgMCk7CisgIGdfdGhyZWFkX21pbl9zdGFja19zaXplID0g TUFYIChzeXNjb25mIChfU0NfVEhSRUFEX1NUQUNLX01JTiksCisgICAgZ190aHJlYWRfbWluX3N0 YWNrX3NpemUpOwogI2VuZGlmIC8qIF9TQ19USFJFQURfU1RBQ0tfTUlOICovCiAjaWZkZWYgSEFW RV9QUklPUklUSUVTCiAjIGlmZGVmIEdfVEhSRUFEU19JTVBMX1BPU0lYCkBAIC0xNzYsNyArMTc4 LDcgQEAKICAgcmVzdWx0ID0gcHRocmVhZF9tdXRleF90cnlsb2NrICgocHRocmVhZF9tdXRleF90 ICopIG11dGV4KTsKIAogI2lmZGVmIEdfVEhSRUFEU19JTVBMX1BPU0lYCi0gIGlmIChyZXN1bHQg PT0gRUJVU1kpCisgIGlmICgocmVzdWx0ID09IEVCVVNZKSB8fCAocmVzdWx0ID09IEVERUFETEsp KQogICAgIHJldHVybiBGQUxTRTsKICNlbHNlIC8qIEdfVEhSRUFEU19JTVBMX0RDRSAqLwogICBp ZiAocmVzdWx0ID09IDApCkBAIC0zMDcsOCArMzA5LDEyIEBACiAgIGlmIChzdGFja19zaXplKQog ICAgIHsKICAgICAgIHN0YWNrX3NpemUgPSBNQVggKGdfdGhyZWFkX21pbl9zdGFja19zaXplLCBz dGFja19zaXplKTsKLSAgICAgIHBvc2l4X2NoZWNrX2NtZCAocHRocmVhZF9hdHRyX3NldHN0YWNr c2l6ZSAoJmF0dHIsIHN0YWNrX3NpemUpKTsKICAgICB9CisgIGVsc2UKKyAgICB7CisgICAgICBz dGFja19zaXplID0gTUFYIChnX3RocmVhZF9taW5fc3RhY2tfc2l6ZSwgZ190aHJlYWRfZGVmYXVs dF9zdGFja19zaXplKTsKKyAgICB9CisgIHBvc2l4X2NoZWNrX2NtZCAocHRocmVhZF9hdHRyX3Nl dHN0YWNrc2l6ZSAoJmF0dHIsIHN0YWNrX3NpemUpKTsKICNlbmRpZiAvKiBIQVZFX1BUSFJFQURf QVRUUl9TRVRTVEFDS1NJWkUgKi8KIAogI2lmZGVmIFBUSFJFQURfU0NPUEVfU1lTVEVNCg== ------=_Part_171_15976079.1094606834411-- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 7 23:50: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 EE6F116A4DD for ; Tue, 7 Sep 2004 23:50:42 +0000 (GMT) Received: from mta202-rme.xtra.co.nz (mta202-rme.xtra.co.nz [210.86.15.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4442B43D2F for ; Tue, 7 Sep 2004 23:50:26 +0000 (GMT) (envelope-from james.collier@xtra.co.nz) Received: from mta1-rme.xtra.co.nz ([210.86.15.157]) by mta202-rme.xtra.co.nz with ESMTP <20040907235024.FFWC15448.mta202-rme.xtra.co.nz@mta1-rme.xtra.co.nz> for ; Wed, 8 Sep 2004 11:50:24 +1200 Received: from kanga.cyberdyne.co.mars ([210.86.98.90]) by mta1-rme.xtra.co.nz with SMTP <20040907235023.BWGY21194.mta1-rme.xtra.co.nz@kanga.cyberdyne.co.mars> for ; Wed, 8 Sep 2004 11:50:23 +1200 Received: (qmail 70938 invoked from network); 7 Sep 2004 23:50:23 -0000 Received: from tigger.cyberdyne.co.mars (HELO xtra.co.nz) (10.146.171.54) by 0 with SMTP; 7 Sep 2004 23:50:23 -0000 Message-ID: <413E493E.6070809@xtra.co.nz> Date: Wed, 08 Sep 2004 11:50:22 +1200 From: James Collier Organization: Cyberdyne Systems Ltd. User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040622 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 08 Sep 2004 11:47:28 +0000 Subject: Problem with DVD writer and ehci on 4.10-STABLE 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, 07 Sep 2004 23:50:43 -0000 I'm trying to get a USB2 DVD writer working with growisofs under 4.10-STABLE (updated yesterday 6-Sep-04), but am having problems - the burn (on a DVD+R) always fails with an I/O Error anywhere between 10M and 1.5Gbytes. I can read from the unit, and short burns seem OK. There seems to be some correlation with system load, but my testing of this was inconclusive - long burns fail even when the system is quiescent. I've now got to the point where I'm well out of my depth, and I was wondering whether anyone can tell me whether I'm wasting my time on this. I'm aware of some problems with ehci, but not sure if this is a symptom ... The units in question are: NEC uPD 720100 USB 2.0 Host controller Genesys GL811 USB2/ATA Bridge NEC 1300A Rev 1.08 DVD writer I had to modify my umass.c to work with the GL811 bridge (note that the vendor/product ID matches USB_PRODUCT_GENESYS_GL641USB2IDE_2): -------------------------------------------------------------- *** .orig/umass.c Mon Sep 6 19:03:50 2004 --- ./umass.c Mon Sep 6 21:25:32 2004 *************** *** 703,706 **** --- 703,707 ---- UGETW(dd->idProduct) == USB_PRODUCT_GENESYS_GL641USB2IDE_2 || UGETW(dd->idProduct) == USB_PRODUCT_GENESYS_GL641USB)) { + sc->proto = UMASS_PROTO_SCSI | UMASS_PROTO_BBB; sc->quirks |= FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE; } -------------------------------------------------------------- [IMHO it would be nice if this stuff could be configurable in the pattern of /etc/pccard.conf but ...] I enabled CAM and USB debugging, and caught the point of failure (two traces with varying levels of debugging attached). Having stared dumbly at the trace, code and the EHCI spec for long enough, it appears that the unit is returning a transaction error (XACTERR - possibly a timeout) implying that the transaction should be retried (EHCI spec 4.12.1.2), but it seems that this is not happening. If this problem is considered interesting enough I can supply more background detail (config file and/or boot log - but the boot log is a hideous length with full debugging enabled.) Any advice - no matter how pointed - will be appeciated. Thanks & regards James Collier. -------------------------------------------------------------- Trace #1 - hw.usb.ehci.debug=1 -------------------------------------------------------------- Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): WRITE(10). CDB: 2a 0 0 0 c7 90 0 0 10 0 Sep 7 13:54:10 tigger /kernel: ehci_alloc_sqtd_chain: start len=32768 Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_done Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): camisr Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): entering cdgetccb Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_schedule Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_setup_ccb Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_action Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): WRITE(10). CDB: 2a 0 0 0 c7 a0 0 0 10 0 Sep 7 13:54:10 tigger /kernel: ehci_alloc_sqtd_chain: start len=32768 Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_done Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): camisr Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): entering cdgetccb Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_schedule Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_setup_ccb Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_action Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): WRITE(10). CDB: 2a 0 0 0 c7 b0 0 0 10 0 Sep 7 13:54:10 tigger /kernel: ehci_alloc_sqtd_chain: start len=32768 Sep 7 13:54:10 tigger /kernel: ehci_idone: error, addr=2, endpt=0x02, status 0x8 Sep 7 13:54:10 tigger /kernel: ehci_device_clear_toggle: epipe=0xc15fec00 status=0x8d00 Sep 7 13:54:10 tigger /kernel: usbd_dump_pipe: pipe=0xc15fec00 Sep 7 13:54:10 tigger /kernel: usbd_dump_iface: iface=0xc15f8e60 Sep 7 13:54:10 tigger /kernel: device=0xc15fee00 idesc=0xc15f8e89 index=0 altindex=0 priv=0 Sep 7 13:54:10 tigger /kernel: usbd_dump_device: dev=0xc15fee00 Sep 7 13:54:10 tigger /kernel: bus=0xc15ee400 default_pipe=0xc15fed80 Sep 7 13:54:10 tigger /kernel: address=2 config=1 depth=1 speed=3 self_powered=1 power=4 langid=1033 Sep 7 13:54:10 tigger /kernel: usbd_dump_endpoint: endp=0xc15d87f0 Sep 7 13:54:10 tigger /kernel: edesc=0xc15f8e92 refcnt=1 Sep 7 13:54:10 tigger /kernel: bEndpointAddress=0x81 Sep 7 13:54:10 tigger /kernel: (usbd_dump_pipe:) Sep 7 13:54:10 tigger /kernel: refcnt=1 running=0 aborting=0 Sep 7 13:54:10 tigger /kernel: intrxfer=0, repeat=0, interval=-1 Sep 7 13:54:10 tigger /kernel: ehci_device_clear_toggle: epipe=0xc15fec80 status=0x9c08 Sep 7 13:54:10 tigger /kernel: usbd_dump_pipe: pipe=0xc15fec80 Sep 7 13:54:10 tigger /kernel: usbd_dump_iface: iface=0xc15f8e60 Sep 7 13:54:10 tigger /kernel: device=0xc15fee00 idesc=0xc15f8e89 index=0 altindex=0 priv=0 Sep 7 13:54:10 tigger /kernel: usbd_dump_device: dev=0xc15fee00 Sep 7 13:54:10 tigger /kernel: bus=0xc15ee400 default_pipe=0xc15fed80 Sep 7 13:54:10 tigger /kernel: address=2 config=1 depth=1 speed=3 self_powered=1 power=4 langid=1033 Sep 7 13:54:10 tigger /kernel: usbd_dump_endpoint: endp=0xc15d87f8 Sep 7 13:54:10 tigger /kernel: edesc=0xc15f8e99 refcnt=1 Sep 7 13:54:10 tigger /kernel: bEndpointAddress=0x02 Sep 7 13:54:10 tigger /kernel: (usbd_dump_pipe:) Sep 7 13:54:10 tigger /kernel: refcnt=1 running=0 aborting=0 Sep 7 13:54:10 tigger /kernel: intrxfer=0, repeat=0, interval=-1 Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_done Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): camisr Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): entering cdgetccb Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_schedule Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_setup_ccb Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_action Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): SYNCHRONIZE CACHE. CDB: 35 2 0 0 0 0 0 0 0 0 Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_done Sep 7 13:54:10 tigger /kernel: (pass0:umass-sim0:0:1:0): camisr Sep 7 13:54:11 tigger /kernel: (pass0:umass-sim0:0:1:0): entering cdgetccb Sep 7 13:54:11 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_schedule Sep 7 13:54:11 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_setup_ccb Sep 7 13:54:11 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_action Sep 7 13:54:11 tigger /kernel: (pass0:umass-sim0:0:1:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 Sep 7 13:54:12 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_done Sep 7 13:54:12 tigger /kernel: (pass0:umass-sim0:0:1:0): camisr Sep 7 13:54:12 tigger /kernel: (pass0:umass-sim0:0:1:0): entering cdgetccb Sep 7 13:54:12 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_schedule Sep 7 13:54:12 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_setup_ccb Sep 7 13:54:12 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_action Sep 7 13:54:12 tigger /kernel: (pass0:umass-sim0:0:1:0): SYNCHRONIZE CACHE. CDB: 35 0 0 0 0 0 0 0 0 0 -------------------------------------------------------------- Trace #2: Drilling down on a subsequent run (hw.usb.ehci.debug=3), we see: -------------------------------------------------------------- Sep 7 17:29:44 tigger /kernel: (pass0:umass-sim0:0:1:0): WRITE(10). CDB: 2a 0 0 0 da 50 0 0 10 0 Sep 7 17:29:44 tigger /kernel: ehci_device_bulk_transfer: xfer=0xc15f7100 len=31 flags=0 Sep 7 17:29:44 tigger /kernel: ehci_alloc_sqtd_chain: start len=31 Sep 7 17:29:44 tigger /kernel: ehci_check_intr: ex=0xc15f7100 Sep 7 17:29:44 tigger /kernel: ehci_idone: ex=0xc15f7100 Sep 7 17:29:44 tigger /kernel: ehci_idone: xfer=0xc15f7100, pipe=0xc15fec80 ready Sep 7 17:29:44 tigger /kernel: ehci_idone: len=31, actlen=31, status=0x0 Sep 7 17:29:44 tigger /kernel: ehci_device_bulk_transfer: xfer=0xc1602f00 len=32768 flags=0 Sep 7 17:29:44 tigger /kernel: ehci_alloc_sqtd_chain: start len=32768 Sep 7 17:29:44 tigger /kernel: ehci_alloc_sqtd_chain: multiple QTDs, curlen=4096 Sep 7 17:29:44 tigger last message repeated 6 times Sep 7 17:29:44 tigger /kernel: ehci_idone: ex=0xc15f7100 done Sep 7 17:29:44 tigger /kernel: ehci_check_intr: ex=0xc1602f00 Sep 7 17:29:44 tigger /kernel: ehci_idone: ex=0xc1602f00 Sep 7 17:29:44 tigger /kernel: ehci_idone: xfer=0xc1602f00, pipe=0xc15fec80 ready Sep 7 17:29:44 tigger /kernel: ehci_idone: len=32768, actlen=32768, status=0x8 Sep 7 17:29:44 tigger /kernel: ehci_idone: error, addr=2, endpt=0x02, status 0x8 Sep 7 17:29:44 tigger /kernel: QH(0xc15fdea0) at 0x0f871ea0: Sep 7 17:29:44 tigger /kernel: link=0x0f871f02 Sep 7 17:29:44 tigger /kernel: endp=0x82002202 Sep 7 17:29:44 tigger /kernel: addr=0x02 inact=0 endpt=2 eps=2 dtc=0 hrecl=0 Sep 7 17:29:44 tigger /kernel: mpl=0x200 ctl=0 nrl=8 Sep 7 17:29:44 tigger /kernel: endphub=0x40000000 Sep 7 17:29:44 tigger /kernel: smask=0x00 cmask=0x00 huba=0x00 port=0 mult=1 Sep 7 17:29:44 tigger /kernel: curqtd=0x0f834e40<> Sep 7 17:29:44 tigger /kernel: Overlay qTD: Sep 7 17:29:44 tigger /kernel: next=0x00000001 altnext=0x00000011 Sep 7 17:29:44 tigger /kernel: status=0x80009c08: toggle=1 bytes=0x0 ioc=1 c_page=0x1 Sep 7 17:29:44 tigger /kernel: cerr=3 pid=0 stat=0x8 Sep 7 17:29:44 tigger /kernel: buffer[0]=0x00023000 Sep 7 17:29:44 tigger /kernel: buffer[1]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[2]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[3]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[4]=0x00000000 Sep 7 17:29:44 tigger /kernel: QTD(0xc1600f00) at 0x0f834f00: Sep 7 17:29:44 tigger /kernel: next=0x0f834c00<> altnext=0x0f834c00<> Sep 7 17:29:44 tigger /kernel: status=0x80001c00: toggle=1 bytes=0x0 ioc=0 c_page=0x1 Sep 7 17:29:44 tigger /kernel: cerr=3 pid=0 stat=0x0 Sep 7 17:29:44 tigger /kernel: buffer[0]=0x0001c000 Sep 7 17:29:44 tigger /kernel: buffer[1]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[2]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[3]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[4]=0x00000000 ...... Sep 7 17:29:44 tigger /kernel: QTD(0xc1600c00) at 0x0f834c00: ...... Sep 7 17:29:44 tigger /kernel: status=0x80001c00: toggle=1 bytes=0x0 ioc=0 c_page=0x1 ...... Sep 7 17:29:44 tigger /kernel: QTD(0xc1600c60) at 0x0f834c60: ...... Sep 7 17:29:44 tigger /kernel: status=0x80001c00: toggle=1 bytes=0x0 ioc=0 c_page=0x1 ...... Sep 7 17:29:44 tigger /kernel: QTD(0xc1600cc0) at 0x0f834cc0: ...... Sep 7 17:29:44 tigger /kernel: status=0x80001c00: toggle=1 bytes=0x0 ioc=0 c_page=0x1 ...... Sep 7 17:29:44 tigger /kernel: QTD(0xc1600d20) at 0x0f834d20: ...... Sep 7 17:29:44 tigger /kernel: status=0x80001c00: toggle=1 bytes=0x0 ioc=0 c_page=0x1 ...... Sep 7 17:29:44 tigger /kernel: QTD(0xc1600d80) at 0x0f834d80: ...... Sep 7 17:29:44 tigger /kernel: status=0x80001c00: toggle=1 bytes=0x0 ioc=0 c_page=0x1 ...... Sep 7 17:29:44 tigger /kernel: QTD(0xc1600de0) at 0x0f834de0: ...... Sep 7 17:29:44 tigger /kernel: status=0x80001c00: toggle=1 bytes=0x0 ioc=0 c_page=0x1 ...... Sep 7 17:29:44 tigger /kernel: QTD(0xc1600e40) at 0x0f834e40: ...... Sep 7 17:29:44 tigger /kernel: status=0x80009c08: toggle=1 bytes=0x0 ioc=1 c_page=0x1 Sep 7 17:29:44 tigger /kernel: QTD(0xc1600e40) at 0x0f834e40: Sep 7 17:29:44 tigger /kernel: next=0x00000001 altnext=0x00000001 Sep 7 17:29:44 tigger /kernel: status=0x80009c08: toggle=1 bytes=0x0 ioc=1 c_page=0x1 Sep 7 17:29:44 tigger /kernel: cerr=3 pid=0 stat=0x8 Sep 7 17:29:44 tigger /kernel: buffer[0]=0x00023000 Sep 7 17:29:44 tigger /kernel: buffer[1]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[2]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[3]=0x00000000 Sep 7 17:29:44 tigger /kernel: buffer[4]=0x00000000 Sep 7 17:29:44 tigger /kernel: ehci_idone: ex=0xc1602f00 done Sep 7 17:29:44 tigger /kernel: ehci_check_intr: ex=0xc1602a00 Sep 7 17:29:44 tigger /kernel: ehci_idone: ex=0xc1602a00 Sep 7 17:29:44 tigger /kernel: ehci_idone: xfer=0xc1602a00, pipe=0xc15fed80 ready Sep 7 17:29:44 tigger /kernel: ehci_idone: len=0, actlen=0, status=0x0 Sep 7 17:29:44 tigger /kernel: ehci_device_clear_toggle: epipe=0xc15fec00 status=0x8d00 Sep 7 17:29:44 tigger /kernel: usbd_dump_pipe: pipe=0xc15fec00 Sep 7 17:29:44 tigger /kernel: usbd_dump_iface: iface=0xc15f8e60 Sep 7 17:29:44 tigger /kernel: device=0xc15fee00 idesc=0xc15f8e89 index=0 altindex=0 priv=0 Sep 7 17:29:44 tigger /kernel: usbd_dump_device: dev=0xc15fee00 Sep 7 17:29:45 tigger /kernel: bus=0xc15ee400 default_pipe=0xc15fed80 Sep 7 17:29:45 tigger /kernel: address=2 config=1 depth=1 speed=3 self_powered=1 power=4 langid=1033 Sep 7 17:29:45 tigger /kernel: usbd_dump_endpoint: endp=0xc15d87f0 Sep 7 17:29:45 tigger /kernel: edesc=0xc15f8e92 refcnt=1 Sep 7 17:29:45 tigger /kernel: bEndpointAddress=0x81 Sep 7 17:29:45 tigger /kernel: (usbd_dump_pipe:) Sep 7 17:29:45 tigger /kernel: refcnt=1 running=0 aborting=0 Sep 7 17:29:45 tigger /kernel: intrxfer=0, repeat=0, interval=-1 Sep 7 17:29:45 tigger /kernel: ehci_idone: ex=0xc1602a00 done Sep 7 17:29:45 tigger /kernel: ehci_check_intr: ex=0xc1602900 Sep 7 17:29:45 tigger /kernel: ehci_idone: ex=0xc1602900 Sep 7 17:29:45 tigger /kernel: ehci_idone: xfer=0xc1602900, pipe=0xc15fed80 ready Sep 7 17:29:45 tigger /kernel: ehci_idone: len=0, actlen=0, status=0x0 Sep 7 17:29:45 tigger /kernel: ehci_device_clear_toggle: epipe=0xc15fec80 status=0x80009c08 Sep 7 17:29:45 tigger /kernel: usbd_dump_pipe: pipe=0xc15fec80 Sep 7 17:29:45 tigger /kernel: usbd_dump_iface: iface=0xc15f8e60 Sep 7 17:29:45 tigger /kernel: device=0xc15fee00 idesc=0xc15f8e89 index=0 altindex=0 priv=0 Sep 7 17:29:45 tigger /kernel: usbd_dump_device: dev=0xc15fee00 Sep 7 17:29:45 tigger /kernel: bus=0xc15ee400 default_pipe=0xc15fed80 Sep 7 17:29:45 tigger /kernel: address=2 config=1 depth=1 speed=3 self_powered=1 power=4 langid=1033 Sep 7 17:29:45 tigger /kernel: usbd_dump_endpoint: endp=0xc15d87f8 Sep 7 17:29:45 tigger /kernel: edesc=0xc15f8e99 refcnt=1 Sep 7 17:29:45 tigger /kernel: bEndpointAddress=0x02 Sep 7 17:29:45 tigger /kernel: (usbd_dump_pipe:) Sep 7 17:29:45 tigger /kernel: refcnt=1 running=0 aborting=0 Sep 7 17:29:45 tigger /kernel: intrxfer=0, repeat=0, interval=-1 Sep 7 17:29:45 tigger /kernel: ehci_idone: ex=0xc1602900 done Sep 7 17:29:45 tigger /kernel: ehci_check_intr: ex=0xc1602800 Sep 7 17:29:45 tigger /kernel: ehci_idone: ex=0xc1602800 Sep 7 17:29:45 tigger /kernel: ehci_idone: xfer=0xc1602800, pipe=0xc15fed80 ready Sep 7 17:29:45 tigger /kernel: ehci_idone: len=0, actlen=0, status=0x0 Sep 7 17:29:45 tigger /kernel: (pass0:umass-sim0:0:1:0): xpt_done Sep 7 17:29:45 tigger /kernel: ehci_idone: ex=0xc1602800 done Sep 7 17:29:45 tigger /kernel: (pass0:umass-sim0:0:1:0): camisr ----------------------------------------------------------------------------------- [End of traces] From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 02:21:13 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 331B116A4D0 for ; Wed, 8 Sep 2004 02:21:13 +0000 (GMT) Received: from mail3.dreamscape.com (mail3.dreamscape.com [206.64.128.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83EF843D1F for ; Wed, 8 Sep 2004 02:21:12 +0000 (GMT) (envelope-from krentel@dreamscape.com) Received: from blue.mwk.domain (sA10-p35.dreamscape.com [209.4.252.227]) by mail3.dreamscape.com (8.12.9/8.12.9) with ESMTP id i882L823007515 for ; Tue, 7 Sep 2004 22:21:09 -0400 (EDT) Received: from blue.mwk.domain (localhost [127.0.0.1]) by blue.mwk.domain (8.12.9p2/8.12.9) with ESMTP id i882KZ7W022214 for ; Tue, 7 Sep 2004 22:20:36 -0400 (EDT) (envelope-from krentel@blue.mwk.domain) Message-Id: <200409080220.i882KZ7W022214@blue.mwk.domain> To: freebsd-hackers@freebsd.org Date: Tue, 07 Sep 2004 22:20:35 -0400 From: "Mark W. Krentel" X-Mailman-Approved-At: Wed, 08 Sep 2004 11:47:28 +0000 Subject: kernel profiling with kernbb and gcov 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, 08 Sep 2004 02:21:13 -0000 I'm trying to do kernel profiling with kernbb(8) and gcov(1), but I can't get the kernel compile to accept the -ftest-coverage and -fprofile-arcs options. (1) Is it --test-coverage or -ftest-coverage, or does it matter? kernbb(8) says the former, gcov(1) says the latter. (2) How do I add these options to the kernel compile? I tried adding them to COPTFLAGS in make.conf, and all the individual files compile ok, but when it tries to link them, it dies with a bazillion undefined references. ffsl.o(.text+0x7e): In function `global constructors keyed to ffsl_GCOV': : undefined reference to `__gcov_init' ffsl.o(.data+0x44): undefined reference to `__gcov_merge_add' flsl.o(.text+0x7e): In function `global constructors keyed to flsl_GCOV': : undefined reference to `__gcov_init' flsl.o(.data+0x44): undefined reference to `__gcov_merge_add' I can run "gcc -ftest-coverage -fprofile-arcs hello.c" for the "Hello, world" program, and it works and gcov(1) is happy, but I can't get these options into the kernel. (3) How do I selectively add these options to just some of the source files? Do I run config (or "config -p") and hand edit the Makefile, before "make depend && make"? This is in 6.0-CURRENT as of a few days ago. Thanks, --Mark From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 10:19:00 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 271BE16A4CE; Wed, 8 Sep 2004 10:19:00 +0000 (GMT) Received: from peedub.jennejohn.org (Ge1c5.g.pppool.de [80.185.225.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6999743D1F; Wed, 8 Sep 2004 10:18:59 +0000 (GMT) (envelope-from garyj@jennejohn.org) Received: from jennejohn.org (localhost [127.0.0.1]) by peedub.jennejohn.org (8.13.1/8.11.6) with ESMTP id i88AIvFT002496; Wed, 8 Sep 2004 12:18:58 +0200 (CEST) (envelope-from garyj@jennejohn.org) Message-Id: <200409081018.i88AIvFT002496@peedub.jennejohn.org> X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: "Murray Stokely" In-Reply-To: Message from "Steven Hartland" <028501c4950b$23f675f0$b3db87d4@multiplay.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 08 Sep 2004 12:18:57 +0200 From: Gary Jennejohn X-Mailman-Approved-At: Wed, 08 Sep 2004 11:47:28 +0000 cc: hackers@FreeBSD.org Subject: Re: Large FreeBSD Users / Impressive Metrics 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, 08 Sep 2004 10:19:00 -0000 "Murray Stokely" writes: > > I'm working on updating our advocacy material used on the website, in > > the Handbook, and now in a set of generic slides that can be used or > > adapted for presentations. > > > > If you have ideas about cool new functionality that we should do a > > better job of touting, know of large FreeBSD users (I could especially > > use more pointers to embedded uses of FreeBSD), or otherwise have > > impressive statistics or benchmarks that we should be getting more > > leverage out of, please let me know. > I know that Verio in Germany just switched their servers from IRIX to FreeBSD. --- Gary Jennejohn / garyj[at]jennejohn.org gj[at]freebsd.org gj[at]denx.de From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 14:52: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 D1D2216A4CE for ; Wed, 8 Sep 2004 14:52:42 +0000 (GMT) Received: from pimout2-ext.prodigy.net (pimout2-ext.prodigy.net [207.115.63.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59FC543D5E for ; Wed, 8 Sep 2004 14:52:42 +0000 (GMT) (envelope-from bob@immure.com) Received: from maul.immure.com (adsl-66-136-206-1.dsl.austtx.swbell.net [66.136.206.1])i88Eqevd187614 for ; Wed, 8 Sep 2004 10:52:41 -0400 Received: from luke.immure.com (luke.immure.com [10.1.132.3]) by maul.immure.com (8.12.11/8.12.11) with ESMTP id i88EqcOB067925 for ; Wed, 8 Sep 2004 09:52:38 -0500 (CDT) (envelope-from bob@immure.com) Received: from luke.immure.com (localhost [127.0.0.1]) by luke.immure.com (8.12.11/8.12.11) with ESMTP id i88Eqc3X012335 for ; Wed, 8 Sep 2004 09:52:38 -0500 (CDT) (envelope-from bob@luke.immure.com) Received: (from bob@localhost) by luke.immure.com (8.12.11/8.12.11/Submit) id i88EqcBN012334 for freebsd-hackers@freebsd.org; Wed, 8 Sep 2004 09:52:38 -0500 (CDT) (envelope-from bob) Date: Wed, 8 Sep 2004 09:52:38 -0500 From: Bob Willcox To: hackers list Message-ID: <20040908145238.GA11833@luke.immure.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-immure-MailScanner-Information: Please contact the ISP for more information X-immure-MailScanner: Found to be clean X-MailScanner-From: bob@immure.com Subject: Shiva LanRover/4E for serial console connection? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bob Willcox List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 14:52:42 -0000 [I apologize for this somewhat off-topic post, but it seemed that someone on this list may have already done this.] I just acquired a Shiva LanRover/4E terminal server and was wanting to use it to connect to several of my FreeBSD systems serial ports for console access to them. I was able to get the thing upgraded and configured but haven't figured out how to get it to work with my FreeBSD system. I am using a standard null modem cable to go between the two, and (believe) I have enabled the LanRover's slot to allow dialout. Here is what the line configurations look like (the FreeBSD system is connected to line 1): LanRover 5.7# show lines Async Lines: Line State Rate/P/Stop/ RA|DCD|DSR|DTR|RTS|CTS|Fr errs| Overruns|PErrs 1 IDLE 9600/N/ 1/ |OFF|OFF|on |on |ON | 0| 0| 0 2 IDLE 9600/N/ 1/ |OFF|OFF|on |on |OFF| 0| 0| 0 3 IDLE 9600/N/ 1/ |OFF|OFF|on |on |OFF| 0| 0| 0 4 IDLE 9600/N/ 1/ |OFF|OFF|on |on |OFF| 0| 0| 0 And here is what happens when I try to connect to it: LanRover 5.7# connect qui-gon Connecting to Serial1 at 9600 BPS. Escape character is CTRL-^ (30). Type the escape character followed by C to get back, or followed by ? to see other options. at which point it simply hangs (no input or output) till I escape out and close the connection. I'm thinking that I may need a different cable wiring vs the null modem cable, but don't really know what to try. Has anyone used one of these things for serial console access? Any suggestions, help or tips would be greatly appreciated. Thanks, Bob -- Bob Willcox Acquaintance, n.: bob@immure.com A person whom we know well enough to borrow from, Austin, TX but not well enough to lend to. -- Ambrose Bierce, "The Devil's Dictionary" From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 15:09: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 D162716A4CE for ; Wed, 8 Sep 2004 15:09:21 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 4538743D2D for ; Wed, 8 Sep 2004 15:09:20 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 3397 invoked from network); 8 Sep 2004 15:07:20 -0000 Received: from unknown (HELO straylight.m.ringlet.net) (217.75.134.254) by gandalf.online.bg with SMTP; 8 Sep 2004 15:07:20 -0000 Received: (qmail 3301 invoked by uid 1000); 8 Sep 2004 15:09:43 -0000 Date: Wed, 8 Sep 2004 18:09:43 +0300 From: Peter Pentchev To: freebsd-hackers@FreeBSD.org Message-ID: <20040908150943.GA1924@straylight.m.ringlet.net> Mail-Followup-To: freebsd-hackers@FreeBSD.org, freebsd-current@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OBd5C1Lgu00Gd/Tn" Content-Disposition: inline User-Agent: Mutt/1.5.6i cc: freebsd-current@FreeBSD.org Subject: [PATCH] Fix USB panics 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, 08 Sep 2004 15:09:22 -0000 --OBd5C1Lgu00Gd/Tn Content-Type: multipart/mixed; boundary="2B/JsCI69OhZNC5r" Content-Disposition: inline --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, A couple of days ago I started experimenting with a new USB device, which has no FreeBSD driver, and within the first minute of playing with it, my kernel panicked - something that I hadn't seen for about a month, even with 5.x :) So here's a How to Panic a RELENG_5 Kernel In Five Easy Steps :) 1. Make sure usbd is not running so it cannot load drivers on demand. 2. kldload usb, and do not load *any* USB device drivers, not even ugen. 3. Plug a device, any device. 3a. usbd_probe_and_attach() looks for a specific driver, and fails. 3b. usbd_probe_and_attach() looks for a generic driver, and fails. 3c. usbd_probe_and_attach() leaves the newly-allocated device_t structure in place (and added to the parent bus), but removes any subdevs traces in the usbd_device_handle. 4. Unplug the device. 4a. usb_disconnect_port() does not find the device_t structure, since it has been removed from usbd_device_handle's subdevs. 4b. usb_disconnect_port() frees the usbd_device_handle. 5. kldload ugen 5a. busdma walks the buses, looking for devices that this driver should attach to. 5b. busdma calls ugen_attach() on the somewhat orphaned device_t. 5c. ugen_attach() calls usbd_devinfo() on the usbd_device_handle pointer extracted from the device_t's softc - which was kinda freed in step 4b above :) 5d. Congratulations, you have reached kdb's panic handler! :) So.. what should be done about it? Basically, the problem is that usbd_probe_and_attach() leaves an orphaned device_t pointing to the usbd_device_handle that will be freed when the hardware device is physically unplugged. The attached patch seems to solve the problem - and a couple of related others - at least for me. The #ifdef's are effectively #if 0's, I've just left them in to keep a perspective on the original code. The idea is to keep the device_t pointer in the usbd_device_handle, but take care to check if the device is actually attached before dereferencing it. Also, uhub had to be taught not to remove the device_t pointer on driver unload, since the hardware is still physically attached to the machine and the device_t is still attached to the bus, even though there is no driver for it. This makes uhub's child_detached handler mostly a no-op, with the exception of the panic if the uhub itself is not initialized yet; should the whole handler be removed, since the only thing it does ought to be handled by usb_disconnect_port() already? Is this even the right direction? IMHO, this situation ought to be resolved one way or another before 5.3 hits the shelves, even if the solution has nothing to do with my proposed patch :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg 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 If the meanings of 'true' and 'false' were switched, then this sentence wou= ldn't be false. --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="usb-keep-subdevs.patch" Content-Transfer-Encoding: quoted-printable Index: dev/usb/uhub.c =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=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/dev/usb/uhub.c,v retrieving revision 1.62 diff -u -r1.62 uhub.c --- dev/usb/uhub.c 15 Aug 2004 23:39:18 -0000 1.62 +++ dev/usb/uhub.c 8 Sep 2004 14:06:45 -0000 @@ -707,7 +707,9 @@ continue; for (i =3D 0; dev->subdevs[i]; i++) { if (dev->subdevs[i] =3D=3D child) { +#ifdef ROAM_SKIP_USB_DEVICE_LEAK dev->subdevs[i] =3D NULL; +#endif return; } } Index: dev/usb/usb_subr.c =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=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/dev/usb/usb_subr.c,v retrieving revision 1.69 diff -u -r1.69 usb_subr.c --- dev/usb/usb_subr.c 15 Aug 2004 23:39:18 -0000 1.69 +++ dev/usb/usb_subr.c 8 Sep 2004 14:05:51 -0000 @@ -1016,9 +1016,11 @@ if (dv !=3D NULL) { return (USBD_NORMAL_COMPLETION); } +#ifdef ROAM_SKIP_USB_DEVICE_LEAK tmpdv =3D dev->subdevs; dev->subdevs =3D 0; free(tmpdv, M_USB); +#endif =20 /* * The generic attach failed, but leave the device as it is. @@ -1346,7 +1348,7 @@ di->udi_speed =3D dev->speed; =20 if (dev->subdevs !=3D NULL) { - for (i =3D 0; dev->subdevs[i] && + for (i =3D 0; dev->subdevs[i] && device_is_attached(dev->subdevs[i]) && i < USB_MAX_DEVNAMES; i++) { strncpy(di->udi_devnames[i], USBDEVPTRNAME(dev->subdevs[i]), USB_MAX_DEVNAMELEN); --2B/JsCI69OhZNC5r-- --OBd5C1Lgu00Gd/Tn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBPyC27Ri2jRYZRVMRAljhAKC0NSaiYjxVChqo5KOEAUn0MvRn6wCgmE8l f5EV/LNvWB7ysJH3gcsDnE8= =k7lY -----END PGP SIGNATURE----- --OBd5C1Lgu00Gd/Tn-- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 16:43:39 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 B04C416A4CE for ; Wed, 8 Sep 2004 16:43:39 +0000 (GMT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C0BD43D45 for ; Wed, 8 Sep 2004 16:43:39 +0000 (GMT) (envelope-from shchoi@gmail.com) Received: by mproxy.gmail.com with SMTP id w67so97456cwb for ; Wed, 08 Sep 2004 09:43:36 -0700 (PDT) Received: by 10.11.119.70 with SMTP id r70mr58105cwc; Wed, 08 Sep 2004 09:43:36 -0700 (PDT) Received: by 10.11.117.28 with HTTP; Wed, 8 Sep 2004 09:43:36 -0700 (PDT) Message-ID: <34b425c504090809435a949a03@mail.gmail.com> Date: Wed, 8 Sep 2004 17:43:36 +0100 From: Soo-Hyun Choi To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: TCP RTO X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Soo-Hyun Choi List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 16:43:39 -0000 Hi, I'm not sure if this list is appropriate to ask about the FreeBSD kernel source or not. If not, could somebody direct me in an appropriate list? My curiosity is if we see the tcp.cc code inside, there are two different version of srtt (smoothed rtt) and rttvar (smoothed mean deviation estimator). The one is simply 'srtt' and 'rttvar' and the other is 't_srtt' and 't_rttvar'. The unit of t_srtt is 'ticks * 8' and the unit of t_rttvar is 'ticks * 4'. These variables are used to calculate the TCP RTO. But why do they have the two different version of variables? The interesting thing is the 't_' variables are a fixed-point integer, and the original variables are just floating-point values. I assume the reason why they have is to avoid the floating-point arithmetic in the kernel. Is this really only reason for being two different version of those? Cheers, Soo-Hyun From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 17:16: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 30F6316A4D6 for ; Wed, 8 Sep 2004 17:16:51 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8170D43D2D for ; Wed, 8 Sep 2004 17:16:50 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i88HGatI049730; Wed, 8 Sep 2004 11:16:37 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 08 Sep 2004 11:17:06 -0600 (MDT) Message-Id: <20040908.111706.115908959.imp@bsdimp.com> To: roam@ringlet.net From: "M. Warner Losh" In-Reply-To: <20040908150943.GA1924@straylight.m.ringlet.net> References: <20040908150943.GA1924@straylight.m.ringlet.net> 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: [PATCH] Fix USB panics 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, 08 Sep 2004 17:16:52 -0000 [[ redirected to hackers only ]] In message: <20040908150943.GA1924@straylight.m.ringlet.net> Peter Pentchev writes: : A couple of days ago I started experimenting with a new USB device, : which has no FreeBSD driver, and within the first minute of playing with : it, my kernel panicked - something that I hadn't seen for about a month, : even with 5.x :) Hmmmm. I touched this code recently. : So here's a How to Panic a RELENG_5 Kernel In Five Easy Steps :) : : 1. Make sure usbd is not running so it cannot load drivers on demand. : : 2. kldload usb, and do not load *any* USB device drivers, not even ugen. : : 3. Plug a device, any device. : 3a. usbd_probe_and_attach() looks for a specific driver, and fails. : 3b. usbd_probe_and_attach() looks for a generic driver, and fails. : 3c. usbd_probe_and_attach() leaves the newly-allocated device_t : structure in place (and added to the parent bus), but removes any : subdevs traces in the usbd_device_handle. Leaving it in place is the right thing to do. It looks like the second half of this isn't. : 4. Unplug the device. : 4a. usb_disconnect_port() does not find the device_t structure, since it : has been removed from usbd_device_handle's subdevs. : 4b. usb_disconnect_port() frees the usbd_device_handle. Ah. Now that's a problem... that's the root cause of woe. : 5. kldload ugen : 5a. busdma walks the buses, looking for devices that this driver should : attach to. : 5b. busdma calls ugen_attach() on the somewhat orphaned device_t. : 5c. ugen_attach() calls usbd_devinfo() on the usbd_device_handle pointer : extracted from the device_t's softc - which was kinda freed in step : 4b above :) : 5d. Congratulations, you have reached kdb's panic handler! :) And here's where the woe comes home to roost. : So.. what should be done about it? Basically, the problem is that : usbd_probe_and_attach() leaves an orphaned device_t pointing to the : usbd_device_handle that will be freed when the hardware device is : physically unplugged. I'd use different terms to describe it, but what you are saying is essentially correct. : The attached patch seems to solve the problem - and a couple of related : others - at least for me. The #ifdef's are effectively #if 0's, I've : just left them in to keep a perspective on the original code. The idea : is to keep the device_t pointer in the usbd_device_handle, but take care : to check if the device is actually attached before dereferencing it. Hmmmm : Also, uhub had to be taught not to remove the device_t pointer on driver : unload, since the hardware is still physically attached to the machine : and the device_t is still attached to the bus, even though there is no : driver for it. This makes uhub's child_detached handler mostly a no-op, : with the exception of the panic if the uhub itself is not initialized : yet; should the whole handler be removed, since the only thing it does : ought to be handled by usb_disconnect_port() already? Yes. I think so : Is this even the right direction? IMHO, this situation ought to be : resolved one way or another before 5.3 hits the shelves, even if the : solution has nothing to do with my proposed patch :) Yes. I don't like parts of it, but they are the parts that you yourself don't like either :-(. : Index: dev/usb/uhub.c : =================================================================== : RCS file: /home/ncvs/src/sys/dev/usb/uhub.c,v : retrieving revision 1.62 : diff -u -r1.62 uhub.c : --- dev/usb/uhub.c 15 Aug 2004 23:39:18 -0000 1.62 : +++ dev/usb/uhub.c 8 Sep 2004 14:06:45 -0000 : @@ -707,7 +707,9 @@ : continue; : for (i = 0; dev->subdevs[i]; i++) { : if (dev->subdevs[i] == child) { : +#ifdef ROAM_SKIP_USB_DEVICE_LEAK : dev->subdevs[i] = NULL; : +#endif : return; : } : } I agree with your assessment that the above really makes the routine: Static void uhub_child_detached(device_t self, device_t child) { struct uhub_softc *sc = device_get_softc(self); usbd_device_handle devhub = sc->sc_hub; if (!devhub->hub) /* should never happen; children are only created after init */ panic("hub not fully initialised, but child deleted?"); } which looks right to me (although having the panic there seems overly defensive). : Index: dev/usb/usb_subr.c : =================================================================== : RCS file: /home/ncvs/src/sys/dev/usb/usb_subr.c,v : retrieving revision 1.69 : diff -u -r1.69 usb_subr.c : --- dev/usb/usb_subr.c 15 Aug 2004 23:39:18 -0000 1.69 : +++ dev/usb/usb_subr.c 8 Sep 2004 14:05:51 -0000 : @@ -1016,9 +1016,11 @@ : if (dv != NULL) { : return (USBD_NORMAL_COMPLETION); : } : +#ifdef ROAM_SKIP_USB_DEVICE_LEAK : tmpdv = dev->subdevs; : dev->subdevs = 0; : free(tmpdv, M_USB); : +#endif : : /* : * The generic attach failed, but leave the device as it is. I'm not sure I understand why the above fixes anything. Is it because it makes the proper references go away? If so, it can likely be deleted. I'll need to thread through the code to see if any of the other instances of those 3 lines of code can go. : @@ -1346,7 +1348,7 @@ : di->udi_speed = dev->speed; : : if (dev->subdevs != NULL) { : - for (i = 0; dev->subdevs[i] && : + for (i = 0; dev->subdevs[i] && device_is_attached(dev->subdevs[i]) && : i < USB_MAX_DEVNAMES; i++) { : strncpy(di->udi_devnames[i], USBDEVPTRNAME(dev->subdevs[i]), : USB_MAX_DEVNAMELEN); OK. I understand this as well. It likely is a good change. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 17:37: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 CF9D216A4CE for ; Wed, 8 Sep 2004 17:37:34 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 4572743D2D for ; Wed, 8 Sep 2004 17:37:06 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 24120 invoked from network); 8 Sep 2004 17:34:19 -0000 Received: from unknown (HELO straylight.m.ringlet.net) (217.75.134.254) by gandalf.online.bg with SMTP; 8 Sep 2004 17:34:19 -0000 Received: (qmail 9290 invoked by uid 1000); 8 Sep 2004 17:36:43 -0000 Date: Wed, 8 Sep 2004 20:36:42 +0300 From: Peter Pentchev To: "M. Warner Losh" Message-ID: <20040908173642.GB1924@straylight.m.ringlet.net> Mail-Followup-To: "M. Warner Losh" , freebsd-hackers@freebsd.org References: <20040908150943.GA1924@straylight.m.ringlet.net> <20040908.111706.115908959.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NklN7DEeGtkPCoo3" Content-Disposition: inline In-Reply-To: <20040908.111706.115908959.imp@bsdimp.com> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] Fix USB panics 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, 08 Sep 2004 17:37:35 -0000 --NklN7DEeGtkPCoo3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 08, 2004 at 11:17:06AM -0600, M. Warner Losh wrote: > [[ redirected to hackers only ]] Thanks for looking over this so quickly! > In message: <20040908150943.GA1924@straylight.m.ringlet.net> > Peter Pentchev writes: [snip] > : So here's a How to Panic a RELENG_5 Kernel In Five Easy Steps :) > :=20 > : 1. Make sure usbd is not running so it cannot load drivers on demand. > :=20 > : 2. kldload usb, and do not load *any* USB device drivers, not even uge= n. > :=20 > : 3. Plug a device, any device. > : 3a. usbd_probe_and_attach() looks for a specific driver, and fails. > : 3b. usbd_probe_and_attach() looks for a generic driver, and fails. > : 3c. usbd_probe_and_attach() leaves the newly-allocated device_t > : structure in place (and added to the parent bus), but removes any > : subdevs traces in the usbd_device_handle. >=20 > Leaving it in place is the right thing to do. It looks like the > second half of this isn't. Ahh... hold on to this thought, now. > : So.. what should be done about it? Basically, the problem is that > : usbd_probe_and_attach() leaves an orphaned device_t pointing to the > : usbd_device_handle that will be freed when the hardware device is > : physically unplugged. >=20 > I'd use different terms to describe it, but what you are saying is > essentially correct.=20 Yeah, well, this is the first time I dip my fingers into both the USB code and the busdma framework at all, so I'm probably saying a lot of things the wrong way :) > : The attached patch seems to solve the problem - and a couple of related > : others - at least for me. The #ifdef's are effectively #if 0's, I've > : just left them in to keep a perspective on the original code. The idea > : is to keep the device_t pointer in the usbd_device_handle, but take care > : to check if the device is actually attached before dereferencing it. >=20 > Hmmmm That's the third chunk of the patch, where I added the device_is_attached() check to usbd_fill_deviceinfo(). Until now, the device could never possibly have been NOT attached, since usbd_probe_and_attach() would never have left a non-NULL subdev in place. How's that for a double.. no, quadruple negative in the last sentence, now? [snip] > : Is this even the right direction? IMHO, this situation ought to be > : resolved one way or another before 5.3 hits the shelves, even if the > : solution has nothing to do with my proposed patch :) >=20 > Yes. I don't like parts of it, but they are the parts that you > yourself don't like either :-(. >=20 > : Index: dev/usb/uhub.c > : =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= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > : RCS file: /home/ncvs/src/sys/dev/usb/uhub.c,v > : retrieving revision 1.62 > : diff -u -r1.62 uhub.c > : --- dev/usb/uhub.c 15 Aug 2004 23:39:18 -0000 1.62 > : +++ dev/usb/uhub.c 8 Sep 2004 14:06:45 -0000 > : @@ -707,7 +707,9 @@ > : continue; > : for (i =3D 0; dev->subdevs[i]; i++) { > : if (dev->subdevs[i] =3D=3D child) { > : +#ifdef ROAM_SKIP_USB_DEVICE_LEAK > : dev->subdevs[i] =3D NULL; > : +#endif > : return; > : } > : } >=20 > I agree with your assessment that the above really makes the routine: >=20 > Static void > uhub_child_detached(device_t self, device_t child) > { > struct uhub_softc *sc =3D device_get_softc(self); > usbd_device_handle devhub =3D sc->sc_hub; >=20 > if (!devhub->hub) > /* should never happen; children are only created after init */ > panic("hub not fully initialised, but child deleted?"); > } >=20 > which looks right to me (although having the panic there seems overly > defensive). Yep, that's why I wondered if the whole function should not be removed. Still, it might be a good thing to leave it in, just in case - after all, this is not an overly-often executed path. > : Index: dev/usb/usb_subr.c > : =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= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > : RCS file: /home/ncvs/src/sys/dev/usb/usb_subr.c,v > : retrieving revision 1.69 > : diff -u -r1.69 usb_subr.c > : --- dev/usb/usb_subr.c 15 Aug 2004 23:39:18 -0000 1.69 > : +++ dev/usb/usb_subr.c 8 Sep 2004 14:05:51 -0000 > : @@ -1016,9 +1016,11 @@ > : if (dv !=3D NULL) { > : return (USBD_NORMAL_COMPLETION); > : } > : +#ifdef ROAM_SKIP_USB_DEVICE_LEAK > : tmpdv =3D dev->subdevs; > : dev->subdevs =3D 0; > : free(tmpdv, M_USB); > : +#endif > : =20 > : /* > : * The generic attach failed, but leave the device as it is. >=20 > I'm not sure I understand why the above fixes anything. Is it because > it makes the proper references go away? If so, it can likely be > deleted. I'll need to thread through the code to see if any of the > other instances of those 3 lines of code can go. Remember the thought I told you to hold on to? :) This is the part where usbd_probe_and_attach() removes the usbd_device_handle's reference to the device_t - and now usb_disconnect_port() thinks it's safe to remove the usbd_device_handle. However, the device_t itself still holds a reference to it in the ivars. Removing these particular three lines of code right here makes usbd_probe_and_attach() keep the subdevs ref, as it very well should. It's true that these same lines are used in two other places, but it's okay - it's in usbd_probe_and_attach() too, it's just garbage collection after the previous unsuccessful attempts to attach a driver. At least I think it's okay, since there might be a fun failure case if a driver tried to attach and created another device_t, then failed to attach and for some reason did not remove the device_t. This sounds suspiciously like the situation we're up against right here... it makes me wonder now, although until now I was convinced it was okay to free the subdevs in the previous failed attempts. > : @@ -1346,7 +1348,7 @@ > : di->udi_speed =3D dev->speed; > : =20 > : if (dev->subdevs !=3D NULL) { > : - for (i =3D 0; dev->subdevs[i] && > : + for (i =3D 0; dev->subdevs[i] && device_is_attached(dev->subdevs[i])= && > : i < USB_MAX_DEVNAMES; i++) { > : strncpy(di->udi_devnames[i], USBDEVPTRNAME(dev->subdevs[i]), > : USB_MAX_DEVNAMELEN); >=20 > OK. I understand this as well. It likely is a good change. Well, it is a no-op unless the three lines above are removed, since if usbd_probe_and_attach() fails, there won't be any non-null subdevs. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg 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? --NklN7DEeGtkPCoo3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBP0Mq7Ri2jRYZRVMRApySAJ948KCQqXEpHpH8sGpnGR8gm/aSAgCgksyS FjkwSL+stWwvrCnCLv95F0Q= =/Hph -----END PGP SIGNATURE----- --NklN7DEeGtkPCoo3-- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 17:39: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 0859416A4CE; Wed, 8 Sep 2004 17:39:19 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6113B43D54; Wed, 8 Sep 2004 17:39:18 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i88Habw0049990; Wed, 8 Sep 2004 11:36:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 08 Sep 2004 11:37:07 -0600 (MDT) Message-Id: <20040908.113707.54185659.imp@bsdimp.com> To: roam@ringlet.net From: "M. Warner Losh" In-Reply-To: <20040908150943.GA1924@straylight.m.ringlet.net> References: <20040908150943.GA1924@straylight.m.ringlet.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Sep__8_11:37:07_2004_385)--" Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org Subject: Re: [PATCH] Fix USB panics 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, 08 Sep 2004 17:39:19 -0000 ----Next_Part(Wed_Sep__8_11:37:07_2004_385)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Peter, thanks again for the excellent anaylsis of the problem. I introduced this when I cleaned up the load a driver will now cause usb to attach a device case. You are correct as far as I can tell and can test. Here's the patch that I've come up with. Does it work for you? Warner ----Next_Part(Wed_Sep__8_11:37:07_2004_385)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename=usb-diff ? P ? PP Index: uhub.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/uhub.c,v retrieving revision 1.62 diff -u -r1.62 uhub.c --- uhub.c 15 Aug 2004 23:39:18 -0000 1.62 +++ uhub.c 8 Sep 2004 17:34:21 -0000 @@ -90,7 +90,6 @@ Static void uhub_intr(usbd_xfer_handle, usbd_private_handle,usbd_status); #if defined(__FreeBSD__) -Static bus_child_detached_t uhub_child_detached; Static bus_child_location_str_t uhub_child_location_str; Static bus_child_pnpinfo_str_t uhub_child_pnpinfo_str; #endif @@ -110,7 +109,6 @@ uhub_match, uhub_attach, uhub_detach, uhub_activate); #elif defined(__FreeBSD__) USB_DECLARE_DRIVER_INIT(uhub, - DEVMETHOD(bus_child_detached, uhub_child_detached), DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, uhub_child_location_str), DEVMETHOD(bus_driver_added, bus_generic_driver_added), @@ -123,7 +121,6 @@ devclass_t uhubroot_devclass; Static device_method_t uhubroot_methods[] = { - DEVMETHOD(bus_child_detached, uhub_child_detached), DEVMETHOD(bus_child_location_str, uhub_child_location_str), DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_str), DEVMETHOD(bus_driver_added, bus_generic_driver_added), @@ -378,15 +375,17 @@ DPRINTFN(3,("uhub_explore: %s port %d status 0x%04x 0x%04x\n", USBDEVNAME(sc->sc_dev), port, status, change)); if (change & UPS_C_PORT_ENABLED) { - DPRINTF(("uhub_explore: C_PORT_ENABLED\n")); + DPRINTF(("uhub_explore: C_PORT_ENABLED 0x%x\n", change)); usbd_clear_port_feature(dev, port, UHF_C_PORT_ENABLE); if (change & UPS_C_CONNECT_STATUS) { + printf("Change is 0x%x\n", change); /* Ignore the port error if the device vanished. */ } else if (status & UPS_PORT_ENABLED) { printf("%s: illegal enable change, port %d\n", USBDEVNAME(sc->sc_dev), port); } else { + printf("up->restartcnt is %d change is %x\n", up->restartcnt, change); /* Port error condition. */ if (up->restartcnt) /* no message first time */ printf("%s: port error, restarting " @@ -398,7 +397,7 @@ else printf("%s: port error, giving up " "port %d\n", - USBDEVNAME(sc->sc_dev), port); + USBDEVNAME(sc->sc_dev), port); } } if (!(change & UPS_C_CONNECT_STATUS)) { @@ -683,35 +682,6 @@ iface->idesc->bInterfaceSubClass); } return (0); -} - -/* Called when a device has been detached from it */ -Static void -uhub_child_detached(device_t self, device_t child) -{ - struct uhub_softc *sc = device_get_softc(self); - usbd_device_handle devhub = sc->sc_hub; - usbd_device_handle dev; - int nports; - int port; - int i; - - if (!devhub->hub) - /* should never happen; children are only created after init */ - panic("hub not fully initialised, but child deleted?"); - - nports = devhub->hub->hubdesc.bNbrPorts; - for (port = 0; port < nports; port++) { - dev = devhub->hub->ports[port].device; - if (dev == NULL || dev->subdevs == NULL) - continue; - for (i = 0; dev->subdevs[i]; i++) { - if (dev->subdevs[i] == child) { - dev->subdevs[i] = NULL; - return; - } - } - } } #endif Index: usb_subr.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/usb_subr.c,v retrieving revision 1.69 diff -u -r1.69 usb_subr.c --- usb_subr.c 15 Aug 2004 23:39:18 -0000 1.69 +++ usb_subr.c 8 Sep 2004 17:34:21 -0000 @@ -905,6 +905,10 @@ if (dv) { return (USBD_NORMAL_COMPLETION); } + /* + * Free subdevs so we can reallocate it larger for the number of + * interfaces + */ tmpdv = dev->subdevs; dev->subdevs = NULL; free(tmpdv, M_USB); @@ -1016,9 +1020,6 @@ if (dv != NULL) { return (USBD_NORMAL_COMPLETION); } - tmpdv = dev->subdevs; - dev->subdevs = 0; - free(tmpdv, M_USB); /* * The generic attach failed, but leave the device as it is. @@ -1346,11 +1347,13 @@ di->udi_speed = dev->speed; if (dev->subdevs != NULL) { - for (i = 0; dev->subdevs[i] && - i < USB_MAX_DEVNAMES; i++) { - strncpy(di->udi_devnames[i], USBDEVPTRNAME(dev->subdevs[i]), - USB_MAX_DEVNAMELEN); - di->udi_devnames[i][USB_MAX_DEVNAMELEN-1] = '\0'; + for (i = 0; dev->subdevs[i] && i < USB_MAX_DEVNAMES; i++) { + if (device_is_attached(dev->subdevs[i])) + strlcpy(di->udi_devnames[i], + USBDEVPTRNAME(dev->subdevs[i]), + USB_MAX_DEVNAMELEN); + else + di->udi_devnames[i][0] = 0; } } else { i = 0; ----Next_Part(Wed_Sep__8_11:37:07_2004_385)---- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 17:44: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 BC12616A4CE for ; Wed, 8 Sep 2004 17:44:36 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 692CC43D53 for ; Wed, 8 Sep 2004 17:44:28 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 27072 invoked from network); 8 Sep 2004 17:42:27 -0000 Received: from unknown (HELO straylight.m.ringlet.net) (217.75.134.254) by gandalf.online.bg with SMTP; 8 Sep 2004 17:42:27 -0000 Received: (qmail 38277 invoked by uid 1000); 8 Sep 2004 17:44:50 -0000 Date: Wed, 8 Sep 2004 20:44:50 +0300 From: Peter Pentchev To: "M. Warner Losh" Message-ID: <20040908174450.GC1924@straylight.m.ringlet.net> Mail-Followup-To: "M. Warner Losh" , freebsd-hackers@freebsd.org, freebsd-current@freebsd.org References: <20040908150943.GA1924@straylight.m.ringlet.net> <20040908.113707.54185659.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cPi+lWm09sJ+d57q" Content-Disposition: inline In-Reply-To: <20040908.113707.54185659.imp@bsdimp.com> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org Subject: Re: [PATCH] Fix USB panics 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, 08 Sep 2004 17:44:36 -0000 --cPi+lWm09sJ+d57q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 08, 2004 at 11:37:07AM -0600, M. Warner Losh wrote: > Peter, >=20 > thanks again for the excellent anaylsis of the problem. I introduced > this when I cleaned up the load a driver will now cause usb to attach > a device case. You are correct as far as I can tell and can test. > Here's the patch that I've come up with. Does it work for you? Unfortunately, I have to run right now, but from a quick look over it seems that it will work. I'll test it and let you know tomorrow at the latest. Thanks! G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg 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. --cPi+lWm09sJ+d57q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBP0US7Ri2jRYZRVMRAnaeAJwOGjOaDDV02b//uSKvPRxKPMRN4gCfS0lZ UgOAN7+RrPfvnsgfig3eCOQ= =A7fY -----END PGP SIGNATURE----- --cPi+lWm09sJ+d57q-- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 20:24: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 665AB16A4CE for ; Wed, 8 Sep 2004 20:24:34 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FC7243D1F for ; Wed, 8 Sep 2004 20:24:34 +0000 (GMT) (envelope-from aaron.glenn@gmail.com) Received: by mproxy.gmail.com with SMTP id 77so298000rnl for ; Wed, 08 Sep 2004 13:24:26 -0700 (PDT) Received: by 10.38.82.8 with SMTP id f8mr3004499rnb; Wed, 08 Sep 2004 13:24:26 -0700 (PDT) Received: by 10.38.79.2 with HTTP; Wed, 8 Sep 2004 13:24:26 -0700 (PDT) Message-ID: <18f6019404090813242020a60f@mail.gmail.com> Date: Wed, 8 Sep 2004 13:24:26 -0700 From: Aaron Glenn To: Bob Willcox , freebsd-hackers@freebsd.org In-Reply-To: <20040908145238.GA11833@luke.immure.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040908145238.GA11833@luke.immure.com> Subject: Re: Shiva LanRover/4E for serial console connection? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Aaron Glenn List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 20:24:34 -0000 I take it you've read the Handbook regarding serial console access? http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html http://www.freebsd.org/doc/en_US.ISO8859-1/articles/console-server/freebsd.html On Wed, 8 Sep 2004 09:52:38 -0500, Bob Willcox wrote: > Has anyone used one of these things for serial console access? Any > suggestions, help or tips would be greatly appreciated. > > Thanks, > Bob From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 20:44: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 DD8AA16A4CE for ; Wed, 8 Sep 2004 20:44:55 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 18D4D43D2D for ; Wed, 8 Sep 2004 20:44:55 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 8 Sep 2004 21:44:54 +0100 (BST) Date: Wed, 8 Sep 2004 21:44:53 +0100 From: David Malone To: Soo-Hyun Choi Message-ID: <20040908204453.GA38332@walton.maths.tcd.ie> References: <34b425c504090809435a949a03@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34b425c504090809435a949a03@mail.gmail.com> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie cc: freebsd-hackers@freebsd.org Subject: Re: TCP RTO 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, 08 Sep 2004 20:44:56 -0000 On Wed, Sep 08, 2004 at 05:43:36PM +0100, Soo-Hyun Choi wrote: > These variables are used to calculate the TCP RTO. But why do they > have the two different version of variables? There are two different variables because they store different things. One measures the average of the round trip time and the other measured the variability of the round trip time. The RTO is calculated as the average plus some constant times the variability. > The interesting thing is > the 't_' variables are a fixed-point integer, and the original > variables are just floating-point values. I assume the reason why they > have is to avoid the floating-point arithmetic in the kernel. Is this > really only reason for being two different version of those? The calculation is designed to be done with fixed point calculations, but this is not why there are two variables. David. From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 22:57:14 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 B426A16A4CE; Wed, 8 Sep 2004 22:57:14 +0000 (GMT) Received: from green.homeunix.org (pcp04368961pcs.nrockv01.md.comcast.net [69.140.212.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A2D243D41; Wed, 8 Sep 2004 22:57:14 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i88MvDn1079735; Wed, 8 Sep 2004 18:57:13 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i88Mv9c3079734; Wed, 8 Sep 2004 18:57:09 -0400 (EDT) (envelope-from green) Date: Wed, 8 Sep 2004 18:57:09 -0400 From: Brian Fundakowski Feldman To: Pascal Hofstee Message-ID: <20040908225709.GI928@green.homeunix.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: gnome@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: pthread_mutex_trylock and glib-2 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, 08 Sep 2004 22:57:14 -0000 On Tue, Sep 07, 2004 at 06:27:14PM -0700, Pascal Hofstee wrote: > On Mon, 6 Sep 2004 15:12:08 -0700, Pascal Hofstee wrote: > > After a few hours of digging through both the glib-2 as well as the > > beep-media-player sources i finally managed to figure out why > > beep-media-player apprently crashes on startup when using libpthread, > > but not when using libc_r. > > > > i filed a bugreport against this problem on bugzilla.gnome.org ... in > > the hope to get some feedback from glib-developers ... > > > > http://bugzilla.gnome.org/show_bug.cgi?id=152009 > > > > The problem is with the actual return value of pthread_mutex_trylock > > returning EDEADLK instead of EBUSY. > > > > from what i have been able to glance from this previous discussion > > regarding this particular subject > > (http://lists.freebsd.org/pipermail/freebsd-threads/2004-January/001539.html) > > > > pthread_mutex_trylock should behave identical to pthread_mutex_lock > > except return immediately in case of a blocking mutex, which would > > suggest EDEADLK as a possible return value. > > > > This Seems to be the current implementation of both libpthread as well > > as libthr ... with libc_r being the sole exception. > > > > The pthread_mutex_trylock manpage however does not reflect this actual > > implementation and only mentions EBUSY and EINVAL. > > > > I was wondering assuming the implementation is actually correct if > > this could be rectified in the pthread_mutex_trylock manpage ... and > > if my assumption is wrong if the implementation could be changed to > > reflect the manpage. > > > > In the former case i will have to bug the glib-devs to change the > > implementation of their pthread_mutex_trylock wrapper ... to also > > check for EDEADLK. > > I am hereby including an updated > /usr/ports/devel/glib20/files/patch-gthread_gthread-posix.c > > that includes the additional check for EDEADLK besides EBUSY in glib's > g_mutex_trylock_posix_impl function. > > With this fix applied to my installation of glib beep-media-player now > works as expected with libpthread, and this is very likely to resolve > similar behaviour with other ports that try to use glib's threading > functions. > > I CC-ed glib20 port-maintainer (gnome@FreeBSD.org) in the hope this > (or appropriate alternative) fix makes it in time for 5.3-RELEASE. FWIW, I had to fix a similar problem in mozilla/NSPR's codebase to make the build with debugging code turned on work. Well, I guess it was really the same problem. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 00:46: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 2BD8F16A4CE for ; Thu, 9 Sep 2004 00:46:15 +0000 (GMT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9094043D1F for ; Thu, 9 Sep 2004 00:46:14 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 0F5DA2BDB8 for ; Thu, 9 Sep 2004 10:46:12 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 1E2F4511FA; Thu, 9 Sep 2004 10:16:10 +0930 (CST) Date: Thu, 9 Sep 2004 10:16:10 +0930 From: Greg 'groggy' Lehey To: Jerry Toung Message-ID: <20040909004610.GQ49572@wantadilla.lemis.com> References: <200409081101.33018.jtoung@arc.nasa.gov> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R4+lwT0Y15rLnKR0" Content-Disposition: inline In-Reply-To: <200409081101.33018.jtoung@arc.nasa.gov> User-Agent: Mutt/1.4.1i Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: FreeBSD Hackers Subject: Re: debugging kld 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: Thu, 09 Sep 2004 00:46:15 -0000 --R4+lwT0Y15rLnKR0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wednesday, 8 September 2004 at 11:01:33 -0700, Jerry Toung wrote: > Good morning Greg, > I am trying to debug a kld that I wrote that keeps causing panics. I already > did a search on the mailing list, and the only useful info I got was an email > you replied to in 1999, "Re: debugging a panic in a kld-ed kernel". You > refered to .gdbinit.vinum.paths but I couldn't find it. I am running > 6.0current, then you gave out this: But not for 6-CURRENT. The kld symbols should get loaded automatically, so you don't need to do anything. You should see something like: Reading symbols from /usr/obj/usr/src/sys/ZAPHOD/modules/usr/src/sys/modules/dcons/dcons.ko.debug...done. Loaded symbols for /usr/obj/usr/src/sys/ZAPHOD/modules/usr/src/sys/modules/dcons/dcons.ko.debug Reading symbols from /usr/obj/usr/src/sys/ZAPHOD/modules/usr/src/sys/modules/dcons_crom/dcons_crom.ko.debug...done. Loaded symbols for /usr/obj/usr/src/sys/ZAPHOD/modules/usr/src/sys/modules/dcons_crom/dcons_crom.ko.debug This is all you need. > I copied and past it in a file and made it executable, but no > success. Could you be kind enough and let me know what to do to > debug my kld. You can reply to hackers since I am also on that > list. I am sure this will benefit more than one person. This should be generally known. There's also a man page gdb(4) which explains this and more. Greg -- Finger grog@lemis.com for PGP public key. See complete headers for address and phone numbers. --R4+lwT0Y15rLnKR0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFBP6fSIubykFB6QiMRAt6SAJkBYsJErK+CTzCVvPQHL+BVkfZUzACeNV5C FyNAZOZe5zgPfm2/zWv0FOQ= =BVOx -----END PGP SIGNATURE----- --R4+lwT0Y15rLnKR0-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 03:06: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 D62D916A4CE; Thu, 9 Sep 2004 03:06:09 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B58C643D46; Thu, 9 Sep 2004 03:06:09 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id A59035CA24; Wed, 8 Sep 2004 20:06:09 -0700 (PDT) Date: Wed, 8 Sep 2004 20:06:09 -0700 From: Alfred Perlstein To: am-utils-developers@am-utils.org, fs@freebsd.org, hackers@freebsd.org Message-ID: <20040909030609.GA16925@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: autofs available for FreeBSD 4, 5 and 6. 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, 09 Sep 2004 03:06:10 -0000 Autofs has been integrated into FreeBSD 6. There is also a standalone tarball that will compile and run on FreeBSD 5 as well as FreeBSD 4. The most recent one is available here: http://people.freebsd.org/~alfred/sources/autofs/ If you want to get an idea on how to use it, see the libautofs.3 manpage. You can also check out the example driver program under /usr/share/examples/autofs/driver (under FreeBSD 6) or the driver/ directory (from the tarball). If you want to use the tarball, just extract it and run make depend all install from the top level directory. Have fun! AMD guys, let me know where we go from here! The only thing I have not implemented is trigger timeouts inside the autofs. I'll get to it eventually though. -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684 From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 04:39: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 DA19516A4CE for ; Thu, 9 Sep 2004 04:39:53 +0000 (GMT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 543F343D3F for ; Thu, 9 Sep 2004 04:39:53 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 3927E2BDB5 for ; Thu, 9 Sep 2004 14:39:50 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 48A6D511FA; Thu, 9 Sep 2004 14:09:47 +0930 (CST) Date: Thu, 9 Sep 2004 14:09:47 +0930 From: Greg 'groggy' Lehey To: Rob Deker Message-ID: <20040909043947.GV21117@wantadilla.lemis.com> References: <1093817592.8552.90.camel@nyx.slackdot.org> <1093820159.61235.81.camel@palm.tree.com> <1093835972.6769.55.camel@localhost> <1093885212.61235.102.camel@palm.tree.com> <41336DE5.4000000@slackdot.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CSNFvL6ilyiKL/Hs" Content-Disposition: inline In-Reply-To: <41336DE5.4000000@slackdot.org> User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: freebsd-hackers@freebsd.org cc: Stephan Uphoff Subject: Re: Serial consoles and remote GDB 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, 09 Sep 2004 04:39:54 -0000 --CSNFvL6ilyiKL/Hs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Monday, 30 August 2004 at 14:11:49 -0400, Rob Deker wrote: > > Stephan Uphoff wrote: > >> Are you sure that your serial line is configured with the right >> baud rate? > > This may seem a stupid question, but how do I set the baudrate on > the port and in gdb? The default bit rate is 9600 bps. It would be nice to go higher, but there appear to be race conditions which make it unreliable. At least initially, you should run at 9600 bps; after that, there are ways of changing the rate that are themselves changing. Check the kernel configuration files and sysctl. To set the bit rate on the port depends on what software you're using. I still use cu, though it's now gone from the base system, along with its parent uucp. With cu you'd do: cu -s 9600 -l /dev/cuaa0 You can do something similar with tip, which is still around. If you have a firewire connection, that's *much* better. Before you say "no, I don't have that", consider that firewire hardware is very cheap. There's some stuff about it in http://www.lemis.com/papers/AUUG2004/tutorial.pdf, but it would be nice if somebody were to extract this information and put it in the handbook. If anybody wants to, please contact me and I'll supply the source. Greg -- See complete headers for address and phone numbers. --CSNFvL6ilyiKL/Hs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFBP96TIubykFB6QiMRAuS2AJ49zA6HmXaAaQ+F/Zx7TElnkGVxiQCgnjST 9vR5B4UniDWtzjR261HMDJw= =I9q8 -----END PGP SIGNATURE----- --CSNFvL6ilyiKL/Hs-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 05:09: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 D8B5216A4CE for ; Thu, 9 Sep 2004 05:09:56 +0000 (GMT) Received: from mx1.freebsdsystems.com (mx1.FreeBSDsystems.COM [69.90.68.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EE4243D31 for ; Thu, 9 Sep 2004 05:09:54 +0000 (GMT) (envelope-from lnb@FreeBSDsystems.COM) Received: (qmail 10459 invoked by uid 3011); 9 Sep 2004 05:11:20 -0000 Received: from lnb@FreeBSDsystems.COM by mx1.freebsdsystems.com by uid 89 with qmail-scanner-1.21 (clamscan: 0.54. f-prot: 3.12/. Clear:RC:1(216.235.9.82):. Processed in 0.199507 secs); 09 Sep 2004 05:11:20 -0000 Received: from unknown (HELO ?192.168.0.5?) (lnb@216.235.9.82) by mx1.freebsdsystems.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 9 Sep 2004 05:11:19 -0000 From: Lanny Baron To: Greg 'groggy' Lehey In-Reply-To: <20040909043947.GV21117@wantadilla.lemis.com> References: <1093817592.8552.90.camel@nyx.slackdot.org> <1093820159.61235.81.camel@palm.tree.com> <1093835972.6769.55.camel@localhost><41336DE5.4000000@slackdot.org> <20040909043947.GV21117@wantadilla.lemis.com> Content-Type: text/plain Organization: FreeBSD Systems, Inc. Message-Id: <1094706588.66493.116.camel@panda.freebsdsystems.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 09 Sep 2004 01:09:48 -0400 Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: Rob Deker cc: Stephan Uphoff Subject: Re: Serial consoles and remote GDB 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, 09 Sep 2004 05:09:57 -0000 I use tip com1 to go out serial to serial of other server's redirected console. Just check /etc/remote and make sure you have a line as follows: sio0|com1:dv=/dev/cuaa0:br#9600:pa=none: But if you do serious console redirection, get a decent Terminal Server to which you ssh to the Terminal Server and then use its own commands to connect to your serial console(s). Regards, Lanny On Thu, 2004-09-09 at 00:39, Greg 'groggy' Lehey wrote: > On Monday, 30 August 2004 at 14:11:49 -0400, Rob Deker wrote: > > > > Stephan Uphoff wrote: > > > >> Are you sure that your serial line is configured with the right > >> baud rate? > > > > This may seem a stupid question, but how do I set the baudrate on > > the port and in gdb? > > The default bit rate is 9600 bps. It would be nice to go higher, but > there appear to be race conditions which make it unreliable. At least > initially, you should run at 9600 bps; after that, there are ways of > changing the rate that are themselves changing. Check the kernel > configuration files and sysctl. > > To set the bit rate on the port depends on what software you're > using. I still use cu, though it's now gone from the base system, > along with its parent uucp. With cu you'd do: > > cu -s 9600 -l /dev/cuaa0 > > You can do something similar with tip, which is still around. > > If you have a firewire connection, that's *much* better. Before you > say "no, I don't have that", consider that firewire hardware is very > cheap. There's some stuff about it in > http://www.lemis.com/papers/AUUG2004/tutorial.pdf, but it would be > nice if somebody were to extract this information and put it in the > handbook. If anybody wants to, please contact me and I'll supply the > source. > > Greg > -- > See complete headers for address and phone numbers. -- =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= Lanny Baron Proud to be 100% FreeBSD http://www.FreeBSDsystems.COM Toll Free: 1.877.963.1900 =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 08:49: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 3D86D16A4CE for ; Thu, 9 Sep 2004 08:49:41 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 6002843D2F for ; Thu, 9 Sep 2004 08:49:39 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 4815 invoked from network); 9 Sep 2004 08:47:36 -0000 Received: from unknown (HELO straylight.m.ringlet.net) (217.75.134.254) by gandalf.online.bg with SMTP; 9 Sep 2004 08:47:36 -0000 Received: (qmail 1633 invoked by uid 1000); 9 Sep 2004 08:50:02 -0000 Date: Thu, 9 Sep 2004 11:50:02 +0300 From: Peter Pentchev To: "M. Warner Losh" Message-ID: <20040909085002.GA1509@straylight.m.ringlet.net> Mail-Followup-To: "M. Warner Losh" , freebsd-hackers@freebsd.org, freebsd-current@freebsd.org References: <20040908150943.GA1924@straylight.m.ringlet.net> <20040908.113707.54185659.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <20040908.113707.54185659.imp@bsdimp.com> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org Subject: Re: [PATCH] Fix USB panics 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, 09 Sep 2004 08:49:41 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 08, 2004 at 11:37:07AM -0600, M. Warner Losh wrote: > Peter, >=20 > thanks again for the excellent anaylsis of the problem. I introduced > this when I cleaned up the load a driver will now cause usb to attach > a device case. You are correct as far as I can tell and can test. > Here's the patch that I've come up with. Does it work for you? Yes, this patch works just fine. I assume you will commit it without the printf and indentation chunks, though? :) Thanks again! G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg 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 because I didn't think of a good beginning of it. --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBQBk67Ri2jRYZRVMRAopIAJ98eSIIUhmMpEUcVnju9Q5NxHxF/ACeNZuC 1VNZevODkiFrUAZWi+O/YJo= =wcRF -----END PGP SIGNATURE----- --9amGYk9869ThD9tj-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 14:29: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 9130516A4CE for ; Thu, 9 Sep 2004 14:29:29 +0000 (GMT) Received: from cicero1.cybercity.dk (cicero1.cybercity.dk [212.242.40.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECC7243D53 for ; Thu, 9 Sep 2004 14:29:28 +0000 (GMT) (envelope-from db@traceroute.dk) Received: from user2.cybercity.dk (user2.cybercity.dk [212.242.41.35]) by cicero1.cybercity.dk (Postfix) with ESMTP id 7F1FA7E42CE for ; Thu, 9 Sep 2004 16:29:26 +0200 (CEST) Received: from [10.0.0.3] (port132.ds1-arsy.adsl.cybercity.dk [212.242.239.73]) by user2.cybercity.dk (Postfix) with ESMTP id E1FDB186B2 for ; Thu, 9 Sep 2004 16:29:25 +0200 (CEST) From: db To: hackers@freebsd.org Date: Thu, 9 Sep 2004 16:30:35 +0200 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200409091630.36721.db@traceroute.dk> Subject: Runtime loading 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, 09 Sep 2004 14:29:29 -0000 Hi all In my C++ program I need to load some files/classes at runtime, so that users can add "plugins" without recompilling my program. What functions should I use? I'm using FreeBSD 5.3-beta2 btw. br db From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 14:36: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 EC96F16A4CE for ; Thu, 9 Sep 2004 14:36:21 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF77943D4C for ; Thu, 9 Sep 2004 14:36:21 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id B52695CA68; Thu, 9 Sep 2004 07:36:21 -0700 (PDT) Date: Thu, 9 Sep 2004 16:36:21 +0200 From: Maxime Henrion To: db Message-ID: <20040909143621.GD13294@elvis.mu.org> References: <200409091630.36721.db@traceroute.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200409091630.36721.db@traceroute.dk> User-Agent: Mutt/1.4.2.1i cc: hackers@freebsd.org Subject: Re: Runtime loading 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, 09 Sep 2004 14:36:22 -0000 db wrote: > Hi all > > In my C++ program I need to load some files/classes at runtime, so that users > can add "plugins" without recompilling my program. What functions should I > use? I'm using FreeBSD 5.3-beta2 btw. I'm not sure about C++, though I guess you could use the same functions as in C. If that's true, then you should use the dlopen() family of functions. They are quite portable, since you'll find the same functions under all the *BSD, Linux and Solaris. Be aware that with Linux and Solaris, those functions are located in libdl, while they are found in libc on the *BSD systems. Cheers, Maxime From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 14:41:26 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 D61D116A4CF; Thu, 9 Sep 2004 14:41:26 +0000 (GMT) Received: from cicero1.cybercity.dk (cicero1.cybercity.dk [212.242.40.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78E0F43D62; Thu, 9 Sep 2004 14:41:26 +0000 (GMT) (envelope-from db@traceroute.dk) Received: from user5.cybercity.dk (user5.cybercity.dk [212.242.41.51]) by cicero1.cybercity.dk (Postfix) with ESMTP id 670B97E3D12; Thu, 9 Sep 2004 16:41:25 +0200 (CEST) Received: from [10.0.0.3] (port132.ds1-arsy.adsl.cybercity.dk [212.242.239.73]) by user5.cybercity.dk (Postfix) with ESMTP id 4674B3A1C0C; Thu, 9 Sep 2004 16:41:25 +0200 (CEST) From: db To: Maxime Henrion Date: Thu, 9 Sep 2004 16:42:34 +0200 User-Agent: KMail/1.7 References: <200409091630.36721.db@traceroute.dk> <20040909143621.GD13294@elvis.mu.org> In-Reply-To: <20040909143621.GD13294@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200409091642.36082.db@traceroute.dk> cc: hackers@freebsd.org Subject: Re: Runtime loading 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, 09 Sep 2004 14:41:27 -0000 On Thursday 09 September 2004 16:36, you wrote: > > In my C++ program I need to load some files/classes at runtime, so that > > users can add "plugins" without recompilling my program. What functions > > should I use? I'm using FreeBSD 5.3-beta2 btw. > > I'm not sure about C++, though I guess you could use the same functions as > in C. If that's true, then you should use the dlopen() family of > functions. They are quite portable, since you'll find the same functions > under all the *BSD, Linux and Solaris. Be aware that with Linux and > Solaris, those functions are located in libdl, while they are found in libc > on the *BSD systems. Ok, thanks :-) br db From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 14:43: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 6581216A4CE for ; Thu, 9 Sep 2004 14:43:59 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 220B043D4C for ; Thu, 9 Sep 2004 14:43:59 +0000 (GMT) (envelope-from rdormer@gmail.com) Received: by mproxy.gmail.com with SMTP id 74so468097rnk for ; Thu, 09 Sep 2004 07:43:52 -0700 (PDT) Received: by 10.38.59.62 with SMTP id h62mr1207040rna; Thu, 09 Sep 2004 07:43:52 -0700 (PDT) Received: by 10.38.76.31 with HTTP; Thu, 9 Sep 2004 07:43:52 -0700 (PDT) Message-ID: <3174add604090907435928beb3@mail.gmail.com> Date: Thu, 9 Sep 2004 10:43:52 -0400 From: Robert Dormer To: db In-Reply-To: <200409091642.36082.db@traceroute.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <200409091630.36721.db@traceroute.dk> <20040909143621.GD13294@elvis.mu.org> <200409091642.36082.db@traceroute.dk> cc: hackers@freebsd.org Subject: Re: Runtime loading X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Robert Dormer List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2004 14:43:59 -0000 glib provides a facility for this, and should be even more platform portable.... On Thu, 9 Sep 2004 16:42:34 +0200, db wrote: > On Thursday 09 September 2004 16:36, you wrote: > > > > In my C++ program I need to load some files/classes at runtime, so that > > > users can add "plugins" without recompilling my program. What functions > > > should I use? I'm using FreeBSD 5.3-beta2 btw. > > > > I'm not sure about C++, though I guess you could use the same functions as > > in C. If that's true, then you should use the dlopen() family of > > functions. They are quite portable, since you'll find the same functions > > under all the *BSD, Linux and Solaris. Be aware that with Linux and > > Solaris, those functions are located in libdl, while they are found in libc > > on the *BSD systems. > > Ok, thanks :-) > > br > 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" > From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 15:04:12 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 8ED6A16A4CE for ; Thu, 9 Sep 2004 15:04:12 +0000 (GMT) Received: from cicero0.cybercity.dk (cicero0.cybercity.dk [212.242.40.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58DBA43D1D for ; Thu, 9 Sep 2004 15:04:12 +0000 (GMT) (envelope-from db@traceroute.dk) Received: from user4.cybercity.dk (user4.cybercity.dk [212.242.41.50]) by cicero0.cybercity.dk (Postfix) with ESMTP id AE1AC29567; Thu, 9 Sep 2004 17:04:03 +0200 (CEST) Received: from [10.0.0.3] (port132.ds1-arsy.adsl.cybercity.dk [212.242.239.73]) by user4.cybercity.dk (Postfix) with ESMTP id 8D11950CE5; Thu, 9 Sep 2004 17:04:03 +0200 (CEST) From: db To: Robert Dormer Date: Thu, 9 Sep 2004 17:05:13 +0200 User-Agent: KMail/1.7 References: <200409091630.36721.db@traceroute.dk> <200409091642.36082.db@traceroute.dk> <3174add604090907435928beb3@mail.gmail.com> In-Reply-To: <3174add604090907435928beb3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200409091705.14526.db@traceroute.dk> cc: hackers@freebsd.org Subject: Re: Runtime loading 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, 09 Sep 2004 15:04:12 -0000 On Thursday 09 September 2004 16:43, Robert Dormer wrote: > glib provides a facility for this, and should be even more platform > portable.... Yes I know, but this is for security/lockdown, so I want it to compile/run using that is in FreeBSD's base system. I'll try to think about portability when writing the code, so that linux/solaris users can use lockdown with minor modifications. It is the keywords read from the configuration file I want to load at runtime, so that users can write their own keywords and make it easier for me to extend lockdown. br db From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 15:37: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 F1D8C16A4CF for ; Thu, 9 Sep 2004 15:37:07 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73ABA43D41 for ; Thu, 9 Sep 2004 15:37:07 +0000 (GMT) (envelope-from zombyfork@gmail.com) Received: by mproxy.gmail.com with SMTP id 80so277560rnl for ; Thu, 09 Sep 2004 08:37:06 -0700 (PDT) Received: by 10.38.8.74 with SMTP id 74mr1207846rnh; Thu, 09 Sep 2004 08:37:06 -0700 (PDT) Received: by 10.38.206.1 with HTTP; Thu, 9 Sep 2004 08:37:06 -0700 (PDT) Message-ID: <346a8022040909083715251d8f@mail.gmail.com> Date: Thu, 9 Sep 2004 11:37:06 -0400 From: Coleman Kane To: Brian Fundakowski Feldman In-Reply-To: <20040908225709.GI928@green.homeunix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040908225709.GI928@green.homeunix.org> cc: gnome@freebsd.org cc: freebsd-hackers@freebsd.org cc: Pascal Hofstee Subject: Re: pthread_mutex_trylock and glib-2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: cokane@cokane.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2004 15:37:08 -0000 Yeah, I had the same problem. Fixed it by not building with debug code, but I noticed there was chatter about it. On Wed, 8 Sep 2004 18:57:09 -0400, Brian Fundakowski Feldman wrote: > > > On Tue, Sep 07, 2004 at 06:27:14PM -0700, Pascal Hofstee wrote: > > On Mon, 6 Sep 2004 15:12:08 -0700, Pascal Hofstee wrote: > > > After a few hours of digging through both the glib-2 as well as the > > > beep-media-player sources i finally managed to figure out why > > > beep-media-player apprently crashes on startup when using libpthread, > > > but not when using libc_r. > > > > > > i filed a bugreport against this problem on bugzilla.gnome.org ... in > > > the hope to get some feedback from glib-developers ... > > > > > > http://bugzilla.gnome.org/show_bug.cgi?id=152009 > > > > > > The problem is with the actual return value of pthread_mutex_trylock > > > returning EDEADLK instead of EBUSY. > > > > > > from what i have been able to glance from this previous discussion > > > regarding this particular subject > > > (http://lists.freebsd.org/pipermail/freebsd-threads/2004-January/001539.html) > > > > > > pthread_mutex_trylock should behave identical to pthread_mutex_lock > > > except return immediately in case of a blocking mutex, which would > > > suggest EDEADLK as a possible return value. > > > > > > This Seems to be the current implementation of both libpthread as well > > > as libthr ... with libc_r being the sole exception. > > > > > > The pthread_mutex_trylock manpage however does not reflect this actual > > > implementation and only mentions EBUSY and EINVAL. > > > > > > I was wondering assuming the implementation is actually correct if > > > this could be rectified in the pthread_mutex_trylock manpage ... and > > > if my assumption is wrong if the implementation could be changed to > > > reflect the manpage. > > > > > > In the former case i will have to bug the glib-devs to change the > > > implementation of their pthread_mutex_trylock wrapper ... to also > > > check for EDEADLK. > > > > I am hereby including an updated > > /usr/ports/devel/glib20/files/patch-gthread_gthread-posix.c > > > > that includes the additional check for EDEADLK besides EBUSY in glib's > > g_mutex_trylock_posix_impl function. > > > > With this fix applied to my installation of glib beep-media-player now > > works as expected with libpthread, and this is very likely to resolve > > similar behaviour with other ports that try to use glib's threading > > functions. > > > > I CC-ed glib20 port-maintainer (gnome@FreeBSD.org) in the hope this > > (or appropriate alternative) fix makes it in time for 5.3-RELEASE. > > FWIW, I had to fix a similar problem in mozilla/NSPR's codebase to make > the build with debugging code turned on work. Well, I guess it was really > the same problem. > > -- > Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ > <> green@FreeBSD.org \ The Power to Serve! \ > Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ > > > _______________________________________________ > 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 Thu Sep 9 21:35: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 EF5B016A4D5 for ; Thu, 9 Sep 2004 21:35:23 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id B98BE43D5A for ; Thu, 9 Sep 2004 21:35:14 +0000 (GMT) (envelope-from caelian@gmail.com) Received: by mproxy.gmail.com with SMTP id 79so127071rnk for ; Thu, 09 Sep 2004 14:35:11 -0700 (PDT) Received: by 10.38.82.35 with SMTP id f35mr649291rnb; Thu, 09 Sep 2004 14:35:11 -0700 (PDT) Received: by 10.38.79.30 with HTTP; Thu, 9 Sep 2004 14:35:11 -0700 (PDT) Message-ID: Date: Thu, 9 Sep 2004 14:35:11 -0700 From: Pascal Hofstee To: cokane@cokane.org In-Reply-To: <346a8022040909083715251d8f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040908225709.GI928@green.homeunix.org> <346a8022040909083715251d8f@mail.gmail.com> cc: gnome@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: pthread_mutex_trylock and glib-2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Pascal Hofstee List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2004 21:35:24 -0000 Ok .. Got some bugzilla notifications ...and apparently this issue has been targetted for glib-2.4.7 with keywords "portability". So i assume we'll most likely have to include my provided patch for the glib20 port until 2.4.7 comes out and an appropriate fix will probably have been included by then. -- Pascal Hofstee From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 22:38: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 0D1C716A4CE; Thu, 9 Sep 2004 22:38:21 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F71F43D2D; Thu, 9 Sep 2004 22:38:20 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i89MaKoj068255; Thu, 9 Sep 2004 16:36:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 09 Sep 2004 16:36:53 -0600 (MDT) Message-Id: <20040909.163653.88001573.imp@bsdimp.com> To: roam@ringlet.net From: "M. Warner Losh" In-Reply-To: <20040908150943.GA1924@straylight.m.ringlet.net> References: <20040908150943.GA1924@straylight.m.ringlet.net> 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-current@freebsd.org Subject: Re: [PATCH] Fix USB panics 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, 09 Sep 2004 22:38:21 -0000 Hopefully the recently committed changes will fix this problem. Thanks again for your testing, your useful analysis and preliminary patches. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 9 22:52: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 CAE8916A4CE; Thu, 9 Sep 2004 22:52:05 +0000 (GMT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB52743D1D; Thu, 9 Sep 2004 22:52:04 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from stevenp4 ([193.123.241.40]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.2.R) with ESMTP id md50000538286.msg; Thu, 09 Sep 2004 23:46:28 +0100 Message-ID: <0a7701c496bf$9c632640$7f06000a@int.mediasurface.com> From: "Steven Hartland" To: Date: Thu, 9 Sep 2004 23:51:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Spam-Processed: multiplay.co.uk, Thu, 09 Sep 2004 23:46:28 +0100 (not processed: spam filter disabled) X-MDRemoteIP: 193.123.241.40 X-Return-Path: killing@multiplay.co.uk X-MDAV-Processed: multiplay.co.uk, Thu, 09 Sep 2004 23:46:32 +0100 cc: freebsd-hackers@freebsd.org Subject: Fw: Linux /proc returns invalid flags 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, 09 Sep 2004 22:52:06 -0000 The following is the output on a P4 Xeon cat /usr/compat/linux/proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 16 stepping : 7 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm b26 b27 b28 b29 3dnow cpu MHz : 2545.58 bogomips : 2545.58 The flags seem totally messed up, theres no SSE but there iss 3dnow. 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 Sep 10 02:13: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 49ADD16A4CE for ; Fri, 10 Sep 2004 02:13:46 +0000 (GMT) Received: from digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF44B43D3F for ; Fri, 10 Sep 2004 02:13:45 +0000 (GMT) (envelope-from vxp@digital-security.org) Received: from digital-security.org ([216.254.116.252] helo=ownage.digital-security.org) by digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5ZQl-0000yP-Q0 for freebsd-hackers@freebsd.org; Thu, 09 Sep 2004 20:38:25 -0400 Date: Thu, 9 Sep 2004 20:38:23 -0400 (EDT) From: vxp To: freebsd-hackers@freebsd.org Message-ID: <20040909203816.J3744@digital-security.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.but try not to be too hard on me please - i'm trying to learn :) i'm experimenting with the kernel's source, and i'm not quite sure how to likemy stuff? [...] Content analysis details: (-2.5 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 2.5 AWL AWL: Auto-whitelist adjustment Subject: header file related question 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, 10 Sep 2004 02:13:46 -0000 hi, i realize it's most likely a stupid question, but try not to be too hard on me please - i'm trying to learn :) i'm experimenting with the kernel's source, and i'm not quite sure how to find what all the header files are that i need, for the stuff i'd like to do.. how do i track down what header files i need to #include in my stuff? for instance, i'm trying to modify icmp_input() (found in /sys/netinet/ip_icmp.c) and load the new function via a kernel module. so, i copied all the #include's from /sys/netinet/ip_icmp.c and only have the icmp_input() function (unmodified right now, from the form i found it), the header files from the original ip_icmp, and a main() that simply returns 0. doesn't want to compile, with errors about header files such as: --------------- In file included from icmp.c:37: /usr/include/netinet/in_var.h:50: error: field `ia_ifa' has incomplete type In file included from /usr/include/netinet/in_var.h:238, from icmp.c:37: /usr/include/netinet6/in6_var.h:103: error: field `ia_ifa' has incomplete type --------------- i realize that it's most likely because i didn't #include something else i need.. but how come /sys/netinet/ip_icmp.c compiles, then? because this file is basically that, with all functions but icmp_input removed, and a main() that does nothing.. so.. sorry for the long post. but please tell me how do i find out what header files i need ? :) thanks. Val From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 06:43: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 BD63C16A4CE; Fri, 10 Sep 2004 06:43:38 +0000 (GMT) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A06343D3F; Fri, 10 Sep 2004 06:43:38 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1C5f8D-000NvZ-CU; Fri, 10 Sep 2004 09:43:37 +0300 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: Alfred Perlstein In-Reply-To: Message from Alfred Perlstein of "Wed, 08 Sep 2004 20:06:09 PDT." <20040909030609.GA16925@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 10 Sep 2004 09:43:37 +0300 From: Danny Braniss Message-Id: <20040910064338.6A06343D3F@mx1.FreeBSD.org> cc: hackers@freebsd.org cc: am-utils-developers@am-utils.org cc: fs@freebsd.org Subject: Re: autofs available for FreeBSD 4, 5 and 6. 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, 10 Sep 2004 06:43:38 -0000 > Autofs has been integrated into FreeBSD 6. > > There is also a standalone tarball that will compile and run on > FreeBSD 5 as well as FreeBSD 4. > > The most recent one is available here: > > http://people.freebsd.org/~alfred/sources/autofs/ > > If you want to get an idea on how to use it, see the libautofs.3 > manpage. > > You can also check out the example driver program under > /usr/share/examples/autofs/driver (under FreeBSD 6) or the driver/ > directory (from the tarball). > > If you want to use the tarball, just extract it and run > make depend all install > from the top level directory. > > Have fun! AMD guys, let me know where we go from here! > any hints how this can be used with am-utils? im trying to compile am-utils-6.1b4, but going nowhere fast :-). > The only thing I have not implemented is trigger timeouts inside > the autofs. I'll get to it eventually though. > > -- > - Alfred Perlstein > - Research Engineering Development Inc. > - email: bright@mu.org cell: 408-480-4684 > _______________________________________________ > 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 Fri Sep 10 07:11:10 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 5592416A4CE for ; Fri, 10 Sep 2004 07:11:10 +0000 (GMT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 43EB443D41 for ; Fri, 10 Sep 2004 07:11:07 +0000 (GMT) (envelope-from andreas.kohn@gmx.net) Received: (qmail 18740 invoked by uid 65534); 10 Sep 2004 07:11:05 -0000 Received: from unknown (EHLO [212.204.44.203]) (212.204.44.203) by mail.gmx.net (mp011) with SMTP; 10 Sep 2004 09:11:05 +0200 X-Authenticated: #2431876 From: Andreas Kohn To: vxp In-Reply-To: <20040909203816.J3744@digital-security.org> References: <20040909203816.J3744@digital-security.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-3fscoZyHCA3OFp3rz3PA" Message-Id: <1094800263.838.2.camel@klamath.ankon.de.eu.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 10 Sep 2004 09:11:04 +0200 cc: freebsd-hackers@freebsd.org Subject: Re: header file related question 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, 10 Sep 2004 07:11:10 -0000 --=-3fscoZyHCA3OFp3rz3PA Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2004-09-10 at 02:38, vxp wrote: > hi, >=20 > i realize it's most likely a stupid question, but try not to be too hard > on me please - i'm trying to learn :) >=20 > i'm experimenting with the kernel's source, and i'm not quite sure how to > find what all the header files are that i need, for the stuff i'd like to > do.. how do i track down what header files i need to #include in my stuff= ? >=20 > for instance, i'm trying to modify icmp_input() (found in > /sys/netinet/ip_icmp.c) and load the new function via a kernel module. >=20 > so, i copied all the #include's from /sys/netinet/ip_icmp.c and only have > the icmp_input() function (unmodified right now, from the form i found > it), the header files from the original ip_icmp, and a main() that > simply returns 0. doesn't want to compile, with errors about header files > such as: > --------------- > In file included from icmp.c:37: > /usr/include/netinet/in_var.h:50: error: field `ia_ifa' has incomplete > type > In file included from /usr/include/netinet/in_var.h:238, > from icmp.c:37: > /usr/include/netinet6/in6_var.h:103: error: field `ia_ifa' has incomplete > type > --------------- > i realize that it's most likely because i didn't #include something else = i > need.. but how come /sys/netinet/ip_icmp.c compiles, then? because this > file is basically that, with all functions but icmp_input removed, and a > main() that does nothing.. >=20 > so.. sorry for the long post. > but please tell me how do i find out what header files i need ? :) >=20 > thanks. >=20 Hi, just guessing: Did you compile with -D_KERNEL? HTH, Andreas --=-3fscoZyHCA3OFp3rz3PA Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBBQVOHYucd7Ow1ygwRAmsVAJwOyHcdFiXvt96EX2265KXbnY6NVwCffF9P MbWvGImCCygc+iu/xzSjI7Q= =tXsj -----END PGP SIGNATURE----- --=-3fscoZyHCA3OFp3rz3PA-- From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 07:44:39 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 4CC4716A4CE for ; Fri, 10 Sep 2004 07:44:39 +0000 (GMT) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [194.125.244.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id D196343D2F for ; Fri, 10 Sep 2004 07:44:36 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from pm514-9.comsys.ntu-kpi.kiev.ua (pm514-9.comsys.ntu-kpi.kiev.ua [10.18.54.109]) (authenticated bits=0)i8AAo4vs089824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 10 Sep 2004 10:50:04 GMT Received: by pm514-9.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1000) id 6D1211F5; Fri, 10 Sep 2004 10:43:38 +0300 (EEST) From: Andrey Simonenko To: vxp In-Reply-To: <1094793798.00129326.1094782801@10.7.7.3> X-Newsgroups: lucky.freebsd.hackers User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (FreeBSD/4.9-STABLE (i386)) Message-Id: <20040910074338.6D1211F5@pm514-9.comsys.ntu-kpi.kiev.ua> Date: Fri, 10 Sep 2004 10:43:38 +0300 (EEST) cc: freebsd-hackers@freebsd.org Subject: Re: header file related question 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, 10 Sep 2004 07:44:39 -0000 On Thu, 9 Sep 2004 20:38:23 -0400 (EDT) in lucky.freebsd.hackers, vxp wrote: > > so, i copied all the #include's from /sys/netinet/ip_icmp.c and only have > the icmp_input() function (unmodified right now, from the form i found > it), the header files from the original ip_icmp, and a main() that > simply returns 0. Why you mentioned the main() function? Did you use the correct Makefile for compiling a KLD module? Check Makefiles in /usr/share/examples/kld and try to compile ip_icmp.c without modifications for the first time, I've just compiled ip_icmp.c without modifications with Makefile for a KLD module whit out any errors. From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 02:06: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 2073B16A4CE for ; Fri, 10 Sep 2004 02:06:15 +0000 (GMT) Received: from ownage.digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id C148343D48 for ; Fri, 10 Sep 2004 02:06:14 +0000 (GMT) (envelope-from vxp@ownage.digital-security.org) Received: from localhost.tmok.com ([127.0.0.1] helo=localhost) by ownage.digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5ZJT-0000tB-Ir for freebsd-hackers@freebsd.org; Thu, 09 Sep 2004 20:30:54 -0400 Date: Thu, 9 Sep 2004 20:30:49 -0400 (EDT) From: vxp To: freebsd-hackers@freebsd.org Message-ID: <20040909202350.R3409@ownage.digital-security.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.but try not to be too hard on me please - i'm trying to learn :) i'm experimenting with the kernel's source, and i'm not quite sure how to likemy stuff? [...] Content analysis details: (-2.5 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 2.5 AWL AWL: Auto-whitelist adjustment X-Mailman-Approved-At: Fri, 10 Sep 2004 12:33:14 +0000 Subject: header file related question 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, 10 Sep 2004 02:06:15 -0000 hi, i realize it's most likely a stupid question, but try not to be too hard on me please - i'm trying to learn :) i'm experimenting with the kernel's source, and i'm not quite sure how to find what all the header files are that i need, for the stuff i'd like to do.. how do i track down what header files i need to #include in my stuff? for instance, i'm trying to modify icmp_input() (found in /sys/netinet/ip_icmp.c) and load the new function via a kernel module. so, i copied all the #include's from /sys/netinet/ip_icmp.c and only have the icmp_input() function (unmodified right now, from the form i found it), the header files from the original ip_icmp, and a main() that simply returns 0. doesn't want to compile, with errors about header files such as: --------------- In file included from icmp.c:37: /usr/include/netinet/in_var.h:50: error: field `ia_ifa' has incomplete type In file included from /usr/include/netinet/in_var.h:238, from icmp.c:37: /usr/include/netinet6/in6_var.h:103: error: field `ia_ifa' has incomplete type --------------- i realize that it's most likely because i didn't #include something else i need.. but how come /sys/netinet/ip_icmp.c compiles, then? because this file is basically that, with all functions but icmp_input removed, and a main() that does nothing.. so.. sorry for the long post. but please tell me how do i find out what header files i need ? :) thanks. Val From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 02:10:25 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 B5FC116A4CE for ; Fri, 10 Sep 2004 02:10:25 +0000 (GMT) Received: from ownage.digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D7C543D4C for ; Fri, 10 Sep 2004 02:10:25 +0000 (GMT) (envelope-from vxp@ownage.digital-security.org) Received: from localhost.tmok.com ([127.0.0.1] helo=localhost) by ownage.digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5ZNX-0000xp-6k for freebsd-hackers@freebsd.org; Thu, 09 Sep 2004 20:35:04 -0400 Date: Thu, 9 Sep 2004 20:35:03 -0400 (EDT) From: vxp To: freebsd-hackers@freebsd.org Message-ID: <20040909203444.G3681@ownage.digital-security.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -4.1 (----) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.but try not to be too hard on me please - i'm trying to learn :) i'm experimenting with the kernel's source, and i'm not quite sure how to likemy stuff? [...] Content analysis details: (-4.1 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 0.8 AWL AWL: Auto-whitelist adjustment X-Mailman-Approved-At: Fri, 10 Sep 2004 12:33:14 +0000 Subject: header file related question 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, 10 Sep 2004 02:10:25 -0000 hi, i realize it's most likely a stupid question, but try not to be too hard on me please - i'm trying to learn :) i'm experimenting with the kernel's source, and i'm not quite sure how to find what all the header files are that i need, for the stuff i'd like to do.. how do i track down what header files i need to #include in my stuff? for instance, i'm trying to modify icmp_input() (found in /sys/netinet/ip_icmp.c) and load the new function via a kernel module. so, i copied all the #include's from /sys/netinet/ip_icmp.c and only have the icmp_input() function (unmodified right now, from the form i found it), the header files from the original ip_icmp, and a main() that simply returns 0. doesn't want to compile, with errors about header files such as: --------------- In file included from icmp.c:37: /usr/include/netinet/in_var.h:50: error: field `ia_ifa' has incomplete type In file included from /usr/include/netinet/in_var.h:238, from icmp.c:37: /usr/include/netinet6/in6_var.h:103: error: field `ia_ifa' has incomplete type --------------- i realize that it's most likely because i didn't #include something else i need.. but how come /sys/netinet/ip_icmp.c compiles, then? because this file is basically that, with all functions but icmp_input removed, and a main() that does nothing.. so.. sorry for the long post. but please tell me how do i find out what header files i need ? :) thanks. Val From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 13:21: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 0A90516A4CE for ; Fri, 10 Sep 2004 13:21:15 +0000 (GMT) Received: from digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9A1943D1D for ; Fri, 10 Sep 2004 13:21:14 +0000 (GMT) (envelope-from vxp@digital-security.org) Received: from digital-security.org ([216.254.116.252] helo=ownage.digital-security.org) by digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5jqi-0001S3-5m; Fri, 10 Sep 2004 07:45:53 -0400 Date: Fri, 10 Sep 2004 07:45:49 -0400 (EDT) From: vxp To: Andreas Kohn In-Reply-To: <1094800263.838.2.camel@klamath.ankon.de.eu.org> Message-ID: <20040910074507.J3949@digital-security.org> References: <20040909203816.J3744@digital-security.org> <1094800263.838.2.camel@klamath.ankon.de.eu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -3.1 (---) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.thanks --Val [...] Content analysis details: (-3.1 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 1.8 AWL AWL: Auto-whitelist adjustment cc: freebsd-hackers@freebsd.org Subject: Re: header file related question 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, 10 Sep 2004 13:21:15 -0000 no, didn't use D_KERNEL that took care of it! :) thanks --Val On Fri, 10 Sep 2004, Andreas Kohn wrote: > > just guessing: Did you compile with -D_KERNEL? > > HTH, > Andreas > From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 03:09: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 BEB7216A4CE for ; Sat, 11 Sep 2004 03:09:42 +0000 (GMT) Received: from digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E83C43D31 for ; Sat, 11 Sep 2004 03:09:42 +0000 (GMT) (envelope-from vxp@digital-security.org) Received: from digital-security.org ([216.254.116.252] helo=ownage.digital-security.org ident=vxp) by digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5wmS-0000d4-3W for freebsd-hackers@freebsd.org; Fri, 10 Sep 2004 21:34:21 -0400 Date: Fri, 10 Sep 2004 21:34:19 -0400 (EDT) From: vxp To: freebsd-hackers@freebsd.org Message-ID: <20040910212926.V2370@digital-security.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -3.4 (---) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.questions.. so i wrote a module, it compiles with a few warnings (was too lazy to put func prototypes, so it outputs warnings about that). among otheri try to do kldload ./icmp.ko it tells me: digital-security# kldload icmp.kld kldload: can't load icmp.kld: No such file or directory21:28 vxp vxp 7548 Sep 10 21:31 icmp.ko -rw-r--r-- 1 vxp vxp 5148 Sep 10 21:31 icmp.o digital-security# [...] Content analysis details: (-3.4 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 1.5 AWL AWL: Auto-whitelist adjustment Subject: help with a module, please.. 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, 11 Sep 2004 03:09:42 -0000 hi this is another one of my possibly lame questions.. so i wrote a module, it compiles with a few warnings (was too lazy to put func prototypes, so it outputs warnings about that). among other things, the compilation produces an icmp.ko (name of my mod) but when i try to do kldload ./icmp.ko it tells me: digital-security# kldload icmp.kld kldload: can't load icmp.kld: No such file or directory digital-security# ls -l icmp.* -rw-r--r-- 1 vxp vxp 12702 Sep 10 21:28 icmp.c -rw-r--r-- 1 vxp vxp 5276 Sep 10 21:31 icmp.kld -rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko -rw-r--r-- 1 vxp vxp 5148 Sep 10 21:31 icmp.o digital-security# what gives? :) may be i screwed up, somehow, in my load_handler? static int load_handler(module_t mod, int what, void *arg) { variable declarations here.. case MOD_LOAD: blah blah blah break; case MOD_UNLOAD: blah blah blah break; default: err = EINVAL; break; } return(err); } static moduledata_t icmp_mod = { "RebootByICMP", load_handler, NULL }; DECLARE_MODULE(icmp, icmp_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); any help appreciated :) can post full src, if needed.. thanks, Val From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 03:46: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 4CAE016A4CE for ; Sat, 11 Sep 2004 03:46:32 +0000 (GMT) Received: from hotmail.com (bay17-dav6.bay17.hotmail.com [64.4.43.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3688643D2F for ; Sat, 11 Sep 2004 03:46:32 +0000 (GMT) (envelope-from yangshazhou@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 10 Sep 2004 20:46:28 -0700 Received: from 61.187.16.2 by bay17-dav6.bay17.hotmail.com with DAV; Sat, 11 Sep 2004 03:46:27 +0000 X-Originating-IP: [61.187.16.2] X-Originating-Email: [yangshazhou@hotmail.com] X-Sender: yangshazhou@hotmail.com From: To: Date: Sat, 11 Sep 2004 11:44:24 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: X-OriginalArrivalTime: 11 Sep 2004 03:46:28.0126 (UTC) FILETIME=[EB05FBE0:01C497B1] Subject: help with a module, please.. 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, 11 Sep 2004 03:46:32 -0000 maybe 'kldload ./icmp.ko' From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 03:58:40 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 0907916A4CE for ; Sat, 11 Sep 2004 03:58:40 +0000 (GMT) Received: from digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9972543D31 for ; Sat, 11 Sep 2004 03:58:39 +0000 (GMT) (envelope-from vxp@digital-security.org) Received: from digital-security.org ([216.254.116.252] helo=ownage.digital-security.org ident=vxp) by digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5xXp-0000fa-BW; Fri, 10 Sep 2004 22:23:18 -0400 Date: Fri, 10 Sep 2004 22:23:16 -0400 (EDT) From: vxp To: Chuck Tuffli In-Reply-To: <20040911035133.GA74157@cre85086tuf.rose.agilent.com> Message-ID: <20040910222135.K2527@digital-security.org> References: <20040910212926.V2370@digital-security.org> <20040911035133.GA74157@cre85086tuf.rose.agilent.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -3.7 (---) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details. Content preview: digital-security# pwd /usr/home/vxp/mycode/reboot 21:31 icmp.ko digital-security# kldload ./icmp.ko kldload: can't load ./icmp.ko: No such file or directory digital-security# [...] Content analysis details: (-3.7 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 1.2 AWL AWL: Auto-whitelist adjustment cc: freebsd-hackers@freebsd.org Subject: Re: help with a module, please.. 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, 11 Sep 2004 03:58:40 -0000 digital-security# pwd /usr/home/vxp/mycode/reboot digital-security# ls -l icmp.ko -rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko digital-security# kldload ./icmp.ko kldload: can't load ./icmp.ko: No such file or directory digital-security# On Fri, 10 Sep 2004, Chuck Tuffli wrote: > On Fri, Sep 10, 2004 at 09:34:19PM -0400, vxp wrote: > ... > > among other things, the compilation produces an icmp.ko (name of my mod) > > but when i try to do kldload ./icmp.ko it tells me: > > digital-security# kldload icmp.kld > > there are 2 things wrong here > 1) if you don't specify a path, the loader will look in /modules. so > you need to prefix './' to the module name > > 2) the example below shows that you're trying to load the kld > > what should work better is: > > # kldload ./icmp.ko > > and then when you are finished > > # kldunload icmp > > > kldload: can't load icmp.kld: No such file or directory > > digital-security# ls -l icmp.* > > -rw-r--r-- 1 vxp vxp 12702 Sep 10 21:28 icmp.c > > -rw-r--r-- 1 vxp vxp 5276 Sep 10 21:31 icmp.kld > > -rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko > > -rw-r--r-- 1 vxp vxp 5148 Sep 10 21:31 icmp.o > > digital-security# > > -- > Chuck Tuffli > Agilent Technologies, Storage Area Networking > From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 04:03: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 921C816A4CF for ; Sat, 11 Sep 2004 04:03:55 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B20C43D49 for ; Sat, 11 Sep 2004 04:03:55 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 3310 invoked from network); 11 Sep 2004 04:03:55 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail2.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 11 Sep 2004 04:03:54 -0000 Received: from hydrogen.funkthat.com (inaxyd@localhost.funkthat.com [127.0.0.1])i8B43suU021555; Fri, 10 Sep 2004 21:03:54 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i8B43rtd021554; Fri, 10 Sep 2004 21:03:53 -0700 (PDT) Date: Fri, 10 Sep 2004 21:03:53 -0700 From: John-Mark Gurney To: vxp Message-ID: <20040911040353.GZ72089@funkthat.com> Mail-Followup-To: vxp , Chuck Tuffli , freebsd-hackers@freebsd.org References: <20040910212926.V2370@digital-security.org> <20040911035133.GA74157@cre85086tuf.rose.agilent.com> <20040910222135.K2527@digital-security.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040910222135.K2527@digital-security.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: help with a module, please.. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2004 04:03:55 -0000 vxp wrote this message on Fri, Sep 10, 2004 at 22:23 -0400: > digital-security# pwd > /usr/home/vxp/mycode/reboot > digital-security# ls -l icmp.ko > -rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko > digital-security# kldload ./icmp.ko > kldload: can't load ./icmp.ko: No such file or directory > digital-security# What does dmesg say? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 04:09: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 2B67416A4CE for ; Sat, 11 Sep 2004 04:09:19 +0000 (GMT) Received: from digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8214C43D1D for ; Sat, 11 Sep 2004 04:09:17 +0000 (GMT) (envelope-from vxp@digital-security.org) Received: from digital-security.org ([216.254.116.252] helo=ownage.digital-security.org ident=vxp) by digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5xi1-0000gV-K3; Fri, 10 Sep 2004 22:33:50 -0400 Date: Fri, 10 Sep 2004 22:33:49 -0400 (EDT) From: vxp To: John-Mark Gurney In-Reply-To: <20040911040353.GZ72089@funkthat.com> Message-ID: <20040910223013.V2617@digital-security.org> References: <20040910212926.V2370@digital-security.org> <20040911035133.GA74157@cre85086tuf.rose.agilent.com> <20040911040353.GZ72089@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -3.9 (---) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.gettinglooki = hlen + min(icmplen, ICMP_ADVLENMIN); [...] Content analysis details: (-3.9 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 1.1 AWL AWL: Auto-whitelist adjustment cc: freebsd-hackers@freebsd.org Subject: Re: help with a module, please.. 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, 11 Sep 2004 04:09:19 -0000 link_elf: symbol min undefined hm i guess we're getting close to the root of my problem. :) to explain what min is: take a look at /sys/netinet/ip_icmp.c please in icmp_input() on line 273 theres: i = hlen + min(icmplen, ICMP_ADVLENMIN); my module replaces (or, i guess, i should say _should_ replace) icmp_input() with my own function. which is basically the same function but with about 4 lines of modification done to it. i've #include'd every header file that /sys/netinet/ip_icmp.c uses.. so how come min() is defined there, but not defined here? thanks, Val On Fri, 10 Sep 2004, John-Mark Gurney wrote: > vxp wrote this message on Fri, Sep 10, 2004 at 22:23 -0400: > > digital-security# pwd > > /usr/home/vxp/mycode/reboot > > digital-security# ls -l icmp.ko > > -rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko > > digital-security# kldload ./icmp.ko > > kldload: can't load ./icmp.ko: No such file or directory > > digital-security# > > What does dmesg say? > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." > _______________________________________________ > 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 Sat Sep 11 04:44:25 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 A19E216A4CE for ; Sat, 11 Sep 2004 04:44:25 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68F1743D53 for ; Sat, 11 Sep 2004 04:44:25 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 9454 invoked from network); 11 Sep 2004 04:44:25 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail3.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 11 Sep 2004 04:44:24 -0000 Received: from hydrogen.funkthat.com (wfwnet@localhost.funkthat.com [127.0.0.1])i8B4iOuU022250; Fri, 10 Sep 2004 21:44:24 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i8B4iO1c022249; Fri, 10 Sep 2004 21:44:24 -0700 (PDT) Date: Fri, 10 Sep 2004 21:44:24 -0700 From: John-Mark Gurney To: vxp Message-ID: <20040911044424.GA72089@funkthat.com> Mail-Followup-To: vxp , freebsd-hackers@freebsd.org References: <20040910212926.V2370@digital-security.org> <20040911035133.GA74157@cre85086tuf.rose.agilent.com> <20040911040353.GZ72089@funkthat.com> <20040910223013.V2617@digital-security.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040910223013.V2617@digital-security.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: help with a module, please.. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2004 04:44:25 -0000 vxp wrote this message on Fri, Sep 10, 2004 at 22:33 -0400: > link_elf: symbol min undefined > > hm > i guess we're getting close to the root of my problem. :) > to explain what min is: > > take a look at /sys/netinet/ip_icmp.c please > in icmp_input() on line 273 theres: > i = hlen + min(icmplen, ICMP_ADVLENMIN); > > > my module replaces (or, i guess, i should say _should_ replace) > icmp_input() with my own function. which is basically the same function > but with about 4 lines of modification done to it. > > i've #include'd every header file that /sys/netinet/ip_icmp.c uses.. > so how come min() is defined there, but not defined here? not sure, but make sure you're including sys/libkern.h, since that is the header file that it's defined as an inline function... > On Fri, 10 Sep 2004, John-Mark Gurney wrote: > > > vxp wrote this message on Fri, Sep 10, 2004 at 22:23 -0400: > > > digital-security# pwd > > > /usr/home/vxp/mycode/reboot > > > digital-security# ls -l icmp.ko > > > -rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko > > > digital-security# kldload ./icmp.ko > > > kldload: can't load ./icmp.ko: No such file or directory > > > digital-security# > > > > What does dmesg say? > > > > -- > > John-Mark Gurney Voice: +1 415 225 5579 > > > > "All that I will do, has been done, All that I have, has not." > > _______________________________________________ > > 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" > > > _______________________________________________ > 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" -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 05:05: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 4103016A4CE for ; Sat, 11 Sep 2004 05:05:45 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7193E43D31 for ; Sat, 11 Sep 2004 05:05:42 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i8B53lSw091587; Fri, 10 Sep 2004 23:03:47 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 10 Sep 2004 23:04:23 -0600 (MDT) Message-Id: <20040910.230423.84359903.imp@bsdimp.com> To: vxp@digital-security.org From: "M. Warner Losh" In-Reply-To: <20040910212926.V2370@digital-security.org> References: <20040910212926.V2370@digital-security.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: help with a module, please.. 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, 11 Sep 2004 05:05:45 -0000 In message: <20040910212926.V2370@digital-security.org> vxp writes: : static int : load_handler(module_t mod, int what, void *arg) : { : variable declarations here.. : : case MOD_LOAD: : blah blah blah : break; : case MOD_UNLOAD: : blah blah blah : break; : default: : err = EINVAL; err = EOPNOTSUPP; : break; Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 12:22: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 8B11816A4DF for ; Sat, 11 Sep 2004 12:22:44 +0000 (GMT) Received: from FreeBSD.SharkTECH.net (usr1-123.sharktech.net [66.90.92.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A60343D45 for ; Sat, 11 Sep 2004 12:22:44 +0000 (GMT) (envelope-from freebsd@sharktech.net) Received: (qmail 46419 invoked from network); 11 Sep 2004 12:22:41 -0000 Received: from unknown (HELO psyxakias) (212.54.222.248) by 66.90.92.240 with SMTP; 11 Sep 2004 12:22:41 -0000 Message-ID: <006001c497fa$08f971c0$dec2fea9@psyxakias> From: "SharkTECH Maillists" To: Date: Sat, 11 Sep 2004 15:22:38 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-7"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Interface Bonding & Bridging problem 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, 11 Sep 2004 12:22:44 -0000 Hello, I have been running a FreeBSD 4.10-STABLE server having 3 nics installed but was using only 2 of them (1 for uplink and 1 for switch) to monitor, filter and shape my network and had absolutely no problems at all. However, in order to increase the ability of handling even more packets (especially while filtering incoming DDoS), I decided to get a 2nd uplink from backbone, connect it to em1, bond em0/em1 (uplinks) to ngeth0/fec0 (virtual interface) and bridge ngeth0/fec0 with em2 (switch link). In order for this to work, etherchanneling is enabled between uplink1/uplink2 at the backbone side. The problem is although bonding seems to work fine as I can assign IPs at fec0/ngeth0 and send/receive packet with both cards using the virtual interface, I cannot get bridging to work at all between ngeth0/fec0(virtual) and em2(switch). There are no errors in logs, it just doesn't seem to bridge. After doing a 2 days research in Google, FreeBSD maillists, web articles and asking for help in freebsdhelp IRC channels, I ended up that someone in FreeBSD maillists may be able to help me providing me a different bonding/bridging way or even by applying a patch. I was thinking that the solution may be to do both bonding & bridging using netgraph, and not bridging using FreeBSD's kernel bridge. I'd be glad to try this but unfortunately I haven't figured out how, even after reading several articles. So if anyone can help me on this step-by-step, please do. I will appreciate any replies after you take a look at the diagrams and settings below, that are showing what exactly I have done until now. Best Regards, Angelos Pantazopoulos freebsd@sharktech.net SharkTECH Internet Services ==================================================== S E T T I N G S ==================================================== Using 1 uplink settings (works excellent) ----------------------------------------- #bridging# (options BRIDGE in kernel) ifconfig em0 -arp sysctl net.link.ether.bridge=1 sysctl net.link.ether.bridge_cfg=em0,em1 sysctl net.link.ether.bridge_ipfw=1 Using 2 uplinks with ng_fec (bridging problem) ---------------------------------------------- #bonding# kldload ng_ether kldload ng_fec ngctl mkpeer fec dummy fec ngctl msg fec0: add_iface '"em0"' ngctl msg fec0: add_iface '"em1"' ngctl msg fec0: set_mode_inet ifconfig em0 promisc ifconfig em1 promisc ifconfig fec0 promisc #bridging# (options BRIDGE in kernel) sysctl net.link.ether.bridge=1 sysctl net.link.ether.bridge_cfg=fec0,em2 sysctl net.link.ether.bridge_ipfw=1 Using 2 uplinks with ng_one2many (bridging problem) --------------------------------------------------- #bonding# kldload ng_ether kldload ng_one2many ifconfig em0 promisc -arp up ifconfig em1 promisc -arp up ngctl mkpeer . eiface hook ether ngctl mkpeer ngeth0: one2many lower one ngctl connect em0: ngeth0:lower lower many0 ngctl connect em1: ngeth0:lower lower many1 ifconfig ngeth0 -arp up #bridging# (options BRIDGE in kernel) sysctl net.link.ether.bridge=1 sysctl net.link.ether.bridge_cfg=ngeth0,em2 sysctl net.link.ether.bridge_ipfw=1 ==================================================== D I A G R A M S ==================================================== Using 1 uplink (works excellent): ---------------------- INTERNET UPLINK ---------------------- | | em0 *************** FREEBSD BOX FOR <<-- Bridging em0 and em2 IPFW FILTERING *************** em2 | | ---------------------- SWITCH ---------------------- Using 2 uplinks (bridging problem): ---------------------- INTERNET UPLINK ---------------------- | | | | em0 em1 \ / \ / (virtual) *************** FREEBSD BOX FOR <<-- Bonding em0/em1 and bridging with em2 IPFW FILTERING *************** em2 | | ---------------------- SWITCH ---------------------- From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 13:40: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 1C90C16A4CE for ; Fri, 10 Sep 2004 13:40:59 +0000 (GMT) Received: from hotmail.com (bay13-dav18.bay13.hotmail.com [64.4.31.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0636543D41 for ; Fri, 10 Sep 2004 13:40:59 +0000 (GMT) (envelope-from alexander_kurilovich@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 10 Sep 2004 06:33:29 -0700 Received: from 213.184.224.111 by bay13-dav18.bay13.hotmail.com with DAV; Fri, 10 Sep 2004 13:33:28 +0000 X-Originating-IP: [213.184.224.111] X-Originating-Email: [alexander_kurilovich@hotmail.com] X-Sender: alexander_kurilovich@hotmail.com From: "alexander kurilovich" To: Date: Fri, 10 Sep 2004 16:33:28 +0300 Message-ID: <001a01c4973a$c1a50010$0201a8c0@ebmw01> MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal X-OriginalArrivalTime: 10 Sep 2004 13:33:29.0188 (UTC) FILETIME=[C1FFCA40:01C4973A] X-Mailman-Approved-At: Sat, 11 Sep 2004 14:54:50 +0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: [PATCH]: ICH5 [ac97 rev2.3] spdif support 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, 10 Sep 2004 13:40:59 -0000 Hi =20 Just implemented SPDIF digital output for my on-board ICH5 sound based = on AD1985. I consider it can work with any ac97-based card. Working on AC3 passthrough - want to hear sound from DVDs. =20 May be it helps somebody although I don't have patch only sources - = didnt have time and old sources at home :).=20 =20 http://kurilovich.support.by/140_Files/110_Unix/120_AC97_Patch/ac97.spdif= ta r.bz2 =20 Alexander Kurilovich =20 From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 19: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 893BF16A635; Fri, 10 Sep 2004 19:11:15 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31C6343D46; Fri, 10 Sep 2004 19:11:15 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.0.11] (junior-wifi.samsco.home [192.168.0.11]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i8AJBswp018702; Fri, 10 Sep 2004 13:11:54 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4141FBA4.5030506@samsco.org> Date: Fri, 10 Sep 2004 13:08:20 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040831 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 X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org X-Mailman-Approved-At: Sat, 11 Sep 2004 14:54:50 +0000 Subject: Call for FreeBSD status reports 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, 10 Sep 2004 19:11:15 -0000 All, It's time again for the bi-monthly FreeBSD status reports. It's a little late this month due to working on the 5.3 BETAs, so I apologize for that. We had an excellent turn out on reports last time, so please keep with that positive trend. As always, reports are encouraged for anything that relates to FreeBSD development, documentation, independent projects, community activities, or anything else that might be interesting to the community as a whole. Reports should be one to two paragraphs in length. The template can be found at http://www.freebsd.org/news/status/report-sample.xml Submissions are due to monthly@freebsd.org by September 20. Thanks, Scott From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 17:21: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 DAD9216A4CE for ; Sat, 11 Sep 2004 17:21:16 +0000 (GMT) Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5199A43D2D for ; Sat, 11 Sep 2004 17:21:16 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.102] (ddsl-66-42-172-210.fuse.net [66.42.172.210]) (authenticated bits=0)i8BH7Ljr001505 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 11 Sep 2004 13:07:22 -0400 (EDT) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: freebsd-hackers@freebsd.org Date: Sat, 11 Sep 2004 13:23:11 -0400 User-Agent: KMail/1.6.2 References: <001a01c4973a$c1a50010$0201a8c0@ebmw01> In-Reply-To: <001a01c4973a$c1a50010$0201a8c0@ebmw01> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_HSzQBzH+08w6WAq"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409111323.20254.mistry.7@osu.edu> X-Spam-Status: No, hits=-0.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2,RCVD_IN_ORBS, RCVD_IN_OSIRUSOFT_COM,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_KMAIL,X_OSIRU_OPEN_RELAY version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: alexander kurilovich Subject: Re: [PATCH]: ICH5 [ac97 rev2.3] spdif support 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, 11 Sep 2004 17:21:17 -0000 --Boundary-02=_HSzQBzH+08w6WAq Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 10 September 2004 09:33 am, alexander kurilovich wrote: > Hi > > Just implemented SPDIF digital output for my on-board ICH5 sound based on > AD1985. I consider it can work with any ac97-based card. > Working on AC3 passthrough - want to hear sound from DVDs. > Excellent. Better hardware support is always good. > May be it helps somebody although I don't have patch only sources - didnt > have time and old sources at home :). > > http://kurilovich.support.by/140_Files/110_Unix/120_AC97_Patch/ac97.spdif= ta > r.bz2 > Be sure to send-pr the patch so it isn't forgotten about. =2D-=20 Anish Mistry --Boundary-02=_HSzQBzH+08w6WAq Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBBQzSHxqA5ziudZT0RAi1AAKCLT9fcIPcU4Ics2nP3kRRiAYywXACaAsVa q/ASfjfmT/AtfxWRBoSXdgo= =uLRF -----END PGP SIGNATURE----- --Boundary-02=_HSzQBzH+08w6WAq-- From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 19:01: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 6FE4816A4CF for ; Sat, 11 Sep 2004 19:01:50 +0000 (GMT) Received: from lakermmtao09.cox.net (lakermmtao09.cox.net [68.230.240.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEF2543D64 for ; Sat, 11 Sep 2004 19:01:49 +0000 (GMT) (envelope-from conrads@cox.net) Received: from dolphin.local.net ([68.11.71.51]) by lakermmtao09.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with ESMTP <20040911190149.CNQN22323.lakermmtao09.cox.net@dolphin.local.net>; Sat, 11 Sep 2004 15:01:49 -0400 Received: from dolphin.local.net (localhost.local.net [127.0.0.1]) by dolphin.local.net (8.13.1/8.13.1) with SMTP id i8BJ1mhO000887; Sat, 11 Sep 2004 14:01:48 -0500 (CDT) (envelope-from conrads@cox.net) Date: Sat, 11 Sep 2004 14:01:43 -0500 From: "Conrad J. Sabatier" To: freebsd-hackers@freebsd.org Message-ID: <20040911140143.2ff53420@dolphin.local.net> In-Reply-To: <20040910222135.K2527@digital-security.org> References: <20040910212926.V2370@digital-security.org> <20040911035133.GA74157@cre85086tuf.rose.agilent.com> <20040910222135.K2527@digital-security.org> X-Mailer: Sylpheed-Claws 0.9.12a (GTK+ 1.2.10; amd64-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: vxp Subject: Re: help with a module, please.. 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, 11 Sep 2004 19:01:50 -0000 On Fri, 10 Sep 2004 22:23:16 -0400 (EDT), vxp wrote: > > digital-security# pwd > /usr/home/vxp/mycode/reboot > digital-security# ls -l icmp.ko > -rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko > digital-security# kldload ./icmp.ko > kldload: can't load ./icmp.ko: No such file or directory > digital-security# I may be wrong, but perhaps it has something to do with the fact that the module is not in the correct module path? Try this: sysctl kern.module_path=/usr/home/vxp/mycode/reboot kldload icmp -- Conrad J. Sabatier -- "In Unix veritas" From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 19:31: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 3C7C416A4CE for ; Sat, 11 Sep 2004 19:31:06 +0000 (GMT) Received: from priv-edtnes57.telusplanet.net (outbound01.telus.net [199.185.220.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AAD543D31 for ; Sat, 11 Sep 2004 19:31:05 +0000 (GMT) (envelope-from pfak@telus.net) Received: from hartkiem2nnl7x ([206.116.24.146]) by priv-edtnes57.telusplanet.netSMTP <20040911193104.TWRT14797.priv-edtnes57.telusplanet.net@hartkiem2nnl7x>; Sat, 11 Sep 2004 13:31:04 -0600 Message-ID: <002d01c49835$e157c1d0$bb01a8c0@hartkiem2nnl7x> From: "Peter Kieser" To: "SharkTECH Maillists" , References: <006001c497fa$08f971c0$dec2fea9@psyxakias> Date: Sat, 11 Sep 2004 12:31:03 -0700 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-7"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: Interface Bonding & Bridging problem 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, 11 Sep 2004 19:31:06 -0000 BRIDGE and bonding (ng_fec, etc.) don't work together. This was *supposed* to be fixed for 5.3-RELEASE, but I don't believe it has been. -- Peter Kieser Opticate Technologies Home: 604.338.9294 / Pager: 604.205.0182 / Email: peter@opticate.net // "Learn from yesterday, live for today, hope for tomorrow." // ----- Original Message ----- From: "SharkTECH Maillists" To: Sent: Saturday, September 11, 2004 5:22 AM Subject: Interface Bonding & Bridging problem > Hello, > > I have been running a FreeBSD 4.10-STABLE server having 3 nics installed > but > was using only 2 of them (1 for uplink and 1 for switch) to monitor, > filter > and shape my network and had absolutely no problems at all. > > However, in order to increase the ability of handling even more packets > (especially while filtering incoming DDoS), I decided to get a 2nd uplink > from backbone, connect it to em1, bond em0/em1 (uplinks) to ngeth0/fec0 > (virtual interface) and bridge ngeth0/fec0 with em2 (switch link). In > order > for this to work, etherchanneling is enabled between uplink1/uplink2 at > the > backbone side. > > The problem is although bonding seems to work fine as I can assign IPs at > fec0/ngeth0 and send/receive packet with both cards using the virtual > interface, I cannot get bridging to work at all between > ngeth0/fec0(virtual) > and em2(switch). There are no errors in logs, it just doesn't seem to > bridge. > > After doing a 2 days research in Google, FreeBSD maillists, web articles > and > asking for help in freebsdhelp IRC channels, I ended up that someone in > FreeBSD maillists may be able to help me providing me a different > bonding/bridging way or even by applying a patch. > > I was thinking that the solution may be to do both bonding & bridging > using > netgraph, and not bridging using FreeBSD's kernel bridge. I'd be glad to > try > this but unfortunately I haven't figured out how, even after reading > several > articles. So if anyone can help me on this step-by-step, please do. > > I will appreciate any replies after you take a look at the diagrams and > settings below, that are showing what exactly I have done until now. > > > Best Regards, > > Angelos Pantazopoulos > freebsd@sharktech.net > SharkTECH Internet Services