From owner-freebsd-hackers Sun Feb 16 2: 6:15 2003 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 89D2837B401 for ; Sun, 16 Feb 2003 02:06:14 -0800 (PST) Received: from 002.216-123-229-0.interbaun.com (002.216-123-229-0.interbaun.com [216.123.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 563CF43FAF for ; Sun, 16 Feb 2003 02:06:12 -0800 (PST) (envelope-from soralx@cydem.zp.ua) Received: from 128.216-123-229-0.interbaun.com (vasya [192.168.0.3]) by 002.216-123-229-0.interbaun.com (8.11.6/8.11.6) with ESMTP id h1GA6B369498; Sun, 16 Feb 2003 03:06:11 -0700 (MST) (envelope-from soralx@cydem.zp.ua) Content-Type: text/plain; charset="iso-8859-1" From: To: freebsd-hackers@FreeBSD.ORG Subject: Re: where's my pr gone? - supplemental Date: Sun, 16 Feb 2003 03:05:30 -0700 X-Mailer: KMail [version 1.4] References: In-Reply-To: Cc: Friedemann.Becker@student.uni-tuebingen.de MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200302160305.30223.soralx@cydem.zp.ua> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/47512 > this happens only with the above link, i.e. from the pr summary. > searching for the bugid 47512 works (=> not empty).... works as well with the link 16.02.2003; 03:03:54 [SorAlx] http://cydem.zp.ua/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 2:51:27 2003 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 792F937B401 for ; Sun, 16 Feb 2003 02:51:26 -0800 (PST) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id D98D243FBF for ; Sun, 16 Feb 2003 02:51:23 -0800 (PST) (envelope-from ellard@eecs.harvard.edu) Received: by mail.eecs.harvard.edu (Postfix, from userid 465) id C3B7C54C49E; Sun, 16 Feb 2003 05:51:22 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id C156554C47E for ; Sun, 16 Feb 2003 05:51:22 -0500 (EST) Date: Sun, 16 Feb 2003 05:51:22 -0500 (EST) From: Daniel Ellard To: freebsd-hackers@freebsd.org Subject: support for Tyan Thunder i7500 mobo? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Does FreeBSD work with the Tyan i7500 (S2720UGN) motherboard? I'm particularly interested in whether the on-board gigabit NIC (using the intel 82545GC chip) works with the em driver, and whether the on-board SCSI controller is properly recognized. Thanks, -Dan p.s. I posted this to the hardware mailing list a few days ago, but that list seems dead. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 6:47:28 2003 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 636D137B405; Sun, 16 Feb 2003 06:47:27 -0800 (PST) Received: from mx03.uni-tuebingen.de (mx03.uni-tuebingen.de [134.2.3.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA4F943F85; Sun, 16 Feb 2003 06:47:25 -0800 (PST) (envelope-from friedemann.becker@student.uni-tuebingen.de) Received: from linux17.zdv.uni-tuebingen.de (linux17.zdv.uni-tuebingen.de [134.2.18.17]) by mx03.uni-tuebingen.de (8.12.3/8.12.3) with ESMTP id h1GElNrR012728; Sun, 16 Feb 2003 15:47:24 +0100 Date: Sun, 16 Feb 2003 15:47:22 +0100 (CET) From: Friedemann Becker X-Sender: To: , Subject: Re: where's my pr gone? - supplemental In-Reply-To: <200302160305.30223.soralx@cydem.zp.ua> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-AntiVirus: checked by AntiVir Milter 1.0.0.8; AVE 6.18.0.2; VDF 6.18.0.7 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG indeed, it seems to work again On Sun, 16 Feb 2003 soralx@cydem.zp.ua wrote: > Date: Sun, 16 Feb 2003 03:05:30 -0700 > From: soralx@cydem.zp.ua > To: freebsd-hackers@FreeBSD.ORG > Cc: Friedemann.Becker@student.uni-tuebingen.de > Subject: Re: where's my pr gone? - supplemental > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/47512 > > this happens only with the above link, i.e. from the pr summary. > > searching for the bugid 47512 works (=> not empty).... > > works as well with the link > > 16.02.2003; 03:03:54 > [SorAlx] http://cydem.zp.ua/ > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 9: 8:10 2003 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 5CB7F37B401; Sun, 16 Feb 2003 09:08:08 -0800 (PST) Received: from angelica.unixdaemons.com (angelica.unixdaemons.com [209.148.64.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2FFB43F3F; Sun, 16 Feb 2003 09:08:06 -0800 (PST) (envelope-from hiten@angelica.unixdaemons.com) Received: from angelica.unixdaemons.com (hiten@localhost.unixdaemons.com [127.0.0.1]) by angelica.unixdaemons.com (8.12.7/8.12.1) with ESMTP id h1GH83eG091437; Sun, 16 Feb 2003 12:08:03 -0500 (EST) Received: (from hiten@localhost) by angelica.unixdaemons.com (8.12.7/8.12.1/Submit) id h1GH81G7091436; Sun, 16 Feb 2003 12:08:01 -0500 (EST) (envelope-from hiten) Date: Sun, 16 Feb 2003 12:08:01 -0500 From: Hiten Pandya To: Mike Silbersack Cc: Martin Blapp , current@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: ACPI: working ACPI vs broken ACPI Message-ID: <20030216170801.GA86500@unixdaemons.com> References: <20030215113219.J57358@cvs.imp.ch> <20030215202651.D36608@patrocles.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030215202651.D36608@patrocles.silby.com> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD i386 X-Public-Key: http://www.pittgoth.com/~hiten/pubkey.asc X-URL: http://www.unixdaemons.com/~hiten X-PGP: http://pgp.mit.edu:11371/pks/lookup?search=Hiten+Pandya&op=index Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Feb 15, 2003 at 08:27:45PM -0600, Mike Silbersack wrote the words in effect of: > > On Sat, 15 Feb 2003, Martin Blapp wrote: > > > Feb 13 17:41:05 ibm-01 kernel: ACPI-0625: *** Info: GPE Block0 defined as GPE0 > > to GPE31 > > Feb 13 17:41:05 ibm-01 kernel: ACPI-0625: *** Info: GPE Block1 defined as GPE32 > > to GPE63 > > I see similar errors on my Presario 2100US... > > > Wild guess: Seem to result from this. If I'm looking at NetBSD's > > http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/acpi/acpi_ec.c they > > have a lot done since they took acpi from us. I'm sure it works > > for netbsd. > > > > Is anybody working on this ? > > > > Martin > > I've been trying to load that URL since yesterday, but it's not working > from here. Can you elaborate on what it does? Try the following URL: - http://cvsweb.no.netbsd.org/bsdweb.cgi/src/sys/dev/acpi/acpi_ec.c Cheers. -- Hiten Pandya (hiten@unixdaemons.com, hiten@uk.FreeBSD.org) http://www.unixdaemons.com/~hiten/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 13:24:38 2003 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 F2C2137B401 for ; Sun, 16 Feb 2003 13:24:36 -0800 (PST) Received: from netmail02.services.quay.plus.net (netmail02.services.quay.plus.net [212.159.14.221]) by mx1.FreeBSD.org (Postfix) with SMTP id D02B643F3F for ; Sun, 16 Feb 2003 13:24:35 -0800 (PST) (envelope-from trent@limekiln.vcisp.net) Received: (qmail 14875 invoked from network); 16 Feb 2003 20:51:50 -0000 Received: from limekiln.vcisp.net (212.159.16.110) by netmail02.services.quay.plus.net with SMTP; 16 Feb 2003 20:51:50 -0000 Received: by limekiln.vcisp.net (Postfix, from userid 1001) id 2E7C94BA; Sun, 16 Feb 2003 20:51:44 +0000 (GMT) Date: Sun, 16 Feb 2003 20:51:44 +0000 From: Trent Nelson To: Sean Hamilton Cc: hackers@freebsd.org Subject: Re: ACPI throttle doesn't cool CPU Message-ID: <20030216205144.GA34099@limekiln.vcisp.net> References: <000501c2d58b$9c6b66d0$d1d7e8d8@slugabed.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000501c2d58b$9c6b66d0$d1d7e8d8@slugabed.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Feb 15, 2003 at 11:18:31PM -0800, Sean Hamilton wrote: > Greetings, > > After setting hw.acpi.cpu.performance_speed to 1, a dmesg of > > acpi_cpu0: set speed to 6.2% > > and a dog slow system, I am still finding my CPU pumping out heat. It's an > AMD 1333 with an A7V board. Is this typical behaviour? If so, I'll just > underclock the CPU in the bios. I was hoping to be able to run it at full > speed during builds. I use ``fvcool'' and machdep.cpu_idle_hlt=1 to give a pretty impre- ssive cooling effect. When fvcool is running, the CPU temperature drops by about 10 degrees Celsius when idle. That said, I've just turned fvcool off to see if it's having some- thing to do with the ATA drive errors I'm experiencing. So far, no more drive errors, but that could mean just about anything. Trent. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 16:45:38 2003 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 D826637B405 for ; Sun, 16 Feb 2003 16:45:35 -0800 (PST) Received: from smtp-relay.omnis.com (smtp-relay.omnis.com [216.239.128.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 126D043F3F for ; Sun, 16 Feb 2003 16:45:33 -0800 (PST) (envelope-from wes@softweyr.com) Received: from softweyr.homeunix.net (66-75-151-22.san.rr.com [66.75.151.22]) by smtp-relay.omnis.com (Postfix) with ESMTP id BF32043006; Sun, 16 Feb 2003 16:45:31 -0800 (PST) From: Wes Peters Organization: Softweyr To: Colin Percival , freebsd-hackers@FreeBSD.ORG Subject: Re: Binary security updates Date: Mon, 17 Feb 2003 00:45:30 +0000 User-Agent: KMail/1.5 References: <5.0.2.1.1.20030216020837.01ddc3b8@popserver.sfu.ca> In-Reply-To: <5.0.2.1.1.20030216020837.01ddc3b8@popserver.sfu.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200302170045.30598.wes@softweyr.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 16 February 2003 02:39, Colin Percival wrote: > On december 25th, I released a "first draft" of a binary security > update tool aimed at allowing people to track the security branches > without keeping a source tree or recompiling; the response was generally > positive, but as I pointed out in my announcement, there were several > problems which needed to be fixed. > I'm just about finished fixing up all those details, and I intend to > release a new version soon and start publishing the necessary updates for > i386 4.8-RELEASE when it comes out (not that I expect 4.8-RELEASE to > include any security holes, of course ;). These would, of course, be > freely available (although I might ask for donations to cover bandwidth > costs if I get lots of traffic). > Would any FreeBSD developer(s) be willing to help me with this? I'd > very much like to have at least one person look over my code and give it > some sort of "stamp of approval"; both for my own peace of mind and to > make people feel more happy about using it. If you are willing to do the work, I'm certain we can track down some mirror sites willing to bear the traffic for you. We'll bring the efforts of the Donations Liason Officer, Michael W. Lucas, to bear on this. All you need to do is let him know what resources you will need. -- Where am I, and what am I doing in this handbasket? Wes Peters wes@softweyr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 17:41:38 2003 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 AE81537B401; Sun, 16 Feb 2003 17:41:36 -0800 (PST) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id F335343F3F; Sun, 16 Feb 2003 17:41:35 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.7/8.12.7) with ESMTP id h1H1fYEP018800; Sun, 16 Feb 2003 20:41:34 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Sun, 16 Feb 2003 20:41:33 -0500 To: Friedemann Becker , freebsd-hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG From: Garance A Drosihn Subject: Re: where's my pr gone? - supplemental Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-RPI-Spam-Score: -1.1 () IN_REP_TO,REFERENCES,SIGNATURE_SHORT_DENSE,SPAM_PHRASE_01_02 X-Scanned-By: MIMEDefang 2.28 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 12:05 AM +0100 2/16/03, Friedemann Becker wrote: >http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/47512 > >this happens only with the above link, i.e. from the pr summary. >searching for the bugid 47512 works (=> not empty).... > >someone want to look at this? The above link worked fine for me. I did not get a blank page. Also, doing an 'ls' in bash, after starting 'gdb bash', did not cause any kernel panic. But then it occurred to me that my login shell was bash (ie, I was already in bash when I typed the 'gdb bash' command). So, I logged into 'toor', which has /bin/sh as the login shell. If I logged in at the console, and did a 'gdb bash', then when I tried to do a 'run' I was told: Starting program: /usr/local/bin/bash Cannot exec : No such file or directory So, then I ssh'ed into 'toor', to make it easier to copy&paste that error message into this email. Behold, it worked fine. Well, there was a complaint of: Starting program: /usr/local/bin/bash warning: shared library handler failed to enable breakpoint but other than that warning it worked fine (as did the 'ls'). Sooo, then I checked to see what the difference was between the two sessions. It turned out that when logging into the console, the SHELL environment variable was set to the null string. When I ssh'ed in, it was set to /bin/sh. If I set SHELL on the console session, then gdb could run bash OK. I'm not quite sure what all of that means... All of this was done an a FreeBSD 5.0-CURRENT system, built on Sat Feb 15 01:34:07 EST 2003 -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 20:56:52 2003 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 9828437B401 for ; Sun, 16 Feb 2003 20:56:45 -0800 (PST) Received: from web40305.mail.yahoo.com (web40305.mail.yahoo.com [66.218.78.84]) by mx1.FreeBSD.org (Postfix) with SMTP id E0DEC43F85 for ; Sun, 16 Feb 2003 20:56:44 -0800 (PST) (envelope-from m_evmenkin@yahoo.com) Message-ID: <20030217045644.42272.qmail@web40305.mail.yahoo.com> Received: from [207.175.241.198] by web40305.mail.yahoo.com via HTTP; Sun, 16 Feb 2003 20:56:44 PST Date: Sun, 16 Feb 2003 20:56:44 -0800 (PST) From: Maksim Yevmenkin Subject: Need an expert's advise on WITNESS problem(?) (very long) To: current@freebsd.org Cc: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dear Hackers, I need an expert's advice on the small locking/WITNESS problem (if this is a real problem of course). It basically boils down to the following: Consider three (3) MTX_DEF mutexes: A, B1 and B2. Mutex A has a name "mutex_A" and type "type_A". Mutex B1 has a name "mutex_B1" and mutex B2 has name "mutex_B2". Both mutex B1 and B2 have the same type "type_B". Please note that mutexes B1 and B2 are completely independent from each other. They just have the same mutex type (B1 and B2 are used for fine grained locking). Now consider the code that has two (2) paths: P1 and P2. On the path P1 the code first acquires mutex A and then mutex B1. Then the code releases mutex B1 and then mutex A. On the path P2 the code first acquires mutex B2 and then mutex A. Then the code releases mutex B2 and then mutex A. So the code's flow looks something like this --->---\ /--->--- B1 --->--- Code path P1 A ---<---/ \---<--- B2 ---<--- Code path P2 Now the problem (again if this is a problem) is that WITNESS code builds relations between mutex types (or at least I think it does). So when the code runs, WITNESS will build relations between mutex types for the first path the code follows (lets say P1). Later when the code follows the second path (in this example P2), WITNESS will create "lock order reversal" message. The questions are: 1) Is anything wrong with the such code and/or mutex use? Since mutexes B1 and B2 are completely independent, there is no deadlock danger, right? Please tell me if I'm wrong and missing something here. 2) Is there any way to resolve the problem? I'm prepared to change/re-design my code if needed. 3) Is WITNESS right in this case? I have attached a small "spherical cow" that demonstrates the example above. Just compile and load ng_cow.ko module and then try # ngctl msg cow: moo Please advise. thanks, max ================ Makefile ============================ CFLAGS+= -g KMOD= ng_cow SRCS= ng_cow.c NOMAN= .include =============== ng_cow.c ============================== #include #include #include #include #include #include #include #include #include #include #include #define NG_COW_NODE_TYPE "cow" #define NGM_COW_COOKIE 1018303300 #define NGM_COW_MOO 1 #ifdef NG_SEPARATE_MALLOC MALLOC_DEFINE(M_NETGRAPH_COW, "cow", "Netgraph spherical cow"); #else #define M_NETGRAPH_COW M_NETGRAPH #endif static ng_constructor_t ng_cow_constructor; static ng_rcvmsg_t ng_cow_rcvmsg; static ng_shutdown_t ng_cow_shutdown; static ng_newhook_t ng_cow_newhook; static ng_connect_t ng_cow_connect; static ng_rcvdata_t ng_cow_rcvdata; static ng_disconnect_t ng_cow_disconnect; static int ng_cow_modevent (module_t, int, void *); static const struct ng_cmdlist ng_cow_cmdlist[] = { { NGM_COW_COOKIE, NGM_COW_MOO, "moo", NULL, NULL }, { 0, } }; static struct ng_type typestruct = { NG_ABI_VERSION, NG_COW_NODE_TYPE, /* typename */ ng_cow_modevent, /* modevent */ ng_cow_constructor, /* constructor */ ng_cow_rcvmsg, /* control message */ ng_cow_shutdown, /* destructor */ ng_cow_newhook, /* new hook */ NULL, /* find hook */ ng_cow_connect, /* connect hook */ ng_cow_rcvdata, /* data */ ng_cow_disconnect, /* disconnect hook */ ng_cow_cmdlist /* node command list */ }; NETGRAPH_INIT(cow, &typestruct); MODULE_VERSION(ng_cow, 1); static node_p the_node = NULL; static struct mtx a, b1, b2; static int ng_cow_modevent(module_t mod, int event, void *data) { int error = 0; switch (event) { case MOD_LOAD: error = ng_make_node_common(&typestruct, &the_node); if (error != 0) break; error = ng_name_node(the_node, NG_COW_NODE_TYPE); if (error != 0) { NG_NODE_UNREF(the_node); the_node = NULL; break; } mtx_init(&a, "mutex_A", "type_A", MTX_DEF); mtx_init(&b1, "mutex_B1", "type_B", MTX_DEF); mtx_init(&b2, "mutex_B2", "type_B", MTX_DEF); break; case MOD_UNLOAD: mtx_destroy(&a); mtx_destroy(&b1); mtx_destroy(&b2); break; default: error = EOPNOTSUPP; break; } return (error); } static int ng_cow_constructor(node_p node) { return (EINVAL); } static int ng_cow_newhook(node_p node, hook_p hook, char const *name) { return (EINVAL); } static int ng_cow_connect(hook_p hook) { return (EINVAL); } static int ng_cow_disconnect(hook_p hook) { return (0); } static int ng_cow_shutdown(node_p node) { NG_NODE_UNREF(node); the_node = NULL; return (0); } static int ng_cow_rcvmsg(node_p node, item_p item, hook_p hook) { struct ng_mesg *msg = NULL; int error = 0; NGI_GET_MSG(item, msg); switch (msg->header.typecookie) { case NGM_COW_COOKIE: switch (msg->header.cmd) { case NGM_COW_MOO: /* PATH 1 */ mtx_lock(&a); mtx_lock(&b1); mtx_unlock(&b1); mtx_unlock(&a); /* PATH 2 */ mtx_lock(&b2); mtx_lock(&a); mtx_unlock(&a); mtx_unlock(&b2); break; default: error = EINVAL; break; } break; default: error = EINVAL; break; } NG_FREE_MSG(msg); return (error); } static int ng_cow_rcvdata(hook_p hook, item_p item) { NG_FREE_ITEM(item); return (0); } __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 23: 5:21 2003 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 B7BEB37B405; Sun, 16 Feb 2003 23:05:17 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4694643F75; Sun, 16 Feb 2003 23:05:16 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id ED17C3ABB3B; Mon, 17 Feb 2003 08:05:54 +0100 (CET) Date: Mon, 17 Feb 2003 08:05:54 +0100 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Cc: rwatson@freebsd.org, phk@freebsd.org Subject: Multi-level jailing. Message-ID: <20030217070554.GE10767@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="o9mtL5OVI48+DSkO" Content-Disposition: inline X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.7-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --o9mtL5OVI48+DSkO Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello hackers. I have prepared patch for jail functionality against FreeBSD 5.0-CURRENT. It provides multi-level jailing and multiple ips for jails. Example of use: IPS on machine: tl0: 12.34.56.1 12.34.56.2 12.34.56.3 10.10.10.1 fxp0: 98.76.54.32 98.76.54.31 You can create jails inside of jails: # jail / jail-1 12.34.56.1,12.34.56.2,10.10.10.1,98.76.54.31 /bin/sh [ we are in jail-1 ] # jail / jail-2 12.34.56.1,10.10.10.1,98.76.54.31 /bin/sh [ we are in jail-2 ] # jail / jail-3 12.34.56.1,98.76.54.31 /bin/sh [ we are in jail-3 ] # jail / jail-4 12.34.56.1,10.10.10.1 /bin/sh [ EINVAL, because we are already jailed and want to take IP from outside the jail ] Only processes from jail-2, jail-3 and jail-4 and jail-1 are visable in jai= l-1. Only processes from jail-4 and jail-3 are visable in jail-3. Jail-2 is child of jail-1, jail-1 is parent of jail-2, jail-3 is child of jail-2, jail-2 is parent of jail-3. If Parent exits, parent of parent will be new parent - If last process of jail-2 exits jail-1 became parent of jail-3 and jail-3 became child of jail-1. Ifconfigs from jails: jail-1# ifconfig rl0: flags=3D8943 mtu 1500 inet 12.34.56.1 netmask 0xffffff00 broadcast 12.34.56.255 inet 12.34.56.2 netmask 0xffffffff broadcast 12.34.56.2 inet 10.10.10.1 netmask 0xffff0000 broadcast 10.10.255.255 ether 00:11:22:33:44:55 media: Ethernet autoselect (100baseTX ) status: active rl1: flags=3D8843 mtu 1500 inet 98.76.54.31 netmask 0xffffffff broadcast 98.76.54.31 ether ff:ee:dd:cc:bb:aa media: Ethernet autoselect (100baseTX ) status: active lo0: flags=3D8049 mtu 16384 jail-2# ifconfig rl0: flags=3D8943 mtu 1500 inet 12.34.56.1 netmask 0xffffff00 broadcast 12.34.56.255 inet 10.10.10.1 netmask 0xffff0000 broadcast 10.10.255.255 ether 00:11:22:33:44:55 media: Ethernet autoselect (100baseTX ) status: active rl1: flags=3D8843 mtu 1500 inet 98.76.54.31 netmask 0xffffffff broadcast 98.76.54.31 ether ff:ee:dd:cc:bb:aa media: Ethernet autoselect (100baseTX ) status: active lo0: flags=3D8049 mtu 16384 jail-3# ifconfig rl0: flags=3D8943 mtu 1500 inet 12.34.56.1 netmask 0xffffff00 broadcast 12.34.56.255 ether 00:11:22:33:44:55 media: Ethernet autoselect (100baseTX ) status: active rl1: flags=3D8843 mtu 1500 inet 98.76.54.31 netmask 0xffffffff broadcast 98.76.54.31 ether ff:ee:dd:cc:bb:aa media: Ethernet autoselect (100baseTX ) status: active lo0: flags=3D8049 mtu 16384 Patch is attached and also avaliable with README file here: http://garage.freebsd.pl/mljail.tbz --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --o9mtL5OVI48+DSkO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPlCJ0j/PhmMH/Mf1AQGKBwP+L2BOiPkTu6NVUnfzZzZ5MKYVt6pcLdjt P19h9G96C3fneAmU6If5vqNZ8OxmSSLlbzwxXiQGQXU2Y24E9fWv3ePB7ksr9apF VYdNpJs90ZxhW0xOKcbyR/NNy0cJpG1jGtl4C8FHqIGoFRXyPgNDsV42ifKpp2QC hn+f77Hipp8= =p3BX -----END PGP SIGNATURE----- --o9mtL5OVI48+DSkO-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Feb 16 23: 8:44 2003 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 B1B9B37B401; Sun, 16 Feb 2003 23:08:29 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5595D43F93; Sun, 16 Feb 2003 23:08:28 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 4D28B3ABB3B; Mon, 17 Feb 2003 08:09:07 +0100 (CET) Date: Mon, 17 Feb 2003 08:09:07 +0100 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Cc: rwatson@freebsd.org, phk@freebsd.org Subject: Re: Multi-level jailing. Message-ID: <20030217070907.GF10767@garage.freebsd.pl> References: <20030217070554.GE10767@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="uAWY5bLVMBeN1y53" Content-Disposition: inline In-Reply-To: <20030217070554.GE10767@garage.freebsd.pl> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.7-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --uAWY5bLVMBeN1y53 Content-Type: multipart/mixed; boundary="4xmAKYnxoHNXa3WQ" Content-Disposition: inline --4xmAKYnxoHNXa3WQ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Now patch is attached:) --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --4xmAKYnxoHNXa3WQ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: attachment; filename="mljail.patch" Content-Transfer-Encoding: quoted-printable diff -ru /usr/src/sys/kern/kern_jail.c ./sys/kern/kern_jail.c --- /usr/src/sys/kern/kern_jail.c Tue Jan 21 09:55:54 2003 +++ ./sys/kern/kern_jail.c Mon Feb 17 07:11:42 2003 @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning= Kamp * -----------------------------------------------------------------------= ----- * - * $FreeBSD: src/sys/kern/kern_jail.c,v 1.29 2003/01/21 08:55:54 alfred Ex= p $ + * $FreeBSD$ * */ =20 @@ -28,6 +28,14 @@ =20 MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); =20 +#ifndef OLDJAIL +SLIST_HEAD(, prison_children) prison_head =3D + SLIST_HEAD_INITIALIZER(&prison_head); +struct mtx prison_head_mtx; +MTX_SYSINIT(prison_head_lock, &prison_head_mtx, "prison_head mutex lock", + MTX_DEF); +#endif + SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, jail, CTLFLAG_RW, 0, "Jail rules"); @@ -65,11 +73,18 @@ struct jail j; struct chroot_args ca; struct ucred *newcred =3D NULL, *oldcred; +#ifndef OLDJAIL + u_int i; +#endif =20 error =3D copyin(uap->jail, &j, sizeof j); if (error) return (error); +#ifdef OLDJAIL if (j.version !=3D 0) +#else + if (j.version !=3D 1) +#endif return (EINVAL); =20 MALLOC(pr, struct prison *, sizeof *pr , M_PRISON, M_ZERO); @@ -85,12 +100,40 @@ if (error) goto bail; newcred =3D crget(); +#ifdef OLDJAIL pr->pr_ip =3D j.ip_number; +#else + MALLOC(pr->pr_ips, u_int32_t *, sizeof(u_int32_t) * j.nips, M_PRISON, + 0); + error =3D copyin(j.ips, pr->pr_ips, sizeof(u_int32_t) * j.nips); + if (error) { + FREE(pr->pr_ips, M_PRISON); + goto bail; + } + if (jailed(p->p_ucred)) { + for (i =3D 0; i < j.nips; ++i) { + if (!prison_validip(p->p_ucred, pr->pr_ips[i])) { + error =3D EINVAL; + FREE(pr->pr_ips, M_PRISON); + goto bail; + } + } + } + pr->pr_nips =3D j.nips; +#endif + +#ifdef OLDJAIL PROC_LOCK(p); /* Implicitly fail if already in jail. */ error =3D suser_cred(p->p_ucred, 0); if (error) goto badcred; +#else + pr->pr_pprison =3D p->p_ucred->cr_prison; + SLIST_INIT(&pr->pr_children); + prison_addchild(p->p_ucred->cr_prison, pr); + PROC_LOCK(p); +#endif oldcred =3D p->p_ucred; crcopy(newcred, oldcred); p->p_ucred =3D newcred; @@ -99,7 +142,9 @@ PROC_UNLOCK(p); crfree(oldcred); return (0); +#ifdef OLDJAIL badcred: +#endif PROC_UNLOCK(p); crfree(newcred); bail: @@ -111,14 +156,56 @@ void prison_free(struct prison *pr) { +#ifndef OLDJAIL + struct prison_children *pc; + struct prison *ppr; +#endif =20 mtx_lock(&pr->pr_mtx); pr->pr_ref--; if (pr->pr_ref =3D=3D 0) { +#ifndef OLDJAIL + ppr =3D pr->pr_pprison; + pc =3D NULL; + if (ppr =3D=3D NULL) { + mtx_lock(&prison_head_mtx); + SLIST_FOREACH(pc, &prison_head, pc_next) { + if (pc->pc_child =3D=3D pr) + break; + } + SLIST_REMOVE(&prison_head, pc, prison_children, + pc_next); + } else { + SLIST_FOREACH(pc, &ppr->pr_children, pc_next) { + if (pc->pc_child =3D=3D pr) + break; + } + SLIST_REMOVE(&ppr->pr_children, pc, prison_children, + pc_next); + } + KASSERT(pc !=3D NULL, ("Child have to be on list.")); + FREE(pc, M_PRISON); + SLIST_FOREACH(pc, &pr->pr_children, pc_next) { + mtx_lock(&pc->pc_child->pr_mtx); + pc->pc_child->pr_pprison =3D ppr; + mtx_unlock(&pc->pc_child->pr_mtx); + if (ppr =3D=3D NULL) + SLIST_INSERT_HEAD(&prison_head, pc, pc_next); + else { + SLIST_INSERT_HEAD(&ppr->pr_children, pc, + pc_next); + } + } + if (ppr =3D=3D NULL) + mtx_unlock(&prison_head_mtx); +#endif /* !OLDJAIL */ mtx_unlock(&pr->pr_mtx); mtx_destroy(&pr->pr_mtx); if (pr->pr_linux !=3D NULL) FREE(pr->pr_linux, M_PRISON); +#ifndef OLDJAIL + FREE(pr->pr_ips, M_PRISON); +#endif FREE(pr, M_PRISON); return; } @@ -138,7 +225,36 @@ prison_getip(struct ucred *cred) { =20 +#ifdef OLDJAIL return (cred->cr_prison->pr_ip); +#else + return (cred->cr_prison->pr_ips[0]); +#endif + +} + +/* + * Returns 1 if IP belongs to prison, otherwise 0. + */ +int +prison_validip(struct ucred *cred, u_int32_t ip) +{ +#ifndef OLDJAIL + register struct prison *pr; + register u_int i; +#endif + +#ifdef OLDJAIL + return (cred->cr_prison->pr_ip =3D=3D ip); +#else + pr =3D cred->cr_prison; + for (i =3D 0; i < pr->pr_nips; ++i) { + if (ip =3D=3D pr->pr_ips[i]) + return (1); + } + + return (0); +#endif } =20 int @@ -152,23 +268,14 @@ tmp =3D *ip; else tmp =3D ntohl(*ip); - if (tmp =3D=3D INADDR_ANY) { + if (tmp =3D=3D INADDR_ANY || tmp =3D=3D INADDR_LOOPBACK) { if (flag)=20 - *ip =3D cred->cr_prison->pr_ip; + *ip =3D prison_getip(cred); else - *ip =3D htonl(cred->cr_prison->pr_ip); + *ip =3D htonl(prison_getip(cred)); return (0); } - if (tmp =3D=3D INADDR_LOOPBACK) { - if (flag) - *ip =3D cred->cr_prison->pr_ip; - else - *ip =3D htonl(cred->cr_prison->pr_ip); - return (0); - } - if (cred->cr_prison->pr_ip !=3D tmp) - return (1); - return (0); + return (!prison_validip(cred, tmp)); } =20 void @@ -184,9 +291,9 @@ tmp =3D ntohl(*ip); if (tmp =3D=3D INADDR_LOOPBACK) { if (flag) - *ip =3D cred->cr_prison->pr_ip; + *ip =3D prison_getip(cred); else - *ip =3D htonl(cred->cr_prison->pr_ip); + *ip =3D htonl(prison_getip(cred)); return; } return; @@ -202,7 +309,7 @@ ok =3D 1; else if (sai->sin_family !=3D AF_INET) ok =3D 0; - else if (cred->cr_prison->pr_ip !=3D ntohl(sai->sin_addr.s_addr)) + else if (!prison_validip(cred, ntohl(sai->sin_addr.s_addr))) ok =3D 1; else ok =3D 0; @@ -217,14 +324,17 @@ struct ucred *cred1, *cred2; { =20 - if (jailed(cred1)) { - if (!jailed(cred2)) - return (ESRCH); - if (cred2->cr_prison !=3D cred1->cr_prison) - return (ESRCH); - } - - return (0); + if (!jailed(cred1)) + return (0); + if (!jailed(cred2)) + return (ESRCH); + if (cred2->cr_prison =3D=3D cred1->cr_prison) + return (0); +#ifndef OLDJAIL + if (prison_ischild(cred1->cr_prison, cred2->cr_prison)) + return (0); +#endif + return (ESRCH); } =20 /* @@ -256,3 +366,52 @@ else strlcpy(buf, hostname, size); } + +int +prison_maxseclvl(int seclvl, register struct prison *pr) +{ + +#ifndef OLDJAIL + for (; pr !=3D NULL; pr =3D pr->pr_pprison) + seclvl =3D imax(seclvl, pr->pr_securelevel); + return (seclvl); +#else + return (imax(seclvl, pr->pr_securelevel)); +#endif +} + +#ifndef OLDJAIL +void +prison_addchild(struct prison *parent, struct prison *child) +{ + struct prison_children *pc; + + MALLOC(pc, struct prison_children *, sizeof *pc , M_PRISON, M_ZERO); + pc->pc_child =3D child; + if (parent =3D=3D NULL) { + mtx_lock(&prison_head_mtx); + SLIST_INSERT_HEAD(&prison_head, pc, pc_next); + mtx_unlock(&prison_head_mtx); + return; + } + mtx_lock(&parent->pr_mtx); + SLIST_INSERT_HEAD(&parent->pr_children, pc, pc_next); + mtx_unlock(&parent->pr_mtx); +} + +/* + * Returns 1 if pr2 is a child of pr1, otherwise 0. + */ +int +prison_ischild(register struct prison *pr1, register struct prison *pr2) +{ + + for (pr2 =3D pr2->pr_pprison; pr2 !=3D NULL; pr2 =3D pr2->pr_pprison) { + if (pr1 =3D=3D pr2) + return (1); + } + + return (0); + +} +#endif diff -ru /usr/src/sys/kern/kern_mib.c ./sys/kern/kern_mib.c --- /usr/src/sys/kern/kern_mib.c Sun Jan 5 04:48:14 2003 +++ ./sys/kern/kern_mib.c Mon Feb 17 05:51:16 2003 @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $FreeBSD: src/sys/kern/kern_mib.c,v 1.64 2003/01/05 03:48:14 jake Exp $ + * $FreeBSD$ */ =20 #include "opt_posix.h" @@ -248,12 +248,12 @@ * If the process is in jail, return the maximum of the global and * local levels; otherwise, return the global level. */ + level =3D securelevel; if (pr !=3D NULL) { mtx_lock(&pr->pr_mtx); - level =3D imax(securelevel, pr->pr_securelevel); + level =3D prison_maxseclvl(level, pr); mtx_unlock(&pr->pr_mtx); - } else - level =3D securelevel; + } error =3D sysctl_handle_int(oidp, &level, 0, req); if (error || !req->newptr) return (error); @@ -264,7 +264,7 @@ if (pr !=3D NULL) { mtx_lock(&pr->pr_mtx); if (!regression_securelevel_nonmonotonic && - (level < imax(securelevel, pr->pr_securelevel))) { + (level < prison_maxseclvl(securelevel, pr))) { mtx_unlock(&pr->pr_mtx); return (EPERM); } diff -ru /usr/src/sys/kern/kern_prot.c ./sys/kern/kern_prot.c --- /usr/src/sys/kern/kern_prot.c Mon Feb 10 05:42:20 2003 +++ ./sys/kern/kern_prot.c Mon Feb 17 05:51:16 2003 @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94 - * $FreeBSD: src/sys/kern/kern_prot.c,v 1.166 2003/02/10 04:42:20 jake Exp= $ + * $FreeBSD$ */ =20 /* @@ -1303,8 +1303,8 @@ KASSERT(cr !=3D NULL, ("securelevel_gt: null cr")); if (cr->cr_prison !=3D NULL) { mtx_lock(&cr->cr_prison->pr_mtx); - active_securelevel =3D imax(cr->cr_prison->pr_securelevel, - active_securelevel); + active_securelevel =3D prison_maxseclvl(active_securelevel, + cr->cr_prison); mtx_unlock(&cr->cr_prison->pr_mtx); } return (active_securelevel > level ? EPERM : 0); @@ -1319,8 +1319,8 @@ KASSERT(cr !=3D NULL, ("securelevel_ge: null cr")); if (cr->cr_prison !=3D NULL) { mtx_lock(&cr->cr_prison->pr_mtx); - active_securelevel =3D imax(cr->cr_prison->pr_securelevel, - active_securelevel); + active_securelevel =3D prison_maxseclvl(active_securelevel, + cr->cr_prison); mtx_unlock(&cr->cr_prison->pr_mtx); } return (active_securelevel >=3D level ? EPERM : 0); diff -ru /usr/src/sys/netinet/in_pcb.c ./sys/netinet/in_pcb.c --- /usr/src/sys/netinet/in_pcb.c Thu Feb 13 00:55:07 2003 +++ ./sys/netinet/in_pcb.c Mon Feb 17 05:51:16 2003 @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95 - * $FreeBSD: src/sys/netinet/in_pcb.c,v 1.117 2003/02/12 23:55:07 hsu Exp $ + * $FreeBSD$ */ =20 #include "opt_ipsec.h" @@ -1142,7 +1142,7 @@ { if (!jailed(td->td_ucred)) return (0); - if (ntohl(inp->inp_laddr.s_addr) =3D=3D prison_getip(td->td_ucred)) + if (prison_validip(td->td_ucred, ntohl(inp->inp_laddr.s_addr))) return (0); return (1); } diff -ru /usr/src/sys/sys/jail.h ./sys/sys/jail.h --- /usr/src/sys/sys/jail.h Mon May 6 05:13:08 2002 +++ ./sys/sys/jail.h Mon Feb 17 07:02:24 2003 @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning= Kamp * -----------------------------------------------------------------------= ----- * - * $FreeBSD: src/sys/sys/jail.h,v 1.17 2002/05/06 03:13:08 bde Exp $ + * $FreeBSD$ * */ =20 @@ -17,7 +17,12 @@ u_int32_t version; char *path; char *hostname; +#ifdef OLDJAIL u_int32_t ip_number; +#else + u_int32_t *ips; + size_t nips; +#endif }; =20 #ifndef _KERNEL @@ -34,6 +39,14 @@ MALLOC_DECLARE(M_PRISON); #endif =20 +#ifndef OLDJAIL +struct prison; +struct prison_children { + struct prison *pc_child; + SLIST_ENTRY(prison_children) pc_next; +}; +#endif + /* * This structure describes a prison. It is pointed to by all struct * ucreds's of the inmates. pr_ref keeps track of them and is used to @@ -48,9 +61,18 @@ struct prison { int pr_ref; /* (p) refcount */ char pr_host[MAXHOSTNAMELEN]; /* (p) jail hostname */ +#ifdef OLDJAIL u_int32_t pr_ip; /* (c) ip addr host */ +#else + size_t pr_nips; /* numer of ips in table */ + u_int32_t *pr_ips; /* table with ips */ +#endif void *pr_linux; /* (p) linux abi */ int pr_securelevel; /* (p) securelevel */ +#ifndef OLDJAIL + struct prison *pr_pprison; /* parent prison */ + SLIST_HEAD(, prison_children) pr_children; /* prison's children */ +#endif struct mtx pr_mtx; }; =20 @@ -77,6 +99,12 @@ int prison_if(struct ucred *cred, struct sockaddr *sa); int prison_ip(struct ucred *cred, int flag, u_int32_t *ip); void prison_remote_ip(struct ucred *cred, int flags, u_int32_t *ip); +int prison_maxseclvl(int seclvl, register struct prison *pr); +int prison_validip(struct ucred *cred, u_int32_t ip); +#ifndef OLDJAIL +void prison_addchild(struct prison *parent, struct prison *child); +int prison_ischild(register struct prison *pr1, register struct prison *pr= 2); +#endif =20 #endif /* !_KERNEL */ #endif /* !_SYS_JAIL_H_ */ diff -ru /usr/src/usr.sbin/jail/jail.c ./usr.sbin/jail/jail.c --- /usr/src/usr.sbin/jail/jail.c Mon Apr 22 15:44:43 2002 +++ ./usr.sbin/jail/jail.c Mon Feb 17 05:53:39 2003 @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning= Kamp * -----------------------------------------------------------------------= ----- *=20 - * $FreeBSD: src/usr.sbin/jail/jail.c,v 1.8 2002/04/22 13:44:43 des Exp $ + * $FreeBSD$ *=20 */ =20 @@ -27,22 +27,55 @@ { struct jail j; int i; +#ifndef OLDJAIL + int c; +#endif struct in_addr in; =20 - if (argc < 5)=20 + if (argc < 5) { +#ifdef OLDJAIL errx(1, "usage: %s path hostname ip-number command ...\n", argv[0]); +#else + errx(1, "Usage: %s path hostname ip1[,ip2[...]] command ...\n", + argv[0]); +#endif + } i =3D chdir(argv[1]); if (i) err(1, "chdir %s", argv[1]); memset(&j, 0, sizeof(j)); +#ifdef OLDJAIL j.version =3D 0; +#else + j.version =3D 1; +#endif j.path =3D argv[1]; j.hostname =3D argv[2]; +#ifdef OLDJAIL i =3D inet_aton(argv[3], &in); if (!i) errx(1, "Couldn't make sense of ip-number\n"); j.ip_number =3D ntohl(in.s_addr); +#else + for (c =3D 1, ip =3D argv[3]; *ip; ++ip) { + if (*ip =3D=3D ',') + ++c; + } + if ((j.ips =3D (u_int32_t *)malloc(sizeof(u_int32_t) * c)) =3D=3D NULL) + errx(1, "malloc()"); + + for (c =3D 0, ip =3D strtok(argv[3], ","); ip; + ++c, ip =3D strtok(NULL, ",")) { + i =3D inet_aton(ip, &in); + if (!i) { + free(j.ips); + errx(1, "Couldn't make sense of ip-number\n"); + } + j.ips[c] =3D ntohl(in.s_addr); + } + j.nips =3D c; +#endif /* !OLDJAIL */ i =3D jail(&j); if (i) err(1, "Imprisonment failed"); --4xmAKYnxoHNXa3WQ-- --uAWY5bLVMBeN1y53 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPlCKkz/PhmMH/Mf1AQHENAQApxRXHWh3z3kSKhnLOUXm0dQRQAxcLJB/ FlK2zen5HAwl5CQd1oHJnx1sHRLQYtGnfOErZ22KBKaDa/xLkq6lAEv9oQ0rFtJN l1zK0mbhgpdFd6ctt1Wiliyjcil2fbaI9FdUxdmdwm3eSf/mZVk4WOfRaTwUg7tX dPwk3tR7byg= =qHgZ -----END PGP SIGNATURE----- --uAWY5bLVMBeN1y53-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 0:24:18 2003 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 3D98D37B401 for ; Mon, 17 Feb 2003 00:24:17 -0800 (PST) Received: from lancia.kaluga.ru (lancia.kaluga.ru [62.148.128.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FB7143F93 for ; Mon, 17 Feb 2003 00:24:14 -0800 (PST) (envelope-from stas@everest.kaluga.ru) Received: from mx.everest.kaluga.ru (gw.everest.kaluga.ru [62.148.129.177]) by lancia.kaluga.ru (8.12.6/8.12.6) with ESMTP id h1H8O8pB085471 for ; Mon, 17 Feb 2003 11:24:10 +0300 (MSK) Received: by mx.everest.kaluga.ru (Postfix, from userid 1200) id 5A0FA5A; Mon, 17 Feb 2003 11:27:07 +0300 (MSK) Received: from starlab (ns2.photocenter.ru [62.118.3.3]) by mx.everest.kaluga.ru (Postfix) with ESMTP id EA1A559 for ; Mon, 17 Feb 2003 11:27:05 +0300 (MSK) Date: Mon, 17 Feb 2003 11:24:13 +0300 From: Stanislav Golovin X-Mailer: The Bat! (v1.60m) Reply-To: Stanislav Golovin Organization: Rei ltd. X-Priority: 3 (Normal) Message-ID: <644038487.20030217112413@everest.kaluga.ru> To: freebsd-hackers@freebsd.org Subject: Re: support for Tyan Thunder i7500 mobo? In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello Daniel, Sunday, February 16, 2003, 1:51:22 PM, you wrote: DE> Does FreeBSD work with the Tyan i7500 (S2720UGN) motherboard? I'm DE> particularly interested in whether the on-board gigabit NIC (using the DE> intel 82545GC chip) works with the em driver, and whether the on-board DE> SCSI controller is properly recognized. Works fine, both 82545GC and SCSI. -- Best regards, Stanislav To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 6:29:46 2003 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 D46E837B401 for ; Mon, 17 Feb 2003 06:29:42 -0800 (PST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7E0343F93 for ; Mon, 17 Feb 2003 06:29:41 -0800 (PST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.6/8.12.6) with ESMTP id h1HETd2T016804 for ; Mon, 17 Feb 2003 09:29:39 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> X-Sender: mdtpop@marble.sentex.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 17 Feb 2003 09:33:51 -0500 To: freebsd-hackers@freebsd.org From: Mike Tancsa Subject: debugging a repeating panic that does not produce a dump Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: By Sentex Communications (lava/20020517) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I am seeing a repeatable panic with a 4.x SMP machine (not when in uni mode). It never produces a crash dump, but always panics when periodic runs. (started with a Jan 28th stable. e.g. Fatal trap 12: page fault while in kernel mode mp_lock = 01000002; cpuid = 1; lapic.id = 00000000 fault virtual address = 0x211e6d36 fault code = supervisor read, page not present instruction pointer = 0x8:0xc0174830 stack pointer = 0x10:0xde136c4c frame pointer = 0x10:0xde136c58 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 8676 (find) interrupt mask = none <- SMP: XXX trap number = 12 panic: page fault mp_lock = 01000002; cpuid = 1; lapic.id = 00000000 boot() called on cpu#1 syncing disks... 3 2 done Uptime: 23h58m25s Automatic reboot in 15 seconds - press a key on the console to abort Rebooting... cpu_reset called on cpu#1 cpu_reset: Stopping other CPUs cpu_reset: Restarting BSP tpu_reset_proxy: Grabbed mp lock cfpor_ rBeSsPe ..not grab mp lock Console: serial port BIOS drive A: is disk0 BIOS drive C: is disk1 BIOS 629kB/785396kB available memory mp_lock = 01000002; cpuid = 1; lapic.id = 00000000 fault virtual address = 0xfa401631 fault code = supervisor read, page not present instruction pointer = 0x8:0xc0174830 stack pointer = 0x10:0xdf9d9c4c frame pointer = 0x10:0xdf9d9c58 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 41326 (find) interrupt mask = none <- SMP: XXX trap number = 12 panic: page fault mp_lock = 01000002; cpuid = 1; lapic.id = 00000000 boot() called on cpu#1 syncing disks... 5 2 done Uptime: 1d2h51m37s Automatic reboot in 15 seconds - press a key on the console to abort Rebooting... cpu_reset called on cpu#1 cpu_reset: Stopping other CPUs cpu_reset: Restarting BSP cpu_reset_proxy: Grabbed mp lock cfpor BSPe : BSP did not grab mp lock Console: serial port BIOS drive A: is disk0 Fatal trap 12: page fault while in kernel mode mp_lock = 01000002; cpuid = 1; lapic.id = 00000000 fault virtual address = 0xc6941fe1 fault code = supervisor read, page not present instruction pointer = 0x8:0xc0174830 stack pointer = 0x10:0xdd9c6c4c frame pointer = 0x10:0xdd9c6c58 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 85432 (find) interrupt mask = none <- SMP: XXX trap number = 12 panic: page fault mp_lock = 01000002; cpuid = 1; lapic.id = 00000000 boot() called on cpu#1 syncing disks... 2 1 done Uptime: 1d7h58m35s Automatic reboot in 15 seconds - press a key on the console to abort Rebooting... cpu_reset called on cpu#1 cpu_reset: Stopping other CPUs cpu_reset: Restarting BSP cpu_reset_proxy: Grabbed mp lock cpu_reset : BSP did not grab mp lock Console: serial port BIOS drive A: is disk0 How can I best try and track / isolate this issue down ? ---Mike -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 7:36:15 2003 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 0620537B401 for ; Mon, 17 Feb 2003 07:36:14 -0800 (PST) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4B6243F85 for ; Mon, 17 Feb 2003 07:36:12 -0800 (PST) (envelope-from kirk@strauser.com) Received: from pooh.strauser.com (kirk@pooh.honeypot.net [10.0.5.128]) by kanga.honeypot.net (8.12.6/8.12.6) with ESMTP id h1HFaBoo030007 for ; Mon, 17 Feb 2003 09:36:11 -0600 (CST) (envelope-from kirk@strauser.com) To: freebsd-hackers@freebsd.org Subject: Re: Multi-level jailing. From: Kirk Strauser Date: Mon, 17 Feb 2003 09:36:07 -0600 In-Reply-To: <20030217070554.GE10767@garage.freebsd.pl> (Pawel Jakub Dawidek's message of "Mon, 17 Feb 2003 08:05:54 +0100") Message-ID: <87bs1aj4wo.fsf@strauser.com> Lines: 11 X-Mailer: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 References: <20030217070554.GE10767@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-=-= Content-Transfer-Encoding: quoted-printable At 2003-02-17T07:05:54Z, Pawel Jakub Dawidek write= s: > I have prepared patch for jail functionality against FreeBSD 5.0-CURRENT. > It provides multi-level jailing and multiple ips for jails. That's awesome. I have no idea what I'd do with it, but it's a solution that's begging me for a problem to throw at it. =2D-=20 Kirk Strauser In Googlis non est, ergo non est. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+UQFr5sRg+Y0CpvERAv5xAKCIP/Zk288wWbR5Ow8vYwDZ79QkwACfdBhv TLAcX1YWd31JiN6iXlymsVI= =IPAO -----END PGP SIGNATURE----- --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 9:38:26 2003 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 CAF2937B401 for ; Mon, 17 Feb 2003 09:38:24 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 310B243FA3 for ; Mon, 17 Feb 2003 09:38:24 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 474843ABB63; Mon, 17 Feb 2003 18:39:05 +0100 (CET) Date: Mon, 17 Feb 2003 18:39:05 +0100 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Cc: chris@aims.com.au Subject: IPC and jail. Message-ID: <20030217173905.GA64362@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.7-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --AhhlLboLdkugWU4S Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello hackers. I'm preparing a patch against FreeBSD 4.7 (for now) which splits IPC zones between jails and main host. Every entity will have his own IPC memory not shared with others (jails or main host). Message queues are already patched, but it need to be tested - that's why I'm writing. Does anybody have any regression tests for IPC functionality? If not, which program use it and will be a good test? Thanks. --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --AhhlLboLdkugWU4S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPlEeOT/PhmMH/Mf1AQG/tQP9H+nSBSWPlktQBSEWgKKaYmeyp0BxBt/5 n5Ljab0UTTaIv4GJ5wVNR/NILx4cnx9OfjWgSJP7Qsk3yFmrpl5NOa/bc3QFTvuS z1VP8QRxCwWHoaPrK964bdQ4fGTLUyhWlfHxCHdt5HpMuI8Q9hl0VG1n3CLy5YY9 kT7Ai7wKtXY= =jF8u -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 10:25: 0 2003 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 79B0637B401 for ; Mon, 17 Feb 2003 10:24:58 -0800 (PST) Received: from albatross.mail.pas.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id A09E243F85 for ; Mon, 17 Feb 2003 10:24:57 -0800 (PST) (envelope-from mooneer@translator.cx) Received: from pool0028.cvx31-bradley.dialup.earthlink.net ([209.179.146.28] helo=morpheus) by albatross.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 18kpwf-0000by-00; Mon, 17 Feb 2003 10:24:49 -0800 From: "Mooneer Salem" To: "Pawel Jakub Dawidek" , Subject: RE: IPC and jail. Date: Mon, 17 Feb 2003 10:24:46 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <20030217173905.GA64362@garage.freebsd.pl> Importance: Normal Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, PostgreSQL might be a good test, since it uses IPC to an extent. I also have some code for 5.0 that adds a struct prison pointer to the IPC primitives for tracking purposes. Although it doesn't give each jail its own IPC cache, it does ensure they don't step on each other. For the purpose of seperating the jail from the main environment though, your approach may be better. Thanks, -- Mooneer Salem GPLTrans: http://www.translator.cx/ lifeafterking.org: http://www.lifeafterking.org/ -----Original Message----- From: owner-freebsd-hackers@FreeBSD.ORG [mailto:owner-freebsd-hackers@FreeBSD.ORG]On Behalf Of Pawel Jakub Dawidek Sent: Monday, February 17, 2003 9:39 AM To: freebsd-hackers@freebsd.org Cc: chris@aims.com.au Subject: IPC and jail. Hello hackers. I'm preparing a patch against FreeBSD 4.7 (for now) which splits IPC zones between jails and main host. Every entity will have his own IPC memory not shared with others (jails or main host). Message queues are already patched, but it need to be tested - that's why I'm writing. Does anybody have any regression tests for IPC functionality? If not, which program use it and will be a good test? Thanks. -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 10:26:29 2003 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 34ACF37B401 for ; Mon, 17 Feb 2003 10:26:28 -0800 (PST) Received: from herbelot.dyndns.org (herbelot.net1.nerim.net [62.212.117.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF9E843F93 for ; Mon, 17 Feb 2003 10:26:26 -0800 (PST) (envelope-from thierry@herbelot.com) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by herbelot.dyndns.org (8.12.6/8.12.6) with ESMTP id h1HIGx0f023179; Mon, 17 Feb 2003 19:17:00 +0100 (CET) Content-Type: text/plain; charset="iso-8859-2" From: Thierry Herbelot To: Pawel Jakub Dawidek , freebsd-hackers@FreeBSD.ORG Subject: Re: IPC and jail. Date: Mon, 17 Feb 2003 19:25:55 +0100 User-Agent: KMail/1.4.3 Cc: chris@aims.com.au References: <20030217173905.GA64362@garage.freebsd.pl> In-Reply-To: <20030217173905.GA64362@garage.freebsd.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200302171925.55226.thierry@herbelot.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, PostGreSQL (see the ports) is one (big) program which is difficult to set up in a pure jail, as it uses shared memory : it could be a good candidate for your test. you may want to have first a patch against -Current, as this is the "One True Way" to introduce a new functionality to FreeBSD (futhermore, -Current is quite stable, these days) TfH To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 10:50:29 2003 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 C53FF37B401 for ; Mon, 17 Feb 2003 10:50:27 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC89243F3F for ; Mon, 17 Feb 2003 10:50:26 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 1FE4253B6; Mon, 17 Feb 2003 19:50:25 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Mike Tancsa Cc: freebsd-hackers@freebsd.org Subject: Re: debugging a repeating panic that does not produce a dump From: Dag-Erling Smorgrav Date: Mon, 17 Feb 2003 19:50:24 +0100 In-Reply-To: <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> (Mike Tancsa's message of "Mon, 17 Feb 2003 09:33:51 -0500") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Tancsa writes: > I am seeing a repeatable panic with a 4.x SMP machine (not when in uni > mode). It never produces a crash dump, but always panics when periodic > runs. Hmm, it doesn't even seem to *try* to dump... are you sure you have configured a dump device? > instruction pointer = 0x8:0xc0174830 This is the address of the instruction which caused the fault. You can run nm(1) on your kernel to find out where in the kernel that is, e.g.: # nm /kernel | grep \^c0174 | sort this should give you a list of maybe a dozen symbols; the one you want is the last one in the list that has a lower address than c0174830. How do you build your kernels - 'make buildkernel' or manually? DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 11:24:43 2003 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 62CC737B401 for ; Mon, 17 Feb 2003 11:24:40 -0800 (PST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86CAB43FB1 for ; Mon, 17 Feb 2003 11:24:39 -0800 (PST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.6/8.12.6) with ESMTP id h1HJOc2T019080; Mon, 17 Feb 2003 14:24:39 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <5.2.0.9.0.20030217135903.064d7378@marble.sentex.ca> X-Sender: mdtpop@marble.sentex.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 17 Feb 2003 14:29:26 -0500 To: Dag-Erling Smorgrav From: Mike Tancsa Subject: Re: debugging a repeating panic that does not produce a dump Cc: freebsd-hackers@freebsd.org In-Reply-To: References: <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: By Sentex Communications (lava/20020517) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 07:50 PM 17/02/2003 +0100, Dag-Erling Smorgrav wrote: >Mike Tancsa writes: > > I am seeing a repeatable panic with a 4.x SMP machine (not when in uni > > mode). It never produces a crash dump, but always panics when periodic > > runs. > >Hmm, it doesn't even seem to *try* to dump... are you sure you have >configured a dump device? Arrrrrrggggh... There was a typo on /etc/rc.conf :-( dumpdev="/dev/twed0s1b" # Device name to crashdump to (or NO). dumpdir="/var/crash" # Directory where crash dumps are to be stored istead of the correct /dev/twed0b I have corrected that and did a ns4# dumpon -v /dev/twed0b dumpon: crash dumps to /dev/twed0b (147, 1) ns4# > > instruction pointer = 0x8:0xc0174830 > >This is the address of the instruction which caused the fault. You >can run nm(1) on your kernel to find out where in the kernel that is, >e.g.: > ># nm /kernel | grep \^c0174 | sort ns4# nm /kernel | grep \^c0174 | sort c0174034 t switch_timecounter c01740c4 t sync_other_counter c0174130 t tco_forward c0174278 t sysctl_kern_timecounter_hardware c0174310 T pps_ioctl c01743fc T pps_init c0174420 T pps_event c0174578 T devsw c017459c T cdevsw_add c01746c4 T cdevsw_remove c017471c T major c017473c T minor c017475c T lminor c0174788 T makebdev c01747d4 T makedev c01748f4 T freedev c0174980 T dev2udev c017499c T udev2dev c0174a00 T uminor c0174a0c T umajor c0174a18 T makeudev c0174a28 T make_dev c0174a68 T destroy_dev c0174a90 T devtoname c0174b2c T getdtablesize c0174b54 T dup2 c0174bf4 T dup c0174c4c T fcntl ns4# Does this actually show the location ? ns4# gdb -k kernel.debug GNU gdb 4.18 (FreeBSD) Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf (kgdb) list *0xc0174830 0xc0174830 is in makedev (/usr/src/sys/kern/kern_conf.c:208). 203 if (x == umajor(NOUDEV) && y == uminor(NOUDEV)) 204 Debugger("makedev of NOUDEV"); 205 udev = (x << 8) | y; 206 hash = udev % DEVT_HASH; 207 LIST_FOREACH(si, &dev_hash[hash], si_hash) { 208 if (si->si_udev == udev) 209 return (si); 210 } 211 if (stashed >= DEVT_STASH) { 212 MALLOC(si, struct specinfo *, sizeof(*si), M_DEVT, (kgdb) >this should give you a list of maybe a dozen symbols; the one you want >is the last one in the list that has a lower address than c0174830. > >How do you build your kernels - 'make buildkernel' or manually? Always make buildkernel. I have a debug kernel built as well (makeoptions DEBUG=-g) Thanks for responding. Your above comment was what was needed to triple check my rc.conf and correct the typo :( ---Mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 11:39:34 2003 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 7D84137B401 for ; Mon, 17 Feb 2003 11:39:32 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09B3343F93 for ; Mon, 17 Feb 2003 11:39:31 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id DD4F853B6; Mon, 17 Feb 2003 20:39:28 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Mike Tancsa Cc: freebsd-hackers@freebsd.org Subject: Re: debugging a repeating panic that does not produce a dump From: Dag-Erling Smorgrav Date: Mon, 17 Feb 2003 20:39:27 +0100 In-Reply-To: <5.2.0.9.0.20030217135903.064d7378@marble.sentex.ca> (Mike Tancsa's message of "Mon, 17 Feb 2003 14:29:26 -0500") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> <5.2.0.9.0.20030217135903.064d7378@marble.sentex.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Tancsa writes: > ns4# nm /kernel | grep \^c0174 | sort > [...] > c01747d4 T makedev > c01748f4 T freedev This is it (makedev) > Does this actually show the location ? > ns4# gdb -k kernel.debug > [...] > (kgdb) list *0xc0174830 > 0xc0174830 is in makedev (/usr/src/sys/kern/kern_conf.c:208). > 203 if (x == umajor(NOUDEV) && y == uminor(NOUDEV)) > 204 Debugger("makedev of NOUDEV"); > 205 udev = (x << 8) | y; > 206 hash = udev % DEVT_HASH; > 207 LIST_FOREACH(si, &dev_hash[hash], si_hash) { > 208 if (si->si_udev == udev) > 209 return (si); > 210 } > 211 if (stashed >= DEVT_STASH) { > 212 MALLOC(si, struct specinfo *, sizeof(*si), M_DEVT, > (kgdb) Yep. Looks like si is garbage: > fault virtual address = 0x211e6d36 is most likely the value of si at the time of the crash. It's nowhere near kernel memory (which starts at 0xc0000000). If / when you get a dump, show me the backtrace and the value of x, y and udev (as reported by gdb operating on the recovered core) > > How do you build your kernels - 'make buildkernel' or manually? > Always make buildkernel. I have a debug kernel built as well > (makeoptions DEBUG=-g) That's what I wanted to know. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 12:27:52 2003 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 01C9337B401 for ; Mon, 17 Feb 2003 12:27:51 -0800 (PST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4688443F3F for ; Mon, 17 Feb 2003 12:27:50 -0800 (PST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.6/8.12.6) with ESMTP id h1HKRn2T019692; Mon, 17 Feb 2003 15:27:50 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <5.2.0.9.0.20030217145218.03588678@marble.sentex.ca> X-Sender: mdtpop@marble.sentex.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 17 Feb 2003 15:32:29 -0500 To: Dag-Erling Smorgrav From: Mike Tancsa Subject: Re: debugging a repeating panic that does not produce a dump Cc: freebsd-hackers@freebsd.org In-Reply-To: References: <5.2.0.9.0.20030217135903.064d7378@marble.sentex.ca> <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> <5.2.0.9.0.20030217135903.064d7378@marble.sentex.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: By Sentex Communications (lava/20020517) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 08:39 PM 17/02/2003 +0100, Dag-Erling Smorgrav wrote: >If / when you get a dump, show me the backtrace and the value of x, y >and udev (as reported by gdb operating on the recovered core) Thank you very much, I will do so as soon as I get the dump. BTW, could the act of giving the wrong params to dumpon cause the crash ? I dont see anything directly in periodic that would look for / trigger that however. ---Mike > > > How do you build your kernels - 'make buildkernel' or manually? > > Always make buildkernel. I have a debug kernel built as well > > (makeoptions DEBUG=-g) > >That's what I wanted to know. > >DES >-- >Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 13:34: 8 2003 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 AA63F37B401 for ; Mon, 17 Feb 2003 13:34:07 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9262143FE0 for ; Mon, 17 Feb 2003 13:33:59 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 599A453B5; Mon, 17 Feb 2003 22:33:57 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Mike Tancsa Cc: freebsd-hackers@freebsd.org Subject: Re: debugging a repeating panic that does not produce a dump From: Dag-Erling Smorgrav Date: Mon, 17 Feb 2003 22:33:56 +0100 In-Reply-To: <5.2.0.9.0.20030217145218.03588678@marble.sentex.ca> (Mike Tancsa's message of "Mon, 17 Feb 2003 15:32:29 -0500") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: <5.2.0.9.0.20030217135903.064d7378@marble.sentex.ca> <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> <5.2.0.9.0.20030217091242.05b184b0@marble.sentex.ca> <5.2.0.9.0.20030217135903.064d7378@marble.sentex.ca> <5.2.0.9.0.20030217145218.03588678@marble.sentex.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Tancsa writes: > Thank you very much, I will do so as soon as I get the dump. BTW, > could the act of giving the wrong params to dumpon cause the crash ? No, it wouldn't. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 14: 1:45 2003 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 865E637B405 for ; Mon, 17 Feb 2003 14:01:44 -0800 (PST) Received: from ivoti.terra.com.br (ivoti.terra.com.br [200.176.3.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id AEA0D43F3F for ; Mon, 17 Feb 2003 14:01:43 -0800 (PST) (envelope-from devlware@terra.com.br) Received: from araci.terra.com.br (araci.terra.com.br [200.176.3.44]) by ivoti.terra.com.br (Postfix) with ESMTP id 1761841510C for ; Mon, 17 Feb 2003 18:59:56 -0300 (BRT) Received: from terra.com.br (cm-virtua-cwb-C8C0CBAA.brdterra.com.br [200.192.203.170]) (authenticated user devlware) by araci.terra.com.br (Postfix) with ESMTP id 8E658C403E for ; Mon, 17 Feb 2003 18:59:55 -0300 (BRT) Message-ID: <3E515C28.2010107@terra.com.br> Date: Mon, 17 Feb 2003 19:03:20 -0300 From: Diego Wentz Antunes User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en, pt-br MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG unsubscribe freebsd-hackers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 14:37: 4 2003 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 DB19637B401 for ; Mon, 17 Feb 2003 14:37:02 -0800 (PST) Received: from postoffice.aims.com.au (eth0.lnk.aims.com.au [203.31.73.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id C262443FBF for ; Mon, 17 Feb 2003 14:37:00 -0800 (PST) (envelope-from chris@aims.com.au) Received: from postoffice.aims.com.au (nts-ts1.aims.private [192.168.10.2]) by postoffice.aims.com.au with ESMTP id h1HMakbs023524 for ; Tue, 18 Feb 2003 09:36:47 +1100 (EST) (envelope-from chris@aims.com.au) Received: from ntsts1 by aims.com.au with SMTP (MDaemon.v3.5.8.R) for ; Tue, 18 Feb 2003 09:06:44 +1100 From: "Chris Knight" To: "'Pawel Jakub Dawidek'" Cc: Subject: RE: IPC and jail. Date: Tue, 18 Feb 2003 09:06:43 +1100 Message-ID: <086b01c2d6d0$db8f2bd0$020aa8c0@aims.private> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20030217173905.GA64362@garage.freebsd.pl> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 Importance: Normal X-Return-Path: chris@aims.com.au X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Reply-To: chris@aims.com.au X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Spam-Status: No, hits=-100.8 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,SPAM_PHRASE_00_01, USER_AGENT_OUTLOOK,USER_IN_WHITELIST version=2.44 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Howdy, Excellent! For regression tools, look at the /usr/src/tools/regression directory in the -current source tree. There are regression tests for sysv there. Regards, Chris Knight Systems Administrator AIMS Independent Computer Professionals Tel: +61 3 6334 6664 Fax: +61 3 6331 7032 Mob: +61 419 528 795 Web: http://www.aims.com.au > -----Original Message----- > From: Pawel Jakub Dawidek [mailto:nick@garage.freebsd.pl] > Sent: Tuesday, 18 February 2003 4:39 > To: freebsd-hackers@freebsd.org > Cc: chris@aims.com.au > Subject: IPC and jail. > > > Hello hackers. > > I'm preparing a patch against FreeBSD 4.7 (for now) which splits IPC > zones between jails and main host. Every entity will have his own IPC > memory not shared with others (jails or main host). Message queues > are already patched, but it need to be tested - that's why I'm writing. > Does anybody have any regression tests for IPC functionality? > If not, which program use it and will be a good test? > > Thanks. > > -- > Pawel Jakub Dawidek > UNIX Systems Administrator > http://garage.freebsd.pl > Am I Evil? Yes, I Am. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 14:42: 9 2003 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 9EA1037B401 for ; Mon, 17 Feb 2003 14:42:05 -0800 (PST) Received: from lenny.anarcat.ath.cx (dsl-135-123.aei.ca [66.36.135.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA75543F75 for ; Mon, 17 Feb 2003 14:42:02 -0800 (PST) (envelope-from anarcat@lenny.anarcat.ath.cx) Received: from lenny.anarcat.ath.cx (localhost.anarcat.ath.cx [127.0.0.1]) by lenny.anarcat.ath.cx (8.12.6/8.12.6) with ESMTP id h1HMfxiK015448 for ; Mon, 17 Feb 2003 17:41:59 -0500 (EST) (envelope-from anarcat@lenny.anarcat.ath.cx) Received: (from anarcat@localhost) by lenny.anarcat.ath.cx (8.12.6/8.12.6/Submit) id h1HMfwnO015447 for hackers@FreeBSD.org; Mon, 17 Feb 2003 17:41:58 -0500 (EST) Date: Mon, 17 Feb 2003 17:41:58 -0500 From: The Anarcat To: hackers@FreeBSD.org Subject: Results: what userland files are necessary for an installworld? Message-ID: <20030217224158.GA606@lenny.anarcat.ath.cx> References: <20030212202327.GH522@xtanbul> <20030213015956.GD2066@gothmog.gr> <20030212202327.GH522@xtanbul> <20030213012627.GA1050@BSDWins.Com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <20030213015956.GD2066@gothmog.gr> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ok. A few panics later, I brought the box back from the dead, with the help of a 5.0-rel mini-iso. :) I have put the gory details (a script record of the session) on http://anarcat.ath.cx/scrapped.log (warning: it's big and ugly as the rest of this mail). A few things about the final setup: my /var is hosed, I moved most files from / and /usr into subdirectories so they're considered "dead". After this experiment, I can say that make installworld need much more than just make and /usr/{src,obj}. In fact, if you have lost either of {/usr}/{s}bin or /usr/lib/libc* or /usr/libexec/ld-elf.so.1, consider using an iso or a install floppy. :) First of all, my mistake was to think make could live without /bin/sh. :) So that's the first thing that's needed. Then there's make(1) "system mk files": lenny# cd /usr/src^M lenny# ~/make^M make: no system rules (sys.mk). ouch! So I brought back /usr/share and /bin/sh from the dead. Then there's is a long list of binaries that are used here and there: date(1): lenny# make installworld^M date: not found "/usr/src/Makefile", line 120: warning: "LC_ALL=3DC date" returned non-zero= status echo(1): "/usr/src/Makefile", line 120: warning: "LC_ALL=3DC date" returned non-zero= status echo:No such file or directory sysctl(8): sysctl: not found "/usr/src/Makefile.inc1", line 126: warning: "sysctl -n kern.osreldate" ret= urned non-zero status At this point, we can consider that those tools (date, echo and sysctl) are pretty much essential. But what about some less obvious stuff: mktemp(1): /usr/bin/mktemp: not found "/usr/src/Makefile.inc1", line 161: warning: "/usr/bin/mktemp -d -u -t inst= all"=20 returned non-zero status grep(1): grep: not found ERROR: Required smmsp user is missing, see /usr/src/UPDATING. Then I got tired and just restored /bin, /sbin /usr/bin and /usr/sbin. But installworld wasn't happy yet: lenny# make installworld^M Running test variables ELF interpreter /usr/libexec/ld-elf.so.1 not found^M FAIL: Test failed: regression detected. See above. ELF interpreter /usr/libexec/ld-elf.so.1 not found^M *** Signal 6 Stop in /usr/src/tools/regression/usr.bin/make. Abort trap Yes-yes... The regression tests try out the non-working, userland make, then try to build one because it doesn't see *it already has one in /usr/obj*. Ouch! So, I restored the original /usr/bin/make. :( Then I got problems over the /etc front: grep: /etc/passwd: No such file or directory ERROR: Required smmsp user is missing, see /usr/src/UPDATING. *** Error code 1 (continuing) I avoided this one by copying master.passwd from /usr/src, but installworld could have seen this one coming. Generating /etc/passwd automatically demands pwd_mkdb, but I could've wrote it by hand or called in mergemaster to the rescue. Then I got a little bit farther: Testing installed kernel for new sigaction(2) syscall Seems ok.. mkdir -p /tmp/install.VpIC0A0d for prog in [ awk cat chflags chmod chown date echo egrep find grep ln mak= e mkd ir mtree mv pwd_mkdb rm sed sh sysctl test true uname wc zic; do cp `whic= h $pr og` /tmp/install.VpIC0A0d; done usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN directory This is of course not very wise to do when you don't have those tools installed. Restoring /bin, /sbin, /usr/bin and /usr/sbin along with ld-elf.so.1 (since /usr/* stuff is dynamic) solves that one.=20 At this point, I managed to trash my backup copies of [/usr]/[s]bin and I just dropped the whole experience. I don't recommend people to rely on /usr/obj to get their system back from the dead. Only a "real" bootstrap tool such as a livecd, the install disks or the install floppies can get you out of a mess such as /bin being dead. This, of course, ignoring the backup argument. :) I'll send my acpiconf experiments results on -current later on. A. --=20 Legislation should outlaw an advertiser's attempts to use its economic relationships with a media enterprise to influence the enterprise not to print or broadcast content that it would otherwise choose to present . . . . There is little reason to allow this use of economic power to censor others' speech and to block the public's access to information or viewpoints. - C. Edwin Baker --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+UWU1ttcWHAnWiGcRAkk+AKCEj6vq9GIKhHt2uVQItn+IcVk5sQCfUT7A CQdXHRFQPDBYPM8pn7cu8qA= =yD6/ -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Feb 17 20: 9:58 2003 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 48F8237B401 for ; Mon, 17 Feb 2003 20:09:54 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA0BB43FA3 for ; Mon, 17 Feb 2003 20:09:53 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.6/8.12.6) with ESMTP id h1I49rSJ048463 for ; Mon, 17 Feb 2003 20:09:53 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.6/8.12.6/Submit) id h1I49rnR048462; Mon, 17 Feb 2003 20:09:53 -0800 (PST) Date: Mon, 17 Feb 2003 20:09:53 -0800 (PST) From: Matthew Dillon Message-Id: <200302180409.h1I49rnR048462@apollo.backplane.com> To: freebsd-hackers@freebsd.org Subject: DHCP problem with pxeboot over wireless via LinkSys WAP11 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I came across an interesting problem trying to pxeboot a diskless machine over a wireless network. The sequence of events goes like this: network bios: network bios issues DHCP request from 0.0.0.0 (via wireless bridge) my dhcp server replies network bios sets IP address network bios loads pxeboot successfully pxeboot runs: pxeboot issues DHCP request from (ip assigned by network bios) mh dhcp server replies LinkSys WAP11 eats the reply. poof gone. [repeat until pxeboot gives up] I think the LinkSys is just plain broken but it's weird that the network bios was able to issue a request without the reply getting eaten, and the kernel (once one is able to boot that far) is also able to issue a request and get a reply that isn't eaten. And yet the reply to pxeboot's bootp() request gets eaten by the WAP11 every time. It works fine on a hard line, but blows up through the wireless. Anyone see this before? In anycase, I found a solution, which is to extract the RFC1048 data from the PXE cache in the PXE code. Then if the PXE's bootp() attempt fails (which it does for me :-( ), it can use the data extracted from the PXE cache to set the appropriate variables. This patch is for -stable and it needs a bit of cleaning up, and still has some debugging, and the bootp() call is #if 0'd out to test the PXE cache data interpretation, but once cleaned up I believe it can be committed and, in fact, we might be able to avoid having to call bootp() at all if the PXE cache has all the necessary info. -Matt Matthew Dillon Index: i386/libi386/pxe.c =================================================================== RCS file: /home/ncvs/src/sys/boot/i386/libi386/pxe.c,v retrieving revision 1.3.2.9 diff -u -r1.3.2.9 pxe.c --- i386/libi386/pxe.c 15 Mar 2001 08:35:54 -0000 1.3.2.9 +++ i386/libi386/pxe.c 18 Feb 2003 04:02:51 -0000 @@ -96,6 +96,7 @@ extern u_int16_t __pxenvseg; extern u_int16_t __pxenvoff; extern void __pxenventry(void); +extern struct in_addr servip; struct netif_dif pxe_ifs[] = { /* dif_unit dif_nsel dif_stats dif_private */ @@ -256,6 +257,7 @@ char temp[FNAME_SIZE]; int error = 0; int i; + struct iodesc *d; va_start(args, f); devname = va_arg(args, char*); @@ -273,16 +275,49 @@ if (pxe_debug) printf("pxe_open: netif_open() succeeded\n"); } + if (!(d = socktodesc(pxe_sock))) { + printf("pxe_open: bad socket. %d\n", pxe_sock); + return (ENXIO); + } if (rootip.s_addr == 0) { /* + * Try to extract the RFC1048 data from PXE + * + * It turns out that at some wireless bridges/access-points + * eat dhcpd responses to pxeboot's bootp requests. This + * may save us if the bootp() attempt below fails. In fact, + * if we get enough info we can skip the bootp() attempt XXX. + */ + if (dhcp_try_rfc1048(bootplayer.vendor.d, BOOTP_DHCPVEND)) + printf("pxe_open: no RFC1048 data in PXE Cache\n"); + else + printf("pxe_open: loaded RFC1048 data from PXE Cache\n"); + + /* * Do a bootp/dhcp request to find out where our * NFS/TFTP server is. Even if we dont get back * the proper information, fall back to the server * which brought us to life and a default rootpath. */ +#if 0 bootp(pxe_sock, BOOTP_PXE); +#endif + + /* + * Failsafe + */ if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; + if (gateip.s_addr == 0) + gateip.s_addr = bootplayer.gip; + if (myip.s_addr == 0) + myip.s_addr = bootplayer.yip; + if (servip.s_addr == 0) + servip = rootip; + if (d->myip.s_addr == 0) + d->myip = myip; + printf("d->MYIP %04x d->servip %04x\n", d->myip.s_addr, servip.s_addr); + if (!rootpath[1]) strcpy(rootpath, PXENFSROOTPATH); @@ -503,6 +538,7 @@ bzero(udpopen_p, sizeof(*udpopen_p)); udpopen_p->src_ip = bootplayer.yip; + pxe_call(PXENV_UDP_OPEN); if (udpopen_p->status != 0) { @@ -549,7 +585,7 @@ { t_PXENV_UDP_WRITE *udpwrite_p = (t_PXENV_UDP_WRITE *)scratch_buffer; bzero(udpwrite_p, sizeof(*udpwrite_p)); - + udpwrite_p->ip = h->destip.s_addr; udpwrite_p->dst_port = h->destport; udpwrite_p->src_port = h->myport; Index: bootp.c =================================================================== RCS file: /home/ncvs/src/lib/libstand/bootp.c,v retrieving revision 1.1.1.1.6.2 diff -u -r1.1.1.1.6.2 bootp.c --- bootp.c 20 Sep 2000 18:37:25 -0000 1.1.1.1.6.2 +++ bootp.c 18 Feb 2003 03:52:34 -0000 @@ -335,6 +335,16 @@ return (-1); } +int +dhcp_try_rfc1048(u_char *cp, u_int len) +{ + expected_dhcpmsgtype = DHCPACK; + if (bcmp(vm_rfc1048, cp, sizeof(vm_rfc1048)) == 0) { + return(vend_rfc1048(cp, len)); + } + return(-1); +} + static int vend_rfc1048(cp, len) register u_char *cp; @@ -356,6 +366,7 @@ while (cp < ep) { tag = *cp++; size = *cp++; + if (tag == TAG_END) break; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 2:29:18 2003 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 0A57337B401 for ; Tue, 18 Feb 2003 02:29:17 -0800 (PST) Received: from rigel.grass.st (rigel.grass.st [195.197.32.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAF3943F3F for ; Tue, 18 Feb 2003 02:29:15 -0800 (PST) (envelope-from bsdhack@rigel.grass.st) Received: (from bsdhack@localhost) by rigel.grass.st (8.9.3/8.9.3) id MAA85362 for hackers@freebsd.org; Tue, 18 Feb 2003 12:29:26 +0200 (EET) (envelope-from bsdhack) Date: Tue, 18 Feb 2003 12:29:26 +0200 From: mika ruohotie To: hackers@freebsd.org Subject: lost filesystems, recovery Message-ID: <20030218122926.A84494@rigel.grass.st> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG hello, recently my current system lost it's filesystems complitely while [1] running the daily thru the disk. well, current and current, it was 5.0-current, but not recent one, had soft-updates. disklabel is fine, and if i dd the partitions into a file, and then read that with "stings", it seems as if most or even all of the stuff supposed to be there, actually still _is_ there. fsck [2] doesnt seem to think anything is wrong (on the first run it cleared few files, assuming those which were open while the damage was happening) and fssrecov doesnt like my dd-images [3]. i got few of the /var logs out with it. suggestions other than ibas? (was a personal machine, not production and i doubt my insurance covers their costs... :> ) i've seen something similar once several years ago when my other ide drive (western digital) decided it wants to sleep while i did a find thru the system. then fixit fsck resulted everything got put into lost&found, this time tho nothing there either. this time the drive was ibm deathstar, ide. i assume there could be something more to do, since as i said, the data seems to be there still. it'd be annoying to read thru those dd-images and cut&paste all the text out. mickey [1] i read /var image and timestamps there suggested the damage happened around the same time daily ran it's find, i was able to pinpoint the damage into a 5 minute window. [2] fixit or another system, ofcourse, since _nothing_ is left on that 10GB drive, except the mbr and disklabel. (and the stuff i still can see from the dd images, ofcourse) [3] mmap issues with above 2GB or alike, splitting images didnt help, should i have used some additional dd flags, other than just if/of? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 5:31:15 2003 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 D8B3437B401 for ; Tue, 18 Feb 2003 05:31:13 -0800 (PST) Received: from smtp.mailbox.co.uk (smtp.mailbox.co.uk [195.82.125.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id C69CE43FA3 for ; Tue, 18 Feb 2003 05:31:12 -0800 (PST) (envelope-from wayne@penguinpowered.org.uk) Received: from [212.18.244.168] (helo=marvin.penguinpowered.org.uk) by smtp.mailbox.co.uk with esmtp (Exim 3.36 #1) id 18l7q3-0000Ad-00 for freebsd-hackers@freebsd.org; Tue, 18 Feb 2003 13:31:11 +0000 Received: from waynep by marvin.penguinpowered.org.uk with local (Exim 3.33 #1) id 18l7zk-000OKc-00 for freebsd-hackers@freebsd.org; Tue, 18 Feb 2003 13:41:12 +0000 Date: Tue, 18 Feb 2003 13:41:12 +0000 From: Ian Watkinson To: freebsd-hackers@freebsd.org Subject: DHCP Client DoS Message-ID: <20030218134112.GA93504@marvin.penguinpowered.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-System: FreeBSD i386 with kernel 4.7-RC Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, We've recently found a problem with dhclient that can DoS a DHCP server. If you have schg flags set on /etc/resolv.conf to stop dhcp overwriting your existing nameservers, the problem occurs. Basically, the client just keeps rejecting the IP details it has received from the server and requesting another. The server marks the record as used, and moves onto the next one. Over the course of a couple of minutes, you can pretty much mark an entire class C as in use. If you remove the schg flag from resolv.conf, this problem does not happen. This has been tested from a FreeBSD 5 client against a Windows NT server and a FreeBSD 4.7 server with the same results. -- Ian Watkinson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 5:44:11 2003 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 DDACE37B401 for ; Tue, 18 Feb 2003 05:44:07 -0800 (PST) Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id E46F043F85 for ; Tue, 18 Feb 2003 05:44:06 -0800 (PST) (envelope-from stijn@pcwin002.win.tue.nl) Received: from pcwin002.win.tue.nl (orb_rules@localhost [127.0.0.1]) by pcwin002.win.tue.nl (8.12.6/8.12.6) with ESMTP id h1IDiLVw096934; Tue, 18 Feb 2003 14:44:21 +0100 (CET) (envelope-from stijn@pcwin002.win.tue.nl) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.12.6/8.12.6/Submit) id h1IDiLGt096933; Tue, 18 Feb 2003 14:44:21 +0100 (CET) Date: Tue, 18 Feb 2003 14:44:21 +0100 From: Stijn Hoop To: Ian Watkinson Cc: freebsd-hackers@freebsd.org Subject: Re: DHCP Client DoS Message-ID: <20030218134421.GC94966@pcwin002.win.tue.nl> References: <20030218134112.GA93504@marvin.penguinpowered.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DBIVS5p969aUjpLe" Content-Disposition: inline In-Reply-To: <20030218134112.GA93504@marvin.penguinpowered.org.uk> User-Agent: Mutt/1.4i X-Bright-Idea: Let's abolish HTML mail! Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --DBIVS5p969aUjpLe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 18, 2003 at 01:41:12PM +0000, Ian Watkinson wrote: > We've recently found a problem with dhclient that can DoS a DHCP > server. If you have schg flags set on /etc/resolv.conf to stop dhcp > overwriting your existing nameservers, the problem occurs. >=20 > Basically, the client just keeps rejecting the IP details it has > received from the server and requesting another. The server marks the > record as used, and moves onto the next one. Over the course of a couple > of minutes, you can pretty much mark an entire class C as in use.=20 >=20 > If you remove the schg flag from resolv.conf, this problem does not > happen.=20 While this is of course very bad, you do know about the 'supersede' command in dhclient.conf to override any DHCP-supplied values? Something like interface "fxp0" { supersede domain-name-servers 127.0.0.1; } should work. That should at least solve the 'overwriting /etc/resolv.conf' problem. man dhclient.conf for details. --Stijn --=20 Fairy tales do not tell children that dragons exist. Children already know dragons exist. Fairy tales tell children the dragons can be killed. -- G.K. Chesterton --DBIVS5p969aUjpLe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+Uji1Y3r/tLQmfWcRApDKAJ0UNnzi6Brl3PoAMctTp0E7qOmetACeIiCR rwi2eq7FEDazFpOSZGw8r8g= =r4s5 -----END PGP SIGNATURE----- --DBIVS5p969aUjpLe-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 7:11:12 2003 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 E0AB737B401 for ; Tue, 18 Feb 2003 07:11:10 -0800 (PST) Received: from atlas.informatik.rwth-aachen.de (atlas.Informatik.RWTH-Aachen.DE [137.226.194.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B551F43F75 for ; Tue, 18 Feb 2003 07:11:09 -0800 (PST) (envelope-from stolz@i2.informatik.rwth-aachen.de) Received: from menelaos.informatik.rwth-aachen.de (menelaos.Informatik.RWTH-Aachen.DE [137.226.194.73]) by atlas.informatik.rwth-aachen.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id h1IFB8W13556; Tue, 18 Feb 2003 16:11:08 +0100 Received: (from stolz@localhost) by menelaos.informatik.rwth-aachen.de (8.12.6/8.12.6/Submit) id h1IFBEeq002895; Tue, 18 Feb 2003 16:11:14 +0100 (CET) (envelope-from stolz) Date: Tue, 18 Feb 2003 16:11:14 +0100 From: Volker Stolz To: Ian Watkinson Cc: freebsd-hackers@freebsd.org Subject: Re: DHCP Client DoS Message-ID: <20030218151114.GA2873@i2.informatik.rwth-aachen.de> References: <20030218134112.GA93504@marvin.penguinpowered.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030218134112.GA93504@marvin.penguinpowered.org.uk> X-PGP-Key: finger vs@foldr.org X-PGP-Id: 0x3FD1B6B5 User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In local.freebsd-hackers, you wrote: > We've recently found a problem with dhclient that can DoS a DHCP > server. If you have schg flags set on /etc/resolv.conf to stop dhcp > overwriting your existing nameservers, the problem occurs. > Basically, the client just keeps rejecting the IP details it has > received from the server and requesting another. The server marks the > record as used, and moves onto the next one. Over the course of a couple > of minutes, you can pretty much mark an entire class C as in use. The problem of read-only resolv.conf is already documented in the PR database and I think recently somebody started thinking about a solution. Check http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/38778 That the server runs out of IPs is his probably his own fault. It should be configured to not eat up all IPs when a host which already has obtained a lease requests another one but simply hand out the old one or deny the request... Stijn: Could you add your suggestion to the above PR? -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME rage against the finite state machine To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 7:19: 1 2003 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 B856C37B401 for ; Tue, 18 Feb 2003 07:18:59 -0800 (PST) Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8595043F85 for ; Tue, 18 Feb 2003 07:18:58 -0800 (PST) (envelope-from stijn@pcwin002.win.tue.nl) Received: from pcwin002.win.tue.nl (orb_rules@localhost [127.0.0.1]) by pcwin002.win.tue.nl (8.12.6/8.12.6) with ESMTP id h1IFJDVw097634; Tue, 18 Feb 2003 16:19:13 +0100 (CET) (envelope-from stijn@pcwin002.win.tue.nl) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.12.6/8.12.6/Submit) id h1IFJDU3097633; Tue, 18 Feb 2003 16:19:13 +0100 (CET) Date: Tue, 18 Feb 2003 16:19:13 +0100 From: Stijn Hoop To: Volker Stolz Cc: Ian Watkinson , freebsd-hackers@freebsd.org Subject: Re: DHCP Client DoS Message-ID: <20030218151913.GD97157@pcwin002.win.tue.nl> References: <20030218134112.GA93504@marvin.penguinpowered.org.uk> <20030218151114.GA2873@i2.informatik.rwth-aachen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZfOjI3PrQbgiZnxM" Content-Disposition: inline In-Reply-To: <20030218151114.GA2873@i2.informatik.rwth-aachen.de> User-Agent: Mutt/1.4i X-Bright-Idea: Let's abolish HTML mail! Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --ZfOjI3PrQbgiZnxM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 18, 2003 at 04:11:14PM +0100, Volker Stolz wrote: > In local.freebsd-hackers, you wrote: > > We've recently found a problem with dhclient that can DoS a DHCP > > server. If you have schg flags set on /etc/resolv.conf to stop dhcp > > overwriting your existing nameservers, the problem occurs. > > Basically, the client just keeps rejecting the IP details it has > > received from the server and requesting another. The server marks the > > record as used, and moves onto the next one. Over the course of a couple > > of minutes, you can pretty much mark an entire class C as in use.=20 >=20 > The problem of read-only resolv.conf is already documented in the PR > database and I think recently somebody started thinking about a solution. > Check http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dbin/38778 >=20 > That the server runs out of IPs is his probably his own fault. It > should be configured to not eat up all IPs when a host which already > has obtained a lease requests another one but simply hand out the old > one or deny the request... >=20 > Stijn: Could you add your suggestion to the above PR? Well I could but it's a workaround -- dhclient should imho be made not to fail when it cannot write /etc/resolv.conf. That's a separate issue from being able to set the contents of the newly written resolv.conf, which is essentially what the supersede option does. All I was trying to say was that there already is a solution for keeping your own nameservers in /etc/resolv.conf. That said, I will add some words to this effect to the PR. --Stijn --=20 The rain it raineth on the just And also on the unjust fella, But chiefly on the just, because The unjust steals the just's umbrella. --ZfOjI3PrQbgiZnxM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+Uk7xY3r/tLQmfWcRAimUAJwMQW3+lC3a2Dte+c4ewaQPhhqaIACgj6iB P+wUkDHdiqHQezA0aSKgZpM= =YrnR -----END PGP SIGNATURE----- --ZfOjI3PrQbgiZnxM-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 12:53:20 2003 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 A9F4237B401 for ; Tue, 18 Feb 2003 12:53:18 -0800 (PST) Received: from smtp2.libero.it (smtp2.libero.it [193.70.192.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id B32EB43F75 for ; Tue, 18 Feb 2003 12:53:17 -0800 (PST) (envelope-from flag@libero.it) Received: from southcross.skynet.org (151.29.206.130) by smtp2.libero.it (6.7.015) id 3E48BA340036F94E for freebsd-hackers@FreeBSD.ORG; Tue, 18 Feb 2003 21:53:16 +0100 Received: by southcross.skynet.org (Postfix, from userid 1001) id 9086768C2; Mon, 17 Feb 2003 15:10:34 +0100 (CET) Date: Mon, 17 Feb 2003 15:10:34 +0100 From: Paolo Pisati To: FreeBSD_Hackers Subject: Simple question about profiling Message-ID: <20030217141034.GA3706@law3.usr.dsi.unimi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Useless-Header: Look ma, it's a # sign! X-Operating-System: FreeBSD law3.usr.dsi.unimi.it 5.0-CURRENT FreeBSD 5.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've to confess this my first serious profile session, and i found something really strange (at least for me... =P) [flag@law3 src]$ gprof proto3 [snip] % cumulative self self total time seconds seconds calls ms/call ms/call name 74.4 39.26 39.26 .mcount (83) 6.7 42.82 3.56 111575600 0.00 0.00 checkRule2d [4] 6.6 46.30 3.48 1024 3.39 12.30 buildTree2d [3] 3.8 48.29 1.99 117334464 0.00 0.00 add_tail [6] 3.7 50.25 1.96 117234464 0.00 0.00 rem [7] 1.8 51.18 0.93 117234464 0.00 0.00 rem_head [5] 0.6 51.51 0.33 1600004 0.00 0.00 __qdivrem [13] 0.5 51.75 0.24 800004 0.00 0.00 __svfscanf [9] 0.4 51.96 0.21 9037 0.02 0.09 buildTree1d [10] 0.3 52.14 0.18 800000 0.00 0.00 strtoumax [12] 0.3 52.28 0.14 1078414 0.00 0.00 memset [20] 0.2 52.41 0.12 5658864 0.00 0.00 checkRule1d [21] 0.1 52.47 0.07 250129 0.00 0.00 count [23] 0.1 52.52 0.05 537809 0.00 0.00 malloc_bytes [22 ] 0.1 52.56 0.04 1166299 0.00 0.00 append_lists [25] 0.1 52.59 0.03 2411019 0.00 0.00 new_list [26] 0.1 52.62 0.03 536551 0.00 0.00 calloc [14] 0.0 52.64 0.02 70 0.24 0.42 tree2dHeight [29] [snip] i think this is the beef: what the hell is .mcount?!?! if i read the table correctly, .mcount is the guilty, isn't it? any help or pointer is appreciated, thank you... =) -- Paolo To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 13:11:47 2003 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 88C0637B401 for ; Tue, 18 Feb 2003 13:11:45 -0800 (PST) Received: from falcon.midgard.homeip.net (h76n3fls20o913.telia.com [213.67.148.76]) by mx1.FreeBSD.org (Postfix) with SMTP id B0C0543F93 for ; Tue, 18 Feb 2003 13:11:42 -0800 (PST) (envelope-from ertr1013@student.uu.se) Received: (qmail 3530 invoked by uid 1001); 18 Feb 2003 21:11:41 -0000 Date: Tue, 18 Feb 2003 22:11:41 +0100 From: Erik Trulsson To: Paolo Pisati Cc: FreeBSD_Hackers Subject: Re: Simple question about profiling Message-ID: <20030218211141.GA3499@falcon.midgard.homeip.net> Mail-Followup-To: Paolo Pisati , FreeBSD_Hackers References: <20030217141034.GA3706@law3.usr.dsi.unimi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030217141034.GA3706@law3.usr.dsi.unimi.it> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Feb 17, 2003 at 03:10:34PM +0100, Paolo Pisati wrote: > > I've to confess this my first serious profile session, and > i found something really strange (at least for me... =P) > > [flag@law3 src]$ gprof proto3 > [snip] > % cumulative self self total > time seconds seconds calls ms/call ms/call name > 74.4 39.26 39.26 .mcount (83) > 6.7 42.82 3.56 111575600 0.00 0.00 checkRule2d [4] > 6.6 46.30 3.48 1024 3.39 12.30 buildTree2d [3] > 3.8 48.29 1.99 117334464 0.00 0.00 add_tail [6] > 3.7 50.25 1.96 117234464 0.00 0.00 rem [7] > 1.8 51.18 0.93 117234464 0.00 0.00 rem_head [5] > 0.6 51.51 0.33 1600004 0.00 0.00 __qdivrem [13] > 0.5 51.75 0.24 800004 0.00 0.00 __svfscanf [9] > 0.4 51.96 0.21 9037 0.02 0.09 buildTree1d [10] > 0.3 52.14 0.18 800000 0.00 0.00 strtoumax [12] > 0.3 52.28 0.14 1078414 0.00 0.00 memset [20] > 0.2 52.41 0.12 5658864 0.00 0.00 checkRule1d [21] > 0.1 52.47 0.07 250129 0.00 0.00 count [23] > 0.1 52.52 0.05 537809 0.00 0.00 malloc_bytes [22 > ] > 0.1 52.56 0.04 1166299 0.00 0.00 append_lists [25] > 0.1 52.59 0.03 2411019 0.00 0.00 new_list [26] > 0.1 52.62 0.03 536551 0.00 0.00 calloc [14] > 0.0 52.64 0.02 70 0.24 0.42 tree2dHeight [29] > [snip] > > i think this is the beef: what the hell is .mcount?!?! > if i read the table correctly, .mcount is the guilty, isn't it? > > any help or pointer is appreciated, thank you... =) [This should probably have been sent to -questions instead of -hackers.] I believe .mcount belongs to the profiling code itself and is part of the profiling overhead. Just ignore it. -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 13:22:13 2003 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 18DAB37B401 for ; Tue, 18 Feb 2003 13:22:12 -0800 (PST) Received: from mastercard.com (MCNSTL41.mastercard.com [12.22.158.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 839B643F93 for ; Tue, 18 Feb 2003 13:22:11 -0800 (PST) (envelope-from MCNSTL41%MASTERCARD@mastercard.com) From: "MCNSTL41" X-Priority: 3 (Normal) Date: Tue, 18 Feb 2003 15:06:38 -0600 Subject: Report to Sender To: hackers Message-ID: X-MIMETrack: Serialize by Router on MCNSTL41/MASTERCARD(Release 5.0.11 |July 24, 2002) at 02/18/2003 03:22:11 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Incident Information:- Database: d:/notes/data/mail2.box Originator: hackers Recipients: hostmaster@mastercard.org, hostmaster@mastercard.com Subject: The Garden of Eden Date/Time: 02/18/2003 03:06:30 PM The file attachment 1,10121,0-1067-402-0,00[1].bat you sent to the recipients listed above was infected with the W32/Klez.h@MM virus and was not successfully cleaned. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 16: 9: 1 2003 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 C4A2E37B405 for ; Tue, 18 Feb 2003 16:08:59 -0800 (PST) Received: from mail.deltanet.com (mail.deltanet.com [216.237.144.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CE0943F3F for ; Tue, 18 Feb 2003 16:08:43 -0800 (PST) (envelope-from pherman@frenchfries.net) Received: from mammoth.eat.frenchfries.net (da001d0155.lax-ca.osd.concentric.net [66.239.48.155]) by mail.deltanet.com (8.11.6/8.11.6) with ESMTP id h1J08eQ19832 for ; Tue, 18 Feb 2003 16:08:41 -0800 Received: by mammoth.eat.frenchfries.net (Postfix, from userid 1000) id 2C55B4AFD; Tue, 18 Feb 2003 16:04:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mammoth.eat.frenchfries.net (Postfix) with ESMTP id 138F04AC9 for ; Tue, 18 Feb 2003 16:04:58 -0800 (PST) Date: Tue, 18 Feb 2003 16:04:57 -0800 (PST) From: Paul Herman X-X-Sender: pherman@mammoth.eat.frenchfries.net To: FreeBSD Hackers Subject: arc4random() range Message-ID: <20030218153651.A240-100000@mammoth.eat.frenchfries.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, ...a potential quick commit for someone. :-) What's the concesus that arc4random() should be a drop-in replacement for rand()/random()? Consider the following that caclulates the average of a bunch of random numbers on [0.0, 1.0]: bash$ cat rand.c #include int i; double avg; #define ITERATIONS 1000000 #define FIND_AVG(func) do { \ for (i=0, avg = 0.0; i; Tue, 18 Feb 2003 16:16:23 -0800 (PST) Received: from crf-consulting.co.uk (pc-80-194-99-19-hy.blueyonder.co.uk [80.194.99.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CA5743F75 for ; Tue, 18 Feb 2003 16:16:19 -0800 (PST) (envelope-from nik@crf-consulting.co.uk) Received: from clan.nothing-going-on.org (clan.nothing-going-on.org [192.168.1.20]) by crf-consulting.co.uk (8.12.3/8.12.3) with ESMTP id h1J0Fbaw026973; Wed, 19 Feb 2003 00:15:37 GMT (envelope-from nik@catkin) Received: from clan.nothing-going-on.org (localhost [127.0.0.1]) by clan.nothing-going-on.org (8.12.3/8.12.3) with ESMTP id h1J0Fbm0029243; Wed, 19 Feb 2003 00:15:37 GMT (envelope-from nik@clan.nothing-going-on.org) Received: (from nik@localhost) by clan.nothing-going-on.org (8.12.3/8.12.3/Submit) id h1J0FZJ0029242; Wed, 19 Feb 2003 00:15:35 GMT Date: Wed, 19 Feb 2003 00:15:35 +0000 From: Nik Clayton To: Stephen Hilton Cc: hackers@FreeBSD.ORG, julian@elischer.org Subject: Re: Hi!Dear FreeBSD! Message-ID: <20030219001535.GB6403@clan.nothing-going-on.org> References: <3E3BEC87.80600@gmx.net> <20030202103721.3996ec9c.nospam@hiltonbsd.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lEGEL1/lMxI0MVQ2" Content-Disposition: inline In-Reply-To: <20030202103721.3996ec9c.nospam@hiltonbsd.com> User-Agent: Mutt/1.4i Organization: FreeBSD Project Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --lEGEL1/lMxI0MVQ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 02, 2003 at 10:37:21AM -0600, Stephen Hilton wrote: > I really like this idea :-), and think that a database of all=20 > types of FreeBSD people from end-users to commiters who want=20 > to opt-in to this listing could spawn a lot of educational=20 > and fun opportunities for individuals who could drag themselves=20 > away from their screens on occasion ;-) >=20 > Why not base it on latitude and longitude, along with an=20 > email address and text fields to allow for some self=20 > expression of areas of interest etc...? >=20 > A clickable map would be a nice interface for the database=20 > lookups with a max radius factor, but really is just icing=20 > on the cake.=20 Please, no wheel reinvention. http://www.pm.org/groups/index.html N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ (__) FreeBSD Documentation Project http://www.freebsd.org/docproj/ \\\'',) \/ \= ^ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- .\._/= _) --lEGEL1/lMxI0MVQ2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+Usymk6gHZCw343URAvIFAKCGuSSALCEDML5zbMmigpsHj0xBnQCfaQ8a tX+4XBfswn4yYwaP2YBHjcc= =nl7y -----END PGP SIGNATURE----- --lEGEL1/lMxI0MVQ2-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Feb 18 16:18:44 2003 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 23C6A37B401 for ; Tue, 18 Feb 2003 16:18:36 -0800 (PST) Received: from mail.ncircle.com (mail.ncircle.com [209.140.253.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6992543F85 for ; Tue, 18 Feb 2003 16:18:35 -0800 (PST) (envelope-from brian@ncircle.com) Received: from localhost (bbuchanan@localhost) by mail.ncircle.com (8.11.3/8.11.6) with ESMTP id h1J0FI708558 for ; Tue, 18 Feb 2003 16:15:18 -0800 (PST) (envelope-from brian@ncircle.com) X-Authentication-Warning: mail.ncircle.com: bbuchanan owned process doing -bs Date: Tue, 18 Feb 2003 16:15:18 -0800 (PST) From: Brian Buchanan X-X-Sender: To: Subject: Tyan S4520 GCHE Message-ID: <20030218155841.V94954-100000@mail.ncircle.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm having problems getting SMP to work on a Tyan S4520 Thunder GCHE motherboard with 4x 1.9GHz Xeon processors: Programming 16 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 Programming 16 pins in IOAPIC #1 Programming 16 pins in IOAPIC #2 AP #1 (PHY# 2) failed! panic y/n? [y] AP #2 (PHY# 4) failed! panic y/n? [y] AP #3 (PHY# 6) failed! panic y/n? [y] This is under FreeBSD 4.7-RELEASE. I also tried a recent -STABLE build and 5.0-RELEASE, with the same results. I've attached the "mptable -dmesg" output in the hopes that someone with more SMP knowledge might be able to give me some information as to what's wrong. Any help is much appreciated. Brian =============================================================================== MPTable, version 2.0.15 ------------------------------------------------------------------------------- MP Floating Pointer Structure: location: BIOS physical address: 0x000f7450 signature: '_MP_' length: 16 bytes version: 1.4 checksum: 0x36 mode: Virtual Wire ------------------------------------------------------------------------------- MP Config Table Header: physical address: 0x0009f170 signature: 'PCMP' base table length: 428 version: 1.4 checksum: 0x54 OEM ID: 'RCC ' Product ID: 'GCHE SERVER ' OEM table pointer: 0x00000000 OEM table size: 0 entry count: 42 local APIC address: 0xfee00000 extended table length: 304 extended table checksum: 242 ------------------------------------------------------------------------------- MP Config Base Table Entries: -- Processors: APIC ID Version State Family Model Step Flags 0 0x14 BSP, usable 15 2 2 0x3febfbff 2 0x14 AP, usable 15 2 2 0x3febfbff 4 0x14 AP, usable 15 2 2 0x3febfbff 6 0x14 AP, usable 15 2 2 0x3febfbff -- Bus: Bus ID Type 0 PCI 1 PCI 2 PCI 3 PCI 4 PCI 5 PCI 6 PCI 7 PCI 8 PCI 9 PCI 10 PCI 11 ISA -- I/O APICs: APIC ID Version State Address 8 0x11 usable 0xfec00000 9 0x11 usable 0xfec01000 10 0x11 usable 0xfec02000 -- I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# ExtINT active-hi edge 11 0 8 0 INT active-hi edge 11 1 8 1 INT active-hi edge 11 0 8 2 INT active-hi edge 11 3 8 3 INT active-hi edge 11 4 8 4 INT active-hi edge 11 5 8 5 INT active-hi edge 11 6 8 6 INT active-hi edge 11 7 8 7 INT active-hi edge 11 8 8 8 INT active-hi edge 11 9 8 9 INT active-hi edge 11 10 8 10 INT active-hi edge 11 11 8 11 INT active-hi edge 11 12 8 12 INT active-hi edge 11 13 8 13 INT active-hi edge 11 14 8 14 INT active-hi edge 11 15 8 15 INT active-lo level 0 10:A 10 13 INT active-lo level 0 11:A 10 14 INT active-lo level 0 12:A 10 15 INT active-lo level 7 9:A 10 3 INT active-lo level 7 9:B 10 4 -- Local Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# ExtINT active-hi edge 11 0 255 0 NMI active-hi edge 11 0 255 1 ------------------------------------------------------------------------------- MP Config Extended Table Entries: -- System Address Space bus ID: 0 address type: I/O address address base: 0x0 address range: 0x3000 -- System Address Space bus ID: 1 address type: I/O address address base: 0x3000 address range: 0x3000 -- System Address Space bus ID: 4 address type: I/O address address base: 0x6000 address range: 0x3000 -- System Address Space bus ID: 7 address type: I/O address address base: 0x9000 address range: 0x3000 -- System Address Space bus ID: 9 address type: I/O address address base: 0xc000 address range: 0x3000 -- System Address Space bus ID: 0 address type: I/O address address base: 0xf000 address range: 0x1000 -- System Address Space bus ID: 0 address type: memory address address base: 0x40000000 address range: 0xba000000 -- System Address Space bus ID: 1 address type: memory address address base: 0xfa000000 address range: 0x200000 -- System Address Space bus ID: 4 address type: memory address address base: 0xfa200000 address range: 0x200000 -- System Address Space bus ID: 7 address type: memory address address base: 0xfa400000 address range: 0x400000 -- System Address Space bus ID: 9 address type: memory address address base: 0xfa800000 address range: 0x200000 -- System Address Space bus ID: 0 address type: memory address address base: 0xfaa00000 address range: 0x4400000 -- System Address Space bus ID: 0 address type: memory address address base: 0xfee01000 address range: 0x11ff000 -- System Address Space bus ID: 0 address type: memory address address base: 0xa0000 address range: 0x20000 -- Bus Heirarchy bus ID: 11 bus info: 0x01 parent bus ID: 0 -- Compatibility Bus Address bus ID: 0 address modifier: add predefined range: 0x00000000 -- Compatibility Bus Address bus ID: 0 address modifier: add predefined range: 0x00000001 ------------------------------------------------------------------------------- dmesg output: Copyright (c) 1992-2002 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.7-RELEASE #0: Thu Feb 13 06:25:15 GMT 2003 brian@grandchampion.eng.ncircle.com:/usr/src/sys/compile/CHAMPION Timecounter "i8254" frequency 1193182 Hz CPU: Pentium 4 (1899.94-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf22 Stepping = 2 Features=0x3febfbff,ACC> real memory = 1073741824 (1048576K bytes) avail memory = 1042354176 (1017924K bytes) Programming 16 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 Programming 16 pins in IOAPIC #1 Programming 16 pins in IOAPIC #2 AP #1 (PHY# 2) failed! panic y/n? [y] AP #2 (PHY# 4) failed! panic y/n? [y] AP #3 (PHY# 6) failed! panic y/n? [y] FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 0, version: 0x00050014, at 0xfee00000 cpu1 (AP): apic id: 2, version: 0x00000000, at 0xfee00000 cpu2 (AP): apic id: 4, version: 0x00000000, at 0xfee00000 cpu3 (AP): apic id: 6, version: 0x00000000, at 0xfee00000 io0 (APIC): apic id: 8, version: 0x000f0011, at 0xfec00000 io1 (APIC): apic id: 9, version: 0x000f0011, at 0xfec01000 io2 (APIC): apic id: 10, version: 0x000f0011, at 0xfec02000 Preloaded elf kernel "kernel" at 0xc0339000. Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 13 entries at 0xc00fdef0 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard IOAPIC #2 intpin 13 -> irq 2 IOAPIC #2 intpin 14 -> irq 16 IOAPIC #2 intpin 15 -> irq 17 pci0: on pcib0 pci0: at 10.0 irq 2 fxp0: port 0x2400-0x243f mem 0xf8000000-0xf801ffff,0xf8041000-0xf8041fff irq 16 at device 11.0 on pci0 fxp0: Ethernet address 00:e0:81:23:cb:1a inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp1: port 0x2440-0x247f mem 0xf8020000-0xf803ffff,0xf8042000-0xf8042fff irq 17 at device 12.0 on pci0 fxp1: Ethernet address 00:e0:81:23:cb:1b inphy1: on miibus1 inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto atapci0: port 0x2480-0x248f,0x374-0x377,0x170-0x177,0x3f4-0x3f7,0x1f0-0x1f7 at device 15.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pci0: at 15.2 irq 5 isab0: at device 15.3 on pci0 isa0: on isab0 pcib1: on motherboard pci1: on pcib1 pcib2: on motherboard pci2: on pcib2 pcib3: on motherboard pci3: on pcib3 pcib4: on motherboard pci4: on pcib4 pcib5: on motherboard pci5: on pcib5 pcib6: on motherboard pci6: on pcib6 pcib7: on motherboard IOAPIC #2 intpin 3 -> irq 18 IOAPIC #2 intpin 4 -> irq 19 pci7: on pcib7 pci7: (vendor=0x9005, dev=0x00cf) at 9.0 irq 18 pci7: (vendor=0x9005, dev=0x00cf) at 9.1 irq 19 pcib8: on motherboard pci8: on pcib8 orm0: