From owner-freebsd-hackers Sun Jan 16 3:34:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from lesbains.informatik.uni-tuebingen.de (lesbains.Informatik.Uni-Tuebingen.De [134.2.12.5]) by hub.freebsd.org (Postfix) with ESMTP id 6400914EB6 for ; Sun, 16 Jan 2000 03:34:29 -0800 (PST) (envelope-from sperber@informatik.uni-tuebingen.de) Received: from informatik.uni-tuebingen.de (brabantio [134.2.12.25]) by lesbains.informatik.uni-tuebingen.de (Postfix) with ESMTP id 4268943A for ; Sun, 16 Jan 2000 12:34:26 +0100 (NFT) Received: (from sperber@localhost) by informatik.uni-tuebingen.de (AIX4.3/UCB 8.8.8/8.8.8) id MAA31726; Sun, 16 Jan 2000 12:34:25 +0100 To: freebsd-hackers@freebsd.org Subject: Major number for PCDMX driver? From: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) Date: 16 Jan 2000 12:34:24 +0100 Message-ID: Lines: 16 User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.2 (Millenium) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I've written a driver for SoundLight's PCDMX DMX512 boards. (DMX512 is a serial protocol used for driving theater and show lighting systems.) I plan to make it available via SoundLight's web site. The potential user base for this is not large enough to warrant inclusion into the kernel (it's a kld), but having a reserved major device number for it would maybe be nice. I don't know the exact policy for this, so I'd appreciate if someone could tell me. I'm not on freebsd-hackers, so please Cc me on anything that develops. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 5:33:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yyy.or.jp (mail.yyy.or.jp [202.214.252.21]) by hub.freebsd.org (Postfix) with SMTP id EFB3F14CA9 for ; Sun, 16 Jan 2000 05:33:31 -0800 (PST) (envelope-from hnokubi@yyy.or.jp) Received: (qmail 25250 invoked from network); 16 Jan 2000 22:33:17 +0900 Received: from urayasu106.interwave.or.jp (HELO ppp-client.yyy.or.jp) (210.138.157.142) by mail.yyy.or.jp with SMTP; 16 Jan 2000 22:33:17 +0900 Received: from sassaby.nokubi.or.jp (sassaby [192.168.9.3]) by ppp-client.yyy.or.jp (8.9.1/3.5Wpl7-ppp) with ESMTP id BAA10960; Sun, 16 Jan 2000 01:01:37 +0900 (JST) Received: from sassaby.nokubi.or.jp (localhost.nokubi.or.jp [127.0.0.1]) by sassaby.nokubi.or.jp (8.9.3/3.5Wpl7-glove) with ESMTP id BAA00544; Sun, 16 Jan 2000 01:01:01 +0900 (JST) To: Warner Losh Cc: NOKUBI Hirotaka , hackers@FreeBSD.ORG Subject: Re: Dell PowerEdge 2400 & RCC PCI chipset? In-reply-to: Your message of "Thu, 13 Jan 2000 22:58:07 -0700 ." <200001140558.WAA27229@harmony.village.org> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII Date: Sun, 16 Jan 2000 01:01:00 +0900 From: NOKUBI Hirotaka Message-Id: <20000116133331.EFB3F14CA9@hub.freebsd.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200001140558.WAA27229@harmony.village.org>, Warner Losh writes: >: My NEC PC98 (using x86 CPU, but not PC-AT compatible) uses >: RCC Champion as it's chipset. (Sorry not Champion II/III, it's slightly >: old machine.) I'll attach dmesg from it. >: >: RCC Champion is attached like this. >: > pcib0: on motherboard >: >: FreeBSD-3.2 (I'm not sure, 3.1?) was running fine too. > >Which version is busted? I might have broken it in my hacking on >pccard if this is in -current. From Jul-1999 to Dec-1999, 4.0-current had a problem in i386/isa/pcibus.c. It does not have any relations with pccard, don't worry. I've sent PR (kern/15278) and it's committed on 1999/12/5. Problem is solved now. RELENG_3 branch does not have any problem to use with RCC Champion-1.0, I beleive. ---- NOKUBI Hirotaka Fingerprint20 = DEBC 0793 7CD6 92F1 0A1F A792 9E2F EEEE A41B 171D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 6:41:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from racine.cybercable.fr (racine.cybercable.fr [212.198.0.201]) by hub.freebsd.org (Postfix) with SMTP id DC52014A14 for ; Sun, 16 Jan 2000 06:41:15 -0800 (PST) (envelope-from herbelot@cybercable.fr) Received: (qmail 6850165 invoked from network); 16 Jan 2000 14:46:28 -0000 Received: from d016.paris-30.cybercable.fr (HELO cybercable.fr) ([212.198.30.16]) (envelope-sender ) by racine.cybercable.fr (qmail-ldap-1.03) with SMTP for ; 16 Jan 2000 14:46:28 -0000 Message-ID: <3881D8CE.8C1B5A33@cybercable.fr> Date: Sun, 16 Jan 2000 15:42:22 +0100 From: Thierry Herbelot X-Mailer: Mozilla 4.5 [en] (X11; U; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Subject: Anyone working on a DOMEX scsi driver ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, I've just bought a Mustek SCSI scanner, and it is bundled with a seemingly very simple SCSI controller built by a DOMEX company (from Taiwan) Does someone know where there could be some info ? (perhaps a driver under Linux ?) TfH PS : the board identifier is DMX3191D - the chip itself seems to be a Domex536 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 8: 7:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by hub.freebsd.org (Postfix) with ESMTP id 6ECD514DD7 for ; Sun, 16 Jan 2000 08:07:21 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 129sD0-000DTI-0V; Sun, 16 Jan 2000 16:07:19 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id QAA00654; Sun, 16 Jan 2000 16:07:27 GMT (envelope-from dfr@nlsystems.com) Date: Sun, 16 Jan 2000 16:06:25 +0000 (GMT) From: Doug Rabson To: Michael Kennett Cc: hackers@freebsd.org Subject: Re: Use of newbus in sys/pci/pci.c In-Reply-To: <200001150332.LAA24167@laurasia.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 15 Jan 2000, Michael Kennett wrote: > Hello All, > > I have a question on the sys/pci/pci.c code, and its use of the > newbus architecture. An example of the code in question is: > > static struct resource * > pci_alloc_resource(device_t dev, device_t child, int type, int *rid, > u_long start, u_long end, u_long count, u_int flags) > { > struct pci_devinfo *dinfo = device_get_ivars(child); > ^^^^^ Looks wrong > struct resource_list *rl = &dinfo->resources; > > return resource_list_alloc(rl, dev, child, type, rid, > start, end, count, flags); > } > > I don't understand the line that extracts the ivars from the child > device. Isn't it the case that the ivars are a property of the bus > device (dev)? In any case, the child device might not be directly > descended from the pci bus (e.g. it could be attached thru' the > bridge isab0: ). The ivars are for bus-specific per-child information. The resource locations for pci devices fall into this category and the information is stored in a pci-private structure in the child device's ivars field. This code is slightly dubious for the case when child isn't a direct descendant of dev (i.e. a grandchild etc). In this case, the ivars pointer would be read but not indirected through since the first thing resource_list_alloc() does is check for this and pass the allocation up the tree. It should be safe but its certainly dubious. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 9:30:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id D4F4314BC2 for ; Sun, 16 Jan 2000 09:30:31 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id KAA58788; Sun, 16 Jan 2000 10:30:30 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id KAA54868; Sun, 16 Jan 2000 10:30:30 -0700 (MST) Message-Id: <200001161730.KAA54868@harmony.village.org> To: NOKUBI Hirotaka Subject: Re: Dell PowerEdge 2400 & RCC PCI chipset? Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Sun, 16 Jan 2000 01:01:00 +0900." <200001161333.GAA66713@schizoid.village.org> References: <200001161333.GAA66713@schizoid.village.org> Date: Sun, 16 Jan 2000 10:30:30 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200001161333.GAA66713@schizoid.village.org> NOKUBI Hirotaka writes: : >From Jul-1999 to Dec-1999, 4.0-current had a problem in i386/isa/pcibus.c. : It does not have any relations with pccard, don't worry. : : I've sent PR (kern/15278) and it's committed on 1999/12/5. : Problem is solved now. Thanks. I just wanted to make sure. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 10:20:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp05.wxs.nl (smtp05.wxs.nl [195.121.6.57]) by hub.freebsd.org (Postfix) with ESMTP id 6C28D14F70; Sun, 16 Jan 2000 10:20:25 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.197.76]) by smtp05.wxs.nl (Netscape Messaging Server 4.05) with ESMTP id FOFXLX01.D76; Sun, 16 Jan 2000 19:20:21 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id TAA02392; Sun, 16 Jan 2000 19:06:13 +0100 (CET) (envelope-from asmodai) Date: Sun, 16 Jan 2000 19:06:12 +0100 From: Jeroen Ruigrok/Asmodai To: "Kenneth D. Merry" Cc: Jonathan Lemon , Andrew Gallatin , hackers@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: Dell PowerEdge 2400 & RCC PCI chipset? Message-ID: <20000116190612.B283@daemon.ninth-circle.org> References: <200001111922.NAA07463@free.pcs> <20000111133123.C409@prism.flugsvamp.com> <20000111124219.A76365@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000111124219.A76365@panzer.kdm.org>; from ken@kdm.org on Tue, Jan 11, 2000 at 12:42:19PM -0700 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ Please strip either smp or hackers on the next replies ] -On [20000112 00:00], Kenneth D. Merry (ken@kdm.org) wrote: > >Anyone have a URL for RCC? I just spend 30 minutes digging. No URL to be find. All tech forums have URL's for all participants, except for RCC (Reliance Computer Corporation). -- Jeroen Ruigrok van der Werven/Asmodai asmodai@[wxs.nl|bart.nl] Documentation nutter. *BSD: Technical excellence at its best... The BSD Programmer's Documentation Project We must all hang together, else we shall all hang separately... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 10:32:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp04.wxs.nl (smtp04.wxs.nl [195.121.6.59]) by hub.freebsd.org (Postfix) with ESMTP id 244F914D71 for ; Sun, 16 Jan 2000 10:32:18 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.197.76]) by smtp04.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA42CA; Sun, 16 Jan 2000 19:31:09 +0100 Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id TAA02423; Sun, 16 Jan 2000 19:31:06 +0100 (CET) (envelope-from asmodai) Date: Sun, 16 Jan 2000 19:31:06 +0100 From: Jeroen Ruigrok/Asmodai To: Joachim Jdckel Cc: "freebsd-hackers@freebsd.org" Subject: Re: How to write a device-driver? Message-ID: <20000116193106.C283@daemon.ninth-circle.org> References: <3877F409.49088485@d.kamp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3877F409.49088485@d.kamp.net>; from Joachim.Jaeckel@d.kamp.net on Sun, Jan 09, 2000 at 03:35:53AM +0100 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000109 04:01], Joachim Jdckel (Joachim.Jaeckel@d.kamp.net) wrote: >Hello. Hi, >This is the first time that I try to do a hardware related programming, >(if I ever will start and finish it...) >I'm currently have no knowledge of that kind of programming, but I'd >like to learn! Welcome to the club. =P >If I'd like to write a device driver for a given card, could you tell >me, where I could read something about it (how to implement the >interface to the kernel, where to place and name the files and so on). I >read something about a device-driver tutorial under >www.freebsd.org/tutorials/ddwg, but it seems, that this page isn't there >anymore. The placement is a bit dependant upon the version of FreeBSD. Also, 4.0 uses a different architecture for drivers, commonly called newbus. Also, the old Device Driver guide has been removed due its obsoletion factor for 3.x and 4.0. I am currently writing the 4.x newbus documentation and trying to get a new DDWG up. Not an easy task, especially when one has to learn a lot himself still. You could best look at /usr/src/sys, since that's where all kernel related code goes. >And maybe you could give me a tip, whats the best point to start, a >linux-device-driver, something like a specification of the different >chips on the card (it seems, that there is no documentation of the card >from the manufacturer), or could I listen on the data, which is posted >between the system and the driver under windows? whatever... Linux drivers are fun as reference (not), mainly due to their weird use of jiffies(), inb() and outb() and the like. Most of the time the driver writers nag as long as possible at the vendor's door until we get documentation. Some of us are particulary hesitant about accepting NDA's. The best thing to do is take the card and write/type all the part numbers on the chips on a piece of paper/temporary file. And then you can go search for the datasheets of those parts at their respective vendor. Some datasheets are not needed, others are very much the essence. Sometimes Windows drivers' .inf files come in handy for some id's abut the vendor and the card. How about letting loose a little bit more info on this card? =) -- Jeroen Ruigrok van der Werven/Asmodai asmodai@[wxs.nl|bart.nl] Documentation nutter. *BSD: Technical excellence at its best... The BSD Programmer's Documentation Project We must all hang together, else we shall all hang separately... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 12:11:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id BC33E14DCB for ; Sun, 16 Jan 2000 12:11:16 -0800 (PST) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (monica.cs.rpi.edu [128.213.7.2]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id PAA50168; Sun, 16 Jan 2000 15:11:14 -0500 (EST) Message-Id: <200001162011.PAA50168@cs.rpi.edu> To: freebsd-hackers@freebsd.org Cc: crossd@cs.rpi.edu Subject: PANIC in 3.4-STABLE Date: Sun, 16 Jan 2000 15:11:14 -0500 From: "David E. Cross" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have found a reproduceable panic in recent 3.4-STABLE images (past couple of weeks). I am not sure how to reproduce it thought ;) The panic occurs in the tty code it would appear. It is often preceded by strange TTY behavior (strange characters suddenly appearing in the output, a randomly closed connection, etc). The panic message is: > Panic: clist reservation botch > mp_lock = 00000001; cpuid = 1; > lapic.id = 01000000 > boot() called on cpu#0 As you can see, I am running SMP. I also am extensively using vinum (everything except for / is running off of multiple vinum stripes). The other custom setup on this box is that I have no atkdb* in my kernel, everything is through USB (flags 0x100 to device sc0). The machine also has 256MB of ECC RAM. >WILD GUESS FOLLOWS< I was reading through the various device drivers and TTY code, and I noticed that much in tty_subr.c needs to be called at spltty(). In the atkbd drive this is taken care of automagically since it is declared as "tty" in the config file. This is *not* done in the case of 'device ukbd0'. Furthermore within the keyboard driver itself 'spltty()' is never called, only 'splusb()' (<-- this may be enough?). I am thinking about adding some assert statements to the TTY code (or perhaps just a printf()). and see what that turns up, but I do not know how to get the current spl(). This is not an easy bug to reproduce... In fact I cannot say 'do x, y, and z to cause this panic.' Yet it happens often enough to be consistent, part of the reason I suspect a race condition. Note that when the panic happens it will not dump to a dumpdev, also 'control-alt-esc' with a USB keyboard seems to not work right, the one time I tried I was unable to do anything. I seem to be able to get more panics/day by using my serial port at 115200, heavily use the console, and be in X. Any thoughts? -- David Cross | email: crossd@cs.rpi.edu Acting Lab Director | NYSLP: FREEBSD Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 12:53:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from calvin.saturn-tech.com (calvin.saturn-tech.com [207.229.19.6]) by hub.freebsd.org (Postfix) with ESMTP id 928A914DCB for ; Sun, 16 Jan 2000 12:53:09 -0800 (PST) (envelope-from drussell@saturn-tech.com) Received: from localhost (drussell@localhost) by calvin.saturn-tech.com (8.8.8/8.8.8) with SMTP id NAA25488; Sun, 16 Jan 2000 13:52:40 -0700 (MST) (envelope-from drussell@saturn-tech.com) Date: Sun, 16 Jan 2000 13:52:40 -0700 (MST) From: Doug Russell To: "Michael Sperber [Mr. Preprocessor]" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Major number for PCDMX driver? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 16 Jan 2000, Michael Sperber [Mr. Preprocessor] wrote: > > Hi, > > I've written a driver for SoundLight's PCDMX DMX512 boards. (DMX512 WooHoo! :) I was hoping someone would get a DMX512 controller working before I had to break down and do it myself. :) I've never seen a SoundLight board. PCI? Reasonably priced? I actually thought I'd build my own board, but if they are reasonable, this sounds like a great solution. I have several lighting effects that I use while D.J.ing, and I've been starting to use a (well shock mounted in a rack) computer full of MP3s for much of my music play, and I want to be able to coreograph (sp?) the lighting effects beforehand, time-linked to the song. > is a serial protocol used for driving theater and show lighting > systems.) I plan to make it available via SoundLight's web site. How much documentation do you have on the DMX512 protocol and the various extensions used by many manufacturers? IIRC, you can buy a copy of the spec book, but I can't remember from where. I'd have to go searching. All I have is basic refrence for some of the units I have (Genie Nimbus-2) and some High End / Lightwave Research units I've used before (Emulator and Intellibeam) including their extended DMX512 stuff for better dimming control, etc. I still don't have enough info, however, to PROPERLY convert all of my old home built controllers to DMX512. Right now they run off a home-made I/O card with a centronics 36 pin on the back panel of the computer which goes to a controller of 74-series logic that is essentially some address logic and latches to hold the data for each channel's brightness, etc. It's then just countdown 8-bit counters reset by a 120 Hz pulse synchronised from the AC line. The counters trigger a TRIAC when they reach 0. This way I get a nice proportional brightness from off to full, depending on where during the sine cycle the TRIAC starts conducting current. Quite slick, actually, for something we built back in first year of high school. :) Still works! > The potential user base for this is not large enough to warrant > inclusion into the kernel (it's a kld), but having a reserved major > device number for it would maybe be nice. I don't know the exact > policy for this, so I'd appreciate if someone could tell me. I'm not > on freebsd-hackers, so please Cc me on anything that develops. I think there's something in the FAQ. At least there used to be. Later...... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 13: 2:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from calvin.saturn-tech.com (calvin.saturn-tech.com [207.229.19.6]) by hub.freebsd.org (Postfix) with ESMTP id 26F7814A14 for ; Sun, 16 Jan 2000 13:02:27 -0800 (PST) (envelope-from drussell@saturn-tech.com) Received: from localhost (drussell@localhost) by calvin.saturn-tech.com (8.8.8/8.8.8) with SMTP id OAA26614; Sun, 16 Jan 2000 14:01:53 -0700 (MST) (envelope-from drussell@saturn-tech.com) Date: Sun, 16 Jan 2000 14:01:53 -0700 (MST) From: Doug Russell To: Thierry Herbelot Cc: hackers@FreeBSD.ORG Subject: Re: Anyone working on a DOMEX scsi driver ? In-Reply-To: <3881D8CE.8C1B5A33@cybercable.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 16 Jan 2000, Thierry Herbelot wrote: > I've just bought a Mustek SCSI scanner, and it is bundled with a > seemingly very simple SCSI controller built by a DOMEX company (from > Taiwan) Throw it away. Throw it as far as you can, then drive over it with you car. :) > Does someone know where there could be some info ? (perhaps a driver > under Linux ?) > PS : the board identifier is DMX3191D - the chip itself seems to be a > Domex536 Great scanners (I have 3 1200LSes at various locations), but the SCSI card is useless. It doesn't even support IRQs, so it operates in polled mode. This means your CPU is 100% busy while scanning. There IS a driver for Linux, but the card is still terrible. Solution: Buy an NCR810 based card for $30, and find a 50 pin miniSCSI-miniSCSI cable instead of the 25 pin, and don't look back. :) According to the SANE port (Scanner Access Now Easy) documentation, some Mustek scanners do not support disconnect/reconect, so you almost have to have them on their own SCSI bus. The 1200LSes I have all support disconnect/reconnect, and the one in my den also has a CD-R and CD-ROM on the same SCSI chain, so you don't need that silly single target card. Later...... P.S. I have 3 of these cards if anyone wants one. :) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 13:42:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by hub.freebsd.org (Postfix) with ESMTP id D079E14E46 for ; Sun, 16 Jan 2000 13:42:53 -0800 (PST) (envelope-from aron@cs.rice.edu) Received: (from aron@localhost) by cs.rice.edu (8.9.0/8.9.0) id PAA24290; Sun, 16 Jan 2000 15:42:41 -0600 (CST) From: Mohit Aron Message-Id: <200001162142.PAA24290@cs.rice.edu> Subject: Re: question regarding FreeBSD memory mgmt To: chris@calldei.com Date: Sun, 16 Jan 2000 15:42:39 -0600 (CST) Cc: freebsd-hackers@freebsd.org In-Reply-To: <20000115002134.A43216@holly.calldei.com> from "Chris Costello" at Jan 15, 2000 12:21:34 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, thanks for telling me about this. I don't care if it isn't there in 2.2.6, I managed to figure the code out in 3.x and add the appropriate code to 2.2.6 to do just what I wanted. - Mohit > STABLE (3.x) has a memcontrol(8) program that can do just that. > I don't know off hand whether it can be ported back to 2.2.6, but > it's worth a try. > > > From the memcontrol(8) man page: > > set Set memory range attributes. > > -b base > Memory range base address > > -l length > Length of memory range in bytes, power of 2 > > -o owner > Text identifier for this setting (7 char max) > > attribute > Attributes applied to this range; one of uncacheable, > write-combine, write-through, write-back, write-protect > > -- > |Chris Costello > |Programmer: One who is too lacking in people skills > | to be a software engineer. > `--------------------------------------------------- > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 16:23:53 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from vorbis.noc.easynet.net (vorbis.noc.easynet.net [195.40.1.254]) by hub.freebsd.org (Postfix) with SMTP id BDB2E14EEE for ; Sun, 16 Jan 2000 16:23:50 -0800 (PST) (envelope-from chrisy@vorbis.noc.easynet.net) Received: (qmail 97072 invoked by uid 1943); 17 Jan 2000 00:22:01 -0000 Date: Mon, 17 Jan 2000 00:22:01 +0000 From: Chrisy Luke To: freebsd-hackers@freebsd.org Subject: ypldap Message-ID: <20000117002201.B95473@flix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i Organization: The Flirble Internet Exchange X-URL: http://www.flix.net/ X-FTP: ftp://ftp.flirble.org/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Any interest in a hack of ypserv that effectively gateways master.passwd, passwd and (shortly, anyway) group maps to an LDAP DB? If so, I'll make it available. Very configurable. :-) Got it working a few hours ago. Need's tidying up, but otherwise seemingly sound. It's essentially a drop in replacement for ypserv in that it will query maps on disc should LDAP not have the goods. Side effect: A map needs to exist on disc got the access control stuff to let a query through, but that's no big deal. Disclaimer: First time I've seriously played with YP or LDAP. :-) I only did it because I couldn't find an alternative apart from ones beyond my zero-budget. :-) Regards, Chris. -- == chris@easynet.net, chrisy@flirble.org. +44 20 7900 4444 == Systems Manager for Easynet, a part of Easynet Group PLC. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 16:28:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id EFCFF1508B for ; Sun, 16 Jan 2000 16:28:52 -0800 (PST) (envelope-from mjacob@feral.com) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.9.3/8.9.3) with ESMTP id QAA24637; Sun, 16 Jan 2000 16:28:31 -0800 Date: Sun, 16 Jan 2000 16:28:31 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Chrisy Luke Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: ypldap In-Reply-To: <20000117002201.B95473@flix.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yes- this would be a cool thing. On Mon, 17 Jan 2000, Chrisy Luke wrote: > Any interest in a hack of ypserv that effectively gateways > master.passwd, passwd and (shortly, anyway) group maps to > an LDAP DB? If so, I'll make it available. > > Very configurable. :-) Got it working a few hours ago. Need's > tidying up, but otherwise seemingly sound. It's essentially > a drop in replacement for ypserv in that it will query maps on disc > should LDAP not have the goods. Side effect: A map needs to exist > on disc got the access control stuff to let a query through, but > that's no big deal. > > Disclaimer: First time I've seriously played with YP or LDAP. :-) > I only did it because I couldn't find an alternative apart from > ones beyond my zero-budget. :-) > > Regards, > Chris. > -- > == chris@easynet.net, chrisy@flirble.org. +44 20 7900 4444 > == Systems Manager for Easynet, a part of Easynet Group PLC. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 16:56:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 753BF1518B for ; Sun, 16 Jan 2000 16:56:34 -0800 (PST) (envelope-from mjacob@feral.com) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.9.3/8.9.3) with ESMTP id QAA24686; Sun, 16 Jan 2000 16:56:29 -0800 Date: Sun, 16 Jan 2000 16:56:29 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Chris Dillon Cc: hackers@FreeBSD.ORG Subject: Re: looking for victims, err, uh, 'volunteers' In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I've got a Compaq Proliant 3000 with three drives in a hot-plug > chassis that I was told by someone else a while back (you?) speak > SAF-TE. Unfortunately, I'm running -STABLE on that box. If this > would happen to work with -STABLE, If all goes well, I'll do a MFC next week or so. > I just _happen_ to have a disk that > is giving me fits (medium errors resulting in unrecoverable read > errors) and am about to go in tomorrow to swap it with another disk. > Since the disk wasn't really doing anything too terribly important > (holding one-third of my Squid cache, /usr/obj, and a copy of the > FreeBSD CVS repository), I can hold off replacing it for a while if it > needs to be used as a test subject. This would not likely be seen as an Environmental Services issue- this is already being reported via the SCSI Direct Access (da) driver. In fact, one of the big lacks of SES/SAF-TE is the difficulty in correlating errors from entities within a box and errors reported by the box. SES/SAF-TE is more for disk boxes, etc.. For example, on quarm I have a Sun A5000 on a fibre channel loop: quarm.feral.com > root camcontrol devlist at scbus0 target 5 lun 0 (pass0,sa0) at scbus1 target 64 lun 0 (pass1,da0) at scbus1 target 65 lun 0 (pass2,da1) at scbus1 target 77 lun 0 (ses0,pass3) at scbus1 target 80 lun 0 (pass4,da2) at scbus1 target 81 lun 0 (pass5,da3) at scbus1 target 82 lun 0 (pass6,da4) at scbus1 target 83 lun 0 (pass7,da5) at scbus1 target 84 lun 0 (pass8,da6) at scbus1 target 85 lun 0 (pass9,da7) at scbus1 target 86 lun 0 (pass10,da8) at scbus1 target 93 lun 0 (ses1,pass11) quarm.feral.com > root getnobj /dev/ses0 /dev/ses0: 45 objects quarm.feral.com > root getencstat -v /dev/ses0 /dev/ses0: Enclosure Status Device Element(0): OK (Status=ok (bytes=0x01 0x40 0x00 0x05)) Device Element(1): OK (Status=ok (bytes=0x01 0x41 0x00 0x05)) Device Element(2): Status=not installed (bytes=0x05 0x42 0x00 0x00) Device Element(3): Status=not installed (bytes=0x05 0x43 0x00 0x00) Device Element(4): Status=not installed (bytes=0x05 0x44 0x00 0x00) Device Element(5): Status=not installed (bytes=0x05 0x45 0x00 0x00) Device Element(6): Status=not installed (bytes=0x05 0x46 0x00 0x00) Device Element(7): OK (Status=ok (bytes=0x01 0x50 0x00 0x05)) Device Element(8): OK (Status=ok (bytes=0x01 0x51 0x00 0x05)) Device Element(9): OK (Status=ok (bytes=0x01 0x52 0x00 0x05)) Device Element(a): OK (Status=ok (bytes=0x01 0x53 0x00 0x05)) Device Element(b): OK (Status=ok (bytes=0x01 0x54 0x00 0x05)) Device Element(c): OK (Status=ok (bytes=0x01 0x55 0x00 0x05)) Device Element(d): OK (Status=ok (bytes=0x01 0x56 0x00 0x05)) Power supply Element(e): OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Power supply Element(f): OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Power supply Element(10): Status=not installed (bytes=0x05 0x00 0x00 0x00) Cooling element Element(11): OK (Status=ok (bytes=0x01 0x00 0x00 0x07)) Cooling element Element(12): OK (Status=ok (bytes=0x01 0x00 0x00 0x07)) Element(13): OK (Status=ok (bytes=0x01 0x00 0x01 0x00)) Element(14): Status=not installed (bytes=0x05 0x00 0x00 0x00) SCSI port/transceiver Element(15): Status=not installed (bytes=0x05 0x00 0x00 0x00) SCSI port/transceiver Element(16): OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) SCSI port/transceiver Element(17): Status=not installed (bytes=0x05 0x00 0x00 0x00) SCSI port/transceiver Element(18): Status=not installed (bytes=0x05 0x00 0x00 0x00) Element(19): OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element(1a): OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Temperature sensors Element(1b): OK (Status=ok (bytes=0x01 0x00 0x39 0x00)) Temperature sensors Element(1c): OK (Status=ok (bytes=0x01 0x00 0x39 0x00)) Temperature sensors Element(1d): OK (Status=ok (bytes=0x01 0x00 0x36 0x00)) Temperature sensors Element(1e): OK (Status=ok (bytes=0x01 0x00 0x36 0x00)) Temperature sensors Element(1f): OK (Status=ok (bytes=0x01 0x00 0x36 0x00)) Temperature sensors Element(20): OK (Status=ok (bytes=0x01 0x00 0x36 0x00)) Temperature sensors Element(21): OK (Status=ok (bytes=0x01 0x00 0x36 0x00)) Temperature sensors Element(22): OK (Status=ok (bytes=0x01 0x00 0x3b 0x00)) Temperature sensors Element(23): OK (Status=ok (bytes=0x01 0x00 0x3b 0x00)) Temperature sensors Element(24): OK (Status=ok (bytes=0x01 0x00 0x3b 0x00)) Temperature sensors Element(25): OK (Status=ok (bytes=0x01 0x00 0x39 0x00)) Temperature sensors Element(26): OK (Status=ok (bytes=0x01 0x00 0x3b 0x00)) Temperature sensors Element(27): OK (Status=ok (bytes=0x01 0x00 0x39 0x00)) Temperature sensors Element(28): OK (Status=ok (bytes=0x01 0x00 0x3c 0x00)) Element(29): OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element(2a): OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element(2b): Status=not installed (bytes=0x05 0x00 0x00 0x00) Language Element(2c): OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 17:35:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from blaubaer.kn-bremen.de (blaubaer.kn-bremen.de [195.37.179.254]) by hub.freebsd.org (Postfix) with ESMTP id 6713515162 for ; Sun, 16 Jan 2000 17:35:17 -0800 (PST) (envelope-from nox@saturn.kn-bremen.de) Received: from saturn.kn-bremen.de (uucp@localhost) by blaubaer.kn-bremen.de (8.9.1/8.9.1) with UUCP id CAA19197; Mon, 17 Jan 2000 02:31:05 +0100 Received: (from nox@localhost) by saturn.kn-bremen.de (8.9.3/8.8.5) id BAA12210; Mon, 17 Jan 2000 01:56:43 +0100 (CET) Date: Mon, 17 Jan 2000 01:56:43 +0100 (CET) From: Juergen Lock Message-Id: <200001170056.BAA12210@saturn.kn-bremen.de> To: asmodai@wxs.nl Subject: Re: How to write a device-driver? X-Newsgroups: local.list.freebsd.hackers In-Reply-To: <20000116193106.C283@daemon.ninth-circle.org> References: <3877F409.49088485@d.kamp.net> Organization: home Cc: Joachim Jdckel , "freebsd-hackers@freebsd.org" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <20000116193106.C283@daemon.ninth-circle.org> you write: >-On [20000109 04:01], Joachim Jdckel (Joachim.Jaeckel@d.kamp.net) wrote: >>And maybe you could give me a tip, whats the best point to start, a >>linux-device-driver, something like a specification of the different >>chips on the card (it seems, that there is no documentation of the card >>from the manufacturer), or could I listen on the data, which is posted >>between the system and the driver under windows? whatever... > >Linux drivers are fun as reference (not), mainly due to their weird use >of jiffies(), inb() and outb() and the like. > Right, but they do show how to talk to the hardware, at least if you know they really work and not just `coincidentally'... >Most of the time the driver writers nag as long as possible at the >vendor's door until we get documentation. Some of us are particulary >hesitant about accepting NDA's. > >The best thing to do is take the card and write/type all the part >numbers on the chips on a piece of paper/temporary file. And then you >can go search for the datasheets of those parts at their respective >vendor. Some datasheets are not needed, others are very much the >essence. > >Sometimes Windows drivers' .inf files come in handy for some id's abut >the vendor and the card. And if you don't have working linux sources and you're truly desperate (or just curious), go to the wintendo box (or boot DOS, unfortunately doscmd doesn't seem to be compatible enough but the free OpenDOS at least works), load its driver into IDA and look at what it does. (i don't have a link right now but just do an archie search for ida37fw.zip, or use http://ftpsearch.lycos.com) You can also use it to only make a listing but often you have to at least tell it about parts that are code for which it didn't find obvious references to. still i haven't yet seen anything else that comes even close. Note: I seem to remember there are people who want to make disassembling illegal... I don't know what went of it and IANAL (of course its a _silly_ idea), but i also remember there were exceptions if its for the cause of interoperability, and writing a driver for another OS sure would at least seem to fall under that. ATB, -- Juergen Lock (remove dot foo from address to reply) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 17:38:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 7447015031 for ; Sun, 16 Jan 2000 17:38:10 -0800 (PST) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (monica.cs.rpi.edu [128.213.7.2]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id UAA55476; Sun, 16 Jan 2000 20:37:57 -0500 (EST) Message-Id: <200001170137.UAA55476@cs.rpi.edu> To: Chrisy Luke Cc: freebsd-hackers@FreeBSD.ORG, crossd@cs.rpi.edu Subject: Re: ypldap In-Reply-To: Message from Chrisy Luke of "Mon, 17 Jan 2000 00:22:01 GMT." <20000117002201.B95473@flix.net> Date: Sun, 16 Jan 2000 20:37:56 -0500 From: "David E. Cross" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I for one am very interested in this technology. -- David Cross | email: crossd@cs.rpi.edu Acting Lab Director | NYSLP: FREEBSD Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 17:47: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.wolves.k12.mo.us (mail.wolves.k12.mo.us [207.160.214.1]) by hub.freebsd.org (Postfix) with ESMTP id EEF6115118 for ; Sun, 16 Jan 2000 17:47:05 -0800 (PST) (envelope-from cdillon@wolves.k12.mo.us) Received: from mail.wolves.k12.mo.us (cdillon@mail.wolves.k12.mo.us [207.160.214.1]) by mail.wolves.k12.mo.us (8.9.3/8.9.3) with ESMTP id TAA63078; Sun, 16 Jan 2000 19:47:02 -0600 (CST) (envelope-from cdillon@wolves.k12.mo.us) Date: Sun, 16 Jan 2000 19:47:02 -0600 (CST) From: Chris Dillon To: Matthew Jacob Cc: hackers@FreeBSD.ORG Subject: Re: looking for victims, err, uh, 'volunteers' In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 16 Jan 2000, Matthew Jacob wrote: > > > > > I've got a Compaq Proliant 3000 with three drives in a hot-plug > > chassis that I was told by someone else a while back (you?) speak > > SAF-TE. Unfortunately, I'm running -STABLE on that box. If this > > would happen to work with -STABLE, > > If all goes well, I'll do a MFC next week or so. OK. I'll go ahead and replace the disk for now. > > I just _happen_ to have a disk that > > is giving me fits (medium errors resulting in unrecoverable read > > errors) and am about to go in tomorrow to swap it with another disk. > > Since the disk wasn't really doing anything too terribly important > > (holding one-third of my Squid cache, /usr/obj, and a copy of the > > FreeBSD CVS repository), I can hold off replacing it for a while if it > > needs to be used as a test subject. > > > This would not likely be seen as an Environmental Services issue- this is > already being reported via the SCSI Direct Access (da) driver. In fact, one of > the big lacks of SES/SAF-TE is the difficulty in correlating errors from > entities within a box and errors reported by the box. > > SES/SAF-TE is more for disk boxes, etc.. For example, on quarm I have a Sun > A5000 on a fibre channel loop: Hmm... I guess I was confusing this with the S.M.A.R.T. stuff that is supposed to give you a kind of pre-emptive warning that bad things are going to happen (or have happened, rather... i.e. the drive starts reallocating a bunch of blocks or senses some other kind of internal problem). Will what you've done at least allow the nifty "I'm OK" LED to light up on the hot-swap disk tray like it does on the NT boxen? *duck* :-) On a similar note, I guess, how exactly _would_ you query a drive about its SMART status in FreeBSD? It would be neat to have the status LEDs on the drive trays reflect the health of the drive. If I read your description of the SAF-TE/SES stuff right, that is what would be used to twiddle the LED off/on. -- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net FreeBSD: The fastest and most stable server OS on the planet. For Intel x86 and Alpha architectures. ( http://www.freebsd.org ) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 17:56:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 641D7151C9 for ; Sun, 16 Jan 2000 17:56:45 -0800 (PST) (envelope-from mjacob@feral.com) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.9.3/8.9.3) with ESMTP id RAA24840; Sun, 16 Jan 2000 17:56:41 -0800 Date: Sun, 16 Jan 2000 17:56:41 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Chris Dillon Cc: hackers@FreeBSD.ORG Subject: Re: looking for victims, err, uh, 'volunteers' In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hmm... I guess I was confusing this with the S.M.A.R.T. stuff that is > supposed to give you a kind of pre-emptive warning that bad things are > going to happen (or have happened, rather... i.e. the drive starts > reallocating a bunch of blocks or senses some other kind of internal > problem). You should be able to get that via camcontrol right now for SCSI disks. If not, bug Ken. > Will what you've done at least allow the nifty "I'm OK" LED > to light up on the hot-swap disk tray like it does on the NT boxen? > *duck* :-) Well, following the lead of Unix as it has been, I've provided the tools- at least for SES/SAF-TE to do this. Because there's SMART and DTMF and LM78 and i4b busses all over the map, I haven't tackled the task of trying to unify this- nor should I in all probability- it's not my strength. But I waited basically a year for NetBSD/FreeBSD folks to move on this, so rather than waiting any longer I put in what I have 'coz *I* can use it. > > On a similar note, I guess, how exactly _would_ you query a drive > about its SMART status in FreeBSD? It would be neat to have the > status LEDs on the drive trays reflect the health of the drive. If I > read your description of the SAF-TE/SES stuff right, that is what > would be used to twiddle the LED off/on. Yes. There are several ways this can work, but the basic notion here is that the SES driver is a passive agent whose job it is to package stuff inbound and outbound. You have to have a user agent that monitors, periodically, for events. I did not, nor do I believe it's wise, make the SES driver do it's own polling. The user agent can notice events, and possibly respond to them (e.g., enabling an alarm if a power supply is detected bad). It's also possible that the agent can do correlative disk logging and set an enclosure's slot LED appropriately for a disk that has gone bad. This is a very hard problem to do without a lot of help from config files because physical topology is not incomplete. -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 20: 3:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.mrf.mail.rcn.net (smtp01.mrf.mail.rcn.net [207.172.4.60]) by hub.freebsd.org (Postfix) with ESMTP id 760C514C1A for ; Sun, 16 Jan 2000 20:03:08 -0800 (PST) (envelope-from archer@lucky.net) Received: from 207-172-201-138.s11.as3.xnb.nj.dialup.rcn.com ([207.172.201.138] helo=unknown.nowhere.org) by smtp01.mrf.mail.rcn.net with esmtp (Exim 2.12 #3) id 12A3Ng-0005vK-00 for hackers@freebsd.org; Sun, 16 Jan 2000 23:03:04 -0500 Received: (from archer@localhost) by unknown.nowhere.org (8.9.3/8.9.3) id WAA84927 for hackers@freebsd.org; Sun, 16 Jan 2000 22:50:49 -0500 (EST) (envelope-from archer) Date: Sun, 16 Jan 2000 22:50:45 -0500 From: Alexander Litvin To: hackers@freebsd.org Subject: Preemptiveness of FreeBSD threads Message-ID: <20000116225044.C601@unknown.nowhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, everybody! First, I must say that this all concernes quite current CURRENT (Jan 9 or so). I don't know if the same holds for older versions. I'm kind of puzzled. I've a simple sample program (see at the bottom). It creates 10 threads with start function start_my_thread(), and then runs the same function in main(). So, we have 11 threads doing the same job. Function start_my_thread() just increments indefinitely counters (each thread has its own counter). Program, when killed with SIGINT, prints all counters and exits. Now, as I understand, userspace threads in FreeBSD are preemptive. So, though my 11 threads are all computational and do not do any syscalls, sleeps, sched_yield, whatever -- newertheless, the program should not be stuck in one thread. And it seems to be sometimes true. But only sometimes! Depending on the phase of the moon (it seems) sometimes my program gives (after ^C): ^C Thread 0x00: 0 Thread 0x01: 0 Thread 0x02: 0 Thread 0x03: 0 Thread 0x04: 0 Thread 0x05: 0 Thread 0x06: 0 Thread 0x07: 0 Thread 0x08: 0 Thread 0x09: 0 Thread 0x0a: 488133092 Which means that the main thread takes all the time. In the same time 'ps -o command,sigcatch,nsignals,sig' gives: COMMAND CAUGHT NSIGS PENDING ./a.out 14080002 358 0 I suppose that means that the program has a handler for SIGPROF installed (which I know is used to preempt threads). And the number of delivered signals steadily goes up (which I suppose means that SIGPROF's are actually delivered to program -- or else where does that number of signals come from?). Again, depending on the phase of the moon, sometimes program gives quite normal result (from my point of view): ^C Thread 0x00: 45894831 Thread 0x01: 42657716 Thread 0x02: 44529528 Thread 0x03: 45732187 Thread 0x04: 41087510 Thread 0x05: 39383485 Thread 0x06: 40748919 Thread 0x07: 39539107 Thread 0x08: 41414655 Thread 0x09: 38647395 Thread 0x0a: 43215354 This result is obtained for approximately the same runtime of the program. The same picture from 'ps'. I'm starting to beleive that the behaviour is dependent on the moon because two types of that behaviour seem to be changing not randomly, but rather go in periods: I can try for half an hour and receive the first, "wrong" result, and then something changes somewhere, and for another hour I get the second, "right" result. Now, is there something obvious, what I don't see? ------------ The sample program goes here: #include #include #include #define THRNUM 10 pthread_t threads[THRNUM]; int counters[THRNUM+1]; void* start_my_thread(void* p) { int thread_num,i; for(i=0;i; Sun, 16 Jan 2000 20:24:11 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id XAA10093; Sun, 16 Jan 2000 23:23:43 -0500 (EST) Date: Sun, 16 Jan 2000 23:23:43 -0500 (EST) From: Daniel Eischen Message-Id: <200001170423.XAA10093@pcnet1.pcnet.com> To: archer@lucky.net, hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alexander Litvin wrote:> First, I must say that this all concernes quite current > CURRENT (Jan 9 or so). I don't know if the same holds for > older versions. > > I'm kind of puzzled. > > I've a simple sample program (see at the bottom). It creates 10 > threads with start function start_my_thread(), and then runs the > same function in main(). So, we have 11 threads doing the same job. > > Function start_my_thread() just increments indefinitely counters > (each thread has its own counter). > > Program, when killed with SIGINT, prints all counters and exits. > > Now, as I understand, userspace threads in FreeBSD are preemptive. > So, though my 11 threads are all computational and do not do > any syscalls, sleeps, sched_yield, whatever -- newertheless, > the program should not be stuck in one thread. And it seems to > be sometimes true. But only sometimes! > > Depending on the phase of the moon (it seems) sometimes my > program gives (after ^C): > > ^C > Thread 0x00: 0 > Thread 0x01: 0 > Thread 0x02: 0 > Thread 0x03: 0 > Thread 0x04: 0 > Thread 0x05: 0 > Thread 0x06: 0 > Thread 0x07: 0 > Thread 0x08: 0 > Thread 0x09: 0 > Thread 0x0a: 488133092 Hmm, I can't get this to occur with your test program. I've tried it several times and the threads seem to be scheduled properly. If you figure out how to repeat this without relying on phases of the moon, I'd be interested in hearing how. Are you running NTP or changing the time? Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 20:29:36 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.nyct.net (bsd4.nyct.net [204.141.86.6]) by hub.freebsd.org (Postfix) with ESMTP id DAC1B14DA3 for ; Sun, 16 Jan 2000 20:29:32 -0800 (PST) (envelope-from mbac@nyct.net) Received: from bsd1.nyct.net (mbac@bsd1.nyct.net [204.141.86.3]) by mail.nyct.net (8.8.8/8.8.7) with ESMTP id XAA16920; Sun, 16 Jan 2000 23:29:31 -0500 (EST) (envelope-from mbac@nyct.net) Received: from localhost (mbac@localhost) by bsd1.nyct.net (8.8.8/8.9.3) with ESMTP id XAA00654; Sun, 16 Jan 2000 23:29:30 -0500 (EST) (envelope-from mbac@nyct.net) X-Authentication-Warning: bsd1.nyct.net: mbac owned process doing -bs Date: Sun, 16 Jan 2000 23:29:30 -0500 (EST) From: Michael Bacarella To: Alexander Litvin Cc: hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads In-Reply-To: <20000116225044.C601@unknown.nowhere.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I'm kind of puzzled. > Program, when killed with SIGINT, prints all counters and exits. > Depending on the phase of the moon (it seems) sometimes my > program gives (after ^C): > This result is obtained for approximately the same runtime of the > program. The same picture from 'ps'. I'm starting to beleive that > the behaviour is dependent on the moon because two types of that > behaviour seem to be changing not randomly, but rather go in periods: > I can try for half an hour and receive the first, "wrong" result, and > then something changes somewhere, and for another hour I get the > second, "right" result. > Now, is there something obvious, what I don't see? > #include > #include > #include > > #define THRNUM 10 > > pthread_t threads[THRNUM]; > int counters[THRNUM+1]; [snip] This is just a wild guess, but the compiler might be optimizing the increment loop. Since you haven't said anything is special about the counters array, it's just going to assume normal circumstances, and in fact, your increment loops probably generate to assembly as cpu register increments. Something abnormal does happen, though, and the compiler has no idea that it can happen, so it never really writes the changes back to the counters array. Hence, the counters array still shows all zeroes. It's really dependant on the phase of the moon (or at least outside of my understanding) when it will flush the values back into the array. Try declaring: int counters[THRNUM+1]; as volatile int counters[THRNUM+1]; -MB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 20:39:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from FreeBSD.ORG (hibou.obs-besancon.fr [193.52.184.7]) by hub.freebsd.org (Postfix) with ESMTP id 3854F14C1A for ; Sun, 16 Jan 2000 20:39:15 -0800 (PST) (envelope-from jmz@FreeBSD.ORG) Received: (from jmz@localhost) by qix.jmz.org (8.9.3/8.9.3) id FAA65391; Mon, 17 Jan 2000 05:38:48 +0100 (MET) (envelope-from jmz@FreeBSD.ORG) Date: Mon, 17 Jan 2000 05:38:48 +0100 (MET) Message-Id: <200001170438.FAA65391@qix.jmz.org> From: Jean-Marc Zucconi To: eischen@vigrid.com Cc: archer@lucky.net, hackers@FreeBSD.ORG In-reply-to: <200001170423.XAA10093@pcnet1.pcnet.com> (message from Daniel Eischen on Sun, 16 Jan 2000 23:23:43 -0500 (EST)) Subject: Re: Preemptiveness of FreeBSD threads X-Mailer: Emacs References: <200001170423.XAA10093@pcnet1.pcnet.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I also have this problem it seems: $ cc a.c -pthread $ a.out ^C Thread 0x00: 0 Thread 0x01: 0 Thread 0x02: 0 Thread 0x03: 0 Thread 0x04: 0 Thread 0x05: 0 Thread 0x06: 0 Thread 0x07: 0 Thread 0x08: 0 Thread 0x09: 0 Thread 0x0a: 162033094 Excepted that the phases of the moon do not play - It's always in Thread 0x0a :-} FreeBSD 4.0-CURRENT #5: Wed Dec 22 05:00:15 MET 1999 (SMP, not running NTP) Jean-Marc >>>>> Daniel Eischen writes: > Alexander Litvin wrote:> First, I must say that this all concernes quite current >> CURRENT (Jan 9 or so). I don't know if the same holds for >> older versions. >> >> I'm kind of puzzled. >> >> I've a simple sample program (see at the bottom). It creates 10 >> threads with start function start_my_thread(), and then runs the >> same function in main(). So, we have 11 threads doing the same job. >> >> Function start_my_thread() just increments indefinitely counters >> (each thread has its own counter). >> >> Program, when killed with SIGINT, prints all counters and exits. >> >> Now, as I understand, userspace threads in FreeBSD are preemptive. >> So, though my 11 threads are all computational and do not do >> any syscalls, sleeps, sched_yield, whatever -- newertheless, >> the program should not be stuck in one thread. And it seems to >> be sometimes true. But only sometimes! >> >> Depending on the phase of the moon (it seems) sometimes my >> program gives (after ^C): >> >> ^C >> Thread 0x00: 0 >> Thread 0x01: 0 >> Thread 0x02: 0 >> Thread 0x03: 0 >> Thread 0x04: 0 >> Thread 0x05: 0 >> Thread 0x06: 0 >> Thread 0x07: 0 >> Thread 0x08: 0 >> Thread 0x09: 0 >> Thread 0x0a: 488133092 > Hmm, I can't get this to occur with your test program. I've tried > it several times and the threads seem to be scheduled properly. > If you figure out how to repeat this without relying on phases of > the moon, I'd be interested in hearing how. -- Jean-Marc Zucconi PGP Key: finger jmz@FreeBSD.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 20:41:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.nyct.net (bsd4.nyct.net [204.141.86.6]) by hub.freebsd.org (Postfix) with ESMTP id A6D2E14E35 for ; Sun, 16 Jan 2000 20:41:10 -0800 (PST) (envelope-from mbac@nyct.net) Received: from bsd1.nyct.net (mbac@bsd1.nyct.net [204.141.86.3]) by mail.nyct.net (8.8.8/8.8.7) with ESMTP id XAA18205; Sun, 16 Jan 2000 23:41:09 -0500 (EST) (envelope-from mbac@nyct.net) Received: from localhost (mbac@localhost) by bsd1.nyct.net (8.8.8/8.9.3) with ESMTP id XAA01231; Sun, 16 Jan 2000 23:41:09 -0500 (EST) (envelope-from mbac@nyct.net) X-Authentication-Warning: bsd1.nyct.net: mbac owned process doing -bs Date: Sun, 16 Jan 2000 23:41:09 -0500 (EST) From: Michael Bacarella To: Alexander Litvin Cc: hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads In-Reply-To: <20000116225044.C601@unknown.nowhere.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Program, when killed with SIGINT, prints all counters and exits. > > Now, as I understand, userspace threads in FreeBSD are preemptive. > So, though my 11 threads are all computational and do not do > any syscalls, sleeps, sched_yield, whatever -- newertheless, > the program should not be stuck in one thread. And it seems to > be sometimes true. But only sometimes! Hmmm, my prior response was pretty much bullshit. It doesn't work for me with 'volatile' at all. If I put: printf ("running %d\n", pthread_self()); right before the counter loop, I only get one thread telling me about itself. Seems like a scheduler problem. Perhaps it is treating all threads as a logical unit and assigning them a global priority, and selecting the same thread to suck up all of it's time, each time. A "successful" run probably happens on busier systems where other factors mess with scheduling -- but I haven't verified this. Putting a sched_yield(); in the loop body makes sure that they get their fair share, so, other than guessing FreeBSD is at fault, I'm out of ideas. :) -MB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 21: 4:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id A9FA21509D for ; Sun, 16 Jan 2000 21:04:56 -0800 (PST) (envelope-from wes@softweyr.com) Received: from [204.68.178.39] (helo=softweyr.com ident=wes) by mail.xmission.com with esmtp (Exim 3.03 #3) id 12A4LV-0006n1-00; Sun, 16 Jan 2000 22:04:53 -0700 Message-ID: <3882A3E5.2ABD9EBF@softweyr.com> Date: Sun, 16 Jan 2000 22:08:53 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Eischen Cc: archer@lucky.net, hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads References: <200001170423.XAA10093@pcnet1.pcnet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Eischen wrote: > > Alexander Litvin wrote: > > First, I must say that this all concernes quite current > > CURRENT (Jan 9 or so). I don't know if the same holds for > > older versions. > > > > I'm kind of puzzled. > > > > I've a simple sample program (see at the bottom). It creates 10 > > threads with start function start_my_thread(), and then runs the > > same function in main(). So, we have 11 threads doing the same job. > > > > Function start_my_thread() just increments indefinitely counters > > (each thread has its own counter). > > > > Program, when killed with SIGINT, prints all counters and exits. > > > > Now, as I understand, userspace threads in FreeBSD are preemptive. > > So, though my 11 threads are all computational and do not do > > any syscalls, sleeps, sched_yield, whatever -- newertheless, > > the program should not be stuck in one thread. And it seems to > > be sometimes true. But only sometimes! > > > > Depending on the phase of the moon (it seems) sometimes my > > program gives (after ^C): > > > > ^C > > Thread 0x00: 0 > > Thread 0x01: 0 > > Thread 0x02: 0 > > Thread 0x03: 0 > > Thread 0x04: 0 > > Thread 0x05: 0 > > Thread 0x06: 0 > > Thread 0x07: 0 > > Thread 0x08: 0 > > Thread 0x09: 0 > > Thread 0x0a: 488133092 > > Hmm, I can't get this to occur with your test program. I've tried > it several times and the threads seem to be scheduled properly. > If you figure out how to repeat this without relying on phases of > the moon, I'd be interested in hearing how. It does it every time for me, on 3.3-RELEASE. On 3.4-STABLE as of Dec 20, it never does it (over a very small sample period). The machines are located about 25 miles apart; the phase of the moon should be significantly the same for both. ;^) -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://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 Jan 16 21:15: 3 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id E4D3415013 for ; Sun, 16 Jan 2000 21:15:00 -0800 (PST) (envelope-from wes@softweyr.com) Received: from [204.68.178.39] (helo=softweyr.com ident=wes) by mail.xmission.com with esmtp (Exim 3.03 #3) id 12A4VD-0000di-00; Sun, 16 Jan 2000 22:14:56 -0700 Message-ID: <3882A640.2A63B02A@softweyr.com> Date: Sun, 16 Jan 2000 22:18:56 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Michael Bacarella Cc: Alexander Litvin , hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Michael Bacarella wrote: > > > Program, when killed with SIGINT, prints all counters and exits. > > > > Now, as I understand, userspace threads in FreeBSD are preemptive. > > So, though my 11 threads are all computational and do not do > > any syscalls, sleeps, sched_yield, whatever -- newertheless, > > the program should not be stuck in one thread. And it seems to > > be sometimes true. But only sometimes! > > Hmmm, my prior response was pretty much bullshit. It doesn't work > for me with 'volatile' at all. > > [...] > > Putting a sched_yield(); in the loop body makes sure that they get their > fair share, so, other than guessing FreeBSD is at fault, I'm out of ideas. :) Yup, that does it, but it makes the program several orders of magnitude slower, too. Be careful about how much you use sched_yield, you're pushing the system into behavior that is outside its normal operating design. FreeBSD wasn't designed to re-run the scheduler after 2 or 3 instructions. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://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 Jan 16 21:26:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id 0A72514CB9 for ; Sun, 16 Jan 2000 21:26:16 -0800 (PST) (envelope-from wes@softweyr.com) Received: from [204.68.178.39] (helo=softweyr.com ident=wes) by mail.xmission.com with esmtp (Exim 3.03 #3) id 12A4gB-00036C-00 for freebsd-hackers@freebsd.org; Sun, 16 Jan 2000 22:26:15 -0700 Message-ID: <3882A8E7.46CDA822@softweyr.com> Date: Sun, 16 Jan 2000 22:30:15 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Hackers in space? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG irc.core.com died, long live the king. Where did my favorite IRC channel disappear to? -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://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 Jan 16 21:27:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from biggusdiskus.flyingfox.com (parker-T1-2-gw.sf3d.best.net [209.157.165.30]) by hub.freebsd.org (Postfix) with ESMTP id 3C6A414CCB for ; Sun, 16 Jan 2000 21:27:19 -0800 (PST) (envelope-from jas@flyingfox.com) Received: (from jas@localhost) by biggusdiskus.flyingfox.com (8.8.8/8.8.5) id VAA27341; Sun, 16 Jan 2000 21:20:56 -0800 (PST) Date: Sun, 16 Jan 2000 21:20:56 -0800 (PST) From: Jim Shankland Message-Id: <200001170520.VAA27341@biggusdiskus.flyingfox.com> To: ragnar@sysabend.org Subject: Re: "very dangerously dedicated mode" is Cc: hackers@freebsd.org In-Reply-To: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [Re: FreeBSD wedges even booting from a floppy when wd0's slice table contains executable code]: Jamie Bowden writes: > If it were SCSI I'd say plug it in to the nearest adaptec > controller and low level it (I fixed a drive one of my SGI's > ate like this), but it's IDE. You might want to give NT or > OS/2 a whack at it if you've got them laying around. There are > programs to let you low level IDE drives out there, I believe > they're mostly DOS based though, so that probably doesn't help. Linux worked. (I knew it had to be good for something :->.) Jim Shankland NLynx Systems, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 21:45:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from canonware.com (canonware.com [207.20.242.18]) by hub.freebsd.org (Postfix) with SMTP id 57B1714C59 for ; Sun, 16 Jan 2000 21:45:12 -0800 (PST) (envelope-from jasone@canonware.com) Received: (qmail 26994 invoked by uid 1001); 17 Jan 2000 05:44:16 -0000 Date: Sun, 16 Jan 2000 21:44:16 -0800 From: Jason Evans To: Wes Peters Cc: hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads Message-ID: <20000116214416.S302@sturm.canonware.com> References: <3882A640.2A63B02A@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3882A640.2A63B02A@softweyr.com>; from wes@softweyr.com on Sun, Jan 16, 2000 at 10:18:56PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 16, 2000 at 10:18:56PM -0700, Wes Peters wrote: > Michael Bacarella wrote: > > > > > Program, when killed with SIGINT, prints all counters and exits. > > > > > > Now, as I understand, userspace threads in FreeBSD are preemptive. > > > So, though my 11 threads are all computational and do not do > > > any syscalls, sleeps, sched_yield, whatever -- newertheless, > > > the program should not be stuck in one thread. And it seems to > > > be sometimes true. But only sometimes! > > > > Hmmm, my prior response was pretty much bullshit. It doesn't work > > for me with 'volatile' at all. > > > > [...] > > > > Putting a sched_yield(); in the loop body makes sure that they get their > > fair share, so, other than guessing FreeBSD is at fault, I'm out of ideas. :) > > Yup, that does it, but it makes the program several orders of magnitude slower, > too. Be careful about how much you use sched_yield, you're pushing the system > into behavior that is outside its normal operating design. FreeBSD wasn't > designed to re-run the scheduler after 2 or 3 instructions. In the case of libc_r, a call to sched_yield doesn't result in the system call sched_yield. Rather, it causes the userland threads scheduler to be run. There is still plenty of overhead, but running the kernel scheduler isn't necessarily part of that overhead. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 22: 0:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oskar.dev.nanoteq.co.za (oskar.dev.nanoteq.co.za [196.7.114.5]) by hub.freebsd.org (Postfix) with ESMTP id 2F1E714F7B for ; Sun, 16 Jan 2000 22:00:05 -0800 (PST) (envelope-from rbezuide@oskar.dev.nanoteq.co.za) Received: (from rbezuide@localhost) by oskar.dev.nanoteq.co.za (8.9.3/8.9.0) id HAA19865; Mon, 17 Jan 2000 07:58:17 +0200 (SAT) From: Reinier Bezuidenhout Message-Id: <200001170558.HAA19865@oskar.dev.nanoteq.co.za> Subject: Re: Preemptiveness of FreeBSD threads In-Reply-To: <20000116214416.S302@sturm.canonware.com> from Jason Evans at "Jan 16, 0 09:44:16 pm" To: jasone@canonware.com (Jason Evans) Date: Mon, 17 Jan 100 07:58:17 +0200 (SAT) Cc: wes@softweyr.com, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi ... I also ran this program on a 4.0-current as of about Jan 13 2000 :) It generates the errornous output like clock work on my machine (after about 30 tries - no exception). I then though that maybe the system gets so buzy that it has difficulty on starting the threads - yes I know this should not be a problem. I added a "sleep (1);" as the FIRST instruction in the "start_my_thread" functioni (Thus it is not inside the loop). This causes the following output every time. jarrow# ./thread ^C Thread 0x00: 6524518 Thread 0x01: 6574627 Thread 0x02: 6605728 Thread 0x03: 12928447 Thread 0x04: 6327346 Thread 0x05: 6592751 Thread 0x06: 12971487 Thread 0x07: 12968330 Thread 0x08: 6567584 Thread 0x09: 6642237 Thread 0x0a: 12632004 Ok :) not the EXACT same output put you know what I mean. Interesting, if I press ctrl-c too erly I sometimes get jarrow# ./thread ^C Thread 0x00: 6469560 Thread 0x01: 6541408 Thread 0x02: 12888010 Thread 0x03: 6327606 Thread 0x04: 13160549 Thread 0x05: 6005825 Thread 0x06: 12345878 Thread 0x07: 0 Thread 0x08: 0 Thread 0x09: 0 Thread 0x0a: 12974910 It seems that letting it wait a while before entering the loop causes all the thread to get time to startup and start counting Reinier > > Yup, that does it, but it makes the program several orders of magnitude slower, > > too. Be careful about how much you use sched_yield, you're pushing the system > > into behavior that is outside its normal operating design. FreeBSD wasn't > > designed to re-run the scheduler after 2 or 3 instructions. > > In the case of libc_r, a call to sched_yield doesn't result in the system > call sched_yield. Rather, it causes the userland threads scheduler to be > run. There is still plenty of overhead, but running the kernel scheduler > isn't necessarily part of that overhead. > > Jason > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 22: 4:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from canonware.com (canonware.com [207.20.242.18]) by hub.freebsd.org (Postfix) with SMTP id 4152014F56 for ; Sun, 16 Jan 2000 22:04:17 -0800 (PST) (envelope-from jasone@canonware.com) Received: (qmail 27044 invoked by uid 1001); 17 Jan 2000 06:03:22 -0000 Date: Sun, 16 Jan 2000 22:03:22 -0800 From: Jason Evans To: Alexander Litvin Cc: hackers@freebsd.org Subject: Re: Preemptiveness of FreeBSD threads Message-ID: <20000116220322.T302@sturm.canonware.com> References: <20000116225044.C601@unknown.nowhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000116225044.C601@unknown.nowhere.org>; from archer@lucky.net on Sun, Jan 16, 2000 at 10:50:45PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 16, 2000 at 10:50:45PM -0500, Alexander Litvin wrote: > I've a simple sample program (see at the bottom). It creates 10 > threads with start function start_my_thread(), and then runs the > same function in main(). So, we have 11 threads doing the same job. > > Function start_my_thread() just increments indefinitely counters > (each thread has its own counter). > > Program, when killed with SIGINT, prints all counters and exits. > > Now, as I understand, userspace threads in FreeBSD are preemptive. > So, though my 11 threads are all computational and do not do > any syscalls, sleeps, sched_yield, whatever -- newertheless, > the program should not be stuck in one thread. And it seems to > be sometimes true. But only sometimes! My experiments with your test program do exactly what I would expect. The longer the program is run, thu longer the program has to preempt threads, which means that given enough time, all threads will run. If the program is run for a short time (less than about 1.5 seconds) then some threads may never get to run. You don't mention how long you run the program for, so I'm assuming that the runtime must be quite short for you to be seeing the results that concerned you. All tests that I ran showed non-zero counters for all threads if the program ran for more than 1.5 seconds. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 22: 4:53 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.mrf.mail.rcn.net (smtp01.mrf.mail.rcn.net [207.172.4.60]) by hub.freebsd.org (Postfix) with ESMTP id 3C35B15124 for ; Sun, 16 Jan 2000 22:04:50 -0800 (PST) (envelope-from archer@lucky.net) Received: from 207-172-201-37.s37.as1.xnb.nj.dialup.rcn.com ([207.172.201.37] helo=unknown.nowhere.org) by smtp01.mrf.mail.rcn.net with esmtp (Exim 2.12 #3) id 12A5HU-0001y0-00 for hackers@freebsd.org; Mon, 17 Jan 2000 01:04:48 -0500 Received: (from archer@localhost) by unknown.nowhere.org (8.9.3/8.9.3) id AAA47274; Mon, 17 Jan 2000 00:55:04 -0500 (EST) (envelope-from archer) Date: Mon, 17 Jan 2000 00:55:04 -0500 (EST) Message-Id: <200001170555.AAA47274@unknown.nowhere.org> From: Alexander Litvin To: hackers@freebsd.org Subject: Re: Preemptiveness of FreeBSD threads X-Newsgroups: unknown.freebsd.hackers In-Reply-To: <200001170423.XAA10093@pcnet1.pcnet.com> User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (FreeBSD/4.0-CURRENT (i386)) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <200001170423.XAA10093@pcnet1.pcnet.com> you wrote: >> Now, as I understand, userspace threads in FreeBSD are preemptive. >> So, though my 11 threads are all computational and do not do >> any syscalls, sleeps, sched_yield, whatever -- newertheless, >> the program should not be stuck in one thread. And it seems to >> be sometimes true. But only sometimes! >> >> Depending on the phase of the moon (it seems) sometimes my >> program gives (after ^C): >> >> ^C >> Thread 0x00: 0 >> Thread 0x01: 0 >> Thread 0x02: 0 >> Thread 0x03: 0 >> Thread 0x04: 0 >> Thread 0x05: 0 >> Thread 0x06: 0 >> Thread 0x07: 0 >> Thread 0x08: 0 >> Thread 0x09: 0 >> Thread 0x0a: 488133092 > Hmm, I can't get this to occur with your test program. I've tried > it several times and the threads seem to be scheduled properly. > If you figure out how to repeat this without relying on phases of > the moon, I'd be interested in hearing how. That's what makes it most wierd for me -- I am not able to determine conditions when it gives a "wrong" result. I'll keep trying though. I also could probably compile libc_r with debug info and set a breakpoint somewhere in threads scheduler to see what's going on. Or, because it is time-related, it is not a good idea? Then printfs in libc_r -- will they work? Could you suggest a good place to start looking? As I said, it seems to go in periods -- for some time everything is normal, and then for some time -- bullshit :-\ You may try to repeat it after some time. It may also be hardware dependent (?) > Are you running NTP or changing the time? That idea also came to me, but no -- I don't have NTP, and I don't change the time. And as I said, the interrupts seem to keep being delivered to the process. > Dan Eischen > eischen@vigrid.com --- After living in New York, you trust nobody, but you believe everything. Just in case. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 22: 7:55 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oskar.dev.nanoteq.co.za (oskar.dev.nanoteq.co.za [196.7.114.5]) by hub.freebsd.org (Postfix) with ESMTP id 7C19314DDE for ; Sun, 16 Jan 2000 22:07:47 -0800 (PST) (envelope-from rbezuide@oskar.dev.nanoteq.co.za) Received: (from rbezuide@localhost) by oskar.dev.nanoteq.co.za (8.9.3/8.9.0) id IAA20072; Mon, 17 Jan 2000 08:05:43 +0200 (SAT) From: Reinier Bezuidenhout Message-Id: <200001170605.IAA20072@oskar.dev.nanoteq.co.za> Subject: Re: Preemptiveness of FreeBSD threads In-Reply-To: <200001170558.HAA19865@oskar.dev.nanoteq.co.za> from Reinier Bezuidenhout at "Jan 17, 0 08:01:05 am" To: rbezuide@oskar.dev.nanoteq.co.za (Reinier Bezuidenhout) Date: Mon, 17 Jan 100 08:05:43 +0200 (SAT) Cc: jasone@canonware.com, wes@softweyr.com, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hi ... > > I also ran this program on a 4.0-current as of about Jan 13 2000 :) > > It generates the errornous output like clock work on my machine (after about > 30 tries - no exception). I then though that maybe the system gets so buzy > that it has difficulty on starting the threads - yes I know this should not > be a problem. > > I added a "sleep (1);" as the FIRST instruction in the "start_my_thread" > functioni (Thus it is not inside the loop). This causes the following > output every time. > Seems like I have to recall this statement - I've just removed the sleep and recompiled and now it seems to work again ... and just about everytime I've tested it ... I am now just as confused as anyone else :/ Reinier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 22:41:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id 7094214DFF for ; Sun, 16 Jan 2000 22:41:13 -0800 (PST) (envelope-from wes@softweyr.com) Received: from [204.68.178.39] (helo=softweyr.com ident=wes) by mail.xmission.com with esmtp (Exim 3.03 #3) id 12A5qh-0002ue-00; Sun, 16 Jan 2000 23:41:12 -0700 Message-ID: <3882BA78.4EE522F1@softweyr.com> Date: Sun, 16 Jan 2000 23:45:12 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Jason Evans Cc: Alexander Litvin , hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads References: <20000116225044.C601@unknown.nowhere.org> <20000116220322.T302@sturm.canonware.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jason Evans wrote: > > You don't mention how long you run the program for, so I'm assuming that > the runtime must be quite short for you to be seeing the results that > concerned you. All tests that I ran showed non-zero counters for all > threads if the program ran for more than 1.5 seconds. wes@homer$ time ./threadtest ^C Thread 0x00: 0 Thread 0x01: 0 Thread 0x02: 0 Thread 0x03: 0 Thread 0x04: 0 Thread 0x05: 0 Thread 0x06: 0 Thread 0x07: 0 Thread 0x08: 0 Thread 0x09: 0 Thread 0x0a: 223277111 real 0m5.403s user 0m5.256s sys 0m0.001s wes@homer$ uname -a FreeBSD homer 3.3-RELEASE FreeBSD 3.3-RELEASE #4: Thu Dec 23 14:45:28 MST 1999 rootb@homer:/usr/src/sys/compile/HOMER i386 Adding a sched_yield() in the main function before the call to start_my_thread seems to solve the problem: wes@homer$ time ./threadtest ^C Thread 0x00: 20767331 Thread 0x01: 25057587 Thread 0x02: 21035219 Thread 0x03: 18914176 Thread 0x04: 8465648 Thread 0x05: 16969167 Thread 0x06: 16848430 Thread 0x07: 16359150 Thread 0x08: 16933300 Thread 0x09: 16607575 Thread 0x0a: 12583271 real 0m4.585s user 0m4.476s sys 0m0.011s -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://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 Jan 16 22:42: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oskar.dev.nanoteq.co.za (oskar.dev.nanoteq.co.za [196.7.114.5]) by hub.freebsd.org (Postfix) with ESMTP id B9DA4151D7 for ; Sun, 16 Jan 2000 22:41:53 -0800 (PST) (envelope-from rbezuide@oskar.dev.nanoteq.co.za) Received: (from rbezuide@localhost) by oskar.dev.nanoteq.co.za (8.9.3/8.9.0) id IAA21126; Mon, 17 Jan 2000 08:40:05 +0200 (SAT) From: Reinier Bezuidenhout Message-Id: <200001170640.IAA21126@oskar.dev.nanoteq.co.za> Subject: Re: Preemptiveness of FreeBSD threads In-Reply-To: <20000116220322.T302@sturm.canonware.com> from Jason Evans at "Jan 16, 0 10:03:22 pm" To: jasone@canonware.com (Jason Evans) Date: Mon, 17 Jan 100 08:40:04 +0200 (SAT) Cc: archer@lucky.net, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > My experiments with your test program do exactly what I would expect. The > longer the program is run, thu longer the program has to preempt threads, > which means that given enough time, all threads will run. If the program > is run for a short time (less than about 1.5 seconds) then some threads may > never get to run. On my system it doesn't matter how long I leave it .. the times it doesn't work ... e.g. belowe .. it even had enough time to let the varialble wrap ... jarrow# ./thread ^C Thread 0x00: 0 Thread 0x01: 0 Thread 0x02: 0 Thread 0x03: 0 Thread 0x04: 0 Thread 0x05: 0 Thread 0x06: 0 Thread 0x07: 0 Thread 0x08: 0 Thread 0x09: 0 Thread 0x0a: -1532959619 So letting it run for longer doesn't help :/ Reinier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 22:55:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 3E43014E4F for ; Sun, 16 Jan 2000 22:55:26 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id XAA63126; Sun, 16 Jan 2000 23:55:09 -0700 (MST) (envelope-from ken) Date: Sun, 16 Jan 2000 23:55:09 -0700 From: "Kenneth D. Merry" To: Matthew Jacob Cc: Chris Dillon , hackers@FreeBSD.ORG Subject: Re: looking for victims, err, uh, 'volunteers' Message-ID: <20000116235509.A63077@panzer.kdm.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from mjacob@feral.com on Sun, Jan 16, 2000 at 05:56:41PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 16, 2000 at 17:56:41 -0800, Matthew Jacob wrote: > > > Hmm... I guess I was confusing this with the S.M.A.R.T. stuff that is > > supposed to give you a kind of pre-emptive warning that bad things are > > going to happen (or have happened, rather... i.e. the drive starts > > reallocating a bunch of blocks or senses some other kind of internal > > problem). > > You should be able to get that via camcontrol right now for SCSI disks. If > not, bug Ken. I haven't even looked at the SMART stuff. Got any pointers to specs? In any case, it should be possible to do anything you want to do via camcontrol, since you can issue any SCSI command with it. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 22:57:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 3286614F56 for ; Sun, 16 Jan 2000 22:57:08 -0800 (PST) (envelope-from mjacob@feral.com) Received: from beppo.feral.com (beppo [192.67.166.79]) by feral.com (8.9.3/8.9.3) with ESMTP id WAA25651; Sun, 16 Jan 2000 22:56:59 -0800 Date: Sun, 16 Jan 2000 22:56:58 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: "Kenneth D. Merry" Cc: Chris Dillon , hackers@FreeBSD.ORG Subject: Re: looking for victims, err, uh, 'volunteers' In-Reply-To: <20000116235509.A63077@panzer.kdm.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG SMART is IDE, I believe.. and unless somebody hits Soren over the head, we're not gonna have even ATAPI to try SMART with. On Sun, 16 Jan 2000, Kenneth D. Merry wrote: > On Sun, Jan 16, 2000 at 17:56:41 -0800, Matthew Jacob wrote: > > > > > Hmm... I guess I was confusing this with the S.M.A.R.T. stuff that is > > > supposed to give you a kind of pre-emptive warning that bad things are > > > going to happen (or have happened, rather... i.e. the drive starts > > > reallocating a bunch of blocks or senses some other kind of internal > > > problem). > > > > You should be able to get that via camcontrol right now for SCSI disks. If > > not, bug Ken. > > I haven't even looked at the SMART stuff. Got any pointers to specs? > > In any case, it should be possible to do anything you want to do via > camcontrol, since you can issue any SCSI command with it. > > Ken > -- > Kenneth Merry > ken@kdm.org > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 23: 2: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from not.demophon.com (vpn.iscape.fi [195.170.146.67]) by hub.freebsd.org (Postfix) with ESMTP id EFD4A14CEE for ; Sun, 16 Jan 2000 23:02:01 -0800 (PST) (envelope-from will@not.demophon.com) Received: (from will@localhost) by not.demophon.com (8.9.3/8.8.7) id JAA59645; Mon, 17 Jan 2000 09:00:41 +0200 (EET) (envelope-from will) To: rfg@monkeys.com (Ronald F. Guilmette) Cc: hackers@freebsd.org Subject: Re: libelf and Elf Interface Routines References: <54934.947881142@monkeys.com> From: Ville-Pertti Keinonen Date: 17 Jan 2000 09:00:41 +0200 In-Reply-To: rfg@monkeys.com's message of "14 Jan 2000 22:21:42 +0200" Message-ID: <86vh4tdvxi.fsf@not.demophon.com> Lines: 15 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG rfg@monkeys.com (Ronald F. Guilmette) writes: > The original libelf code was/is owned by, and developed by AT&T's Unix > Systems Group (USG) which AT&T sold to (I think) Novell and which Novell > then sold to SCO. > Bottom line is that the _real_ libelf is proprietary code. There is a free (LGPL) libelf-implementation available, see http://www.stud.uni-hannover.de/~michael/software/ It doesn't compile on FreeBSD without modifications, but porting should be reasonably easy (I did it for some old version a couple of years ago). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Jan 16 23:13: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from canonware.com (canonware.com [207.20.242.18]) by hub.freebsd.org (Postfix) with SMTP id 344EB14C1A for ; Sun, 16 Jan 2000 23:13:05 -0800 (PST) (envelope-from jasone@canonware.com) Received: (qmail 27320 invoked by uid 1001); 17 Jan 2000 07:12:10 -0000 Date: Sun, 16 Jan 2000 23:12:10 -0800 From: Jason Evans To: Wes Peters Cc: hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads Message-ID: <20000116231210.U302@sturm.canonware.com> References: <20000116225044.C601@unknown.nowhere.org> <20000116220322.T302@sturm.canonware.com> <3882BA78.4EE522F1@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3882BA78.4EE522F1@softweyr.com>; from wes@softweyr.com on Sun, Jan 16, 2000 at 11:45:12PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 16, 2000 at 11:45:12PM -0700, Wes Peters wrote: > Jason Evans wrote: > > > > You don't mention how long you run the program for, so I'm assuming that > > the runtime must be quite short for you to be seeing the results that > > concerned you. All tests that I ran showed non-zero counters for all > > threads if the program ran for more than 1.5 seconds. > > wes@homer$ time ./threadtest > ^C > Thread 0x00: 0 > Thread 0x01: 0 > Thread 0x02: 0 > Thread 0x03: 0 > Thread 0x04: 0 > Thread 0x05: 0 > Thread 0x06: 0 > Thread 0x07: 0 > Thread 0x08: 0 > Thread 0x09: 0 > Thread 0x0a: 223277111 > > real 0m5.403s > user 0m5.256s > sys 0m0.001s > wes@homer$ uname -a > FreeBSD homer 3.3-RELEASE FreeBSD 3.3-RELEASE #4: Thu Dec 23 14:45:28 MST 1999 rootb@homer:/usr/src/sys/compile/HOMER i386 > > Adding a sched_yield() in the main function before the call to start_my_thread > seems to solve the problem: > > wes@homer$ time ./threadtest > ^C > Thread 0x00: 20767331 > Thread 0x01: 25057587 > Thread 0x02: 21035219 > Thread 0x03: 18914176 > Thread 0x04: 8465648 > Thread 0x05: 16969167 > Thread 0x06: 16848430 > Thread 0x07: 16359150 > Thread 0x08: 16933300 > Thread 0x09: 16607575 > Thread 0x0a: 12583271 > > real 0m4.585s > user 0m4.476s > sys 0m0.011s Okay, so much for that theory. =) Also, I finally saw the reported behaviour twice, though when I recompiled, it went away. This could be hard to track down... Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 0:34:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mailgw1.netvision.net.il (mailgw1.netvision.net.il [194.90.1.14]) by hub.freebsd.org (Postfix) with ESMTP id 0494E14E1D for ; Mon, 17 Jan 2000 00:34:40 -0800 (PST) (envelope-from ak@freenet.co.uk) Received: from freenet.co.uk (RAS1-p86.rlz.netvision.net.il [62.0.168.88]) by mailgw1.netvision.net.il (8.9.3/8.9.3) with ESMTP id KAA03133; Mon, 17 Jan 2000 10:34:34 +0200 (IST) Message-ID: <3882D521.1BD2DA28@freenet.co.uk> Date: Mon, 17 Jan 2000 08:38:57 +0000 From: Alex X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Thierry Herbelot Cc: hackers@freebsd.org Subject: Re: Anyone working on a DOMEX scsi driver ? References: <3881D8CE.8C1B5A33@cybercable.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Thierry Herbelot wrote: > > Hello, > > I've just bought a Mustek SCSI scanner, and it is bundled with a > seemingly very simple SCSI controller built by a DOMEX company (from > Taiwan) > > Does someone know where there could be some info ? (perhaps a driver > under Linux ?) > > TfH > > PS : the board identifier is DMX3191D - the chip itself seems to be a > Domex536 There is a Linux driver for DMX 3192U PCI SCSI in drivers/scsi/ini9100u.c, which suggests that it might be similar to the Initio 9100 device. What are the exact device and vendor ID numbers? (If you don't know, just send the output of "pciconf -l".) Alex To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 3:23:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from web1903.mail.yahoo.com (web1903.mail.yahoo.com [128.11.23.52]) by hub.freebsd.org (Postfix) with SMTP id 2951614A31 for ; Mon, 17 Jan 2000 03:23:14 -0800 (PST) (envelope-from manhtho@yahoo.com) Received: (qmail 13100 invoked by uid 60001); 17 Jan 2000 11:23:14 -0000 Message-ID: <20000117112313.13099.qmail@web1903.mail.yahoo.com> Received: from [202.167.121.197] by web1903.mail.yahoo.com; Mon, 17 Jan 2000 03:23:13 PST Date: Mon, 17 Jan 2000 03:23:13 -0800 (PST) From: Nguyen Manh Tho Subject: The encripted passwd files To: FreeBSD-questions@freeBSD.org Cc: FreeBSD-hackers@freeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear Sirs/Madams, I need to read the encripted passwd field in Linux before converting to Free BSD format, and I have some problem here. This is the documents I read from man 5 passwd form Free BSD 2.2.7 BEGIN HERE ............. The passwd files are files consisting of newline separated records, one per user, containing ten colon (``:'') separated fields. These fields are as follows: name User's login name. password User's encrypted password. uid User's id. gid User's login group id. class User's login class. change Password change time. expire Account expiration time. gecos General information about the user. home_dir User's home directory. shell User's login shell. ............. The password field is the encrypted form of the password. If the password field is empty, no password will be required to gain access to the machine. This is almost invariably a mistake. Because these files contain the encrypted user passwords, they should not be readable by anyone without appropriate privileges. Administrative accounts have a password field containing an asterisk `*' which disallows normal logins. ............. BUGS User information should (and eventually will) be stored elsewhere. The YP/NIS password database makes encrypted passwords visible to ordinary users, thus making password cracking easier unless you use shadow passwords with the master.passwd maps and FreeBSD's ypserv(8) server. Unless you're using FreeBSD's ypserv(8) server?, which supports the use of master.passwd type maps, the YP/NIS password database will be in old style (Sixth Edition) format, which means that site-wide values for user login class, password expiration date, and other fields present in the current format will not be available when a FreeBSD system is used as a client with a standard NIS server. COMPATIBILITY The password file format has changed since 4.3BSD. The following awk script can be used to convert your old-style password file into a new style password file. The additional fields ``class'', ``change'' and ``expire'' are added, but are turned off by default. These fields can then be set using vipw(8) or pw(8). BEGIN { FS = ":"} { print $1 ":" $2 ":" $3 ":" $4 "::0:0:" $5 ":" $6 ":" $7 } END HERE. When I connect as root in Free BSD, I could read the encripted passwd field by using vipw, that really open the master.passwd. This file is very similar to passwd file except that the encripted passwd field can be seen. In Turbo Linux, there is no such master.passwd file and I could not read the encripted passwd field. I need to copy passwd file from Linux to Free BSD, converting the format and would like reserving this encripted passwd field. I can not check if this passwd field reserve or not unless I could read this field from both Linux and Free BSD. I would like to know what is the default encript engine of Free BSD and Linux ? If they diffrent, how can I convert this field without losting any information ? I would like how to view all 10 fields on passwd file in Free BSD because I just see 7 fields in this file. As the document, I can not see 10 field if I do not run ypserv(8) server.I do not know how to run this server and turn on 3 new fields which default turn off. Although to the document I can use the vipw(8) or pw(8) to do that, I try run ypserv, and vipw but I just see 7 fields. Please help me step by step if you could. Thank you very much for all your responses, Nguyen Manh Tho. __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 4:21:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 599F314BD0 for ; Mon, 17 Jan 2000 04:21:13 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from vigrid.com (pm3-pt3.pcnet.net [206.105.29.77]) by pcnet1.pcnet.com (8.8.7/PCNet) with ESMTP id HAA28438; Mon, 17 Jan 2000 07:20:57 -0500 (EST) Message-ID: <388308FC.21812070@vigrid.com> Date: Mon, 17 Jan 2000 07:20:12 -0500 From: "Daniel M. Eischen" X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: archer@lucky.net Cc: hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads Content-Type: multipart/mixed; boundary="------------D1C1856A247A5E47C1DD8D01" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------D1C1856A247A5E47C1DD8D01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > First, I must say that this all concernes quite current > CURRENT (Jan 9 or so). I don't know if the same holds for > older versions. > > I'm kind of puzzled. > > I've a simple sample program (see at the bottom). It creates 10 > threads with start function start_my_thread(), and then runs the > same function in main(). So, we have 11 threads doing the same job. > > Function start_my_thread() just increments indefinitely counters > (each thread has its own counter). > > Program, when killed with SIGINT, prints all counters and exits. > > Now, as I understand, userspace threads in FreeBSD are preemptive. > So, though my 11 threads are all computational and do not do > any syscalls, sleeps, sched_yield, whatever -- newertheless, > the program should not be stuck in one thread. And it seems to > be sometimes true. But only sometimes! > > Depending on the phase of the moon (it seems) sometimes my > program gives (after ^C): > > ^C > Thread 0x00: 0 > Thread 0x01: 0 > Thread 0x02: 0 > Thread 0x03: 0 > Thread 0x04: 0 > Thread 0x05: 0 > Thread 0x06: 0 > Thread 0x07: 0 > Thread 0x08: 0 > Thread 0x09: 0 > Thread 0x0a: 488133092 OK, with everyones help (well, waiting for the right time of day ;-)), I was able to reproduce this. The initial threads last active time was not getting initialized to a sane value, causing negative computations of the threads timeslice depending on what time of day it was. Funny thing was that I added this change several times, but each time I somehow convinced myself that it wasn't needed. Try this patch - you may have to hand apply it as my sources are not yet up to date with the last round of changes that Jason made. Dan Eischen eischen@vigrid.com --------------D1C1856A247A5E47C1DD8D01 Content-Type: text/plain; charset=us-ascii; name="diffs_init" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs_init" Index: uthread_init.c =================================================================== RCS file: /opt/b/CVS/src/lib/libc_r/uthread/uthread_init.c,v retrieving revision 1.21 diff -c -r1.21 uthread_init.c *** uthread_init.c 1999/12/29 15:44:59 1.21 --- uthread_init.c 2000/01/17 11:47:06 *************** *** 92,97 **** --- 92,98 ---- int mib[2]; struct clockinfo clockinfo; struct sigaction act; + struct timeval tv; /* Check if this function has already been called: */ if (_thread_initial) *************** *** 222,227 **** --- 223,233 ---- /* Initialize the owned mutex queue and count: */ TAILQ_INIT(&(_thread_initial->mutexq)); _thread_initial->priority_mutex_count = 0; + + /* Initialize last active time to now: */ + gettimeofday(&tv, NULL); + _thread_initial->last_active.tv_sec = tv.tv_sec; + _thread_initial->last_active.tv_usec = tv.tv_usec; /* Initialise the rest of the fields: */ _thread_initial->poll_data.nfds = 0; --------------D1C1856A247A5E47C1DD8D01-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 5:48: 2 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from penelope.skunk.org (penelope.skunk.org [208.133.204.51]) by hub.freebsd.org (Postfix) with ESMTP id 45B4314D5E for ; Mon, 17 Jan 2000 05:47:57 -0800 (PST) (envelope-from ben@penelope.skunk.org) Received: from localhost (ben@localhost) by penelope.skunk.org (8.9.3/8.9.3) with ESMTP id QAA42401; Sat, 15 Jan 2000 16:38:24 -0500 (EST) Date: Sat, 15 Jan 2000 16:38:24 -0500 (EST) From: Ben Rosengart To: "Ronald F. Guilmette" Cc: James Howard , freebsd-hackers@FreeBSD.ORG Subject: Re: libelf and Elf Interface Routines In-Reply-To: <54934.947881142@monkeys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 14 Jan 2000, Ronald F. Guilmette wrote: > Hummm... I just tried doing a "locate" to see if this library was already > installed on my FreeBSD 3.3 system, and it _did_ find it, but it looks > like it is mixed in with the Linux compatability stuff: > > /usr/compat/linux/usr/lib/libbfd.a > > I dunno how well that will work if you are not running in Linux compatability > mode, so you probably want to fetch a fresh set of sources for libbfd and > build it yourself on/for FreeBSD. Or look in: /usr/src/contrib/binutils/bfd /usr/src/gnu/usr.bin/binutils/libbfd -- Ben Rosengart UNIX Systems Engineer, Skunk Group StarMedia Network, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 7:31:46 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from paradox.nexuslabs.com (cc718001-a.vron1.nj.home.com [24.11.70.21]) by hub.freebsd.org (Postfix) with ESMTP id 42DBE14C1E for ; Mon, 17 Jan 2000 07:31:44 -0800 (PST) (envelope-from cyouse@paradox.nexuslabs.com) Received: from localhost (cyouse@localhost) by paradox.nexuslabs.com (8.9.3/8.9.3) with ESMTP id KAA15164 for ; Mon, 17 Jan 2000 10:37:21 -0500 (EST) (envelope-from cyouse@paradox.nexuslabs.com) Date: Mon, 17 Jan 2000 10:37:21 -0500 (EST) From: Charles Youse To: freebsd-hackers@freebsd.org Subject: PR kern/15656 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In this PR, regarding IP header checksums, it's stated that a checksum of 0 is specified by the standard to be transmitted as all-1s (0xFFFF). (A checksum of all 0s is taken to mean that the transmitting host did not calculate a checksum.) Can anyone find a reference to this in the official docs, or perhaps find an explanation why we do indeed send 0'ed checksums? I've replicated this behavior on both 3.4-STABLE and 4.0-CURRENT, i386 and alpha. Thanks, Chuck To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 7:40:49 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtppzh.pzh.nl (webshield.pzh.nl [194.178.168.50]) by hub.freebsd.org (Postfix) with SMTP id 567F614E19 for ; Mon, 17 Jan 2000 07:40:40 -0800 (PST) (envelope-from MULHUIJZEN@PZH.NL) Received: FROM smtp.pzh.nl BY smtppzh.pzh.nl ; Mon Jan 17 16:39:37 2000 0000 Received: from PZH40-1-Message_Server by smtp.pzh.nl with Novell_GroupWise; Mon, 17 Jan 2000 16:39:42 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Mon, 17 Jan 2000 16:39:22 +0100 From: "ROGIER MULHUIJZEN" To: Subject: Re: Preemptiveness of FreeBSD threads Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >OK, with everyones help (well, waiting for the right time of day ;-)), I >was able to reproduce this. The initial threads last active time was >not getting initialized to a sane value, causing negative computations >of the threads timeslice depending on what time of day it was. Funny >thing was that I added this change several times, but each time I somehow >convinced myself that it wasn't needed. >Try this patch - you may have to hand apply it as my sources are not >yet up to date with the last round of changes that Jason made. >Dan Eischen >eischen@vigrid.com Ah! That explains why I couldn't reproduce the trouble I had with gFTP (about which I mailed a few days ago). I had done some hacking in GTK's source to make it all work (sleep(0) and what not), and after taking out everything I had added, it still worked. Well phase of the moon wasn't even that far off! =) DocWilco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 7:53:54 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from defiant.quansoo.com (defiant.quansoo.com [63.66.225.90]) by hub.freebsd.org (Postfix) with ESMTP id 809F314E89 for ; Mon, 17 Jan 2000 07:53:32 -0800 (PST) (envelope-from cgriffiths@quansoo.com) Received: from localhost (cgriffiths@localhost) by defiant.quansoo.com (8.9.3/8.9.3) with ESMTP id KAA01121; Mon, 17 Jan 2000 10:53:20 -0500 (EST) (envelope-from cgriffiths@quansoo.com) X-Authentication-Warning: defiant.quansoo.com: cgriffiths owned process doing -bs Date: Mon, 17 Jan 2000 10:53:20 -0500 (EST) From: "Christopher T. Griffiths" To: Chrisy Luke Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: ypldap In-Reply-To: <20000117002201.B95473@flix.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yes, This would very much interest me. Thanks Chris On Mon, 17 Jan 2000, Chrisy Luke wrote: > Any interest in a hack of ypserv that effectively gateways > master.passwd, passwd and (shortly, anyway) group maps to > an LDAP DB? If so, I'll make it available. > > Very configurable. :-) Got it working a few hours ago. Need's > tidying up, but otherwise seemingly sound. It's essentially > a drop in replacement for ypserv in that it will query maps on disc > should LDAP not have the goods. Side effect: A map needs to exist > on disc got the access control stuff to let a query through, but > that's no big deal. > > Disclaimer: First time I've seriously played with YP or LDAP. :-) > I only did it because I couldn't find an alternative apart from > ones beyond my zero-budget. :-) > > Regards, > Chris. > -- > == chris@easynet.net, chrisy@flirble.org. +44 20 7900 4444 > == Systems Manager for Easynet, a part of Easynet Group PLC. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 8:21:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from nu.binary.net (nu.binary.net [12.13.120.25]) by hub.freebsd.org (Postfix) with ESMTP id 25F1814C91 for ; Mon, 17 Jan 2000 08:21:17 -0800 (PST) (envelope-from nathan@rtfm.net) Received: from matrix.binary.net (root@matrix.binary.net [12.13.120.2]) by nu.binary.net (8.9.1a/8.9.0) with ESMTP id KAA71439; Mon, 17 Jan 2000 10:21:11 -0600 (CST) Received: (from nathan@localhost) by matrix.binary.net (8.9.3/8.9.1) id KAA07923; Mon, 17 Jan 2000 10:21:11 -0600 (CST) Date: Mon, 17 Jan 2000 11:21:10 -0500 From: Nathan Dorfman To: Wes Peters Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Hackers in space? Message-ID: <20000117112110.A6648@rtfm.net> References: <3882A8E7.46CDA822@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <3882A8E7.46CDA822@softweyr.com>; from Wes Peters on Sun, Jan 16, 2000 at 10:30:15PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 16, 2000 at 10:30:15PM -0700, Wes Peters wrote: > irc.core.com died, long live the king. Where did my favorite IRC channel > disappear to? IRC servers are linked together in networks. Just pick another EFnet server -- www.irchelp.org will have a list. > -- > "Where am I, and what am I doing in this handbasket?" > > Wes Peters Softweyr LLC > wes@softweyr.com http://softweyr.com/ -- Nathan Dorfman The statements and opinions in my Unix Admin @ Frontline Communications public posts are mine, not FCC's. "The light at the end of the tunnel is the headlight of an approaching train." --/usr/games/fortune To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 8:39:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by hub.freebsd.org (Postfix) with ESMTP id 32ECB14C89 for ; Mon, 17 Jan 2000 08:39:28 -0800 (PST) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.9.3/8.9.1) with ESMTP id LAA18994; Mon, 17 Jan 2000 11:39:14 -0500 (EST) (envelope-from louie@whizzo.transsys.com) Message-Id: <200001171639.LAA18994@whizzo.transsys.com> X-Mailer: exmh version 2.1.1 10/15/1999 X-Exmh-Isig-CompType: repl X-Exmh-Isig-Folder: inbox/freebsd-hackers To: Charles Youse Cc: freebsd-hackers@FreeBSD.ORG From: "Louis A. Mamakos" Subject: Re: PR kern/15656 References: In-reply-to: Your message of "Mon, 17 Jan 2000 10:37:21 EST." Mime-Version: 1.0 Content-Type: text/plain Date: Mon, 17 Jan 2000 11:39:14 -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > In this PR, regarding IP header checksums, it's stated that a checksum of > 0 is specified by the standard to be transmitted as all-1s (0xFFFF). (A > checksum of all 0s is taken to mean that the transmitting host did not > calculate a checksum.) > > Can anyone find a reference to this in the official docs, or perhaps find > an explanation why we do indeed send 0'ed checksums? I've replicated this > behavior on both 3.4-STABLE and 4.0-CURRENT, i386 and alpha. This behavior is certainly in RFC-791, which describes IP. Note that since the checksum is computed using 1's complement arithmetic, all-1's is a represetation of -0, which has the same arithmetic properties as the encoding of +0. In this application, the +0 encoding denotes "no checksump", which as far as I know, is only an option for the UDP checksum. An excerpt of RFC-791 says: ------------------------------------------------------------------------ Header Checksum: 16 bits A checksum on the header only. Since some header fields change (e.g., time to live), this is recomputed and verified at each point that the internet header is processed. The checksum algorithm is: The checksum field is the 16 bit one's complement of the one's complement sum of all 16 bit words in the header. For purposes of computing the checksum, the value of the checksum field is zero. This is a simple to compute checksum and experimental evidence indicates it is adequate, but it is provisional and may be replaced by a CRC procedure, depending on further experience. ------------------------------------------------------------------------ So, if you implemented as it is described, computing a sum of the packet contents who's result is 0x0000 would then be complemented to 0xFFFF for inclusion in the packet header. A one's complement sum of values who's value is zero should always produce a +0 (all zero bits) rather than a -0 (all one bits), At least all right-thinking 1's complement hardware of the era (DEC, UNIVAC, etc) worked that way. louie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 8:50:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from paradox.nexuslabs.com (cc718001-a.vron1.nj.home.com [24.11.70.21]) by hub.freebsd.org (Postfix) with ESMTP id 06F3514A31 for ; Mon, 17 Jan 2000 08:50:05 -0800 (PST) (envelope-from cyouse@paradox.nexuslabs.com) Received: from localhost (cyouse@localhost) by paradox.nexuslabs.com (8.9.3/8.9.3) with ESMTP id LAA15302; Mon, 17 Jan 2000 11:55:37 -0500 (EST) (envelope-from cyouse@paradox.nexuslabs.com) Date: Mon, 17 Jan 2000 11:55:37 -0500 (EST) From: Charles Youse To: "Louis A. Mamakos" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: PR kern/15656 In-Reply-To: <200001171639.LAA18994@whizzo.transsys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 17 Jan 2000, Louis A. Mamakos wrote: > So, if you implemented as it is described, computing a sum of the > packet contents who's result is 0x0000 would then be complemented to > 0xFFFF for inclusion in the packet header. Agreed; however, the PR states that should the checksum be 0xFFFF, the complement of which is 0x0000, the checksum should still be sent as 0xFFFF. Can anyone verify this? I can verify that BSD sends 0-checksums; I can't on Solaris. Chuck To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 8:55:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from genesis.digital-galaxy.net (supernova.digital-galaxy.net [207.227.248.9]) by hub.freebsd.org (Postfix) with ESMTP id D0D5614A31 for ; Mon, 17 Jan 2000 08:55:07 -0800 (PST) (envelope-from xirho@digital-galaxy.net) Received: from localhost (xirho@localhost) by genesis.digital-galaxy.net (8.9.3/8.9.3) with ESMTP id JAA89426 for ; Mon, 17 Jan 2000 09:03:00 -0800 (PST) Date: Mon, 17 Jan 2000 09:03:00 -0800 (PST) From: Nathan Cohen To: freebsd-hackers@freebsd.org Subject: Multiplexers Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've been interested in becomng a FreeBSD-Hacker for awhile now, and now that I have a pretty good understanding of C, I've been reading Tanenbaum's books on Computer Organization and Operating Systems. However, I've run into a problem on the digital-logic level of things. From my understanding, an 8-input Multiplexer takes in 8 inputs, as the book gives the example, each one points to a memory chip. The Multiplexer takes three controller inputs (i.e. 001, 110, 111) and causes all but one of the 8 inputs to become false The true one is gated into the output through an OR circuit. What I'm confused about, is how ORing the eight inputs together gates the output. If I'm not mistaken, if seven are 0 and one is 1, than ORing them together will produce a 1 (or a 0 if it's negative-logic) How does this gate the input to the output? Thanks. ------------------- XiRho, Faithful Apprentice-BSD Ninja bsd.ninja.cx To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 9:15:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from paradox.nexuslabs.com (cc718001-a.vron1.nj.home.com [24.11.70.21]) by hub.freebsd.org (Postfix) with ESMTP id 5420A14BFF for ; Mon, 17 Jan 2000 09:15:30 -0800 (PST) (envelope-from cyouse@paradox.nexuslabs.com) Received: from localhost (cyouse@localhost) by paradox.nexuslabs.com (8.9.3/8.9.3) with ESMTP id MAA15375 for ; Mon, 17 Jan 2000 12:21:07 -0500 (EST) (envelope-from cyouse@paradox.nexuslabs.com) Date: Mon, 17 Jan 2000 12:21:07 -0500 (EST) From: Charles Youse To: freebsd-hackers@freebsd.org Subject: PR/15656 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG As it turns out, the submitter of the PR has notified me that this PR was indeed created in error. No bug exists. Thanks for tuning in, Chuck To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 9:28:53 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by hub.freebsd.org (Postfix) with ESMTP id E06AD14D5E for ; Mon, 17 Jan 2000 09:28:49 -0800 (PST) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.9.3/8.9.1) with ESMTP id MAA19299; Mon, 17 Jan 2000 12:28:42 -0500 (EST) (envelope-from louie@whizzo.transsys.com) Message-Id: <200001171728.MAA19299@whizzo.transsys.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Charles Youse Cc: freebsd-hackers@FreeBSD.ORG From: "Louis A. Mamakos" Subject: Re: PR kern/15656 References: In-reply-to: Your message of "Mon, 17 Jan 2000 11:55:37 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 17 Jan 2000 12:28:42 -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Agreed; however, the PR states that should the checksum be 0xFFFF, the > complement of which is 0x0000, the checksum should still be sent as > 0xFFFF. Ok, I looked at the PR, which seems to refer to the TCP header checksum, rather than the checksum in the IP header. So please disregard the specific pointer to RFC-791. > Can anyone verify this? I can verify that BSD sends 0-checksums; I can't > on Solaris. For other than the intentional UDP-checksum is zero case (which shouldn't really occur), the stack shouldn't be sending checksums in the protocol headers valued 0x0000. Looking at the in_cksum code, it would appear that a test at the very final step might be necessary (if you presume that the intermediate computations might produce a -0). But that code is highly tuned, and more than a cursory examination is called for. louie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 9:41:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from m1.cybersurf.com (m1.cybersurf.com [205.160.242.195]) by hub.freebsd.org (Postfix) with ESMTP id 5EBBA14E4F for ; Mon, 17 Jan 2000 09:41:07 -0800 (PST) (envelope-from davism@cybersurf.com) Received: from m1.cybersurf.com (m1.cybersurf.com [205.160.242.195]) by m1.cybersurf.com (8.9.2/8.9.1) with ESMTP id MAA75575 for ; Mon, 17 Jan 2000 12:41:06 -0500 (EST) Date: Mon, 17 Jan 2000 12:41:06 -0500 (EST) From: Mark Davis To: freebsd-hackers@freebsd.org Subject: Re: Major number for PCDMX driver? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 16 Jan 2000, Doug Russell wrote: > > I've written a driver for SoundLight's PCDMX DMX512 boards. (DMX512 > > WooHoo! :) > I was hoping someone would get a DMX512 controller working before I had to > break down and do it myself. :) > > I've never seen a SoundLight board. PCI? Reasonably priced? > I actually thought I'd build my own board, but if they are reasonable, > this sounds like a great solution. They are great cards. I have one of the "C" cards (1024 in and 1024 out), and have been really pleased with it. Price was extremely reasonable, especially compared to some of the others out there. Their url is http://www.pcdmx.com/ > How much documentation do you have on the DMX512 protocol and the various > extensions used by many manufacturers? IIRC, you can buy a copy of the Best place I know for DMX info is Ujjal's pages: http://www.geocities.com/Broadway/2006/index.html http://www.xtalwind.net Mark Davis http://www.cybersurf.com davism@xtalwind.net davism@cybersurf.com http://www.buy-mouse.com Systems Administrator/Hardware Specialist http://www.cybersurf.com/cafe Crystal Wind Communications, Inc. http://www.mudworld.com The CyberSurf C@fe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 13:18: 4 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bytor.rush.net (bytor.rush.net [209.45.245.145]) by hub.freebsd.org (Postfix) with ESMTP id 8468F14F22 for ; Mon, 17 Jan 2000 13:18:02 -0800 (PST) (envelope-from lynch@bsd.unix.sh) Received: from localhost (lynch@localhost) by bytor.rush.net (8.9.3/8.9.3) with ESMTP id QAA02561; Mon, 17 Jan 2000 16:17:48 -0500 (EST) Date: Mon, 17 Jan 2000 16:17:48 -0500 (EST) From: Pat Lynch X-Sender: lynch@bytor.rush.net To: Wes Peters Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Hackers in space? In-Reply-To: <3882A8E7.46CDA822@softweyr.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG irc.megsinet.net is core.com -Cellechan __ Pat Lynch lynch@rush.net lynch@bsdunix.net lynch@unix.sh lynch@blowfi.sh Systems Administrator Rush Networking To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 13:21:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from calvin.saturn-tech.com (calvin.saturn-tech.com [207.229.19.6]) by hub.freebsd.org (Postfix) with ESMTP id A6D6114E6E for ; Mon, 17 Jan 2000 13:20:54 -0800 (PST) (envelope-from drussell@saturn-tech.com) Received: from localhost (drussell@localhost) by calvin.saturn-tech.com (8.8.8/8.8.8) with SMTP id OAA28337; Mon, 17 Jan 2000 14:20:09 -0700 (MST) (envelope-from drussell@saturn-tech.com) Date: Mon, 17 Jan 2000 14:20:09 -0700 (MST) From: Doug Russell To: Doug Russell Cc: Thierry Herbelot , Alex , hackers@FreeBSD.ORG Subject: Re: Anyone working on a DOMEX scsi driver ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I've just bought a Mustek SCSI scanner, and it is bundled with a > > seemingly very simple SCSI controller built by a DOMEX company (from > > Taiwan) > > Throw it away. > Throw it as far as you can, then drive over it with you car. :) > > > PS : the board identifier is DMX3191D - the chip itself seems to be a > > Domex536 > > There is a Linux driver for DMX 3192U PCI SCSI in > drivers/scsi/ini9100u.c, which suggests that it might be similar to the > Initio 9100 device. What are the exact device and vendor ID numbers? > (If you don't know, just send the output of "pciconf -l".) Hmmm. Now that I look at my boards, I see that they are DMX3181LE boards with a Domex 436P chip. Your board may be "smarter". These are small ISA boards with two jumpers -- PNP/PNR and 0WS/1WS. I'm now confused. On closer inspection, the board DOES have pins at B23-B25 (IRQ3-5) and D03-D06 (IRQ10,11,12,15), which are wired to the 436P, so I may be totally out to lunch here. If it's set up properly with PNP, maybe you can give it an interrupt line. Maybe you don't want to drive over it just yet. :) I can say, I've never actually seen a DMX3181LE actually use interrupts. Installing the card and supplied drivers under NT yields 100% processor usage while scanning (you can't even move the mouse). The card/driver combo also confuses NT an hour or two after rebooting. It fails to find the scanner attached to the Domex card, AND also my CD-ROM and CD-R drives on the separate NCR-810 SCSI bus! (That isn't quite true. It can still FIND the devices on the NCR, they just take FOREVER to access, like there is a 15 second timeout on each command. Kind of like the current interrupt problem with PCMCIA ep device losing interrupts.) It confuses the whole SCSI subsystem on NT anyway. BLECH! all around. Also, from sane-mustek(5): SCSI ADAPTER TIPS Mustek SCSI scanners are typically delivered with an ISA SCSI adapter. Unfortunately, that adapter is not worth much since it is not interrupt driven. It is (sometimes) possible to get the supplied card to work, but without interrupt line, scanning will put so much load on the sys- tem, that it becomes almost unusable for other tasks. If you already have a working SCSI controller in your sys- tem, you should consider that Mustek scanners do not sup- port the SCSI-2 disconnect/reconnect protocol and hence tie up the SCSI bus while a scan is in progress. This means that no other SCSI device on the same bus can be accessed while a scan is in progress. Because the Mustek-supplied adapter is not worth much and because Mustek scanners do not support the SCSI-2 discon- nect/reconnect protocol, it is recommended to install a separate (cheap) SCSI controller for Mustek scanners. For example, ncr810 based cards are known to work fine and cost as little as fifty US dollars. I've always liked that wording. "Not worth much". :) As I said before, the 1200LS, anyway, does allow disconnect/reconnect, so the paragraphs that follow about having to set up your SCSI controller to disable disconnect/reconnect, sync negotiation, and tagged command queueing don't apply to these recent models. YMMV, of course! Later...... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 13:44:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail4.aracnet.com (mail4.aracnet.com [216.99.193.36]) by hub.freebsd.org (Postfix) with ESMTP id 5B53514EEA for ; Mon, 17 Jan 2000 13:44:23 -0800 (PST) (envelope-from beattie@aracnet.com) Received: from shell1.aracnet.com (IDENT:root@shell1.aracnet.com [216.99.193.21]) by mail4.aracnet.com (8.9.3/8.9.3) with ESMTP id NAA25916; Mon, 17 Jan 2000 13:44:09 -0800 Received: from localhost by shell1.aracnet.com (8.9.3) id NAA32231; Mon, 17 Jan 2000 13:45:03 -0800 X-Authentication-Warning: shell1.aracnet.com: beattie owned process doing -bs Date: Mon, 17 Jan 2000 13:45:03 -0800 (PST) From: Brian Beattie To: "Ronald F. Guilmette" Cc: Jim Shankland , hackers@FreeBSD.ORG Subject: Re: "very dangerously dedicated mode" is In-Reply-To: <54647.947879091@monkeys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 14 Jan 2000, Ronald F. Guilmette wrote: > > One fact that I found out the hard way however... and that ISN'T in the > FAQ... is that if you have a SCSI drive that was low-level formatted > while your SCSI _controller_ was set with ``BIOS address translation'' > either on or off, and if you then _change_ this SCSI controller setting > (off -> on, or on -> off) and then try to use the previously-low-level- > formatted drive on the controller while it is set that way, you may per- > haps experience some grief. One reason it is not in the FAQ, is that the low-level formating of a SCSI drive is totally unrelated to the BIOS and/or it's notion of geometry. SCSI disks are accessed by logical block number only. What you may have been experienceing is a disk formatted with a block size != 512 bytes. It is possible to format (many/all) SCSI drives with a block size other than 512 bytes. > > I had one SCSI drive in a system that was working perfectly well, and > then I tried to add another _identical model_ drive from a different > system and every tool I used to tell me what the second drive believed > its geometry to be showed the geomery for the drive as being clearly > incorrect... according to the info contained in the FAQ page at the > above URL... for the current translation/non-translation setting of my > SCSI controller. > Brian Beattie | The only problem with beattie@aracnet.com | winning the rat race ... www.aracnet.com/~beattie | in the end you're still a rat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 15:58:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from aspirin.bulnet.com (ns1.bulnet.com [212.124.82.3]) by hub.freebsd.org (Postfix) with ESMTP id D4D3F14F89 for ; Mon, 17 Jan 2000 15:58:20 -0800 (PST) (envelope-from ian@bulinfo.net) Received: from cserv.oksys.bg (root@ppp12.bulnet.com [212.124.82.39]) by aspirin.bulnet.com (8.9.3/8.9.3) with ESMTP id BAA20357 for ; Tue, 18 Jan 2000 01:54:43 +0200 Received: from bulinfo.net (ian@localhost [127.0.0.1]) by cserv.oksys.bg (8.9.3/8.9.3) with ESMTP id BAA15236 for ; Tue, 18 Jan 2000 01:58:02 +0200 (EET) (envelope-from ian@bulinfo.net) Message-ID: <3883AC8A.7A6F7D5F@bulinfo.net> Date: Tue, 18 Jan 2000 01:58:02 +0200 From: Iani Brankov Organization: ok systems X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Subject: The stack size for a process? Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, after making world of a CURRENT cvsupped yesterday, one of my applications stopped working because of a Segmentation fault. The C procedure where the problem pops has about 64k local variables. here's the assembly output of the procedure's beginning: 0x805bb60 : pushl %ebp 0x805bb61 : movl %esp,%ebp 0x805bb63 : subl $0x1000c,%esp 0x805bb69 : pushl %edi The Segmentation fault happens when the process tries to push %edi in the stack, which has been just decreased by 0x1000c. here's the stack in the beginning of main(): esp 0xbfbfd744 ss 0x27 and after the fault: esp 0xbfacae68 ss 0x27 If I decrease the size of the local vars, it goes ok. It's interesting, because I made a simple test using 640k local vars, and it worked! void ab() { char buf[655360]; buf[0] = 0; buff[655359] = 0; } main () { ab(); } --iani To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 16:55:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id BD71F15018 for ; Mon, 17 Jan 2000 16:55:31 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id TAA17507; Mon, 17 Jan 2000 19:55:24 -0500 (EST) Date: Mon, 17 Jan 2000 19:55:24 -0500 (EST) From: Daniel Eischen Message-Id: <200001180055.TAA17507@pcnet1.pcnet.com> To: hackers@FreeBSD.ORG, ian@bulinfo.net Subject: Re: The stack size for a process? Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hi, > > after making world of a CURRENT cvsupped yesterday, one of my > applications stopped working because of a Segmentation fault. > > The C procedure where the problem pops has about 64k local variables. > here's the assembly output of the procedure's beginning: > > 0x805bb60 : pushl %ebp > 0x805bb61 : movl %esp,%ebp > 0x805bb63 : subl $0x1000c,%esp > 0x805bb69 : pushl %edi > > > The Segmentation fault happens when the process tries to push %edi in > the stack, which has been just decreased by 0x1000c. Are you using threads? Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 17: 6:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (mass.cdrom.com [204.216.28.184]) by hub.freebsd.org (Postfix) with ESMTP id 8205415072 for ; Mon, 17 Jan 2000 17:06:22 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id RAA02881; Mon, 17 Jan 2000 17:13:59 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <200001180113.RAA02881@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) Cc: freebsd-hackers@freebsd.org Subject: Re: Major number for PCDMX driver? In-reply-to: Your message of "16 Jan 2000 12:34:24 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Date: Mon, 17 Jan 2000 17:13:59 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > = > Hi, > = > I've written a driver for SoundLight's PCDMX DMX512 boards. (DMX512 > is a serial protocol used for driving theater and show lighting > systems.) I plan to make it available via SoundLight's web site. > = > The potential user base for this is not large enough to warrant > inclusion into the kernel (it's a kld), but having a reserved major > device number for it would maybe be nice. I don't know the exact > policy for this, so I'd appreciate if someone could tell me. I'm not > on freebsd-hackers, so please Cc me on anything that develops. Give us the name of your driver and we'll give you a number. 8) -- = \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 18:32: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 283ED14BD3 for ; Mon, 17 Jan 2000 18:32:03 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id SAA18439; Mon, 17 Jan 2000 18:31:47 -0800 (PST) (envelope-from dillon) Date: Mon, 17 Jan 2000 18:31:47 -0800 (PST) From: Matthew Dillon Message-Id: <200001180231.SAA18439@apollo.backplane.com> To: Iani Brankov Cc: hackers@FreeBSD.ORG Subject: Re: The stack size for a process? References: <3883AC8A.7A6F7D5F@bulinfo.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Hi, : :after making world of a CURRENT cvsupped yesterday, one of my :applications stopped working because of a Segmentation fault. : :The C procedure where the problem pops has about 64k local variables. :here's the assembly output of the procedure's beginning: : :0x805bb60 : pushl %ebp :0x805bb61 : movl %esp,%ebp :0x805bb63 : subl $0x1000c,%esp :0x805bb69 : pushl %edi : : :The Segmentation fault happens when the process tries to push %edi in :the stack, which has been just decreased by 0x1000c. : :here's the stack in the beginning of main(): :esp 0xbfbfd744 :ss 0x27 : :and after the fault: :esp 0xbfacae68 :ss 0x27 : :If I decrease the size of the local vars, it goes ok. : :It's interesting, because I made a simple test using 640k local vars, :and it worked! : :void ab() { : char buf[655360]; : buf[0] = 0; : buff[655359] = 0; :} : :main () { : ab(); :} : : :--iani At your csh prompt type 'limit'. If you are using bash type 'ulimit -a'. When I compile and run your program it works fine on my box. I tried compiling it -O0, -O1, and -O2. % cc x.c -o x -O0 % ./x % -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 18:37:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from aspirin.bulnet.com (ns1.bulnet.com [212.124.82.3]) by hub.freebsd.org (Postfix) with ESMTP id 82AF814CEA for ; Mon, 17 Jan 2000 18:37:07 -0800 (PST) (envelope-from ian@bulinfo.net) Received: from cserv.oksys.bg (root@ppp13.bulnet.com [212.124.82.40]) by aspirin.bulnet.com (8.9.3/8.9.3) with ESMTP id EAA21830; Tue, 18 Jan 2000 04:33:15 +0200 Received: from bulinfo.net (ian@localhost [127.0.0.1]) by cserv.oksys.bg (8.9.3/8.9.3) with ESMTP id EAA16685; Tue, 18 Jan 2000 04:36:43 +0200 (EET) (envelope-from ian@bulinfo.net) Message-ID: <3883D1BB.391C9F0C@bulinfo.net> Date: Tue, 18 Jan 2000 04:36:43 +0200 From: Iani Brankov Organization: ok systems X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Cc: Daniel Eischen Subject: Re: The stack size for a process? References: <200001180055.TAA17507@pcnet1.pcnet.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Eischen wrote: > > > Hi, > > > > after making world of a CURRENT cvsupped yesterday, one of my > > applications stopped working because of a Segmentation fault. > > > > The C procedure where the problem pops has about 64k local variables. > > here's the assembly output of the procedure's beginning: > > > > 0x805bb60 : pushl %ebp > > 0x805bb61 : movl %esp,%ebp > > 0x805bb63 : subl $0x1000c,%esp > > 0x805bb69 : pushl %edi > > > > > > The Segmentation fault happens when the process tries to push %edi in > > the stack, which has been just decreased by 0x1000c. > > Are you using threads? > Yes, it does. Do all the threads in a process use the same stack segment in some way? --iani To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 18:40:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from canonware.com (canonware.com [207.20.242.18]) by hub.freebsd.org (Postfix) with SMTP id 87DD314CEA for ; Mon, 17 Jan 2000 18:40:05 -0800 (PST) (envelope-from jasone@canonware.com) Received: (qmail 31504 invoked by uid 1001); 18 Jan 2000 02:39:03 -0000 Date: Mon, 17 Jan 2000 18:39:03 -0800 From: Jason Evans To: Iani Brankov Cc: hackers@freebsd.org, Daniel Eischen Subject: Re: The stack size for a process? Message-ID: <20000117183902.B27689@sturm.canonware.com> References: <200001180055.TAA17507@pcnet1.pcnet.com> <3883D1BB.391C9F0C@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3883D1BB.391C9F0C@bulinfo.net>; from ian@bulinfo.net on Tue, Jan 18, 2000 at 04:36:43AM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jan 18, 2000 at 04:36:43AM +0200, Iani Brankov wrote: > Daniel Eischen wrote: > > > > > Hi, > > > > > > after making world of a CURRENT cvsupped yesterday, one of my > > > applications stopped working because of a Segmentation fault. > > > > > > The C procedure where the problem pops has about 64k local variables. > > > here's the assembly output of the procedure's beginning: > > > > > > 0x805bb60 : pushl %ebp > > > 0x805bb61 : movl %esp,%ebp > > > 0x805bb63 : subl $0x1000c,%esp > > > 0x805bb69 : pushl %edi > > > > > > > > > The Segmentation fault happens when the process tries to push %edi in > > > the stack, which has been just decreased by 0x1000c. > > > > Are you using threads? > > > > Yes, it does. > Do all the threads in a process use the same stack segment in some > way? Thread stacks have a default size of 64kB. libc_r now uses growable stacks with "guard pages" between stacks to try to catch stack overflow. It looks like it did you some good. =) You will need to specify an alternate stack during thread creation to get around this size limit, or you can just use less stack space. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 18:50: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from aspirin.bulnet.com (ns1.bulnet.com [212.124.82.3]) by hub.freebsd.org (Postfix) with ESMTP id 9FAB414DDA for ; Mon, 17 Jan 2000 18:50:00 -0800 (PST) (envelope-from ian@bulinfo.net) Received: from cserv.oksys.bg (root@ppp13.bulnet.com [212.124.82.40]) by aspirin.bulnet.com (8.9.3/8.9.3) with ESMTP id EAA21973; Tue, 18 Jan 2000 04:46:12 +0200 Received: from bulinfo.net (ian@localhost [127.0.0.1]) by cserv.oksys.bg (8.9.3/8.9.3) with ESMTP id EAA18546; Tue, 18 Jan 2000 04:49:40 +0200 (EET) (envelope-from ian@bulinfo.net) Message-ID: <3883D4C4.E87573FC@bulinfo.net> Date: Tue, 18 Jan 2000 04:49:40 +0200 From: Iani Brankov Organization: ok systems X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Cc: Matthew Dillon Subject: Re: The stack size for a process? References: <3883AC8A.7A6F7D5F@bulinfo.net> <200001180231.SAA18439@apollo.backplane.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dillon wrote: [snip] > At your csh prompt type 'limit'. If you are using bash type 'ulimit -a'. > > When I compile and run your program it works fine on my box. I tried > compiling it -O0, -O1, and -O2. > > % cc x.c -o x -O0 > % ./x > % Here's the ~>ulimit -a core file size (blocks) unlimited data seg size (kbytes) 524288 file size (blocks) unlimited max locked memory (kbytes) unlimited max memory size (kbytes) unlimited open files 2088 pipe size (512 bytes) 1 stack size (kbytes) 65536 cpu time (seconds) unlimited max user processes 1043 virtual memory (kbytes) 589824 The machine has enough RAM & swap space. (256/512MB) I feel Daniel is right. The problem can be in the fact that it uses threads. I don't know do the threads share share the same stack space and how. My main point was that the application worked before `making the world'. Thanks, --iani To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 18:55:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from aspirin.bulnet.com (ns1.bulnet.com [212.124.82.3]) by hub.freebsd.org (Postfix) with ESMTP id 91E0B14E04 for ; Mon, 17 Jan 2000 18:55:34 -0800 (PST) (envelope-from ian@bulinfo.net) Received: from cserv.oksys.bg (root@ppp13.bulnet.com [212.124.82.40]) by aspirin.bulnet.com (8.9.3/8.9.3) with ESMTP id EAA22025; Tue, 18 Jan 2000 04:51:38 +0200 Received: from bulinfo.net (ian@localhost [127.0.0.1]) by cserv.oksys.bg (8.9.3/8.9.3) with ESMTP id EAA19340; Tue, 18 Jan 2000 04:55:06 +0200 (EET) (envelope-from ian@bulinfo.net) Message-ID: <3883D60A.BA0BAF37@bulinfo.net> Date: Tue, 18 Jan 2000 04:55:06 +0200 From: Iani Brankov Organization: ok systems X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Cc: Jason Evans Subject: Re: The stack size for a process? References: <200001180055.TAA17507@pcnet1.pcnet.com> <3883D1BB.391C9F0C@bulinfo.net> <20000117183902.B27689@sturm.canonware.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jason Evans wrote: [snip] > > Thread stacks have a default size of 64kB. libc_r now uses growable stacks > with "guard pages" between stacks to try to catch stack overflow. It looks > like it did you some good. =) > > You will need to specify an alternate stack during thread creation to get > around this size limit, or you can just use less stack space. > Thank you very much! That explains everything. The problem's in my tv set (as we say here) and I'll fix the picture :) --iani To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 19:27:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 78B1D150CF for ; Mon, 17 Jan 2000 19:27:20 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id TAA18698; Mon, 17 Jan 2000 19:27:11 -0800 (PST) (envelope-from dillon) Date: Mon, 17 Jan 2000 19:27:11 -0800 (PST) From: Matthew Dillon Message-Id: <200001180327.TAA18698@apollo.backplane.com> To: Iani Brankov Cc: hackers@FreeBSD.ORG, Jason Evans Subject: Re: The stack size for a process? References: <200001180055.TAA17507@pcnet1.pcnet.com> <3883D1BB.391C9F0C@bulinfo.net> <20000117183902.B27689@sturm.canonware.com> <3883D60A.BA0BAF37@bulinfo.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Jason Evans wrote: : :[snip] : :> :> Thread stacks have a default size of 64kB. libc_r now uses growable stacks :> with "guard pages" between stacks to try to catch stack overflow. It looks :> like it did you some good. =) :> :> You will need to specify an alternate stack during thread creation to get :> around this size limit, or you can just use less stack space. :> : :Thank you very much! :That explains everything. : :The problem's in my tv set (as we say here) and I'll fix the picture ::) : :--iani Heh heh. I have a feeling that we're going to see more of these sorts of problems crop up (over-extending stacks, making assumptions about compiler optimizations) as more and more people try to do threads programming and fewer and fewer of them have the small-systems background to realize that there are in fact stack and compiler optimization issuesl -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 19:58:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id A06BC1509F for ; Mon, 17 Jan 2000 19:58:09 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from vigrid.com (pm3-pt34.pcnet.net [206.105.29.108]) by pcnet1.pcnet.com (8.8.7/PCNet) with ESMTP id WAA08243; Mon, 17 Jan 2000 22:54:39 -0500 (EST) Message-ID: <3883E3E3.9E67C83@vigrid.com> Date: Mon, 17 Jan 2000 22:54:11 -0500 From: "Daniel M. Eischen" X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Iani Brankov Cc: hackers@FreeBSD.ORG, Matthew Dillon Subject: Re: The stack size for a process? References: <3883AC8A.7A6F7D5F@bulinfo.net> <200001180231.SAA18439@apollo.backplane.com> <3883D4C4.E87573FC@bulinfo.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Iani Brankov wrote: > > Matthew Dillon wrote: > > [snip] > > > At your csh prompt type 'limit'. If you are using bash type 'ulimit -a'. > > > > When I compile and run your program it works fine on my box. I tried > > compiling it -O0, -O1, and -O2. > > > > % cc x.c -o x -O0 > > % ./x > > % > > Here's the > > ~>ulimit -a > core file size (blocks) unlimited > data seg size (kbytes) 524288 > file size (blocks) unlimited > max locked memory (kbytes) unlimited > max memory size (kbytes) unlimited > open files 2088 > pipe size (512 bytes) 1 > stack size (kbytes) 65536 > cpu time (seconds) unlimited > max user processes 1043 > virtual memory (kbytes) 589824 > > The machine has enough RAM & swap space. (256/512MB) > > I feel Daniel is right. The problem can be in the fact that it uses > threads. > I don't know do the threads share share the same stack space and how. > > My main point was that the application worked before `making the > world'. The stack allocation algorithm in the threads library was fixed - it used to leave an extra page of stack unmapped. So you could have been getting one more page of stack than what you are getting now. By default, you should get 64KB of stack per thread, and 1MB of stack for the main thread. Use pthread_attr_setstacksize() to specify a size larger than the default. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 20:27:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from maxwell.syr.edu (maxwell.syr.edu [128.230.129.5]) by hub.freebsd.org (Postfix) with ESMTP id 9901014BD8 for ; Mon, 17 Jan 2000 20:27:34 -0800 (PST) (envelope-from cmsedore@maxwell.syr.edu) Received: from qwerty.maxwell.syr.edu (qwerty.maxwell.syr.edu [128.230.129.248]) by maxwell.syr.edu (8.9.3/8.9.1) with ESMTP id EAA90719 for ; Tue, 18 Jan 2000 04:27:34 GMT Date: Mon, 17 Jan 2000 23:27:33 -0500 (EST) From: Chris Sedore To: freebsd-hackers@FreeBSD.ORG Subject: Re: Concept check: iothreads addition to pthreads for MYSQL+FreeBSD. In-Reply-To: <77EC013A8765D311974D00A0C9B413A1013A86E9-100000@exchange.maxwell.syr.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 10 Jan 2000, Chris Sedore wrote: > > > On Mon, 10 Jan 2000 jasone@canonware.com wrote: > > [...] > > > 1) Does this seem like a reasonable approach? [It _works_, and well. But > > > it tastes strongly of hack.] > > > > I'm not very fond of this approach to the problem, though it can work, as > > you note. Asynchronous I/O is in my opinion a much cleaner solution. > > > > > 2) Does anyone have suggestions for a solution that will be cleaner and > > > won't take man-months to implement? [Which is the redeeming quality of > > > what I've got - it took me two days to zero in on a very workable > > > solution.] > > > > Have you tried the linuxthreads port lately? With linuxthreads, each > > thread is an rfork()ed process, which means that blocking on file I/O only > > blocks the thread that attempts the I/O. There are various > > advantages/disadvantages between libc_r and linuxthreads, but you may find > > linuxthreads to meet your needs at the moment. > > > > > 3) Is anyone working on something I might leverage off of in this area? > > > [For instance, a select()-based interface to async I/O? Or support for > > > blocking disk I/O in select() and read()?] > > > > Though not ideal, it seems to me that using asynchronous I/O will work > > reasonably well inside libc_r. If there weren't plans to build a much more > > scalable threads library than what we currently have, this modification > > would be high on my priority list. > > I was just poking around a bit, and I don't think it would take too much > to add an aio_select() call, that would do an async io select (that is, > queue a select as just another aio operation). I've cheated around this > a bit, since you can get away (for instance) with executing an aio_read() > against a listening socket, waiting for the completion (an error, since > you can't read from such a thing), then doing the accept(). > > It seems that a fair amount of benefit could be had from async select, > since it would facilitate using aio in pthreads, innd, etc, which were > originally designed for select(), but might like to add async io for disk > operations. > > Maybe it is just bloat in the long-run, since with kernel threads one > could just fire off another thread to do select(). Or maybe someone will > pipe up and say that select() won't work that way (i.e., just pass in the > select parameters and let one of the aiod's call select() on behalf of > the main process). (yes, I'm following up on my own message) I had some free time this weekend, so I wrote aio_select. It basically allows you to call select asynchronously, and pickup results the same way you would for aio_read or aio_write. It might be just the write kind of solution for the problem(s) above. The implementation is not what I'd call ideal, mostly because I wanted to get on to aio_cancel. I did finish a reasonable implementation of aio_cancel, which should fill out FreeBSD aio routines to be reasonably POSIX compliant. We're in 'feature freeze' for now, so I'm guessing that it will be a while before aio_cancel gets checked in. -Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 23: 4:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.mrf.mail.rcn.net (smtp01.mrf.mail.rcn.net [207.172.4.60]) by hub.freebsd.org (Postfix) with ESMTP id BA22114C57 for ; Mon, 17 Jan 2000 23:03:05 -0800 (PST) (envelope-from archer@lucky.net) Received: from 207-172-201-100.s37.as2.xnb.nj.dialup.rcn.com ([207.172.201.100] helo=unknown.nowhere.org) by smtp01.mrf.mail.rcn.net with esmtp (Exim 2.12 #3) id 12ASfO-0007cD-00; Tue, 18 Jan 2000 02:03:03 -0500 Received: (from archer@localhost) by unknown.nowhere.org (8.9.3/8.9.3) id BAA31397; Tue, 18 Jan 2000 01:25:34 -0500 (EST) (envelope-from archer) Date: Tue, 18 Jan 2000 01:25:34 -0500 (EST) Message-Id: <200001180625.BAA31397@unknown.nowhere.org> From: Alexander Litvin To: "Daniel M. Eischen" , hackers@freebsd.org Subject: Re: Preemptiveness of FreeBSD threads X-Newsgroups: unknown.freebsd.hackers In-Reply-To: <388308FC.21812070@vigrid.com> User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (FreeBSD/4.0-CURRENT (i386)) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <388308FC.21812070@vigrid.com> you wrote: > OK, with everyones help (well, waiting for the right time of day ;-)), I > was able to reproduce this. The initial threads last active time was > not getting initialized to a sane value, causing negative computations > of the threads timeslice depending on what time of day it was. Funny > thing was that I added this change several times, but each time I somehow > convinced myself that it wasn't needed. > Try this patch - you may have to hand apply it as my sources are not > yet up to date with the last round of changes that Jason made. > Dan Eischen > eischen@vigrid.com [patch skipped] Yep, that seems to be it. No moon-dependent irregularities ;) Thanks! --- I really hate this damned machine I wish that they would sell it. It never does quite what I want But only what I tell it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Jan 17 23:38:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mgo.iij.ad.jp (mgo.iij.ad.jp [202.232.15.6]) by hub.freebsd.org (Postfix) with ESMTP id 8A8E214CAF for ; Mon, 17 Jan 2000 23:38:36 -0800 (PST) (envelope-from shigeru@iij.ad.jp) Received: from ns.iij.ad.jp (root@ns.iij.ad.jp [192.168.2.8]) by mgo.iij.ad.jp (8.8.8/MGO1.0) with ESMTP id QAA20521 for ; Tue, 18 Jan 2000 16:38:34 +0900 (JST) Received: from fs.iij.ad.jp (root@fs.iij.ad.jp [192.168.2.9]) by ns.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id QAA05575 for ; Tue, 18 Jan 2000 16:38:34 +0900 (JST) Received: from mercury.iij.ad.jp (root@mercury.iij.ad.jp [192.168.4.89]) by fs.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id QAA00113 for ; Tue, 18 Jan 2000 16:38:34 +0900 (JST) Received: from localhost (shigeru@localhost [127.0.0.1]) by mercury.iij.ad.jp (8.9.3/3.5W) with ESMTP id QAA24281 for ; Tue, 18 Jan 2000 16:38:33 +0900 (JST) To: freebsd-hackers@FreeBSD.ORG Subject: how to allocate an alined address for a device? X-Mailer: Mew version 1.93b38 on XEmacs 21.2 (Shinjuku) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000118163832A.shigeru@iij.ad.jp> Date: Tue, 18 Jan 2000 16:38:32 +0900 From: YAMAMOTO Shigeru X-Dispatcher: imput version 991025(IM133) Lines: 18 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have a question about a resource allocation for a device. In a CardBus system, a start address of status register must be aligned on 4KB boundaries. Such kind of address alignment is required at mapping meory window, expansion ROM and etc. I think we use bus_alloc_resource() to map a memory on a device. But it seems me that bus_alloc_resource() never guarantees to allocate an aligned address. How to allocate an aligned address to map a memory on a device? Thanks, ------- YAMAMOTO Shigeru Internet Initiative Japan Inc. Network Engineering Div. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 0:44:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oskar.dev.nanoteq.co.za (oskar.dev.nanoteq.co.za [196.7.114.5]) by hub.freebsd.org (Postfix) with ESMTP id 259E814DBF for ; Tue, 18 Jan 2000 00:44:01 -0800 (PST) (envelope-from rbezuide@oskar.dev.nanoteq.co.za) Received: (from rbezuide@localhost) by oskar.dev.nanoteq.co.za (8.9.3/8.9.0) id KAA05670; Tue, 18 Jan 2000 10:43:18 +0200 (SAT) From: Reinier Bezuidenhout Message-Id: <200001180843.KAA05670@oskar.dev.nanoteq.co.za> Subject: Re: Preemptiveness of FreeBSD threads In-Reply-To: from ROGIER MULHUIJZEN at "Jan 17, 2000 4:39:22 pm" To: MULHUIJZEN@PZH.NL (ROGIER MULHUIJZEN) Date: Tue, 18 Jan 2000 10:43:18 +0200 (SAT) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >OK, with everyones help (well, waiting for the right time of day ;-)), > I > >was able to reproduce this. The initial threads last active time was > >not getting initialized to a sane value, causing negative > computations > >of the threads timeslice depending on what time of day it was. Funny > >thing was that I added this change several times, but each time I > somehow > >convinced myself that it wasn't needed. > > >Try this patch - you may have to hand apply it as my sources are not > >yet up to date with the last round of changes that Jason made. > > >Dan Eischen > >eischen@vigrid.com Will this patch be patched back to RELENG_3 too ?? We have quite a few applications that use threads :) Reinier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 2:16:33 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rencong.unsyiah.ac.id (rencong.unsyiah.ac.id [167.205.153.84]) by hub.freebsd.org (Postfix) with SMTP id 39A03150B6 for ; Tue, 18 Jan 2000 02:15:34 -0800 (PST) (envelope-from mahyus@rencong.unsyiah.ac.id) Received: (qmail 26083 invoked by uid 1009); 18 Jan 2000 12:18:25 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 18 Jan 2000 12:18:25 -0000 Date: Tue, 18 Jan 2000 19:18:25 +0700 (JAVT) From: Mahyus To: freebsd-hackers@FreeBSD.org Subject: please to subscribe my email address Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG subscribe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 2:20:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtppzh.pzh.nl (webshield.pzh.nl [194.178.168.50]) by hub.freebsd.org (Postfix) with SMTP id 2CA2514ED9 for ; Tue, 18 Jan 2000 02:20:41 -0800 (PST) (envelope-from MULHUIJZEN@PZH.NL) Received: FROM smtp.pzh.nl BY smtppzh.pzh.nl ; Tue Jan 18 11:19:57 2000 0000 Received: from PZH40-1-Message_Server by smtp.pzh.nl with Novell_GroupWise; Tue, 18 Jan 2000 11:20:03 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Tue, 18 Jan 2000 11:20:00 +0100 From: "ROGIER MULHUIJZEN" To: , Subject: Re: please to subscribe my email address Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Please RTFM at http://www.freebsd.org/handbook/eresources.html#ERESOURCES-MAIL DocWilco >>> Mahyus 01/18 1:18 PM >>> subscribe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 3:37:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 2A50B14FEA for ; Tue, 18 Jan 2000 03:37:28 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id GAA25216; Tue, 18 Jan 2000 06:37:13 -0500 (EST) Date: Tue, 18 Jan 2000 06:37:13 -0500 (EST) From: Daniel Eischen Message-Id: <200001181137.GAA25216@pcnet1.pcnet.com> To: archer@lucky.net, eischen@vigrid.com, hackers@freebsd.org Subject: Re: Preemptiveness of FreeBSD threads Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alexander Litvin wrote: > > Try this patch - you may have to hand apply it as my sources are not > > yet up to date with the last round of changes that Jason made. > > > Dan Eischen > > eischen@vigrid.com > > [patch skipped] > > Yep, that seems to be it. No moon-dependent irregularities ;) > > Thanks! OK, it's been committed. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 3:40: 3 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 0C24915127 for ; Tue, 18 Jan 2000 03:40:01 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id GAA25392; Tue, 18 Jan 2000 06:39:47 -0500 (EST) Date: Tue, 18 Jan 2000 06:39:47 -0500 (EST) From: Daniel Eischen Message-Id: <200001181139.GAA25392@pcnet1.pcnet.com> To: MULHUIJZEN@PZH.NL, rbezuide@oskar.dev.nanoteq.co.za Subject: Re: Preemptiveness of FreeBSD threads Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Reinier Bezuidenhout wrote: > > >OK, with everyones help (well, waiting for the right time of day ;-)), > > I > > >was able to reproduce this. The initial threads last active time was > > >not getting initialized to a sane value, causing negative > > computations > > >of the threads timeslice depending on what time of day it was. Funny > > >thing was that I added this change several times, but each time I > > somehow > > >convinced myself that it wasn't needed. > > > > >Try this patch - you may have to hand apply it as my sources are not > > >yet up to date with the last round of changes that Jason made. > > > > >Dan Eischen > > >eischen@vigrid.com > > Will this patch be patched back to RELENG_3 too ?? We have quite a few > applications that use threads :) In a week or two. I just committed the fix to -current, and the rule is to wait a week or two before MFC. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 7:24:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail4.aracnet.com (mail4.aracnet.com [216.99.193.36]) by hub.freebsd.org (Postfix) with ESMTP id 3C39714E89 for ; Tue, 18 Jan 2000 07:24:29 -0800 (PST) (envelope-from beattie@aracnet.com) Received: from shell1.aracnet.com (IDENT:root@shell1.aracnet.com [216.99.193.21]) by mail4.aracnet.com (8.9.3/8.9.3) with ESMTP id HAA11208; Tue, 18 Jan 2000 07:24:23 -0800 Received: from localhost by shell1.aracnet.com (8.9.3) id HAA14308; Tue, 18 Jan 2000 07:25:20 -0800 X-Authentication-Warning: shell1.aracnet.com: beattie owned process doing -bs Date: Tue, 18 Jan 2000 07:25:20 -0800 (PST) From: Brian Beattie To: Daniel Eischen Cc: MULHUIJZEN@PZH.NL, rbezuide@oskar.dev.nanoteq.co.za, hackers@FreeBSD.ORG Subject: Re: Preemptiveness of FreeBSD threads In-Reply-To: <200001181139.GAA25392@pcnet1.pcnet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 18 Jan 2000, Daniel Eischen wrote: > In a week or two. I just committed the fix to -current, and the rule > is to wait a week or two before MFC. MFC? Could somebody expand this TLA for me, I'm sure it will be obvious once I see it, thanks Brian Beattie | The only problem with beattie@aracnet.com | winning the rat race ... www.aracnet.com/~beattie | in the end you're still a rat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 7:26:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.Technion.AC.IL (csa.cs.technion.ac.il [132.68.32.1]) by hub.freebsd.org (Postfix) with ESMTP id 713C314DAA for ; Tue, 18 Jan 2000 07:26:15 -0800 (PST) (envelope-from nadav@cs.technion.ac.il) Received: from csd.cs.technion.ac.il (csd.cs.technion.ac.il [132.68.32.8]) by cs.Technion.AC.IL (8.9.0/8.9.0) with ESMTP id RAA28984; Tue, 18 Jan 2000 17:26:12 +0200 (IST) Received: from localhost (nadav@localhost) by csd.cs.technion.ac.il (8.9.3/8.9.0) with SMTP id RAA19423; Tue, 18 Jan 2000 17:26:11 +0200 (IST) X-Authentication-Warning: csd.cs.technion.ac.il: nadav owned process doing -bs Date: Tue, 18 Jan 2000 17:26:11 +0200 (IST) From: Nadav Eiron X-Sender: nadav@csd To: Brian Beattie Cc: Daniel Eischen , MULHUIJZEN@PZH.NL, rbezuide@oskar.dev.nanoteq.co.za, hackers@freebsd.org Subject: Re: Preemptiveness of FreeBSD threads In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 18 Jan 2000, Brian Beattie wrote: > On Tue, 18 Jan 2000, Daniel Eischen wrote: > > > In a week or two. I just committed the fix to -current, and the rule > > is to wait a week or two before MFC. > > MFC? > > Could somebody expand this TLA for me, I'm sure it will be obvious once I > see it, thanks http://www.freebsd.org/FAQ/misc.html#AEN3577 > > Brian Beattie | The only problem with > beattie@aracnet.com | winning the rat race ... > www.aracnet.com/~beattie | in the end you're still a rat > > Nadav To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 8:40:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from super-g.com (super-g.com [207.240.140.161]) by hub.freebsd.org (Postfix) with ESMTP id 0EE5F14C09 for ; Tue, 18 Jan 2000 08:40:31 -0800 (PST) (envelope-from spork@super-g.com) Received: by super-g.com (Postfix, from userid 1000) id 7B6AB10E61; Tue, 18 Jan 2000 11:40:29 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by super-g.com (Postfix) with SMTP id 5D04710E60; Tue, 18 Jan 2000 11:40:29 -0500 (EST) Date: Tue, 18 Jan 2000 11:40:29 -0500 (EST) From: spork X-Sender: spork@super-g.inch.com To: freebsd-hackers@freebsd.org Cc: noc@inch.com Subject: high load, nothing happening? (LONG) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I'm trying my luck over here at -hackers, I already posted to -questions and -isp without any resolution. I'm including my original post and below that a summary of some responses and my answers... The bulk of the recent answers seem to say "you should see a load of 3.0 on a machine with 500 processes", but I don't quite agree as I have other similar machines that are in production that don't even approach a load of 1.0 with 3-400 processes. I can only assume something is wrong somewhere... You all are my last hope... [begin orginal post] We just built a large webserver machine (PII-450, 896MB RAM, 30-odd G of Mylex RAID, 3.3-R) that constantly runs a load of from 1 to 3, even though it's not doing anything (still sitting as a staging server). The initial startup is also very slow; after about 40 of the servers start there's about a 15 second pause, then another 40, pause, etc... This box is running about 170 virtual hosts (and a full class C of addresses aliased to fxp0) under Apache 1.3.9, with each vhost running as it's own user and starting 3 servers at startup, so there are a large *number* of processes, but no swapping with about half a gig of RAM left free. I have maxusers at 512, NMBCLUSTERS at 4096, and the following sysctl adjustments: kern.maxproc: 8212 kern.maxfiles: 100000 kern.maxfilesperproc: 16424 kern.maxprocperuid: 8211 kern.ipc.somaxconn: 512 This is all gathered from various "tuning for a big webserver" posts from the various FBSD lists. systat, vmstat, iostat all look normal, and I've not seen any curious entries in the logs. So that's the info, my questions are "why the load", and "is that OK"? Something seems wrong here, but I'm at a loss. Any ideas where to start looking? [followup #1] > What does top(1) report? last pid: 23684; load averages: 3.74, 1.96, 1.46 up 7+21:10:15 10:35:38 449 processes: 1 running, 448 sleeping CPU states: 0.0% user, 0.0% nice, 2.7% system, 0.0% interrupt, 97.3% idle Mem: 62M Active, 355M Inact, 45M Wired, 8350K Buf, 418M Free Swap: 784M Total, 784M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 23684 root 30 0 1976K 944K RUN 0:00 3.08% 0.29% top 904 root 2 -12 1036K 720K select 0:31 0.00% 0.00% xntpd 4163 root 2 0 1468K 1096K select 0:13 0.00% 0.00% httpd-apache_1 3399 root 2 0 1468K 1096K select 0:13 0.00% 0.00% httpd-apache_1 [followup #2] > that value for NMBCLUSTERS is going to be lower than what maxusers at > 512sets it to, try 16384 or leave it up to maxusers. [followup #3] > Hum....that could certainly contribute to load. Have you checked vmstat ^^^^ (he's referring to the number of processes) > to see what the system calls are like (frequency that is). Nothing's blocked, and the other numbers look very similar to much smaller boxes doing nothing: procs memory page disks faults cpu r b w avm fre flt re pi po fr sr da0 fd0 pa0 in sy cs us sy id 0 0 0 106760426976 2 0 0 0 2 0 0 0 0 230 474 155 0 0 99 0 0 0 106760426976 4 0 0 0 0 0 0 0 0 233 408 136 0 2 98 0 0 0 106760426976 3 0 0 0 0 0 0 0 0 235 408 136 0 2 98 [followup #4] > what ???? > you are asking why high load ??? > don;t you see you have 500 processes on your box ?? > it's normal to have 3 of load average if you got 500 processes! Here's a snippet from a shell/web server that is doing actual work. It has less memory, a slower processor and a number of interactive users. The load however rarely climbs above 1.0 unless a process goes runaway: last pid: 25042; load averages: 0.38, 0.35, 0.63 13:26:43 301 processes: 1 running, 300 sleeping CPU states: 0.4% user, 0.0% nice, 0.8% system, 0.8% interrupt, 98.1% idle Mem: 119M Active, 44M Inact, 36M Wired, 34M Cache, 6027K Buf, 17M Free Swap: 640M Total, 37M Used, 603M Free, 6% Inuse PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 25040 root 28 0 844K 1120K RUN 0:00 1.89% 0.34% top 24823 freddy 2 0 4180K 2964K select 0:00 0.23% 0.23% pine4.21 24919 byman 3 0 796K 1040K ttyin 0:00 0.04% 0.04% tcsh 24537 inch_hom 2 0 640K 872K sbwait 0:00 0.04% 0.04%httpd-1.3.3-us So I'd kind of assume I wouldn't see a radical difference between a machine with 500 idle processes and one that's running 300 and is in active use... So if anyone even has a similarly configured box, I'd love to hear from you. I feel something is wrong here, but I can't find it... Thanks, Charles To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 8:51: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 0673F14F9E for ; Tue, 18 Jan 2000 08:51:04 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id KAA82336; Tue, 18 Jan 2000 10:51:00 -0600 (CST) (envelope-from dan) Date: Tue, 18 Jan 2000 10:51:00 -0600 From: Dan Nelson To: spork Cc: freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) Message-ID: <20000118105100.A79849@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from "spork" on Tue Jan 18 11:40:29 GMT 2000 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jan 18), spork said: > I'm trying my luck over here at -hackers, I already posted to > -questions and -isp without any resolution. I'm including my > original post and below that a summary of some responses and my > answers... The bulk of the recent answers seem to say "you should > see a load of 3.0 on a machine with 500 processes", but I don't quite > agree as I have other similar machines that are in production that > don't even approach a load of 1.0 with 3-400 processes. I can only > assume something is wrong somewhere... You all are my last hope... Considering that top is reporting CPU states: 0.0% user, 0.0% nice, 2.7% system, 0.0% interrupt, 97.3% idle I'm not sure what the problem is. You're 97% idle. Maybe the hosted web sites on this machine are slightly more active than the ones on the other box. You could always manually panic the box and see what those three processes on the run queue are, but it doesn't seem to be worth the effort. > [begin orginal post] > We just built a large webserver machine (PII-450, 896MB RAM, 30-odd G of > Mylex RAID, 3.3-R) that constantly runs a load of from 1 to 3, even though > it's not doing anything (still sitting as a staging server). The initial > startup is also very slow; after about 40 of the servers start there's > about a 15 second pause, then another 40, pause, etc... 15 second pause as the system does what? Hit ^T to see what the currently running process on the console is, tcpdump the network link and see if you're hanging on a DNS lookup, run "top < /dev/ttyv2 > /dev/ttyv2&" at the top of /etc/rc and see if something's hogging cpu. > 449 processes: 1 running, 448 sleeping > CPU states: 0.0% user, 0.0% nice, 2.7% system, 0.0% interrupt, 97.3% idle > Mem: 62M Active, 355M Inact, 45M Wired, 8350K Buf, 418M Free > Swap: 784M Total, 784M Free > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > 23684 root 30 0 1976K 944K RUN 0:00 3.08% 0.29% top > 904 root 2 -12 1036K 720K select 0:31 0.00% 0.00% xntpd > 4163 root 2 0 1468K 1096K select 0:13 0.00% 0.00% httpd-apache_1 > 3399 root 2 0 1468K 1096K select 0:13 0.00% 0.00% httpd-apache_1 > Here's a snippet from a shell/web server that is doing actual work. It > has less memory, a slower processor and a number of interactive users. > The load however rarely climbs above 1.0 unless a process goes runaway: > > last pid: 25042; load averages: 0.38, 0.35, 0.63 13:26:43 > 301 processes: 1 running, 300 sleeping > CPU states: 0.4% user, 0.0% nice, 0.8% system, 0.8% interrupt, 98.1% idle > Mem: 119M Active, 44M Inact, 36M Wired, 34M Cache, 6027K Buf, 17M Free > Swap: 640M Total, 37M Used, 603M Free, 6% Inuse > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > 25040 root 28 0 844K 1120K RUN 0:00 1.89% 0.34% top > 24823 freddy 2 0 4180K 2964K select 0:00 0.23% 0.23% pine4.21 > 24919 byman 3 0 796K 1040K ttyin 0:00 0.04% 0.04% tcsh > 24537 inch_hom 2 0 640K 872K sbwait 0:00 0.04% 0.04% httpd-1.3.3-us You're running a different httpd here. Try moving the binary from this machine over to the other one and see if the loadavg drops. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 9:22:58 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from houston.matchlogic.com (houston.matchlogic.com [205.216.147.127]) by hub.freebsd.org (Postfix) with ESMTP id B31C014D5F for ; Tue, 18 Jan 2000 09:22:54 -0800 (PST) (envelope-from crandall@matchlogic.com) Received: by houston.matchlogic.com with Internet Mail Service (5.5.2650.21) id ; Tue, 18 Jan 2000 10:22:52 -0700 Message-ID: <64003B21ECCAD11185C500805F31EC0304D9754B@houston.matchlogic.com> From: Charles Randall To: hackers@freebsd.org Subject: RE: The stack size for a process? Date: Tue, 18 Jan 2000 10:22:46 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG From: Jason Evans [mailto:jasone@canonware.com] >Thread stacks have a default size of 64kB. As you know, stack size can be explicitly set using pthread_attr_setstacksize(). However, note that Solaris uses a pthread stack size of 1 MB. Porter beware. >libc_r now uses growable stacks with "guard pages" between stacks >to try to catch stack overflow. In this case, is there a message printed to the console or syslog that tells the programmer/sysadmin what's happening? Charles To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 10:57:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from super-g.com (super-g.com [207.240.140.161]) by hub.freebsd.org (Postfix) with ESMTP id 4846214C26 for ; Tue, 18 Jan 2000 10:57:54 -0800 (PST) (envelope-from spork@super-g.com) Received: by super-g.com (Postfix, from userid 1000) id F3D3C10E60; Tue, 18 Jan 2000 13:57:50 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by super-g.com (Postfix) with SMTP id D81BC10E4C; Tue, 18 Jan 2000 13:57:50 -0500 (EST) Date: Tue, 18 Jan 2000 13:57:50 -0500 (EST) From: spork X-Sender: spork@super-g.inch.com To: Dan Nelson Cc: freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) In-Reply-To: <20000118105100.A79849@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 18 Jan 2000, Dan Nelson wrote: > In the last episode (Jan 18), spork said: > I'm not sure what the problem is. You're 97% idle. Maybe the hosted > web sites on this machine are slightly more active than the ones on the > other box. You could always manually panic the box and see what those > three processes on the run queue are, but it doesn't seem to be worth > the effort. That's another thing, the box is idle as we've yet to move it into production. Out of curiousity, how does one make a machine panic manually? I'll investigate throwing another httpd on there as well to see what happens... Thanks, Charles > > [begin orginal post] > > We just built a large webserver machine (PII-450, 896MB RAM, 30-odd G of > > Mylex RAID, 3.3-R) that constantly runs a load of from 1 to 3, even though > > it's not doing anything (still sitting as a staging server). The initial > > startup is also very slow; after about 40 of the servers start there's > > about a 15 second pause, then another 40, pause, etc... > > 15 second pause as the system does what? Hit ^T to see what the > currently running process on the console is, tcpdump the network link > and see if you're hanging on a DNS lookup, run "top < /dev/ttyv2 > /dev/ttyv2&" > at the top of /etc/rc and see if something's hogging cpu. > > > 449 processes: 1 running, 448 sleeping > > CPU states: 0.0% user, 0.0% nice, 2.7% system, 0.0% interrupt, 97.3% idle > > Mem: 62M Active, 355M Inact, 45M Wired, 8350K Buf, 418M Free > > Swap: 784M Total, 784M Free > > > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > > 23684 root 30 0 1976K 944K RUN 0:00 3.08% 0.29% top > > 904 root 2 -12 1036K 720K select 0:31 0.00% 0.00% xntpd > > 4163 root 2 0 1468K 1096K select 0:13 0.00% 0.00% httpd-apache_1 > > 3399 root 2 0 1468K 1096K select 0:13 0.00% 0.00% httpd-apache_1 > > > Here's a snippet from a shell/web server that is doing actual work. It > > has less memory, a slower processor and a number of interactive users. > > The load however rarely climbs above 1.0 unless a process goes runaway: > > > > last pid: 25042; load averages: 0.38, 0.35, 0.63 13:26:43 > > 301 processes: 1 running, 300 sleeping > > CPU states: 0.4% user, 0.0% nice, 0.8% system, 0.8% interrupt, 98.1% idle > > Mem: 119M Active, 44M Inact, 36M Wired, 34M Cache, 6027K Buf, 17M Free > > Swap: 640M Total, 37M Used, 603M Free, 6% Inuse > > > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > > 25040 root 28 0 844K 1120K RUN 0:00 1.89% 0.34% top > > 24823 freddy 2 0 4180K 2964K select 0:00 0.23% 0.23% pine4.21 > > 24919 byman 3 0 796K 1040K ttyin 0:00 0.04% 0.04% tcsh > > 24537 inch_hom 2 0 640K 872K sbwait 0:00 0.04% 0.04% httpd-1.3.3-us > > You're running a different httpd here. Try moving the binary from this > machine over to the other one and see if the loadavg drops. > > > -- > Dan Nelson > dnelson@emsphone.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 11: 3:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 57C9014EE2 for ; Tue, 18 Jan 2000 11:02:54 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id NAA97683; Tue, 18 Jan 2000 13:02:50 -0600 (CST) (envelope-from dan) Date: Tue, 18 Jan 2000 13:02:50 -0600 From: Dan Nelson To: spork Cc: freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) Message-ID: <20000118130250.A97656@dan.emsphone.com> References: <20000118105100.A79849@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from "spork" on Tue Jan 18 13:57:50 GMT 2000 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jan 18), spork said: > > On Tue, 18 Jan 2000, Dan Nelson wrote: > > In the last episode (Jan 18), spork said: > > > I'm not sure what the problem is. You're 97% idle. Maybe the hosted > > web sites on this machine are slightly more active than the ones on the > > other box. You could always manually panic the box and see what those > > three processes on the run queue are, but it doesn't seem to be worth > > the effort. > > That's another thing, the box is idle as we've yet to move it into > production. Out of curiousity, how does one make a machine panic > manually? CTRL-ALT-ESC, and at the prompt type in 'panic'. You'll need DDB compiled into the kernel, and crashdumps enabled. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 11: 8:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail2.uniserve.com (mail2.uniserve.com [204.244.156.7]) by hub.freebsd.org (Postfix) with ESMTP id B0AA91508C; Tue, 18 Jan 2000 11:07:40 -0800 (PST) (envelope-from tom@uniserve.com) Received: from shell.uniserve.ca ([204.244.186.218]) by mail2.uniserve.com with smtp (Exim 3.03 #4) id 12AdyL-000KEY-00; Tue, 18 Jan 2000 11:07:21 -0800 Date: Tue, 18 Jan 2000 11:07:19 -0800 (PST) From: Tom X-Sender: tom@shell.uniserve.ca To: Kirk McKusick Cc: Matthew Dillon , Greg Lehey , Mike Smith , freebsd-hackers@freebsd.org Subject: Re: interesting results from softupdates/postmark test (was Re: softupdates and debug.max_softdeps) In-Reply-To: <200001020347.TAA14605@flamingo.McKusick.COM> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 1 Jan 2000, Kirk McKusick wrote: > Delta 1.40 to ffs_softdep.c (12/16/1999) fixes the `hanging > while holding a lock' problem. It should be propagated to the > 3.X branch. > > I have been working on a number of performance improvements to > soft updates that will hopefully assist in the postmark > benchmarks. Hopefully they will be ready to incorporate in > the next week or so. I'll send them to you (Matt) when I am > convinced that they are at least semantically correct to try > out. > > Kirk Well, I just cvsup'ed my copy of 3.4-stable, and I found that ffs_softdep.c is at: * * from: @(#)ffs_softdep.c 9.36 (McKusick) 5/6/99 * $FreeBSD: src/sys/contrib/softupdates/ffs_softdep.c,v 1.34.2.3 1999/08/29 16:22:08 peter Exp $ */ So I guess, ffs_softdep.c in -stable doesn't have the patch you did in December, because there have been no commits since August. Is anyone able to commit this change back to -stable? Tom Uniserve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 11:30:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fremont.bolingbroke.com (adsl-216-102-90-210.dsl.snfc21.pacbell.net [216.102.90.210]) by hub.freebsd.org (Postfix) with ESMTP id 8CCC214ECD for ; Tue, 18 Jan 2000 11:28:50 -0800 (PST) (envelope-from ken@bolingbroke.com) Received: from localhost (ken@localhost) by fremont.bolingbroke.com (Pro-8.9.3/Pro-8.9.3) with ESMTP id LAA07026 for ; Tue, 18 Jan 2000 11:28:46 -0800 (PST) Date: Tue, 18 Jan 2000 11:28:46 -0800 (PST) From: Ken Bolingbroke X-Sender: ken@fremont.bolingbroke.com To: hackers@FreeBSD.ORG Subject: Re: "very dangerously dedicated mode" is In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've always been able to 'fix' dangerously dedicated IDE disks by running DOS's fdisk with the /mbr switch. That overwrites the MBR, and at least puts it back into a state friendly with other operating systems... Ken Bolingbroke hacker@bolingbroke.com On Sat, 15 Jan 2000, Jamie Bowden wrote: > On Fri, 14 Jan 2000, Jim Shankland wrote: > > :By the way, I also struck out with DOS fdisk: it took one look > :at the garbage partition table, and wedged. I'll be trying a > :Linux rescue disk next. If that fails, too, then I seem to > :have generated a 1-Gigabyte hockey puck (you didn't think I > :was trying this with a new disk, did you)? > > If it were SCSI I'd say plug it in to the nearest adaptec controller and > low level it (I fixed a drive one of my SGI's ate like this), but it's > IDE. You might want to give NT or OS/2 a whack at it if you've got them > laying around. There are programs to let you low level IDE drives out > there, I believe they're mostly DOS based though, so that probably doesn't > help. > > Jamie Bowden > > -- > > "Of course, that's sort of like asking how other than Marketing, > Microsoft is different from any other software company..." > Kenneth G. Cavness > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 13:34:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from imo20.mx.aol.com (imo20.mx.aol.com [152.163.225.10]) by hub.freebsd.org (Postfix) with ESMTP id 19D3814F86 for ; Tue, 18 Jan 2000 13:34:18 -0800 (PST) (envelope-from Dballsz@aol.com) Received: from Dballsz@aol.com by imo20.mx.aol.com (mail_out_v24.6.) id n.37.7ceb9b (3969) for ; Tue, 18 Jan 2000 16:34:15 -0500 (EST) From: Dballsz@aol.com Message-ID: <37.7ceb9b.25b63657@aol.com> Date: Tue, 18 Jan 2000 16:34:15 EST Subject: Re: freebsd-hackers-digest V4 #730 To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Windows AOL sub 44 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Where is a good place for me to place an advertisement for "intrusion testers"? We are in no way connected with any law enforcement or Government agency. We are a computer investigations firm in Florida and have an urgent need for some of these individuals. We are a global company with a D&N number if you would like to check us out. Kellie Carlisle, President Advanced Computer Investigations and Services 407.566.0504 or 407.973-4939 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 13:36:37 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from penelope.skunk.org (penelope.skunk.org [208.133.204.51]) by hub.freebsd.org (Postfix) with ESMTP id 5211014D8A for ; Tue, 18 Jan 2000 13:36:35 -0800 (PST) (envelope-from ben@penelope.skunk.org) Received: from localhost (ben@localhost) by penelope.skunk.org (8.9.3/8.9.3) with ESMTP id QAA66574; Tue, 18 Jan 2000 16:48:49 -0500 (EST) Date: Tue, 18 Jan 2000 16:48:49 -0500 (EST) From: Ben Rosengart To: Dballsz@aol.com Cc: hackers@FreeBSD.ORG Subject: Re: freebsd-hackers-digest V4 #730 In-Reply-To: <37.7ceb9b.25b63657@aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 18 Jan 2000 Dballsz@aol.com wrote: > Where is a good place for me to place an advertisement for "intrusion > testers"? We are in no way connected with any law enforcement or Government > agency. We are a computer investigations firm in Florida and have an urgent > need for some of these individuals. We are a global company with a D&N > number if you would like to check us out. jobs@freebsd.org -- Ben Rosengart UNIX Systems Engineer, Skunk Group StarMedia Network, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 13:46:49 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from picnic.mat.net (picnic.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id AF73F151A8 for ; Tue, 18 Jan 2000 13:46:42 -0800 (PST) (envelope-from chuckr@picnic.mat.net) Received: from localhost (chuckr@localhost [127.0.0.1]) by picnic.mat.net (8.9.3/8.9.3) with ESMTP id QAA51775; Tue, 18 Jan 2000 16:46:27 -0500 (EST) (envelope-from chuckr@picnic.mat.net) Date: Tue, 18 Jan 2000 16:46:27 -0500 (EST) From: Chuck Robey To: Dballsz@aol.com Cc: hackers@FreeBSD.ORG Subject: Re: freebsd-hackers-digest V4 #730 In-Reply-To: <37.7ceb9b.25b63657@aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 18 Jan 2000 Dballsz@aol.com wrote: > Where is a good place for me to place an advertisement for "intrusion > testers"? We are in no way connected with any law enforcement or Government > agency. We are a computer investigations firm in Florida and have an urgent > need for some of these individuals. We are a global company with a D&N > number if you would like to check us out. > > Kellie Carlisle, President > Advanced Computer Investigations and Services > 407.566.0504 or 407.973-4939 I think FreeBSD-Jobs@freebsd.org is the correct venue for offers like that. > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > ---------------------------------------------------------------------------- Chuck Robey | Interests include C & Java programming, New Year's Resolution: I | electronics, communications, and will not sphroxify gullible| signal processing. people into looking up | I run picnic.mat.net: FreeBSD-current(i386) and fictitious words in the | jaunt.mat.net : FreeBSD-current(Alpha)| dictionary. | ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 14: 2:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from penelope.skunk.org (penelope.skunk.org [208.133.204.51]) by hub.freebsd.org (Postfix) with ESMTP id AF311151E9 for ; Tue, 18 Jan 2000 14:02:09 -0800 (PST) (envelope-from ben@penelope.skunk.org) Received: from localhost (ben@localhost) by penelope.skunk.org (8.9.3/8.9.3) with ESMTP id RAA66778 for ; Tue, 18 Jan 2000 17:14:26 -0500 (EST) Date: Tue, 18 Jan 2000 17:14:26 -0500 (EST) From: Ben Rosengart To: hackers@freebsd.org Subject: locked accounts and adduser Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-879138456-948233666=:64214" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-879138456-948233666=:64214 Content-Type: TEXT/PLAIN; charset=US-ASCII I thought it would be nice if one could create locked accounts with adduser. So I asked my nice Perl-hacking coworker Evan Leon to come up with a patch. Enter password []: Use an empty password or lock the password? lock no [yes]: lock ... # grep user /etc/master.passwd user:*:1001:1001::0:0:Joe User:/home/user:/bin/sh The patch is attached. Anyone like it? Any chance it could be committed? I find it useful in two situations: 1) Sometimes I want to install someone's public key instead of giving them a password. That way, I don't need a secure channel over which to communicate the password. 2) Other times, I'm going to be pasting a hashed password directly into the master.passwd file, and this is a convenient way of locking the account until I do that. Another idea I have is to allow adduser to accept a hashed password instead of a plaintext one. Perhaps if this goes over well, Evan and I will work on that next. -- Ben Rosengart UNIX Systems Engineer, Skunk Group StarMedia Network, Inc. --0-879138456-948233666=:64214 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="adduser.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="adduser.patch" LS0tIC91c3Ivc2Jpbi9hZGR1c2VyCVRodSBKYW4gMTMgMTI6MjA6MzggMjAw MA0KKysrIGFkZHVzZXIJVHVlIEphbiAxOCAxNjo1NzowNSAyMDAwDQpAQCAt NjQ5LDEzICs2NDksMTcgQEANCiAJICAgIGxhc3QgaWYgJHBhc3N3b3JkIGVx ICRuZXdwYXNzOw0KIAkgICAgcHJpbnQgIlRoZXkgZGlkbid0IG1hdGNoLCBw bGVhc2UgdHJ5IGFnYWluXG4iOw0KIAl9DQotCWVsc2lmICgmY29uZmlybV95 bigiVXNlIGFuIGVtcHR5IHBhc3N3b3JkPyIsICJ5ZXMiKSkgew0KLQkgICAg bGFzdDsNCi0JfQ0KKyAgICAgICAgZWxzZSB7DQorICAgICAgICAgICAkbG9j a3Bhc3MgPSAmY29uZmlybV9saXN0KCJVc2UgYW4gZW1wdHkgcGFzc3dvcmQg b3IgbG9jayB0aGUgcGFzc3dvcmQ/IiwgMCwgInllcyIsICJubyIsICJsb2Nr Iik7DQorICAgICAgICAgICBpZiAoJGxvY2twYXNzIG5lICJubyIpIHsNCisg ICAgICAgICAgICBsYXN0Ow0KKyAgICAgICAgICAgfQ0KKyAgICAgICAgfQ0K KyAgICB9ICANCisgICAgaWYgKCRsb2NrcGFzcyA9PSAibG9jayIpIHsNCisg ICAgICAkcGFzc3dvcmQgPSAiKiI7IA0KICAgICB9DQotDQotICAgIHJldHVy biAkcGFzc3dvcmQ7DQotfQ0KK30gICANCiANCiANCiBzdWIgbmV3X3VzZXJz IHsNCkBAIC03MDMsNyArNzA3LDEyIEBADQogCSAgICAkbmV3X3VzZXJzX29r ID0gMTsNCiANCiAJICAgICRjcnlwdHB3ZCA9ICIiOw0KLQkgICAgJGNyeXB0 cHdkID0gY3J5cHQoJHBhc3N3b3JkLCAmc2FsdCkgaWYgJHBhc3N3b3JkIG5l ICIiOw0KKyAgICAgICAgICAgIGlmICgkcGFzc3dkID09ICIqIikgew0KKyAg ICAgICAgICAgICAgJGNyeXB0cHdkID0gIioiOw0KKyAgICAgICAgICAgIH0g DQorICAgICAgICAgICAgZWxzZSB7DQorICAgICAgICAgICAgICAkY3J5cHRw d2QgPSBjcnlwdCgkcGFzc3dvcmQsICZzYWx0KSBpZiAkcGFzc3dvcmQgbmUg IiI7DQorICAgICAgICAgICAgfQ0KIAkgICAgIyBvYnNjdXJlIHBlcmwgYnVn DQogCSAgICAkbmV3X2VudHJ5ID0gIiRuYW1lXDoiIC4gIiRjcnlwdHB3ZCIg Lg0KIAkJIlw6JHVfaWRcOiRnX2lkXDokY2xhc3NcOjA6MDokZnVsbG5hbWU6 JHVzZXJob21lOiRzaCI7DQpAQCAtMTM5MiwzICsxNDAxLDUgQEANCiAmbmV3 X3VzZXJzOwkgICAgICMgYWRkIG5ldyB1c2Vycw0KIA0KICNlbmQNCisNCisN Cg== --0-879138456-948233666=:64214-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 14:21:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail-01.cdsnet.net (mail-01.cdsnet.net [206.107.16.35]) by hub.freebsd.org (Postfix) with SMTP id 9440414EA2 for ; Tue, 18 Jan 2000 14:21:27 -0800 (PST) (envelope-from mrcpu@internetcds.com) Received: (qmail 18596 invoked from network); 18 Jan 2000 22:21:25 -0000 Received: from schizo.cdsnet.net (204.118.244.32) by mail.cdsnet.net with SMTP; 18 Jan 2000 22:21:25 -0000 Date: Tue, 18 Jan 2000 14:19:40 -0800 (PST) From: Jaye Mathisen X-Sender: mrcpu@schizo.cdsnet.net To: hackers@freebsd.org Subject: pw bug Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Running a relatively recent 3.4-STABLE: If you use the -V option to specify an alternate master.passwd/conf file location, then the -m option apparently doesn't work. I get users added to my alt pw file, but no home dir creation. Removing the -V /altdir option adds them to /etc/master.passwd, and creates the home dir. If anybody spots in the code where this is taking place, I would love to see a fix... It's probably so obvious I am skipping over it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 14:30:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from super-g.com (super-g.com [207.240.140.161]) by hub.freebsd.org (Postfix) with ESMTP id 60F7714F69 for ; Tue, 18 Jan 2000 14:30:54 -0800 (PST) (envelope-from spork@super-g.com) Received: by super-g.com (Postfix, from userid 1000) id A71F910E61; Tue, 18 Jan 2000 17:30:52 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by super-g.com (Postfix) with SMTP id 8ED2210E60; Tue, 18 Jan 2000 17:30:52 -0500 (EST) Date: Tue, 18 Jan 2000 17:30:52 -0500 (EST) From: spork X-Sender: spork@super-g.inch.com To: Dan Nelson Cc: freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) In-Reply-To: <20000118130250.A97656@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 18 Jan 2000, Dan Nelson wrote: > > That's another thing, the box is idle as we've yet to move it into > > production. Out of curiousity, how does one make a machine panic > > manually? > > CTRL-ALT-ESC, and at the prompt type in 'panic'. You'll need DDB > compiled into the kernel, and crashdumps enabled. By now, you should know my next question... What am I looking at? I built a kernel with "config -g" and the debugger option and made it panic while sitting at a load of 3.0... Following the handbook instructions, I see this: (kgdb) where #0 boot (howto=256) at ../../kern/kern_shutdown.c:285 #1 0xc014f085 in panic (fmt=0xc0225638 "from debugger") at ../../kern/kern_shutdown.c:446 #2 0xc0129565 in db_panic (addr=-1071629621, have_addr=0, count=-1, modif=0xc023f7b4 "") at ../../ddb/db_command.c:432 #3 0xc0129505 in db_command (last_cmdp=0xc0242128, cmd_table=0xc0241f88, aux_cmd_tablep=0xc0255d28) at ../../ddb/db_command.c:332 #4 0xc01295ca in db_command_loop () at ../../ddb/db_command.c:454 #5 0xc012ba43 in db_trap (type=3, code=0) at ../../ddb/db_trap.c:71 #6 0xc02038a6 in kdb_trap (type=3, code=0, regs=0xc023f8a4) at ../../i386/i386/db_interface.c:157 #7 0xc020e058 in trap (frame={tf_es = 16, tf_ds = 16, tf_edi = -1071682944, tf_esi = 134, tf_ebp = -1071384344, tf_isp = -1071384372, tf_ebx = 0, tf_edx = -1071414972, tf_ecx = -1072984320, tf_eax = 38, tf_trapno = 3, tf_err = 0, tf_eip = -1071629621, tf_cs = 8, tf_eflags = 582, tf_esp = -1071414988, tf_ss = -1071426239}) at ../../i386/i386/trap.c:548 #8 0xc0203acb in Debugger (msg=0xc0235541 "manual escape to debugger") at ../../i386/i386/db_interface.c:317 #9 0xc01ff03c in scgetc (kbd=0xc026739c, flags=2) at ../../dev/syscons/syscons.c:3947 #10 0xc01f9ff0 in sckbdevent (thiskbd=0xc026739c, event=0, arg=0x0) at ../../dev/syscons/syscons.c:844 where do I go from here? What's this telling me? I assume this procedure was to see what the three "waiting" processes were and what they were doing at the time? Thanks, Charles > -- > Dan Nelson > dnelson@emsphone.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 14:47: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id EEFB614E6D for ; Tue, 18 Jan 2000 14:47:05 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id OAA27487; Tue, 18 Jan 2000 14:47:01 -0800 (PST) (envelope-from dillon) Date: Tue, 18 Jan 2000 14:47:01 -0800 (PST) From: Matthew Dillon Message-Id: <200001182247.OAA27487@apollo.backplane.com> To: spork Cc: Dan Nelson , freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> CTRL-ALT-ESC, and at the prompt type in 'panic'. You'll need DDB :> compiled into the kernel, and crashdumps enabled. : :By now, you should know my next question... What am I looking at? I :built a kernel with "config -g" and the debugger option and made it panic :while sitting at a load of 3.0... Following the handbook instructions, I :see this: A backtrace is not likely to be useful, but a 'ps' (from DDB) may be. It might also be useful to leave 'systat -vm 1' and 'vmstat 1' running to see if the system is doing any paging or other significant work at the time of the high load. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 15:12:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 28A7615089 for ; Tue, 18 Jan 2000 15:12:27 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id RAA06224; Tue, 18 Jan 2000 17:10:34 -0600 (CST) (envelope-from dan) Date: Tue, 18 Jan 2000 17:10:34 -0600 From: Dan Nelson To: spork Cc: freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) Message-ID: <20000118171034.A4871@dan.emsphone.com> References: <20000118130250.A97656@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from "spork" on Tue Jan 18 17:30:52 GMT 2000 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jan 18), spork said: > On Tue, 18 Jan 2000, Dan Nelson wrote: > > CTRL-ALT-ESC, and at the prompt type in 'panic'. You'll need DDB > > compiled into the kernel, and crashdumps enabled. > > By now, you should know my next question... What am I looking at? I > built a kernel with "config -g" and the debugger option and made it > panic while sitting at a load of 3.0... Following the handbook > instructions, I see this: The handbook instructions are for kernel-generated panics; for a manual panic like yours, the stack is unimportant. The easiest way to see which processes are active is to run this: (kgdb) source /usr/src/sys/modules/vinum/.gdbinit.kernel (kgdb) ps And look at the 'stat' column. Any processes with a stat of 1 or 2 are in the 'runnable' queue, which is what loadav measures. There should be 3 or so processes in that state. And in response to anyone saying "Why did you tell him to panic the machine? Why not just have him run ps": I could, but with all those apache processes lying around possibly forking children, I wanted a static picture of the system that wouldn't change from email to email :) -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 15:15:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id C4D0414CF1 for ; Tue, 18 Jan 2000 15:15:32 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id QAA70496; Tue, 18 Jan 2000 16:15:09 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id QAA20891; Tue, 18 Jan 2000 16:15:36 -0700 (MST) Message-Id: <200001182315.QAA20891@harmony.village.org> To: YAMAMOTO Shigeru Subject: Re: how to allocate an alined address for a device? Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Tue, 18 Jan 2000 16:38:32 +0900." <20000118163832A.shigeru@iij.ad.jp> References: <20000118163832A.shigeru@iij.ad.jp> Date: Tue, 18 Jan 2000 16:15:36 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000118163832A.shigeru@iij.ad.jp> YAMAMOTO Shigeru writes: : In a CardBus system, a start address of status register must be aligned on : 4KB boundaries. : Such kind of address alignment is required at mapping meory window, : expansion ROM and etc. True. : I think we use bus_alloc_resource() to map a memory on a device. : But it seems me that bus_alloc_resource() never guarantees to allocate an : aligned address. : : How to allocate an aligned address to map a memory on a device? In a cardbus system, one would force the alignment in the card bus bridge. It would reject those things that aren't aligned in a sane manner for cardbus. It would try again to get a different range, if possible, or would reject the attempt. It would be nice if there was some way to have the underlying system, but there is no way to do that right now. Does this mean you are working on a cardbus thing? If so, please contact me off the list... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 15:17:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id BD71A14E98; Tue, 18 Jan 2000 15:17:30 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.freebsd.dk [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.3) with ESMTP id AAA31622; Wed, 19 Jan 2000 00:17:23 +0100 (CET) (envelope-from phk@critter.freebsd.dk) Date: Wed, 19 Jan 2000 00:17:23 +0100 Message-ID: <31620.948237443.1@critter.freebsd.dk> From: Poul-Henning Kamp Subject: IEEE-488: looking for junk :-) MIME-Version: 1.0 Content-Type: multipart/digest; boundary="----- =_aaaaaaaaaa" Content-Description: Blind Carbon Copy Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ------- =_aaaaaaaaaa Content-Type: message/rfc822 Content-Description: Original Message Subject: IEEE-488: looking for junk :-) From: Poul-Henning Kamp Date: Wed, 19 Jan 2000 00:17:23 +0100 Message-ID: <31620.948237443@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Bcc: Blind Distribution List: ; MIME-Version: 1.0 I have managed to snatch up a pair of PCIIA compatible IEEE488 cards locally and I have found a HP59401A HP-IB analyser for $60 at eBay :-) so I'll go over the two pieces of code we have for FreeBSD and look at the linux stuff and come up with some code over spring/summer. Should any of you stumble into any IEEE-488/HP-IB/GP-IB stuff gathering stuff on your way, I'll dispose of it for a good cause. PC cards, ISA and PCI are of course top priority, but even just a couple of 2m long cables or more devices to test against would help me. I will issue a separate call for testers when I have something they can test, but let me know if any of you have lists of wanted features. Poul-Henning -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! ------- =_aaaaaaaaaa-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 15:33:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from virtual-voodoo.com (virtual-voodoo.com [204.120.165.254]) by hub.freebsd.org (Postfix) with ESMTP id 6946414FA2 for ; Tue, 18 Jan 2000 15:33:48 -0800 (PST) (envelope-from steve@virtual-voodoo.com) Received: (from steve@localhost) by virtual-voodoo.com (8.9.3/8.9.3) id SAA51488; Tue, 18 Jan 2000 18:31:25 -0500 (EST) (envelope-from steve) Date: Tue, 18 Jan 2000 18:31:24 -0500 From: Steve Ames To: Jaye Mathisen Cc: hackers@FreeBSD.ORG Subject: Re: pw bug Message-ID: <20000118183124.A12827@virtual-voodoo.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: ; from Jaye Mathisen on Tue, Jan 18, 2000 at 02:19:40PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG /usr/src/usr.sbin/pw/pw_user.c line 736 of the file on my system: $FreeBSD: src/usr.sbin/pw/pw_user.c,v 1.34 2000/01/15 00:20:21 davidn Exp The line in question: if (!PWALTDIR() && getarg(args, 'm') != NULL && pwd->pw_dir && *pwd->pw_dir == '/' && pwd->pw_dir[1]) { The conditional !PWALTDIR() looks like the culprit. It may also be there for some reason... This is under 4.0-CURRENT but I'd guess you'll fine the same code somewhere in your file. -Steve On Tue, Jan 18, 2000 at 02:19:40PM -0800, Jaye Mathisen wrote: > > Running a relatively recent 3.4-STABLE: > > If you use the -V option to specify an alternate master.passwd/conf file > location, then the -m option apparently doesn't work. > > I get users added to my alt pw file, but no home dir creation. > > Removing the -V /altdir option adds them to /etc/master.passwd, and > creates the home dir. > > If anybody spots in the code where this is taking place, I would love > to see a fix... It's probably so obvious I am skipping over it. > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 19:18: 4 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from srv4-bsb.bsb.nutecnet.com.br (argonio.bsb.nutecnet.com.br [200.252.253.4]) by hub.freebsd.org (Postfix) with ESMTP id B6B9F15223 for ; Tue, 18 Jan 2000 19:17:58 -0800 (PST) (envelope-from visi0n@aux-tech.org) Received: from ebola.chinatown.org (dl2198-bsb.bsb.nutecnet.com.br [200.252.29.198]) by srv4-bsb.bsb.nutecnet.com.br (8.8.5/SCA-6.6) with ESMTP id CAA04938; Tue, 19 Jan 1999 02:18:44 -0200 (BRV) Date: Wed, 19 Jan 2000 01:16:09 -0200 (BRST) From: visi0n X-Sender: visi0n@ebola.chinatown.org To: Charles Randall Cc: hackers@FreeBSD.ORG Subject: RE: The stack size for a process? In-Reply-To: <64003B21ECCAD11185C500805F31EC0304D9754B@houston.matchlogic.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Where i can get info about it ? =============================================================================== visi0n AUX Technologies [www.aux-tech.org] On Tue, 18 Jan 2000, Charles Randall wrote: > From: Jason Evans [mailto:jasone@canonware.com] > >Thread stacks have a default size of 64kB. > > As you know, stack size can be explicitly set using > pthread_attr_setstacksize(). > > However, note that Solaris uses a pthread stack size of 1 MB. Porter beware. > > >libc_r now uses growable stacks with "guard pages" between stacks > >to try to catch stack overflow. > > In this case, is there a message printed to the console or syslog that tells > the programmer/sysadmin what's happening? > > Charles > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 21:36:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from whimsy.udel.edu (whimsy.udel.edu [128.4.2.3]) by hub.freebsd.org (Postfix) with SMTP id 5C59714E5B for ; Tue, 18 Jan 2000 21:36:15 -0800 (PST) (envelope-from stenn@whimsy.udel.edu) To: hackers@freebsd.org Subject: Harlan Stenn: Date: Wed, 19 Jan 2000 00:35:37 -0500 Message-ID: <16352.948260137@whimsy.udel.edu> From: stenn@whimsy.udel.edu Source-Info: From (or Sender) name not authenticated. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Can anybody comment on whether or not this is a good patch? ------- Forwarded Message From: Harlan Stenn Date: Wed, 19 Jan 2000 00:24:32 -0500 X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: stenn@whimsy.udel.edu Message-ID: <200001190024.aa16341@whimsy.udel.edu> From: David Schwartz Subject: Request for fix in NTPv4, patch attached Newsgroups: comp.protocols.time.ntp Date: Tue, 18 Jan 2000 16:16:14 -0800 Organization: Posted via Supernews, http://www.supernews.com Path: news.udel.edu!news.eecis.udel.edu!netnews.com!newsfeed.berkeley.edu!remarQ70!rQdQ!supernews.com!remarQ.com!news.supernews.com!not-for-mail Lines: 20 Message-ID: <3885024E.BCC631C6@webmaster.com> X-Complaints-To: newsabuse@supernews.com X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Xref: news.udel.edu comp.protocols.time.ntp:12686 Can I please get this fix applied? Who do I need to email and bitch to? - --- ntp_proto_orig.c Tue Jan 18 16:12:01 2000 +++ ntp_proto.c Tue Jan 18 16:14:09 2000 @@ -1501,7 +1501,7 @@ poll_update(peer_list[i], peer_list[i]->hpoll); if (peer_list[i]->stratum == peer_list[0]->stratum) { leap_consensus |= peer_list[i]->leap; - - if (peer_list[i]->refclktype == REFCLK_ATOM_PPS) + if (peer_list[i]->sstclktype == CTL_SST_TS_ATOM) typepps = peer_list[i]; if (peer_list[i] == sys_peer) typesystem = peer_list[i]; The REFCLK_ATOM_PPS is not necessarily the only clock that is PPS capable. Others might be, and they will set their sstclktype to CTL_SST_TS_ATOM, but they can't change their refclktype. DS ------- End of Forwarded Message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 22:34:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ind.alcatel.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id 0AD9B150CC for ; Tue, 18 Jan 2000 22:34:26 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com (mailhub [198.206.181.70]) by ind.alcatel.com (8.9.3+Sun/8.9.1 (ind.alcatel.com 3.0 [OUT])) with SMTP id WAA27328; Tue, 18 Jan 2000 22:33:49 -0800 (PST) X-Origination-Site: Received: from omni.xylan.com by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id WAA17748; Tue, 18 Jan 2000 22:33:48 -0800 Received: from softweyr.com ([204.68.178.39]) by omni.xylan.com (8.9.3+Sun/8.9.1 (Xylan engr [SPOOL])) with ESMTP id WAA25342; Tue, 18 Jan 2000 22:32:29 -0800 (PST) Message-ID: <38855BC5.9D193AC4@softweyr.com> Date: Tue, 18 Jan 2000 23:37:57 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Chuck Robey Cc: Dballsz@aol.com, hackers@freebsd.org Subject: Re: freebsd-hackers-digest V4 #730 References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chuck Robey wrote: > > On Tue, 18 Jan 2000 Dballsz@aol.com wrote: > > > Where is a good place for me to place an advertisement for "intrusion > > testers"? We are in no way connected with any law enforcement or Government > > agency. We are a computer investigations firm in Florida and have an urgent > > need for some of these individuals. We are a global company with a D&N > > number if you would like to check us out. > > > > Kellie Carlisle, President > > Advanced Computer Investigations and Services > > 407.566.0504 or 407.973-4939 > > I think FreeBSD-Jobs@freebsd.org is the correct venue for offers like > that. daily.daemonnews.org might be a good spot, too. It may get MORE coverage than you're looking for. ;^) -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 23: 4:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id 99E9E15166 for ; Tue, 18 Jan 2000 23:04:07 -0800 (PST) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.11 #1) id 12Ap9m-000KAe-00; Wed, 19 Jan 2000 09:03:54 +0200 From: Sheldon Hearn To: stenn@whimsy.udel.edu Cc: hackers@freebsd.org Subject: Re: Harlan Stenn: In-reply-to: Your message of "Wed, 19 Jan 2000 00:35:37 EST." <16352.948260137@whimsy.udel.edu> Date: Wed, 19 Jan 2000 09:03:54 +0200 Message-ID: <77539.948265434@axl.noc.iafrica.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 19 Jan 2000 00:35:37 EST, stenn@whimsy.udel.edu wrote: > Can anybody comment on whether or not this is a good patch? Nope, but I _can_ suggest that you send it to the right place. :-) Please see the Patching Procedures section of the NTP web page: http://www.eecis.udel.edu/~ntp/ntp_spool/html/patches.htm Thanks, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 23:13:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from arutam.inch.com (ns.inch.com [207.240.140.101]) by hub.freebsd.org (Postfix) with ESMTP id EA88015151 for ; Tue, 18 Jan 2000 23:13:34 -0800 (PST) (envelope-from spork@inch.com) Received: from shell.inch.com (inch.com [207.240.140.100]) by arutam.inch.com (8.9.3/8.9.3/UTIL-INCH-2.0.0) with ESMTP id CAA04830; Wed, 19 Jan 2000 02:13:26 -0500 (EST) Received: from localhost by shell.inch.com (8.8.8) id CAA19064; Wed, 19 Jan 2000 02:13:25 -0500 (EST) Date: Wed, 19 Jan 2000 02:13:25 -0500 (EST) From: Charles Sprickman To: Matthew Dillon Cc: Dan Nelson , freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) In-Reply-To: <200001182247.OAA27487@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 18 Jan 2000, Matthew Dillon wrote: > A backtrace is not likely to be useful, but a 'ps' (from DDB) may be. > > It might also be useful to leave 'systat -vm 1' and 'vmstat 1' running > to see if the system is doing any paging or other significant work at > the time of the high load. I'd done that for a day or so back a while ago. Looked for paging, any weird amounts of interrupts, etc. Never saw anything spike. I had the same thing running in a window next to it on my workstation, and my workstation was consistently doing more work, more swapping (linux netscape with flash plugin = 80+ MB), more interrupts on lesser hardware with the load rarely hitting 1.0+... I'll poke around with DDB more tomorrow and see what I can see in the ps output there... Thanks, Charles > -Matt > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Jan 18 23:19: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from arutam.inch.com (ns.inch.com [207.240.140.101]) by hub.freebsd.org (Postfix) with ESMTP id 9DDE51518F for ; Tue, 18 Jan 2000 23:18:57 -0800 (PST) (envelope-from spork@inch.com) Received: from shell.inch.com (inch.com [207.240.140.100]) by arutam.inch.com (8.9.3/8.9.3/UTIL-INCH-2.0.0) with ESMTP id CAA05325; Wed, 19 Jan 2000 02:18:56 -0500 (EST) Received: from localhost by shell.inch.com (8.8.8) id CAA19135; Wed, 19 Jan 2000 02:18:56 -0500 (EST) Date: Wed, 19 Jan 2000 02:18:56 -0500 (EST) From: Charles Sprickman To: Dan Nelson Cc: freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) In-Reply-To: <20000118171034.A4871@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 18 Jan 2000, Dan Nelson wrote: > The handbook instructions are for kernel-generated panics; for a manual > panic like yours, the stack is unimportant. The easiest way to see > which processes are active is to run this: > > (kgdb) source /usr/src/sys/modules/vinum/.gdbinit.kernel Interesting, what's this do? > (kgdb) ps > And look at the 'stat' column. Any processes with a stat of 1 or 2 are > in the 'runnable' queue, which is what loadav measures. There should > be 3 or so processes in that state. Did that, and every process had a stat of "3". > And in response to anyone saying "Why did you tell him to panic the > machine? Why not just have him run ps": I could, but with all those > apache processes lying around possibly forking children, I wanted a > static picture of the system that wouldn't change from email to email :) More importantly, this machine is just sitting here waiting to be put in production, so I'm more than willing to play around with it like this while I still can... Thanks for the ongoing help, I've never touched a debugger before, and this has been educational so far. I'm coming off a week or two of playing with NT machines, and it's nice to at least be able to gather some info about what the machine is doing with OS-supplied tools, which is something I found very difficult to do in NT GUI-land. Thanks, Charles > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 0:45:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gilgamesch.bik-gmbh.de (gilgamesch.bik-gmbh.de [194.233.237.194]) by hub.freebsd.org (Postfix) with ESMTP id 8A92615263 for ; Wed, 19 Jan 2000 00:45:53 -0800 (PST) (envelope-from cracauer@gilgamesch.bik-gmbh.de) Received: (from cracauer@localhost) by gilgamesch.bik-gmbh.de (8.9.3/8.7.3) id JAA81241; Wed, 19 Jan 2000 09:45:24 +0100 (MET) Date: Wed, 19 Jan 2000 09:45:24 +0100 From: Martin Cracauer To: Matthew Dillon Cc: Iani Brankov , hackers@FreeBSD.ORG, Jason Evans Subject: Re: The stack size for a process? Message-ID: <20000119094523.A79669@cons.org> References: <200001180055.TAA17507@pcnet1.pcnet.com> <3883D1BB.391C9F0C@bulinfo.net> <20000117183902.B27689@sturm.canonware.com> <3883D60A.BA0BAF37@bulinfo.net> <200001180327.TAA18698@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <200001180327.TAA18698@apollo.backplane.com>; from Matthew Dillon on Mon, Jan 17, 2000 at 07:27:11PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In <200001180327.TAA18698@apollo.backplane.com>, Matthew Dillon wrote: > :Jason Evans wrote: > :> Thread stacks have a default size of 64kB. libc_r now uses growable stacks > :> with "guard pages" between stacks to try to catch stack overflow. It looks > :> like it did you some good. =) > > Heh heh. I have a feeling that we're going to see more of these sorts > of problems crop up (over-extending stacks, making assumptions about > compiler optimizations) as more and more people try to do threads > programming and fewer and fewer of them have the small-systems > background to realize that there are in fact stack and compiler > optimization issuesl I would be nice if we could print a more verbose message ("Use the UNIX API, fool!" :-) Difficult in first place for the current userspace threads, since the kernel (which had to print the message) doesn't know that this particular page was a thread stack guard page. [Matt you know this, but read on] But how about an interface from userlevel to the kernel that can be used to submit error messages that the kernel should print in case of page faults? I'm think of something like madvice(2): int maperrmsg(void *addr, size_t len, const char *msg, int where); When a page fault happens for a page that has been marked that way, the kernel looks up the pointer and if it points to valid space, the message is printed somewhere, indicated by the last argument (console, syslog or tty controlling the process). Regarding bloat, if we restrict the semantics so that addr and len must exactly match an existing mapped region (len could then possibly be "auto"), we could get away with an additional char pointer in struct vm_map_entry, not in every page. I'd really like this. In addition to catching most of the new thread user cases, we could also use it for malloc() guard page systems like efence. With a little macroism you could have something like "guard page for malloc region allocated from foo.c, line 327 violated" (in the efence port, not the default malloc(), of course) I think I could implement this, but I'd like a reality check first. What did I forget? Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ BSD User Group Hamburg, Germany http://www.bsdhh.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 1:28:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id 7EE9E14E8C for ; Wed, 19 Jan 2000 01:28:23 -0800 (PST) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.11 #1) id 12ArPX-0000fm-00 for hackers@freebsd.org; Wed, 19 Jan 2000 11:28:19 +0200 From: Sheldon Hearn To: hackers@freebsd.org Subject: locale documentation Date: Wed, 19 Jan 2000 11:28:18 +0200 Message-ID: <2589.948274098@axl.noc.iafrica.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I give up. :-) Where can I find a programmer's guide to locales. Both POSIX and SUSv2 seem to assume a working understanding of how locales work. In particular, I'm trying to figure out how to discover what the current locale is within an application. If that seems like s atupid thing to want to do, assume that it's because I don't understand what's going on. :-) TIA Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 1:33:54 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id CBEB815254 for ; Wed, 19 Jan 2000 01:33:45 -0800 (PST) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.11 #1) id 12ArUg-0000iV-00 for hackers@freebsd.org; Wed, 19 Jan 2000 11:33:38 +0200 From: Sheldon Hearn To: hackers@freebsd.org Subject: Re: locale documentation In-reply-to: Your message of "Wed, 19 Jan 2000 11:28:18 +0200." <2589.948274098@axl.noc.iafrica.com> Date: Wed, 19 Jan 2000 11:33:38 +0200 Message-ID: <2758.948274418@axl.noc.iafrica.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 19 Jan 2000 11:28:18 +0200, Sheldon Hearn wrote: > In particular, I'm trying to figure out how to discover what the current > locale is within an application. Nevermind. setlocale.c answered my question and it appears I simply missed the relevant text in setlocale(3). Sorry, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 4:58:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from relay.ucb.crimea.ua (UCB-Async4-CRISCO.CRIS.NET [212.110.129.130]) by hub.freebsd.org (Postfix) with ESMTP id 1984814F46; Wed, 19 Jan 2000 04:58:36 -0800 (PST) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id OAA21296; Wed, 19 Jan 2000 14:57:30 +0200 (EET) (envelope-from ru) Date: Wed, 19 Jan 2000 14:57:30 +0200 From: Ruslan Ermilov To: Jim Flowers , Mikhail Teterin Cc: net@FreeBSD.ORG Subject: Re: Natd with Pmtu Discovery Message-ID: <20000119145729.A11150@relay.ucb.crimea.ua> Mail-Followup-To: Jim Flowers , Mikhail Teterin , net@FreeBSD.ORG References: <20000106143722.A2080@relay.ucb.crimea.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Jim Flowers on Thu, Jan 06, 2000 at 09:31:27AM -0500 X-Operating-System: FreeBSD 3.3-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [Redirected to -net, Bcc'ed to -hackers] On Thu, Jan 06, 2000 at 09:31:27AM -0500, Jim Flowers wrote: > OK. I followed this a little further. The problem is that the natd read > of the interface mtu precedes the skip routine that modifies it. > Unfortunately, when the skip routine modifies the interface mtu it does > not send a message to the socket as it does when the address is changed > so the -dynamic flag doesn't help. > > Currently, I moved the the initiation of natd to rc.local to follow the > skip change to the interface mtu but this is less than ideal. > > A better approach would be to notify the natd module of any > interface mtu change via the socket, similar to when the address is > changed with the -dynamic flag set. This would also pick of manual > changes. > Hmm, I thought of this too, but this will not fix the problem with natd. Consider the case when natd(8) is not bound to any specific interface, and it sends packets via multiple interfaces (in my case, for example). I think the only workable solution would be to just report some smaller MTU value, which will trigger an originator to repeat with the smaller packets. If this new (smaller) packet won't fit again, the procedure is repeated, and MTU is decreased again (down to 576). Another approach would be to allow natd(8) to drop the DF bit... See also: PR kern/15494. Cheers, -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 5:54:58 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dirac.th.physik.uni-bonn.de (dirac.th.physik.uni-bonn.de [131.220.161.119]) by hub.freebsd.org (Postfix) with ESMTP id 428C414DA4 for ; Wed, 19 Jan 2000 05:54:55 -0800 (PST) (envelope-from conrad@th.physik.uni-bonn.de) Received: from merlin.th.physik.uni-bonn.de (merlin.th.physik.uni-bonn.de [131.220.161.121]) by dirac.th.physik.uni-bonn.de (8.9.3/8.9.3) with SMTP id OAA13056 for ; Wed, 19 Jan 2000 14:54:50 +0100 (CET) Received: (qmail 11403 invoked by uid 145); 19 Jan 2000 13:54:50 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 19 Jan 2000 13:54:50 -0000 Date: Wed, 19 Jan 2000 14:54:50 +0100 (CET) From: Jan Conrad To: freebsd-hackers@freebsd.org Subject: Why was rsh removed from the fixit floppy? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi everybody, When I tried to clone a FreeBSD 3.3 system some minutes ago I realized that rsh was gone from the fixit floppy? But telnet is still there (rsh + rlogin is smaller then telnet!!!) Why was it removed? If there are no good reasons, please could somebody put back rsh onto the floppy! Currently I don't see how to do cloning easily without rsh? By the way: How about putting the boot + fixit stuff onto a cdrom image? That would make things a lot easier (and one would be able to boot FreeBSD from a box where the floppy drive is replaced by a ZIP drive) best regards Jan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 5:56:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id B4B6314F82; Wed, 19 Jan 2000 05:56:12 -0800 (PST) (envelope-from des@flood.ping.uio.no) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id OAA21279; Wed, 19 Jan 2000 14:56:11 +0100 (CET) (envelope-from des@flood.ping.uio.no) To: hackers@freebsd.org, security@freebsd.org Subject: New option to ping(8): dump packet contents From: Dag-Erling Smorgrav Date: 19 Jan 2000 14:56:10 +0100 Message-ID: Lines: 12 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --=-=-= The attached patch adds a -D option to ping(8) which makes it dump the payload of the reply packet instead of comparing it to the payload of the original request packet. This is useful in cases where the target host purposeldy modifies the payload before replying, e.g. if you hack your stack to report the load average in echo reply packets. DES -- Dag-Erling Smorgrav - des@flood.ping.uio.no --=-=-= Content-Disposition: attachment; filename=ping-dump.diff Content-Description: patch Index: ping.c =================================================================== RCS file: /home/ncvs/src/sbin/ping/ping.c,v retrieving revision 1.49 diff -u -r1.49 ping.c --- ping.c 2000/01/14 23:40:38 1.49 +++ ping.c 2000/01/19 13:48:53 @@ -133,6 +133,7 @@ #define F_POLICY 0x4000 #endif /*IPSEC_POLICY_IPSEC*/ #endif /*IPSEC*/ +#define F_DUMP 0x8000 /* * MAX_DUP_CHK is the number of bits in received table, i.e. the maximum @@ -234,10 +235,10 @@ datap = &outpack[8 + PHDR_LEN]; #ifndef IPSEC - while ((ch = getopt(argc, argv, "I:LQRT:c:adfi:l:np:qrs:t:v")) != -1) + while ((ch = getopt(argc, argv, "I:LQRT:c:adDfi:l:np:qrs:t:v")) != -1) #else #ifdef IPSEC_POLICY_IPSEC - while ((ch = getopt(argc, argv, "I:LQRT:c:adfi:l:np:qrs:t:vP:")) != -1) + while ((ch = getopt(argc, argv, "I:LQRT:c:adDfi:l:np:qrs:t:vP:")) != -1) #endif /*IPSEC_POLICY_IPSEC*/ #endif { @@ -256,6 +257,9 @@ case 'd': options |= F_SO_DEBUG; break; + case 'D': + options |= F_DUMP; + break; case 'f': if (uid) { errno = EPERM; @@ -837,7 +841,13 @@ cp = (u_char*)&icp->icmp_data[PHDR_LEN]; dp = &outpack[8 + PHDR_LEN]; for (i = PHDR_LEN; i < datalen; ++i, ++cp, ++dp) { - if (*cp != *dp) { + if (options & F_DUMP) { + if ((i - PHDR_LEN) % 16 == 8) + putchar(' '); + if ((i - PHDR_LEN) % 16 == 0) + putchar('\n'); + printf(" %02x", *dp); + } else if (*cp != *dp) { (void)printf("\nwrong data byte #%d should be 0x%x but was 0x%x", i, *dp, *cp); printf("\ncp:"); --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 6:45:14 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from scrooge.parallelconsulting.com (www.parallelconsulting.com [195.242.42.108]) by hub.freebsd.org (Postfix) with ESMTP id 86C7E14DAF for ; Wed, 19 Jan 2000 06:45:01 -0800 (PST) (envelope-from jonas.bulow@parallelconsulting.com) Received: from parallelconsulting.com ([10.1.1.42]) by scrooge.parallelconsulting.com (Netscape Messaging Server 3.6) with ESMTP id AAA23C1 for ; Wed, 19 Jan 2000 15:45:03 +0100 Message-ID: <3885CDCD.E033801@parallelconsulting.com> Date: Wed, 19 Jan 2000 15:44:29 +0100 From: Jonas Bulow X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: FreeBSD Hackers Subject: UVM vs FreeBSD VM system Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, How does the UVM system compare to the VM system in FreeBSD? Are there any benchmark tests or research results in this area? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 7:48:49 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id D279C1500C for ; Wed, 19 Jan 2000 07:48:47 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id JAA68929; Wed, 19 Jan 2000 09:48:44 -0600 (CST) (envelope-from dan) Date: Wed, 19 Jan 2000 09:48:43 -0600 From: Dan Nelson To: Charles Sprickman Cc: freebsd-hackers@FreeBSD.ORG, noc@inch.com Subject: Re: high load, nothing happening? (LONG) Message-ID: <20000119094843.A65970@dan.emsphone.com> References: <20000118171034.A4871@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from "Charles Sprickman" on Wed Jan 19 02:18:56 GMT 2000 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jan 19), Charles Sprickman said: > On Tue, 18 Jan 2000, Dan Nelson wrote: > > The handbook instructions are for kernel-generated panics; for a > > manual panic like yours, the stack is unimportant. The easiest way > > to see which processes are active is to run this: > > > > (kgdb) source /usr/src/sys/modules/vinum/.gdbinit.kernel > > Interesting, what's this do? It loads a whole slew of gdb macros that Greg Lehey put together while debugging vinum. > > (kgdb) ps > > > And look at the 'stat' column. Any processes with a stat of 1 or 2 > > are in the 'runnable' queue, which is what loadav measures. There > > should be 3 or so processes in that state. > > Did that, and every process had a stat of "3". Hm. Then your instantaneous loadavg at the time of the dump was 0. > More importantly, this machine is just sitting here waiting to be put > in production, so I'm more than willing to play around with it like > this while I still can... Thanks for the ongoing help, I've never > touched a debugger before, and this has been educational so far. I'm > coming off a week or two of playing with NT machines, and it's nice > to at least be able to gather some info about what the machine is > doing with OS-supplied tools, which is something I found very > difficult to do in NT GUI-land. Have you tried moving the apache binary from your running server over to this one and see if the load goes down? I mentioned before that it looked like you were running two different versions of apache. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 8:12:36 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from not.demophon.com (vpn.iscape.fi [195.170.146.67]) by hub.freebsd.org (Postfix) with ESMTP id 91D8E14FF2 for ; Wed, 19 Jan 2000 08:12:29 -0800 (PST) (envelope-from will@not.demophon.com) Received: (from will@localhost) by not.demophon.com (8.9.3/8.8.7) id SAA62422; Wed, 19 Jan 2000 18:11:49 +0200 (EET) (envelope-from will) To: jonas.bulow@parallelconsulting.com (Jonas Bulow) Cc: hackers@freebsd.org Subject: Re: UVM vs FreeBSD VM system References: <3885CDCD.E033801@parallelconsulting.com> From: Ville-Pertti Keinonen Date: 19 Jan 2000 18:11:49 +0200 In-Reply-To: jonas.bulow@parallelconsulting.com's message of "19 Jan 2000 16:46:52 +0200" Message-ID: <86vh4qghx6.fsf@not.demophon.com> Lines: 13 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG jonas.bulow@parallelconsulting.com (Jonas Bulow) writes: > How does the UVM system compare to the VM system in FreeBSD? Are there > any benchmark tests or research results in this area? The dissertation paper on UVM describes the differences (and is reasonably objective). It can be found on the UVM pages (http://www.ccrc.wustl.edu/pub/chuck/tech/uvm/). I'm not aware of any benchmarks, but would expect UVM to be somewhat slower doing most things (not by design, just the current implementation). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 8:29:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from heathers.stdio.com (heathers.stdio.com [199.89.192.5]) by hub.freebsd.org (Postfix) with ESMTP id EAADF15297; Wed, 19 Jan 2000 08:29:26 -0800 (PST) (envelope-from rhyatt@stdio.com) Received: (from rhyatt@localhost) by heathers.stdio.com (8.9.3/8.8.8) id LAA22577; Wed, 19 Jan 2000 11:29:19 -0500 (EST) (envelope-from rhyatt) From: "Ray Hyatt Jr." Message-Id: <200001191629.LAA22577@heathers.stdio.com> Subject: Re: IEEE-488: looking for junk :-) In-Reply-To: <31620.948237443.1@critter.freebsd.dk> from Poul-Henning Kamp at "Jan 19, 2000 00:17:23 am" To: Poul-Henning Kamp Date: Wed, 19 Jan 2000 11:29:19 -0500 (EST) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Are you interested in external floppy drives with that type of bus? I have some more junk of that type, I'll see what I can find. :) -Ray Content-Description: Original Message -- Start of included mail From: Poul-Henning Kamp > Subject: IEEE-488: looking for junk :-) > Date: Wed, 19 Jan 2000 00:17:23 +0100 > Sender: phk@critter.freebsd.dk > bcc: Blind Distribution List: ; > > I have managed to snatch up a pair of PCIIA compatible IEEE488 > cards locally and I have found a HP59401A HP-IB analyser for $60 > at eBay :-) so I'll go over the two pieces of code we have for > FreeBSD and look at the linux stuff and come up with some code over > spring/summer. > > Should any of you stumble into any IEEE-488/HP-IB/GP-IB stuff > gathering stuff on your way, I'll dispose of it for a good cause. > > PC cards, ISA and PCI are of course top priority, but even just a > couple of 2m long cables or more devices to test against would help me. > > I will issue a separate call for testers when I have something they > can test, but let me know if any of you have lists of wanted features. > > Poul-Henning > > -- > Poul-Henning Kamp FreeBSD coreteam member > phk@FreeBSD.ORG "Real hackers run -current on their laptop." > FreeBSD -- It will take a long time before progress goes too far! -- End of included mail. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 9: 0:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 8097E1524C for ; Wed, 19 Jan 2000 09:00:05 -0800 (PST) (envelope-from zzhang@cs.binghamton.edu) Received: from sol.cs.binghamton.edu (cs1-gw.cs.binghamton.edu [128.226.171.72]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id MAA27856 for ; Wed, 19 Jan 2000 12:00:01 -0500 (EST) Date: Wed, 19 Jan 2000 10:45:49 -0500 (EST) From: Zhihui Zhang To: freebsd-hackers@freebsd.org Subject: Accessing user data from kernel Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG When the kernel wants to access any user data, it either copies them into the kernel or maps them into kernel address space. Can anyone tell me the reasons why this is done? When a process enters the kernel mode, the page tables are not changed. I have taken this for granted for a long time without knowing the reasons. Thanks, -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 9:32:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from zippy.cdrom.com (zippy.cdrom.com [204.216.27.228]) by hub.freebsd.org (Postfix) with ESMTP id 4CBC2152FD for ; Wed, 19 Jan 2000 09:32:34 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) Received: from zippy.cdrom.com (jkh@localhost [127.0.0.1]) by zippy.cdrom.com (8.9.3/8.9.3) with ESMTP id JAA06273; Wed, 19 Jan 2000 09:32:42 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) To: Jan Conrad Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Why was rsh removed from the fixit floppy? In-reply-to: Your message of "Wed, 19 Jan 2000 14:54:50 +0100." Date: Wed, 19 Jan 2000 09:32:42 -0800 Message-ID: <6270.948303162@zippy.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Why was it removed? > If there are no good reasons, please could somebody put back rsh onto the > floppy! Currently I don't see how to do cloning easily without rsh? The fixit floppy is very full and its days as a truly useful tool are sort of numbered. > By the way: How about putting the boot + fixit stuff onto a cdrom That's what CD #2 of every Walnut Creek CDROM product is. - Jordan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 10:48:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dead-end.net (dead-end.net [216.15.131.2]) by hub.freebsd.org (Postfix) with ESMTP id 3C022152F1 for ; Wed, 19 Jan 2000 10:48:35 -0800 (PST) (envelope-from rock@dead-end.net) Received: from mailto.dead-end.net (dead-end.net [216.15.131.2]) by dead-end.net (8.9.3/DEAD-END/1999102300-Deliver) with ESMTP id TAA91844; Wed, 19 Jan 2000 19:48:17 +0100 (CET) (envelope-from rock@dead-end.net) Received: from server.rock.net (p3E9C368D.dip.t-dialin.net [62.156.54.141]) by mailto.dead-end.net (8.9.3/DEAD-END/2000011500-Customer) with ESMTP id TAA91840; Wed, 19 Jan 2000 19:48:16 +0100 (CET) (envelope-from rock@dead-end.net) Received: from dead-end.net (server [172.23.7.1]) by server.rock.net (8.9.3+Sun/8.9.3) with ESMTP id TAA25726; Wed, 19 Jan 2000 19:33:18 +0100 (MET) Message-ID: <3886036E.BA79F701@dead-end.net> Date: Wed, 19 Jan 2000 19:33:18 +0100 From: "D. Rock" X-Mailer: Mozilla 4.7 [en] (X11; U; SunOS 5.8 i86pc) X-Accept-Language: de, en MIME-Version: 1.0 To: Jan Conrad Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Why was rsh removed from the fixit floppy? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jan Conrad wrote: > > Hi everybody, > > When I tried to clone a FreeBSD 3.3 system some minutes ago I realized > that rsh was gone from the fixit floppy? > But telnet is still there (rsh + rlogin is smaller then telnet!!!) > > Why was it removed? > If there are no good reasons, please could somebody put back rsh onto the > floppy! Currently I don't see how to do cloning easily without rsh? Same here. Had some trouble to dump/restore the system from a life 2nd system. Finally found a solution: Created a named pipe on the system with the cloning device and used restore's integrated rsh capability: [System A (with the FS to dump)]: mkfifo /tmp/ufs.dump dump 0f /tmp/ufs.dump / [System B (fresh system)]: cd /mnt rrestore rvf 1.2.3.4:/tmp/ufs.dump But sure, rsh would have been quite handy... Daniel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 10:49:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 5FF07152D7 for ; Wed, 19 Jan 2000 10:49:55 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id KAA39586; Wed, 19 Jan 2000 10:49:52 -0800 (PST) (envelope-from dillon) Date: Wed, 19 Jan 2000 10:49:52 -0800 (PST) From: Matthew Dillon Message-Id: <200001191849.KAA39586@apollo.backplane.com> To: Jonas Bulow Cc: FreeBSD Hackers Subject: Re: UVM vs FreeBSD VM system References: <3885CDCD.E033801@parallelconsulting.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Hi, : :How does the UVM system compare to the VM system in FreeBSD? Are there :any benchmark tests or research results in this area? Well, UVM is a much better design then the *original* Mach VM subsystem in 4.4. FreeBSD, however, does not use the original Mach VM subsystem anymore (thanks to John Dyson). UVM and FreeBSD's VM subsystem should have roughly similar performance. http://www.ccrc.wustl.edu/pub/chuck/tech/uvm/ http://www.daemonnews.org/200001/freebsd_vm.html The main focus of UVM was to deal with Mach's deep-stacking of VM Objects. They replaced the traditional shadow chains with a two-layer system. FreeBSD wound up keeping the shadow chains but adding an optimization that tended to restrict their depth. See the "All Shadowed" case in my paper on daemonnews. UVM has a lot of cool ideas especially in regards to avoiding program stalls when the system issues write-I/O. However, it also has some problems. I think FreeBSD handles VM/Filesystem coherency better at the moment (as of USENIX NetBSD/UVM did not have a coherent VM/Filesystem cache). UVM incorporated a number of FreeBSD ideas such as page clustering. FreeBSD is not without problems either. FreeBSD's VM system has more stall points then UVM's. In anycase, the UVM paper listed at the URL contains a good description of UVM and also compares it (roughly) with other operating systems, including FreeBSD. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 11: 2:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 09136152F1 for ; Wed, 19 Jan 2000 11:02:18 -0800 (PST) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id UAA07154; Wed, 19 Jan 2000 20:02:46 +0100 (CET) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200001191902.UAA07154@info.iet.unipi.it> Subject: Re: UVM vs FreeBSD VM system In-Reply-To: <200001191849.KAA39586@apollo.backplane.com> from Matthew Dillon at "Jan 19, 2000 10:49:52 am" To: Matthew Dillon Date: Wed, 19 Jan 2000 20:02:41 +0100 (CET) Cc: Jonas Bulow , FreeBSD Hackers X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :Hi, > : > :How does the UVM system compare to the VM system in FreeBSD? Are there > :any benchmark tests or research results in this area? speaking of virtual memory: a student of mine here finally completed an implementation of a compressed VM system, running on 3.x If anyone is interested in looking at this I can cleanup the code and prepare a patchfile. Pages candididates to pageout are tentatively compressed using a very fast algorithm (basically a zero-removal thing, i have a small paper on this on OSR April'97 issue, see my web page http://www.iet.unipi.it/~luigi/research.html) and if they give good compression the page is not sent to disk but saved to an area of ram set aside for the purpose. It turns out that many programs (netscape etc. but perhaps compilers as well, we haven't played too much with it) tend to leave pages rather empty so the compression succeeds in many cases. Of course we tried to preserve the advantages of clustering etc (so we don't bother going through compression if many adjacent pages go to disk anyways). cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 12: 9:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from over.ru (over.rinet.ru [195.54.192.99]) by hub.freebsd.org (Postfix) with SMTP id 1C9BC14FA5 for ; Wed, 19 Jan 2000 12:09:05 -0800 (PST) (envelope-from tarkhil@over.ru) Received: (qmail 23011 invoked by uid 1000); 19 Jan 2000 20:08:51 -0000 Date: Wed, 19 Jan 2000 23:08:50 +0300 From: Alex Povolotsky To: hackers@freebsd.org Subject: Strange behaviour of loaded system Message-ID: <20000119230850.A92960@over.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello! I've observed a VERY strange behaviour of a moderately-to-heavy loaded system (load average about 5.7 on a 2xPII-400 with 512Mb of RAM): (I have no access to the box right now, and I'm giving only general details; however, I'll be able to produce more details next morning) About 200-300 processes (230-280, something always creates and dies), some swapping (I recall 36% right now), and the most strange thing: always some (4-14M) of free RAM, and about 100 pageins per second. Most of processes are modperl'ed Apaches and self-written POP3 readers. I have no good understanding of such behaviour. Unfortunately I cannot find my "UNIX Internals: The New Frontier" for several days, so I'm really limited on books. Maybe some kind soul will tell me how can system behave that way? Alex. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 14:38:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.medsp.com (medsp.com [209.203.250.120]) by hub.freebsd.org (Postfix) with ESMTP id 225C214CCF for ; Wed, 19 Jan 2000 14:38:12 -0800 (PST) (envelope-from scott@mail.medsp.com) Received: (from scott@localhost) by mail.medsp.com (8.9.3/8.9.3) id OAA86571 for hackers@freebsd.org; Wed, 19 Jan 2000 14:42:54 -0800 (PST) (envelope-from scott) Date: Wed, 19 Jan 2000 14:42:54 -0800 From: Scott Gasch To: hackers@freebsd.org Subject: reuse of old passwords Message-ID: <20000119144254.A86549@www.medsp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, The current behavior for forcing a user to change his password on FreeBSD seems to allow the reuse of the same password. In a sense, this behavior defeats the purpose of forcing password changes. With this thought in mind I wrote a simple patch to passwd that will not allow the user to select the same password again... indeed it will not allow him to reuse any of his last N passwords (N is configurable). After I wrote this I began to think about why it might be a bad thing. Someone mentioned that security policies where a user is, for example, forced to change your password every 90 days and may not reuse any of his prior 10 passwords are _less_ secure as they encourage users to write down their passwords. Another possible drawback is that the plaintext newly selected password is in memory longer and is, indeed, passed from getnewpasswd (in local_passwd.c) to another routine for historical validation. To me this is a minor issue but it may not be so for others. So my questions are: what is the thinking behind allowing a user to reuse the same password again? If this is the policy, what is the sense of forcing a password change? What are your concerns with a policy that would not allow old password reuse? Thanks, Scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 14:53:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 10529152EC for ; Wed, 19 Jan 2000 14:53:17 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id RAA01221; Wed, 19 Jan 2000 17:53:12 -0500 (EST) (envelope-from luoqi) Date: Wed, 19 Jan 2000 17:53:12 -0500 (EST) From: Luoqi Chen Message-Id: <200001192253.RAA01221@lor.watermarkgroup.com> To: freebsd-hackers@FreeBSD.ORG, zzhang@cs.binghamton.edu Subject: Re: Accessing user data from kernel Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > When the kernel wants to access any user data, it either copies them into > the kernel or maps them into kernel address space. Can anyone tell me the > reasons why this is done? When a process enters the kernel mode, the > page tables are not changed. > > I have taken this for granted for a long time without knowing the reasons. > > Thanks, > > -Zhihui > In theory, the kernel and user address spaces are separate. But in practice, for performance reasons, the kernel address space is always mapped at the top of user address space, so the kernel can directly access the current process' address space (copyin/copyout are just normal bcopy with bound check and guard against page fault). Under certain circumstances, you might want them to be truely separate, for example, if you have to use the full 4G in a user process, the tradeoff of course is the user/kernel context switch overhead. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 15: 4: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pau-amma.whistle.com (pau-amma.whistle.com [207.76.205.64]) by hub.freebsd.org (Postfix) with ESMTP id ECCE5150B3 for ; Wed, 19 Jan 2000 15:03:45 -0800 (PST) (envelope-from dhw@whistle.com) Received: (from dhw@localhost) by pau-amma.whistle.com (8.9.2/8.9.2) id PAA83306; Wed, 19 Jan 2000 15:03:38 -0800 (PST) Date: Wed, 19 Jan 2000 15:03:38 -0800 (PST) From: David Wolfskill Message-Id: <200001192303.PAA83306@pau-amma.whistle.com> To: hackers@FreeBSD.ORG, scott@mail.medsp.com Subject: Re: reuse of old passwords In-Reply-To: <20000119144254.A86549@www.medsp.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Date: Wed, 19 Jan 2000 14:42:54 -0800 >From: Scott Gasch >So my questions are: what is the thinking behind allowing a user to >reuse the same password again? If this is the policy, what is the >sense of forcing a password change? What are your concerns with a >policy that would not allow old password reuse? One of my main reasons for believing that retaining a password history is a Bad Thing is that if, somehow, a Bad Guy (tm) were to acquire a copy of the password history (say, from a backup tape), that would permit the BG to perform brute force attacks against those encrypted passwords at his leisure. Given sufficient time, the Bad Guy will be able to crack those passwords. (Most of my biases in this respect were formed in an environment where passwords were fairly limited -- DES-encrypted, no more than 8 characters. Some of this may be less of an issue under other conditions... but I'm not qualified to judge that, and I choose to err on the side of caution/paranoia.) Given the cracked list of passwords, especially if the BG can know the order in which they were selected, I would expect that if the person whose passwords were cracked uses some sort of pattern in choosing the passwords -- which I would expect would be quite common -- the BG is more likely to be able to discern a likely pattern, thus reducing the universe of likely current passwords... in some cases, dramatically. Since I'm writing anyway, I'll go a little further, and state that it is my (personal! -- I'm *not* speaking/writing on behalf of any corporate entity) belief that: * In general, things that reduce the scope of a brute-force search are bad. * Authentication mechanisms are provided as a *convenience* for users. (I realize that some -- many, even -- folks would consider this to be such a stretch that they would be unable to suspend disbelief enough to give it serious thought. But try to bear with me....) * A person is responsible for what is done by processes that are run with an effective UID that has been assigned to that person. No excuses (well, absent OS malfunction or something perpetrated by someone with root access). * If someone actually *wants* to let other folks run random processes on his behalf, far be it from me to tell him "No." But if one of those does something inappropriate, I would hold the assigned person responsible, regardless. * So from that (probably warped) perspective, authentication mechanisms provide a way to help keep folks honest about who is doing what. Expecting a whole lot more of them is not an exercise I'd care to join. (I'm told, upon occasion, that I have a rich fantasy life.) Cheers, david -- David Wolfskill dhw@whistle.com UNIX System Administrator voice: (650) 577-7158 pager: (888) 347-0197 FAX: (650) 372-5915 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 16:13:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (Postfix) with ESMTP id 32BFF14E5A for ; Wed, 19 Jan 2000 16:13:40 -0800 (PST) (envelope-from roberto@keltia.freenix.fr) Received: (from uucp@localhost) by frmug.org (8.9.3/frmug-2.5/nospam) with UUCP id BAA26552 for hackers@freebsd.org; Thu, 20 Jan 2000 01:13:27 +0100 (CET) (envelope-from roberto@keltia.freenix.fr) Received: by keltia.freenix.fr (Postfix, from userid 101) id 24BC18863; Thu, 20 Jan 2000 00:59:53 +0100 (CET) Date: Thu, 20 Jan 2000 00:59:53 +0100 From: Ollivier Robert To: hackers@freebsd.org Subject: Re: Harlan Stenn: Message-ID: <20000120005952.A20608@keltia.freenix.fr> Mail-Followup-To: hackers@freebsd.org References: <16352.948260137@whimsy.udel.edu> <77539.948265434@axl.noc.iafrica.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <77539.948265434@axl.noc.iafrica.com>; from sheldonh@uunet.co.za on Wed, Jan 19, 2000 at 09:03:54AM +0200 X-Operating-System: FreeBSD 4.0-CURRENT/ELF AMD-K6/200 & 2x PPro/200 SMP Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Sheldon Hearn: > Nope, but I _can_ suggest that you send it to the right place. :-) Harlan is the *maintainer* of the ntp source tree at udel and generates all releases :-) -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 4.0-CURRENT #77: Thu Dec 30 12:49:51 CET 1999 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 17:41:53 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns2.accesscom.com (ns2.accesscom.com [205.226.156.3]) by hub.freebsd.org (Postfix) with ESMTP id 3DA2F151B0 for ; Wed, 19 Jan 2000 17:41:47 -0800 (PST) (envelope-from sabrina@shell.accesscom.com) Received: from shell.accesscom.com (root@shell.accesscom.com [205.226.156.10]) by ns2.accesscom.com (8.9.3/8.9.3/Debian/GNU) with ESMTP id RAA13030; Wed, 19 Jan 2000 17:41:45 -0800 Received: (from sabrina@localhost) by shell.accesscom.com (8.9.3/8.9.3/Debian/GNU) id RAA30336; Wed, 19 Jan 2000 17:41:43 -0800 From: Sabrina Minshall Message-Id: <200001200141.RAA30336@shell.accesscom.com> Subject: PR kern/14034: gettimeofday() returns negative value? To: hackers@freebsd.org Date: Wed, 19 Jan 2000 17:41:43 -0800 (PST) Cc: sabrina@accesscom.com X-Mailer: ELM [version 2.4ME+ PL65 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG What's going one here? Successive calls to gettimeofday yields negative elapsed time? Any fixes? ~~~~negtime.c~~~~ #include #include #include #include #include #include #include #include #include int time_elapsed(struct timeval *t1, struct timeval *t2) { int s, ms; s = t1->tv_sec - t2->tv_sec; assert((s >= 0)); if (s != 0) { if (t1->tv_usec < t2->tv_usec) { s--; t1->tv_usec += 1000000; } } ms = s * 1000000 + (t1->tv_usec - t2->tv_usec); return (ms); } int main() { struct timeval tv1, tv2; int diff; if (gettimeofday(&tv1, NULL) < 0) { perror("gettimeofday"); } tv2 = tv1; for (;;) { usleep(2000); if (gettimeofday(&tv1, NULL) < 0) { perror("gettimeofday"); } /* * diff in usec. */ diff = time_elapsed(&tv1, &tv2); if (diff < 0) { printf("-ve tvdiff %d\n", diff); printf("%ld %ld %ld %ld\n", tv1.tv_sec, tv1.tv_usec, tv2.tv_sec, tv2.tv_usec); assert(0); } tv2 = tv1; } return (0); } ~~~~negtime.c~~~~ hacker ~>./a.out -ve tvdiff -979993 948332324 35044 948332324 1015037 assertion "0" failed: file "negtime.c", line 56 Abort Thanks, sabrina To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 18:14:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from c62443-a.frmt1.sfba.home.com (c62443-a.frmt1.sfba.home.com [24.0.69.165]) by hub.freebsd.org (Postfix) with ESMTP id B19ED152FA for ; Wed, 19 Jan 2000 18:14:10 -0800 (PST) (envelope-from adsharma@c62443-a.frmt1.sfba.home.com) Received: (from adsharma@localhost) by c62443-a.frmt1.sfba.home.com (8.9.3/8.9.3) id SAA17214; Wed, 19 Jan 2000 18:14:10 -0800 Date: Wed, 19 Jan 2000 18:14:10 -0800 From: Arun Sharma Message-Id: <200001200214.SAA17214@c62443-a.frmt1.sfba.home.com> To: zzhang@cs.binghamton.edu, hackers@freebsd.org Subject: Re: Accessing user data from kernel In-Reply-To: References: Reply-To: adsharma@sharmas.dhs.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In muc.lists.freebsd.hackers, you wrote: > > When the kernel wants to access any user data, it either copies them into > the kernel or maps them into kernel address space. Can anyone tell me the > reasons why this is done? When a process enters the kernel mode, the > page tables are not changed. > > I have taken this for granted for a long time without knowing the reasons. 1. The kernel may be entered asynchronously - from interrupts and traps. You can't always be sure of which is the currently running user process. 2. For cases where you've entered the kernel synchronously - through syscalls for example, you need to check for the validity of data. You could potentially skip the step and validate the data where it is used, rather than doing it upfront - but that may mean too many checks. It's just cleaner to copyin/copyout once at entry/exit, rather than repeating the code all over the place. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 18:44:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by hub.freebsd.org (Postfix) with ESMTP id 3610B14D86 for ; Wed, 19 Jan 2000 18:44:08 -0800 (PST) (envelope-from bmilekic@dsuper.net) Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by oracle.dsuper.net (8.9.3/8.9.3) with ESMTP id VAA07683; Wed, 19 Jan 2000 21:43:58 -0500 (EST) Date: Wed, 19 Jan 2000 21:43:58 -0500 (EST) From: Bosko Milekic To: Sabrina Minshall Cc: hackers@FreeBSD.ORG Subject: Re: PR kern/14034: gettimeofday() returns negative value? In-Reply-To: <200001200141.RAA30336@shell.accesscom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 19 Jan 2000, Sabrina Minshall wrote: >What's going one here? Successive calls to gettimeofday >yields negative elapsed time? > >Any fixes? > [ code snipped ] Well, the PR considers a different problem. What your code does is call gettimeofday() once, record the value, and then a little later, call it again while proceeding to calculate a delta between the latter and previous results. Notice the issue mentionned in the PR has been concluded to be faulty hardware. Now, I assure you, this is a problem with your code snippet. I tried this code on a DEC box running: OSF1 oracle.dsuper.net V4.0 1091 alpha And got the exact same results. The problem is the tv1 = tv2 structure equality. Since the byte order is different, you get your usec from tv1 ending up in tv2's usec field. Regards, Bosko. -- Bosko Milekic Email: bmilekic@dsuper.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Wed Jan 19 22:55:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id A43E0152E0 for ; Wed, 19 Jan 2000 22:55:07 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id WAA43173; Wed, 19 Jan 2000 22:54:30 -0800 (PST) (envelope-from dillon) Date: Wed, 19 Jan 2000 22:54:30 -0800 (PST) From: Matthew Dillon Message-Id: <200001200654.WAA43173@apollo.backplane.com> To: Alex Povolotsky Cc: hackers@FreeBSD.ORG Subject: Re: Strange behaviour of loaded system References: <20000119230850.A92960@over.ru> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Hello! : :I've observed a VERY strange behaviour of a moderately-to-heavy loaded :system (load average about 5.7 on a 2xPII-400 with 512Mb of RAM): : :(I have no access to the box right now, and I'm giving only general details; :however, I'll be able to produce more details next morning) : :About 200-300 processes (230-280, something always creates and dies), some :swapping (I recall 36% right now), and the most strange thing: always some :(4-14M) of free RAM, and about 100 pageins per second. Most of processes are :modperl'ed Apaches and self-written POP3 readers. : :I have no good understanding of such behaviour. Unfortunately I cannot find :my "UNIX Internals: The New Frontier" for several days, so I'm really :limited on books. Maybe some kind soul will tell me how can system behave :that way? : :Alex. This sounds like proper behavior to me. Whenever you have a situation where processes are being created and deleted you have a situation where burst memory use is occuring. If the system does not have sufficient memory to handle the active load then you wind up eating the free memory in large chunks and causing the system to page. The system will attempt to recover sufficient memory to handle the next cycle of burst memory allocation. The system is trying to manage the load as best it can. For a machine with 512MB of ram maintaining 4-14M of truely free memory under the load conditions you have indicated is the correct response by the system. The paging rate you indicate, 100 pages/sec of paging activity, indicates that you are definitely overcommitting the machine's memory but haven't yet reached the point where you start thrashing. Perl is especially bad at memory management. The active data set tends to be the whole enchillada. If you are using perl your best bet is to either add memory to the machine or to track down why perl is eating so much memory and try to fix it. If you are running POP on the same box you should note that POP tends to place a heavy disk and memory load on any system as well, due to its tendancy to scan mailbox files and due to the frequency that users check their mail. Large mailbox files can be especially nasty. You have several options. First, you can add memory to the machine. Second, you can try tuning Apache and modperl. Third you can attempt to track down where all the memory is going and work on that (it's probably the perl and/or POP related stuff). -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 2:37:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dialup.nacamar.de (authsrv.nacamar.de [194.162.162.197]) by hub.freebsd.org (Postfix) with SMTP id DCC1D14F40 for ; Thu, 20 Jan 2000 02:37:19 -0800 (PST) (envelope-from Sunrise!nmh@dialup.nacamar.de) Received: (qmail 28050 invoked from network); 20 Jan 2000 10:37:17 -0000 Received: from dialup23-177.access.nacamar.de (HELO Sunrise.UUCP) (62.144.233.177) by authsrv.nacamar.de with SMTP; 20 Jan 2000 10:37:17 -0000 Date: Thu, 20 Jan 2000 11:37:01 +0100 (CET) From: Nils M Holm X-Sender: nmh@Sunrise.UUCP Reply-To: Nils M Holm To: hackers@freebsd.org Subject: Force dynamic linking? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello! Is there any way to force the creation of dynamically linked executables using the ELF linker (like 'ld -Bforcedynamic' in the a.out version)? I have to link against static libs, but I want to use dlopen() etc. Thank you for your help! Bye, nmh. -- Nils M Holm [Please use Reply-To:] http://www.homepages.de/home/nmh/ -- The home of the T3X compiler To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 3:49:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from iclub.nsu.ru (iclub.nsu.ru [193.124.222.66]) by hub.freebsd.org (Postfix) with ESMTP id 11C04152CE for ; Thu, 20 Jan 2000 03:48:49 -0800 (PST) (envelope-from fjoe@iclub.nsu.ru) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.9.3/8.9.3) with ESMTP id RAA20638 for ; Thu, 20 Jan 2000 17:48:18 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Date: Thu, 20 Jan 2000 17:48:17 +0600 (NS) From: Max Khon To: hackers@freebsd.org Subject: does -frepo work in gcc-devel or -current gcc? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! This small program does not build with both -current gcc (gcc version 2.95.2 19991024 (release), I built collect2 for it manually) and gcc-devel (gcc version 2.96 20000110 (experimental)) --- cut here --- CXX=g++ -frepo LD=g++ foo: foo.o $(LD) -o $* $> clean: rm -f foo.o foo foo.rpo --- cut here --- --- cut here --- #include #include main(void) { std::vector v; std::string s = "foo"; v.push_back(s); return 0; } --- cut here --- When I tried to compile the same program on Solaris (gcc 2.95.1) and Linux (gcc 2.95.2) everything went ok but I noticed that collect2 recompiles foo.cc twice. On FreeBSD foo.cc gets recompiled only once and on the second pass collect2 bails out in tlink.c:do_tlink after scan_linker_output() call. I need -frepo because I'm porting quite large project to FreeBSD and -frepo is used there heavily. However porting it to Linux was not that hard. /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 4: 2:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (wandering-wizard.cybercity.dk [212.242.43.150]) by hub.freebsd.org (Postfix) with ESMTP id 2010C153C8 for ; Thu, 20 Jan 2000 04:02:24 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.freebsd.dk [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.3) with ESMTP id KAA00316; Thu, 20 Jan 2000 10:41:04 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: "Ray Hyatt Jr." Cc: hackers@FreeBSD.ORG Subject: Re: IEEE-488: looking for junk :-) In-reply-to: Your message of "Wed, 19 Jan 2000 11:29:19 EST." <200001191629.LAA22577@heathers.stdio.com> Date: Thu, 20 Jan 2000 10:41:04 +0100 Message-ID: <314.948361264@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200001191629.LAA22577@heathers.stdio.com>, "Ray Hyatt Jr." writes: >Are you interested in external floppy drives with that type >of bus? Not really. The intent of the driver is to interface to ascii based test/lab equipment, not to apply for membership in the antique hardware society :-) -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 4:43:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from midget.dons.net.au (daniel.lnk.telstra.net [139.130.137.70]) by hub.freebsd.org (Postfix) with ESMTP id DAF2E14D0D for ; Thu, 20 Jan 2000 04:43:24 -0800 (PST) (envelope-from darius@dons.net.au) Received: from guppy.dons.net.au (darius@guppy.dons.net.au [203.31.81.9]) by midget.dons.net.au (8.9.3/8.9.1) with ESMTP id XAA72435; Thu, 20 Jan 2000 23:13:11 +1030 (CST) (envelope-from darius@dons.net.au) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 20 Jan 2000 23:13:10 +1030 (CST) From: "Daniel J. O'Connor" To: Nils M Holm Subject: RE: Force dynamic linking? Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 20-Jan-00 Nils M Holm wrote: > Is there any way to force the creation of dynamically linked executables > using the ELF linker (like 'ld -Bforcedynamic' in the a.out version)? > > I have to link against static libs, but I want to use dlopen() etc. I think you have to link against the libs you need by hand.. (And don't specify -Bstatic).. eg -> gcc foo.o bar.o /usr/local/lib/liba.a -o foo That way you end up with a dynamic executable with no unresolved symbols. (Been here done this ;) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 7:24: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from iclub.nsu.ru (iclub.nsu.ru [193.124.222.66]) by hub.freebsd.org (Postfix) with ESMTP id 1C15914D42 for ; Thu, 20 Jan 2000 07:24:03 -0800 (PST) (envelope-from fjoe@iclub.nsu.ru) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.9.3/8.9.3) with ESMTP id VAA61018 for ; Thu, 20 Jan 2000 21:24:00 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Date: Thu, 20 Jan 2000 21:23:59 +0600 (NS) From: Max Khon To: hackers@freebsd.org Subject: -frepo broken Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! seems that i tracked down the problem: ld uses cplus-dem.c from libiberty (contrib/binutils/libiberty/cplus-dem.c) which differs from that one gcc is compiled with (contrib/gcc/cplus-dem.c). When I compiled collect2 with libiberty's cplus-dem.c everything went ok. /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 7:55:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from iclub.nsu.ru (iclub.nsu.ru [193.124.222.66]) by hub.freebsd.org (Postfix) with ESMTP id CFEF314E4F for ; Thu, 20 Jan 2000 07:55:03 -0800 (PST) (envelope-from fjoe@iclub.nsu.ru) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.9.3/8.9.3) with ESMTP id VAA71817 for ; Thu, 20 Jan 2000 21:54:51 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Date: Thu, 20 Jan 2000 21:54:51 +0600 (NS) From: Max Khon To: hackers@FreeBSD.ORG Subject: Re: -frepo broken In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Thu, 20 Jan 2000, Max Khon wrote: > seems that i tracked down the problem: ld uses cplus-dem.c from > libiberty (contrib/binutils/libiberty/cplus-dem.c) which differs > from that one gcc is compiled with (contrib/gcc/cplus-dem.c). > When I compiled collect2 with libiberty's cplus-dem.c > everything went ok. sorry, this is really for ports. I mean egcs and gcc-devel ports. collect2 is not built in base distro yet (but should?) /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 8:18:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 1926214DFA for ; Thu, 20 Jan 2000 08:18:33 -0800 (PST) (envelope-from zzhang@cs.binghamton.edu) Received: from sol.cs.binghamton.edu (cs1-gw.cs.binghamton.edu [128.226.171.72]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id LAA01488; Thu, 20 Jan 2000 11:18:28 -0500 (EST) Date: Thu, 20 Jan 2000 10:04:16 -0500 (EST) From: Zhihui Zhang Reply-To: Zhihui Zhang To: adsharma@sharmas.dhs.org Cc: hackers@freebsd.org, Luoqi Chen Subject: Re: Accessing user data from kernel In-Reply-To: <200001200214.SAA17214@c62443-a.frmt1.sfba.home.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 19 Jan 2000, Arun Sharma wrote: > In muc.lists.freebsd.hackers, you wrote: > > > > When the kernel wants to access any user data, it either copies them into > > the kernel or maps them into kernel address space. Can anyone tell me the > > reasons why this is done? When a process enters the kernel mode, the > > page tables are not changed. > > > > I have taken this for granted for a long time without knowing the reasons. > > 1. The kernel may be entered asynchronously - from interrupts and traps. > You can't always be sure of which is the currently running user process. > > 2. For cases where you've entered the kernel synchronously - through syscalls > for example, you need to check for the validity of data. You could > potentially skip the step and validate the data where it is used, rather > than doing it upfront - but that may mean too many checks. It's just > cleaner to copyin/copyout once at entry/exit, rather than repeating the > code all over the place. Thanks for your reply. But I am still lost. Point 1 seems to make sense. If the user data is already copied into the kernel, we can access it just at any time, i.e., asynchronously. Point 2 seems to be saying that we would rather sacrifice some performance to gain a cleaner interface (people are talking about eliminating kernel copying for a long time). Consider the physical I/O on a raw device, where we map the user data again in the KVA without copying the data. Why do we do this double mapping, when we can access the user data directly? -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 8:34:50 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from not.demophon.com (vpn.iscape.fi [195.170.146.67]) by hub.freebsd.org (Postfix) with ESMTP id 02B8214FC1 for ; Thu, 20 Jan 2000 08:34:45 -0800 (PST) (envelope-from will@not.demophon.com) Received: (from will@localhost) by not.demophon.com (8.9.3/8.8.7) id SAA63641; Thu, 20 Jan 2000 18:33:39 +0200 (EET) (envelope-from will) To: adsharma@sharmas.dhs.org Cc: hackers@freebsd.org, zzhang@cs.binghamton.edu Subject: Re: Accessing user data from kernel References: <200001200214.SAA17214@c62443-a.frmt1.sfba.home.com> From: Ville-Pertti Keinonen Date: 20 Jan 2000 18:33:38 +0200 In-Reply-To: adsharma@c62443-a.frmt1.sfba.home.com's message of "20 Jan 2000 04:14:54 +0200" Message-ID: <86puuwd7od.fsf@not.demophon.com> Lines: 28 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG adsharma@c62443-a.frmt1.sfba.home.com (Arun Sharma) writes: > 2. For cases where you've entered the kernel synchronously - through syscalls > for example, you need to check for the validity of data. You could > potentially skip the step and validate the data where it is used, rather > than doing it upfront - but that may mean too many checks. It's just > cleaner to copyin/copyout once at entry/exit, rather than repeating the > code all over the place. That's only part of the story. The copyin/copyout interface provides a portable interface. Some architectures have efficient ways of keeping separate user and kernel page tables, so they require that copyin/copyout be done using unusual methods for access. Additionally, you often want to access data in a section of code where page faulting is not acceptable. Accessing a non-wired memory address implicitly allows you to block. Recovering from fatal faults (translating them into errors) is hard to do properly in C... All methods of accessing user pages while avoiding faults are very slow. So copyin/copyout functions implemented in assembly language are probably the most convenient way of accessing user data in FreeBSD or any other similar kernel. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 8:45: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from c62443-a.frmt1.sfba.home.com (c62443-a.frmt1.sfba.home.com [24.0.69.165]) by hub.freebsd.org (Postfix) with ESMTP id 77A8A14CEC for ; Thu, 20 Jan 2000 08:44:59 -0800 (PST) (envelope-from adsharma@c62443-a.frmt1.sfba.home.com) Received: (from adsharma@localhost) by c62443-a.frmt1.sfba.home.com (8.9.3/8.9.3) id IAA19677; Thu, 20 Jan 2000 08:44:57 -0800 Date: Thu, 20 Jan 2000 08:44:57 -0800 From: Arun Sharma To: Zhihui Zhang Cc: hackers@freebsd.org Subject: Re: Accessing user data from kernel Message-ID: <20000120084457.A19569@sharmas.dhs.org> References: <200001200214.SAA17214@c62443-a.frmt1.sfba.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: ; from Zhihui Zhang on Thu, Jan 20, 2000 at 10:04:16AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jan 20, 2000 at 10:04:16AM -0500, Zhihui Zhang wrote: > Point 2 seems to be saying that we would rather sacrifice some performance > to gain a cleaner interface (people are talking about eliminating kernel > copying for a long time). Consider the physical I/O on a raw device, where > we map the user data again in the KVA without copying the data. Why do we > do this double mapping, when we can access the user data directly? > Direct I/O to user space should be treated as an optimization. Such I/O requires wiring down all the user pages before I/O can happen. Hence it requires special previleges. Why does it get mapped to KVA ? Because of point 1. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 9: 3:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dirac.th.physik.uni-bonn.de (dirac.th.physik.uni-bonn.de [131.220.161.119]) by hub.freebsd.org (Postfix) with ESMTP id 556F914D90 for ; Thu, 20 Jan 2000 09:03:23 -0800 (PST) (envelope-from conrad@th.physik.uni-bonn.de) Received: from merlin.th.physik.uni-bonn.de (merlin.th.physik.uni-bonn.de [131.220.161.121]) by dirac.th.physik.uni-bonn.de (8.9.3/8.9.3) with SMTP id SAA21347 for ; Thu, 20 Jan 2000 18:03:20 +0100 (CET) Received: (qmail 53931 invoked by uid 145); 20 Jan 2000 17:03:19 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Jan 2000 17:03:19 -0000 Date: Thu, 20 Jan 2000 18:03:19 +0100 (CET) From: Jan Conrad To: "D. Rock" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Why was rsh removed from the fixit floppy? In-Reply-To: <3886036E.BA79F701@dead-end.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, On Wed, 19 Jan 2000, D. Rock wrote: > > If there are no good reasons, please could somebody put back rsh onto the > > floppy! Currently I don't see how to do cloning easily without rsh? > Same here. > > Had some trouble to dump/restore the system from a life 2nd system. > > Finally found a solution: > Created a named pipe on the system with the cloning device and used > restore's integrated rsh capability: thanks for your hint. But doesnt rrestore use rmt, that is rexecd? We have no firewall here so using rexecd is giving me some pain... regards Jan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 9:18:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dirac.th.physik.uni-bonn.de (dirac.th.physik.uni-bonn.de [131.220.161.119]) by hub.freebsd.org (Postfix) with ESMTP id 8181B14F4D for ; Thu, 20 Jan 2000 09:18:36 -0800 (PST) (envelope-from conrad@th.physik.uni-bonn.de) Received: from merlin.th.physik.uni-bonn.de (merlin.th.physik.uni-bonn.de [131.220.161.121]) by dirac.th.physik.uni-bonn.de (8.9.3/8.9.3) with SMTP id SAA21609 for ; Thu, 20 Jan 2000 18:18:34 +0100 (CET) Received: (qmail 54144 invoked by uid 145); 20 Jan 2000 17:18:34 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Jan 2000 17:18:34 -0000 Date: Thu, 20 Jan 2000 18:18:34 +0100 (CET) From: Jan Conrad To: "Jordan K. Hubbard" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Why was rsh removed from the fixit floppy? In-Reply-To: <6270.948303162@zippy.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 19 Jan 2000, Jordan K. Hubbard wrote: > > Why was it removed? > > If there are no good reasons, please could somebody put back rsh onto the > > floppy! Currently I don't see how to do cloning easily without rsh? > > The fixit floppy is very full and its days as a truly useful tool are > sort of numbered. Well - after thinking on this for a while I'd still suggest to eliminate telnet in favor of rsh/rlogin. The reason is that you can really do a *lot* of things with rsh (especially compared to telnet..) I now resolved the problem by mounting the root dir of the other machine by nfs and copying directly from that. Doing this I found - to my great surprise - that FreeBSD's root filesystem neither contains rsh/rlogin nor tar!! I would *strongly* suggest to put rsh/rlogin + tar onto the root filesystem. I allways found these commands to be *extremely* useful in single user mode with all other partitions unmounted (e.g. when reorganizing the structure of my partitions/disks etc.) How about it? > > > By the way: How about putting the boot + fixit stuff onto a cdrom > > That's what CD #2 of every Walnut Creek CDROM product is. Sounds good... Does it contain rsh/rlogin + tar?? Anyway - supporting FreeBSD by buying the CDROMs is a great idea - no doubt... But shouldn't be there a way of installing FreeBSD with CDROMs instead of floppies - I mean with a *small* iso image of some megabytes length to do the rest over the network (think of STABLE...). > > - Jordan > regards Jan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 9:58:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.enteract.com (mail.enteract.com [207.229.143.33]) by hub.freebsd.org (Postfix) with ESMTP id 529F215105 for ; Thu, 20 Jan 2000 09:58:41 -0800 (PST) (envelope-from dscheidt@enteract.com) Received: from shell-1.enteract.com (dscheidt@shell-1.enteract.com [207.229.143.40]) by mail.enteract.com (8.9.3/8.9.3) with SMTP id LAA70910; Thu, 20 Jan 2000 11:58:31 -0600 (CST) (envelope-from dscheidt@enteract.com) Date: Thu, 20 Jan 2000 11:58:31 -0600 (CST) From: David Scheidt To: Jan Conrad Cc: "Jordan K. Hubbard" , freebsd-hackers@FreeBSD.ORG Subject: Re: Why was rsh removed from the fixit floppy? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 20 Jan 2000, Jan Conrad wrote: > I now resolved the problem by mounting the root dir of the other machine > by nfs and copying directly from that. Doing this I found - to my great > surprise - that FreeBSD's root filesystem neither contains rsh/rlogin nor > tar!! > dms@rally3 ~ 239$ which pax /bin/pax To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 11:35:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from baynet.baynetworks.com (ns1.BayNetworks.COM [134.177.3.20]) by hub.freebsd.org (Postfix) with ESMTP id 86B3D14E40 for ; Thu, 20 Jan 2000 11:35:29 -0800 (PST) (envelope-from bwithrow@engeast.BayNetworks.COM) Received: from mailhost.BayNetworks.COM (h8754.s84f5.BayNetworks.COM [132.245.135.84]) by baynet.baynetworks.com (8.9.1/8.9.1) with ESMTP id LAA00779 for ; Thu, 20 Jan 2000 11:34:06 -0800 (PST) Received: from pobox.engeast.BayNetworks.COM (pobox.engeast.baynetworks.com [192.32.61.6]) by mailhost.BayNetworks.COM (8.9.1/8.8.8) with ESMTP id OAA19191 for ; Thu, 20 Jan 2000 14:30:20 -0500 (EST) Received: from tuva.engeast.baynetworks.com (tuva [192.32.150.102]) by pobox.engeast.BayNetworks.COM (SMI-8.6/BNET-97/04/24-S) with ESMTP id OAA11272; Thu, 20 Jan 2000 14:35:06 -0500 for Received: from tuva.engeast.baynetworks.com (localhost [127.0.0.1]) by tuva.engeast.baynetworks.com (8.9.3/8.9.3) with ESMTP id OAA82286 for ; Thu, 20 Jan 2000 14:34:58 -0500 (EST) (envelope-from bwithrow@tuva.engeast.baynetworks.com) Message-Id: <200001201934.OAA82286@tuva.engeast.baynetworks.com> X-Mailer: exmh version 2.0.2 2/24/98 To: hackers@freebsd.org Subject: NFS/AMD interop failure with Solaris Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 20 Jan 2000 14:34:57 -0500 From: Robert Withrow Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Trying to use AMD mounted filesystems on FreeBSD 3.2 served on a Solaris 2.6 system fails. Navigating to a directory and doing a "ls" hangs. In my case, other NFS/AMD operations still succeed. This was all working before the server was upgraded from Solaris 2.5 to 2.6. Ideas or assistance gladly accepted. I would normally post this to questions, except I notice a similar complaint, posted in November, that never received a reply... Client details: bash-2.03$ uname -a FreeBSD tuva.engeast.baynetworks.com 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Tue May 18 04:05:08 GMT 1999 jkh@cathair:/usr/src/sys/compile/GENERIC i386 bash-2.03$ amq -m | grep tannu tannu:/net/tannu /a/net/tannu/root host 1 tannu.engeast.baynetworks.com is up bash-2.03$ cat /etc/amd/amd.net # Generated by genamd V1.1 on Wed Nov 10 19:05:36 1999 /defaults type:=host;fs:=${autodir}/net/${rhost}/root;rhost:=${key} * opts:=rw,soft,intr,nodev,nosuid,grpid,resvport,vers=2,proto=udp,rsize=8192,wsize=8192,noconn Server details: bash-2.03# uname -a SunOS tannu 5.6 Generic_105181-17 sun4u sparc SUNW,Ultra-5_10 bash-2.03# share - /t115 rw "local filesystem" - /opt/views rw "" - /view/bob-1/tree/bac rw "" - /view/bob-1/tree/bacvob1 rw "" - /view/bob-1/tree/bacvob2 rw "" - /view/bob-1/tree/bacvob3 rw "" - /view/bob-1/tree/bacvob4 rw "" - /view/bob-1/tree/bcc rw "" -- Robert Withrow -- (+1 978 288 8256) BWithrow@BayNetworks.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 12:18:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from zippy.cdrom.com (zippy.cdrom.com [204.216.27.228]) by hub.freebsd.org (Postfix) with ESMTP id 1B3E614E40 for ; Thu, 20 Jan 2000 12:18:19 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) Received: from zippy.cdrom.com (jkh@localhost [127.0.0.1]) by zippy.cdrom.com (8.9.3/8.9.3) with ESMTP id MAA16928; Thu, 20 Jan 2000 12:17:17 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) To: Jan Conrad Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Why was rsh removed from the fixit floppy? In-reply-to: Your message of "Thu, 20 Jan 2000 18:18:34 +0100." Date: Thu, 20 Jan 2000 12:17:17 -0800 Message-ID: <16925.948399437@zippy.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I would *strongly* suggest to put rsh/rlogin + tar onto the root > filesystem. I allways found these commands to be *extremely* useful in > single user mode with all other partitions unmounted (e.g. when > reorganizing the structure of my partitions/disks etc.) > > How about it? I doubt it. :-) - Jordan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 12:19:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail4.aracnet.com (mail4.aracnet.com [216.99.193.36]) by hub.freebsd.org (Postfix) with ESMTP id 41B2F14E40 for ; Thu, 20 Jan 2000 12:19:53 -0800 (PST) (envelope-from beattie@aracnet.com) Received: from shell1.aracnet.com (IDENT:root@shell1.aracnet.com [216.99.193.21]) by mail4.aracnet.com (8.9.3/8.9.3) with ESMTP id MAA16493 for ; Thu, 20 Jan 2000 12:19:57 -0800 Received: from localhost by shell1.aracnet.com (8.9.3) id MAA09630; Thu, 20 Jan 2000 12:21:17 -0800 X-Authentication-Warning: shell1.aracnet.com: beattie owned process doing -bs Date: Thu, 20 Jan 2000 12:21:17 -0800 (PST) From: Brian Beattie To: hackers@FreeBSD.ORG Subject: UDF approach comments? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG As I mentioned earlier, I'm thinking about trying to implement a UDF filesystem. I've been thinking how to start and have come up with the following, and would appreciate any comments. Waht I was thinking about doing, was first writting, (probably using the nullfs code a a base) a userfs, that would allow me to run most of the guts of the filesystem code in a user process. Then I would write the UDF filesystem to run in a user process. What do you think, am I nuts? Is there a better way, a better base for the userfs? Brian Beattie | The only problem with beattie@aracnet.com | winning the rat race ... www.aracnet.com/~beattie | in the end you're still a rat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 13:15:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dirac.th.physik.uni-bonn.de (dirac.th.physik.uni-bonn.de [131.220.161.119]) by hub.freebsd.org (Postfix) with ESMTP id A6227153FF for ; Thu, 20 Jan 2000 13:15:43 -0800 (PST) (envelope-from conrad@th.physik.uni-bonn.de) Received: from merlin.th.physik.uni-bonn.de (merlin.th.physik.uni-bonn.de [131.220.161.121]) by dirac.th.physik.uni-bonn.de (8.9.3/8.9.3) with SMTP id WAA27362 for ; Thu, 20 Jan 2000 22:15:41 +0100 (CET) Received: (qmail 59942 invoked by uid 145); 20 Jan 2000 21:15:41 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Jan 2000 21:15:41 -0000 Date: Thu, 20 Jan 2000 22:15:41 +0100 (CET) From: Jan Conrad To: "Jordan K. Hubbard" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Why was rsh removed from the fixit floppy? In-Reply-To: <16925.948399437@zippy.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi again, On Thu, 20 Jan 2000, Jordan K. Hubbard wrote: > > I would *strongly* suggest to put rsh/rlogin + tar onto the root > > filesystem. I allways found these commands to be *extremely* useful in > > single user mode with all other partitions unmounted (e.g. when > > reorganizing the structure of my partitions/disks etc.) > > > > How about it? > > I doubt it. :-) nice rhyme :-) When I cloned a new machine, I usually booted with the floppies, set up DOS partitions and disk label and then pulled everyting over by tar and rsh, thereby overwriting fstab etc. with prepared files. Worked pretty fast... What would you suggest how to do it? > > - Jordan > regards -Jan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 14: 1:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 2340514DC4; Thu, 20 Jan 2000 14:01:52 -0800 (PST) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (crossd@woodstock.cs.rpi.edu [128.213.12.1]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id QAA81879; Thu, 20 Jan 2000 16:30:21 -0500 (EST) Message-Id: <200001202130.QAA81879@cs.rpi.edu> To: freebsd-hackers@freebsd.org Cc: freebsd-current@freebsd.org, dillon@backplane.com, gallatin@cs.duke.edu Subject: rpc.lockd Date: Thu, 20 Jan 2000 16:30:20 -0500 From: "David E. Cross" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It is almost done. A working and very lightly tested version of the code will be made available on Monday (Jan 24). It should be considered alpha quality, I would not recommend running important NFS servers with this code. -- David Cross | email: crossd@cs.rpi.edu Acting Lab Director | NYSLP: FREEBSD Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 14:18:46 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from igw1.ericsson.com.au (igw1.ericsson.com.au [203.61.155.3]) by hub.freebsd.org (Postfix) with ESMTP id 0970E14D8B for ; Thu, 20 Jan 2000 14:18:43 -0800 (PST) (envelope-from Tony.Frank@ericsson.com.au) Received: from brsi02.epa.ericsson.se ([146.11.15.8]) by igw1.ericsson.com.au (8.9.1b+Sun/8.9.1) with ESMTP id JAA03664 for ; Fri, 21 Jan 2000 09:18:32 +1100 (EST) Received: from eaubrnt019.epa.ericsson.se (eaubrnt019 [146.11.9.165]) by brsi02.epa.ericsson.se (8.9.1/8.9.1) with ESMTP id JAA16894 for ; Fri, 21 Jan 2000 09:19:16 +1100 (EST) Received: by eaubrnt019.epa.ericsson.se with Internet Mail Service (5.5.2448.0) id ; Fri, 21 Jan 2000 09:18:30 +1100 Message-ID: <4B6BC00CD15FD2119E5F0008C7A419A5069CB744@eaubrnt018.epa.ericsson.se> From: "Tony Frank (EPA)" To: "'freebsd-hackers@freebsd.org'" Subject: How do I allocate 2 blocks of memory? Date: Fri, 21 Jan 2000 09:18:24 +1100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, In my spare time I have been working on a driver for IBM Shared RAM style token-ring adapters. So far I am progressing well enough (using Larry Lile's earlier version and also the NetBSD driver for reference) however I am running into one particular problem. The card itself has a block of memory mapped IO ports, size 0x2000, and another block of SRAM, size 0x4000. At the moment, I can successfully allocate the MMIO area using something similar to the following: struct resource *res; rid = 0; res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0ul, ~0ul, TR_MMIO_SIZE, RF_ACTIVE); if (res) { sc->mem_rid = rid; sc->mem_res = res; sc->mem_used = size; return (0); } else { return (ENOENT); } my config line is: device tr0 at isa? irq 9 iomem 0xd0000 My card has been configured to use 0xd0000 for the 0x2000 MMIO, and 0xd4000 for the 0x4000 SRAM... This then lets me access 0xd0000 - 0xd1fff. However if I try to use the above code with rid = 1, I get no resource back. I think I could configure the card to use the range 0xd0000 - 0xd3fff for the SRAM and then 0xd4000 - 0xd5fff for the MMIO, thus having a continuous block between 0xd0000 and 0xd5fff that I might be able to allocate in one hit. This however seems to be a bit of a workaround. Essentially I have been using the source from other drivers to try and understand how the system works, but I am yet to find one that allocates two sets of memory. One other issue that I am wondering about is overriding settings provided in the config file. If I specify an IRQ of 11, when the card is programmed to use 9, the bus_alloc_resource will give back an IRQ value of 11, which causes problems later as the card is using 9. I can read the IRQ value that the card is set to, but I'm not sure on the correct procedure to request that specific IRQ for my driver? Any suggestions would be most welcome. Regards, Tony Frank To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 14:40:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 2F0F514E49 for ; Thu, 20 Jan 2000 14:40:35 -0800 (PST) (envelope-from iedowse@maths.tcd.ie) Received: from boole.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 20 Jan 2000 22:40:32 +0000 (GMT) To: Jan Conrad Cc: freebsd-hackers@FreeBSD.ORG, iedowse@maths.tcd.ie Subject: Re: Why was rsh removed from the fixit floppy? In-reply-to: Your message of "Thu, 20 Jan 2000 22:15:41 +0100." Date: Thu, 20 Jan 2000 22:40:26 +0000 From: Ian Dowse Message-ID: <200001202240.aa89449@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , Jan Conrad writes: >When I cloned a new machine, I usually booted with the floppies, set up >DOS partitions and disk label and then pulled everyting over by tar and >rsh, thereby overwriting fstab etc. with prepared files. Worked pretty >fast... > >What would you suggest how to do it? Unless this has changed recently, the "Emergency Holographic Shell" option provides ifconfig and mount_nfs. That should allow you to get all the commands that you need from an NFS server, without even having to wait for the fixit floppy to load :) It's a while since I used this, but I remember doing something like: set -o emacs ifconfig fxp0 x.x.x.x netmask x.x.x.x mount_nfs x.x.x.x:/scratch /mnt /mnt/bin/ln -s /mnt/usr /usr /mnt/bin/mv /bin /bin.old /mnt/bin/mv /sbin /sbin.old /mnt/bin/ln -s /mnt/bin /bin /mnt/bin/ln -s /mnt/sbin /sbin where /scratch on the server can contains a minimal /bin, /sbin and /usr etc. The last few commands could obviously be put in a script on the server. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 15: 7: 3 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from awfulhak.org (dynamic-71.max4-du-ws.dialnetwork.pavilion.co.uk [212.74.9.199]) by hub.freebsd.org (Postfix) with ESMTP id 1E13914F2C; Thu, 20 Jan 2000 15:06:59 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id VAA10638; Thu, 20 Jan 2000 21:00:02 GMT (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id TAA01260; Thu, 20 Jan 2000 19:39:11 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200001201939.TAA01260@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.0 09/18/1999 To: des@FreeBSD.ORG, bright@cygnus.rush.net Cc: hackers@FreeBSD.ORG Subject: ioctl(... TUNSLMODE ...) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 20 Jan 2000 19:39:11 +0000 From: Brian Somers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I know this is a while in coming, but now that I'm looking at getting ppp(8) to talk IPv6 (with the help of some KAME patches), I've looked at how TUNSLMODE is implemented... it doesn't look good to me. What's the rationale behind stuffing the entire sockaddr in front of the packet ? AFAIK the only information of any use is the address family. By default, OpenBSD has a u_int32_t in front of every packet (I believe this is unconfigurable), and I think this is about the most sensible thing to do - I don't see that alignment issues will cause problems. Alfred, this was originally submitted by you. Do you have any argument against me changing it to just stuff the address family as a 4-byte network-byte-order quantity there ? Any other opinions/arguments ? Cheers. -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 15:11:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id E22C714D8B; Thu, 20 Jan 2000 15:11:40 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id PAA14393; Thu, 20 Jan 2000 15:35:03 -0800 (PST) Date: Thu, 20 Jan 2000 15:35:02 -0800 From: Alfred Perlstein To: Brian Somers Cc: des@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: ioctl(... TUNSLMODE ...) Message-ID: <20000120153502.A14030@fw.wintelcom.net> References: <200001201939.TAA01260@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200001201939.TAA01260@hak.lan.Awfulhak.org>; from brian@Awfulhak.org on Thu, Jan 20, 2000 at 07:39:11PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Brian Somers [000120 15:30] wrote: > Hi, > > I know this is a while in coming, but now that I'm looking at getting > ppp(8) to talk IPv6 (with the help of some KAME patches), I've looked > at how TUNSLMODE is implemented... it doesn't look good to me. > > What's the rationale behind stuffing the entire sockaddr in front of > the packet ? AFAIK the only information of any use is the address > family. > > By default, OpenBSD has a u_int32_t in front of every packet (I > believe this is unconfigurable), and I think this is about the most > sensible thing to do - I don't see that alignment issues will cause > problems. > > Alfred, this was originally submitted by you. Do you have any > argument against me changing it to just stuff the address family > as a 4-byte network-byte-order quantity there ? > > Any other opinions/arguments ? No objections, I just did it as an excercise to implement something in the manpages. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 15:58:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from boromir.vpop.net (dns1.vpop.net [206.117.147.2]) by hub.freebsd.org (Postfix) with ESMTP id EA65A15291 for ; Thu, 20 Jan 2000 15:58:08 -0800 (PST) (envelope-from mreimer@vpop.net) Received: from vpop.net (bilbo.vpop.net [216.160.82.65]) by boromir.vpop.net (8.9.1/8.9.1) with ESMTP id PAA29184 for ; Thu, 20 Jan 2000 15:58:08 -0800 (PST) Message-ID: <3887A157.E30E31AE@vpop.net> Date: Thu, 20 Jan 2000 15:59:19 -0800 From: Matthew Reimer Organization: VPOP Technologies, Inc. X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.4-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: RLIMIT_NPROC can be exceeded via setuid/exec Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG My question is, should setuid() fail if the target user's maximum number of processes (RLIMIT_NPROC) would be exceeded? Background: in an attempt to manage our webserver to keep too many CGIs from taking down the machine, I've been experimenting with RLIMIT_NPROC. This appears to work fine when forking new processes, causing the fork to fail with error EAGAIN. However, this didn't solve our problem. We're using Apache with suexec, and still CGIs would multiply far beyond the specified resource limit. Apache forks suexec, which is suid root; fork1() increments the number of processes for root, unless RLIMIT_NPROC has been exceeded, in which case the fork fails with EAGAIN. suexec calls then calls setuid() (before it calls execv), which decrements root's process count and increments the target user's process count, but RLIMIT_NPROC is not consulted, and voila, we've just exceeded the target user's maximum process count. So should the setuid() fail with EAGAIN (or some such) if the target user's maximum number of processes would be exceeded? Or would this break too many programs? Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 16:37: 4 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from awfulhak.org (dynamic-71.max4-du-ws.dialnetwork.pavilion.co.uk [212.74.9.199]) by hub.freebsd.org (Postfix) with ESMTP id 45E09153D8; Thu, 20 Jan 2000 16:36:59 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id AAA12004; Fri, 21 Jan 2000 00:36:58 GMT (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id AAA00691; Fri, 21 Jan 2000 00:36:58 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200001210036.AAA00691@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.0 09/18/1999 To: Alfred Perlstein Cc: Brian Somers , des@FreeBSD.ORG, hackers@FreeBSD.ORG, brian@hak.lan.Awfulhak.org Subject: Re: ioctl(... TUNSLMODE ...) In-Reply-To: Message from Alfred Perlstein of "Thu, 20 Jan 2000 15:35:02 PST." <20000120153502.A14030@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 21 Jan 2000 00:36:58 +0000 From: Brian Somers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > * Brian Somers [000120 15:30] wrote: > > Hi, > > > > I know this is a while in coming, but now that I'm looking at getting > > ppp(8) to talk IPv6 (with the help of some KAME patches), I've looked > > at how TUNSLMODE is implemented... it doesn't look good to me. > > > > What's the rationale behind stuffing the entire sockaddr in front of > > the packet ? AFAIK the only information of any use is the address > > family. > > > > By default, OpenBSD has a u_int32_t in front of every packet (I > > believe this is unconfigurable), and I think this is about the most > > sensible thing to do - I don't see that alignment issues will cause > > problems. > > > > Alfred, this was originally submitted by you. Do you have any > > argument against me changing it to just stuff the address family > > as a 4-byte network-byte-order quantity there ? > > > > Any other opinions/arguments ? > > No objections, I just did it as an excercise to implement something > in the manpages. I think the best plan is if I remove TUNSLMODE and introduce (say) TUNSIFHEAD. If I reuse TUNSLMODE, I'll bump into all sorts of problems. Now if someone was to say ``NetBSD does it this way'' I'd be interested in copying that :*] > -- > -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] > -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 17:25:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rs1.ocn.ne.jp (rs1.ocn.ne.jp [202.234.232.40]) by hub.freebsd.org (Postfix) with ESMTP id 7164D15449 for ; Thu, 20 Jan 2000 17:25:20 -0800 (PST) (envelope-from yoshida@ocn.ad.jp) Received: from tomoya.ssc-otemachi.ocn.ad.jp (dhcp-158.noc.cup.ndp.net [209.212.224.158]) by rs1.ocn.ne.jp (8.9.1a/OCN) with ESMTP id KAA11606 for ; Fri, 21 Jan 2000 10:25:11 +0900 (JST) Message-Id: <4.2.0.58.J.20000120172330.00c7cf00@rs1.ocn.ne.jp> X-Sender: yoshida@ssc.ocn.ad.jp (Unverified) Reply-To: yoshida@ocn.ad.jp X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58.J Date: Thu, 20 Jan 2000 17:23:40 +0900 To: freebsd-hackers@FreeBSD.org From: Tomoya Yoshida Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG subscribe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 17:51:46 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hotmail.com (f12.law3.hotmail.com [209.185.241.12]) by hub.freebsd.org (Postfix) with SMTP id 4B75014D72 for ; Thu, 20 Jan 2000 17:51:37 -0800 (PST) (envelope-from saurabh_bhandari@hotmail.com) Received: (qmail 74517 invoked by uid 0); 21 Jan 2000 01:51:30 -0000 Message-ID: <20000121015130.74516.qmail@hotmail.com> Received: from 169.226.63.195 by www.hotmail.com with HTTP; Thu, 20 Jan 2000 17:51:30 PST X-Originating-IP: [169.226.63.195] From: "Saurabh Bhandari" To: freebsd-hackers@freebsd.org Subject: Query?? Date: Fri, 21 Jan 2000 01:51:30 GMT Mime-Version: 1.0 Content-Type: text/plain; format=flowed Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear Sir, I am a M.S. student with major as Computer Science. I am doing an independent study with my professor. I have been told that BSD drivers are not documented at this point of time. So I would like to document the BSD Drivers. It would be a big help for me if you could answer the following questions: 1)Are BSD drivers not really documented?(I fear that I may not end up re-inventing the wheel) 2)I am new in this field. Will it be possible for you to tell me from where should I start as I dont have any experience in this field? Thanking You, Yours Sincerely, Saurabh Bhandari ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 18:30:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id 38CEB14F2C for ; Thu, 20 Jan 2000 18:30:26 -0800 (PST) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id VAA07279; Thu, 20 Jan 2000 21:30:08 -0500 (EST) Date: Thu, 20 Jan 2000 21:30:08 -0500 (EST) From: "Matthew N. Dodd" To: "Tony Frank (EPA)" Cc: "'freebsd-hackers@freebsd.org'" Subject: Re: How do I allocate 2 blocks of memory? In-Reply-To: <4B6BC00CD15FD2119E5F0008C7A419A5069CB744@eaubrnt018.epa.ericsson.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 21 Jan 2000, Tony Frank (EPA) wrote: > I think I could configure the card to use the range 0xd0000 - 0xd3fff > for the SRAM and then 0xd4000 - 0xd5fff for the MMIO, thus having a > continuous block between 0xd0000 and 0xd5fff that I might be able to > allocate in one hit. This however seems to be a bit of a workaround. I'm not sure how using 1 memory area is a workaround; from your driver point of view you're just going to be assigning pointers in your softc to physical memory addresses in that range no? > Essentially I have been using the source from other drivers to try and > understand how the system works, but I am yet to find one that allocates two > sets of memory. Thats what 'rid' is for; since you can probably ask the card what its resources are you really don't need to use the ISA hint mechanism; you can do something like this: device foo0 at isa? port 0xa20 And let your probe routine dig the rest of the resources out of the adpater and add them using bus_set_resource(), or you can be more tricky and use a DEVICE_IDENTIFY method to look for any cards, add devices for them and assign resources to them. This would net you a config entry looking something like this: device foo0 Anyhow, I can help you out with any of the newbus/resource questions you may have. I've got the MCA versions of those boards and will add the bus front ends to your driver when you've got it ready. I suggest you split your driver into the driver proper, and the bus front ends: if_foo_isa.c if_foo.c if_fooreg.h if_foovar.h etc... > One other issue that I am wondering about is overriding settings > provided in the config file. If I specify an IRQ of 11, when the card > is programmed to use 9, the bus_alloc_resource will give back an IRQ > value of 11, which causes problems later as the card is using 9. I > can read the IRQ value that the card is set to, but I'm not sure on > the correct procedure to request that specific IRQ for my driver? In your probe routine you may use bus_set_resource(dev, SYS_RES_IRQ, 0, irq#, 1); This will override the IRQ that was specified in the config file; you might want to do a test to see if the configured IRQ is different than the board IRQ though. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 19:15:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from igw1.ericsson.com.au (igw1.ericsson.com.au [203.61.155.3]) by hub.freebsd.org (Postfix) with ESMTP id A1E131522C for ; Thu, 20 Jan 2000 19:15:08 -0800 (PST) (envelope-from Tony.Frank@ericsson.com.au) Received: from brsi02.epa.ericsson.se ([146.11.15.8]) by igw1.ericsson.com.au (8.9.1b+Sun/8.9.1) with ESMTP id OAA24688; Fri, 21 Jan 2000 14:13:55 +1100 (EST) Received: from eaubrnt019.epa.ericsson.se (eaubrnt019 [146.11.9.165]) by brsi02.epa.ericsson.se (8.9.1/8.9.1) with ESMTP id OAA21273; Fri, 21 Jan 2000 14:14:37 +1100 (EST) Received: by eaubrnt019.epa.ericsson.se with Internet Mail Service (5.5.2448.0) id ; Fri, 21 Jan 2000 14:13:52 +1100 Message-ID: <4B6BC00CD15FD2119E5F0008C7A419A5069CB74A@eaubrnt018.epa.ericsson.se> From: "Tony Frank (EPA)" To: "'Matthew N. Dodd'" Cc: "'freebsd-hackers@freebsd.org'" Subject: RE: How do I allocate 2 blocks of memory? Date: Fri, 21 Jan 2000 14:13:46 +1100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, >> I think I could configure the card to use the range 0xd0000 - 0xd3fff >> for the SRAM and then 0xd4000 - 0xd5fff for the MMIO, thus having a >> continuous block between 0xd0000 and 0xd5fff that I might be able to >> allocate in one hit. This however seems to be a bit of a workaround. > I'm not sure how using 1 memory area is a workaround; from your driver > point of view you're just going to be assigning pointers in your softc to > physical memory addresses in that range no? Basically, it would mean manually configuring the card (eg using LANAIDC via bootable floppy) to have the configuration described above. Since the card supports having the MMIO and the SRAM in seperate areas, essentially the driver should support this also. I'm not sure whether the card will let me arrange the memory locations so that it's all continuous. > Anyhow, I can help you out with any of the newbus/resource questions you > may have. I've got the MCA versions of those boards and will add the > bus front ends to your driver when you've got it ready. I suggest you > split your driver into the driver proper, and the bus front ends: Hmm... I have the "IBM Auto 16/4 Token-Ring Adapter"... I have about 3 different revisions too, although they all appear to work the same way. One issue that I havn't really looked at yet is having the adapter in 'plug and play' mode. So far, if the adapter is in PnP mode, when I do my "normal" probing, it appears that there is no configuration stored, ie I read 0x0 instead of some valid details. I assume that I need to do some form of 'PnP configuration' but I am yet to start looking into this. >> One other issue that I am wondering about is overriding settings >> provided in the config file. If I specify an IRQ of 11, when the card >> is programmed to use 9, the bus_alloc_resource will give back an IRQ >> value of 11, which causes problems later as the card is using 9. I >> can read the IRQ value that the card is set to, but I'm not sure on >> the correct procedure to request that specific IRQ for my driver? > In your probe routine you may use bus_set_resource(dev, SYS_RES_IRQ, 0, > irq#, 1); > This will override the IRQ that was specified in the config file; you > might want to do a test to see if the configured IRQ is different than the > board IRQ though. I think bus_set_resource() is what I'm looking for, as opposed to bus_alloc_resource()... One other general sort of question... is there any kind of description on how these bus_* functions operate and interact? I've basically been working my way through a few different drivers and from other assorted files in the /usr/src/sys area, but although I see examples of what other drivers are doing, I'm not always sure on why. It seems to be mostly luck for me to accidentally stumble on an answer to a question I'm wondering about... Thanks for you help, Tony To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 21:21: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id DFB1F14A12 for ; Thu, 20 Jan 2000 21:20:57 -0800 (PST) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.11 #1) id 12BUka-0003k4-00 for hackers@freebsd.org; Fri, 21 Jan 2000 05:28:40 +0200 From: Sheldon Hearn To: hackers@freebsd.org Subject: Re: Harlan Stenn: In-reply-to: Your message of "Thu, 20 Jan 2000 00:59:53 +0100." <20000120005952.A20608@keltia.freenix.fr> Date: Fri, 21 Jan 2000 05:28:39 +0200 Message-ID: <14387.948425319@axl.noc.iafrica.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 20 Jan 2000 00:59:53 +0100, Ollivier Robert wrote: > Harlan is the *maintainer* of the ntp source tree at udel and > generates all releases :-) Okay, people, relax. So far, the only person I haven't been chewed out by for this is Mr. Stenn himself, who seemed to feel that he'd misposted and wasn't nearly as offended as others have been on his behalf. :-P Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 21:41: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id EE7821550D for ; Thu, 20 Jan 2000 21:41:01 -0800 (PST) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id WAA08006; Thu, 20 Jan 2000 22:38:12 -0500 (EST) Date: Thu, 20 Jan 2000 22:38:12 -0500 (EST) From: "Matthew N. Dodd" To: "Tony Frank (EPA)" Cc: "'freebsd-hackers@freebsd.org'" Subject: RE: How do I allocate 2 blocks of memory? In-Reply-To: <4B6BC00CD15FD2119E5F0008C7A419A5069CB74A@eaubrnt018.epa.ericsson.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 21 Jan 2000, Tony Frank (EPA) wrote: > Since the card supports having the MMIO and the SRAM in seperate areas, > essentially the driver should support this also. > > I'm not sure whether the card will let me arrange the memory locations so > that it's all continuous. Ah, in that case you just need to add 2 separate resources; you might want to do something like this: #define FOO_MEM_RID_MMIO 0 #define FOO_MEM_RID_SRAM 1 bus_set_resource(dev, SYS_RES_MEMORY, FOO_MEM_RID_MMIO, start, end); bus_set_resource(dev, SYS_RES_MEMORY, FOO_MEM_RID_SRAM, start, end); Then, when you're going to call bus_alloc_resource() you'll initialize 'rid' to one or the other of FOO_MEM_RID_{MMIO,SRAM}, depending on which one you want to deal with. > One issue that I havn't really looked at yet is having the adapter in 'plug > and play' mode. Ah, PnP is even easier. > So far, if the adapter is in PnP mode, when I do my "normal" probing, > it appears that there is no configuration stored, ie I read 0x0 > instead of some valid details. That makes it easy to skip over the PnP adapters in your IDENTIFY method. Put an adapter in PnP mode and boot up; make note of the 'unknownN:' messages; one will be your TR board. It should have a number of resources associated with it. > I assume that I need to do some form of 'PnP configuration' but I am > yet to start looking into this. Look at the if_ep driver in sys/dev/ep/; its about the cleanest example you'll get. I've got another driver for the TMS380 I'm working on thats about as widely attached but its not yet ready for the general public so you'll have to make do with if_ep for your example. > I think bus_set_resource() is what I'm looking for, as opposed to > bus_alloc_resource()... Indeed. bus_alloc_resource() is what you do in your attach routine when you're ready to reserve the resource and use it. > One other general sort of question... is there any kind of description on > how these bus_* functions operate and interact? Not as such, no. The good news is that the resource manager (such as it is) and the newbus calls are fairly easy to understand and examples are available, though in some cases confusing. Check out sys/kern/subr_bus.c and sys/kern/subr_rman.c. > I've basically been working my way through a few different drivers and > from other assorted files in the /usr/src/sys area, but although I see > examples of what other drivers are doing, I'm not always sure on why. > It seems to be mostly luck for me to accidentally stumble on an answer > to a question I'm wondering about... Well, you can do it the trial and error way like I did or you can ask questions; I feel I've got a pretty good handle on things or at least enough to field questions. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 21:47:49 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from zippy.cdrom.com (zippy.cdrom.com [204.216.27.228]) by hub.freebsd.org (Postfix) with ESMTP id 784D415333 for ; Thu, 20 Jan 2000 21:47:47 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) Received: from zippy.cdrom.com (jkh@localhost [127.0.0.1]) by zippy.cdrom.com (8.9.3/8.9.3) with ESMTP id VAA21760; Thu, 20 Jan 2000 21:47:51 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) To: "Saurabh Bhandari" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Query?? In-reply-to: Your message of "Fri, 21 Jan 2000 01:51:30 GMT." <20000121015130.74516.qmail@hotmail.com> Date: Thu, 20 Jan 2000 21:47:51 -0800 Message-ID: <21757.948433671@zippy.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 1)Are BSD drivers not really documented?(I fear that I may not end up > re-inventing the wheel) I assume that by "drivers" you mean "device drivers" in this context, e.g. our code for supporting various network interface cards, SCSI controllers, etc. They are documented in the sense that there are various files one refers to when writing a new device drivers in FreeBSD (usually assorted header files and the sources to at least one related driver) and the skillful kernel programmer generally knows where to look for them. If there were no information at all, new device drivers would never be written in FreeBSD. They're not, however, documented in the sense that there's a well laid-out DDK with lots of examples and high-level architectural overviews of various subsystems. The new-bus system, in particular, is in great need of documentation. > 2)I am new in this field. Will it be possible for you to tell me from where > should I start as I dont have any experience in this field? Start at the beginning. :) Seriously, it is a bit like saying "I wish to build and fly my own experimental airplane. I have no aviation or aeronautical experience, however, so could somebody please tell me where I should start?" Well, perhaps that particular question would be more easily answered than yours ("with an excellent life insurance policy"), but I think you get the basic idea. It's a very broad subject and there are dozens of individual skills which go into producing a really good doc set in this area. That's why it's work usually done by teams when you get over to the corporate side of things. - Jordan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Thu Jan 20 22:17:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns2.globalctg.net (ns2.globalctg.net [202.5.32.6]) by hub.freebsd.org (Postfix) with ESMTP id 7705E14E57 for ; Thu, 20 Jan 2000 22:17:38 -0800 (PST) (envelope-from nestar@globalctg.net) Received: from delivery.globalctg.net (ns1.globalctg.net [202.5.32.5]) by ns2.globalctg.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id D132VPCZ; Fri, 21 Jan 2000 12:15:41 +0600 Received: from globalctg.net [202.5.32.211] by delivery.globalctg.net [202.5.32.10] with SMTP (MDaemon.v2.7.SP5.R) for ; Fri, 21 Jan 2000 12:17:24 +0600 Message-ID: <3887F5E4.84F08B9D@globalctg.net> Date: Fri, 21 Jan 2000 06:00:04 +0000 From: "New Star Service Co." Organization: New Star Service Co. X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13-7mdk i586) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-MDaemon-Deliver-To: freebsd-hackers@FreeBSD.org X-Return-Path: nestar@globalctg.net Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk 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 Thu Jan 20 23:25:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 8C9C814D63 for ; Thu, 20 Jan 2000 23:25:55 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id AAA82638; Fri, 21 Jan 2000 00:25:54 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id AAA09544; Fri, 21 Jan 2000 00:25:52 -0700 (MST) Message-Id: <200001210725.AAA09544@harmony.village.org> To: "Matthew N. Dodd" Subject: Re: How do I allocate 2 blocks of memory? Cc: "Tony Frank (EPA)" , "'freebsd-hackers@freebsd.org'" In-reply-to: Your message of "Thu, 20 Jan 2000 22:38:12 EST." References: Date: Fri, 21 Jan 2000 00:25:52 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message "Matthew N. Dodd" writes: : Well, you can do it the trial and error way like I did or you can ask : questions; I feel I've got a pretty good handle on things or at least : enough to field questions. Also some drivers are better to look at than others. ed, ep, and sn are the ones that I look at as a cheat sheet. Don't look at aha since it is old and hasn't been updated enough yet (I'm working on that right now :-). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 0:28:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id 8C971151CF for ; Fri, 21 Jan 2000 00:28:41 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.9.3/8.9.3) with ESMTP id AAA54572; Fri, 21 Jan 2000 00:28:40 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Date: Fri, 21 Jan 2000 00:28:40 -0800 (PST) From: Doug White To: Sabrina Minshall Cc: hackers@FreeBSD.ORG Subject: Re: PR kern/14034: gettimeofday() returns negative value? In-Reply-To: <200001200141.RAA30336@shell.accesscom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 19 Jan 2000, Sabrina Minshall wrote: > What's going one here? Successive calls to gettimeofday > yields negative elapsed time? I'm sorry, but this is plain bad math. If the samples t1 and t2 were taken in that order from a monotonically increasing value, then > s = t1->tv_sec - t2->tv_sec; > assert((s >= 0)); and > ms = s * 1000000 + (t1->tv_usec - t2->tv_usec); will never be positive. If t2 >= t1, then t1 - t2 <= 0. If time was truly moving backwards on your system, then your assertion would succeed instead of fail. I think you will find everything is working properly if you reverse the arguments to time_elapsed(). Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 0:37:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id A983D153EF for ; Fri, 21 Jan 2000 00:37:18 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.9.3/8.9.3) with ESMTP id AAA54811; Fri, 21 Jan 2000 00:37:17 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Date: Fri, 21 Jan 2000 00:37:16 -0800 (PST) From: Doug White To: Matthew Reimer Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: RLIMIT_NPROC can be exceeded via setuid/exec In-Reply-To: <3887A157.E30E31AE@vpop.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 20 Jan 2000, Matthew Reimer wrote: > My question is, should setuid() fail if the target user's maximum number > of processes (RLIMIT_NPROC) would be exceeded? > > Background: in an attempt to manage our webserver to keep too many CGIs > from taking down the machine, I've been experimenting with RLIMIT_NPROC. > This appears to work fine when forking new processes, causing the fork > to fail with error EAGAIN. > > However, this didn't solve our problem. We're using Apache with suexec, > and still CGIs would multiply far beyond the specified resource limit. > > Apache forks suexec, which is suid root; fork1() increments the number > of processes for root, unless RLIMIT_NPROC has been exceeded, in which > case the fork fails with EAGAIN. > > suexec calls then calls setuid() (before it calls execv), which > decrements root's process count and increments the target user's process > count, but RLIMIT_NPROC is not consulted, and voila, we've just exceeded > the target user's maximum process count. Apache is a bizarre environment, so you have to be careful: 1. Generally root starts apache and it revokes privs down to the User specified in the config file. Problem: Limits are inherited from the process parent, which is in this case root. I believe there is a specific function all to request enforcement of new process limits for the user's class. 2. Apache has config-file overrides for various resource limits. Problem: From #1 you may have set the soft limit higher than the intended hard limit for the user. I hope this illuminates some of the issues. Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 0:40:54 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from eclogite.eps.nagoya-u.ac.jp (eclogite.eps.nagoya-u.ac.jp [133.6.124.145]) by hub.freebsd.org (Postfix) with ESMTP id 56A37151FF; Fri, 21 Jan 2000 00:40:44 -0800 (PST) (envelope-from kato@ganko.eps.nagoya-u.ac.jp) Received: from localhost (gneiss.eps.nagoya-u.ac.jp [133.6.124.148]) by eclogite.eps.nagoya-u.ac.jp (8.9.3/3.7W) with ESMTP id RAA54431; Fri, 21 Jan 2000 17:40:41 +0900 (JST) To: FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG Cc: FreeBSD98-hackers@jp.freebsd.org, nyan@jp.FreeBSD.ORG Subject: Re: indirection in bus space From: KATO Takenori In-Reply-To: Your message of "Mon, 27 Dec 1999 02:55:13 +0900" <19991227025513Z.kato@gneiss.eps.nagoya-u.ac.jp> References: <19991227025513Z.kato@gneiss.eps.nagoya-u.ac.jp> X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) X-PGP-Fingerprint: 03 72 85 36 62 46 23 03 52 B1 10 22 44 10 0D 9E Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000121174011G.kato@gneiss.eps.nagoya-u.ac.jp> Date: Fri, 21 Jan 2000 17:40:11 +0900 X-Dispatcher: imput version 980905(IM100) Lines: 69 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Do you remember this topic? I have revised the indirection support patch. What I have changed are: - to make diff files more readable - introduce the bus_simple_create_bsh() that creates a bus_space_handle_tag from a base address. I have made PC98 GENERIC98 kernel and i386 LINT kernel and both of them can be compiled. Changed and new files are as follows: alpha/include/bus.h i386/include/bus.h i386/include/bus_at386.h (new file) i386/include/bus_pc98.h (new file) i386/i386/nexus.c i386/isa/isa.c dev/advansys/adv_isa.c dev/advansys/adv_pci.c pci/amd.c pci/isp_pci.c I put new files and diffs as follows: http://www.FreeBSD.ORG/~kato/busspace/index.html INDEX http://www.FreeBSD.ORG/~kato/busspace/alpha_bus.h.diff diff between old bus.h and new bus.h http://www.FreeBSD.ORG/~kato/busspace/i386_bus.h i386/include/bus.h http://www.FreeBSD.ORG/~kato/busspace/bus_at386.h i386/include/bus_at386.h http://www.FreeBSD.ORG/~kato/busspace/bus_at386.h.diff diff between old bus.h and bus_at386.h http://www.FreeBSD.ORG/~kato/busspace/bus_pc98.h i386/include/bus_pc98.h http://www.FreeBSD.ORG/~kato/busspace/bus_pc98.h.diff diff between old bus.h and bus_pc98.h http://www.FreeBSD.ORG/~kato/busspace/isa.c.diff diff of i386/isa/isa.c http://www.FreeBSD.ORG/~kato/busspace/nexus.c.diff diff of i386/i386/nexus.c http://www.FreeBSD.ORG/~kato/busspace/adv_isa.c.diff diff of dev/advansys/adv_isa.c http://www.FreeBSD.ORG/~kato/busspace/adv_pci.c.diff diff of dev/advansys/adv_pci.c http://www.FreeBSD.ORG/~kato/busspace/amd.c.diff diff of pci/amd.c http://www.FreeBSD.ORG/~kato/busspace/isp_pci.c.diff diff of pci/isp_pci.c Thank you. -----------------------------------------------+--------------------------+ KATO Takenori | FreeBSD | Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! | Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ | |http://www.jp.FreeBSD.org/| ++++ FreeBSD(98) 3.3R-Rev. 01 available! +==========================+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 1:16:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtppzh.pzh.nl (webshield.pzh.nl [194.178.168.50]) by hub.freebsd.org (Postfix) with SMTP id E5C5114CB4 for ; Fri, 21 Jan 2000 01:16:12 -0800 (PST) (envelope-from MULHUIJZEN@PZH.NL) Received: FROM smtp.pzh.nl BY smtppzh.pzh.nl ; Fri Jan 21 10:14:58 2000 0000 Received: from PZH40-1-Message_Server by smtp.pzh.nl with Novell_GroupWise; Fri, 21 Jan 2000 10:15:03 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Fri, 21 Jan 2000 10:14:46 +0100 From: "ROGIER MULHUIJZEN" To: , Subject: Re: UDF approach comments? Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Waht I was thinking about doing, was first writting, (probably using the >nullfs code a a base) a userfs, that would allow me to run most of the >guts of the filesystem code in a user process. Then I would write the UDF >filesystem to run in a user process. >What do you think, am I nuts? Is there a better way, a better base for >the userfs? I'm not an expert on these matters (yet =) but a userfs seems like a good idea to me. I was looking through the isofs code yesterday (trying to see if minor mods to it would allow me to mount an .iso file, until I remembered vn devices) and the TODO was talking about implementing it into userfs. Maybe whoever is working on isofs has made a start on a userfs... DocWilco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 1:34:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rina.r.dl.itc.u-tokyo.ac.jp (rina.r.dl.itc.u-tokyo.ac.jp [133.11.199.247]) by hub.freebsd.org (Postfix) with ESMTP id 429D915452; Fri, 21 Jan 2000 01:34:22 -0800 (PST) (envelope-from tanimura@r.dl.itc.u-tokyo.ac.jp) Received: from rina.r.dl.itc.u-tokyo.ac.jp (tanimura@localhost.r.dl.itc.u-tokyo.ac.jp [127.0.0.1]) by rina.r.dl.itc.u-tokyo.ac.jp (8.9.3+3.2W/3.7W-rina.r-0.1-11.01.2000) with ESMTP id SAA86473; Fri, 21 Jan 2000 18:34:00 +0900 (JST) Date: Fri, 21 Jan 2000 18:33:59 +0900 Message-ID: <14472.10247.374655.13283E@rina.r.dl.itc.u-tokyo.ac.jp> From: Seigo Tanimura To: smp@FreeBSD.org, hackers@FreeBSD.org Subject: Using spinning time efficiently? Cc: Seigo Tanimura User-Agent: Wanderlust/1.0.3 (Notorious) SEMI/1.13.4 (Terai) FLIM/1.12.7 (=?ISO-8859-4?Q?Y=FEzaki?=) MULE XEmacs/21.1 (patch 8) (Bryce Canyon) (i386--freebsd) Organization: Digital Library Research Division, Information Techinology Centre, The University of Tokyo MIME-Version: 1.0 (generated by SEMI 1.13.4 - "Terai") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have my SMP(dual) box running -current at home for local news and mail/ML server. Last night, when the news-mail gateway started to feed the articles to the MLs, I noticed that the ratio of CPU time usage for system call exceeded more than 50%, showing 55-60% every now and then. The frequencies of system call and interrupt are both around 13-18[k/sec]. (NB HZ in my box is increased up to 16kHz) I once thought something might be wrong, and then found (ALT)SYSCALL_LOCK spinning to wait for the lock to be released. Now I am wondering if we can contribute spinning time to anything else, say running another process, before the lock gets released. Is is possible to do so? -- Seigo Tanimura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 1:40: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtppzh.pzh.nl (webshield.pzh.nl [194.178.168.50]) by hub.freebsd.org (Postfix) with SMTP id 3A1EF15452 for ; Fri, 21 Jan 2000 01:40:05 -0800 (PST) (envelope-from MULHUIJZEN@PZH.NL) Received: FROM smtp.pzh.nl BY smtppzh.pzh.nl ; Fri Jan 21 10:39:00 2000 0000 Received: from PZH40-1-Message_Server by smtp.pzh.nl with Novell_GroupWise; Fri, 21 Jan 2000 10:39:06 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Fri, 21 Jan 2000 10:38:55 +0100 From: "ROGIER MULHUIJZEN" To: Subject: Re: Why was rsh removed from the fixit floppy? Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This discussion sort of sparked my interest, so I started looking at what exactly is on the fixit floppy. As I expected there was a load of crunched binaries (interesting technique btw) but my eye fell on tar. It wasn't a hardlink to the crunched binary like the others, it was a shell script. The script basically translates tar commands to cpio commands, which makes sense, since the cpio binary is a LOT smaller than tar. But there's no cpio on the fixit floppy....... And there's no ifconfig on the floppy either, so why even bother with telnet/ftp/mount_nfs? BTW this is the fixit-floppy that came with 3.4-RELEASE I'm talking about. To be honest, I wouldn't mind seeing nc (netcat) on the fixit floppy. It's a very powerful networking tool IMHO, and for people in a "secure" environment running NFS or the rlogind family is quite out of the question =) DocWilco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 2:27: 9 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from zippy.cdrom.com (zippy.cdrom.com [204.216.27.228]) by hub.freebsd.org (Postfix) with ESMTP id 1970A154B2 for ; Fri, 21 Jan 2000 02:27:03 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) Received: from zippy.cdrom.com (jkh@localhost [127.0.0.1]) by zippy.cdrom.com (8.9.3/8.9.3) with ESMTP id CAA98780; Fri, 21 Jan 2000 02:27:02 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) To: "ROGIER MULHUIJZEN" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Why was rsh removed from the fixit floppy? In-reply-to: Your message of "Fri, 21 Jan 2000 10:38:55 +0100." Date: Fri, 21 Jan 2000 02:27:02 -0800 Message-ID: <98777.948450422@zippy.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > script. The script basically translates tar commands to cpio commands, > which makes sense, since the cpio binary is a LOT smaller than tar. But > there's no cpio on the fixit floppy....... > > And there's no ifconfig on the floppy either, so why even bother with > telnet/ftp/mount_nfs? You need to also look at what's on the mfsroot floppy because they're used in conjunction with one another. - Jordan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 4:32:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 7476A151FF for ; Fri, 21 Jan 2000 04:32:07 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com ([203.197.137.158]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id XAA07256; Fri, 21 Jan 2000 23:01:48 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id SAA00970; Fri, 21 Jan 2000 18:01:34 +0530 (IST) (envelope-from grog) Date: Fri, 21 Jan 2000 18:01:34 +0530 From: Greg Lehey To: "Jordan K. Hubbard" Cc: ROGIER MULHUIJZEN , freebsd-hackers@FreeBSD.ORG Subject: Better fixit (was: Why was rsh removed from the fixit floppy?) Message-ID: <20000121180134.G517@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <98777.948450422@zippy.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <98777.948450422@zippy.cdrom.com>; from jkh@zippy.cdrom.com on Fri, Jan 21, 2000 at 02:27:02AM -0800 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, 21 January 2000 at 2:27:02 -0800, Jordan K. Hubbard wrote: >> script. The script basically translates tar commands to cpio commands, >> which makes sense, since the cpio binary is a LOT smaller than tar. But >> there's no cpio on the fixit floppy....... >> >> And there's no ifconfig on the floppy either, so why even bother with >> telnet/ftp/mount_nfs? > > You need to also look at what's on the mfsroot floppy because they're > used in conjunction with one another. If you want a better fixit floppy, you should consider the new custom disk pair with PicoBSD (see picobsd(8) in -CURRENT). It includes everything on the old fixit floppy, also real tar and a number of other programs, including rsh. There's still space on there; what else could we put there? Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 4:42:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from zippy.cdrom.com (zippy.cdrom.com [204.216.27.228]) by hub.freebsd.org (Postfix) with ESMTP id D002D1542C for ; Fri, 21 Jan 2000 04:42:41 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) Received: from zippy.cdrom.com (jkh@localhost [127.0.0.1]) by zippy.cdrom.com (8.9.3/8.9.3) with ESMTP id EAA17267; Fri, 21 Jan 2000 04:42:34 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) To: Greg Lehey Cc: ROGIER MULHUIJZEN , freebsd-hackers@FreeBSD.ORG Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) In-reply-to: Your message of "Fri, 21 Jan 2000 18:01:34 +0530." <20000121180134.G517@mojave.worldwide.lemis.com> Date: Fri, 21 Jan 2000 04:42:34 -0800 Message-ID: <17264.948458554@zippy.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > There's still space on there; what else could we put there? A copy of nethack to play while you're waiting for that fsck? [ducks] - Jordan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 4:57:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.nyct.net (bsd4.nyct.net [204.141.86.6]) by hub.freebsd.org (Postfix) with ESMTP id CBD2514BB7 for ; Fri, 21 Jan 2000 04:57:52 -0800 (PST) (envelope-from mbac@nyct.net) Received: from bsd1.nyct.net (mbac@bsd1.nyct.net [204.141.86.3]) by mail.nyct.net (8.8.8/8.8.7) with ESMTP id HAA20040; Fri, 21 Jan 2000 07:57:51 -0500 (EST) (envelope-from mbac@nyct.net) Received: from localhost (mbac@localhost) by bsd1.nyct.net (8.8.8/8.9.3) with ESMTP id HAA06364; Fri, 21 Jan 2000 07:57:50 -0500 (EST) (envelope-from mbac@nyct.net) X-Authentication-Warning: bsd1.nyct.net: mbac owned process doing -bs Date: Fri, 21 Jan 2000 07:57:50 -0500 (EST) From: Michael Bacarella To: Doug White Cc: Matthew Reimer , freebsd-hackers@FreeBSD.ORG Subject: Re: RLIMIT_NPROC can be exceeded via setuid/exec In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 21 Jan 2000, Doug White wrote: > On Thu, 20 Jan 2000, Matthew Reimer wrote: > > Background: in an attempt to manage our webserver to keep too many CGIs > > from taking down the machine, I've been experimenting with RLIMIT_NPROC. > > This appears to work fine when forking new processes, causing the fork > > to fail with error EAGAIN. > > > > However, this didn't solve our problem. We're using Apache with suexec, > > and still CGIs would multiply far beyond the specified resource limit. > > > > Apache forks suexec, which is suid root; fork1() increments the number > > of processes for root, unless RLIMIT_NPROC has been exceeded, in which > > case the fork fails with EAGAIN. > > > > suexec calls then calls setuid() (before it calls execv), which > > decrements root's process count and increments the target user's process > > count, but RLIMIT_NPROC is not consulted, and voila, we've just exceeded > > the target user's maximum process count. I was considering this same problem a few nights ago. My solution, (which was more to prevent a forkbomb-via-network) is to just restrict the maximum number of connections to something reasonable. As long as your cgis spawn a predictable number of subprocesses (say, NPROC), you can usually guesstimate that if you want no more than 100 processes: MAX_CONNECTIONS * NPROC = 100 Of course, if they're not at all predictable, that sucks. I'd probably try exploring running apache as a specific user (binding it to port say, 8080) and letting old fashioned UNIX limits kick in. You'd be avoiding suexec because it'd already be running at the desired userlevel. Authbind might be worth pursuing, except: a> I only know of it via hearsay b> It might be Linux only If that didn't work, I'd consider Linux and hope capabilities were implemented. It seems awkward that such a simple concept is such a pain in the ass to implement in bullet-proof fashion. Welcome to UNIX :) -MB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 5: 6:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtppzh.pzh.nl (webshield.pzh.nl [194.178.168.50]) by hub.freebsd.org (Postfix) with SMTP id 6A5D61543F for ; Fri, 21 Jan 2000 05:06:29 -0800 (PST) (envelope-from MULHUIJZEN@PZH.NL) Received: FROM smtp.pzh.nl BY smtppzh.pzh.nl ; Fri Jan 21 14:05:27 2000 0000 Received: from PZH40-1-Message_Server by smtp.pzh.nl with Novell_GroupWise; Fri, 21 Jan 2000 14:05:33 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Fri, 21 Jan 2000 14:04:49 +0100 From: "ROGIER MULHUIJZEN" To: Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >If you want a better fixit floppy, you should consider the new custom >disk pair with PicoBSD (see picobsd(8) in -CURRENT). It includes >everything on the old fixit floppy, also real tar and a number of >other programs, including rsh. There's still space on there; what >else could we put there? I would really say netcat. It is the most versatile networking tool I have seen so far. For those of you not familiar with netcat, it is a utillity written by l0pht (the well known gang of hackers). What it basically does is pipe stdin to a network connection and the network connection back to stdout. But it has all sorts of goodies around it. It's already in the packages/ports and the README that comes with it has a plethora of uses described (both a light side and a dark side), most of which have nothing to do with fixit, but read on. Most of my systems have portmap and the rlogin family disabled, as well as the NFS_NOSERVER option in the kernel config. So to do backups over the network I use netcat in the following way: Filesystem /usr to be backed up from isis to venus (assuming nothing is mounted on mountpoints within /usr): [ root@venus:/usr/backups/isis ] # nc -l -p 5432 isis > isis_usr.tar [ root@isis:/usr ] # tar cf - . | nc -w 3 venus 5432 which starts a netcat listening on port 5432 on venus, accepting connections only from isis, redirecting all data into the tar file. And a tar of the filesystem on isis with the data written through a pipe to netcat which sends the data to anything listening on port 5432 on venus. After 3 seconds of inactivity the nc on isis will shut down, closing the network connection, which in turn will close the nc on venus. I would love to be able to use the reverse of this in a fixit situation without having to resort to making my own. Unless of course there's already a way to do stuff like this with the tools on the PicoBSD or fixit floppies, without using either NFS (which I don't have on any of my machines) or rlogin related tools (of which I only have the ssh family)...... in which case you can flame me for the next 2 hours. DocWilco P.S.: The original is available at http://www.l0pht.com/users/10pht/nc110.tgz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 5: 8:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.nyct.net (bsd4.nyct.net [204.141.86.6]) by hub.freebsd.org (Postfix) with ESMTP id 3FFD914D42; Fri, 21 Jan 2000 05:08:27 -0800 (PST) (envelope-from mbac@nyct.net) Received: from bsd1.nyct.net (mbac@bsd1.nyct.net [204.141.86.3]) by mail.nyct.net (8.8.8/8.8.7) with ESMTP id IAA21367; Fri, 21 Jan 2000 08:08:26 -0500 (EST) (envelope-from mbac@nyct.net) Received: from localhost (mbac@localhost) by bsd1.nyct.net (8.8.8/8.9.3) with ESMTP id IAA06755; Fri, 21 Jan 2000 08:08:26 -0500 (EST) (envelope-from mbac@nyct.net) X-Authentication-Warning: bsd1.nyct.net: mbac owned process doing -bs Date: Fri, 21 Jan 2000 08:08:26 -0500 (EST) From: Michael Bacarella To: Seigo Tanimura Cc: smp@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Using spinning time efficiently? In-Reply-To: <14472.10247.374655.13283E@rina.r.dl.itc.u-tokyo.ac.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I once thought something might be wrong, and then found > (ALT)SYSCALL_LOCK spinning to wait for the lock to be released. Now I > am wondering if we can contribute spinning time to anything else, say > running another process, before the lock gets released. Is is possible > to do so? I'm the last person who you'd speak to for an authoritative answer to a FreeBSD question, but I'll try fielding it. What version of FreeBSD? Your kernel might be spinlocking other processes out because the kernel isn't totally re-entrant. Yet. Version number here might be significant. At least, this is the only reason I can think of for spinlocking away at syscall entry. In such a case, recognizing this situation and then just deciding to run another process instead of spinning away helplessly wouldn't do much good. To run another process, it'd need to enter the kernel and select one. That's still the same problem. -MB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 5:23:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtppzh.pzh.nl (webshield.pzh.nl [194.178.168.50]) by hub.freebsd.org (Postfix) with SMTP id 9ABCF15172 for ; Fri, 21 Jan 2000 05:23:25 -0800 (PST) (envelope-from MULHUIJZEN@PZH.NL) Received: FROM smtp.pzh.nl BY smtppzh.pzh.nl ; Fri Jan 21 14:22:22 2000 0000 Received: from PZH40-1-Message_Server by smtp.pzh.nl with Novell_GroupWise; Fri, 21 Jan 2000 14:22:27 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Fri, 21 Jan 2000 14:21:56 +0100 From: "ROGIER MULHUIJZEN" To: , Cc: , Subject: Re: Using spinning time efficiently? Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >I'm the last person who you'd speak to for an authoritative answer to a >FreeBSD question, but I'll try fielding it. Same here =) What I have gathered about spinning on a lock is that it is indeed waiting for a lock, but not sleeping so that the process doesn't get context switches etc. and thus can react instantly when the lock is freed. So yes, you pay for it in CPU util but you gain the advantage of a much faster reaction time. Thus spinning should only be used on locks of which you know could be freed straight away. I'm not sure this is the truth, but if it is, using spinning time for running another process totally defeats the purpose of spinning. You'd be better of using a semaphore and sleeping. Can someone give an authoritative reply to this? =) DocWilco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 6:39:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 1EA0C14D42 for ; Fri, 21 Jan 2000 06:39:07 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (m14.chn.vsnl.net.in [202.54.43.207] (may be forged)) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id BAA07358; Sat, 22 Jan 2000 01:08:53 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id UAA00531; Fri, 21 Jan 2000 20:08:27 +0530 (IST) (envelope-from grog) Date: Fri, 21 Jan 2000 20:08:27 +0530 From: Greg Lehey To: "Jordan K. Hubbard" Cc: ROGIER MULHUIJZEN , freebsd-hackers@FreeBSD.ORG Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) Message-ID: <20000121200827.B479@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <20000121180134.G517@mojave.worldwide.lemis.com> <17264.948458554@zippy.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <17264.948458554@zippy.cdrom.com>; from jkh@zippy.cdrom.com on Fri, Jan 21, 2000 at 04:42:34AM -0800 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, 21 January 2000 at 4:42:34 -0800, Jordan K. Hubbard wrote: >> There's still space on there; what else could we put there? > > A copy of nethack to play while you're waiting for that fsck? Is it OK if we have the non-X version only? Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 8: 3:46 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.cs.umn.edu (mail.cs.umn.edu [128.101.33.100]) by hub.freebsd.org (Postfix) with ESMTP id 1D66C1540A for ; Fri, 21 Jan 2000 08:03:35 -0800 (PST) (envelope-from beyer@cs.umn.edu) Received: from kepler.cs.umn.edu (beyer@kepler.cs.umn.edu [128.101.34.78]) by mail.cs.umn.edu (8.9.3/8.9.3) with ESMTP id KAA16364; Fri, 21 Jan 2000 10:03:30 -0600 (CST) Received: from localhost (beyer@localhost) by kepler.cs.umn.edu (8.9.1/8.9.0) with ESMTP id KAA24722; Fri, 21 Jan 2000 10:03:30 -0600 (CST) X-Authentication-Warning: kepler.cs.umn.edu: beyer owned process doing -bs Date: Fri, 21 Jan 2000 10:03:30 -0600 (CST) From: "James C. Beyer" To: Sabrina Minshall Cc: hackers@FreeBSD.ORG Subject: Re: PR kern/14034: gettimeofday() returns negative value? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Actually, a line like temp =t1->tv_usec + 1000000; or using some other temp to save the t1 data before it is permuted will make the program work perfectly. t1->tv_usec += 1000000; Kills the correct value when t2 is updated. The another option would be to stop using pointers in the function call. ie: #include #include #include #include #include #include #include #include #include int time_elapsed(struct timeval t1, struct timeval t2) { int s, ms; s = t1.tv_sec - t2.tv_sec; assert((s >= 0)); if (s != 0) { if (t1.tv_usec < t2.tv_usec) { s--; t1.tv_usec += 1000000; } } ms = s * 1000000 + (t1.tv_usec - t2.tv_usec); return (ms); } int main() { struct timeval tv1, tv2; int run = 0; int diff; if (gettimeofday(&tv1, NULL) < 0) { perror("gettimeofday"); } tv2.tv_usec = tv1.tv_usec; tv2.tv_sec = tv1.tv_sec; for (;;) { usleep(9000); if (gettimeofday(&tv1, NULL) < 0) { perror("gettimeofday"); } /* * diff in usec. */ diff = time_elapsed(tv1, tv2); if (diff < 0) { printf("-ve tvdiff %d\n", diff); printf("%ld %ld %ld %ld\n", tv1.tv_sec, tv1.tv_usec, tv2.tv_sec, tv2.tv_usec); printf("run = %d\n", run); assert(0); } tv2.tv_usec = tv1.tv_usec; tv2.tv_sec = tv1.tv_sec; run++; } return (0); } works fine been running for 5 minutes without a hitch. Don't update a value if you don't really want it changed outside a function. jcb To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 9: 6:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from extremis.demon.co.uk (extremis.demon.co.uk [194.222.242.30]) by hub.freebsd.org (Postfix) with SMTP id 7C1D5154E0 for ; Fri, 21 Jan 2000 09:06:08 -0800 (PST) (envelope-from gjvc@extremis.demon.co.uk) Received: (qmail 667 invoked by uid 1010); 21 Jan 2000 17:01:05 -0000 Date: Fri, 21 Jan 2000 17:01:05 +0000 From: George Cox To: "Jordan K. Hubbard" Cc: Greg Lehey , ROGIER MULHUIJZEN , freebsd-hackers@FreeBSD.ORG Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) Message-ID: <20000121170105.C439@extremis.demon.co.uk> References: <20000121180134.G517@mojave.worldwide.lemis.com> <17264.948458554@zippy.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.1i In-Reply-To: <17264.948458554@zippy.cdrom.com>; from jkh@zippy.cdrom.com on Fri, Jan 21, 2000 at 04:42:34AM -0800 X-Operating-System: FreeBSD 4.0-CURRENT (i386) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 21/01 04:42, Jordan K. Hubbard wrote: > > There's still space on there; what else could we put there? > > A copy of nethack to play while you're waiting for that fsck? Entirely sensible suggestion. I mean, OpenBSD has hangman in the kernel debugger. (It uses the system calls as its dictionary of possible words.) :-) gjvc -- [gjvc] "Expectations should not be lowered simply because a product is free." -- Russ Cooper, NTBugTraq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 9:32:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 5B082154E1 for ; Fri, 21 Jan 2000 09:32:32 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id KAA84646; Fri, 21 Jan 2000 10:32:25 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id KAA12265; Fri, 21 Jan 2000 10:32:29 -0700 (MST) Message-Id: <200001211732.KAA12265@harmony.village.org> To: "Jordan K. Hubbard" Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Fri, 21 Jan 2000 04:42:34 PST." <17264.948458554@zippy.cdrom.com> References: <17264.948458554@zippy.cdrom.com> Date: Fri, 21 Jan 2000 10:32:29 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <17264.948458554@zippy.cdrom.com> "Jordan K. Hubbard" writes: : > There's still space on there; what else could we put there? : : A copy of nethack to play while you're waiting for that fsck? : : [ducks] Jordan, you aren't being very #pragmaTIC about this, are you :-) Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 9:57: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from boromir.vpop.net (dns1.vpop.net [206.117.147.2]) by hub.freebsd.org (Postfix) with ESMTP id A24E414DBA for ; Fri, 21 Jan 2000 09:57:05 -0800 (PST) (envelope-from mreimer@vpop.net) Received: from vpop.net (bilbo.vpop.net [216.160.82.65]) by boromir.vpop.net (8.9.1/8.9.1) with ESMTP id JAA26756 for ; Fri, 21 Jan 2000 09:57:04 -0800 (PST) Message-ID: <38889E40.B8B3F4A@vpop.net> Date: Fri, 21 Jan 2000 09:58:24 -0800 From: Matthew Reimer Organization: VPOP Technologies, Inc. X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.4-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: RLIMIT_NPROC can be exceeded via setuid/exec References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I solved the problem by making a small syscall KLD get_uid_nproc that just returns the result of chgproccnt(SCARG(uap, uid), 0); and by having suexec use this syscall to determine whether or not to exec the CGI: stat.version = sizeof(stat); mod_id = modfind("get_uid_nproc"); if ((mod_id > 0) && (modstat(mod_id, &stat) == 0)) { getrlimit(RLIMIT_NPROC, &rlim); n_procs = syscall(stat.data.intval, uid); if (n_procs >= rlim.rlim_cur) { printf("Content-type: text/html\n\n" "Too many processes running for this user.\n"); log_err("Process limit exceeded (%ld)\n", n_procs); exit(122); } } So now RLimitNPROC in Apache VirtualHost sections really works, even with suexec. But my question remains: should setuid() fail if the target uid's process count would be exceeded? If so, I wouldn't need this work-around. Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 11:27:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fanf.noc.demon.net (fanf.noc.demon.net [195.11.55.83]) by hub.freebsd.org (Postfix) with ESMTP id 59C1E158CE; Fri, 21 Jan 2000 11:27:16 -0800 (PST) (envelope-from fanf@demon.net) Received: from fanf by fanf.noc.demon.net with local (Exim 3.02 #13) id 12BjiC-00031J-00; Fri, 21 Jan 2000 19:27:12 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Tony Finch To: freebsd-hackers@freebsd.org, jdp@freebsd.org Cc: Tony Finch Subject: LD_PRELOAD X-Mailer: VM 6.34 under Emacs 19.34.1 Message-Id: Date: Fri, 21 Jan 2000 19:27:12 +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm experimenting with using LD_PRELOAD to implement "shim" wrappers around functions in libc. It's really easy to do on Solaris but I'm having some difficulty on FreeBSD. The first problem I had was compiling my shim library so that the rtld would accept it. On Solaris I can just use `gcc -c libshim.c` then setting LD_PRELOAD to ./libshim.o does the expected thing. If I try this on FreeBSD then the rtld says: /usr/libexec/ld-elf.so.1: ./libshim.o: unsupported file type I managed to get it to work with this command line: gcc -Xlinker -E -Xlinker -noinhibit-exec -shared -o libshim.so libshim.c which gives me a bunch of errors as follows (related to my next problem): /var/tmp/ccP231581.o: In function `_init': /var/tmp/ccP231581.o(.text+0x34): multiple definition of `_init' /usr/lib/crti.o(.init+0x0): first defined here /var/tmp/ccP231581.o: In function `_fini': /var/tmp/ccP231581.o(.text+0xdc): multiple definition of `_fini' /usr/lib/crti.o(.fini+0x0): first defined here How do I get it to link cleanly? Do I really have to link it at all? This brings me on to the second problem. I want to do some initialization of my library before the real action starts. On Solaris the linker calls a function in the object called _init() when it is loaded; it's easy to make this work. I can see similar functionality in FreeBSD's rtld but it looks like I have to jump through obscure hoops to make it work (an ELF DT_INIT section if I understand it correctly). I also note that a lot of the library code in FreeBSD has code like if (!initialized) init_me_baby(); at the start of entry-point functions. This seems grotty and inefficient to me and I'd like to avoid it if possible. I also note a user-interface incompatibility between FreeBSD's implementation of LD_PRELOAD and Solaris's: on Solaris the filenames listed in LD_PRELOAD are space-separated, but on FreeBSD they are colon or semicolon separated. Any pearls of wisdom would be gratefully received. Tony. -- the man who puts the dot at To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 11:52:50 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fanf.noc.demon.net (fanf.noc.demon.net [195.11.55.83]) by hub.freebsd.org (Postfix) with ESMTP id 99D92154F6; Fri, 21 Jan 2000 11:52:29 -0800 (PST) (envelope-from fanf@demon.net) Received: from fanf by fanf.noc.demon.net with local (Exim 3.02 #13) id 12Bk6U-00032O-00; Fri, 21 Jan 2000 19:52:18 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Tony Finch To: freebsd-hackers@freebsd.org, jdp@freebsd.org Cc: Tony Finch Subject: Re: LD_PRELOAD In-Reply-To: References: X-Mailer: VM 6.34 under Emacs 19.34.1 Message-Id: Date: Fri, 21 Jan 2000 19:52:18 +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Tony Finch wrote: > > This brings me on to the second problem. I want to do some > initialization of my library before the real action starts. On Solaris > the linker calls a function in the object called _init() when it is > loaded; it's easy to make this work. I can see similar functionality > in FreeBSD's rtld but it looks like I have to jump through obscure > hoops to make it work (an ELF DT_INIT section if I understand it > correctly). After some more playing I found that adding the following declarations shut up the linker and caused the _init and _fini functions to be called as I desired. My only remaining questions are whether the gcc command line I used is correct and if it is what does it all mean? #ifdef __FreeBSD__ static void _init(void) __attribute__ ((section (".init"))); static void _fini(void) __attribute__ ((section (".fini"))); #endif Tony. -- the dot at person To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 12:24:55 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id AAA4B154C8 for ; Fri, 21 Jan 2000 12:24:52 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id MAA23996; Fri, 21 Jan 2000 12:24:50 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id MAA11973; Fri, 21 Jan 2000 12:24:49 -0800 (PST) (envelope-from jdp@polstra.com) Date: Fri, 21 Jan 2000 12:24:49 -0800 (PST) Message-Id: <200001212024.MAA11973@vashon.polstra.com> To: fanf@demon.net Subject: Re: LD_PRELOAD In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Tony Finch wrote: > I'm experimenting with using LD_PRELOAD to implement "shim" wrappers > around functions in libc. It's really easy to do on Solaris but I'm > having some difficulty on FreeBSD. > > The first problem I had was compiling my shim library so that the rtld > would accept it. The right way to do it on FreeBSD is like this: gcc -fpic -c *.c gcc -shared -o libshim.so *.o > This brings me on to the second problem. I want to do some > initialization of my library before the real action starts. On Solaris > the linker calls a function in the object called _init() when it is > loaded; it's easy to make this work. I can see similar functionality > in FreeBSD's rtld but it looks like I have to jump through obscure > hoops to make it work (an ELF DT_INIT section if I understand it > correctly). The names "_init" and "_fini" are "reserved for the implementation" in ANSI/ISO-speak. You shouldn't use them. You can get what you want like this with gcc: void myInitFunction(void) __attribute__ ((constructor)); void myInitFunction(void) { /* Your initialization code here. */ } Or, write it in C++ and use a global constructor. > code like > if (!initialized) > init_me_baby(); > at the start of entry-point functions. This seems grotty and > inefficient to me and I'd like to avoid it if possible. Fine, but then you're venturing into areas not covered by the relevant standards. That will make your code less portable. > I also note a user-interface incompatibility between FreeBSD's > implementation of LD_PRELOAD and Solaris's: on Solaris the filenames > listed in LD_PRELOAD are space-separated, but on FreeBSD they are > colon or semicolon separated. That could be a bug. You're probably the first person on earth to have more than one library in LD_PRELOAD. :-) What does Linux do? John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 12:57: 4 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail-out1.apple.com (mail-out1.apple.com [17.254.0.52]) by hub.freebsd.org (Postfix) with ESMTP id E22DE1555C; Fri, 21 Jan 2000 12:56:57 -0800 (PST) (envelope-from conrad@apple.com) Received: from mailgate2.apple.com ([17.129.100.225]) by mail-out1.apple.com (8.9.3/8.9.3) with ESMTP id MAA14298; Fri, 21 Jan 2000 12:56:52 -0800 (PST) Received: from scv3.apple.com (scv3.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 2.0.15) with ESMTP id ; Fri, 21 Jan 2000 12:56:40 -0800 Received: from [17.202.45.145] (il0204a-dhcp17.apple.com [17.202.45.145]) by scv3.apple.com (8.9.3/8.9.3) with ESMTP id MAA21026; Fri, 21 Jan 2000 12:56:39 -0800 (PST) X-Sender: conrad@mail.apple.com Message-Id: In-Reply-To: <200001150920.KAA98140@freebsd.dk> References: <20000114214234.A14486@foobar.franken.de> MIME-Version: 1.0 Date: Fri, 21 Jan 2000 12:56:26 -0800 To: Soren Schmidt , logix@foobar.franken.de (Harold Gutch) From: Conrad Minshall Subject: Re: UDF Cc: beattie@aracnet.com (Brian Beattie), hackers@freebsd.org, current@freebsd.org Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 1:20 AM -0800 1/15/00, Soren Schmidt wrote: >It seems Harold Gutch wrote: >> On Fri, Jan 14, 2000 at 09:29:58AM +0100, Soren Schmidt wrote: >> > I have it on my TODO list, but I'm not started yet, and probably wont for >> > some time to come. >> > The reason I've put it on the backburner for now, is that DVD's can >> > be read using the cd9660 filesystem, and that is sufficient for my >> > needs for the time being. >> >> I was under the impression that this was only possible as long as >> the DVDs actually had an ISO9660 filesystem as well - which all >> of my DVDs have, but which still doesn't mean that there are no >> DVDs with only UDF, but no ISO9660 filesystem. > >I'm pretty sure all DVD's produced to date have an iso9660 file sys >on them, but they might change that in the future, so having UDF >support would be a win for us in the long run. DVD Forum's DVD-Video spec requires the UDF Bridge format, which gives you both UDF and 9660 metadata without duplicating file data. Commercial DVD videos are currently using this format. Bridge format is intended for read-only usage - as far as I know all DVD-RAM use is and will be restricted to "mono-metadata". -- Conrad Minshall ... conrad@apple.com ... 408 974-2749 Apple Computer ... Mac OS X Core Operating Systems ... NFS/UDF/etc Alternative email address: rad@acm.org. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 15:43:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from web2106.mail.yahoo.com (web2106.mail.yahoo.com [128.11.68.250]) by hub.freebsd.org (Postfix) with SMTP id 5C55C15617 for ; Fri, 21 Jan 2000 15:43:16 -0800 (PST) (envelope-from rpseguin@yahoo.com) Received: (qmail 5235 invoked by uid 60001); 21 Jan 2000 23:43:16 -0000 Message-ID: <20000121234316.5234.qmail@web2106.mail.yahoo.com> Received: from [63.80.94.93] by web2106.mail.yahoo.com; Fri, 21 Jan 2000 15:43:16 PST Date: Fri, 21 Jan 2000 15:43:16 -0800 (PST) From: Ralph Seguin Subject: FreBSD 3.3, power off and power button stuff To: freebsd-hackers@freebsd.org Cc: am@amsoft.ru, rpseguin@yahoo.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi. I'm having some difficulty getting APM and power control working in FreeBSD 3.3 I've built a kernel with APM enabled in the config file and enabled it in rc.conf, however apmd says it's starting up, but ps never shows it running. From /etc/rc.conf: apm_enable="YES" bash-2.03# apm -s apm: can't open /dev/apm: Device not configured bash-2.03# ls -al apm* crw-rw---- 1 root operator 39, 0 Jan 21 15:24 apm crw-rw---- 1 root operator 39, 8 Jan 21 15:24 apmctl I did a MAKEDEV in /dev, just in case, but the major/minor numbers came out the same. What I'd like to do is have shutdown -p work properly and I'd also like to intercept the power switch so I can shutdown gracefully. Any suggestions are much appreciated. Thanks. -Ralph rpseguin@yahoo.com __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 15:47: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bartok.lanl.gov (bartok.lanl.gov [128.165.205.72]) by hub.freebsd.org (Postfix) with ESMTP id 3A4AB1587B for ; Fri, 21 Jan 2000 15:46:58 -0800 (PST) (envelope-from john@bartok.lanl.gov) Received: (from john@localhost) by bartok.lanl.gov (8.9.2/8.9.2) id QAA93411; Fri, 21 Jan 2000 16:45:33 -0700 (MST) (envelope-from john) From: John Galbraith Date: Fri, 21 Jan 2000 16:45:33 -0700 (MST) To: andre.albsmeier@mchp.siemens.de, Fred Cawthorne , John Galbraith , Thomas Gellekum , "Steven G. Kargl" , Kimitoshi Kono , "Randal S. Masutani" , Mike Smith , Vince Vielhaber , freebsd-hackers@freebsd.org Subject: new AT-GPIB and AT-GPIB/TNT driver version X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14472.60200.175295.417625@bartok.lanl.gov> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have a new National Instruments AT-GPIB driver almost ready to go. The code is almost a total rewrite from what I had before. It has been ported to the newbus architecture and simplified quite a bit. It should also be faster, both in terms of throughput of large transfers and addressing overhead in small transfers. (In my work, fast small transfers are much more important than fast large ones.) I have this new command queueing scheme going that makes it possible to perform any operation with only one tsleep(), unless multiple uiomove() calls are required, in which case it wakes up each time uiomove() needs to happen. This is probably really old news for most of you, but my old driver had some problems in this area. It also uses two data buffers for simultaneous DMA and uiomove() operations. It should be a lot easier to implement SRQ (a GPIB interrupt request) this way, but I haven't actually done it yet. I threw out all the complexity that I had before of programmed polled vs. programmed interrupt vs. DMA in favor of DMA only. The whole driver is in one file again. Well, if anybody is interested in taking a look, or (better) trying it out, please respond and I will send you the code. I think it requires a FreeBSD-4.0 kernel due to all the new bus stuff, but I could be mistaken. I am personally running the 4.0-20000103-CURRENT snapshot. Please include me explicitly on any -hackers discussion, because I don't subscribe to the list directly (I sometimes check out the archive, though). Thanks, John Galbraith john@bartok.lanl.gov To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 15:58:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from orion.ac.hmc.edu (Orion.AC.HMC.Edu [134.173.32.20]) by hub.freebsd.org (Postfix) with ESMTP id 9E34115804 for ; Fri, 21 Jan 2000 15:58:08 -0800 (PST) (envelope-from brdavis@orion.ac.hmc.edu) Received: (from brdavis@localhost) by orion.ac.hmc.edu (8.8.8/8.8.8) id PAA25938; Fri, 21 Jan 2000 15:57:58 -0800 (PST) Date: Fri, 21 Jan 2000 15:57:57 -0800 From: Brooks Davis To: Ralph Seguin Cc: freebsd-hackers@FreeBSD.ORG, am@amsoft.ru Subject: Re: FreBSD 3.3, power off and power button stuff Message-ID: <20000121155757.A23771@orion.ac.hmc.edu> References: <20000121234316.5234.qmail@web2106.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <20000121234316.5234.qmail@web2106.mail.yahoo.com>; from rpseguin@yahoo.com on Fri, Jan 21, 2000 at 03:43:16PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jan 21, 2000 at 03:43:16PM -0800, Ralph Seguin wrote: > I'm having some difficulty getting APM and power > control working in FreeBSD 3.3 > I've built a kernel with APM enabled in the config > file and enabled it in > rc.conf, however apmd says it's starting up, but ps > never shows it running. > > >From /etc/rc.conf: > apm_enable="YES" > > bash-2.03# apm -s > apm: can't open /dev/apm: Device not configured > > bash-2.03# ls -al apm* > crw-rw---- 1 root operator 39, 0 Jan 21 15:24 > apm > crw-rw---- 1 root operator 39, 8 Jan 21 15:24 > apmctl > > I did a MAKEDEV in /dev, just in case, but the > major/minor numbers came out the same. Did you remember to remove the word disabled from the config line for apm? That's what bits most people (It's hit me a couple of times). > What I'd like to do is have shutdown -p work > properly and I'd also like to > intercept the power switch so I can shutdown > gracefully. shutdown -p never worked for me in 3.x. Since I installed -current this week it seems to be working. I don't know how you would catch the power switch. If you could tell it apart from other methods of generating teh same APM event you could probably do it with apmd. Otherwise you'll need ACPI support which IIRC will start coming in to -current after -current becomes 5.0 (within the next few months). -- Brooks -- "They that can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." -- Benjamin Franklin. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Fri Jan 21 18:44:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from internal.mail.demon.net (internal.mail.demon.net [193.195.224.3]) by hub.freebsd.org (Postfix) with ESMTP id B3F9714EC4 for ; Fri, 21 Jan 2000 18:44:11 -0800 (PST) (envelope-from fanf@demon.net) Received: from fanf.eng.demon.net (fanf.eng.demon.net [195.11.55.89]) by internal.mail.demon.net with ESMTP id CAA05527; Sat, 22 Jan 2000 02:44:09 GMT Received: from fanf by fanf.eng.demon.net with local (Exim 3.12 #3) id 12BqX2-000Oju-00; Sat, 22 Jan 2000 02:44:08 +0000 To: jdp@polstra.com, freebsd-hackers@freebsd.org From: Tony Finch Cc: Tony Finch Subject: Re: LD_PRELOAD In-Reply-To: <200001212024.MAA11973@vashon.polstra.com> References: Message-Id: Date: Sat, 22 Jan 2000 02:44:08 +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Polstra wrote: >Tony Finch wrote: >> >> I'm experimenting with using LD_PRELOAD to implement "shim" >> wrappers around functions in libc. The first problem I had was >> compiling my shim library so that the rtld would accept it. > >The right way to do it on FreeBSD is like this: > gcc -fpic -c *.c > gcc -shared -o libshim.so *.o That works fine, thanks! Any idea why my clumsy success worked and why my clumsy failures didn't? >> This brings me on to the second problem. I want to do some >> initialization of my library before the real action starts. On Solaris >> the linker calls a function in the object called _init() when it is >> loaded; it's easy to make this work. I can see similar functionality >> in FreeBSD's rtld but it looks like I have to jump through obscure >> hoops to make it work (an ELF DT_INIT section if I understand it >> correctly). > >The names "_init" and "_fini" are "reserved for the implementation" >in ANSI/ISO-speak. You shouldn't use them. I don't have any choice on Solaris, unfortunately (and my code has to be portable between FreeBSD and Solaris). I suppose in that case Solaris is the implementation and they have reserved it for my use. I gather from the linker errors that FreeBSD has reserved the names for a different use? >You can get what you want like this with gcc: > > void myInitFunction(void) __attribute__ ((constructor)); Is that attribute equivalent to ((section (".init")))? >Or, write it in C++ and use a global constructor. No. Never. No way. NO. :-) >> I also note a user-interface incompatibility between FreeBSD's >> implementation of LD_PRELOAD and Solaris's: on Solaris the filenames >> listed in LD_PRELOAD are space-separated, but on FreeBSD they are >> colon or semicolon separated. > >That could be a bug. You're probably the first person on earth to >have more than one library in LD_PRELOAD. :-) What does Linux do? According to the documentation I looked at it uses arbitrary whitespace as the separator. I haven't looked at the code to check. Thanks for your help. Tony. -- dot it thus To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 1:59:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from laurasia.com.au (lauras.lnk.telstra.net [139.130.93.142]) by hub.freebsd.org (Postfix) with ESMTP id 367E71501E for ; Sat, 22 Jan 2000 01:59:33 -0800 (PST) (envelope-from mike@laurasia.com.au) Received: (from mike@localhost) by laurasia.com.au (8.9.1a/8.9.1) id RAA09095 for freebsd-hackers@freebsd.org; Sat, 22 Jan 2000 17:59:30 +0800 (WST) Date: Sat, 22 Jan 2000 17:59:30 +0800 (WST) From: Michael Kennett Message-Id: <200001220959.RAA09095@laurasia.com.au> To: freebsd-hackers@freebsd.org Subject: Great FICL Hacks Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've been playing around with the boot loader(8), which seems to be a very powerful piece of software. However I'm really only using the 'load', 'unload', and 'boot' functions. I'd be interested in hearing about more powerful uses of this software. Are there any great hacks of FICL that people have done? Regards, Mike Kennett To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 5:34:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mimer.webgiro.com (mimer.webgiro.com [212.209.29.5]) by hub.freebsd.org (Postfix) with ESMTP id B809015799 for ; Sat, 22 Jan 2000 05:34:17 -0800 (PST) (envelope-from abial@webgiro.com) Received: by mimer.webgiro.com (Postfix, from userid 66) id 531C02DC0A; Sat, 22 Jan 2000 14:34:03 +0100 (CET) Received: by mx.webgiro.com (Postfix, from userid 1001) id 166B47811; Sat, 22 Jan 2000 14:34:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id 0CE8710E10; Sat, 22 Jan 2000 14:34:35 +0100 (CET) Date: Sat, 22 Jan 2000 14:34:35 +0100 (CET) From: Andrzej Bialecki To: Michael Kennett Cc: freebsd-hackers@freebsd.org Subject: Re: Great FICL Hacks In-Reply-To: <200001220959.RAA09095@laurasia.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 22 Jan 2000, Michael Kennett wrote: > I've been playing around with the boot loader(8), which seems to be a > very powerful piece of software. However I'm really only using the 'load', > 'unload', and 'boot' functions. I'd be interested in hearing about more > powerful uses of this software. > > Are there any great hacks of FICL that people have done? /usr/share/examples/bootforth. As well as, of course, /boot/*.4th . It seems that currently Daniel Sobral is the best source to answer more advanced questions... Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 7:33:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from tdnet.com.br (guepardo.tdnet.com.br [200.236.148.6]) by hub.freebsd.org (Postfix) with ESMTP id A18FB14A15 for ; Sat, 22 Jan 2000 07:33:23 -0800 (PST) (envelope-from grios@ddsecurity.com.br) Received: from ddsecurity.com.br [200.236.148.105] by tdnet.com.br with ESMTP (SMTPD32-5.05) id A05320011A; Sat, 22 Jan 2000 12:44:19 -0300 Message-ID: <3889CD94.FB0F829B@ddsecurity.com.br> Date: Sat, 22 Jan 2000 13:32:36 -0200 From: Gustavo Vieira Goncalves Coelho Rios X-Mailer: Mozilla 4.61 [en] (X11; U; OpenBSD 2.6 i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Subject: sysinstall Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am tryning to install Fbsd 3.4, but, when i choose (in sysinstall) to perform a custom installation eith selected parts of the SO to install, sysinstall get a killed, (signal 11) and a core is generated. Have anyone here already faced such a problem? How to fix it? Thanks a lot for your time and cooperation. Should i take a closer look at the core file generated ? Thanks a lot for your time and cooperation. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 7:40:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from thunk.crazylogic.net (thunk.crazylogic.net [199.45.111.154]) by hub.freebsd.org (Postfix) with ESMTP id EAD5214C9C for ; Sat, 22 Jan 2000 07:40:24 -0800 (PST) (envelope-from matt@crazylogic.net) Received: from localhost (matt@localhost) by thunk.crazylogic.net (8.9.3/8.9.3) with ESMTP id KAA58305; Sat, 22 Jan 2000 10:31:23 -0500 (EST) (envelope-from matt@crazylogic.net) Date: Sat, 22 Jan 2000 10:31:22 -0500 (EST) From: Matt Gostick To: Gustavo Vieira Goncalves Coelho Rios Cc: hackers@FreeBSD.ORG Subject: Re: sysinstall In-Reply-To: <3889CD94.FB0F829B@ddsecurity.com.br> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Checkout: http://www.freebsd.org/releases/3.4R/errata.html On Sat, 22 Jan 2000, Gustavo Vieira Goncalves Coelho Rios wrote: > I am tryning to install Fbsd 3.4, but, when i choose (in sysinstall) to > perform a custom installation eith selected parts of the SO to install, > sysinstall get a killed, (signal 11) and a core is generated. > Have anyone here already faced such a problem? How to fix it? > > Thanks a lot for your time and cooperation. > Should i take a closer look at the core file generated ? > > Thanks a lot for your time and cooperation. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 9:29:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from polaris.cs.laurentian.ca (polaris.cs.laurentian.ca [142.51.24.200]) by hub.freebsd.org (Postfix) with SMTP id 419E815011 for ; Sat, 22 Jan 2000 09:29:25 -0800 (PST) (envelope-from s0121430@cs.laurentian.ca) Received: (qmail 295 invoked from network); 22 Jan 2000 17:29:23 -0000 Received: from unknown (HELO eten-04.cs.laurentian.ca) (142.51.24.4) by polaris.cs.laurentian.ca with SMTP; 22 Jan 2000 17:29:23 -0000 Date: Sat, 22 Jan 2000 12:29:23 -0500 (EST) From: Marwan Fayed To: freebsd-hackers@freebsd.org Cc: freebsd-mobile@freebsd.org Subject: disappearing mount points after install Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, I am a seasoned UNIX user but have been using freebsd for only about 6 months. I have posted this problem to freebsd-questions with no response so, figuring it must be a bug in the install program i'm going to try here. Oh, I would like to have traced the code to try to find the bug (if one exists) but being a senior year undergrad with a full course load and thesis, I have been left with little time... please forgive me. My problem is this. I am trying to install 3.3-R on an IBM Thinkpad 365XD (although I have received mail from a man in France who is having the same problem on a desktop). The installation runs completely smoothly but when I finish and reboot the machine reports no resident O.S. After trying many different things (including messing with the MBR, double and triple checking disk geometry, and using a Fixit disk to try to diagnose the problem), I booted from the install floppy to the main install menu. Rather than re-install all over again for the nth time I just entered the label editor. The partitions were still there but the mount points were lost. What appeared was this: 40M // supposed to be root swap 84M // swap is obviously OK 651M // supposed to be /usr This is clearly not what I designated so I tried relabelling the mount points, writing the information using 'w' and exiting install only to have the BIOS report no O.S. yet again! The machine is a P100,40M ram,810HD, standard PCI (as far as I have been able to tell/test). Has anyone encountered this or know the problem? Thanks a TON! Marwan :-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 9:36:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id C5DCC15011 for ; Sat, 22 Jan 2000 09:36:35 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id JAA01040; Sat, 22 Jan 2000 09:36:34 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id JAA16497; Sat, 22 Jan 2000 09:36:34 -0800 (PST) (envelope-from jdp@polstra.com) Date: Sat, 22 Jan 2000 09:36:34 -0800 (PST) Message-Id: <200001221736.JAA16497@vashon.polstra.com> To: dot@dotat.at Subject: Re: LD_PRELOAD In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Tony Finch wrote: > John Polstra wrote: > >The right way to do it on FreeBSD is like this: > > gcc -fpic -c *.c > > gcc -shared -o libshim.so *.o > > That works fine, thanks! Any idea why my clumsy success worked and why > my clumsy failures didn't? Nah, I didn't pay that much attention to what you did. I just noticed that it wasn't right. :-) The "gcc -fpic" makes the object code position-independent. I am not sure, but probably you would also benefit (performance-wise) by using that on Solaris. The "gcc -shared" turns it into a shared library instead of a normal object file. In the process it also links in some extra little .o files which are necessary to hold it all together. You can use "gcc -v" to get the gory details. > >The names "_init" and "_fini" are "reserved for the implementation" > >in ANSI/ISO-speak. You shouldn't use them. > > I don't have any choice on Solaris, unfortunately (and my code has to > be portable between FreeBSD and Solaris). I suppose in that case > Solaris is the implementation and they have reserved it for my use. I > gather from the linker errors that FreeBSD has reserved the names for > a different use? The machinery that supports C++ constructors uses them. > >Or, write it in C++ and use a global constructor. > > No. Never. No way. NO. :-) I didn't mean write everything in C++ -- just the initialization hook. It's not that bad. There's an example in "src/lib/libc_r/uthread/uthread_autoinit.cc". The advantage of using C++ for this is that you're using a portable mechanism instead of a gcc extension. > >> I also note a user-interface incompatibility between FreeBSD's > >> implementation of LD_PRELOAD and Solaris's: on Solaris the filenames > >> listed in LD_PRELOAD are space-separated, but on FreeBSD they are > >> colon or semicolon separated. > > > >That could be a bug. You're probably the first person on earth to > >have more than one library in LD_PRELOAD. :-) What does Linux do? > > According to the documentation I looked at it uses arbitrary > whitespace as the separator. I haven't looked at the code to check. I took a look. They accept white space or colons. I'll change ours to be similarly tolerant. The semicolons are a vestige from SVR4.0, and should probably be ditched. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 9:44:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from camus.cybercable.fr (camus.cybercable.fr [212.198.0.200]) by hub.freebsd.org (Postfix) with SMTP id F096214DB3 for ; Sat, 22 Jan 2000 09:44:21 -0800 (PST) (envelope-from herbelot@cybercable.fr) Received: (qmail 27606873 invoked from network); 22 Jan 2000 17:44:40 -0000 Received: from d016.paris-30.cybercable.fr (HELO cybercable.fr) ([212.198.30.16]) (envelope-sender ) by camus.cybercable.fr (qmail-ldap-1.03) with SMTP for ; 22 Jan 2000 17:44:40 -0000 Message-ID: <3889ECB5.9E75171B@cybercable.fr> Date: Sat, 22 Jan 2000 18:45:25 +0100 From: Thierry Herbelot X-Mailer: Mozilla 4.5 [en] (X11; U; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Marwan Fayed Cc: freebsd-hackers@freebsd.org Subject: Re: disappearing mount points after install References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello [-mobile trimmed] Marwan Fayed wrote: > > Hello, > > I am a seasoned UNIX user but have been using freebsd for only about 6 > months. I have posted this problem to freebsd-questions with no response > so, figuring it must be a bug in the install program i'm going to try > here. Oh, I would like to have traced the code to try to find the bug (if > one exists) but being a senior year undergrad with a full course load and > thesis, I have been left with little time... please forgive me. > > My problem is this. I am trying to install 3.3-R on an IBM Thinkpad 365XD > (although I have received mail from a man in France who is having the same > problem on a desktop). The installation runs completely smoothly but when > I finish and reboot the machine reports no resident O.S. This may be due to a faulty BIOS : some BIOSes do not like at all not having a DOS partition at the beginning of the disk (I have some HP PCs with just 20 Megs of FAT at the start of the disk to keep them booting - from , which is FreeBSD) > > After trying many different things (including messing with the MBR, double > and triple checking disk geometry, and using a Fixit disk to try to > diagnose the problem), I booted from the install floppy to the main > install menu. Rather than re-install all over again for the nth time I > just entered the label editor. The partitions were still there but the > mount points were lost. What appeared was > this: > > 40M // supposed to be root > swap 84M // swap is obviously OK > 651M // supposed to be /usr The mount points for each partition are recorded in /etc/fstab : what you are seeing is completely normal, as sysinstall has not read the fstab file from the root partition of your disk. > > This is clearly not what I designated so I tried relabelling the mount > points, writing the information using 'w' and exiting install only to have > the BIOS report no O.S. yet again! Try and leave a small DOS partition at the beginning of your disk, as said above. > > The machine is a P100,40M ram,810HD, standard PCI (as far as I have been > able to tell/test). Has anyone encountered this or know the problem? > > Thanks a TON! > > Marwan :-) TfH > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 10:11:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from polaris.cs.laurentian.ca (polaris.cs.laurentian.ca [142.51.24.200]) by hub.freebsd.org (Postfix) with SMTP id 7794414BEC for ; Sat, 22 Jan 2000 10:11:12 -0800 (PST) (envelope-from s0121430@cs.laurentian.ca) Received: (qmail 2440 invoked from network); 22 Jan 2000 18:11:10 -0000 Received: from unknown (HELO eten-04.cs.laurentian.ca) (142.51.24.4) by polaris.cs.laurentian.ca with SMTP; 22 Jan 2000 18:11:10 -0000 Date: Sat, 22 Jan 2000 13:11:10 -0500 (EST) From: Marwan Fayed To: Thierry Herbelot Cc: freebsd-hackers@freebsd.org Subject: Re: disappearing mount points after install In-Reply-To: <3889ECB5.9E75171B@cybercable.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am writing this after reading two responses, both of which I am grateful for. I should have included this info in the original posting but better late than never, I guess. There have been two suggestions both very related, both of which I have already considered. I thought perhaps my BIOS required a DOS partition so I installed RedHat 6.1 to be sure. Guess what? It worked! Nevertheless, I installed a 2Meg DOS partition and set it to active before re-isntalling 3.3-R. OH, and yes, I also set my freeBSD partition to active as well... every time! But even this did not work. Does this mean I have everyone stumped? ;-) Marwan On Sat, 22 Jan 2000, Thierry Herbelot wrote: > Hello > > [-mobile trimmed] > > Marwan Fayed wrote: > > > > Hello, > > > > I am a seasoned UNIX user but have been using freebsd for only about 6 > > months. I have posted this problem to freebsd-questions with no response > > so, figuring it must be a bug in the install program i'm going to try > > here. Oh, I would like to have traced the code to try to find the bug (if > > one exists) but being a senior year undergrad with a full course load and > > thesis, I have been left with little time... please forgive me. > > > > My problem is this. I am trying to install 3.3-R on an IBM Thinkpad 365XD > > (although I have received mail from a man in France who is having the same > > problem on a desktop). The installation runs completely smoothly but when > > I finish and reboot the machine reports no resident O.S. > > This may be due to a faulty BIOS : some BIOSes do not like at all not > having a DOS partition at the beginning of the disk (I have some HP PCs > with just 20 Megs of FAT at the start of the disk to keep them booting - > from , which is FreeBSD) > > > > > After trying many different things (including messing with the MBR, double > > and triple checking disk geometry, and using a Fixit disk to try to > > diagnose the problem), I booted from the install floppy to the main > > install menu. Rather than re-install all over again for the nth time I > > just entered the label editor. The partitions were still there but the > > mount points were lost. What appeared was > > this: > > > > 40M // supposed to be root > > swap 84M // swap is obviously OK > > 651M // supposed to be /usr > > The mount points for each partition are recorded in /etc/fstab : what > you are seeing is completely normal, as sysinstall has not read the > fstab file from the root partition of your disk. > > > > > This is clearly not what I designated so I tried relabelling the mount > > points, writing the information using 'w' and exiting install only to have > > the BIOS report no O.S. yet again! > > Try and leave a small DOS partition at the beginning of your disk, as > said above. > > > > > The machine is a P100,40M ram,810HD, standard PCI (as far as I have been > > able to tell/test). Has anyone encountered this or know the problem? > > > > Thanks a TON! > > > > Marwan :-) > > TfH > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 10:11:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (Postfix) with ESMTP id BC5F714C2E for ; Sat, 22 Jan 2000 10:11:12 -0800 (PST) (envelope-from roberto@keltia.freenix.fr) Received: (from uucp@localhost) by frmug.org (8.9.3/frmug-2.5/nospam) with UUCP id TAA25806 for freebsd-hackers@FreeBSD.ORG; Sat, 22 Jan 2000 19:10:59 +0100 (CET) (envelope-from roberto@keltia.freenix.fr) Received: by keltia.freenix.fr (Postfix, from userid 101) id 1F2128863; Sat, 22 Jan 2000 13:28:17 +0100 (CET) Date: Sat, 22 Jan 2000 13:28:17 +0100 From: Ollivier Robert To: freebsd-hackers@FreeBSD.ORG Subject: Re: Better fixit (was: Why was rsh removed from the fixit floppy?) Message-ID: <20000122132816.A41224@keltia.freenix.fr> Mail-Followup-To: freebsd-hackers@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from MULHUIJZEN@PZH.NL on Fri, Jan 21, 2000 at 02:04:49PM +0100 X-Operating-System: FreeBSD 4.0-CURRENT/ELF AMD-K6/200 & 2x PPro/200 SMP Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to ROGIER MULHUIJZEN: > For those of you not familiar with netcat, it is a utillity written by > l0pht (the well known gang of hackers). What it basically does is pipe I just want to correct one misunderstanding. 'The Hobbit' is the author of netcat, not l0pht. -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 4.0-CURRENT #77: Thu Dec 30 12:49:51 CET 1999 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 12:59:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from polaris.cs.laurentian.ca (polaris.cs.laurentian.ca [142.51.24.200]) by hub.freebsd.org (Postfix) with SMTP id 4370B14E28 for ; Sat, 22 Jan 2000 12:59:34 -0800 (PST) (envelope-from s0121430@cs.laurentian.ca) Received: (qmail 10231 invoked from network); 22 Jan 2000 20:59:32 -0000 Received: from altair.cs.laurentian.ca (HELO altair) (142.51.24.206) by polaris.cs.laurentian.ca with SMTP; 22 Jan 2000 20:59:32 -0000 Date: Sat, 22 Jan 2000 15:59:32 -0500 (EST) From: Marwan Fayed To: freebsd-hackers@freebsd.org Subject: Re: disappearing mount points after install Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG (The following is forwarded from freebsd-mobile) FreeBSD loader does not start up, nor does the kernel (obviously). The error message I get back is literally translated as "No O.S." As for a disk parameter translation I cannot say for sure because IBM (as wretched as they can be) does not allow users into the BIOS... at least not on this model. What I can tell you is that while installing (before the main menu) when my system is being scanned for devices, my hard drive geomtry shows up as follows: C/H/S: 1578/16/63 However, the slice and label editors, linux (when i succeeded in installing it), and all tests i perform in DOS all report the following: C/H/S: 789/32/63 I have tried both and neither work. Further, I just tried writing label info from sysinstall running of the fixit disk (as recommended), and that doesn't work either. I think I'll have to offer to buy dinner for whoever is able to solve this one! :-) Marwan On Sat, 22 Jan 2000, Boris Karnaukh wrote: > Marwan Fayed wrote: > > > > My problem is this. I am trying to install 3.3-R on an IBM Thinkpad 365XD > > (although I have received mail from a man in France who is having the same > > problem on a desktop). The installation runs completely smoothly but when > > I finish and reboot the machine reports no resident O.S. > > Did FreeBSD loader and/or kernel start up? > > Have you tested your computer for some kind of disk parameters > translation in BIOS setup? > > I have had similar experience with Toshiba Satellite 2500CDS. > > > > After trying many different things (including messing with the MBR, double > > and triple checking disk geometry, and using a Fixit disk to try to > > diagnose the problem), I booted from the install floppy to the main > > install menu. Rather than re-install all over again for the nth time I > > just entered the label editor. The partitions were still there but the > > mount points were lost. What appeared was > > this: > > > > 40M // supposed to be root > > swap 84M // swap is obviously OK > > 651M // supposed to be /usr > > > > This is clearly not what I designated so I tried relabelling the mount > > points, writing the information using 'w' and exiting install only to have > > the BIOS report no O.S. yet again! > > > > According to my experience, you should run /stand/sysinstall again after > chosing "Fixit" option to make "w" option immediately work. > > You'll possibly have to create additional devices /dev/wd0? using > MAKEDEV script from "Fixit" disk. > > -- > > Boris Karnaukh (mailto:bk532@iname.com) > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 14:53:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (castles528.castles.com [208.214.165.92]) by hub.freebsd.org (Postfix) with ESMTP id BFC8E14E71; Sat, 22 Jan 2000 14:53:16 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id PAA04945; Sat, 22 Jan 2000 15:01:38 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <200001222301.PAA04945@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Marwan Fayed Cc: freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: disappearing mount points after install In-reply-to: Your message of "Sat, 22 Jan 2000 12:29:23 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 22 Jan 2000 15:01:38 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I am a seasoned UNIX user but have been using freebsd for only about 6 > months. I have posted this problem to freebsd-questions with no response > so, figuring it must be a bug in the install program i'm going to try > here. Oh, I would like to have traced the code to try to find the bug (if > one exists) but being a senior year undergrad with a full course load and > thesis, I have been left with little time... please forgive me. > > My problem is this. I am trying to install 3.3-R on an IBM Thinkpad 365XD > (although I have received mail from a man in France who is having the same > problem on a desktop). The installation runs completely smoothly but when > I finish and reboot the machine reports no resident O.S. This will be due to you not having an active partition marked in the MBR, or not having a valid bootblock. Boot sysinstall, go to the configure menu, select the slice table/fdisk editor, select your slice and hit 'a'. Then hit 'w' and write the data out; when prompted (both times) select the 'standard MBR' option (remember that you have to actually select the option before hitting Enter). > After trying many different things (including messing with the MBR, double > and triple checking disk geometry, and using a Fixit disk to try to > diagnose the problem), I booted from the install floppy to the main > install menu. Rather than re-install all over again for the nth time I > just entered the label editor. The partitions were still there but the > mount points were lost. What appeared was > this: > > 40M // supposed to be root > swap 84M // swap is obviously OK > 651M // supposed to be /usr > > This is clearly not what I designated It is. The label editor only tells you what's in the label; the mountpoints are only stored in the fstab, which is not visible to the label editor at this time. What you're seeing here is normal and indicates that both the MBR and the disklabel were written to your disk correctly. It's entirely unrelated to your current problem. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 15:35:58 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from polaris.cs.laurentian.ca (polaris.cs.laurentian.ca [142.51.24.200]) by hub.freebsd.org (Postfix) with SMTP id 95A8314C3A for ; Sat, 22 Jan 2000 15:35:52 -0800 (PST) (envelope-from s0121430@cs.laurentian.ca) Received: (qmail 17926 invoked from network); 22 Jan 2000 23:35:47 -0000 Received: from altair.cs.laurentian.ca (HELO altair) (142.51.24.206) by polaris.cs.laurentian.ca with SMTP; 22 Jan 2000 23:35:47 -0000 Date: Sat, 22 Jan 2000 18:35:47 -0500 (EST) From: Marwan Fayed To: Mike Smith Cc: freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: disappearing mount points after install In-Reply-To: <200001222301.PAA04945@mass.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG OK, I'm glad about fstab and my mount points, but I have already tried using 'a' and then i hit 's' to set bootable before I 'w' to write. I've actually tried this more times than i can count! When I do re-enter the fdisk using install disks though, the slice is no longer marked 'A' for active. Perhaps this gives extra insight? Any other ideas? The offer for dinner to whoever solves this problem stands... when I'm in town, of course! ;-) Thanks in advance, as always. Marwan On Sat, 22 Jan 2000, Mike Smith wrote: > > I am a seasoned UNIX user but have been using freebsd for only about 6 > > months. I have posted this problem to freebsd-questions with no response > > so, figuring it must be a bug in the install program i'm going to try > > here. Oh, I would like to have traced the code to try to find the bug (if > > one exists) but being a senior year undergrad with a full course load and > > thesis, I have been left with little time... please forgive me. > > > > My problem is this. I am trying to install 3.3-R on an IBM Thinkpad 365XD > > (although I have received mail from a man in France who is having the same > > problem on a desktop). The installation runs completely smoothly but when > > I finish and reboot the machine reports no resident O.S. > > This will be due to you not having an active partition marked in the MBR, > or not having a valid bootblock. Boot sysinstall, go to the configure > menu, select the slice table/fdisk editor, select your slice and hit 'a'. > Then hit 'w' and write the data out; when prompted (both times) select > the 'standard MBR' option (remember that you have to actually select the > option before hitting Enter). > > > After trying many different things (including messing with the MBR, double > > and triple checking disk geometry, and using a Fixit disk to try to > > diagnose the problem), I booted from the install floppy to the main > > install menu. Rather than re-install all over again for the nth time I > > just entered the label editor. The partitions were still there but the > > mount points were lost. What appeared was > > this: > > > > 40M // supposed to be root > > swap 84M // swap is obviously OK > > 651M // supposed to be /usr > > > > This is clearly not what I designated > > It is. The label editor only tells you what's in the label; the > mountpoints are only stored in the fstab, which is not visible to the > label editor at this time. What you're seeing here is normal and > indicates that both the MBR and the disklabel were written to your disk > correctly. It's entirely unrelated to your current problem. > -- > \\ Give a man a fish, and you feed him for a day. \\ Mike Smith > \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org > \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 19:27: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from internal.mail.demon.net (internal.mail.demon.net [193.195.224.3]) by hub.freebsd.org (Postfix) with ESMTP id 5B49015041 for ; Sat, 22 Jan 2000 19:26:48 -0800 (PST) (envelope-from fanf@demon.net) Received: from fanf.eng.demon.net (fanf.eng.demon.net [195.11.55.89]) by internal.mail.demon.net with ESMTP id DAA12488; Sun, 23 Jan 2000 03:26:45 GMT Received: from fanf by fanf.eng.demon.net with local (Exim 3.12 #3) id 12CDfn-000KEt-00; Sun, 23 Jan 2000 03:26:43 +0000 To: jdp@polstra.com, freebsd-hackers@freebsd.org From: Tony Finch Cc: Tony Finch Subject: Re: LD_PRELOAD In-Reply-To: <200001221736.JAA16497@vashon.polstra.com> References: Message-Id: Date: Sun, 23 Jan 2000 03:26:43 +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Polstra wrote: >Tony Finch wrote: >>John Polstra wrote: >>> >>> The names "_init" and "_fini" are "reserved for the implementation" >>> in ANSI/ISO-speak. You shouldn't use them. >> >> I don't have any choice on Solaris, unfortunately (and my code has to >> be portable between FreeBSD and Solaris). I suppose in that case >> Solaris is the implementation and they have reserved it for my use. I >> gather from the linker errors that FreeBSD has reserved the names for >> a different use? > >The machinery that supports C++ constructors uses them. > >> >Or, write it in C++ and use a global constructor. >> >> No. Never. No way. NO. :-) > >The advantage of using C++ for this is that you're using a portable >mechanism instead of a gcc extension. I'm not really worried about portability to different compilers. OS portability is important, though. I settled on using the following declaration. This works on Solaris, FreeBSD, and Linux. (This implies that the Solaris rtld documentation isn't quite complete regarding its support for C++ mechanisms.) static void startup(void) __attribute__ ((constructor)); >>> You're probably the first person on earth to >>> have more than one library in LD_PRELOAD. :-) I'm using an LD_PRELOAD hack to add functionality to a commercial application, and it has to co-exist with another vendor's commercial LD_PRELOAD hack for the same application. I've managed to get my test to work to my satisfaction on FreeBSD and Linux but it makes the Solaris 2.6 ld.so.1 crash which is a shame since Solaris is my principal OS for this project... The stuff I have done so far is available from http://www.inch.demon.co.uk/filemodshim.tar.gz Run `make test` for a bit of fun. Some Makefile frobbing may be required. Tony. -- I'm the dot in dot at To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 20: 7: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 621F114C38 for ; Sat, 22 Jan 2000 20:06:57 -0800 (PST) (envelope-from maniattb@cs.rpi.edu) Received: from cs.rpi.edu (maniattb@dishwasher.cs.rpi.edu [128.213.8.31]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id XAA43423; Sat, 22 Jan 2000 23:06:43 -0500 (EST) Message-Id: <200001230406.XAA43423@cs.rpi.edu> X-Mailer: exmh version 2.0.1 12/23/97 To: freebsd-hackers@freebsd.org Cc: maniatty@cs.albany.edu, maniattb@cs.rpi.edu Subject: Learning the FreeBSD Kernel Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 22 Jan 2000 23:06:41 -0500 From: Bill Maniatty Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello All: I have a student this semester in my Operating Systems class who would like to become a bit more knowledgeable about systems software. I suggested that he learn a bit about how device drivers are written in FreeBSD as a minor project. My questions are: 1) Does any current documentation of how to write and/or install a device driver exist in English (note C != English)? We would love to have a level documentation like the document by Pragmatic at http://thc.pimmel.com/files/thc/bsdkern.html, we are looking for a how to guide. 2) If no existing documentation exists, would it be a good idea to put together a sort of how to guide for a simple driver (with an eye to generalization later if warranted)? 3) If the answer to 2 is yes, can we get constructive help from the FreeBSD community? Assuming that this constitutes an interesting project, what would be a good initial approach? I was considering: 1) Get and build the FreeBSD kernel (4.0?) 2) Choose a non-essential device with a simple preexisting driver. 3) Remove all trace of the driver from the kernel source. 4) Reapply the changes used to install the driver (perhaps one step at a time). We could suggest some simple sanity checks to support stepwise refinement. If this is a good idea, I would like the following help from the FreeBSD community: 1) Identify a simple driver (perhaps something like a joystick driver?) 2) Identify all source code associated with the driver (including configuration files, makefiles etc...). Some files may have only one or two lines devoted to the driver, so we will need to know how to recognize such lines and would appreciate pointers to such lines. Regards: Bill Maniatty |------------------------------------------| |Dr. William (Bill) A. Maniatty | |Assistant Professor | |Dept. of Computer Science | |University At Albany | |Albany, NY 12222 | |------------------------------------------| |Phone: (518) 442-4281 | |e-mail: maniatty@cs.albany.edu | |URL: http://www.cs.albany.edu/~maniatty| |------------------------------------------| To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sat Jan 22 23:46:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 80BB814F59; Sat, 22 Jan 2000 23:45:51 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (j41.ktb6.jaring.my [161.142.234.55]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id SAA11756; Sun, 23 Jan 2000 18:15:40 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id PAA01188; Sun, 23 Jan 2000 15:35:26 +0800 (MYT) (envelope-from grog) Date: Sun, 23 Jan 2000 15:35:26 +0800 From: Greg Lehey To: Bill Maniatty Cc: FreeBSD-doc@FreeBSD.org, maniatty@cs.albany.edu, freebsd-hackers@FreeBSD.org Subject: Re: Learning the FreeBSD Kernel Message-ID: <20000123153526.I930@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <200001230406.XAA43423@cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001230406.XAA43423@cs.rpi.edu>; from maniattb@cs.rpi.edu on Sat, Jan 22, 2000 at 11:06:41PM -0500 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [adding -doc, which is more appropriate for some of the questions] On Saturday, 22 January 2000 at 23:06:41 -0500, Bill Maniatty wrote: > Hello All: > > I have a student this semester in my Operating Systems class who would like > to become a bit more knowledgeable about systems software. I suggested > that he learn a bit about how device drivers are written in FreeBSD > as a minor project. My questions are: > > 1) Does any current documentation of how to write and/or install a > device driver exist in English (note C != English)? Yes, with reservations. > We would love to have a level documentation like the document by > Pragmatic at http://thc.pimmel.com/files/thc/bsdkern.html, we are > looking for a how to guide. Somewhere we have a tutorial. I think it's been retired because it's out of date, but it could be a very rewarding starting point for somebody who wanted to work his way into the material and either update it or bring out a new document based on the structure. This would also give the student good visibility in the (Free)BSD community. > 2) If no existing documentation exists, would it be a good idea to > put together a sort of how to guide for a simple driver (with an > eye to generalization later if warranted)? > > 3) If the answer to 2 is yes, can we get constructive help from the FreeBSD > community? Definitely. -hackers would be the right forum there. I would also personally commit to helping within the constraints of my other work. > Assuming that this constitutes an interesting project, what would be > a good initial approach? I was considering: > 1) Get and build the FreeBSD kernel (4.0?) > 2) Choose a non-essential device with a simple preexisting driver. > 3) Remove all trace of the driver from the kernel source. > 4) Reapply the changes used to install the driver (perhaps one step at a time). > We could suggest some simple sanity checks to support stepwise refinement. (1) and (2) are a good start. You don't need to remove the old driver; it would in fact make it easier for debugging purposes if it remained. Instead, choose another major number and name, and write a new driver. This procedure is definitely *not* documented, but it's the way we introduce new drivers, and I think a couple of other people who have done it would be pleased to help. A possibly better alternative is to find a device which isn't currently supported by FreeBSD and write a driver for it. This would have the advantage that the work would also be a contribution to FreeBSD. The question that I can't answer here is: what would be an appropriate device? > If this is a good idea, I would like the following help from the FreeBSD > community: > 1) Identify a simple driver (perhaps something like a joystick > driver?) I don't know if anybody uses it any more. > 2) Identify all source code associated with the driver (including configuration > files, makefiles etc...). Some files may have only one or two lines > devoted to the driver, so we will need to know how to recognize such lines > and would appreciate pointers to such lines. That should be relatively straightforward after examination of the old tutorial, the sources and hier(7). If not, ask away. Important directories are: /sys symlink to /usr/src/sys; I'll use it below /sys/config generic configuration files /sys/i386/config configuration files for i386 /sys/dev sources for generic device drivers /sys/isa sources for generic ISA device drivers /sys/i386/isa sources for i386-only ISA device drivers Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message