From owner-freebsd-hackers Sun Sep 22 7:15: 4 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 391D537B401 for ; Sun, 22 Sep 2002 07:15:02 -0700 (PDT) Received: from pop3.psconsult.nl (ps226.psconsult.nl [193.67.147.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAFF243E42 for ; Sun, 22 Sep 2002 07:14:55 -0700 (PDT) (envelope-from paul@pop3.psconsult.nl) Received: (from paul@localhost) by pop3.psconsult.nl (8.9.2/8.9.2) id QAA13571 for freebsd-hackers@freebsd.org; Sun, 22 Sep 2002 16:14:53 +0200 (CEST) (envelope-from paul) Date: Sun, 22 Sep 2002 16:14:53 +0200 From: Paul Schenkeveld To: FreeBSD Hackers Subject: Just a wild idea Message-ID: <20020922161453.A13323@psconsult.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi All, I've been playing with jails for over 2 years now. I really like them but we often use them to run a process as root with reduced power only to get access to TCP and UDP ports below 1024. For many applications however, for example lpd, named, sendmail, tac_plus and others, it would be more than good enough to run that program as a normal, non-root user provided there is a way to bind to that single low TCP and/or UDP port that the program needs access to. So I was wondering if we couldn't come up with a method to allow the startup of a normal non-root process with the only increased power of being able to bind to a specific port. This would be the opposite of jail which allows the startup of a program as root and then tries to revoke many powers. I envision a system call (only accessible to root) that will grant bind access to a single TCP or UDP port, which will persist even after set*[ug]id calls and will be inherited by child processes and a very small setuid root wrapper program to exercise that system call, become a non-root user and then exec the real program. The synopsis for the system call could be something like this: int portaccess(int version, int protocol, const struct sockaddr *addr); where version works like with jail, protocol is either IPPROTO_TCP or IPPROTO_UDP and the addr structure holds the port number (1 .. 1023) and either INADDR_ANY or the ip address of one of the interfaces. Multiple calls should accumulate access rights so programs like bind could get access to both a UDP and TCP port. The wrapper program then should be something like: portaccess [-i user:group] -{u|t} [address:]port ... cmd args Where -i selects the identity obtained after all portaccess system calls have been made (nobody/nogroup if omitted) and -u and -t add access to a single port. Finally if all portaccess and set*[ug]id calls have been made an no error occured, execv is called with the remaining arguments starting at cmd. I understand that implementing this has quite some impact as we would have to carry around all accumulated access rights in or near the proc structure, the fork and exec calls need to be aware of this extra data and the bind system call needs to do additional checking before refusing access to a low TCP or UDP port but I think it's worth the efford. I still like jail(2) and jail(8) very much for bigger purposes like virtual hosts for shell logins or web hosting but I feel they are too heavy for small problems like named which only needs access to UDP and TCP ports 53 but can do everything else as a normal user. Any thoughts? Am I inventing something nobody is waiting for? Is something going on already that I am not aware of? Please let me know. Paul Schenkeveld, Consultant PSconsult ICT Services BV To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 22 15:39:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D763037B404; Sun, 22 Sep 2002 15:39:30 -0700 (PDT) Received: from mnemo.syne-post.com (mnemo.syne-post.com [207.61.210.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 181E843E6A; Sun, 22 Sep 2002 15:39:30 -0700 (PDT) (envelope-from nobody@mnemo.syne-post.com) Received: (from nobody@localhost) by mnemo.syne-post.com (8.8.8/8.8.7+norelay) id SAA02855; Sun, 22 Sep 2002 18:25:09 -0400 (EDT) (envelope-from nobody) Date: Sun, 22 Sep 2002 18:25:09 -0400 (EDT) Message-Id: <200209222225.SAA02855@mnemo.syne-post.com> To: , www.canada2.net@FreeBSD.ORG, , www.canada2.net@FreeBSD.ORG From: whitneyjn6@msn.com (whitneyjn6@msn.com) Subject: YES, FREE MORTGAGE 4% QUOTES WITH NO CLOSING COSTS! Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Below is a Heartfelt Crest Request. It was submitted by whitneyjn6@msn.com (whitneyjn6@msn.com) on Sunday, September 22, 2002 at 18:25:09 --------------------------------------------------------------------------- 4b: DONT GET A MORTGAGE UNTIL YOU READ THIS FIRST! Important information on mortgage rates. FREE INFORMATION AT THE LINK BELOW. CLICK HERE FOR MORE INFORMATION 21fh --------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 22 21:33:13 2002 Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 9AC5037B401; Sun, 22 Sep 2002 21:33:11 -0700 (PDT) Date: Sun, 22 Sep 2002 21:33:11 -0700 From: Juli Mallett To: Paul Schenkeveld Cc: FreeBSD Hackers Subject: Re: Just a wild idea Message-ID: <20020922213311.A99425@FreeBSD.org> References: <20020922161453.A13323@psconsult.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020922161453.A13323@psconsult.nl>; from fb-hackers@psconsult.nl on Sun, Sep 22, 2002 at 04:14:53PM +0200 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-LiveJournal: flata, jmallett X-Negacore: Yes Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Paul Schenkeveld [ Data: 2002-09-22 ] [ Subjecte: Just a wild idea ] > Hi All, > > I've been playing with jails for over 2 years now. I really like > them but we often use them to run a process as root with reduced > power only to get access to TCP and UDP ports below 1024. > > For many applications however, for example lpd, named, sendmail, > tac_plus and others, it would be more than good enough to run that > program as a normal, non-root user provided there is a way to bind > to that single low TCP and/or UDP port that the program needs access > to. The problem is that suser(9) sucks. I had a nice system which used gids and fell back to uid0, but the gids were sysctl tunables, and were very fine-grained (in as much as they could be), and uid0 could be disabled. I don't have it anymore, but it's pretty trivial to implement. Lots of people want suser(9) to die, and I have spoken a bit with rwatson@ on this subject, and I seem to recall that with the intro of MAC, he had some ideas for killing off suser(9)... Maybe just replace all suser(9) uses with MAC credential checks, and install MAC_UNIX by default, which would be set up to behave like ye olden UNIX... Who knows. Anyway, your idea strikes me as not generalised enough to justify itself. In a "local FreeBSD mods" way, it might do the job great for you, but a more generalised approach is likely better. You are picking one of the symptoms of the problem of UNIX historically having this admittedly-thick security methodology and working around the problem. Attacking the problem is likely to be easier, and more elegant, too :) juli. -- Juli Mallett | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger jmallett@FreeBSD.org http://people.FreeBSD.org/~jmallett/ | Support my FreeBSD hacking! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 22 22: 0:13 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A18FF37B401; Sun, 22 Sep 2002 22:00:12 -0700 (PDT) Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD88B43E42; Sun, 22 Sep 2002 22:00:11 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc03.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020923050011.GGJZ28420.sccrmhc03.attbi.com@InterJet.elischer.org>; Mon, 23 Sep 2002 05:00:11 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id VAA32433; Sun, 22 Sep 2002 21:46:13 -0700 (PDT) Date: Sun, 22 Sep 2002 21:46:13 -0700 (PDT) From: Julian Elischer To: Juli Mallett Cc: Paul Schenkeveld , FreeBSD Hackers Subject: Re: Just a wild idea In-Reply-To: <20020922213311.A99425@FreeBSD.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 22 Sep 2002, Juli Mallett wrote: > * De: Paul Schenkeveld [ Data: 2002-09-22 ] > [ Subjecte: Just a wild idea ] > > Hi All, > > > > I've been playing with jails for over 2 years now. I really like > > them but we often use them to run a process as root with reduced > > power only to get access to TCP and UDP ports below 1024. > > > > For many applications however, for example lpd, named, sendmail, > > tac_plus and others, it would be more than good enough to run that > > program as a normal, non-root user provided there is a way to bind > > to that single low TCP and/or UDP port that the program needs access > > to. better to have a definition of what are restricted ports for each jail than to redefine what root is.... (1024 numbers is only 32 words of bitmask) (just my opinion) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 22 23:29:23 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15C2237B401 for ; Sun, 22 Sep 2002 23:29:22 -0700 (PDT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E89543E75 for ; Sun, 22 Sep 2002 23:29:19 -0700 (PDT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: from zibbi.icomtek.csir.co.za (localhost [IPv6:::1]) by zibbi.icomtek.csir.co.za (8.12.6/8.12.6) with ESMTP id g8N6TFD8054615 for ; Mon, 23 Sep 2002 08:29:15 +0200 (SAT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.12.6/8.12.6/Submit) id g8N6TFb8054614 for freebsd-hackers@FreeBSD.ORG; Mon, 23 Sep 2002 08:29:15 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200209230629.g8N6TFb8054614@zibbi.icomtek.csir.co.za> Subject: Re: Just a wild idea In-Reply-To: from Julian Elischer at "Sep 22, 2002 09:46:13 pm" To: freebsd-hackers@FreeBSD.ORG Date: Mon, 23 Sep 2002 08:29:15 +0200 (SAT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > > > > I've been playing with jails for over 2 years now. I really like > > > them but we often use them to run a process as root with reduced > > > power only to get access to TCP and UDP ports below 1024. > > > > > > For many applications however, for example lpd, named, sendmail, > > > tac_plus and others, it would be more than good enough to run that > > > program as a normal, non-root user provided there is a way to bind > > > to that single low TCP and/or UDP port that the program needs access > > > to. > > better to have a definition of what are restricted ports for each jail > than to redefine what root is.... > > (1024 numbers is only 32 words of bitmask) Sometimes I think the below 1024 check is outdated. What about a flag to switch the below 1024 check totally off? How much do we really loose? The two most common setups are probably a single user desktop and a server box doing something like mail, web or dns. On the desktop switching the below 1024 check off only gain the user (who is also root) something, he needs to su less. In a server environment, access to the box is normally controlled in anycase, so the people who have access to the box, normally also are the ones that have the root password or whatever is needed to (re)start those services. The only place where I think the check might still be usefull, is on a general shell login box. John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 1:31:52 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A4EE37B401 for ; Mon, 23 Sep 2002 01:31:51 -0700 (PDT) Received: from insomnia.spc.org (insomnia.spc.org [195.224.94.183]) by mx1.FreeBSD.org (Postfix) with SMTP id 4A4BA43E6A for ; Mon, 23 Sep 2002 01:31:50 -0700 (PDT) (envelope-from bms@insomnia.spc.org) Received: (qmail 25018 invoked by uid 1031); 23 Sep 2002 08:28:24 -0000 Date: Mon, 23 Sep 2002 09:28:23 +0100 From: Bruce M Simpson To: John Hay Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Just a wild idea Message-ID: <20020923082823.GH23343@spc.org> Mail-Followup-To: Bruce M Simpson , John Hay , freebsd-hackers@FreeBSD.ORG References: <200209230629.g8N6TFb8054614@zibbi.icomtek.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200209230629.g8N6TFb8054614@zibbi.icomtek.csir.co.za> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 23, 2002 at 08:29:15AM +0200, John Hay wrote: > > better to have a definition of what are restricted ports for each jail > > than to redefine what root is.... > > > > (1024 numbers is only 32 words of bitmask) > > Sometimes I think the below 1024 check is outdated. What about a flag to > switch the below 1024 check totally off? How much do we really loose? The I remember around 6 years ago, when I still ran Linux, that the solution to this problem came in the form of a diff which delegated bind() on a reserved port credentials to a certain GID, BIND_GID. From that point on, the boot process had to be changed such that daemons which only needed to bind to a privileged port were run under their own non-root uid, with this BIND_GID in the additional groups list, using a wrapper such as sudo. This still amounts to a local mod - it can be done, has been done before, I think Tom Ptacek did some diffs for this for vanilla 4.4BSD a good while back, rewriting it for your current tree can't be too difficult. See here: http://www.sockpuppet.org/tqbf/sysctlpriv.html BMS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 2:37:42 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DABD37B401; Mon, 23 Sep 2002 02:37:41 -0700 (PDT) Received: from warez.scriptkiddie.org (uswest-dsl-142-38.cortland.com [209.162.142.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F33743E7B; Mon, 23 Sep 2002 02:37:33 -0700 (PDT) (envelope-from lamont@scriptkiddie.org) Received: from [192.168.69.11] (unknown [192.168.69.11]) by warez.scriptkiddie.org (Postfix) with ESMTP id 2367062D1A; Mon, 23 Sep 2002 02:37:32 -0700 (PDT) Date: Mon, 23 Sep 2002 02:37:31 -0700 (PDT) From: Lamont Granquist To: Juli Mallett Cc: Paul Schenkeveld , FreeBSD Hackers Subject: Re: Just a wild idea In-Reply-To: <20020922213311.A99425@FreeBSD.org> Message-ID: <20020923023031.D7466-100000@coredump.scriptkiddie.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 22 Sep 2002, Juli Mallett wrote: > Maybe just replace all suser(9) uses with MAC credential checks, and > install MAC_UNIX by default, which would be set up to behave like > ye olden UNIX... Who knows. Something like that sounds like a really good idea. I'd like to see this not only for binding to low ports but also, for example, to set the system time -- this would let you run ntpd as non-root. It'd be interesting to have a system one day where once you've gone past single user mode, root drops all its privs and acts just like a normal user account and daemon accounts only have special privs handed out to them in little chunks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 5: 3:47 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06AF637B401 for ; Mon, 23 Sep 2002 05:03:47 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 79BA843E42 for ; Mon, 23 Sep 2002 05:03:45 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 10016 invoked from network); 23 Sep 2002 11:56:54 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 23 Sep 2002 11:56:54 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 30F4A2FDAB2; Mon, 23 Sep 2002 13:56:54 +0200 (CEST) Date: Mon, 23 Sep 2002 13:56:53 +0200 From: Roman Neuhauser To: freebsd-hackers@freebsd.org Subject: subscription required? Message-ID: <20020923115653.GX30361@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, does this list require subscription to allow posts? http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/eresources.html#ERESOURCES-MAIL doesn't say so, but neither of my two attempts (before I subscribed) has shown up in the archives. -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 1:55PM up 5 days, 21:10, 22 users, load averages: 0.00, 0.01, 0.04 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 5:57:44 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CF4E37B401 for ; Mon, 23 Sep 2002 05:57:43 -0700 (PDT) Received: from t2s2.tele2.cz (t2s2.tele2.cz [213.246.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id 0B72543E7B for ; Mon, 23 Sep 2002 05:57:42 -0700 (PDT) (envelope-from dolecek@s102-n054.tele2.cz) Received: (qmail 26694 invoked from network); 23 Sep 2002 12:57:34 -0000 Received: from s102-n054.tele2.cz (213.246.102.54) by s064-n037.tele2.cz with SMTP; 23 Sep 2002 12:57:34 -0000 Received: (from dolecek@localhost) by s102-n054.tele2.cz (8.11.6/8.10.1) id g8NCvV809546 for hackers@freebsd.org; Mon, 23 Sep 2002 14:57:31 +0200 (CEST) From: Jaromir Dolecek Message-Id: <200209231257.g8NCvV809546@s102-n054.tele2.cz> Subject: fifo kqfilter change in rev. 1.54? To: hackers@freebsd.org Date: Mon, 23 Sep 2002 14:57:31 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL78 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I'm currently testing stuff on NetBSD kqueue branch, and came over FreeBSD change in rev. 1.54 of src/sys/fs/fifofs/fifo_vnops.c . I can't figure out what this change exactly fixes, since things seem to work fine without the change - the code on NetBSD kqueue branch uses still fi_readsock always, and this seems to work fine for both EVFILT_READ and EVFILT_WRITE. At the very least, I believe the change should have been to use fi_writesock for EVFILT_READ and fi_readsock for EVFILT_WRITE. Then the explicit added sorwakeup() calls would probably not be necessary, since the wakeup would be done by generic code.[*] But in any case, using fi_readsock should be fine. What am I missing here? Thanks for reply, Jaromir P.S. I also believe the added so?wakeup() calls should use fi_readsock in one case and fi_writesock in the other, not fi_writesock in both cases. -- Jaromir Dolecek http://www.NetBSD.org/ -=- We should be mindful of the potential goal, but as the tantric -=- -=- Buddhist masters say, ``You may notice during meditation that you -=- -=- sometimes levitate or glow. Do not let this distract you.'' -=- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 6:35:28 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3110737B401 for ; Mon, 23 Sep 2002 06:35:27 -0700 (PDT) Received: from star.rila.bg (star.rila.bg [62.73.64.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6401543E65 for ; Mon, 23 Sep 2002 06:35:23 -0700 (PDT) (envelope-from vladimirt@rila.bg) Received: from star.rila.bg (vlady@localhost [127.0.0.1]) by star.rila.bg (8.12.5/8.12.5) with SMTP id g8NDYIYZ089211 for ; Mon, 23 Sep 2002 16:35:03 +0300 (EEST) (envelope-from vladimirt@rila.bg) Date: Mon, 23 Sep 2002 16:34:18 +0300 From: Vladimir Terziev To: hackers@FreeBSD.ORG Subject: Problems catching SIGPIPE when writing to a broken stream Message-Id: <20020923163418.216b14ae.vladimirt@rila.bg> X-Mailer: Sylpheed version 0.8.2 (GTK+ 1.2.10; i386-unknown-freebsd4.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi hackers, I'm implementing a programmme, which writes a big amount of data (using write(2)) to a socket. When the communication stream has been closed by some reason, during the write(2) call, my process receives SIGPIPE. I tryed to catch it with signal(3) and change the behaviour of write(2) call with siginterrupt(3), but SIGPIPE is still raised to my process and terminates it. Any help and ideas will be useful! regards, Vladimir To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 6:42:22 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4434A37B406 for ; Mon, 23 Sep 2002 06:42:21 -0700 (PDT) Received: from south.nanolink.com (south.nanolink.com [217.75.134.10]) by mx1.FreeBSD.org (Postfix) with SMTP id B43A543E6E for ; Mon, 23 Sep 2002 06:42:19 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 83962 invoked by uid 85); 23 Sep 2002 13:51:24 -0000 Received: from sbnd.online.bg (HELO straylight.ringlet.net) (217.75.129.196) by south.nanolink.com with SMTP; 23 Sep 2002 13:51:22 -0000 Received: (qmail 926 invoked by uid 1000); 23 Sep 2002 13:42:25 -0000 Date: Mon, 23 Sep 2002 16:42:25 +0300 From: Peter Pentchev To: Vladimir Terziev Cc: hackers@FreeBSD.ORG Subject: Re: Problems catching SIGPIPE when writing to a broken stream Message-ID: <20020923134225.GD361@straylight.oblivion.bg> Mail-Followup-To: Vladimir Terziev , hackers@FreeBSD.ORG References: <20020923163418.216b14ae.vladimirt@rila.bg> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <20020923163418.216b14ae.vladimirt@rila.bg> User-Agent: Mutt/1.5.1i X-Virus-Scanned: by Nik's Monitoring Daemon (AMaViS perl-11d ) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 23, 2002 at 04:34:18PM +0300, Vladimir Terziev wrote: >=20 > Hi hackers, >=20 > I'm implementing a programmme, which writes a big amount of data (using = write(2)) to a socket. > When the communication stream has been closed by some reason, during the= write(2) call, my process receives SIGPIPE. I tryed to catch it with signa= l(3) and change the behaviour of write(2) call with siginterrupt(3), but SI= GPIPE is still raised to my process and terminates it. >=20 > Any help and ideas will be useful! You should receive a short write(2) before the SIGPIPE is sent, most probably a write() which returns -1 and sets errno to, say, ECONNRESET or something like that. Are you sure *all* your previous writes return as many bytes as you have tried to write? G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If I were you, who would be reading this sentence? --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9jxpA7Ri2jRYZRVMRAhSKAJ43PVomkgifAyDgKG66vjoT4RsNFACfVxS8 BIp1Ffo0iIcBVmC6O9umEzY= =0HMe -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 6:42:38 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CE4F37B406 for ; Mon, 23 Sep 2002 06:42:37 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 23B9F43E6A for ; Mon, 23 Sep 2002 06:42:17 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 11157 invoked from network); 23 Sep 2002 13:34:34 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 23 Sep 2002 13:34:34 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 8B88B2FDAB2; Mon, 23 Sep 2002 15:34:31 +0200 (CEST) Date: Mon, 23 Sep 2002 15:34:31 +0200 From: Roman Neuhauser To: freebsd-hackers@freebsd.org Subject: two make questions Message-ID: <20020923133431.GZ30361@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I've sent two messages about (p)make to questions@ but have not received any replies, so I ask here. I'm not a C programmer (thus not really familiar with make), and I'm trying to use it for project management (we write apps in php). I've stumbled across a few variable related issues where the actual behavior doesn't exactly map to the available documentation (make(1), and the pmake paper). See the messages below for complete descriptions. Also, since two attempts sent to this list before I subscribed haven't make it through and I'm not sure about the cause, I'm just posting links to the original messages in questions@: http://marc.theaimsgroup.com/?l=freebsd-questions&m=103250565427752&w=2 http://marc.theaimsgroup.com/?l=freebsd-questions&m=103251441702280&w=2 Hope you don't mind, and thanks. -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 7:19PM up 5 days, 2:34, 21 users, load averages: 0.00, 0.01, 0.00 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 6:45:26 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E6DB37B401 for ; Mon, 23 Sep 2002 06:45:24 -0700 (PDT) Received: from south.nanolink.com (south.nanolink.com [217.75.134.10]) by mx1.FreeBSD.org (Postfix) with SMTP id EA7B943E6E for ; Mon, 23 Sep 2002 06:45:21 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 83997 invoked by uid 85); 23 Sep 2002 13:54:32 -0000 Received: from sbnd.online.bg (HELO straylight.ringlet.net) (217.75.129.196) by south.nanolink.com with SMTP; 23 Sep 2002 13:54:28 -0000 Received: (qmail 977 invoked by uid 1000); 23 Sep 2002 13:45:26 -0000 Date: Mon, 23 Sep 2002 16:45:26 +0300 From: Peter Pentchev To: Vladimir Terziev Cc: hackers@FreeBSD.org Subject: Re: Problems catching SIGPIPE when writing to a broken stream Message-ID: <20020923134526.GE361@straylight.oblivion.bg> Mail-Followup-To: Vladimir Terziev , hackers@FreeBSD.org References: <20020923163418.216b14ae.vladimirt@rila.bg> <20020923134225.GD361@straylight.oblivion.bg> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0ntfKIWw70PvrIHh" Content-Disposition: inline In-Reply-To: <20020923134225.GD361@straylight.oblivion.bg> User-Agent: Mutt/1.5.1i X-Virus-Scanned: by Nik's Monitoring Daemon (AMaViS perl-11d ) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --0ntfKIWw70PvrIHh Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 23, 2002 at 04:42:25PM +0300, Peter Pentchev wrote: > On Mon, Sep 23, 2002 at 04:34:18PM +0300, Vladimir Terziev wrote: > >=20 > > Hi hackers, > >=20 > > I'm implementing a programmme, which writes a big amount of data (usin= g write(2)) to a socket. > > When the communication stream has been closed by some reason, during t= he write(2) call, my process receives SIGPIPE. I tryed to catch it with sig= nal(3) and change the behaviour of write(2) call with siginterrupt(3), but = SIGPIPE is still raised to my process and terminates it. > >=20 > > Any help and ideas will be useful! >=20 > You should receive a short write(2) before the SIGPIPE is sent, most > probably a write() which returns -1 and sets errno to, say, ECONNRESET > or something like that. Are you sure *all* your previous writes return > as many bytes as you have tried to write? Hit ':wq' too fast ;) You might want to look into scheduling your write(2) calls only when possible, using either select(2) or poll(2) to check the network socket for writability. G'luck, Peter PS. Wow. 'look writa' returned both 'writable' and 'writability'. 'look writea' returned 'writeable', but not 'writeability'. Strike another one for English grammar ;) --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I've heard that this sentence is a rumor. --0ntfKIWw70PvrIHh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9jxr27Ri2jRYZRVMRAol/AJ4jNURWIVJuK9UHMDvjTBI3RoirgwCfcPHc ex0WrqOwq9XaZ7VDgp4tRRU= =7GFP -----END PGP SIGNATURE----- --0ntfKIWw70PvrIHh-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 7: 7:24 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AEE4537B401 for ; Mon, 23 Sep 2002 07:07:22 -0700 (PDT) Received: from april.chuckr.org (april.chuckr.org [66.92.147.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE95543E4A for ; Mon, 23 Sep 2002 07:07:21 -0700 (PDT) (envelope-from chuckr@chuckr.org) Received: from april.chuckr.org (localhost [127.0.0.1]) by april.chuckr.org (8.12.6/8.12.5) with ESMTP id g8NE6F5s047723; Mon, 23 Sep 2002 10:06:15 -0400 (EDT) (envelope-from chuckr@chuckr.org) Received: from localhost (chuckr@localhost) by april.chuckr.org (8.12.6/8.12.5/Submit) with ESMTP id g8NE6DLi047720; Mon, 23 Sep 2002 10:06:13 -0400 (EDT) X-Authentication-Warning: april.chuckr.org: chuckr owned process doing -bs Date: Mon, 23 Sep 2002 10:06:12 -0400 (EDT) From: Chuck Robey To: Roman Neuhauser Cc: Subject: Re: two make questions In-Reply-To: <20020923133431.GZ30361@freepuppy.bellavista.cz> Message-ID: <20020923095217.O332-100000@april.chuckr.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 23 Sep 2002, Roman Neuhauser wrote: > Hi, > > I've sent two messages about (p)make to questions@ but have not received > any replies, so I ask here. > > I'm not a C programmer (thus not really familiar with make), and I'm > trying to use it for project management (we write apps in php). I've > stumbled across a few variable related issues where the actual behavior > doesn't exactly map to the available documentation (make(1), and the > pmake paper). See the messages below for complete descriptions. > > Also, since two attempts sent to this list before I subscribed haven't > make it through and I'm not sure about the cause, I'm just posting > links to the original messages in questions@: > > http://marc.theaimsgroup.com/?l=freebsd-questions&m=103250565427752&w=2 > http://marc.theaimsgroup.com/?l=freebsd-questions&m=103251441702280&w=2 You're trying to treat the make variables as program variables, and that doesn't work, once you assign a value to them, that's the value you get. They *do not* work like variables in C or Basic. The rule to follow is never to attempt to modify a value in a variable. If you need that specific action, either use the ".for" type constructs, else use shell variables, which will let you do that. ---------------------------------------------------------------------------- Chuck Robey | Interests include C & Java programming, FreeBSD, chuckr@chuckr.org | electronics, communications, and signal processing. New Year's Resolution: I will not sphroxify gullible people into looking up fictitious words in the dictionary. ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 7:35:30 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6909F37B401 for ; Mon, 23 Sep 2002 07:35:28 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 182B243E42 for ; Mon, 23 Sep 2002 07:35:27 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 12080 invoked from network); 23 Sep 2002 14:35:25 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 23 Sep 2002 14:35:25 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 91A462FDAB2; Mon, 23 Sep 2002 16:35:23 +0200 (CEST) Date: Mon, 23 Sep 2002 16:35:23 +0200 From: Roman Neuhauser To: Chuck Robey Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: two make questions Message-ID: <20020923143523.GA30361@freepuppy.bellavista.cz> Mail-Followup-To: Chuck Robey , freebsd-hackers@FreeBSD.ORG References: <20020923133431.GZ30361@freepuppy.bellavista.cz> <20020923095217.O332-100000@april.chuckr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020923095217.O332-100000@april.chuckr.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG # chuckr@chuckr.org / 2002-09-23 10:06:12 -0400: > On Mon, 23 Sep 2002, Roman Neuhauser wrote: > > I'm not a C programmer (thus not really familiar with make), and I'm > > trying to use it for project management (we write apps in php). I've > > stumbled across a few variable related issues where the actual behavior > > doesn't exactly map to the available documentation (make(1), and the > > pmake paper). See the messages below for complete descriptions. > > http://marc.theaimsgroup.com/?l=freebsd-questions&m=103250565427752&w=2 > > http://marc.theaimsgroup.com/?l=freebsd-questions&m=103251441702280&w=2 > > You're trying to treat the make variables as program variables, and that > doesn't work, once you assign a value to them, that's the value you get. > They *do not* work like variables in C or Basic. The rule to follow is > never to attempt to modify a value in a variable. If you need that > specific action, either use the ".for" type constructs, else use shell > variables, which will let you do that. Chuck, thanks a lot for your reply. You're right: I'm viewing Makefiles as sequential programs, which obviously (even to me) is not quite true, but I'm having difficulty getting rid of this. Now, saying "don't do it" is nice, but I'd like to know why. Why doesn't this work? Also, what documentation (besides the source) is there that covers variable scopes? See the second message for the problem description. I can fix the behavior with conditional assignment to DESTDIR (?=) in the Makefile, but still would like to understand what's causing make to behave the way it does. Again, thanks, and HAND. Also, I couldn't find on freebsd.org whether it's required to group-reply on hackers@ (as it is on questions@), so I'm cc'ing you. Sorry if this is not required. You don't need to cc me either way. Roman -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 4:17PM up 5 days, 23:32, 22 users, load averages: 0.03, 0.11, 0.07 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 8: 5:41 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D90537B401 for ; Mon, 23 Sep 2002 08:05:40 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 688DA43E65 for ; Mon, 23 Sep 2002 08:05:39 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 12355 invoked from network); 23 Sep 2002 15:05:37 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 23 Sep 2002 15:05:37 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 18F762FDAB2; Mon, 23 Sep 2002 17:05:37 +0200 (CEST) Date: Mon, 23 Sep 2002 17:05:36 +0200 From: Roman Neuhauser To: freebsd-hackers@freebsd.org Subject: periodic(8)-produced diffs Message-ID: <20020923150536.GB30361@freepuppy.bellavista.cz> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [repost from questions@; no replies received since 2002-09-17] Hi there, various /etc/periodic scripts mail root diffs of a few config files etc. grep on my (quite fresh) STABLE box shows that except for /etc/periodic/daily/210.backup-aliases, all the diff invocations use the old format. I have two issues with this: first, all the diffs should be in the same format, and second, root should be able to select their preferred format in /etc/periodic.conf (yes, i have difficulty reading anything but unified diffs). Now, before I go and produce a patch, would such a change be actually welcome, or am I going to get shot down? And, what would the preferred interface be? Most of periodic.conf knobs are bools, but I'm not sure diff_{context,traditional,unified}_format="{YES,NO}" is better than diff_format="{context,traditional,unified}" What do you think? -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 5:03PM up 6 days, 18 mins, 22 users, load averages: 0.03, 0.11, 0.08 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 8:11:43 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3D2837B401 for ; Mon, 23 Sep 2002 08:11:41 -0700 (PDT) Received: from insomnia.spc.org (insomnia.spc.org [195.224.94.183]) by mx1.FreeBSD.org (Postfix) with SMTP id E635943E3B for ; Mon, 23 Sep 2002 08:11:40 -0700 (PDT) (envelope-from bms@insomnia.spc.org) Received: (qmail 5995 invoked by uid 1031); 23 Sep 2002 15:08:12 -0000 Date: Mon, 23 Sep 2002 16:08:11 +0100 From: Bruce M Simpson To: Roman Neuhauser Cc: Chuck Robey , freebsd-hackers@FreeBSD.ORG Subject: Re: two make questions Message-ID: <20020923150811.GI23343@spc.org> Mail-Followup-To: Bruce M Simpson , Roman Neuhauser , Chuck Robey , freebsd-hackers@FreeBSD.ORG References: <20020923133431.GZ30361@freepuppy.bellavista.cz> <20020923095217.O332-100000@april.chuckr.org> <20020923143523.GA30361@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020923143523.GA30361@freepuppy.bellavista.cz> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 23, 2002 at 04:35:23PM +0200, Roman Neuhauser wrote: > thanks a lot for your reply. You're right: I'm viewing Makefiles > as sequential programs, which obviously (even to me) is not quite > true, but I'm having difficulty getting rid of this. Yeah, it takes a bit of getting used to. Make lets you define a dependency graph, and various transformations/instructions that can be applied to each node in that graph. In that respect it's more like a Caesar salad, the dependencies are the lettuce and the variables are croutons. Making it work is the dressing; you have to add it yourself ;-) "Managing Projects with Make" from O'Reilly is a good introduction but it's a tad dated. Also, make has a habit of being different from one platform to the next. I particularly like the BSD pmake, but Solaris make is different still, and GNU make is a law unto itself. > Now, saying "don't do it" is nice, but I'd like to know why. Why > doesn't this work? Also, what documentation (besides the source) is > there that covers variable scopes? See the second message for the > problem description. The scope of a Makefile macro (variable) seems to be limited to the current invocation, unless you explicitly export things as environment variables, or set them on a command line when re-invoking Make. Depending on what you want to do this can get quite complicated. Have a look at /usr/src/Makefile which actually reinvokes itself quite a bit (and includes things from Makefile.inc which may *also* do that!). Nik Clayton mentioned a tool to automatically diagram makefile dependency graphs by target at the last FreeBSD UKUG meeting, using graphviz, but I can't recall its name. > I can fix the behavior with conditional assignment to DESTDIR (?=) > in the Makefile, but still would like to understand what's causing > make to behave the way it does. If you're including any standard makefile templates you may wish to review those; as well as /etc/make.conf and /etc/defaults/make.conf. You probably also want to look at the MAKEOBJDIRPREFIX behaviour in the make(1) man page. BMS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 8:14:29 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 339FE37B401 for ; Mon, 23 Sep 2002 08:14:28 -0700 (PDT) Received: from insomnia.spc.org (insomnia.spc.org [195.224.94.183]) by mx1.FreeBSD.org (Postfix) with SMTP id 2D75D43E77 for ; Mon, 23 Sep 2002 08:14:27 -0700 (PDT) (envelope-from bms@insomnia.spc.org) Received: (qmail 28927 invoked by uid 1031); 23 Sep 2002 15:10:59 -0000 Date: Mon, 23 Sep 2002 16:10:59 +0100 From: Bruce M Simpson To: Roman Neuhauser Cc: freebsd-hackers@freebsd.org Subject: Re: periodic(8)-produced diffs Message-ID: <20020923151059.GJ23343@spc.org> Mail-Followup-To: Bruce M Simpson , Roman Neuhauser , freebsd-hackers@freebsd.org References: <20020923150536.GB30361@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020923150536.GB30361@freepuppy.bellavista.cz> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 23, 2002 at 05:05:36PM +0200, Roman Neuhauser wrote: [... re periodic diffs] > And, what would the preferred interface be? Most of periodic.conf knobs > are bools, but I'm not sure > diff_{context,traditional,unified}_format="{YES,NO}" > is better than > diff_format="{context,traditional,unified}" No reason why rc.conf knobs *have* to be bools, what ultimately matters is the case...esac which parses them. I'd avoid relying on a default value in /etc/defaults/rc.conf for the sake of robustness. I prefer unified diffs, personally. BMS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 8:35:26 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AE3A37B401 for ; Mon, 23 Sep 2002 08:35:23 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 4DB0643E3B for ; Mon, 23 Sep 2002 08:35:22 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 12583 invoked from network); 23 Sep 2002 15:35:20 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 23 Sep 2002 15:35:20 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 94F932FDAB2; Mon, 23 Sep 2002 17:35:16 +0200 (CEST) Date: Mon, 23 Sep 2002 17:35:16 +0200 From: Roman Neuhauser To: Bruce M Simpson , freebsd-hackers@FreeBSD.ORG Subject: Re: two make questions Message-ID: <20020923153516.GC30361@freepuppy.bellavista.cz> Mail-Followup-To: Bruce M Simpson , freebsd-hackers@FreeBSD.ORG References: <20020923133431.GZ30361@freepuppy.bellavista.cz> <20020923095217.O332-100000@april.chuckr.org> <20020923143523.GA30361@freepuppy.bellavista.cz> <20020923150811.GI23343@spc.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020923150811.GI23343@spc.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG # bms@spc.org / 2002-09-23 16:08:11 +0100: > On Mon, Sep 23, 2002 at 04:35:23PM +0200, Roman Neuhauser wrote: > > thanks a lot for your reply. You're right: I'm viewing Makefiles > > as sequential programs, which obviously (even to me) is not quite > > true, but I'm having difficulty getting rid of this. > > Yeah, it takes a bit of getting used to. Make lets you define a dependency > graph, and various transformations/instructions that can be applied to > each node in that graph. In that respect it's more like a Caesar salad, > the dependencies are the lettuce and the variables are croutons. Making it > work is the dressing; you have to add it yourself ;-) :) > "Managing Projects with Make" from O'Reilly is a good introduction but it's > a tad dated. yeah, i'll be ordering it shortly. > Also, make has a habit of being different from one platform to the > next. I particularly like the BSD pmake, but Solaris make is different > still, and GNU make is a law unto itself. i know. i'm limiting myself to pmake atm, so other implementations are out of the scope of my questions. > > Now, saying "don't do it" is nice, but I'd like to know why. Why > > doesn't this work? Also, what documentation (besides the source) is > > there that covers variable scopes? See the second message for the > > problem description. > > The scope of a Makefile macro (variable) seems to be limited to the current > invocation, ? see below > unless you explicitly export things as environment variables, > or set them on a command line when re-invoking Make. i'm not sure what to take of this. consider this makefile: DESTDIR= SOURCES= foo bar baz TARGETS:= ${SOURCES:C;^;${DESTDIR}/;} SRCFILE= ${.TARGET:C,^${DESTDIR}/,,} .BEGIN: @echo "\$${DESTDIR}: ${DESTDIR}" @echo "\$${TARGETS}: ${TARGETS}" all: ${TARGETS} ${TARGETS}: ${SRCFILE} @echo "SRC: ${SRCFILE} -> TGT: ${.TARGET}" .PHONY: all ${TARGETS} roman@freepuppy ~/tmp 1133:0 > make all DESTDIR=/tmp/maketest ${DESTDIR}: /tmp/maketest ${TARGETS}: /foo /bar /baz Graph cycles through /foo Graph cycles through /bar Graph cycles through /baz `all' not remade because of errors. roman@freepuppy ~/tmp 1133:0 > in the invocation above, the commandline assignment overrode the Makefile value of DESTDIR in the .BEGIN target, but not outside it (or presumably any target), in the ${TARGETS} and ${SRCFILE} macros. So: what exactly do you mean by "the current invocation"? > Depending on what you want to do this can get quite complicated. Have > a look at /usr/src/Makefile which actually reinvokes itself quite a > bit (and includes things from Makefile.inc which may *also* do that!). I've had more than a few looks in /usr/ports/Mk/bsd.port.mk, but getting the "building block" principles from something that complicated is not easy. > Nik Clayton mentioned a tool to automatically diagram makefile dependency > graphs by target at the last FreeBSD UKUG meeting, using graphviz, but I > can't recall its name. I'll google, thanks. > > I can fix the behavior with conditional assignment to DESTDIR (?=) > > in the Makefile, but still would like to understand what's causing > > make to behave the way it does. > > If you're including any standard makefile templates you may wish to > review those; as well as /etc/make.conf and /etc/defaults/make.conf. nothing like that. my Makefiles break withoug the need for this stuff. :) > You probably also want to look at the MAKEOBJDIRPREFIX behaviour in > the make(1) man page. will do so. thanks! -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 5:23PM up 6 days, 38 mins, 22 users, load averages: 0.11, 0.07, 0.04 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 10: 9:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D92637B401 for ; Mon, 23 Sep 2002 10:09:07 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 0624C43E6A for ; Mon, 23 Sep 2002 10:09:05 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 13384 invoked from network); 23 Sep 2002 17:08:57 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 23 Sep 2002 17:08:57 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 5887C2FDAB2; Mon, 23 Sep 2002 19:08:55 +0200 (CEST) Date: Mon, 23 Sep 2002 19:08:55 +0200 From: Roman Neuhauser To: freebsd-hackers@freebsd.org Subject: Re: two make questions Message-ID: <20020923170855.GE30361@freepuppy.bellavista.cz> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20020923133431.GZ30361@freepuppy.bellavista.cz> <20020923095217.O332-100000@april.chuckr.org> <20020923143523.GA30361@freepuppy.bellavista.cz> <20020923150811.GI23343@spc.org> <20020923153516.GC30361@freepuppy.bellavista.cz> <20020923103554.A21087@newton.issci.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020923103554.A21087@newton.issci.ca> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [sent only to Chad by mistake] # davidc@issci.ca / 2002-09-23 10:35:54 -0600: > On Mon, Sep 23, 2002 at 05:35:16PM +0200, Roman Neuhauser wrote: > > > unless you explicitly export things as environment variables, > > > or set them on a command line when re-invoking Make. > > > > i'm not sure what to take of this. consider this makefile: > > > > DESTDIR= > > SOURCES= foo bar baz > > TARGETS:= ${SOURCES:C;^;${DESTDIR}/;} > > SRCFILE= ${.TARGET:C,^${DESTDIR}/,,} > > > > .BEGIN: > > @echo "\$${DESTDIR}: ${DESTDIR}" > > @echo "\$${TARGETS}: ${TARGETS}" > > > > all: ${TARGETS} > > > > ${TARGETS}: ${SRCFILE} > > @echo "SRC: ${SRCFILE} -> TGT: ${.TARGET}" > > > > .PHONY: all ${TARGETS} > > > > roman@freepuppy ~/tmp 1133:0 > make all DESTDIR=/tmp/maketest > > ${DESTDIR}: /tmp/maketest > > ${TARGETS}: /foo /bar /baz > > Graph cycles through /foo > > > > Graph cycles through /bar > > > > Graph cycles through /baz > > > > `all' not remade because of errors. > > roman@freepuppy ~/tmp 1133:0 > > > How about something like this: > > #DESTDIR= This overrides the command line setting. As I said earlier, with DESTDIR= in the Makefile, .BEGIN still displays the value passed on the command line. These two things (your statement, and the observed behavior) seem to contradict each other. Wait, I know the assignment in my Makefile overrides the commandline assignment: but only outside targets. I just wanted to point out that going into a bit more detail can save quite an amount of confusion. :) > #DESTDIR?= /my/default might work better? > > SOURCES= foo bar baz > TARGETS:= ${SOURCES:C;^;${DESTDIR}/;} > > # Note: SRCFILE is evaluated at startup, which results in "" as .TARGET > # is not yet defined, and then it is evaluated in each target.. yup, per the man page. > # Note that DESTDIR will be overriden by the define at the top by the > # time we get into a target. i'm not sure i'm reading this right, but if i am, you're saying the opposite of what i'm seeing: DESTDIR is overriden by the command line assignment. [further explanation snipped] > Good luck, and I hope that helps. you bet! awesome, thanks! > > > Nik Clayton mentioned a tool to automatically diagram makefile dependency > > > graphs by target at the last FreeBSD UKUG meeting, using graphviz, but I > > > can't recall its name. > > > > I'll google, thanks. > > Let me know if you find this :) yeah, i'm aware i don't have much to google for. :) btw, i'm sure i'll run into other delicate features in pmake. is it okay for me to continue asking here? questions@ doesn't seem to be *the* place. -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 6:49PM up 6 days, 2:04, 29 users, load averages: 0.00, 0.04, 0.06 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 10: 9:14 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75DAF37B406 for ; Mon, 23 Sep 2002 10:09:10 -0700 (PDT) Received: from april.chuckr.org (april.chuckr.org [66.92.147.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 680F643E6E for ; Mon, 23 Sep 2002 10:09:09 -0700 (PDT) (envelope-from chuckr@chuckr.org) Received: from april.chuckr.org (localhost [127.0.0.1]) by april.chuckr.org (8.12.6/8.12.5) with ESMTP id g8NH875s048453; Mon, 23 Sep 2002 13:08:07 -0400 (EDT) (envelope-from chuckr@chuckr.org) Received: from localhost (chuckr@localhost) by april.chuckr.org (8.12.6/8.12.5/Submit) with ESMTP id g8NH85OG048450; Mon, 23 Sep 2002 13:08:06 -0400 (EDT) X-Authentication-Warning: april.chuckr.org: chuckr owned process doing -bs Date: Mon, 23 Sep 2002 13:08:04 -0400 (EDT) From: Chuck Robey To: Roman Neuhauser Cc: Subject: Re: two make questions In-Reply-To: <20020923143523.GA30361@freepuppy.bellavista.cz> Message-ID: <20020923130006.N332-100000@april.chuckr.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 23 Sep 2002, Roman Neuhauser wrote: > # chuckr@chuckr.org / 2002-09-23 10:06:12 -0400: > > On Mon, 23 Sep 2002, Roman Neuhauser wrote: > > > > I'm not a C programmer (thus not really familiar with make), and I'm I am a C programmer, and one of my strengths is that I know make pretty well. > > > trying to use it for project management (we write apps in php). I've > > > stumbled across a few variable related issues where the actual behavior > > > doesn't exactly map to the available documentation (make(1), and the > > > pmake paper). See the messages below for complete descriptions. > > > > http://marc.theaimsgroup.com/?l=freebsd-questions&m=103250565427752&w=2 > > > http://marc.theaimsgroup.com/?l=freebsd-questions&m=103251441702280&w=2 > > > > You're trying to treat the make variables as program variables, and that > > doesn't work, once you assign a value to them, that's the value you get. > > They *do not* work like variables in C or Basic. The rule to follow is > > never to attempt to modify a value in a variable. If you need that > > specific action, either use the ".for" type constructs, else use shell > > variables, which will let you do that. > > Chuck, > > thanks a lot for your reply. You're right: I'm viewing Makefiles > as sequential programs, which obviously (even to me) is not quite > true, but I'm having difficulty getting rid of this. > > Now, saying "don't do it" is nice, but I'd like to know why. Why > doesn't this work? Also, what documentation (besides the source) is > there that covers variable scopes? See the second message for the > problem description. Wish I could give you some satisfaction .... because "I've been there, done that". Unfortunately, you aren't going to find it. If you decide that the only thing that you can do is fix the docs, you won't even succeed there, because it will only raise a huge volume of complaints (seemingly endless nitpickers) all giving their own take on it, even though they won't fix it themselves. The only book there is on make is pretty pissed-poor, the make book from O'Reilly. I've been considering writing a book on the 3 main flavors of make for a while now .... I'm not convinced yet that there's a market for it. I'm pretty sure now, with all the horrible make projects I've undertaken, I could do it. > > I can fix the behavior with conditional assignment to DESTDIR (?=) > in the Makefile, but still would like to understand what's causing > make to behave the way it does. The odd behavior of variables is only one item from a whole list of them. Go take a look at what use: means, if you want a headache. Or, how about the behavior of "include", which *does* work, even though the man page says that only ".include" will work ("include" is compatible with both BSD make and GNU make, an important point.) When you don't have any problem with a file like bsd.port.mk, then you'll be able to claim to know make. > > Again, thanks, and HAND. > > Also, I couldn't find on freebsd.org whether it's required to > group-reply on hackers@ (as it is on questions@), so I'm cc'ing you. > Sorry if this is not required. You don't need to cc me either way. > > Roman > > ---------------------------------------------------------------------------- Chuck Robey | Interests include C & Java programming, FreeBSD, chuckr@chuckr.org | electronics, communications, and signal processing. New Year's Resolution: I will not sphroxify gullible people into looking up fictitious words in the dictionary. ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 11:23:58 2002 Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 96AB537B401; Mon, 23 Sep 2002 11:23:57 -0700 (PDT) Date: Mon, 23 Sep 2002 11:23:57 -0700 From: Juli Mallett To: Lamont Granquist Cc: Paul Schenkeveld , FreeBSD Hackers Subject: Re: Just a wild idea Message-ID: <20020923112355.A53617@FreeBSD.org> References: <20020922213311.A99425@FreeBSD.org> <20020923023031.D7466-100000@coredump.scriptkiddie.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020923023031.D7466-100000@coredump.scriptkiddie.org>; from lamont@scriptkiddie.org on Mon, Sep 23, 2002 at 02:37:31AM -0700 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-LiveJournal: flata, jmallett X-Negacore: Yes Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Lamont Granquist [ Data: 2002-09-23 ] [ Subjecte: Re: Just a wild idea ] > > On Sun, 22 Sep 2002, Juli Mallett wrote: > > Maybe just replace all suser(9) uses with MAC credential checks, and > > install MAC_UNIX by default, which would be set up to behave like > > ye olden UNIX... Who knows. > > Something like that sounds like a really good idea. I'd like to see this > not only for binding to low ports but also, for example, to set the system > time -- this would let you run ntpd as non-root. > > It'd be interesting to have a system one day where once you've gone past > single user mode, root drops all its privs and acts just like a normal > user account and daemon accounts only have special privs handed out to > them in little chunks. One day? It's really easy to do, especially once you have a way for init to set privs for the children easily, and you can just have your rc scripts work with init. -- Juli Mallett | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger jmallett@FreeBSD.org http://people.FreeBSD.org/~jmallett/ | Support my FreeBSD hacking! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 11:41:28 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFD3D37B401; Mon, 23 Sep 2002 11:41:22 -0700 (PDT) Received: from carbon.berkeley.netdot.net (carbon.berkeley.netdot.net [216.27.190.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 589B943E65; Mon, 23 Sep 2002 11:41:22 -0700 (PDT) (envelope-from nick@netdot.net) Received: by carbon.berkeley.netdot.net (Postfix, from userid 101) id D66CAF851; Mon, 23 Sep 2002 11:41:21 -0700 (PDT) Date: Mon, 23 Sep 2002 11:41:21 -0700 From: Nicholas Esborn To: Lowell Gilbert Cc: Kris Kennaway , freebsd-questions@FreeBSD.ORG, freebsd-hackers@freebsd.org Subject: Re: Practical limit for pre-loaded md_image size? Message-ID: <20020923184121.GA65376@carbon.berkeley.netdot.net> References: <20020922081120.GA54982@carbon.berkeley.netdot.net> <20020922181917.GB46345@xor.obsecurity.org> <20020922201441.GB54982@carbon.berkeley.netdot.net> <441y7ksho4.fsf@be-well.ilk.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <441y7ksho4.fsf@be-well.ilk.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I'm copying this to -hackers as well. I tried setting the MD_NSECT to 307200 to accomodate my RAM disk, but according to md(4): At boot time the md driver will search for pre-loaded modules of type `md_image' and instantiate a md device for each of these modules. The type `mfs_root' is also allowed for backward compatibility. These devices are backed by the RAM reserved by the loader(8), and as such not limited by the malloc(9) size constraints. I am preloading the images using the md_image variable in loader.conf, so this documentation thinks I *should* be fine. The kernel with MD_NSECT set to 307200 still failed to boot with my 128MB md_image. I'm attaching my kernel config. -nick On Mon, Sep 23, 2002 at 02:08:11PM -0400, Lowell Gilbert wrote: > Nicholas Esborn writes: > > > I've tried this on two machines: > > > > 1 4.7-RC w/ 512 MB of RAM > > 2 5.0-CURRENT w/ 256 MB of RAM > > > > Both behave the same way with a ~128MB md_image. > > Did you check the manual? It says: "The default maximum size of a md > disk backed by malloc(9) is 20,000 sectors of 512 bytes each. This > can be changed with the kernel option MD_NSECT." > > > -nick > > > > On Sun, Sep 22, 2002 at 11:19:18AM -0700, Kris Kennaway wrote: > > > On Sun, Sep 22, 2002 at 01:11:20AM -0700, Nicholas Esborn wrote: > > > > Hello, > > > > > > > > I've been trying to boot a kernel and a preloaded md_image of about 128MB. > > > > > > > > The kernel and image load, and then about a quarter of a second after the > > > > kernel executes, before any text even prints, the machine reboots. > > > > > > > > Has anyone had better luck with large md_image root filesystems? > > > > > > You forgot to mention how much RAM you have, and what FreeBSD version. -- Nicholas Esborn Unix Systems Administrator Berkeley, California --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=COPPERX # # COPPER # Tue Apr 23 05:41:01 GMT 2002 # nick # # Based on $FreeBSD: src/sys/i386/conf/GENERIC,v 1.246.2.40 2002/03/27 02:16:26 dd Exp $ machine i386 cpu I686_CPU ident COPPERX maxusers 0 options HZ=1000 #increase clock resolution for polling options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem options FFS_ROOT #FFS usable as root device [keep this!] options SOFTUPDATES #Enable FFS soft updates support options UFS_DIRHASH #Improve performance on big directories options MFS #Memory Filesystem options MD_ROOT #MD is a potential root device options MD_NSECT=307200 #Maxium MD size options NFS #Network Filesystem options NFS_ROOT #NFS usable as root device, NFS required options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options CD9660_ROOT #CD-ROM usable as root, CD9660 required options PROCFS #Process filesystem options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI options UCONSOLE #Allow users to grab the console options USERCONFIG #boot -c editor options VISUAL_USERCONFIG #visual boot -c editor options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options P1003_1B #Posix P1003_1B real-time extensions options _KPOSIX_PRIORITY_SCHEDULING options ICMP_BANDLIM #Rate limit bad replies options KBD_INSTALL_CDEV # install a CDEV entry in /dev options CPU_ENABLE_SSE options CPU_ATHLON_SSE_HACK #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 #options BOOTP_COMPAT options IPSEC options IPSEC_ESP options IPSEC_DEBUG options IPFILTER options IPFILTER_LOG options DEVICE_POLLING device isa device pci # Floppy drives device fdc0 at isa? port IO_FD1 irq 6 drq 2 device fd0 at fdc0 drive 0 # ATA and ATAPI devices device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives device atapist # ATAPI tape drives options ATA_STATIC_ID #Static device numbering # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices # SCSI peripherals device scbus # SCSI bus (required) device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD device pass # Passthrough device (direct SCSI access) # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc0 at isa? port IO_KBD device atkbd0 at atkbdc? irq 1 flags 0x1 device psm0 at atkbdc? irq 12 device vga0 at isa? # splash screen/screen saver pseudo-device splash # syscons is the default console driver, resembling an SCO console device sc0 at isa? flags 0x100 # Floating point support - do not disable. device npx0 at nexus? port IO_NPX irq 13 # Serial (COM) ports device sio0 at isa? port IO_COM1 flags 0x10 irq 4 device sio1 at isa? port IO_COM2 irq 3 # Parallel port device ppc0 at isa? irq 7 device ppbus # Parallel port bus (required) device lpt # Printer #device plip # TCP/IP over parallel device ppi # Parallel port interface device #device vpo # Requires scbus and da # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) device vr # VIA Rhine, Rhine II device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # Pseudo devices - the number indicates how many units to allocate. pseudo-device loop # Network loopback pseudo-device ether # Ethernet support pseudo-device pty # Pseudo-ttys (telnet etc) pseudo-device md # Memory "disks" # The `bpf' pseudo-device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! pseudo-device bpf #Berkeley packet filter # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) device ugen # Generic device uhid # "Human Interface Devices" device ukbd # Keyboard device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse # USB Ethernet, requires mii device aue # ADMtek USB ethernet device cue # CATC USB ethernet device kue # Kawasaki LSI USB ethernet device smbus device iicbus device iicbb device ic device iic device iicsmb device smb device viapm #device pcm device bktr --huq684BweRXVnRxX-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 11:44:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B79B37B404 for ; Mon, 23 Sep 2002 11:44:47 -0700 (PDT) Received: from a.mx.bsd.krakow.pl (gw.BSD.krakow.pl [62.121.128.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F94943E42 for ; Mon, 23 Sep 2002 11:44:46 -0700 (PDT) (envelope-from diavul@bsd.krakow.pl) Received: by a.mx.bsd.krakow.pl (Postfix, from userid 666) id 4F8661CAD9; Mon, 23 Sep 2002 20:44:47 +0200 (CEST) Date: Mon, 23 Sep 2002 20:44:47 +0200 From: =?iso-8859-2?Q?Micha=B3?= Belczyk To: freebsd-hackers@freebsd.org Subject: Re: Just a wild idea Message-ID: <20020923184447.GA14482@bsd.krakow.pl> References: <20020922161453.A13323@psconsult.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline In-Reply-To: <20020922161453.A13323@psconsult.nl> User-Agent: Mutt/1.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --SUOF0GtieIMvvwua Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 22, 2002 at 04:14:53PM +0200, Paul Schenkeveld wrote: > I've been playing with jails for over 2 years now. I really like > them but we often use them to run a process as root with reduced > power only to get access to TCP and UDP ports below 1024. >=20 > For many applications however, for example lpd, named, sendmail, > tac_plus and others, it would be more than good enough to run that > program as a normal, non-root user provided there is a way to bind > to that single low TCP and/or UDP port that the program needs access > to. >=20 Exactly. It would be great to have the capabilities implemented in -stable ;) I've written a kernel module for -stable You may be interested in. With it You can for example let specified euids bind to the reserved TCP/UDP ports. It's fully managed via sysctl. It also doesn't affect jails. It's still under development but I use it e.g. to let my non-root chrootuided syslogd bind to its port :) All the effort is in fact sysctl fgc.net_bind.udp.acl=3D[60514:514] where 60514 is syslogd user's uid. The crazy syslogd story is here: http://bsd.krakow.pl/syslogd.html and the fgc sources.. cvs -d:pserver:cvs@bsd.krakow.pl:/cvs/fgc co fgc You may also consider using the TrustedBSD-cap stuff and give the syslogd binary CAP_NET_BIND_SERVICE capability.. but that's still -current. Another possibility of giving a regular user some of the superuser powers is CerbNG (http://cerber.sourceforge.net), but I'm not sure if Pawel has already implemented the bind() stuff.. It's definetely more advanced and more complete security solution for -stable than my per euid/per group capabilities and it's also still under development. With that You can create per binary security policies including restricting access to selected syscalls and granting additional access to other, superuser-reserved syscalls. =2E. and probably many other things that I'm not aware of :)) --=20 Micha=B3 Belczyk --SUOF0GtieIMvvwua Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9j2Effe5awv+mgJoRAt4yAJ94eUSWFqaAu9R3+32ETl2Gerd0IACeMF/5 cHsffCOGYU0v7rd01QDpZjc= =IECp -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 16:55:16 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E23937B401 for ; Mon, 23 Sep 2002 16:55:15 -0700 (PDT) Received: from txsmtp02.texas.rr.com (smtp2.texas.rr.com [24.93.36.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8779D43E6A for ; Mon, 23 Sep 2002 16:55:13 -0700 (PDT) (envelope-from shocking@houston.rr.com) Received: from bleep.craftncomp.com (cs662552-58.houston.rr.com [66.25.52.58]) by txsmtp02.texas.rr.com (8.12.5/8.12.2) with ESMTP id g8NNssRg008040 for ; Mon, 23 Sep 2002 19:54:54 -0400 (EDT) Received: from houston.rr.com (IDENT:dZZozG8OaFLpK6PBpKDOSgWYZh3OJuQL@boggle.craftncomp.com [202.12.111.2]) by bleep.craftncomp.com (8.12.6/8.12.3) with ESMTP id g8NNtBVO098226 for ; Mon, 23 Sep 2002 18:55:12 -0500 (CDT) (envelope-from shocking@houston.rr.com) Received: from boggle.craftncomp.com (shocking@localhost) by houston.rr.com (8.11.6/8.9.3) with ESMTP id g8NNtAc12819 for ; Mon, 23 Sep 2002 18:55:11 -0500 (envelope-from shocking@boggle.craftncomp.com) Message-Id: <200209232355.g8NNtAc12819@houston.rr.com> X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 To: hackers@freebsd.org Subject: Which archiver handles the ICE format? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 23 Sep 2002 18:55:10 -0500 From: Stephen Hocking Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm wanting to extract data files off the original Quake 1 CD..... Stephen -- The views expressed above are not those of PGS Tensor. "We've heard that a million monkeys at a million keyboards could produce the Complete Works of Shakespeare; now, thanks to the Internet, we know this is not true." Robert Wilensky, University of California To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 19:21:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2E7E37B401 for ; Mon, 23 Sep 2002 19:21:31 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42D9743E42 for ; Mon, 23 Sep 2002 19:21:31 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.5) id g8O2LRVS067187; Mon, 23 Sep 2002 21:21:27 -0500 (CDT) (envelope-from dan) Date: Mon, 23 Sep 2002 21:21:27 -0500 From: Dan Nelson To: Stephen Hocking Cc: hackers@FreeBSD.ORG Subject: Re: Which archiver handles the ICE format? Message-ID: <20020924022127.GA55052@dan.emsphone.com> References: <200209232355.g8NNtAc12819@houston.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200209232355.g8NNtAc12819@houston.rr.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Sep 23), Stephen Hocking said: > I'm wanting to extract data files off the original Quake 1 CD..... Lets just take a look see... All deice does is join the numbered files together, then execute the result. quake101.1 and quake101.2 are in self-extracting LHA format; ports/archivers/lha will extract them. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 23 23:34:52 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE97137B401 for ; Mon, 23 Sep 2002 23:34:50 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 8D90943E77 for ; Mon, 23 Sep 2002 23:34:49 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 19055 invoked from network); 24 Sep 2002 06:34:47 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 24 Sep 2002 06:34:47 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id B77B62FDAB2; Tue, 24 Sep 2002 08:34:39 +0200 (CEST) Date: Tue, 24 Sep 2002 08:34:39 +0200 From: Roman Neuhauser To: Chuck Robey Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: two make questions Message-ID: <20020924063439.GJ30361@freepuppy.bellavista.cz> Mail-Followup-To: Chuck Robey , freebsd-hackers@FreeBSD.ORG References: <20020923143523.GA30361@freepuppy.bellavista.cz> <20020923130006.N332-100000@april.chuckr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020923130006.N332-100000@april.chuckr.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG # chuckr@chuckr.org / 2002-09-23 13:08:04 -0400: > On Mon, 23 Sep 2002, Roman Neuhauser wrote: > > Now, saying "don't do it" is nice, but I'd like to know why. > > Why doesn't this work? Also, what documentation (besides the > > source) is there that covers variable scopes? See the second > > message for the problem description. > > Wish I could give you some satisfaction .... because "I've been there, > done that". Unfortunately, you aren't going to find it. If you > decide that the only thing that you can do is fix the docs, you won't > even succeed there, because it will only raise a huge volume of > complaints (seemingly endless nitpickers) all giving their own take on > it, even though they won't fix it themselves. quite common. :| i think i might even try it some day, provided my better understanding of make i hope to gain won't cause me to lose motivation. > The only book there is on make is pretty pissed-poor, the make book > from O'Reilly. I've been considering writing a book on the 3 main > flavors of make for a while now .... I'm not convinced yet that > there's a market for it. I'm pretty sure now, with all the horrible > make projects I've undertaken, I could do it. i say go for it. :) > The odd behavior of variables is only one item from a whole list of > them. Go take a look at what use: means, if you want a headache. Or, > how about the behavior of "include", which *does* work, even though > the man page says that only ".include" will work ("include" is > compatible with both BSD make and GNU make, an important point.) can't this be fixed? i mean, perfect wording is important, but complete coverage of features is even more, even if not spelled out in the best way, no? :) > When you don't have any problem with a file like bsd.port.mk, then > you'll be able to claim to know make. yeah, figured that much. the post to hackers@ has really paid off, i already learnt quite a few things about make. -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 8:21AM up 6 days, 15:36, 29 users, load averages: 0.00, 0.02, 0.00 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Tue Sep 24 4: 1:48 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19F4537B404 for ; Tue, 24 Sep 2002 04:01:42 -0700 (PDT) Received: from sofia.digsys.bg (sofia.digsys.bg [193.68.3.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C6F043E77 for ; Tue, 24 Sep 2002 04:01:25 -0700 (PDT) (envelope-from alalev@uni-svishtov.bg) Received: from ns.uni-svishtov.bg (ns.uni-svishtov.bg [193.68.172.1]) by sofia.digsys.bg (8.9.0/8.9.0) with ESMTP id OAA16536 for ; Tue, 24 Sep 2002 14:01:18 +0300 (EEST) Received: from mail.uni-svishtov.bg (grinch.uni-svishtov.bg [193.68.172.9]) by ns.uni-svishtov.bg (8.12.3/8.12.3) with ESMTP id g8OB1H0j008521 for ; Tue, 24 Sep 2002 14:01:17 +0300 (EEST) (envelope-from alalev@uni-svishtov.bg) Received: from uni-svishtov.bg (lalev.uni-svishtov.bg [193.68.173.61]) by mail.uni-svishtov.bg (8.12.6/8.12.6) with ESMTP id g8OB1GjD070959 for ; Tue, 24 Sep 2002 14:01:17 +0300 (EEST) (envelope-from alalev@uni-svishtov.bg) Message-ID: <3D9045E1.7040302@uni-svishtov.bg> Date: Tue, 24 Sep 2002 14:00:49 +0300 From: Angelin Lazarov Lalev User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: What does this log mean (SCSI problem ?) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I think I have a problem. From time to tme, apparently when the disk activity of my IBM SCSI disk becomes higher, all disk operations are suspended for about 30 seconds. After that all continues ok, but the following log messages are written to the syslog. Is that normal? Sep 18 16:39:53 ns1 /kernel: (da0:ahc0:0:6:0): SCB 0x15 - timed out Sep 18 16:40:11 ns1 /kernel: ahc0: Dumping Card State in Data-out phase, at SEQADDR 0x8c Sep 18 16:40:11 ns1 /kernel: ACCUM = 0x0, SINDEX = 0x22, DINDEX = 0xe4, ARG_2 = 0x5 Sep 18 16:40:11 ns1 /kernel: HCNT = 0x0 SCBPTR = 0x12 Sep 18 16:40:11 ns1 /kernel: SCSISEQ = 0x12, SBLKCTL = 0xa Sep 18 16:40:11 ns1 /kernel: DFCNTRL = 0x2c, DFSTATUS = 0x82 Sep 18 16:40:11 ns1 /kernel: LASTPHASE = 0x0, SCSISIGI = 0x4, SXFRCTL0 = 0x80 Sep 18 16:40:11 ns1 /kernel: SSTAT0 = 0x0, SSTAT1 = 0x2 Sep 18 16:40:11 ns1 /kernel: STACK == 0x8a, 0x64, 0x165, 0x0 Sep 18 16:40:11 ns1 /kernel: SCB count = 30 Sep 18 16:40:11 ns1 /kernel: Kernel NEXTQSCB = 17 Sep 18 16:40:11 ns1 /kernel: Card NEXTQSCB = 29 Sep 18 16:40:11 ns1 /kernel: QINFIFO entries: 29 0 4 8 7 23 28 5 24 18 9 25 15 1 2 11 10 3 16 22 19 27 Sep 18 16:40:11 ns1 /kernel: Waiting Queue entries: Sep 18 16:40:11 ns1 /kernel: Disconnected Queue entries: Sep 18 16:40:11 ns1 /kernel: QOUTFIFO entries: Sep 18 16:40:11 ns1 /kernel: Sequencer Free SCB List: 11 25 9 26 19 23 28 12 20 22 21 2 5 0 10 8 14 16 3 15 1 4 6 7 17 24 27 13 29 30 31 Sep 18 16:40:11 ns1 /kernel: Sequencer SCB Info: 0(c 0x60, s 0x67, l 0, t 0xff) 1(c 0x60, s 0x67, l 0, t 0xff) 2(c 0x60, s 0x67, l 0, t 0xff) 3(c 0x60, s 0x67, l 0, t 0x ff) 4(c 0x60, s 0x67, l 0, t 0xff) 5(c 0x60, s 0x67, l 0, t 0xff) 6(c 0x60, s 0x67, l 0, t 0xff) 7(c 0x60, s 0x67, l 0, t 0xff) 8(c 0x60, s 0x67, l 0, t 0xff) 9(c 0x60, s 0x67, l 0, t 0xff) 10(c 0x60, s 0x67, l 0, t 0xff) 11(c 0x62, s 0x67, l 0, t 0xff) 12(c 0x60, s 0x67, l 0, t 0xff) 13(c 0x60, s 0x67, l 0, t 0xff) 14(c 0x60, s 0x67, l 0, t 0xff) 15(c 0x60, s 0x67, l 0, t 0xff) 16(c 0x60, s 0x67, l 0, t 0xff) 17(c 0x60, s 0x67, l 0, t 0xff) 18(c 0x60, s 0x67, l 0, t 0x15) 19(c 0x60, s 0x67, l 0, t 0xf f) 20(c 0x60, s 0x67, l 0, t 0xff) 21(c 0x60, s 0x67, l 0, t 0xff) 22(c 0x60, s 0x67, l 0, t 0xff) 23(c 0x60, s 0x67, l 0, t 0xff) 24(c 0x60, s 0x67, l 0, t 0xff) 25(c 0 x60, s 0x67, l 0, t 0xff) 26(c 0x60, s 0x67, l 0, t 0xff) 27(c 0x60, s 0x67, l 0, t 0xff) 28(c 0x60, s 0x67, l 0, t 0xff) 29(c 0x0, s 0x67, l 0, t 0xff) 30(c 0x0, s 0x67 , l 0, t 0xff) 31(c 0x0, s 0x6 Sep 18 16:40:11 ns1 /kernel: t 0xff) Sep 18 16:40:11 ns1 /kernel: Pending list: 27(c 0x60, s 0x67, l 0), 19(c 0x62, s 0x67, l 0), 22(c 0x60, s 0x67, l 0), 16(c 0x60, s 0x67, l 0), 3(c 0x60, s 0x67, l 0), 10 (c 0x60, s 0x67, l 0), 11(c 0x60, s 0x67, l 0), 2(c 0x60, s 0x67, l 0), 1(c 0x60, s 0x67, l 0), 15(c 0x60, s 0x67, l 0), 25(c 0x60, s 0x67, l 0), 9(c 0x60, s 0x67, l 0), 18(c 0x60, s 0x67, l 0), 24(c 0x60, s 0x67, l 0), 5(c 0x60, s 0x67, l 0), 28(c 0x60, s 0x67, l 0), 23(c 0x60, s 0x67, l 0), 7(c 0x60, s 0x67, l 0), 8(c 0x60, s 0x67, l 0), 4(c 0x60, s 0x67, l 0), 0(c 0x60, s 0x67, l 0), 29(c 0x60, s 0x67, l 0), 21(c 0x60, s 0x67, l 0) Sep 18 16:40:11 ns1 /kernel: Kernel Free SCB list: 12 6 26 20 14 13 Sep 18 16:40:11 ns1 /kernel: sg[0] - Addr 0x60f5000 : Length 4096 Sep 18 16:40:11 ns1 /kernel: sg[1] - Addr 0x6a16000 : Length 4096 Sep 18 16:40:12 ns1 /kernel: sg[2] - Addr 0x6077000 : Length 4096 Sep 18 16:40:12 ns1 /kernel: sg[3] - Addr 0x6778000 : Length 4096 Sep 18 16:40:12 ns1 /kernel: (da0:ahc0:0:6:0): BDR message in message buffer Sep 18 16:40:12 ns1 /kernel: (da0:ahc0:0:6:0): SCB 0x15 - timed out Sep 18 16:40:12 ns1 /kernel: ahc0: Dumping Card State in Data-out phase, at SEQADDR 0x8b Sep 18 16:40:12 ns1 /kernel: ACCUM = 0x0, SINDEX = 0x22, DINDEX = 0xe4, ARG_2 = 0x5 Sep 18 16:40:12 ns1 /kernel: HCNT = 0x0 SCBPTR = 0x12 Sep 18 16:40:12 ns1 /kernel: SCSISEQ = 0x12, SBLKCTL = 0xa Sep 18 16:40:12 ns1 /kernel: DFCNTRL = 0x2c, DFSTATUS = 0x82 Sep 18 16:40:12 ns1 /kernel: LASTPHASE = 0x0, SCSISIGI = 0x14, SXFRCTL0 = 0x80 Sep 18 16:40:12 ns1 /kernel: SSTAT0 = 0x0, SSTAT1 = 0x2 Sep 18 16:40:12 ns1 /kernel: STACK == 0x8a, 0x64, 0x165, 0x0 Sep 18 16:40:12 ns1 /kernel: SCB count = 30 Sep 18 16:40:12 ns1 /kernel: Kernel NEXTQSCB = 17 Sep 18 16:40:12 ns1 /kernel: Card NEXTQSCB = 29 Sep 18 16:40:12 ns1 /kernel: QINFIFO entries: 29 0 4 8 7 23 28 5 24 18 9 25 15 1 2 11 10 3 16 22 19 27 Sep 18 16:40:12 ns1 /kernel: Waiting Queue entries: Sep 18 16:40:12 ns1 /kernel: Disconnected Queue entries: Sep 18 16:40:12 ns1 /kernel: QOUTFIFO entries: Sep 18 16:40:12 ns1 /kernel: Sequencer Free SCB List: 11 25 9 26 19 23 28 12 20 22 21 2 5 0 10 8 14 16 3 15 1 4 6 7 17 24 27 13 29 30 31 Sep 18 16:40:12 ns1 /kernel: Sequencer SCB Info: 0(c 0x60, s 0x67, l 0, t 0xff) 1(c 0x60, s 0x67, l 0, t 0xff) 2(c 0x60, s 0x67, l 0, t 0xff) 3(c 0x60, s 0x67, l 0, t 0x ff) 4(c 0x60, s 0x67, l 0, t 0xff) 5(c 0x60, s 0x67, l 0, t 0xff) 6(c 0x60, s 0x67, l 0, t 0xff) 7(c 0x60, s 0x67, l 0, t 0xff) 8(c 0x60, s 0x67, l 0, t 0xff) 9(c 0x60, s 0x67, l 0, t 0xff) 10(c 0x60, s 0x67, l 0, t 0xff) 11(c 0x62, s 0x67, l 0, t 0xff) 12(c 0x60, s 0x67, l 0, t 0xff) 13(c 0x60, s 0x67, l 0, t 0xff) 14(c 0x60, s 0x67, l 0, t 0xff) 15(c 0x60, s 0x67, l 0, t 0xff) 16(c 0x60, s 0x67, l 0, t 0xff) 17(c 0x60, s 0x67, l 0, t 0xff) 18(c 0x60, s 0x67, l 0, t 0x15) 19(c 0x60, s 0x67, l 0, t 0xf f) 20(c 0x60, s 0x67, l 0, t 0xff) 21(c 0x60, s 0x67, l 0, t 0xff) 22(c 0x60, s 0x67, l 0, t 0xff) 23(c 0x60, s 0x67, l 0, t 0xff) 24(c 0x60, s 0x67, l 0, t 0xff) 25(c 0 x60, s 0x67, l 0, t 0xff) 26(c 0x60, s 0x67, l 0, t 0xff) 27(c 0x60, s 0x67, l 0, t 0xff) 28(c 0x60, s 0x67, l 0, t 0xff) 29(c 0x0, s 0x67, l 0, t 0xff) 30(c 0x0, s 0x67 , l 0, t 0xff) 31(c 0x0, s 0x6 Sep 18 16:40:12 ns1 /kernel: t 0xff) Sep 18 16:40:12 ns1 /kernel: Pending list: 27(c 0x60, s 0x67, l 0), 19(c 0x62, s 0x67, l 0), 22(c 0x60, s 0x67, l 0), 16(c 0x60, s 0x67, l 0), 3(c 0x60, s 0x67, l 0), 10 (c 0x60, s 0x67, l 0), 11(c 0x60, s 0x67, l 0), 2(c 0x60, s 0x67, l 0), 1(c 0x60, s 0x67, l 0), 15(c 0x60, s 0x67, l 0), 25(c 0x60, s 0x67, l 0), 9(c 0x60, s 0x67, l 0), 18(c 0x60, s 0x67, l 0), 24(c 0x60, s 0x67, l 0), 5(c 0x60, s 0x67, l 0), 28(c 0x60, s 0x67, l 0), 23(c 0x60, s 0x67, l 0), 7(c 0x60, s 0x67, l 0), 8(c 0x60, s 0x67, l 0), 4(c 0x60, s 0x67, l 0), 0(c 0x60, s 0x67, l 0), 29(c 0x60, s 0x67, l 0), 21(c 0x60, s 0x67, l 0) Sep 18 16:40:13 ns1 /kernel: Kernel Free SCB list: 12 6 26 20 14 13 Sep 18 16:40:13 ns1 /kernel: sg[0] - Addr 0x60f5000 : Length 4096 Sep 18 16:40:13 ns1 /kernel: sg[1] - Addr 0x6a16000 : Length 4096 Sep 18 16:40:13 ns1 /kernel: sg[2] - Addr 0x6077000 : Length 4096 Sep 18 16:40:13 ns1 /kernel: sg[3] - Addr 0x6778000 : Length 4096 Sep 18 16:40:13 ns1 /kernel: (da0:ahc0:0:6:0): no longer in timeout, status = 34b Sep 18 16:40:13 ns1 /kernel: ahc0: Issued Channel A Bus Reset. 23 SCBs aborted And this is what my kernel prints when I'm booting. Aug 21 10:07:39 ns1 /kernel: Copyright (c) 1992-2002 The FreeBSD Project. Aug 21 10:07:39 ns1 /kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 Aug 21 10:07:39 ns1 /kernel: The Regents of the University of California. All rights reserved. Aug 21 10:07:39 ns1 /kernel: FreeBSD 4.6.1-RELEASE-p7 #1: Fri Aug 2 16:04:44 EEST 2002 Aug 21 10:07:39 ns1 /kernel: root@lalev.uni-svishtov.bg:/usr/opt/obj/usr/opt/src/sys/GENERIC Aug 21 10:07:39 ns1 /kernel: Timecounter "i8254" frequency 1193182 Hz Aug 21 10:07:39 ns1 /kernel: CPU: Pentium III/Pentium III Xeon/Celeron (451.02-MHz 686-class CPU) Aug 21 10:07:39 ns1 /kernel: Origin = "GenuineIntel" Id = 0x673 Stepping = 3 Aug 21 10:07:39 ns1 /kernel: Features=0x383f9ff Aug 21 10:07:39 ns1 /kernel: real memory = 268423168 (262132K bytes) Aug 21 10:07:39 ns1 /kernel: avail memory = 256253952 (250248K bytes) Aug 21 10:07:39 ns1 /kernel: Preloaded elf kernel "kernel" at 0xc04d4000. Aug 21 10:07:39 ns1 /kernel: Preloaded elf module "splash_bmp.ko" at 0xc04d409c. Aug 21 10:07:39 ns1 /kernel: Pentium Pro MTRR support enabled Aug 21 10:07:39 ns1 /kernel: md0: Malloc disk Aug 21 10:07:39 ns1 /kernel: module_register_init: MOD_LOAD (splash_bmp, c04cf790, 0) error 2 Aug 21 10:07:39 ns1 /kernel: Using $PIR table, 7 entries at 0xc00f0d10 Aug 21 10:07:39 ns1 /kernel: npx0: on motherboard Aug 21 10:07:39 ns1 /kernel: npx0: INT 16 interface Aug 21 10:07:39 ns1 /kernel: pcib0: on motherboard Aug 21 10:07:39 ns1 /kernel: pci0: on pcib0 Aug 21 10:07:39 ns1 /kernel: pcib1: at device 1.0 on pci0 Aug 21 10:07:39 ns1 /kernel: pci1: on pcib1 Aug 21 10:07:39 ns1 /kernel: isab0: at device 4.0 on pci0 Aug 21 10:07:39 ns1 /kernel: isa0: on isab0 Aug 21 10:07:39 ns1 /kernel: atapci0: port 0xd800-0xd80f at device 4.1 on pci0 Aug 21 10:07:39 ns1 /kernel: ata0: at 0x1f0 irq 14 on atapci0 Aug 21 10:07:39 ns1 /kernel: ata1: at 0x170 irq 15 on atapci0 Aug 21 10:07:39 ns1 /kernel: uhci0: port 0xd400-0xd41f irq 10 at device 4.2 on pci0 Aug 21 10:07:39 ns1 /kernel: usb0: on uhci0 Aug 21 10:07:39 ns1 /kernel: usb0: USB revision 1.0 Aug 21 10:07:39 ns1 /kernel: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 Aug 21 10:07:39 ns1 /kernel: uhub0: 2 ports with 2 removable, self powered Aug 21 10:07:39 ns1 /kernel: chip1: port 0xe800-0xe80f at device 4.3 on pci0 Aug 21 10:07:39 ns1 /kernel: ahc0: port 0xd000-0xd0ff mem 0xcd000000-0xcd000fff irq 10 at device 6.0 on pci0 Aug 21 10:07:39 ns1 /kernel: aic7890/91: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs Aug 21 10:07:39 ns1 /kernel: pci0: at 9.0 irq 10 Aug 21 10:07:39 ns1 /kernel: tl0: port 0xb800-0xb80f mem 0xcb800000-0xcb80000f irq 11 at device 11.0 on pci0 Aug 21 10:07:39 ns1 /kernel: tl0: Ethernet address: 00:08:c7:28:9d:96 Aug 21 10:07:40 ns1 /kernel: miibus0: on tl0 Aug 21 10:07:40 ns1 /kernel: nsphy0: on miibus0 Aug 21 10:07:40 ns1 /kernel: nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Aug 21 10:07:40 ns1 /kernel: tlphy0: on miibus0 Aug 21 10:07:40 ns1 /kernel: tlphy0: 10base2/BNC, 10base5/AUI Aug 21 10:07:40 ns1 /kernel: orm0: