From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 04:13:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DD4116A4CF; Sun, 19 Sep 2004 04:13:46 +0000 (GMT) Received: from ylpvm01.prodigy.net (ylpvm01-ext.prodigy.net [207.115.57.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAC6E43D2D; Sun, 19 Sep 2004 04:13:45 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org ([209.233.197.29])i8J4Ddwn030694; Sun, 19 Sep 2004 00:13:40 -0400 Message-ID: <414D0776.9010805@elischer.org> Date: Sat, 18 Sep 2004 21:13:42 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Don Lewis References: <200409181808.i8II8doH002297@gw.catspoiler.org> In-Reply-To: <200409181808.i8II8doH002297@gw.catspoiler.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: gerarra@tin.it Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 04:13:46 -0000 Don Lewis wrote: > On 18 Sep, gerarra@tin.it wrote: > >>Here i report a patch different from Giorgos' one. The approch is completely >>different: working on syscall_register() function in kern/kern_syscalls.c >>file. >> >>============================== >> >> >>>cat kern_syscalls.diff >> >>--- kern_syscalls.c Sat Sep 18 14:37:53 2004 >>+++ kern_syscalls2.c Sat Sep 18 14:37:53 2004 >>@@ -73,6 +73,11 @@ >> sysent[*offset].sy_call != (sy_call_t *)lkmressys) >> return EEXIST; >> >>+#if (__i386__) && (INVARIANTS) >>+ KASSERT(new_sysent->nargs >= 0 && new_sysent->nargs <= i386_SYS_ARGS, >>+ "invalid number of syscalls"); >>+#endif >>+ >> *old_sysent = sysent[*offset]; >> sysent[*offset] = *new_sysent; >> return 0; > > > Why panic the machine at this point? Just refuse to install the syscall > and return an error. and the test for INVARIANTS is un-needed.. KASSERT only compiles to anything when INVARIANTS is defined. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 06:40:45 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5613516A4CE; Sun, 19 Sep 2004 06:40:45 +0000 (GMT) Received: from bittern.mail.pas.earthlink.net (bittern.mail.pas.earthlink.net [207.217.120.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26FD343D55; Sun, 19 Sep 2004 06:40:41 +0000 (GMT) (envelope-from jtoung@arc.nasa.gov) Received: from h-68-164-93-54.snvacaid.dynamic.covad.net ([68.164.93.54] helo=there) by bittern.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1C8vNI-0001Gv-00; Sat, 18 Sep 2004 23:40:40 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Jerry Toung Organization: ARC To: "Greg 'groggy' Lehey" Date: Sat, 18 Sep 2004 23:43:22 -0700 User-Agent: KMail/1.4.3 References: <200409171702.58905.jtoung@arc.nasa.gov> <20040918044315.GE67689@wantadilla.lemis.com> In-Reply-To: <20040918044315.GE67689@wantadilla.lemis.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200409182343.22827.jtoung@arc.nasa.gov> cc: freebsd-hackers@freebsd.org Subject: Re: add-symbol-file X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 06:40:45 -0000 Greg, I am not using remote debugging, that's why I made a call to kldsyms (loc= al=20 system) but it only loaded acpi.ko. May be I should try over a serial console. The system wasn't crashed or = in db=20 prompt though. As for the question regarding where I got the addresses from, I typed: asf -k -f -s -x modulepath .asf, this created the ".asf" file and its con= tain=20 was "add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.ko 0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0" then I copied and past it to the kgdb prompt, all went ok. but when I wa= nt to=20 list *0xc24b3184, it complained about "No source code available" or somet= hing=20 like that. That's where I am puzzled. I will do what you suggested and over serial console and repost if any=20 problems. Thank you, Jerry > > It looks like you're not doing it the way it was intended. As it > > says: > > Type 'getsyms' after connection to load kld symbols. > > This does the add-symbol-file for you. Take a look at gdb(4) for more > details. > > > If you're debugging a local system, you can use 'kldsyms' instead > > to load the kld symbols. That's a less obnoxious interface. > > doadump () at pcpu.h:159 > > (kgdb) add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.= ko > > 0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0 > > I'm assuming that this was broken by your MUA, and it's not the way > > you put it in, which must have been: > > (kgdb) add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.= ko > > 0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0 > > Where did you get these addresses from? They're all outside the > bounds of the kld as shown below. > > > > > In any case, I'm not sure that you need getsyms any more. It used to > be needed to get round various gdb restrictions. What happens if you > don't do anything? If that doesn't work, how about running getsyms, > as suggested? Please let me know either way what happens. > > Greg From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 07:00:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16E1A16A4D0; Sun, 19 Sep 2004 07:00:39 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 496B343D31; Sun, 19 Sep 2004 07:00:39 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 65127ACBCF; Sun, 19 Sep 2004 09:00:37 +0200 (CEST) Date: Sun, 19 Sep 2004 09:00:37 +0200 From: Pawel Jakub Dawidek To: Julian Elischer Message-ID: <20040919070037.GD30151@darkness.comp.waw.pl> References: <200409181808.i8II8doH002297@gw.catspoiler.org> <414D0776.9010805@elischer.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4QouUtKuvByFBvSj" Content-Disposition: inline In-Reply-To: <414D0776.9010805@elischer.org> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-hackers@freebsd.org cc: Don Lewis cc: gerarra@tin.it Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 07:00:47 -0000 --4QouUtKuvByFBvSj Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 18, 2004 at 09:13:42PM -0700, Julian Elischer wrote: +> >>+#if (__i386__) && (INVARIANTS) +> >>+ KASSERT(new_sysent->nargs >=3D 0 && new_sysent->nargs <=3D=20 +> >>i386_SYS_ARGS, +> >>+ "invalid number of syscalls"); +> >>+#endif +> >>+ +> >> *old_sysent =3D sysent[*offset]; +> >> sysent[*offset] =3D *new_sysent; +> >> return 0; +> > +> > +> >Why panic the machine at this point? Just refuse to install the syscall +> >and return an error. +>=20 +> and the test for INVARIANTS is un-needed.. KASSERT only compiles to anyt= hing +> when INVARIANTS is defined. =2E..and it should be '#ifdef', not '#if'. =2E..and the panic message should be inside (). --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --4QouUtKuvByFBvSj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBTS6VForvXbEpPzQRAnwUAJ9vhbpHMeMKrueynpXwGJQa8muTQgCbBywj fgUju2xIMmaTPX4vjZqQkls= =qh40 -----END PGP SIGNATURE----- --4QouUtKuvByFBvSj-- From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 02:48:43 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2753616A4CE for ; Sun, 19 Sep 2004 02:48:43 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id D00BF43D46 for ; Sun, 19 Sep 2004 02:48:42 +0000 (GMT) (envelope-from Roisin.Murphy@gmail.com) Received: by mproxy.gmail.com with SMTP id 79so668748rnk for ; Sat, 18 Sep 2004 19:48:39 -0700 (PDT) Received: by 10.38.15.66 with SMTP id 66mr621481rno; Sat, 18 Sep 2004 19:48:38 -0700 (PDT) Received: by 10.38.171.74 with HTTP; Sat, 18 Sep 2004 19:48:38 -0700 (PDT) Message-ID: Date: Sat, 18 Sep 2004 19:48:38 -0700 From: Roisin Murphy To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sun, 19 Sep 2004 12:10:13 +0000 Subject: raid5 setup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Roisin Murphy List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 02:48:43 -0000 hi I'm thinking about buying three 160GB ata or sata drives and setting up RAID5. The first question is, is it true that the ata command set has nothing to tell the state of the write cache and is this the same with sata drives? Since i'm not concerned with the performance of that array, all that matters to me is the storage and reliability, would it help if i get one of those manufacturer utilities and turn the cache off? I was told (by a incident response guy) that he has seen far too many messed up ata raid5 setups. I would also like to be able add new 160GB drives without having to copy the data from the setup and recreating it from scratch. Hopefully, the raid5 setup could recalculate the parity onto the new drive and reconfigure itself for bigger storage. Well as i mentioned, the performance doesn't matter at all, and i'm even thinking of encrypting that whole setup with gbde, what would be the best way to do this? with a raid5 hardware card, or software setup? Is the new gvinum worth a try? as i only heard horror vinum stories so far. Also what ata/sata drives are the most recommended by bsd guys? :), i can get 160GB hitachi, westerndigital and maxtor drives, all for the same price of around $100. And if you would recommend hardware raid card, what kind? thanks From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 13:05:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D1DF16A4CE for ; Sun, 19 Sep 2004 13:05:01 +0000 (GMT) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2B4C43D2F for ; Sun, 19 Sep 2004 13:05:00 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from ims3a.cp.tin.it (192.168.70.103) by vsmtp3.tin.it (7.0.027) id 414B175C00092935 for freebsd-hackers@freebsd.org; Sun, 19 Sep 2004 15:05:00 +0200 Received: from [192.168.70.227] by ims3a.cp.tin.it with HTTP; Sun, 19 Sep 2004 15:04:59 +0200 Date: Sun, 19 Sep 2004 15:04:59 +0200 Message-ID: <4146316C0000AD08@ims3a.cp.tin.it> From: gerarra@tin.it To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Subject: kernel buff overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 13:05:01 -0000 Maybe you would appreciate more something like that: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > cat kern_syscalls.diff --- kern_syscalls.c Sat Sep 18 13:42:21 2004 +++ kern_syscalls2.c Sun Sep 19 14:59:27 2004 @@ -58,6 +58,12 @@ syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent) { + +#ifdef __i386__ + if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > i386_SYS_AR= GS) + return E2BIG; +#endif + if (*offset =3D=3D NO_SYSCALL) { int i; From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 14:31:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C171116A4CE; Sun, 19 Sep 2004 14:31:29 +0000 (GMT) Received: from stella.fs.ei.tum.de (stella.fs.ei.tum.de [129.187.54.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACEF643D31; Sun, 19 Sep 2004 14:31:28 +0000 (GMT) (envelope-from corecode@fs.ei.tum.de) Received: from localhost (localhost [127.0.0.1]) by localhost.fs.ei.tum.de (Postfix) with ESMTP id 24E7530A89; Sun, 19 Sep 2004 16:31:25 +0200 (CEST) Received: from [10.150.180.176] (r180176.olydorf.swh.mhn.de [10.150.180.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client did not present a certificate) by stella.fs.ei.tum.de (Postfix) with ESMTP id 4E27F30A88; Sun, 19 Sep 2004 16:31:21 +0200 (CEST) In-Reply-To: <15147.1095545330@critter.freebsd.dk> References: <15147.1095545330@critter.freebsd.dk> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-6--814523413" Message-Id: <910E35B1-0A48-11D9-B85E-000A95F07A7A@fs.ei.tum.de> Content-Transfer-Encoding: 7bit From: Simon 'corecode' Schubert Date: Sun, 19 Sep 2004 16:31:17 +0200 To: "Poul-Henning Kamp" X-Pgp-Agent: GPGMail 1.0.1 (v33, 10.3) X-Mailer: Apple Mail (2.619) X-Virus-Scanned: by AMaViS 0.3.12 cc: FreeBSD Hackers cc: John Baldwin Subject: Re: cvs commit: src/sys/boot/i386/boot2 boot2.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 14:31:29 -0000 --Apple-Mail-6--814523413 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 19.09.2004, at 00:08, Poul-Henning Kamp wrote: >>>> Err, I don't see how it could. This only affects how boot2 >>>> handles addresses >> in the executables it loads, it doesn't affect how the kernel manages >> memory >> at all. > We're seeing isa-dma bounce buffers getting hard to get hold of these > days. Is there a way to first default to above-16M memory segments on allocations and only take the lower 16M if either a) explicitly requested by M_LOWMEM or b) no more high memory available? cheers simon -- /"\ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News --Apple-Mail-6--814523413 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFBTZg4r5S+dk6z85oRApCsAJsGXD0biaU1uDkcTG4h1f9F11itggCgmEB4 Nb0Qhdbc/SXPG8v6qTNyUNM= =P7LN -----END PGP SIGNATURE----- --Apple-Mail-6--814523413-- From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 17:53:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4912A16A4CF for ; Sun, 19 Sep 2004 17:53:07 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 459FD43D46 for ; Sun, 19 Sep 2004 17:53:06 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-b122.otenet.gr [212.205.244.130]) i8JHr1cp012138; Sun, 19 Sep 2004 20:53:02 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i8JHofeP076625; Sun, 19 Sep 2004 20:50:42 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i8JGxYov037044; Sun, 19 Sep 2004 19:59:34 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Sun, 19 Sep 2004 19:59:34 +0300 From: Giorgos Keramidas To: gerarra@tin.it Message-ID: <20040919165934.GB2907@gothmog.gr> References: <4146316C0000AD08@ims3a.cp.tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4146316C0000AD08@ims3a.cp.tin.it> Phone: +30-2610-312145 Mobile: +30-6944-116520 cc: freebsd-hackers@freebsd.org Subject: Re: kernel buff overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 17:53:07 -0000 On 2004-09-19 15:04, gerarra@tin.it wrote: > --- kern_syscalls.c Sat Sep 18 13:42:21 2004 > +++ kern_syscalls2.c Sun Sep 19 14:59:27 2004 > @@ -58,6 +58,12 @@ > syscall_register(int *offset, struct sysent *new_sysent, > struct sysent *old_sysent) > { > + > +#ifdef __i386__ > + if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > i386_SYS_ARGS) > + return E2BIG; > +#endif > + > if (*offset == NO_SYSCALL) { > int i; If a very simple but similar check can be added that works for all the architectures it's probably a cleaner solution, i.e.: : #ifndef SYSCALL_MAX_ARGS : #define SYSCALL_MAX_ARGS 8 : #endif : : if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > SYSCALL_MAX_ARGS) : return EINVAL; Then each architecture can define SYSCALL_MAX_ARGS at compile time. P.S.: I don't think that E2BIG is ok, since the argument list can be too "small" when sy_narg < 0, but arguing about the exact errno value is something I won't really spend much time on. - Giorgos From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 17:53:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51A1916A4CE; Sun, 19 Sep 2004 17:53:08 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71FD743D46; Sun, 19 Sep 2004 17:53:07 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-b122.otenet.gr [212.205.244.130]) i8JHr1BG019748; Sun, 19 Sep 2004 20:53:02 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i8JHofeR076625; Sun, 19 Sep 2004 20:50:42 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i8JGoBFq031925; Sun, 19 Sep 2004 19:50:11 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Sun, 19 Sep 2004 19:50:11 +0300 From: Giorgos Keramidas To: Pawel Jakub Dawidek , Don Lewis Message-ID: <20040919165011.GA2907@gothmog.gr> References: <20040918090227.GX30151@darkness.comp.waw.pl> <200409180918.i8I9ItWl001012@gw.catspoiler.org> <4146316C00007833@ims3a.cp.tin.it> <20040917093712.GB94990@orion.daedalusnetworks.priv> <20040918090227.GX30151@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200409180918.i8I9ItWl001012@gw.catspoiler.org> <20040918090227.GX30151@darkness.comp.waw.pl> cc: freebsd-hackers@freebsd.org cc: gerarra@tin.it Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 17:53:08 -0000 On 2004-09-18 11:02, Pawel Jakub Dawidek wrote: > On Fri, Sep 17, 2004 at 12:37:12PM +0300, Giorgos Keramidas wrote: > +> % +#ifdef INVARIANTS > +> % + KASSERT(0 <= narg && narg <= 8, ("invalid number of syscall args")); > +> % +#endif > > Maybe: > KASSERT(0 <= narg && narg <= sizeof(args) / sizeof(args[0]), > ("invalid number of syscall args")); > > So if we decide to increase/decrease it someday, we don't have to remember > about this KASSERT(). This might actually be good to have for kernels with INVARIANTS regardless of the small penalty paid for every syscall. Debugging kernels are known to be slower than non-debugging ones. It won't come as a very big surprise for those who are really interested to turn it on. Is there some way we can measure the extra slowness of a kernel compiled with this KASSERT turned on? Then, if we find out that turning this on for all the developers who use INVARIANTS is too big a penalty to pay we remove it or add a special category of invariants (INVARIANTS_SLOW anyone?) that will act as a toggle for INVARIANTS that are known to cause extreme slowness and should only be enabled with care... On 2004-09-18 02:18, Don Lewis wrote: > If you think we really need this bit of extra security, why not just > prevent the syscall with too many arguments from being registered by > syscall_register()? At least that keeps the check out of the most > frequently executed path. Don, This sounds excellent. Can an src-committer verify that the following is ok and commit it along with the manpage diff I posted earlier to HEAD? The hard-wired number 8 in there seems like something that could probably be improved a lot, but after looking for a short while I couldn't find a good way of finding out from the arguments of syscall_register() some way to calculate it. Of course, I'm far from an experienced kernel hacker and I'm probably missing something. Feel free to correct the following diff or even replace it entirely. : Index: kern_syscalls.c : =================================================================== : RCS file: /home/ncvs/src/sys/kern/kern_syscalls.c,v : retrieving revision 1.11 : diff -u -r1.11 kern_syscalls.c : --- kern_syscalls.c 15 Jul 2004 08:26:05 -0000 1.11 : +++ kern_syscalls.c 19 Sep 2004 16:38:21 -0000 : @@ -58,6 +58,8 @@ : syscall_register(int *offset, struct sysent *new_sysent, : struct sysent *old_sysent) : { : + if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > 8) : + return EINVAL; : if (*offset == NO_SYSCALL) { : int i; : P.S. I noticed that the kern_syscall.c file has many whitespace ``issues'' (i.e. it uses 7 SPACE characters for the first level of indentation in syscall_register() but 8 SPACES for the deeper levels of nesting), which should probably be taken care of in future commits, but that's really a different another topic. - Giorgos From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 19:43:05 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B53C16A4CE; Sun, 19 Sep 2004 19:43:05 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11E1643D1F; Sun, 19 Sep 2004 19:43:05 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.1/8.13.1) with ESMTP id i8JJgsB8004843; Sun, 19 Sep 2004 12:42:58 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200409191942.i8JJgsB8004843@gw.catspoiler.org> Date: Sun, 19 Sep 2004 12:42:54 -0700 (PDT) From: Don Lewis To: keramida@FreeBSD.org In-Reply-To: <20040919165934.GB2907@gothmog.gr> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-hackers@FreeBSD.org cc: gerarra@tin.it Subject: Re: kernel buff overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 19:43:05 -0000 On 19 Sep, Giorgos Keramidas wrote: > On 2004-09-19 15:04, gerarra@tin.it wrote: >> --- kern_syscalls.c Sat Sep 18 13:42:21 2004 >> +++ kern_syscalls2.c Sun Sep 19 14:59:27 2004 >> @@ -58,6 +58,12 @@ >> syscall_register(int *offset, struct sysent *new_sysent, >> struct sysent *old_sysent) >> { >> + >> +#ifdef __i386__ >> + if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > i386_SYS_ARGS) >> + return E2BIG; >> +#endif >> + >> if (*offset == NO_SYSCALL) { >> int i; > > If a very simple but similar check can be added that works for all the > architectures it's probably a cleaner solution, i.e.: > > : #ifndef SYSCALL_MAX_ARGS > : #define SYSCALL_MAX_ARGS 8 > : #endif > : > : if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > SYSCALL_MAX_ARGS) > : return EINVAL; > > Then each architecture can define SYSCALL_MAX_ARGS at compile time. Yes, the value should be defined in the architecture-specific . Also the machine specific syscall handlers in trap.c should be modified to use the defined parameter instead of just using the architecture-specific magic number. From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 21:05:17 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0570D16A545 for ; Sun, 19 Sep 2004 21:05:17 +0000 (GMT) Received: from vsmtp14.tin.it (vsmtp14.tin.it [212.216.176.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88AB843D55 for ; Sun, 19 Sep 2004 21:05:16 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from ims3a.cp.tin.it (192.168.70.103) by vsmtp14.tin.it (7.0.027) id 414B1A58000A7170 for FreeBSD-hackers@freebsd.org; Sun, 19 Sep 2004 23:05:16 +0200 Received: from [192.168.70.183] by ims3a.cp.tin.it with HTTP; Sun, 19 Sep 2004 23:05:14 +0200 Date: Sun, 19 Sep 2004 23:05:14 +0200 Message-ID: <4146316C0000B2DB@ims3a.cp.tin.it> In-Reply-To: <20040919165011.GA2907@gothmog.gr> From: gerarra@tin.it To: FreeBSD-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 21:05:17 -0000 >Don, > >This sounds excellent. Can an src-committer verify that the following is >ok and commit it along with the manpage diff I posted earlier to HEAD? > >The hard-wired number 8 in there seems like something that could probabl= y >be improved a lot, but after looking for a short while I couldn't find a >good way of finding out from the arguments of syscall_register() some wa= y >to calculate it. Of course, I'm far from an experienced kernel hacker and >I'm probably missing something. Feel free to correct the following diff= >or >even replace it entirely. Maybe you can get a look at this approach: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D $arch/include/md_var.h: > cat md_var.diff --- md_var2.h Sun Sep 19 22:43:56 2004 +++ md_var.h Sun Sep 19 22:46:23 2004 @@ -41,6 +41,12 @@ extern int (*copyin_vector)(const void *udaddr, void *kaddr, size_t len); extern int (*copyout_vector)(const void *kaddr, void *udaddr, size_t= len); +/* + * Arguments number syscalls definition + */ + +#define MAGIC_SYSCALL_ARGS 8 + extern long Maxmem; extern u_int basemem; /* PA of original top of base memory */ extern int busdma_swi_pending; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D kern/kern_syscall.c: > cat kern_syscall.diff --- kern_syscalls.c Sat Sep 18 13:42:21 2004 +++ kern_syscalls2.c Sun Sep 19 23:00:44 2004 @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD: src/sys/kern/kern_syscalls.c,v 1.11 2004/07/15 08:26= :05 phk Exp $"); +#include + #include #include #include @@ -58,6 +60,9 @@ syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent) { + if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > MAGIC_SYSCAL= L_ARGS) + return EINVAL; + if (*offset =3D=3D NO_SYSCALL) { int i; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D i386/i386/trap.c --- trap.c Sat Sep 18 14:30:19 2004 +++ trap2.c Sun Sep 19 22:47:33 2004 @@ -902,7 +902,7 @@ u_int sticks; int error; int narg; - int args[8]; + int args[MAGIC_SYSCALL_ARGS]; u_int code; /* The idea is that for every architecture MAGIC_SYSCALL_ARGS can be defined= in md_var.h (it's alredy included in handlers sources). Here just i386 ex= ample is done to show approach. It could be more flexible than a static approac= h. I hope you will enjoy it. rookie From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 21:51:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1015F16A4CE for ; Sun, 19 Sep 2004 21:51:19 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5A8643D1D for ; Sun, 19 Sep 2004 21:51:18 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.1/8.13.1) with ESMTP id i8JLpAtA005872; Sun, 19 Sep 2004 14:51:15 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200409192151.i8JLpAtA005872@gw.catspoiler.org> Date: Sun, 19 Sep 2004 14:51:10 -0700 (PDT) From: Don Lewis To: gerarra@tin.it In-Reply-To: <4146316C0000B2DB@ims3a.cp.tin.it> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: FreeBSD-hackers@FreeBSD.org Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 21:51:19 -0000 On 19 Sep, gerarra@tin.it wrote: > >>Don, >> >>This sounds excellent. Can an src-committer verify that the following > is >>ok and commit it along with the manpage diff I posted earlier to HEAD? >> >>The hard-wired number 8 in there seems like something that could probably >>be improved a lot, but after looking for a short while I couldn't find > a >>good way of finding out from the arguments of syscall_register() some way >>to calculate it. Of course, I'm far from an experienced kernel hacker > and >>I'm probably missing something. Feel free to correct the following diff >>or >>even replace it entirely. > > Maybe you can get a look at this approach: > > ================================== > > $arch/include/md_var.h: > >> cat md_var.diff > --- md_var2.h Sun Sep 19 22:43:56 2004 > +++ md_var.h Sun Sep 19 22:46:23 2004 > @@ -41,6 +41,12 @@ > extern int (*copyin_vector)(const void *udaddr, void *kaddr, size_t > len); > extern int (*copyout_vector)(const void *kaddr, void *udaddr, size_t > len); > > +/* > + * Arguments number syscalls definition > + */ > + > +#define MAGIC_SYSCALL_ARGS 8 > + > extern long Maxmem; > extern u_int basemem; /* PA of original top of base memory */ > extern int busdma_swi_pending; which is installed from src/sys/{alpha,amd64,i386,ia64,etc}/param.h would be a more appropriate location. There may be cases where you would want to know this value in userland, in which case including would definitely not be appropriate. My preference would be to name it MAX_SYSCALL_ARGS. > ================================ > > kern/kern_syscall.c: >> cat kern_syscall.diff > --- kern_syscalls.c Sat Sep 18 13:42:21 2004 > +++ kern_syscalls2.c Sun Sep 19 23:00:44 2004 > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD: src/sys/kern/kern_syscalls.c,v 1.11 2004/07/15 08:26:05 > phk Exp $"); > > +#include > + > #include includes , so if the #define is added to you won't have to include here. The rest of the changes look ok, though you might want to add a printf() before "return EINVAL" so that the reason for failure gets logged. From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 23:34:16 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BB4D16A4CE for ; Sun, 19 Sep 2004 23:34:16 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F31043D2D for ; Sun, 19 Sep 2004 23:34:16 +0000 (GMT) (envelope-from mymuss@gmail.com) Received: by mproxy.gmail.com with SMTP id 74so896222rnk for ; Sun, 19 Sep 2004 16:34:12 -0700 (PDT) Received: by 10.38.162.40 with SMTP id k40mr1183597rne; Sun, 19 Sep 2004 16:34:12 -0700 (PDT) Received: by 10.38.72.66 with HTTP; Sun, 19 Sep 2004 16:34:12 -0700 (PDT) Message-ID: Date: Mon, 20 Sep 2004 02:34:12 +0300 From: Andrew Novikov To: freebsd-hackers@freebsd.org In-Reply-To: <16715.51219.709030.281400@guru.mired.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable References: <7ea4ce2e54aa7d07618278640e7be260@200.140.233.95> <16715.51219.709030.281400@guru.mired.org> Subject: Re: Editing and compiling FreeBSD source X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andrew Novikov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 23:34:16 -0000 Hi, Could someone please explan me the difference between: make buildkernel make installkernel and config cd ../../compile/..... make depend make make install Thanks! On Sat, 18 Sep 2004 00:30:59 -0500, Mike Meyer wrote: > In <7ea4ce2e54aa7d07618278640e7be260@200.140.233.95>, Cantarella typed: > > > > This is my first e-mail for this list. > > I am interested in studing to better understand FreeBSD=B4s source c= ode. > > With 'make buildkernel' and 'make installkernel' is it possible to > > compile the changes that I have made? > > The changes are simple (just some printf). I am just beginning this > > trip through FreeBSD=B4s source code. >=20 > That will work, but it's the painfull way to do it. The old way is > easier to do development with: >=20 > 1) cd /usr/src/sys/i386/conf > 2) config YOURCONFIG > 3) cd ../../compile/YOURCONFIG > 4) make depend > 5) make install >=20 > You only have to go back to step 1 if you touch the config file. You > only have to go back to step 4 if you add #include statements to a > source file. Most of the time, you simply redo the "make install", and > it only recompiles what you've changed and relinks the > kernel. buildkernel and installkernel will recompile everything every > time. >=20 > This won't remake kernel modules - but you can do "make's" in > /usr/src/sys/modules/* to deal with those. >=20 > -- > Mike Meyer http://www.mired.org/consulting.h= tml > Independent Network/Unix/Perforce consultant, email for more information. >=20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " >=20 --=20 Sincerely, Andrew From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 23:38:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C347616A4CE for ; Sun, 19 Sep 2004 23:38:35 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91D1543D2D for ; Sun, 19 Sep 2004 23:38:35 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8JNeTwW006525; Sun, 19 Sep 2004 16:40:30 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8JNeTuj006524; Sun, 19 Sep 2004 16:40:29 -0700 Date: Sun, 19 Sep 2004 16:40:29 -0700 From: Brooks Davis To: Andrew Novikov Message-ID: <20040919234029.GA6150@odin.ac.hmc.edu> References: <7ea4ce2e54aa7d07618278640e7be260@200.140.233.95> <16715.51219.709030.281400@guru.mired.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-hackers@freebsd.org Subject: Re: Editing and compiling FreeBSD source X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 23:38:35 -0000 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please don't top post, it loses context.] On Mon, Sep 20, 2004 at 02:34:12AM +0300, Andrew Novikov wrote: > Hi, >=20 > Could someone please explan me the difference between: >=20 > make buildkernel > make installkernel This uses the tool chain build by buildworld. This may be required if config or the compiler version change. It should always work. > config > cd ../../compile/..... > make depend > make > make install This uses the installed toolchain. It's faster and allows you to only do that part you need, but may not work. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --jI8keyz6grp/JLjh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBThjtXY6L6fI4GtQRAveXAJ9664+UKBCtDKenNxS4gIiHz10WvwCgzj+W 3WOyix7NKjHS69j4EPgdJ2A= =5yyn -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 00:51:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DDE716A4CE; Mon, 20 Sep 2004 00:51:53 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC23043D2F; Mon, 20 Sep 2004 00:51:52 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.155] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1C9CPH-0007iV-00; Mon, 20 Sep 2004 02:51:51 +0200 Received: from [217.227.156.246] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1C9CPH-0007Jw-00; Mon, 20 Sep 2004 02:51:51 +0200 From: Max Laier To: freebsd-arch@freebsd.org Date: Mon, 20 Sep 2004 02:50:40 +0200 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3113315.aWgR6iTeVk"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200409200250.49518.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: freebsd-hackers@freebsd.org cc: freebsd-standards@freebsd.org cc: freebsd-net@freebsd.org Subject: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 00:51:53 -0000 --nextPart3113315.aWgR6iTeVk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/71836 is the symptom. Now= I am=20 looking for a clean solution to it. What is needed is an include file that= =20 defines union sockaddr_union in a way that is useable from kernel and=20 userland. Historically it seems that this union first apeared in context of= =20 ipsec within the kernel. pf has adopted it, but uses it in the userland as= =20 well. I am sure that it can be usefull in a lot of places that have to deal= =20 with/store different address formats. My question now is, what would be a good place to define this? Are there an= y=20 fromal standarts that might define it already? (Couldn't find anything) Is= =20 there anything else that I must consider? At some point I though netinet/in.h might be a good place, but that'd requi= re=20 inclusion of sys/socket.h, which certainly is not a good solution. Opinions? Ideas? > #include > #include >=20 > union sockaddr_union { > struct sockaddr sa; > struct sockaddr_in sin; > struct sockaddr_in6 sin6; > struct sockaddr_storage __su_pad; /* maybe not a bad idea */ > }; =46reeBSD: netipsec/keydb.h, line 43 (_KERNEL) NetBSD: netipsec/keydb.h, line 46 (_KERNEL) OpenBSD: netinet/ip_ipsp.h, line 50 (non _KERNEL) KAME: net/pfvar.h, line 699 (non _KERNEL, ! __OpenBSD__) Linux: Doesn't seem to have it. Or has it under a different name? =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart3113315.aWgR6iTeVk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBTilpXyyEoT62BG0RAmpDAJ9IVZ1sV1GhHYyMXaAIx2hBZ9Bo1QCfaIYn XH9Pl7Y8VcPBVr9kgjdhvc8= =QH3p -----END PGP SIGNATURE----- --nextPart3113315.aWgR6iTeVk-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 02:26:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3C5116A4CE; Mon, 20 Sep 2004 02:26:56 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B033843D2F; Mon, 20 Sep 2004 02:26:56 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8K2SqAq027289; Sun, 19 Sep 2004 19:28:52 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8K2SqpY027288; Sun, 19 Sep 2004 19:28:52 -0700 Date: Sun, 19 Sep 2004 19:28:52 -0700 From: Brooks Davis To: Max Laier Message-ID: <20040920022852.GA21281@odin.ac.hmc.edu> References: <200409200250.49518.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <200409200250.49518.max@love2party.net> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=3.0 required=8.0 tests=SUSPICIOUS_RECIPS autolearn=no version=2.63 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-hackers@freebsd.org cc: freebsd-net@freebsd.org cc: freebsd-standards@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 02:26:57 -0000 --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 20, 2004 at 02:50:40AM +0200, Max Laier wrote: > Hi, >=20 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/71836 is the symptom. N= ow I am=20 > looking for a clean solution to it. What is needed is an include file tha= t=20 > defines union sockaddr_union in a way that is useable from kernel and=20 > userland. Historically it seems that this union first apeared in context = of=20 > ipsec within the kernel. pf has adopted it, but uses it in the userland a= s=20 > well. I am sure that it can be usefull in a lot of places that have to de= al=20 > with/store different address formats. >=20 > My question now is, what would be a good place to define this? Are there = any=20 > fromal standarts that might define it already? (Couldn't find anything) I= s=20 > there anything else that I must consider? >=20 > At some point I though netinet/in.h might be a good place, but that'd req= uire=20 > inclusion of sys/socket.h, which certainly is not a good solution. >=20 > Opinions? Ideas? >=20 > > #include > > #include > >=20 > > union sockaddr_union { > > struct sockaddr sa; > > struct sockaddr_in sin; > > struct sockaddr_in6 sin6; > > struct sockaddr_storage __su_pad; /* maybe not a bad idea */ > > }; I don't see an elegant solution. Stuffing it off in its own file may be the best thing if you're going to use it. Overall, I'd say it's bad idea that PF be better off without. It appears to save a few casts, but nothing worth the pain of generalizing the declaration. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBTkBkXY6L6fI4GtQRAkN5AJ4vSbihrYfqgTxU4MrgF4vNXFYr6ACeJ0Uh aeCoFMPqPGpWIYLi5DDzc4c= =WKvT -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 03:40:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 784C016A4CE; Mon, 20 Sep 2004 03:40:54 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE95643D54; Mon, 20 Sep 2004 03:40:53 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.179] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1C9F2o-0002Lr-00; Mon, 20 Sep 2004 05:40:50 +0200 Received: from [217.227.156.246] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1C9F2n-0007vz-00; Mon, 20 Sep 2004 05:40:50 +0200 From: Max Laier To: Brooks Davis Date: Mon, 20 Sep 2004 05:39:38 +0200 User-Agent: KMail/1.7 References: <200409200250.49518.max@love2party.net> <20040920022852.GA21281@odin.ac.hmc.edu> In-Reply-To: <20040920022852.GA21281@odin.ac.hmc.edu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3010729.AUYAN69HKC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200409200539.48073.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: freebsd-hackers@freebsd.org cc: freebsd-net@freebsd.org cc: freebsd-standards@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 03:40:54 -0000 --nextPart3010729.AUYAN69HKC Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 20 September 2004 04:28, Brooks Davis wrote: > On Mon, Sep 20, 2004 at 02:50:40AM +0200, Max Laier wrote: > > Hi, > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/71836 is the symptom.= Now > > I am looking for a clean solution to it. What is needed is an include > > file that defines union sockaddr_union in a way that is useable from > > kernel and userland. Historically it seems that this union first apeared > > in context of ipsec within the kernel. pf has adopted it, but uses it in > > the userland as well. I am sure that it can be usefull in a lot of plac= es > > that have to deal with/store different address formats. > > > > My question now is, what would be a good place to define this? Are there > > any fromal standarts that might define it already? (Couldn't find > > anything) Is there anything else that I must consider? > > > > At some point I though netinet/in.h might be a good place, but that'd > > require inclusion of sys/socket.h, which certainly is not a good > > solution. > > > > Opinions? Ideas? > > > > > #include > > > #include > > > > > > union sockaddr_union { > > > struct sockaddr sa; > > > struct sockaddr_in sin; > > > struct sockaddr_in6 sin6; > > > struct sockaddr_storage __su_pad; /* maybe not a bad idea */ > > > }; > > I don't see an elegant solution. Stuffing it off in its own file may > be the best thing if you're going to use it. Overall, I'd say it's bad > idea that PF be better off without. It appears to save a few casts, > but nothing worth the pain of generalizing the declaration. > > -- Brooks =46irst of all, the padding is bogus as sin6 is big enough. Especially sinc= e one=20 point here is to save space. I was a bit confused there, sorry. Especially= =20 since this is an important point: In pf this union is uses to - for example= -=20 store address information in tables. It allows to store IPv4 and IPv6=20 addresses in the same table without creating overhead in the memory footpri= nt=20 or having to deal with different objects for every address type. The fewer= =20 casts are just an additional benefit. Maybe you are right and a new header is the easiest way out. Moving this ou= t=20 of under _KERNEL would require all includer of netipsec/keydb.h to include= =20 sys/socket.h and netinet/in.h. As I was saying, I don't have a good idea=20 either. The only thing that came to my mind just now is to add a protecting= =20 define and #ifdef around the two places that define it. But I have no idea= =20 how clean (in terms of style) such a solution is. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart3010729.AUYAN69HKC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBTlEEXyyEoT62BG0RAr9TAJ42DYbnMVi2Cgj9TICFk7YXCo0YFgCfQdyg ORVq+9JZZUGaOxLFYXMf82U= =cYA3 -----END PGP SIGNATURE----- --nextPart3010729.AUYAN69HKC-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 04:22:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F71A16A4CE; Mon, 20 Sep 2004 04:22:20 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5D7F43D39; Mon, 20 Sep 2004 04:22:19 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8K4OHI6010640; Sun, 19 Sep 2004 21:24:17 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8K4OHbu010635; Sun, 19 Sep 2004 21:24:17 -0700 Date: Sun, 19 Sep 2004 21:24:17 -0700 From: Brooks Davis To: Max Laier Message-ID: <20040920042417.GB9460@odin.ac.hmc.edu> References: <200409200250.49518.max@love2party.net> <20040920022852.GA21281@odin.ac.hmc.edu> <200409200539.48073.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GRPZ8SYKNexpdSJ7" Content-Disposition: inline In-Reply-To: <200409200539.48073.max@love2party.net> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-hackers@freebsd.org cc: freebsd-net@freebsd.org cc: freebsd-standards@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 04:22:20 -0000 --GRPZ8SYKNexpdSJ7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 20, 2004 at 05:39:38AM +0200, Max Laier wrote: > On Monday 20 September 2004 04:28, Brooks Davis wrote: > > On Mon, Sep 20, 2004 at 02:50:40AM +0200, Max Laier wrote: > > > Hi, > > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/71836 is the sympto= m. Now > > > I am looking for a clean solution to it. What is needed is an include > > > file that defines union sockaddr_union in a way that is useable from > > > kernel and userland. Historically it seems that this union first apea= red > > > in context of ipsec within the kernel. pf has adopted it, but uses it= in > > > the userland as well. I am sure that it can be usefull in a lot of pl= aces > > > that have to deal with/store different address formats. > > > > > > My question now is, what would be a good place to define this? Are th= ere > > > any fromal standarts that might define it already? (Couldn't find > > > anything) Is there anything else that I must consider? > > > > > > At some point I though netinet/in.h might be a good place, but that'd > > > require inclusion of sys/socket.h, which certainly is not a good > > > solution. > > > > > > Opinions? Ideas? > > > > > > > #include > > > > #include > > > > > > > > union sockaddr_union { > > > > struct sockaddr sa; > > > > struct sockaddr_in sin; > > > > struct sockaddr_in6 sin6; > > > > struct sockaddr_storage __su_pad; /* maybe not a bad idea */ > > > > }; > > > > I don't see an elegant solution. Stuffing it off in its own file may > > be the best thing if you're going to use it. Overall, I'd say it's bad > > idea that PF be better off without. It appears to save a few casts, > > but nothing worth the pain of generalizing the declaration. >=20 > First of all, the padding is bogus as sin6 is big enough. Especially sinc= e one=20 > point here is to save space. I was a bit confused there, sorry. Especiall= y=20 > since this is an important point: In pf this union is uses to - for examp= le -=20 > store address information in tables. It allows to store IPv4 and IPv6=20 > addresses in the same table without creating overhead in the memory footp= rint=20 > or having to deal with different objects for every address type. The fewe= r=20 > casts are just an additional benefit. > > Maybe you are right and a new header is the easiest way out. Moving this = out=20 > of under _KERNEL would require all includer of netipsec/keydb.h to includ= e=20 > sys/socket.h and netinet/in.h. As I was saying, I don't have a good idea= =20 > either. The only thing that came to my mind just now is to add a protecti= ng=20 > define and #ifdef around the two places that define it. But I have no ide= a=20 > how clean (in terms of style) such a solution is. If it's primairly for well defined storage, why not remove the sa and put it in netinet/in.h? If you're just looking for the family and length, it doesn't matter if you access it as .sa, .sin, or .sin6. You might have to name it something else which could be problematic for portability, but it might be worth the pain if you could push it back to OpenBSD. -- Brooks -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --GRPZ8SYKNexpdSJ7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBTltvXY6L6fI4GtQRApA7AKC4bgZvLAzTVpzVhHVfXEwQd+JWtACgrBrG wdii84flDaNUq1uEym+j+Ms= =P8eR -----END PGP SIGNATURE----- --GRPZ8SYKNexpdSJ7-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 05:24:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDCE116A4CE for ; Mon, 20 Sep 2004 05:24:07 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78E1043D4C for ; Mon, 20 Sep 2004 05:24:07 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i8K5Nqxq054959; Sun, 19 Sep 2004 23:23:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 19 Sep 2004 23:24:50 -0600 (MDT) Message-Id: <20040919.232450.118757898.imp@bsdimp.com> To: mymuss@gmail.com From: "M. Warner Losh" In-Reply-To: References: <7ea4ce2e54aa7d07618278640e7be260@200.140.233.95> <16715.51219.709030.281400@guru.mired.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Editing and compiling FreeBSD source X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 05:24:08 -0000 In message: Andrew Novikov writes: : Could someone please explan me the difference between: : : make buildkernel : make installkernel If you've done a make buildworld, this should always work, reguardless of what tools you have installed in the base system. There are a number of nobs to make these faster. This even works accross different releases (eg, you can build a 5 kernel on a 4 box) most of the time too. : config : cd ../../compile/..... : make depend : make : make install This uses system tools, so they have to be in sync with the kernel. This is often more convenient when you are building lots of kernels to debug some problem in the kernel, but isn't any faster than the above if you are starting from dirt. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 12:28:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82E2916A4CE for ; Mon, 20 Sep 2004 12:28:35 +0000 (GMT) Received: from vsmtp12.tin.it (vsmtp12.tin.it [212.216.176.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1399143D48 for ; Mon, 20 Sep 2004 12:28:35 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from ims3a.cp.tin.it (192.168.70.103) by vsmtp12.tin.it (7.0.027) id 414B19D3000ED34D for freebsd-hackers@freebsd.org; Mon, 20 Sep 2004 14:28:34 +0200 Received: from [192.168.70.229] by ims3a.cp.tin.it with HTTP; Mon, 20 Sep 2004 14:28:32 +0200 Date: Mon, 20 Sep 2004 14:28:32 +0200 Message-ID: <4146316C0000C7E2@ims3a.cp.tin.it> From: gerarra@tin.it To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 12:28:35 -0000 > which is installed from >src/sys/{alpha,amd64,i386,ia64,etc}/param.h would be a more appropriate >location. There may be cases where you would want to know this value in= >userland, in which case including would definitely >not be appropriate. > >My preference would be to name it MAX_SYSCALL_ARGS. > I followed your suggestions and I made changes. Now this is patch availab= le. I did for amd64, sparc64, i386 and alpha since ia64 is not affected. I re= port i386 solution (for complete diffs tree and other architectures support do= wnload patch http://www.gufi.org/~rookie/args-diff.tar.gz): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $arch/include/param.h > cat i386_param.diff --- param2.h Mon Sep 20 14:09:44 2004 +++ param.h Mon Sep 20 13:59:05 2004 @@ -122,6 +122,8 @@ #define VM_BCACHE_SIZE_MAX (200 * 1024 * 1024) #endif +#define MAX_SYSCALL_ARGS 8 + /* * Mach derived conversion macros */ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D $arch/$arch/trap.c > cat i386_trap.diff --- trap2.c Mon Sep 20 14:09:27 2004 +++ trap.c Mon Sep 20 14:03:23 2004 @@ -902,7 +902,7 @@ u_int sticks; int error; int narg; - int args[8]; + int args[MAX_SYSCALL_ARGS]; u_int code; /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D kern/kern_syscalls.c > cat kern_syscalls.diff --- kern_syscalls.c Sat Sep 18 13:42:21 2004 +++ kern_syscalls2.c Mon Sep 20 14:18:45 2004 @@ -58,6 +58,16 @@ syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent) { +#ifndef __ia64__ + if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > MAX_SYSCALL_= ARGS) + { + printf("Invalid sy_narg for syscall: boundary is [0 - %d]= \n", + MAX_SYSCALL_ARGS); + return EINVAL; + } +#endif + + if (*offset =3D=3D NO_SYSCALL) { int i; The other architectures patches has similar body. I hope you will commit it. rookie From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 23:55:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1323F16A4CE for ; Sun, 19 Sep 2004 23:55:25 +0000 (GMT) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE6B443D1D for ; Sun, 19 Sep 2004 23:55:24 +0000 (GMT) (envelope-from mwm-dated-1096501442.eefe0f@mired.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id E6BEF136B53 for ; Sun, 19 Sep 2004 16:55:23 -0700 (PDT) Received: from mired.org (mwm@idiom [216.240.32.1]) by idiom.com (8.12.11/8.12.11) with SMTP id i8JNi21O030186 for ; Sun, 19 Sep 2004 16:44:03 -0700 (PDT) (envelope-from mwm-dated-1096501442.eefe0f@mired.org) Received: (qmail 18742 invoked by uid 100); 19 Sep 2004 23:44:02 -0000 Received: by guru.mired.org (tmda-sendmail, from uid 100); Sun, 19 Sep 2004 18:44:01 -0500 (CDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16718.6593.160657.15544@guru.mired.org> Date: Sun, 19 Sep 2004 18:44:01 -0500 To: Brooks Davis In-Reply-To: <20040919234029.GA6150@odin.ac.hmc.edu> References: <7ea4ce2e54aa7d07618278640e7be260@200.140.233.95> <16715.51219.709030.281400@guru.mired.org> <20040919234029.GA6150@odin.ac.hmc.edu> X-Mailer: VM 7.17 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer X-Mailman-Approved-At: Mon, 20 Sep 2004 13:38:19 +0000 cc: freebsd-hackers@freebsd.org Subject: Re: Editing and compiling FreeBSD source X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 23:55:25 -0000 In <20040919234029.GA6150@odin.ac.hmc.edu>, Brooks Davis typed: > [Please don't top post, it loses context.] > > On Mon, Sep 20, 2004 at 02:34:12AM +0300, Andrew Novikov wrote: > > Hi, > > > > Could someone please explan me the difference between: > > > > make buildkernel > > make installkernel > > This uses the tool chain build by buildworld. This may be required if > config or the compiler version change. It should always work. > > > config > > cd ../../compile/..... > > make depend > > make > > make install > > This uses the installed toolchain. It's faster and allows you to only > do that part you need, but may not work. To be more specific, the only time it won't work is when you've upgraded the system. If the sources you're working on have been installed and all you've done is tweaked the kernel, it'll always work. Better yet, you can skip some of the steps depending on how you've tweaked the kernel, resulting in much faster build times. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 14:05:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A979516A4CE for ; Mon, 20 Sep 2004 14:05:50 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF4EE43D49 for ; Mon, 20 Sep 2004 14:05:49 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from orion.daedalusnetworks.priv (host5.bedc.ondsl.gr [62.103.39.229])i8KE5Vm2001690 for ; Mon, 20 Sep 2004 17:05:42 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) i8KE5EA6000997 for ; Mon, 20 Sep 2004 17:05:15 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost)i8KE5ENS000996 for freebsd-hackers@freebsd.org; Mon, 20 Sep 2004 17:05:14 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Mon, 20 Sep 2004 17:05:14 +0300 From: Giorgos Keramidas To: freebsd-hackers@freebsd.org Message-ID: <20040920140514.GB700@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Unified diffs in periodic/security email X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 14:05:50 -0000 I've been running my systems at home and work with the following diff for some time. I tend to prefer the unified diff output format than the default diff -b output. Does anyone else like this? Any ideas for making the diff format configurable in periodic.conf (i.e. to making it easy to switch between diff -u and diff -c output)? % Index: security.functions % =================================================================== % RCS file: /home/ncvs/src/etc/periodic/security/security.functions,v % retrieving revision 1.3 % diff -u -r1.3 security.functions % --- security.functions 30 Jun 2003 22:06:26 -0000 1.3 % +++ security.functions 7 Sep 2004 07:50:35 -0000 % @@ -67,7 +67,7 @@ % [ $rc -lt 1 ] && rc=1 % echo "" % echo "${msg}" % - diff -b ${LOG}/${label}.today ${tmpf} | eval "${filter}" % + diff -u -b ${LOG}/${label}.today ${tmpf} | eval "${filter}" % mv ${LOG}/${label}.today ${LOG}/${label}.yesterday || rc=3 % mv ${tmpf} ${LOG}/${label}.today || rc=3 % fi From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 14:54:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B656916A4CE for ; Mon, 20 Sep 2004 14:54:51 +0000 (GMT) Received: from athena.softcardsystems.com (mail.softcardsystems.com [12.34.136.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C0BB43D46 for ; Mon, 20 Sep 2004 14:54:51 +0000 (GMT) (envelope-from sah@softcardsystems.com) Received: from athena (athena [12.34.136.114])i8KFsUT1024834; Mon, 20 Sep 2004 10:54:30 -0500 Date: Mon, 20 Sep 2004 10:54:30 -0500 (EST) From: Sam X-X-Sender: sah@athena To: Mike Meyer In-Reply-To: <16715.50688.830652.474272@guru.mired.org> Message-ID: References: <4146316C000077FD@ims3a.cp.tin.it> <20040916235936.GO23987@parcelfarce.linux.theplanet.co.uk> <20040918030531.GA23987@parcelfarce.linux.theplanet.co.uk> <16715.50688.830652.474272@guru.mired.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: viro@parcelfarce.linux.theplanet.co.uk cc: gerarra@tin.it cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 14:54:51 -0000 On Sat, 18 Sep 2004, Mike Meyer wrote: > In <001801c49d38$1c8cb790$1200a8c0@gsicomp.on.ca>, Matt Emmerton typed: >> I disagree. It really comes down to how secure you want FreeBSD to be, and >> the attitude of "we don't need to protect against this case because anyone >> who does this is asking for trouble anyway" is one of the main reason why >> security holes exist in products today. (Someone else had brought this up >> much earlier on in the thread.) > > You haven't been paying close enough attention to the discussion. To > exploit this "security problem" you have to be root. If it's an > external attacker, you're already owned. > > That leaves trojans. Those are always a problem for OSS - and for > proprietary software. With OSS, you have the option of auditing the > code yourself, though that has been beaten (by Ritchie, I believe > *). Personally, I trust the FreeBSD committers to not trojan my system > - and if they were going to, there are *so* many easier ways to do > it. Should I ever decide to run a third party kernel module, I may > well audit the code for that module. But I take that risk everytime I > install software - whether it's from ports, commercial, or just > grabbed off the web. > > > *) There was at one time a hacked C compiler that did two evil > things. The first evil thing was to recognize the password checking > code in login, and generate code that always accepted a "back door" > password as well as the real password. The second evil thing was to > recognize the place in the C compiler where the two hacks were, and > reinsert them into the generated code. So a source audit would turn up > nothing, but the system was thoroughly compromised. http://www.acm.org/classics/sep95/ Cheers, Sam From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 16:22:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 048BF16A4CE for ; Mon, 20 Sep 2004 16:22:07 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 275F943D49 for ; Mon, 20 Sep 2004 16:22:05 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 15949 invoked from network); 20 Sep 2004 16:19:08 -0000 Received: from unknown (HELO straylight.m.ringlet.net) (217.75.135.134) by gandalf.online.bg with SMTP; 20 Sep 2004 16:19:08 -0000 Received: (qmail 2060 invoked by uid 1000); 20 Sep 2004 16:22:41 -0000 Date: Mon, 20 Sep 2004 19:22:41 +0300 From: Peter Pentchev To: freebsd-hackers@FreeBSD.org Message-ID: <20040920162241.GB1813@straylight.m.ringlet.net> Mail-Followup-To: freebsd-hackers@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8GpibOaaTibBMecb" Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: [CFR] Fix adduser's recognition of nologin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 16:22:07 -0000 --8GpibOaaTibBMecb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Any objections to the following patch? The rationale is described in PR bin/71786 - http://www.FreeBSD.org/cgi/query-pr.cgi?pr=3D71786 Basically, the 'exit' inside the 'cat | while' loop does not really exit the fullpath_from_shell() function, so if the admin specifies 'nologin' as the new user's shell, fullpath_from_shell() actually outputs "/sbin/nologin\n/sbin/nologin" or something similar, and this corrupts the modified master.passwd file. In the PR, the originator confirmed that this solved the problem. I could commit it if no one has any objections. Index: src/usr.sbin/adduser/adduser.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/usr.sbin/adduser/adduser.sh,v retrieving revision 1.24 diff -u -r1.24 adduser.sh --- src/usr.sbin/adduser/adduser.sh 28 Aug 2004 14:32:10 -0000 1.24 +++ src/usr.sbin/adduser/adduser.sh 16 Sep 2004 11:43:23 -0000 @@ -126,6 +126,13 @@ _shell=3D$1 [ -z "$_shell" ] && return 1 =20 + # /usr/sbin/nologin is a special case + if [ "$_shell" =3D "${NOLOGIN}" -o \ + "$_shell" =3D "${NOLOGIN_PATH}" ]; then + echo ${NOLOGIN_PATH} + return 0; + fi + cat ${ETCSHELLS} | while read _path _junk ; do case "$_path" in @@ -141,13 +148,6 @@ esac done =20 - # /usr/sbin/nologin is a special case - if [ "$_shell" =3D "${NOLOGIN}" -o \ - "$_shell" =3D "${NOLOGIN_PATH}" ]; then - echo ${NOLOGIN_PATH} - return 0; - fi - return 1 } =20 G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 Thit sentence is not self-referential because "thit" is not a word. --8GpibOaaTibBMecb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBTwPR7Ri2jRYZRVMRAjBCAJ9Cfwlfo8TGH0FvjT1DBM+WR07tiQCgoT/h X6qWlg+wsnVHl1x72ybLfTU= =5KsN -----END PGP SIGNATURE----- --8GpibOaaTibBMecb-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 16:48:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40A6E16A4CE for ; Mon, 20 Sep 2004 16:48:46 +0000 (GMT) Received: from daemon.li (daemon.li [213.203.244.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id D812743D2F for ; Mon, 20 Sep 2004 16:48:45 +0000 (GMT) (envelope-from josef@daemon.li) Received: from localhost (localhost [127.0.0.1]) (uid 1000) by daemon.li with local; Mon, 20 Sep 2004 16:48:45 +0000 Date: Mon, 20 Sep 2004 16:48:44 +0000 From: Josef El-Rayes To: freebsd-hackers@FreeBSD.org Message-ID: <20040920164844.GA31656@daemon.li> References: <20040920162241.GB1813@straylight.m.ringlet.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_daemon.li-32054-1095698925-0001-2" Content-Disposition: inline In-Reply-To: <20040920162241.GB1813@straylight.m.ringlet.net> User-Agent: Mutt/1.3.28i Subject: Re: [CFR] Fix adduser's recognition of nologin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 16:48:46 -0000 This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_daemon.li-32054-1095698925-0001-2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter Pentchev : > I could commit it if no one has any objections. > Index: src/usr.sbin/adduser/adduser.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/usr.sbin/adduser/adduser.sh,v > retrieving revision 1.24 > diff -u -r1.24 adduser.sh > --- src/usr.sbin/adduser/adduser.sh 28 Aug 2004 14:32:10 -0000 1.24 > +++ src/usr.sbin/adduser/adduser.sh 16 Sep 2004 11:43:23 -0000 [...] hm, i cant see any difference between the removed and added lines. did i oversee something? greets, josef --=20 Josef El-Rayes (__) Email: josef@daemon.li \\\'',)=20 Web: http://daemon.li/ \/ \ ^ FreeBSD: josef@FreeBSD.org .\._/_) --=_daemon.li-32054-1095698925-0001-2 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iQEVAwUBQU8J7FnFItmnnbU8AQJXUwf9GMHkZ+3LufGeH26KMzQ7g6YB+xhXRKJe /Fz1VLs4afA79xTHo3cJ/5pVKS/A99HSOo6Yd5KQtxW+lDvHrVN5MrMJguVslr9s xG/N5e9UQJTcitmE95dzb/R3a+COhzhcg7e0YnuBaudIYyQODjSotf+thZ+TEcVQ sglltXBj0gLrSzenEaPdjoChQxCFH6tjKgQRXV0vfC7TNAxoEcDgoC6iZOgl0cqm uK2Q2WE4qQ9TGOzBelRC6DdkbPdnUVzDPxz6pvvzLbPUCM9CSM7yC7fcvEoPvC3j B3EU8hSm7v2n0tvhZaoGBRy9Lf7T52vX2B2fuARr9sSs4U2m8FRGrg== =0sUM -----END PGP SIGNATURE----- --=_daemon.li-32054-1095698925-0001-2-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 17:46:57 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DF9D16A4CE; Mon, 20 Sep 2004 17:46:57 +0000 (GMT) Received: from aker.isnic.is (aker.isnic.is [193.4.58.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AC9B43D31; Mon, 20 Sep 2004 17:46:57 +0000 (GMT) (envelope-from oli@aker.isnic.is) Received: by aker.isnic.is (Postfix, from userid 1000) id DF6288A1C4; Mon, 20 Sep 2004 17:46:55 +0000 (GMT) Date: Mon, 20 Sep 2004 17:46:55 +0000 From: Olafur Osvaldsson To: Josef El-Rayes Message-ID: <20040920174655.GA75532@isnic.is> Mail-Followup-To: Josef El-Rayes , freebsd-hackers@FreeBSD.org References: <20040920162241.GB1813@straylight.m.ringlet.net> <20040920164844.GA31656@daemon.li> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20040920164844.GA31656@daemon.li> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@FreeBSD.org Subject: Re: [CFR] Fix adduser's recognition of nologin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 17:46:57 -0000 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Josef, On Mon, 20 Sep 2004, Josef El-Rayes wrote: > hm, i cant see any difference between the removed and added lines. > did i oversee something? The check is moved to a new place in the script. /Oli --=20 Olafur Osvaldsson Systems Administrator Internet a Islandi hf. Tel: +354 525-5291 Email: oli@isnic.is --opJtzjQTFsWo+cga Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBTxeP8xNRBRknOFwRArvsAJsH2tNZPd+9YYD5HaG1PH4lMYiG+gCeMqZc 35EWJuRexp8hc1M5+os7eRY= =+foc -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 18:37:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B94216A4CE for ; Mon, 20 Sep 2004 18:37:53 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 659A243D1F for ; Mon, 20 Sep 2004 18:37:52 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.1/8.13.1) with ESMTP id i8KIbgWj008174; Mon, 20 Sep 2004 11:37:47 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200409201837.i8KIbgWj008174@gw.catspoiler.org> Date: Mon, 20 Sep 2004 11:37:42 -0700 (PDT) From: Don Lewis To: gerarra@tin.it In-Reply-To: <4146316C0000C7E2@ims3a.cp.tin.it> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-hackers@FreeBSD.org Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 18:37:53 -0000 On 20 Sep, gerarra@tin.it wrote: >> cat kern_syscalls.diff > --- kern_syscalls.c Sat Sep 18 13:42:21 2004 > +++ kern_syscalls2.c Mon Sep 20 14:18:45 2004 > @@ -58,6 +58,16 @@ > syscall_register(int *offset, struct sysent *new_sysent, > struct sysent *old_sysent) > { > +#ifndef __ia64__ > + if (new_sysent->sy_narg < 0 || new_sysent->sy_narg > MAX_SYSCALL_ARGS) > + { > + printf("Invalid sy_narg for syscall: boundary is [0 - %d]\n", > + MAX_SYSCALL_ARGS); > + return EINVAL; > + } > +#endif > + > + It would probably be better to change the #ifndef to #ifdef MAX_SYSCALL_ARGS I would also add new_sysent->sy_narg to the printf(). From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 19:13:12 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE67316A4CE; Mon, 20 Sep 2004 19:13:12 +0000 (GMT) Received: from mailhub.intercaf.ru (mailhub.intercaf.ru [195.96.167.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCB5443D4C; Mon, 20 Sep 2004 19:13:11 +0000 (GMT) (envelope-from lesha@intercaf.ru) Received: from [192.168.1.3] (ppp83-237-11-82.pppoe.mtu-net.ru [83.237.11.82]) (authenticated bits=0) by mailhub.intercaf.ru (8.12.10/8.12.10) with ESMTP id i8KJCRms038232; Mon, 20 Sep 2004 23:12:29 +0400 (MSD) (envelope-from lesha@intercaf.ru) From: Alex K Organization: www.intercaf.ru To: freebsd-hardware@freebsd.org Date: Mon, 20 Sep 2004 23:13:10 +0400 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <200409202313.10491.lesha@intercaf.ru> X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.5.6 (mailhub.intercaf.ru [195.96.167.50]); Mon, 20 Sep 2004 23:12:29 +0400 (MSD) cc: freebsd-hackers@freebsd.org Subject: Geode based PC/104 micro board and FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 19:13:13 -0000 Hello, everyone! Recently I've got PCM-5820 single board computer with Geode GX1-300 CPU. Mine is with 32M ram and 512M Compact Flash mapped to secondary IDE master. I have tried numerous times to install FreeBSD on it, but it hangs right after startup. I have tried 4.8, 5.2.1, and CURRENT, everything same :( I have also tried FreeSBIE LiveCD. If I boot it into single user mode, it is not dying. But during normal startup it is dying on 1st curses screen, right after selecting keyboard layout. Same with FreeBSD installation, dies right after "Probing devices, this can take a while... " dissapears. If I install FreeBSD to CF card on other PC and use this CF card to boot this machine, it will lockup 5-15 seconds after I login to it on the console. Any ideas how I can track down this problem? There are no panics, nothing, just a hardware lockup. I have tried tweaking all the avaible settings in BIOS. Windoze ME runs fine on it, even off Compact Flash card. For those who wants to see "the exterior": http://www.intercaf.ru/~lesha/server.jpg Cheers, AL. p.s. Please CC me! -- perl -e 'print unpack("u","1;&5S:&%`:6YT97)C868N 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 BF38216A4CE; Mon, 20 Sep 2004 20:03:15 +0000 (GMT) Received: from cydem.org (S0106000103ce4c9c.ed.shawcable.net [68.149.254.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EDC343D2F; Mon, 20 Sep 2004 20:03:15 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from S01060020ed3972ba.ed.shawcable.net (S01060020ed3972ba.ed.shawcable.net [68.149.254.42]) by cydem.org (Postfix/FreeBSD) with ESMTP id CA4EC3791E; Mon, 20 Sep 2004 14:03:14 -0600 (MDT) From: To: lesha@intercaf.ru, freebsd-hardware@freebsd.org Date: Mon, 20 Sep 2004 14:03:40 -0600 User-Agent: KMail/1.5.4 References: <200409202313.10491.lesha@intercaf.ru> In-Reply-To: <200409202313.10491.lesha@intercaf.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200409201403.40959.soralx@cydem.org> cc: freebsd-hackers@freebsd.org Subject: Re: Geode based PC/104 micro board and FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 20:03:15 -0000 > If I install FreeBSD to CF card on other PC and use this CF card to boot > this machine, it will lockup 5-15 seconds after I login to it on the > console. try booting without ACPI Timestamp: 0x414F3755 [SorAlx] http://cydem.org.ua/ ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 20:20:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4982E16A4CE; Mon, 20 Sep 2004 20:20:39 +0000 (GMT) Received: from cruzio.com (dsl3-63-249-85-132.cruzio.com [63.249.85.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4DDF43D1D; Mon, 20 Sep 2004 20:20:38 +0000 (GMT) (envelope-from brucem@mail.cruzio.com) Received: from mail.cruzio.com (localhost [127.0.0.1]) by cruzio.com (8.12.10/8.12.10) with ESMTP id i8KKLhPD000712; Mon, 20 Sep 2004 13:21:43 -0700 (PDT) (envelope-from brucem@mail.cruzio.com) Received: (from brucem@localhost) by mail.cruzio.com (8.12.10/8.12.10/Submit) id i8KKLhYw000711; Mon, 20 Sep 2004 13:21:43 -0700 (PDT) (envelope-from brucem) Date: Mon, 20 Sep 2004 13:21:43 -0700 (PDT) From: "Bruce R. Montague" Message-Id: <200409202021.i8KKLhYw000711@mail.cruzio.com> To: freebsd-hardware@freebsd.org cc: freebsd-hackers@freebsd.org cc: freebsd-hardware@freebsd.org Subject: Re: Geode based PC/104 micro board and FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 20:20:39 -0000 Hi, very likely you have hit a known issue on the original Geode. In "generic_bcopy" in "i386/support.s" FreeBSD occasionally does a byte-aliged long rep move in the video buffer that locks the geode hard. See the patches at the following (it is a trivial patch): 63.249.85.132 63.249.85.132/geode.html 63.249.85.132/geode.html#patch_bcopy If you have no other means to fix this, there is an old 4.7 patched CD image at the above site that will boot on the Geode. I'm guilty of not submitting this as some sort of patch; it seemed a few years went by and there was no need/interest. The Soekris apparently never exercises this video code. I'll look at this again if I have time. The Geode II (and maybe other geode variants) supposedly don't have this problem, but I don't know... - bruce From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 10:02:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D87CF16A4CE; Tue, 21 Sep 2004 10:02:25 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9051743D4C; Tue, 21 Sep 2004 10:02:25 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id B72AD653B5; Tue, 21 Sep 2004 11:02:24 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22905-02; Tue, 21 Sep 2004 11:02:24 +0100 (BST) Received: from empiric.dek.spc.org (adsl-67-121-95-65.dsl.snfc21.pacbell.net [67.121.95.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id A265E65213; Tue, 21 Sep 2004 11:02:23 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 0F3BA6455; Tue, 21 Sep 2004 03:02:20 -0700 (PDT) Date: Tue, 21 Sep 2004 03:02:20 -0700 From: Bruce M Simpson To: Max Laier Message-ID: <20040921100220.GC842@empiric.icir.org> Mail-Followup-To: Max Laier , freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org, freebsd-net@freebsd.org References: <200409200250.49518.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <200409200250.49518.max@love2party.net> cc: freebsd-hackers@freebsd.org cc: freebsd-net@freebsd.org cc: freebsd-standards@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 10:02:26 -0000 --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 20, 2004 at 02:50:40AM +0200, Max Laier wrote: > My question now is, what would be a good place to define this? Are there = any=20 > fromal standarts that might define it already? (Couldn't find anything) I= s=20 > there anything else that I must consider? I think Brooks' recommendation is sound and should probably be followed as it's fairly close to my original recommendation to you in private. The problem is that the definition of the union depends on what you wish to use it for, and which address families are visible to the application or kernel module which is using the definition. You may find that such a definition has to have conditionalized members. This is usually not a problem so long as they are all the same size. And a sockaddr union embedded in a struct probably should have a member with type 'struct sockaddr_storage' if it's to support all address families in future, although this commits more storage in the enclosing struct and may waste space in some cases. As you point out, you cannot do this in pf, as it defeats the intent of keeping larger members out of the table in the first place, and the union is there to make some casts go away. If it's any consolation, I'm going through very similar pain with XORP's new firewall manager right now with respect to address families (and templatized C++ classes). Regards, BMS --FCuugMFkClbJLl1L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQFBT/wsueUpAYYNtTsRAnCbAKCZrI2SsVz6q/Uu0loceoJREQc/zACggs6O e98ZL0h6Z/r8TWtUkJ8P+30= =buDH -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L-- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 11:37:18 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5246C16A4CE for ; Tue, 21 Sep 2004 11:37:18 +0000 (GMT) Received: from mail.loproc.dk (port493.ds1-rd.adsl.cybercity.dk [217.157.172.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id B91F443D45 for ; Tue, 21 Sep 2004 11:37:15 +0000 (GMT) (envelope-from db@traceroute.dk) Received: by mail.loproc.dk (Postfix, from userid 48) id AAAA71FD150; Tue, 21 Sep 2004 13:38:17 +0200 (CEST) Received: from port493.ds1-rd.adsl.cybercity.dk (port493.ds1-rd.adsl.cybercity.dk [217.157.172.248]) by mail.loproc.dk (IMP) with HTTP for ; Tue, 21 Sep 2004 13:38:17 +0200 Message-ID: <1095766697.415012a97c849@mail.loproc.dk> Date: Tue, 21 Sep 2004 13:38:17 +0200 From: DB To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.2 X-Originating-IP: 217.157.172.248 Subject: Raid problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 11:37:18 -0000 Hi all I'm trying to install FreeBSD 5.3-Beta5 on a friend's server. He has a promise fasttracks SX4000 raid controller (raid level 5), but when booting freebsd we get a list of all the 4 disks. Is that right? (haven't tried installing freebsd on a raid computer). I've tried install freebsd on one of the disks, but when I restart the computer, it says it can't find /boot/kernel? A fast reply or a link to a howto would be much appreciated. br db and mk From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 15:36:33 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB05716A4CE for ; Mon, 20 Sep 2004 15:36:33 +0000 (GMT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (80-219-163-62.dclient.hispeed.ch [80.219.163.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC78943D3F for ; Mon, 20 Sep 2004 15:36:31 +0000 (GMT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [2002:50db:a33e:0:220:afff:fed4:dbcb]) (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id i8KFaOp01020 verified NO) for ; Mon, 20 Sep 2004 17:36:29 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.11.6/FNORD) id i8KFaNN01019; Mon, 20 Sep 2004 17:36:23 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Mon, 20 Sep 2004 17:36:23 +0200 (CEST) Message-Id: <200409201536.i8KFaNN01019@Mail.NOSPAM.DynDNS.dK> X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: beer set sender to bounce@NOSPAM.dyndns.dk using -f X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed from queue /tmp X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed by beer with -C /etc/mail/sendmail.cf-LOCAL From: Barry Bouwsma References: <200408291408.i7TE8uG02335@Mail.NOSPAM.DynDNS.dK> <16691.33991.798380.110797@guru.mired.org> To: freebsd-hackers@freebsd.org X-Mailman-Approved-At: Tue, 21 Sep 2004 11:53:04 +0000 Subject: Re: probe ordering of interfaces X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 15:36:33 -0000 Mike Meyer wrote: > > Even more specifically, I have a drive that I either attach > > via firewire on one machine, or via USB on a different box. > > I wish this drive to always be da0. I can connect it to a > You can do this in the config file. > device ahc0 # AHA2940 and onboard AIC7xxx devices > device scbus0 at ahc0 # SCSI bus (required) Ah, thanks. Ah, hmmm. Ah, yes. Ah, oh no. Hmmm, you see, at the moment, I'm using kernel modules for my firewire and also usb support. (I'm not even sure I could build a kernel from the same code base, without a bunch of work to track down where I've hid the hacked source for the usb support, in particular, if I'd want to -- the ease with which I can add and back out, say, ehci awareness is one reason why I'm not yet ready to change.) I suspect that I'll have to wake up a bit and grovel around in the source to get things working for me... Thanks for the reply anyway. barry bouwsma From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 20 19:11:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51E1816A4CE; Mon, 20 Sep 2004 19:11:46 +0000 (GMT) Received: from mail.dt.e-technik.uni-dortmund.de (krusty.dt.e-technik.Uni-Dortmund.DE [129.217.163.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3313F43D5A; Mon, 20 Sep 2004 19:11:45 +0000 (GMT) (envelope-from ma@dt.e-technik.uni-dortmund.de) Received: from localhost (localhost [127.0.0.1])28AF13F69E; Mon, 20 Sep 2004 21:11:44 +0200 (CEST) Received: from mail.dt.e-technik.uni-dortmund.de ([127.0.0.1]) by localhost (krusty [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30720-01-5; Mon, 20 Sep 2004 21:11:44 +0200 (CEST) Received: from m2a2.dyndns.org (p508EEE7E.dip.t-dialin.net [80.142.238.126]) D02EC3F69A; Mon, 20 Sep 2004 21:11:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id C2BF1D1F96; Mon, 20 Sep 2004 21:11:38 +0200 (CEST) Received: from merlin.emma.line.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01064-03-2; Mon, 20 Sep 2004 21:11:38 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 3391CC9FB3; Mon, 20 Sep 2004 21:11:38 +0200 (CEST) To: freebsd-current@freebsd.org, re@freebsd.org, freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org Mail-Followup-To: freebsd-standards@freebsd.org From: Matthias Andree Date: Mon, 20 Sep 2004 21:11:38 +0200 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at dt.e-technik.uni-dortmund.de X-Mailman-Approved-At: Tue, 21 Sep 2004 11:53:04 +0000 Subject: PATCH: fix bogus "unset" abort in /bin/sh (been pending for TWO YEARS) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-standards@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 19:11:46 -0000 [WARNING: Reply-To and Mail-Followup-To set to funnel the discussion.] Greetings, FreeBSD's /bin/sh has a long-standing bug that causes premature abort of a script when set -e is set and a nonexistant variable is unset. This violates IEEE Std 1003.1 and harms portability of scripts to FreeBSD. http://www.opengroup.org/onlinepubs/009695399/utilities/unset.html Either test of these must print "good" else the shell is b0rked: /bin/sh -c 'set -e ; BONK= ; unset BONK ; unset BONK ; echo good' /bin/sh -c 'set -e ; f() { :; } ; unset -f f ; unset -f f ; echo good' After merging the patch below and MFC'ing, please close standards/45738. This patch (against 5.3-BETA) fixes the problems for me (yes I know it is not very helpful without more context but I can't paste half the files here for the mailing list): --- src/bin/sh/exec.c.orig Thu Apr 15 05:08:30 2004 +++ src/bin/sh/exec.c Sat Sep 18 13:16:34 2004 @@ -701,7 +701,7 @@ delete_cmd_entry(); return (0); } - return (1); + return (0); } /* --- src/bin/sh/var.c.orig Thu Apr 15 05:08:31 2004 +++ src/bin/sh/var.c Sat Sep 18 13:16:34 2004 @@ -761,7 +761,7 @@ } } - return (1); + return (0); } -- Matthias Andree Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred) From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 12:43:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70F4616A4CE for ; Tue, 21 Sep 2004 12:43:31 +0000 (GMT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3274543D48 for ; Tue, 21 Sep 2004 12:43:31 +0000 (GMT) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id F1B423D3E; Tue, 21 Sep 2004 08:43:29 -0400 (EDT) From: "Dan Langille" To: DB Date: Tue, 21 Sep 2004 08:42:28 -0400 MIME-Version: 1.0 Message-ID: <414FE974.8902.42553AD3@localhost> Priority: normal In-reply-to: <1095766697.415012a97c849@mail.loproc.dk> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body cc: hackers@freebsd.org Subject: Re: Raid problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 12:43:31 -0000 On 21 Sep 2004 at 13:38, DB wrote: > Hi all > > I'm trying to install FreeBSD 5.3-Beta5 on a friend's server. He has a promise > fasttracks SX4000 raid controller (raid level 5), but when booting freebsd we > get a list of all the 4 disks. Is that right? (haven't tried installing freebsd > on a raid computer). You are asking on the wrong list. Ask on questions@. -- Dan Langille : http://www.langille.org/ BSDCan - The Technical BSD Conference - http://www.bsdcan.org/ From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 12:56:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D997816A4CE for ; Tue, 21 Sep 2004 12:56:56 +0000 (GMT) Received: from titan.whee.org (titan.whee.org [207.195.206.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D05D43D2F for ; Tue, 21 Sep 2004 12:56:56 +0000 (GMT) (envelope-from adam@whee.org) Received: from titan.whee.org (localhost [127.0.0.1]) by titan.whee.org (8.12.9/8.12.9) with ESMTP id i8LCjoTr013548; Tue, 21 Sep 2004 07:45:50 -0500 (CDT) Received: from localhost (adam@localhost) by titan.whee.org (8.12.9/8.12.9/Submit) with SMTP id i8LCjoGI013545; Tue, 21 Sep 2004 07:45:50 -0500 (CDT) X-Authentication-Warning: titan.whee.org: adam owned process doing -bs Date: Tue, 21 Sep 2004 07:45:50 -0500 (CDT) From: Adam Maloney X-Sender: adam@titan To: DB In-Reply-To: <1095766697.415012a97c849@mail.loproc.dk> Message-ID: X-GPG-FINGERPRINT: E39B 8D34 5F0A EA2E 4CCA 5B1D 8D55 7C25 0061 10AF X-GPG-PUBLIC_KEY: http://www.whee.org/~adam/adam-whee-org-pubkey.asc MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: Raid problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 12:56:57 -0000 > I'm trying to install FreeBSD 5.3-Beta5 on a friend's server. He has a promise > fasttracks SX4000 raid controller (raid level 5), but when booting freebsd we > get a list of all the 4 disks. Is that right? (haven't tried installing freebsd > on a raid computer). I've tried install freebsd on one of the disks, but when I > restart the computer, it says it can't find /boot/kernel? This might be a stupid question, but has the RAID been setup in the FastTrack BIOS? I think by default, if you just pop the card in and hook up 4 drives, you'll see 4 drives, unless you go into it's config utility and define an array. If this has already been done, you might go back into it and make sure that it's still there. From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 13:30:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59D2E16A4CE for ; Tue, 21 Sep 2004 13:30:04 +0000 (GMT) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B6D343D49 for ; Tue, 21 Sep 2004 13:30:03 +0000 (GMT) (envelope-from sos@DeepCore.dk) Received: from [194.192.25.143] (laptop.deepcore.dk [194.192.25.143]) by spider.deepcore.dk (8.12.11/8.12.10) with ESMTP id i8LDU1T0080764; Tue, 21 Sep 2004 15:30:01 +0200 (CEST) (envelope-from sos@DeepCore.dk) Message-ID: <41502CD2.2040707@DeepCore.dk> Date: Tue, 21 Sep 2004 15:29:54 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Mozilla Thunderbird 0.7.2 (X11/20040802) X-Accept-Language: en-us, en MIME-Version: 1.0 To: DB References: <1095766697.415012a97c849@mail.loproc.dk> In-Reply-To: <1095766697.415012a97c849@mail.loproc.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable cc: hackers@freebsd.org Subject: Re: Raid problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 13:30:04 -0000 DB wrote: > Hi all >=20 > I'm trying to install FreeBSD 5.3-Beta5 on a friend's server. He has a = promise > fasttracks SX4000 raid controller (raid level 5), but when booting free= bsd we > get a list of all the 4 disks. Is that right? (haven't tried installing= freebsd > on a raid computer). I've tried install freebsd on one of the disks, bu= t when I > restart the computer, it says it can't find /boot/kernel? >=20 > A fast reply or a link to a howto would be much appreciated. As stated several times on the lists and cvs/status logs, the SX4000 is=20 only supported as RAID0 and RAID1, *not* in RAID5 mode. --=20 -S=F8ren From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 16:12:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A32916A4D1; Tue, 21 Sep 2004 16:12:10 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65E9343D1F; Tue, 21 Sep 2004 16:12:06 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8LGEKR4023672; Tue, 21 Sep 2004 09:14:21 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8LGEKi4023671; Tue, 21 Sep 2004 09:14:20 -0700 Date: Tue, 21 Sep 2004 09:14:20 -0700 From: Brooks Davis To: Max Laier , freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org, freebsd-net@freebsd.org Message-ID: <20040921161420.GA17290@odin.ac.hmc.edu> References: <200409200250.49518.max@love2party.net> <20040921100220.GC842@empiric.icir.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <20040921100220.GC842@empiric.icir.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=3.0 required=8.0 tests=SUSPICIOUS_RECIPS autolearn=no version=2.63 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 16:12:10 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 21, 2004 at 03:02:20AM -0700, Bruce M Simpson wrote: > On Mon, Sep 20, 2004 at 02:50:40AM +0200, Max Laier wrote: > > My question now is, what would be a good place to define this? Are ther= e any=20 > > fromal standarts that might define it already? (Couldn't find anything)= Is=20 > > there anything else that I must consider? >=20 > I think Brooks' recommendation is sound and should probably be followed > as it's fairly close to my original recommendation to you in private. >=20 > The problem is that the definition of the union depends on what you wish > to use it for, and which address families are visible to the application > or kernel module which is using the definition. The real problem may be that KAME mistakenly gave sockaddr_union a general name when it isn't and such a type would be hell to actually work with. A custom union that does exactly what pf needs may be the best approach. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBUFNcXY6L6fI4GtQRAmqKAKDCDS6aW5tOLvwi5OE7cOny3qj6xgCfRBDr 0QaUauCEGn2Ij3DHL0SBPwg= =5V32 -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0-- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 17:09:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0EA5416A4CE; Tue, 21 Sep 2004 17:09:29 +0000 (GMT) Received: from cheer.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77B2043D3F; Tue, 21 Sep 2004 17:09:28 +0000 (GMT) (envelope-from ume@FreeBSD.org) Received: from lyrics.mahoroba.org (IDENT:9kBdVg6hWs9CTiaZ5lSoJ4DoJ3SyWu3oLpw0YErULbFeN7uGd/W9zJAlIDdVvliL@lyrics.mahoroba.org [IPv6:3ffe:501:185b:8010:280:88ff:fe03:4841]) (user=ume mech=CRAM-MD5 bits=0)i8LH9CAr031165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Sep 2004 02:09:20 +0900 (JST) (envelope-from ume@FreeBSD.org) Date: Wed, 22 Sep 2004 02:09:11 +0900 Message-ID: From: Hajimu UMEMOTO To: Brooks Davis In-Reply-To: <20040921161420.GA17290@odin.ac.hmc.edu> References: <200409200250.49518.max@love2party.net> <20040921100220.GC842@empiric.icir.org> <20040921161420.GA17290@odin.ac.hmc.edu> User-Agent: xcite1.38> Wanderlust/2.11.3 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 5.3-BETA5 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.64 X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cheer.mahoroba.org cc: Max Laier cc: freebsd-net@freebsd.org cc: freebsd-standards@freebsd.org cc: freebsd-hackers@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 17:09:29 -0000 Hi, >>>>> On Tue, 21 Sep 2004 09:14:20 -0700 >>>>> Brooks Davis said: brooks> The real problem may be that KAME mistakenly gave sockaddr_union a brooks> general name when it isn't and such a type would be hell to actually brooks> work with. A custom union that does exactly what pf needs may be the brooks> best approach. I believe KAME doesn't use non standard struct such as sock_union. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 17:13:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE7CD16A4CE; Tue, 21 Sep 2004 17:13:24 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BCDF43D31; Tue, 21 Sep 2004 17:13:24 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8LHFdOe031312; Tue, 21 Sep 2004 10:15:39 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8LHFd0h031311; Tue, 21 Sep 2004 10:15:39 -0700 Date: Tue, 21 Sep 2004 10:15:39 -0700 From: Brooks Davis To: Hajimu UMEMOTO Message-ID: <20040921171539.GA30996@odin.ac.hmc.edu> References: <200409200250.49518.max@love2party.net> <20040921100220.GC842@empiric.icir.org> <20040921161420.GA17290@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-net@FreeBSD.org cc: freebsd-arch@FreeBSD.org cc: freebsd-hackers@FreeBSD.org cc: Max Laier cc: freebsd-standards@FreeBSD.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 17:13:24 -0000 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 22, 2004 at 02:09:11AM +0900, Hajimu UMEMOTO wrote: > Hi, >=20 > >>>>> On Tue, 21 Sep 2004 09:14:20 -0700 > >>>>> Brooks Davis said: >=20 > brooks> The real problem may be that KAME mistakenly gave sockaddr_union a > brooks> general name when it isn't and such a type would be hell to actua= lly > brooks> work with. A custom union that does exactly what pf needs may be= the > brooks> best approach. >=20 > I believe KAME doesn't use non standard struct such as sock_union. Oops, you are correct, it's part of fastipsec, not KAME. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBUGG7XY6L6fI4GtQRAmuhAJ9RmMTuSRuAs9YIhRNJ55xq0k1KgwCfY/y3 zqiSVO6mzuxWu2C7MB4GKi8= =lDSM -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu-- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 22:14:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABC1116A4CE for ; Tue, 21 Sep 2004 22:14:38 +0000 (GMT) Received: from ack.Berkeley.EDU (ack.berkeley.edu [128.32.206.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C06443D2F for ; Tue, 21 Sep 2004 22:14:38 +0000 (GMT) (envelope-from mhunter@ack.Berkeley.EDU) Received: (from mhunter@localhost) by ack.Berkeley.EDU (8.11.3/8.11.3) id i8LMEcb29509 for freebsd-hackers@freebsd.org; Tue, 21 Sep 2004 15:14:38 -0700 (PDT) Date: Tue, 21 Sep 2004 15:14:38 -0700 From: Mike Hunter To: freebsd-hackers@freebsd.org Message-ID: <20040921221438.GA28757@ack.Berkeley.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: gdb attach on 5.3-beta5? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 22:14:38 -0000 Hi, I am having problems with gdb attach. I wrote a demo script that just prints out it's pid over and over, then tried to sick gdb on it: #gdb6 program 29353 GNU gdb 20040720 [GDB v6.x for FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-portbld-freebsd5.2"...program: No such file or directory. Attaching to process 29353 solib-svr4.c:1307: internal-error: legacy_fetch_link_map_offsets called without legacy link_map support enabled. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y solib-svr4.c:1307: internal-error: legacy_fetch_link_map_offsets called without legacy link_map support enabled. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) n The program itself appears to get KILL, aka it says "Killed". Same results for gdb and gdb6. Is this a known issue? Help will likely enable me to post a question about why my X server is crashing :) Thanks, Mike From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 22:58:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3875016A4CE for ; Tue, 21 Sep 2004 22:58:46 +0000 (GMT) Received: from mailserv1.neuroflux.com (mailserv1.neuroflux.com [204.228.228.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id D31A943D2D for ; Tue, 21 Sep 2004 22:58:45 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: (qmail 71797 invoked by uid 89); 21 Sep 2004 23:05:24 -0000 Received: from unknown (HELO www2.neuroflux.com) (127.0.0.1) by localhost with SMTP; 21 Sep 2004 23:05:24 -0000 Received: from 216.160.49.134 (SquirrelMail authenticated user ryans@gamersimpact.com) by www2.neuroflux.com with HTTP; Tue, 21 Sep 2004 17:05:24 -0600 (MDT) Message-ID: <1173.216.160.49.134.1095807924.squirrel@www2.neuroflux.com> In-Reply-To: <20040921221438.GA28757@ack.Berkeley.EDU> References: <20040921221438.GA28757@ack.Berkeley.EDU> Date: Tue, 21 Sep 2004 17:05:24 -0600 (MDT) From: "Ryan Sommers" To: "Mike Hunter" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: freebsd-hackers@freebsd.org Subject: Re: gdb attach on 5.3-beta5? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 22:58:46 -0000 Short answer, you still need to supply GDB with the executable name. do 'gdb -p /path/to/executable'. Long answer: http://00f.net/blogs/index.php/2004/09/11/p98 Hope this helps! -- Ryan Sommers ryans@gamersimpact.com Mike Hunter said: > Hi, > > I am having problems with gdb attach. I wrote a demo script that just > prints out it's pid over and over, then tried to sick gdb on it: > > #gdb6 program 29353 > GNU gdb 20040720 [GDB v6.x for FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "i386-portbld-freebsd5.2"...program: No such > file or directory. > > Attaching to process 29353 > solib-svr4.c:1307: internal-error: legacy_fetch_link_map_offsets called > without legacy link_map support enabled. > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Quit this debugging session? (y or n) y > > solib-svr4.c:1307: internal-error: legacy_fetch_link_map_offsets called > without legacy link_map support enabled. > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Create a core file of GDB? (y or n) n > > The program itself appears to get KILL, aka it says "Killed". > > Same results for gdb and gdb6. Is this a known issue? > > Help will likely enable me to post a question about why my X server is > crashing :) > > Thanks, > > Mike > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 08:58:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FEBC16A4CE for ; Wed, 22 Sep 2004 08:58:06 +0000 (GMT) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89E2843D1D for ; Wed, 22 Sep 2004 08:58:06 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1CA2wv-0004vF-1P for freebsd-hackers@freebsd.org; Wed, 22 Sep 2004 10:58:05 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 22 Sep 2004 10:58:04 +0200 From: Danny Braniss Message-Id: <20040922085806.89E2843D1D@mx1.FreeBSD.org> Subject: Dell gx280 and acpi problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 08:58:07 -0000 could some acpi expert shed some light? -current panics on boot with BIOS default settings (Suspend Mode is S3) fix: set Power Management/Suspend Mode to S1 in BIOS disabling ACPI on boot is not good, since this box has no PS/2, and the USB keyboard/mouse don't work with ACPI off. the acpi dumps are available from: ftp://ftp.cs.huji.ac.il/users/danny/freebsd/gx280 this is the panic: KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.3-BETA5 #14: Tue Sep 21 13:44:32 IDT 2004 danny@new-dev:/r+d/obj/new-dev/r+d/5.3/src/sys/HUJI Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2992.52-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf34 Stepping = 4 Features=0xbfebfbff Hyperthreading: 2 logical CPUs real memory = 1063813120 (1014 MB) avail memory = 1031565312 (983 MB) kernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x1c fault code = supervisor write, page not present instruction pointer = 0x8:0xc075dab5 stack pointer = 0x10:0xc0c21be0 frame pointer = 0x10:0xc0c21cac code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 0 () [thread 0] Stopped at vm_fault+0x1b1: lock cmpxchgl %ecx,0x1c(%edx) db> trace vm_fault(c103a000,c1004000,1,0,c08e36c0) at vm_fault+0x1b1 trap_pfault(c0c21d14,0,c1004c29) at trap_pfault+0x184 trap(fffd0018,c1000010,c0c20010,c1004bfd,7) at trap+0x2f1 calltrap() at calltrap+0x5 --- trap 0xc, eip = 0xc0a18574, esp = 0xc0c21d54, ebp = 0xc0c21d74 --- madt_probe(c22264f0,c08bb1f0,c0c21d98,c05e8302,0) at madt_probe+0x174 apic_init(0,c1ec00,c1e000,0,c0441225) at apic_init+0x47 mi_startup() at mi_startup+0x96 begin() at begin+0x2c From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 21 22:31:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B285716A4CE for ; Tue, 21 Sep 2004 22:31:46 +0000 (GMT) Received: from hotmail.com (bay13-f6.bay13.hotmail.com [64.4.31.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98CBC43D41 for ; Tue, 21 Sep 2004 22:31:46 +0000 (GMT) (envelope-from vijju_s@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 21 Sep 2004 15:31:46 -0700 Received: from 206.132.194.2 by by13fd.bay13.hotmail.msn.com with HTTP; Tue, 21 Sep 2004 22:31:46 GMT X-Originating-IP: [206.132.194.2] X-Originating-Email: [vijju_s@hotmail.com] X-Sender: vijju_s@hotmail.com From: "vijay singh" To: freebsd-hackers@freebsd.org Date: Tue, 21 Sep 2004 15:31:46 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 21 Sep 2004 22:31:46.0540 (UTC) FILETIME=[C743DAC0:01C4A02A] X-Mailman-Approved-At: Wed, 22 Sep 2004 12:11:50 +0000 Subject: jump from kernel to loader X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 22:31:46 -0000 hello, i have some exposure to the freebsd code, but not extensive. i am reading the sys/boot code, and saw that the 3 stage boot process involves a jump from the loader to the kernel in the last phase. i was wondering if it is possible to engineer the kernel to jump back to the loader in some special cases? kindly cc me as i am not on the list. br vijay From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 08:50:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4D4916A4CE for ; Wed, 22 Sep 2004 08:50:01 +0000 (GMT) Received: from hotmail.com (bay1-f12.bay1.hotmail.com [65.54.245.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CBD143D41 for ; Wed, 22 Sep 2004 08:50:01 +0000 (GMT) (envelope-from kylincsos@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 22 Sep 2004 01:50:01 -0700 Received: from 61.187.16.2 by by1fd.bay1.hotmail.msn.com with HTTP; Wed, 22 Sep 2004 08:49:11 GMT X-Originating-IP: [61.187.16.2] X-Originating-Email: [kylincsos@hotmail.com] X-Sender: kylincsos@hotmail.com From: "Gordon David" To: freebsd-hackers@freebsd.org Date: Wed, 22 Sep 2004 08:49:11 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Message-ID: X-OriginalArrivalTime: 22 Sep 2004 08:50:01.0142 (UTC) FILETIME=[255EED60:01C4A081] X-Mailman-Approved-At: Wed, 22 Sep 2004 12:11:50 +0000 Subject: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 08:50:01 -0000 Hello, I have a question. Anyone would like to tell me how to execute a user process or shell script in the kernel? As we know, the kernel forks a process named initproc and executes /sbin/init, etc. If I want to execute a user level process, such as a simple printf("Hello world") in a driver, what shall I do? Thanks Gordon _________________________________________________________________ ÏíÓÃÊÀœçÉÏ×îŽóµÄµç×ÓÓÊŒþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 13:25:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E956416A4CE for ; Wed, 22 Sep 2004 13:25:50 +0000 (GMT) Received: from mailserv1.neuroflux.com (mailserv1.neuroflux.com [204.228.228.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EA0A43D45 for ; Wed, 22 Sep 2004 13:25:50 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: (qmail 93408 invoked by uid 89); 22 Sep 2004 13:32:31 -0000 Received: from unknown (HELO www2.neuroflux.com) (127.0.0.1) by localhost with SMTP; 22 Sep 2004 13:32:31 -0000 Received: from 216.160.49.134 (SquirrelMail authenticated user ryans@gamersimpact.com) by www2.neuroflux.com with HTTP; Wed, 22 Sep 2004 07:32:31 -0600 (MDT) Message-ID: <1115.216.160.49.134.1095859951.squirrel@www2.neuroflux.com> In-Reply-To: References: Date: Wed, 22 Sep 2004 07:32:31 -0600 (MDT) From: "Ryan Sommers" To: "vijay singh" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: freebsd-hackers@freebsd.org Subject: Re: jump from kernel to loader X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 13:25:51 -0000 vijay singh said: > hello, i have some exposure to the freebsd code, but not extensive. i am > reading the sys/boot code, and saw that the 3 stage boot process involves > a > jump from the loader to the kernel in the last phase. i was wondering if > it > is possible to engineer the kernel to jump back to the loader in some > special cases? > > kindly cc me as i am not on the list. > > br > vijay > It is my understanding that after jumping to the kernel the kernel assumes control of all of memory, including where the loader is currently loaded. In that case it would be impossible to jump back to the loader without first being sure to reload it into memory. I could be wrong on this however. -- Ryan Sommers ryans@gamersimpact.com From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 15:09:00 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36AFC16A4CE for ; Wed, 22 Sep 2004 15:09:00 +0000 (GMT) Received: from lakermmtao11.cox.net (lakermmtao11.cox.net [68.230.240.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACDCC43D1D for ; Wed, 22 Sep 2004 15:08:59 +0000 (GMT) (envelope-from bagus@cox.net) Received: from bagus ([24.252.67.59]) by lakermmtao11.cox.net (InterMail vM.6.01.03.04 201-2131-111-106-20040729) with SMTP id <20040922150859.ERJE14273.lakermmtao11.cox.net@bagus>; Wed, 22 Sep 2004 11:08:59 -0400 From: "Bagus" To: Date: Wed, 22 Sep 2004 10:13:47 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 In-Reply-To: <20040904004037.GA42666@marvin.home.local> cc: Tony Frank Subject: RE: slow login, app launching, etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 15:09:00 -0000 Thanks Tony! I'd been moving and offline for a while, but coming back to this email inspired me to look at my resolve.conf one more time and try using names instead of ip numbers. Upon reboot, everything is lickedy split fast. y'all can check out my ancient java server now up at http://www.bagus.org/ It's kind of a content management tool. Sign the guestbook! It's under Community. There's some stuff about me up at http://www.bagus.org/people/bagus/ Long live 2.2CAM-19980716-SNAP! Bagus > -----Original Message----- > From: Tony Frank [mailto:tfrank@optushome.com.au] > Sent: Friday, September 03, 2004 7:41 PM > To: Bagus > Cc: freebsd-hackers@freebsd.org > Subject: Re: slow login, app launching, etc > > > Hi there, > > On Wed, Sep 01, 2004 at 08:25:20AM -0500, Bagus wrote: > > > > Hi, is anyone able to help me problem solve on this? Is this the right > > forum for this kind of question? If not, could someone please send me a > > pointer to an organization that might be able to help. I have a > small budget > > to get this fixed if anyone wants it. > > > > I'm running FreeBSD 2.2CAM-19980716-SNAP on bagus.org. > > > > I've been running it for a few years. Recently, after normal > performance, > > I've been experiencing extremely slow login prompt appearance, > extremely > > slow application launching and what bugs me the most is the > extremely slow > > response time of my java-web server. OTher functionality is > ok. It serves > > html files just fine and also basic command line response is fine. > > > > Anyone out there have any clues as to what it could be? I'm kind > > of guessing it has something to do with some name resolution > somewhere, > > but I'm not sure. Any help would be greatly appreciated. > > Try checking your DNS setup; it may have changed? > > I often see this kind of behaviour when the host tries to perform > reverse lookup on IP addresses. > If DNS is configured incorrectly (eg non existant DNS server) the query > times out (takes maybe 75s for default bind resolver) instead of returning > an error or whatever. > > /etc/resolv.conf and /etc/hosts are good places to start. > > Regards, > > Tony From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 16:16:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA8B816A4CF for ; Wed, 22 Sep 2004 16:16:44 +0000 (GMT) Received: from ack.Berkeley.EDU (ack.berkeley.edu [128.32.206.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id B650343D46 for ; Wed, 22 Sep 2004 16:16:42 +0000 (GMT) (envelope-from mhunter@ack.Berkeley.EDU) Received: (from mhunter@localhost) by ack.Berkeley.EDU (8.11.3/8.11.3) id i8MGGfR13237; Wed, 22 Sep 2004 09:16:41 -0700 (PDT) Date: Wed, 22 Sep 2004 09:16:41 -0700 From: Mike Hunter To: Ryan Sommers Message-ID: <20040922161640.GA12805@ack.Berkeley.EDU> References: <20040921221438.GA28757@ack.Berkeley.EDU> <1173.216.160.49.134.1095807924.squirrel@www2.neuroflux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1173.216.160.49.134.1095807924.squirrel@www2.neuroflux.com> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: gdb attach on 5.3-beta5? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 16:16:45 -0000 On Sep 21, "Ryan Sommers" wrote: [snip gdb attach stuff] > Short answer, you still need to supply GDB with the executable name. do > 'gdb -p /path/to/executable'. > > Long answer: http://00f.net/blogs/index.php/2004/09/11/p98 > > Hope this helps! Thanks! With the correct syntax, I am now able to completely lock up my box :| If I get motivated enough to do serial console kernel debugging I'll write back. Mike From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 17:40:15 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A66B116A5BC for ; Wed, 22 Sep 2004 17:40:15 +0000 (GMT) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1DCC43D2D for ; Wed, 22 Sep 2004 17:40:12 +0000 (GMT) (envelope-from rionda@gufi.org) Received: from kaiser.sig11.org (82.52.116.89) by vsmtp3.tin.it (7.0.027) id 414B175C00218C3B for freebsd-hackers@freebsd.org; Wed, 22 Sep 2004 19:40:12 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by kaiser.sig11.org (Postfix) with ESMTP id 78E4CB5 for ; Wed, 22 Sep 2004 19:40:10 +0200 (CEST) From: Matteo Riondato To: freebsd-hackers@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-jJu8oIZM81uXEI7tXbnm" Message-Id: <1095874809.50307.59.camel@kaiser.sig11.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 22 Sep 2004 19:40:10 +0200 Subject: Some questions about jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: rionda@gufi.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 17:40:15 -0000 --=-jJu8oIZM81uXEI7tXbnm Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello hackers! I've a few questions about jail(8) and hope you'll be so kind to answer them =3D) First of all: Why is procfs(5) required inside a jail (speaking about 5.x and 6) ? " As procfs is considered deprecated due to its inherent security risks",why should it be used inside a jail? Second question: why does an "ifconfig" from inside a jail list every network card present in the host system? Wouldn't it be better if only lo0 and the interface with the jail IP are listed ? I think it will, because it's my personal opinion (please refute me, I can be wrong) that one jail's purpouses is to fool the jail users, making them believe that they are inside a real system. I came to this conclusion reading about security.jail.getfstatroot_only in jail(8). Thank you in advance for your replies. Best Regards --=20 Rionda aka Matteo Riondato GUFI Staff Member (http://www.gufi.org) FreeSBIE Developer (http://www.freesbie.org) BSD-FAQ-it Main Developer (http://www.gufi.org/~rionda) Sent from: kaiser.sig11.org running FreeBSD-6.0-CURRENT --=-jJu8oIZM81uXEI7tXbnm Content-Type: application/pgp-signature; name=signature.asc Content-Description: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQBBUbj52Mp4pR7Fa+wRAk8MAJ0QA4QT62V087xjhecCPECcU45Q3wCgyFUv YYXhkCv7WeSRYr/p2nHLkNw= =wNlf -----END PGP SIGNATURE----- --=-jJu8oIZM81uXEI7tXbnm-- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 18:02:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63DEE16A4CE for ; Wed, 22 Sep 2004 18:02:29 +0000 (GMT) Received: from mta2.rdslink.ro (emta2.rdslink.ro [193.231.236.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id D991043D67 for ; Wed, 22 Sep 2004 18:02:27 +0000 (GMT) (envelope-from dr.clau@rdslink.ro) Received: (qmail 7693 invoked from network); 22 Sep 2004 17:57:12 -0000 Received: from unknown (HELO mail.rdslink.ro) (193.231.236.20) by emta2.rdslink.ro with SMTP; 22 Sep 2004 17:57:12 -0000 Received: (qmail 12580 invoked from network); 22 Sep 2004 18:01:48 -0000 Received: from unknown (HELO mordor.arsys.ro) (213.157.184.200) by mail.rdslink.ro with SMTP; 22 Sep 2004 18:01:48 -0000 Received: from localhost (jail1 [192.168.0.100]) by mordor.arsys.ro (Postfix) with ESMTP id 5C2F3CFAB3 for ; Wed, 22 Sep 2004 21:02:44 +0300 (EEST) Received: from mordor.arsys.ro ([192.168.0.100]) by localhost (jail1 [192.168.0.100]) (amavisd-new, port 10024) with ESMTP id 22545-05 for ; Wed, 22 Sep 2004 21:02:43 +0300 (EEST) Received: from [82.79.29.15] (unknown [82.79.29.15]) by mordor.arsys.ro (Postfix) with ESMTP id 958EFCFAB1 for ; Wed, 22 Sep 2004 21:02:43 +0300 (EEST) Message-ID: <4151BE12.8040901@rdslink.ro> Date: Wed, 22 Sep 2004 21:01:54 +0300 From: Claudiu Dragalina-Paraipan User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040807) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <1095874809.50307.59.camel@kaiser.sig11.org> In-Reply-To: <1095874809.50307.59.camel@kaiser.sig11.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at arsys.ro Subject: Re: Some questions about jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 18:02:29 -0000 Hi, Matteo Riondato wrote: > Hello hackers! > > I've a few questions about jail(8) and hope you'll be so kind to answer > them =) > > First of all: Why is procfs(5) required inside a jail (speaking about > 5.x and 6) ? " > As procfs is considered deprecated due to its inherent security > risks",why should it be used inside a jail? Maybe some software might not work without it, so it is a good thing to have it around. You don't need to start a jail with procfs, it is your decision. > > Second question: why does an "ifconfig" from inside a jail list every > network card present in the host system? Wouldn't it be better if only > lo0 and the interface with the jail IP are listed ? I think it will, > because it's my personal opinion (please refute me, I can be wrong) that > one jail's purpouses is to fool the jail users, making them believe that > they are inside a real system. I came to this conclusion reading about > security.jail.getfstatroot_only in jail(8). In general, I don't think it is about fooling the jail user. It is about isolating the user or the attacker that manages to get into the jail. I think this is why the jail was initialy created. Also, you might find this link interesting: http://kerneltrap.org/node/view/3075 > > Thank you in advance for your replies. > Best Regards With respect, -- Claudiu Dragalina-Paraipan e-mail: dr.clau@rdslink.ro From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 19:08:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E94E16A4CE; Wed, 22 Sep 2004 19:08:03 +0000 (GMT) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ECAF43D3F; Wed, 22 Sep 2004 19:08:02 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from ims3a.cp.tin.it (192.168.70.103) by vsmtp3.tin.it (7.0.027) id 414B175C002219AA; Wed, 22 Sep 2004 21:08:01 +0200 Received: from [192.168.70.229] by ims3a.cp.tin.it with HTTP; Wed, 22 Sep 2004 21:08:00 +0200 Date: Wed, 22 Sep 2004 21:08:00 +0200 Message-ID: <4146316C00012CA0@ims3a.cp.tin.it> From: gerarra@tin.it To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable cc: truckman@freebsd.org Subject: freebsd kernel buffer overflow patch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 19:08:03 -0000 Hi, I've seen a potential problem in my patch; SYF_MPSAFE flag for MP safe sy= scalls is not managed; maybe something like that is better: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D kern/kern_syscalls.c: --- kern_syscalls.c Sat Sep 18 13:42:21 2004 +++ kern_syscalls2.c Wed Sep 22 20:25:22 2004 @@ -35,6 +35,7 @@ #include #include #include +#include /* * Acts like "nosys" but can be identified in sysent for dynamic call @@ -58,6 +59,17 @@ syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent) { +#ifdef MAX_SYSCALL_ARGS + if ( (new_sysent->sy_narg & ~SYF_MPSAFE) < 0 || + (new_sysent->sy_narg & ~SYF_MPSAFE) > MAX_SYSCALL_ARGS) + { + printf("Invalid sy_narg for syscall: boundary is [0 - %d]= \n", + MAX_SYSCALL_ARGS); + return EINVAL; + } +#endif + + if (*offset =3D=3D NO_SYSCALL) { int i; complete diffs tree to http://www.gufi.org/~rookie/args-diff.tar.gz rookie From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 20:44:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CB8516A4CE for ; Wed, 22 Sep 2004 20:44:46 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E34C43D41 for ; Wed, 22 Sep 2004 20:44:46 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 10530 invoked from network); 22 Sep 2004 20:44:46 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 22 Sep 2004 20:44:45 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i8MKif3n003234; Wed, 22 Sep 2004 16:44:41 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Wed, 22 Sep 2004 15:20:51 -0400 User-Agent: KMail/1.6.2 References: <20040922085806.89E2843D1D@mx1.FreeBSD.org> In-Reply-To: <20040922085806.89E2843D1D@mx1.FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409221520.51930.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx Subject: Re: Dell gx280 and acpi problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 20:44:46 -0000 On Wednesday 22 September 2004 04:58 am, Danny Braniss wrote: > could some acpi expert shed some light? > > -current panics on boot with BIOS default settings (Suspend Mode is S3) > fix: set Power Management/Suspend Mode to S1 in BIOS > > disabling ACPI on boot is not good, since this box has no PS/2, and the USB > keyboard/mouse don't work with ACPI off. > > the acpi dumps are available from: > ftp://ftp.cs.huji.ac.il/users/danny/freebsd/gx280 > > this is the panic: > > > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2004 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD 5.3-BETA5 #14: Tue Sep 21 13:44:32 IDT 2004 > danny@new-dev:/r+d/obj/new-dev/r+d/5.3/src/sys/HUJI > Timecounter "i8254" frequency 1193182 Hz quality 0 > CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2992.52-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0xf34 Stepping = 4 > > Features=0xbfebfbffA, CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> > Hyperthreading: 2 logical CPUs > real memory = 1063813120 (1014 MB) > avail memory = 1031565312 (983 MB) > kernel trap 12 with interrupts disabled > > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x1c > fault code = supervisor write, page not present > instruction pointer = 0x8:0xc075dab5 > stack pointer = 0x10:0xc0c21be0 > frame pointer = 0x10:0xc0c21cac > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 0 () > [thread 0] > Stopped at vm_fault+0x1b1: lock cmpxchgl %ecx,0x1c(%edx) > db> trace > vm_fault(c103a000,c1004000,1,0,c08e36c0) at vm_fault+0x1b1 > trap_pfault(c0c21d14,0,c1004c29) at trap_pfault+0x184 > trap(fffd0018,c1000010,c0c20010,c1004bfd,7) at trap+0x2f1 > calltrap() at calltrap+0x5 > --- trap 0xc, eip = 0xc0a18574, esp = 0xc0c21d54, ebp = 0xc0c21d74 --- > madt_probe(c22264f0,c08bb1f0,c0c21d98,c05e8302,0) at madt_probe+0x174 > apic_init(0,c1ec00,c1e000,0,c0441225) at apic_init+0x47 > mi_startup() at mi_startup+0x96 > begin() at begin+0x2c Can you do a 'gdb kernel.debug' and then do 'l madt_probe+0x174' and e-mail the results? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 22:46:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42BCD16A4CE for ; Wed, 22 Sep 2004 22:46:50 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FDB743D45 for ; Wed, 22 Sep 2004 22:46:50 +0000 (GMT) (envelope-from afields@afields.ca) Received: from afields.ca (localhost.afields.ca [127.0.0.1]) by afields.ca (8.12.11/8.12.11) with ESMTP id i8MMknXZ086057; Wed, 22 Sep 2004 18:46:49 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i8MMkn2w086056; Wed, 22 Sep 2004 18:46:49 -0400 (EDT) (envelope-from afields) Date: Wed, 22 Sep 2004 18:46:49 -0400 From: Allan Fields To: Gordon David Message-ID: <20040922224649.GG47410@afields.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 22:46:50 -0000 On Wed, Sep 22, 2004 at 08:49:11AM +0000, Gordon David wrote: > Hello, > > I have a question. Anyone would like to tell me how to execute a user > process or shell script in the kernel? You probably really don't want to do this and if you do, there is likely a better approach. > As we know, the kernel forks a process named initproc and executes > /sbin/init, etc. If I want to execute a user level process, such as a > simple printf("Hello world") in a driver Why? > what shall I do? Lots of good references on distinctions between kernel and userland. Try: The Design and Implementation of 4.4BSD (First few chapters) file:///usr/share/doc/en/books/design-44bsd/ > Thanks > Gordon -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 00:15:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6643B16A4CF; Thu, 23 Sep 2004 00:15:07 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C60443D49; Thu, 23 Sep 2004 00:15:07 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.209] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CAHGM-0004lG-00; Thu, 23 Sep 2004 02:15:06 +0200 Received: from [217.83.8.169] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CAHGM-0007dJ-00; Thu, 23 Sep 2004 02:15:06 +0200 From: Max Laier To: freebsd-arch@freebsd.org Date: Thu, 23 Sep 2004 02:14:00 +0200 User-Agent: KMail/1.7 References: <200409200250.49518.max@love2party.net> In-Reply-To: <200409200250.49518.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2497037.U2RBP6rdQP"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200409230214.08477.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: freebsd-hackers@freebsd.org cc: freebsd-standards@freebsd.org cc: freebsd-net@freebsd.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 00:15:20 -0000 --nextPart2497037.U2RBP6rdQP Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 20 September 2004 02:50, Max Laier wrote: > Hi, > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/71836 is the symptom. N= ow I > am looking for a clean solution to it. What is needed is an include file > that defines union sockaddr_union in a way that is useable from kernel and > userland. Historically it seems that this union first apeared in context = of > ipsec within the kernel. pf has adopted it, but uses it in the userland as > well. I am sure that it can be usefull in a lot of places that have to de= al > with/store different address formats. > > My question now is, what would be a good place to define this? Are there > any fromal standarts that might define it already? (Couldn't find anythin= g) > Is there anything else that I must consider? > > At some point I though netinet/in.h might be a good place, but that'd > require inclusion of sys/socket.h, which certainly is not a good solution. > > Opinions? Ideas? As no real solution has come up and we couldn't agree what to do with it=20 either, I'll resort to an easy hack:=20 http://people.freebsd.org/~mlaier/sockaddr_union.fix.diff This will fix the issue and not create new problems. With the small excepti= on=20 for userland programs that try to include before=20 and make use of sockaddr_union. Those programs do not exist,= =20 however, and have been broken before. Any objections? [ I know it's ugly already. ] =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart2497037.U2RBP6rdQP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBUhVQXyyEoT62BG0RAoYnAJ9SzMK7ZPV3NYZ36DYJlj53KFNqjgCfQ2YO J3R7FE7EG21pdyvCi0DM6aA= =I8lU -----END PGP SIGNATURE----- --nextPart2497037.U2RBP6rdQP-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 02:01:15 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94C4E16A5F1 for ; Thu, 23 Sep 2004 02:01:15 +0000 (GMT) Received: from smtp14.singnet.com.sg (smtp14.singnet.com.sg [165.21.6.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id D017B43D41 for ; Thu, 23 Sep 2004 02:01:14 +0000 (GMT) (envelope-from mikecck@singnet.com.sg) Received: from Thinkpad (bb220-255-76-92.singnet.com.sg [220.255.76.92]) by smtp14.singnet.com.sg (8.13.1/8.13.1) with ESMTP id i8N218wl004200 for ; Thu, 23 Sep 2004 10:01:13 +0800 Message-Id: <200409230201.i8N218wl004200@smtp14.singnet.com.sg> From: "Mike Chan" To: Date: Thu, 23 Sep 2004 10:01:10 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 thread-index: AcShETJuIQyQ3yxRSvymD+wf+DuVtg== Subject: Survey on Open Source X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 02:01:15 -0000 Dear all, I am conducting a survey on open source software. This is for my academic coursework and dissertation. It will be great to have your support and participation in this survey. This survey has two separate questionnaires, focusing on the following areas: 1) OSS development (Developers or those who contribute in coding or documentation), and 2) IT/IS costs (CIOs or IT Managers). You are free to go for the questionnaire that is appropriate for you. Below are the links: 1) Brief introduction page: http://web.singnet.com.sg/~mikecck/opensource/Introduction1.htm 2) Questionnaire 1(Open Source Development): http://web.singnet.com.sg/~mikecck/opensource/WebFormA1.htm 3) Questionnaire 2(Open Source and IT/IS Cost): http://web.singnet.com.sg/~mikecck/opensource/WebFormB1.htm Thank you for your time. Mike Chan Student Curtin University of Technology From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 06:16:21 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8317B16A4CE for ; Thu, 23 Sep 2004 06:16:21 +0000 (GMT) Received: from priv-edtnes56.telusplanet.net (outbound01.telus.net [199.185.220.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11AF243D48 for ; Thu, 23 Sep 2004 06:16:21 +0000 (GMT) (envelope-from cpressey@catseye.mine.nu) Received: from catseye.biscuit.boo ([154.20.76.195]) by priv-edtnes56.telusplanet.netSMTP <20040923061620.SQKY7617.priv-edtnes56.telusplanet.net@catseye.biscuit.boo>; Thu, 23 Sep 2004 00:16:20 -0600 Date: Wed, 22 Sep 2004 23:17:24 -0700 From: Chris Pressey To: freebsd-hackers@freebsd.org Message-Id: <20040922231724.1d95c1c0.cpressey@catseye.mine.nu> In-Reply-To: <20040922224649.GG47410@afields.ca> References: <20040922224649.GG47410@afields.ca> Organization: Cat's Eye Technologies X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: kylincsos@hotmail.com Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 06:16:21 -0000 On Wed, 22 Sep 2004 18:46:49 -0400 Allan Fields wrote: > On Wed, Sep 22, 2004 at 08:49:11AM +0000, Gordon David wrote: > > Hello, > > > > I have a question. Anyone would like to tell me how to execute a > > user process or shell script in the kernel? > > You probably really don't want to do this and if you do, there is > likely a better approach. Reading between the lines and guessing - here's what you can do: Write a userland program that (1) reads /dev/fooctl, (2) does something based on what it got from /dev/fooctl, and (3) goes back to step (1). Then write a kernel driver that produces output on /dev/fooctl every time it wants the userland program to do something. This achieves the effect you (probably) want while maintaining the seperation between kernel and userland. HTH, -Chris From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 06:19:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B094B16A4CE; Thu, 23 Sep 2004 06:19:46 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B62E43D2F; Thu, 23 Sep 2004 06:19:46 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 63E04651F7; Thu, 23 Sep 2004 07:19:44 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 56232-03; Thu, 23 Sep 2004 07:19:43 +0100 (BST) Received: from empiric.dek.spc.org (adsl-64-171-185-240.dsl.snfc21.pacbell.net [64.171.185.240]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 49AA5651F4; Thu, 23 Sep 2004 07:19:43 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 4E70F63D3; Wed, 22 Sep 2004 23:19:40 -0700 (PDT) Date: Wed, 22 Sep 2004 23:19:40 -0700 From: Bruce M Simpson To: Max Laier Message-ID: <20040923061940.GA870@empiric.icir.org> Mail-Followup-To: Max Laier , freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org, freebsd-net@freebsd.org References: <200409200250.49518.max@love2party.net> <200409230214.08477.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <200409230214.08477.max@love2party.net> cc: freebsd-hackers@freebsd.org cc: freebsd-net@freebsd.org cc: freebsd-standards@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 06:19:47 -0000 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings earthmen, On Thu, Sep 23, 2004 at 02:14:00AM +0200, Max Laier wrote: > As no real solution has come up and we couldn't agree what to do with it= =20 > either, I'll resort to an easy hack:=20 > http://people.freebsd.org/~mlaier/sockaddr_union.fix.diff =2E.. > Any objections? [ I know it's ugly already. ] Looks fine to me; I agree that this workaround is not ideal but it is acceptable given the circumstances. Regards, BMS --NzB8fVQJ5HfG6fxh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQFBUmr7ueUpAYYNtTsRAk91AJ4/PL+dXh5v+8ne91fS0n/RGtZlkgCfavC8 I38NJmMOCN9m0ZgiR8+uQX8= =mtHb -----END PGP SIGNATURE----- --NzB8fVQJ5HfG6fxh-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 07:56:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5FB516A4CE for ; Thu, 23 Sep 2004 07:56:20 +0000 (GMT) Received: from hotmail.com (bay1-f22.bay1.hotmail.com [65.54.245.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id B069C43D64 for ; Thu, 23 Sep 2004 07:56:20 +0000 (GMT) (envelope-from kylincsos@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 23 Sep 2004 00:55:01 -0700 Received: from 61.187.16.2 by by1fd.bay1.hotmail.msn.com with HTTP; Thu, 23 Sep 2004 07:54:00 GMT X-Originating-IP: [61.187.16.2] X-Originating-Email: [kylincsos@hotmail.com] X-Sender: kylincsos@hotmail.com From: "Gordon David" To: cpressey@catseye.mine.nu, freebsd-hackers@freebsd.org Date: Thu, 23 Sep 2004 07:54:00 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Message-ID: X-OriginalArrivalTime: 23 Sep 2004 07:55:01.0060 (UTC) FILETIME=[A0C82040:01C4A142] Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 07:56:20 -0000 > > On Wed, Sep 22, 2004 at 08:49:11AM +0000, Gordon David wrote: > > > Hello, > > > > > > I have a question. Anyone would like to tell me how to execute a > > > user process or shell script in the kernel? > > > > You probably really don't want to do this and if you do, there is > > likely a better approach. > >Reading between the lines and guessing - here's what you can do: > >Write a userland program that (1) reads /dev/fooctl, (2) does something >based on what it got from /dev/fooctl, and (3) goes back to step (1). > >Then write a kernel driver that produces output on /dev/fooctl every >time it wants the userland program to do something. > >This achieves the effect you (probably) want while maintaining the >seperation between kernel and userland. >HTH, >-Chris That's the point. I do not want the userland program to check /dev/fooctl from time to time. I want the kernel to notify the userland program instead. So how shall I do it? Maybe linker_load_file is a better way. Thx. Gordon _________________________________________________________________ ÏíÓÃÊÀœçÉÏ×îŽóµÄµç×ÓÓÊŒþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 08:02:40 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE4D816A4CE for ; Thu, 23 Sep 2004 08:02:40 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C78643D31 for ; Thu, 23 Sep 2004 08:02:38 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 3577D1FF931; Thu, 23 Sep 2004 10:02:36 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id 23E871FF92F; Thu, 23 Sep 2004 10:02:34 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id EE50F15662; Thu, 23 Sep 2004 08:02:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id E358A15659; Thu, 23 Sep 2004 08:02:18 +0000 (UTC) Date: Thu, 23 Sep 2004 08:02:18 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Gordon David In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 08:02:40 -0000 On Thu, 23 Sep 2004, Gordon David wrote: > That's the point. I do not want the userland program to check /dev/fooctl > from time to time. I want the kernel to notify the userland program > instead. So how shall I do it? Maybe linker_load_file is a better way. man 2 kqueue ? -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 08:19:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 464CB16A4CE for ; Thu, 23 Sep 2004 08:19:03 +0000 (GMT) Received: from hotmail.com (bay1-f10.bay1.hotmail.com [65.54.245.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 316EE43D1F for ; Thu, 23 Sep 2004 08:19:03 +0000 (GMT) (envelope-from kylincsos@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 23 Sep 2004 01:19:02 -0700 Received: from 61.187.16.2 by by1fd.bay1.hotmail.msn.com with HTTP; Thu, 23 Sep 2004 08:18:14 GMT X-Originating-IP: [61.187.16.2] X-Originating-Email: [kylincsos@hotmail.com] X-Sender: kylincsos@hotmail.com From: "Gordon David" To: bzeeb-lists@lists.zabbadoz.net Date: Thu, 23 Sep 2004 08:18:14 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Message-ID: X-OriginalArrivalTime: 23 Sep 2004 08:19:02.0733 (UTC) FILETIME=[FC15F7D0:01C4A145] cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 08:19:03 -0000 >From: "Bjoern A. Zeeb" >To: Gordon David >CC: freebsd-hackers@freebsd.org >Subject: Re: execute a user process in the kernel >Date: Thu, 23 Sep 2004 08:02:18 +0000 (UTC) > >On Thu, 23 Sep 2004, Gordon David wrote: > > > That's the point. I do not want the userland program to check /dev/fooctl > > from time to time. I want the kernel to notify the userland program > > instead. So how shall I do it? Maybe linker_load_file is a better way. > >man 2 kqueue ? Kqueue is a good method to notify the user. But I want the code in the kernel directly calls a user program. David >-- >Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT _________________________________________________________________ ÏíÓÃÊÀœçÉÏ×îŽóµÄµç×ÓÓÊŒþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 08:29:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A72816A4CE; Thu, 23 Sep 2004 08:29:46 +0000 (GMT) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC5EC43D4C; Thu, 23 Sep 2004 08:29:45 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1CAOz2-0005Yh-JS; Thu, 23 Sep 2004 10:29:44 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: John Baldwin In-reply-to: Your message of Wed, 22 Sep 2004 15:20:51 -0400 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 23 Sep 2004 10:29:44 +0200 From: Danny Braniss Message-Id: <20040923082945.AC5EC43D4C@mx1.FreeBSD.org> cc: freebsd-hackers@freebsd.org Subject: Re: Dell gx280 and acpi problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 08:29:46 -0000 > On Wednesday 22 September 2004 04:58 am, Danny Braniss wrote: > > could some acpi expert shed some light? > > > > -current panics on boot with BIOS default settings (Suspend Mode is S3) > > fix: set Power Management/Suspend Mode to S1 in BIOS > > > > disabling ACPI on boot is not good, since this box has no PS/2, and the USB > > keyboard/mouse don't work with ACPI off. > > > > the acpi dumps are available from: > > ftp://ftp.cs.huji.ac.il/users/danny/freebsd/gx280 > > > > this is the panic: > > > > > > KDB: debugger backends: ddb > > KDB: current backend: ddb > > Copyright (c) 1992-2004 The FreeBSD Project. > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > > The Regents of the University of California. All rights reserved. > > FreeBSD 5.3-BETA5 #14: Tue Sep 21 13:44:32 IDT 2004 > > danny@new-dev:/r+d/obj/new-dev/r+d/5.3/src/sys/HUJI > > Timecounter "i8254" frequency 1193182 Hz quality 0 > > CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2992.52-MHz 686-class CPU) > > Origin = "GenuineIntel" Id = 0xf34 Stepping = 4 > > > > Features=0xbfebfbff >A, CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> > > Hyperthreading: 2 logical CPUs > > real memory = 1063813120 (1014 MB) > > avail memory = 1031565312 (983 MB) > > kernel trap 12 with interrupts disabled > > > > > > Fatal trap 12: page fault while in kernel mode > > cpuid = 0; apic id = 00 > > fault virtual address = 0x1c > > fault code = supervisor write, page not present > > instruction pointer = 0x8:0xc075dab5 > > stack pointer = 0x10:0xc0c21be0 > > frame pointer = 0x10:0xc0c21cac > > code segment = base 0x0, limit 0xfffff, type 0x1b > > = DPL 0, pres 1, def32 1, gran 1 > > processor eflags = interrupt enabled, resume, IOPL = 0 > > current process = 0 () > > [thread 0] > > Stopped at vm_fault+0x1b1: lock cmpxchgl %ecx,0x1c(%edx) > > db> trace > > vm_fault(c103a000,c1004000,1,0,c08e36c0) at vm_fault+0x1b1 > > trap_pfault(c0c21d14,0,c1004c29) at trap_pfault+0x184 > > trap(fffd0018,c1000010,c0c20010,c1004bfd,7) at trap+0x2f1 > > calltrap() at calltrap+0x5 > > --- trap 0xc, eip = 0xc0a18574, esp = 0xc0c21d54, ebp = 0xc0c21d74 --- > > madt_probe(c22264f0,c08bb1f0,c0c21d98,c05e8302,0) at madt_probe+0x174 > > apic_init(0,c1ec00,c1e000,0,c0441225) at apic_init+0x47 > > mi_startup() at mi_startup+0x96 > > begin() at begin+0x2c > > Can you do a 'gdb kernel.debug' and then do 'l madt_probe+0x174' and e-mail > the results? I think i'm doing something wrong :-), tip -38400 com1 works fine, Type '?' for a list of commands, 'help' for more detailed help. OK boot -d /boot/kernel/acpi.ko text=0x3fa30 data=0x1be4+0x110c syms=[0x4+0x72a0+0x4+0x9743] GDB: debug ports: sio GDB: current port: sio KDB: debugger backends: ddb gdb KDB: current backend: ddb KDB: enter: Boot flags requested debugger [thread 0] Stopped at kdb_enter+0x2b: nop db> gdb Step to enter the remote GDB backend. backing out of tip via ~. shuttle-2# gdb -b 38400 kernel.debug GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... Ready to go. Enter 'tr' to connect to the remote target with /dev/cuaa0, 'tr /dev/cuaa1' to connect to a different port or 'trf portno' to connect to the remote target with the firewire interface. portno defaults to 5556. Type 'getsyms' after connection to load kld symbols. If you're debugging a local system, you can use 'kldsyms' instead to load the kld symbols. That's a less obnoxious interface. (gdb) tr /dev/cuaa0 Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... Couldn't establish connection to remote target Malformed response to offset query, timeout (gdb) From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 09:37:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EDE816A4CE for ; Thu, 23 Sep 2004 09:37:36 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32CB643D39 for ; Thu, 23 Sep 2004 09:37:35 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 54F896538E; Thu, 23 Sep 2004 10:37:33 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 58854-02-6; Thu, 23 Sep 2004 10:37:32 +0100 (BST) Received: from empiric.dek.spc.org (adsl-64-171-185-240.dsl.snfc21.pacbell.net [64.171.185.240]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 6465465339; Thu, 23 Sep 2004 10:37:32 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 2531163D3; Thu, 23 Sep 2004 02:37:30 -0700 (PDT) Date: Thu, 23 Sep 2004 02:37:29 -0700 From: Bruce M Simpson To: Gordon David Message-ID: <20040923093729.GC870@empiric.icir.org> Mail-Followup-To: Gordon David , bzeeb-lists@lists.zabbadoz.net, freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: bzeeb-lists@lists.zabbadoz.net cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 09:37:36 -0000 On Thu, Sep 23, 2004 at 08:18:14AM +0000, Gordon David wrote: > Kqueue is a good method to notify the user. But I want the code in the > kernel directly calls a user program. This is Very, Very Hard indeed, because it's not something supported by the system, but it should be possible. Look at create_init() and start_init() and see if they can be adapted to your needs. The hard part here is building the process image. Good luck. BMS From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 09:38:37 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FE2216A4CE for ; Thu, 23 Sep 2004 09:38:37 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5CF843D39 for ; Thu, 23 Sep 2004 09:38:36 +0000 (GMT) (envelope-from niels.heinen@gmail.com) Received: by mproxy.gmail.com with SMTP id 76so3076326rnl for ; Thu, 23 Sep 2004 02:38:33 -0700 (PDT) Received: by 10.38.74.50 with SMTP id w50mr4925229rna; Thu, 23 Sep 2004 02:38:32 -0700 (PDT) Received: by 10.38.83.41 with HTTP; Thu, 23 Sep 2004 02:38:28 -0700 (PDT) Message-ID: Date: Thu, 23 Sep 2004 11:38:28 +0200 From: Niels Heinen To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Copy data from kernel to user space memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Niels Heinen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 09:38:37 -0000 Hi all, I'm working on a kernel module that I want to use to copy packet data, obtained trough the phil hooks, to user space memory. The module buffers packets and currently copies it into user memory when its system call interface is used. At the moment my user space application is the one that allocates the memory. I want the memory to be allocated by the module in order to make things more efficient. I'd really appriciate it if someone could explain how this should be done Thanks in advance, Niels From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 10:20:37 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2B5B16A4CF for ; Thu, 23 Sep 2004 10:20:36 +0000 (GMT) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [194.125.244.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06CB443D1D for ; Thu, 23 Sep 2004 10:20:15 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from pm514-9.comsys.ntu-kpi.kiev.ua (pm514-9.comsys.ntu-kpi.kiev.ua [10.18.54.109]) (authenticated bits=0)i8NDPqR6039691 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Sep 2004 13:25:53 GMT Received: by pm514-9.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1000) id A0B8B7F; Thu, 23 Sep 2004 13:19:53 +0300 (EEST) Date: Thu, 23 Sep 2004 13:19:53 +0300 From: Andrey Simonenko To: Niels Heinen Message-ID: <20040923101953.GA463@pm514-9.comsys.ntu-kpi.kiev.ua> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: freebsd-hackers@freebsd.org Subject: Re: Copy data from kernel to user space memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 10:20:37 -0000 On Thu, Sep 23, 2004 at 11:38:28AM +0200, Niels Heinen wrote: > The module buffers packets and currently copies it into user memory > when its system call interface is used. At the moment my user space > application is the one that allocates the memory. I want the memory > to be allocated by the module in order to make things more efficient. > > I'd really appriciate it if someone could explain how this should be done You can allocate OBJT_DEFAULT object with desired size, then map it to the process' vmspace and copy packets from the module to this region of process' memory, then tell process the start address of the mapped object and its size. And don't forget to serialize access to the region of memory. Read documentation (or relevant sys/vm code) for vm_object_allocate(9), vm_map_find(9), vm_map_remove(9). I'm not sure that you get some performance with this method, usually an application allocates memory, makes syscall and tells how many bytes the kernel (the module) can store in this memory. But I don't see the complete picture, so may be you can't use this standard approach. From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 10:52:33 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F05E16A4CE for ; Thu, 23 Sep 2004 10:52:33 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BECA43D41 for ; Thu, 23 Sep 2004 10:52:33 +0000 (GMT) (envelope-from niels.heinen@gmail.com) Received: by mproxy.gmail.com with SMTP id 77so386064rnl for ; Thu, 23 Sep 2004 03:52:32 -0700 (PDT) Received: by 10.38.79.75 with SMTP id c75mr3681338rnb; Thu, 23 Sep 2004 03:52:32 -0700 (PDT) Received: by 10.38.83.41 with HTTP; Thu, 23 Sep 2004 03:52:32 -0700 (PDT) Message-ID: Date: Thu, 23 Sep 2004 12:52:32 +0200 From: Niels Heinen To: Andrey Simonenko In-Reply-To: <20040923101953.GA463@pm514-9.comsys.ntu-kpi.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040923101953.GA463@pm514-9.comsys.ntu-kpi.kiev.ua> cc: freebsd-hackers@freebsd.org Subject: Re: Copy data from kernel to user space memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Niels Heinen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 10:52:33 -0000 > > I'm not sure that you get some performance with this method, usually > an application allocates memory, makes syscall and tells how many bytes > the kernel (the module) can store in this memory. But I don't see > the complete picture, so may be you can't use this standard approach. > Thats the way I have implemented it now. But because the application (test.c ;p ) doesn't know the packet size its currently using too large memory buffers. Thanks for the info, I'll have a look at those function ! Niels From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 11:57:37 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4721716A4CE; Thu, 23 Sep 2004 11:57:37 +0000 (GMT) Received: from crumpler-s1.mel.crumpler.com.au (b20FB.static.pacific.net.au [210.23.137.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12D4143D31; Thu, 23 Sep 2004 11:57:36 +0000 (GMT) (envelope-from listsubs@crippy.mel.crumpler.com.au) Received: from [203.208.117.170] ([203.208.117.170]) by crumpler-s1.mel.crumpler.com.au over TLS secured channel with Microsoft SMTPSVC(5.0.2195.6713); Thu, 23 Sep 2004 21:57:34 +1000 Message-ID: <4152BA25.70102@crippy.mel.crumpler.com.au> Date: Thu, 23 Sep 2004 21:57:25 +1000 From: Phillip Crumpler User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040818) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Sep 2004 11:57:34.0285 (UTC) FILETIME=[832E07D0:01C4A164] cc: freebsd-mobile@freebsd.org Subject: Error 1802: IBM T41 doesn't like other network cards X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 11:57:37 -0000 Hello hackers, Wanting to try out Sam Leffler's wireless layer back-port I tried to replace the Intel miniPCI wireless card in my Thinkpad T41 (2373) with an Atheros based one. I had a Netgear WAG311 handy - these are an Atheros miniPCI wireless NIC on a PCI carrier - so I levered the top off and freed the miniPCI card. Ten minutes of open-notebook surgery later I started the machine with the replacement card in, only to find it won't boot: ERROR 1802 Unauthorized network card is plugged in - Power off and remove the miniPCI card. It seems that the IBM BIOS refuses to boot if the miniPCI card installed is on IBM's approved list. This thread: http://www.ussg.iu.edu/hypermail/linux/kernel/0406.1/1048.html describes a workaround that requires a byte to be set in the cmos, including a snippet (below) to do the job on linux. This opens and writes to /dev/nvram to set the byte. Is there an equivalent on FreeBSD? Would I find the CMOS somewhere in /dev/mem? Anyone else has similar problems? BMS@ reported ditching the Centrino card in his T40 but didn't mention if he replaced it with something else. thanks Phillip Crumpler ============================================================ #include #include #include #include #include int main(void) { int fd; unsigned char data; printf("Disabling WiFi whitelist check.\n"); fd = open("/dev/nvram", O_RDWR); lseek(fd, 0x5c, SEEK_SET); read(fd, &data, 1); printf("CMOS address 0x5c: %02x->", data); data |= 0x80; printf("%02x\n", data); lseek(fd, 0x5c, SEEK_SET); write(fd, &data, 1); close(fd); printf("Done.\n"); } From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 12:51:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56FF216A4CE for ; Wed, 22 Sep 2004 12:51:47 +0000 (GMT) Received: from hutcs.cs.hut.fi (hutcs.cs.hut.fi [130.233.192.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB74543D54 for ; Wed, 22 Sep 2004 12:51:46 +0000 (GMT) (envelope-from kirma@cs.hut.fi) Received: from kirma (helo=localhost) by hutcs.cs.hut.fi with local-esmtp (Exim 4.30) id 1CA6b3-0004UA-PV for freebsd-hackers@freebsd.org; Wed, 22 Sep 2004 15:51:45 +0300 Date: Wed, 22 Sep 2004 15:51:45 +0300 (EEST) From: Jari Kirma To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Thu, 23 Sep 2004 12:07:55 +0000 Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 12:51:47 -0000 Gordon David wrote: > Hello, > I have a question. Anyone would like to tell me how to execute a user > process or shell script in the kernel? > As we know, the kernel forks a process named initproc and executes > /sbin/init, etc. If I want to execute a user level process, such as a > simple printf("Hello world") in a driver, what shall I do? Proper way to do this is to have userland daemon handling this stuff, waiting for device driver using device-specific method (most likely a file under /dev). I'm pretty skeptic processes that don't have init process as their first ancestor can be created easily at all. There's also another question to consider: where the output should go? These kind of things are better to be handled in the userland. -kirma From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 16:25:28 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93A5416A4F7 for ; Wed, 22 Sep 2004 16:25:28 +0000 (GMT) Received: from tower.berklix.org (bsd.bsn.com [194.221.32.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B8C643D2D for ; Wed, 22 Sep 2004 16:25:27 +0000 (GMT) (envelope-from jhs@flat.berklix.net) Received: from js.berklix.net (pD950E202.dip.t-dialin.net [217.80.226.2]) (authenticated bits=0) by tower.berklix.org (8.12.9p2/8.12.9) with ESMTP id i8MGPHhB091319; Wed, 22 Sep 2004 18:25:18 +0200 (CEST) (envelope-from jhs@flat.berklix.net) Received: from laps.jhs.private (laps.jhs.private [192.168.91.56]) by js.berklix.net (8.12.11/8.12.11) with ESMTP id i8MGRc97003946; Wed, 22 Sep 2004 18:27:39 +0200 (CEST) (envelope-from jhs@flat.berklix.net) Received: from laps.jhs.private (localhost [127.0.0.1]) by laps.jhs.private (8.13.1/8.13.1) with ESMTP id i8MGRbAH006106; Wed, 22 Sep 2004 18:27:37 +0200 (CEST) (envelope-from jhs@laps.jhs.private) Message-Id: <200409221627.i8MGRbAH006106@laps.jhs.private> To: "Bagus" In-Reply-To: Message from "Bagus" Date: Wed, 22 Sep 2004 18:27:37 +0200 From: "Julian H. Stacey" X-Mailman-Approved-At: Thu, 23 Sep 2004 12:07:55 +0000 cc: freebsd-hackers@freebsd.org cc: Tony Frank Subject: Re: slow login, app launching, etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 16:25:28 -0000 > inspired me to look at my resolve.conf one more time and try using names > instead of ip numbers. Sorry, not quite clear here, but numbers must come from somewhere, if not resolv.conf, then /etc/hosts or local named + maybe via root servers whose numeric addresses are themselves compiled into local named. List freebsd-net@freebsd.org might be the ideal place to State: - Is named running locally ? - Has /etc/resolv.conf a first entry of localhost ( = 127.0.0.1 ) ? Ask if this strategy might cause: - un-necessary load to internet root name servers ? - extra indirection on local lookups. (but this list will probably do this time, as the thread's running :-) - Julian Stacey. Unix,C,Net & Sys. Eng. Consultant, Munich. http://berklix.com Mail in Ascii, Html dumped as Spam. Ihr Rauch = mein allergischer Kopfschmerz. From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 18:48:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0F5416A4CE for ; Wed, 22 Sep 2004 18:48:19 +0000 (GMT) Received: from hercules.crossthread.com (hercules.crossthread.com [64.56.149.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2643143D39 for ; Wed, 22 Sep 2004 18:48:19 +0000 (GMT) (envelope-from timp@crossthread.com) Received: from [192.168.15.23] (s142-179-221-95.ab.hsia.telus.net [142.179.221.95]) (authenticated)i8MIrJp37217 for ; Wed, 22 Sep 2004 12:53:19 -0600 (MDT) Message-ID: <4151C8F6.5060905@crossthread.com> Date: Wed, 22 Sep 2004 12:48:22 -0600 From: Tim Pushor User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 23 Sep 2004 12:08:21 +0000 Subject: Crystalfontz LCD display from kernel? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 18:48:19 -0000 Hi hackers, I originally submitted this question on 'questions' but didn't receive much response. I am planning on putting a small 16x2 line LCD panel (crystalfontz 633) on a FreeBSD system, and writing a small application to control and display various things via the LCD and buttons. This is fine. My question is, I would really like to be able to display various things during startup, shutdown, and once shutdown is complete to the LCD. I assume I would have to modify the kernel for this. I done lots of C programming, and hardware interface programming in C and assembler, but never any UNIX kernel programming. First of all, is this doable? Also, would it be easier (from the kernel programming perspective) to do this via USB or Serial? Thanks for any and all advice. Tim (Please CC: me as I am not subscribed to this list - thanks) From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 01:49:43 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1E5416A4CE for ; Thu, 23 Sep 2004 01:49:43 +0000 (GMT) Received: from corbulon.video-collage.com (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDC9543D46 for ; Thu, 23 Sep 2004 01:49:42 +0000 (GMT) (envelope-from mi+mxmoz@aldan.algebra.com) Received: from 250-217.customer.cloud9.net (195-11.customer.cloud9.net [168.100.195.11])i8N1ncdB020818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 22 Sep 2004 21:49:39 -0400 (EDT) (envelope-from mi+mxmoz@aldan.algebra.com) Received: from [127.0.0.1] (mteterin@localhost [127.0.0.1]) i8LFfUup062874; Tue, 21 Sep 2004 11:41:30 -0400 (EDT) (envelope-from mi+mxmoz@aldan.algebra.com) Message-ID: <41504BAA.50207@aldan.algebra.com> Date: Tue, 21 Sep 2004 11:41:30 -0400 From: Mikhail Teterin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; uk-UA; rv:1.7) Gecko/20040702 X-Accept-Language: uk, en-us, en MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org, Jeremy Messenger Content-Type: multipart/mixed; boundary="------------090001090001050105090107" X-Virus-Scanned: clamd / ClamAV version devel-20040615, clamav-milter version 0.73a on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 X-Mailman-Approved-At: Thu, 23 Sep 2004 12:07:55 +0000 Subject: amdpm0: could not map i/o space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 01:49:43 -0000 This is a multi-part message in MIME format. --------------090001090001050105090107 Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Hello! A Google search for the Subject brought up a recent thread on this list. We have an amd64 system running 5.3-BETA5, with almost-working amdpm0: amdpm0: port 0xe0-0xff,0xb400-0xb41f irq 19 at device 7.2 on pci0 amdpm0: could not map i/o space device_attach: amdpm0 attach returned 6 The pciconf -lv lists: amdpm0@pci0:7:2: class=0x0c0500 card=0x746a1022 chip=0x746a1022 rev=0x02 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 SMBus 2.0 Controller' class = serial bus subclass = SMBus none0@pci0:7:3: class=0x068000 card=0x746b1022 chip=0x746b1022 rev=0x05 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 ACPI System Management Controller' class = bridge subclass = PCI-unknown Why is it failing? Am I missing something obvious? Thanks a lot! -mi P.S. Full dmesg.boot and the output of `pciconf -lv' can be found at, respectively: http://aldan.algebra.com/~mi/pandora.dmesg.boot.txt http://aldan.algebra.com/~mi/pandora.pciconf.txt --------------090001090001050105090107 Content-Type: text/plain; name="dmesg.boot" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dmesg.boot" Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.3-BETA5 #4: Mon Sep 20 16:45:55 EDT 2004 mteterin@pandora:/backup/obj/usr/src/sys/DIOSCURI Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Opteron(tm) Processor 244 (1792.82-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0xf58 Stepping = 8 Features=0x78bfbff AMD Features=0xe0500800 real memory = 2147418112 (2047 MB) avail memory = 2063945728 (1968 MB) ACPI APIC Table: MADT: Forcing active-low polarity and level trigger for SCI ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-27 on motherboard ioapic2 irqs 28-31 on motherboard acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x5008-0x500b on acpi0 cpu0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 6.0 on pci0 pci3: on pcib1 ohci0: mem 0xff3fc000-0xff3fcfff irq 19 at device 0.0 on pci3 ohci0: [GIANT-LOCKED] usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 uhub0: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 3 ports with 3 removable, self powered ohci1: mem 0xff3fd000-0xff3fdfff irq 19 at device 0.1 on pci3 ohci1: [GIANT-LOCKED] usb1: OHCI version 1.0, legacy support usb1: on ohci1 usb1: USB revision 1.0 uhub1: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 3 ports with 3 removable, self powered ahc0: port 0x9800-0x98ff mem 0xff3fe000-0xff3fefff irq 16 at device 10.0 on pci3 ahc0: [GIANT-LOCKED] aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs atapci0: port 0x9c00-0x9c0f,0xa000-0xa003,0xa400-0xa407,0xa800-0xa803,0xac00-0xac07 mem 0xff3ff400-0xff3ff7ff irq 17 at device 11.0 on pci3 ata2: channel #0 on atapci0 ata3: channel #1 on atapci0 ata4: channel #2 on atapci0 ata5: channel #3 on atapci0 fwohci0: mem 0xff3f8000-0xff3fbfff,0xff3ff800-0xff3fffff irq 19 at device 12.0 on pci3 fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:e0:81:00:00:30:13:5c fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:e0:81:30:13:5c fwe0: Ethernet address: 02:e0:81:30:13:5c fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) isab0: at device 7.0 on pci0 isa0: on isab0 atapci1: port 0xffa0-0xffaf,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 7.1 on pci0 ata0: channel #0 on atapci1 ata1: channel #1 on atapci1 amdpm0: port 0xe0-0xff,0xb400-0xb41f irq 19 at device 7.2 on pci0 amdpm0: could not map i/o space device_attach: amdpm0 attach returned 6 pci0: at device 7.3 (no driver attached) pcm0: port 0xbc00-0xbc3f,0xb800-0xb8ff irq 17 at device 7.5 on pci0 pcm0: [GIANT-LOCKED] pcm0: pcib2: at device 10.0 on pci0 pci2: on pcib2 amr0: mem 0xe69f0000-0xe69fffff irq 26 at device 7.0 on pci2 amr0: [GIANT-LOCKED] amr0: Firmware 712T, BIOS G116, 64MB RAM bge0: mem 0xff1e0000-0xff1effff irq 24 at device 9.0 on pci2 miibus0: on bge0 brgphy0: on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto bge0: Ethernet address: 00:e0:81:28:21:04 pci0: at device 10.1 (no driver attached) pcib3: at device 11.0 on pci0 pci1: on pcib3 pci0: at device 11.1 (no driver attached) pcib4: on acpi0 pcib4: could not get PCI interrupt routing table for \\_SB_.PCIB - AE_NOT_FOUND pci4: on pcib4 agp0: mem 0xf0000000-0xf7ffffff at device 0.0 on pci4 pcib5: at device 1.0 on pci4 pci5: on pcib5 drm0: port 0xc800-0xc8ff mem 0xff5fc000-0xff5fffff,0xe8000000-0xebffffff irq 16 at device 0.0 on pci5 info: [drm] AGP at 0xf0000000 128MB info: [drm] Initialized r128 2.5.0 20030725 on minor 0 acpi_button0: on acpi0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 port 0x3f8-0x3ff irq 4 on acpi0 sio0: type 16550A sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled sio1 port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0 port 0x778-0x77f,0x378-0x37f irq 7 drq 3 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/9 bytes threshold ppbus0: on ppc0 lpt0: on ppbus0 lpt0: Interrupt-driven port orm0: at iomem 0xcd000-0xcd7ff,0xc8800-0xccfff,0xc0000-0xc7fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 1792816586 Hz quality 800 Timecounters tick every 0.976 msec acpi_cpu: throttling enabled, 8 steps (100% to 12.5%), currently 100.0% ATAPI_RESET time = 60us acd0: CDROM at ata0-master PIO4 ATAPI_RESET time = 230us ata1-slave: FAILURE - SETFEATURES SET TRANSFER MODE status=1 error=4 afd0: REMOVABLE at ata1-slave BIOSPIO ad6: 190782MB [387621/16/63] at ata3-master SATA150 Waiting 15 seconds for SCSI devices to settle amrd0: on amr0 amrd0: 953885MB (1953556480 sectors) RAID 5 (optimal) sa0 at ahc0 bus 0 target 6 lun 0 sa0: Removable Sequential Access SCSI-3 device sa0: 40.000MB/s transfers (20.000MHz, offset 8, 16bit) Mounting root from ufs:/dev/ad6s1a bge0: gigabit link up --------------090001090001050105090107 Content-Type: text/plain; name="pandora.pciconf" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pandora.pciconf" pcib1@pci0:6:0: class=0x060400 card=0x000000c0 chip=0x74601022 rev=0x07 hdr=0x01 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 PCI Bridge' class = bridge subclass = PCI-PCI isab0@pci0:7:0: class=0x060100 card=0x74681022 chip=0x74681022 rev=0x05 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 LPC Bridge' class = bridge subclass = PCI-ISA atapci1@pci0:7:1: class=0x01018a card=0x74691022 chip=0x74691022 rev=0x03 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 UltraATA/133 Controller' class = mass storage subclass = ATA amdpm0@pci0:7:2: class=0x0c0500 card=0x746a1022 chip=0x746a1022 rev=0x02 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 SMBus 2.0 Controller' class = serial bus subclass = SMBus none0@pci0:7:3: class=0x068000 card=0x746b1022 chip=0x746b1022 rev=0x05 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 ACPI System Management Controller' class = bridge subclass = PCI-unknown pcm0@pci0:7:5: class=0x040100 card=0x288510f1 chip=0x746d1022 rev=0x03 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 AC97 Audio Controller' class = multimedia subclass = audio pcib2@pci0:10:0: class=0x060400 card=0x000000a0 chip=0x74501022 rev=0x12 hdr=0x01 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8131 PCI-X Bridge' class = bridge subclass = PCI-PCI none1@pci0:10:1: class=0x080010 card=0x36c01022 chip=0x74511022 rev=0x01 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8131 PCI-X IOAPIC' class = base peripheral subclass = interrupt controller pcib3@pci0:11:0: class=0x060400 card=0x000000a0 chip=0x74501022 rev=0x12 hdr=0x01 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8131 PCI-X Bridge' class = bridge subclass = PCI-PCI none2@pci0:11:1: class=0x080010 card=0x36c01022 chip=0x74511022 rev=0x01 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8131 PCI-X IOAPIC' class = base peripheral subclass = interrupt controller hostb0@pci0:24:0: class=0x060000 card=0x00000000 chip=0x11001022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon 64 / Opteron HyperTransport Technology Configuration' class = bridge subclass = HOST-PCI hostb1@pci0:24:1: class=0x060000 card=0x00000000 chip=0x11011022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon 64 / Opteron Address Map' class = bridge subclass = HOST-PCI hostb2@pci0:24:2: class=0x060000 card=0x00000000 chip=0x11021022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon 64 / Opteron DRAM Controller' class = bridge subclass = HOST-PCI hostb3@pci0:24:3: class=0x060000 card=0x00000000 chip=0x11031022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon 64 / Opteron Miscellaneous Control' class = bridge subclass = HOST-PCI ohci0@pci3:0:0: class=0x0c0310 card=0x74641022 chip=0x74641022 rev=0x0b hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 USB OpenHCI Host Controller' class = serial bus subclass = USB ohci1@pci3:0:1: class=0x0c0310 card=0x74641022 chip=0x74641022 rev=0x0b hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 USB OpenHCI Host Controller' class = serial bus subclass = USB ahc0@pci3:10:0: class=0x010000 card=0x00000000 chip=0x81789004 rev=0x00 hdr=0x00 vendor = 'Adaptec Inc' device = 'AHA-2940U/UW/2940D Ultra/Ultra Wide/Dual SCSI Host Adapter' class = mass storage subclass = SCSI atapci0@pci3:11:0: class=0x018000 card=0x31141095 chip=0x31141095 rev=0x02 hdr=0x00 vendor = 'Silicon Image Inc (Was: CMD Technology Inc)' device = 'Sil 3114 SATALink/SATARaid Controller' class = mass storage fwohci0@pci3:12:0: class=0x0c0010 card=0x288510f1 chip=0x8023104c rev=0x00 hdr=0x00 vendor = 'Texas Instruments (TI)' device = 'TSB43AB22/A IEEE1394a-2000 OHCI PHY/Link-Layer Ctrlr' class = serial bus subclass = FireWire amr0@pci2:7:0: class=0x010400 card=0x05231000 chip=0x19601000 rev=0x01 hdr=0x00 vendor = 'LSI Logic (Was: Symbios Logic, NCR)' class = mass storage subclass = RAID bge0@pci2:9:0: class=0x020000 card=0x288510f1 chip=0x16a714e4 rev=0x02 hdr=0x00 vendor = 'Broadcom Corporation' device = 'BCM5703X NetXtreme Gigabit Ethernet' class = network subclass = ethernet agp0@pci4:0:0: class=0x060000 card=0x74541022 chip=0x74541022 rev=0x13 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8151 AGP Device (System Controller)' class = bridge subclass = HOST-PCI pcib5@pci4:1:0: class=0x060400 card=0x00000000 chip=0x74551022 rev=0x13 hdr=0x01 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8151 AGP Bridge' class = bridge subclass = PCI-PCI drm0@pci5:0:0: class=0x030000 card=0x04081002 chip=0x54461002 rev=0x00 hdr=0x00 vendor = 'ATI Technologies Inc.' device = 'Rage 128 PRO ULTRA Video Controller (VGA Compatible)' class = display subclass = VGA --------------090001090001050105090107-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 12:31:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E01A16A4CF for ; Thu, 23 Sep 2004 12:31:59 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D354D43D2D for ; Thu, 23 Sep 2004 12:31:55 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i8NCVZug018506; Thu, 23 Sep 2004 22:01:36 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Thu, 23 Sep 2004 22:01:29 +0930 User-Agent: KMail/1.7 References: <4151C8F6.5060905@crossthread.com> In-Reply-To: <4151C8F6.5060905@crossthread.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2840352.zeMYW93JQy"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200409232201.30201.doconnor@gsoft.com.au> X-Spam-Score: -2.5 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Tim Pushor Subject: Re: Crystalfontz LCD display from kernel? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 12:31:59 -0000 --nextPart2840352.zeMYW93JQy Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thu, 23 Sep 2004 04:18, Tim Pushor wrote: > My question is, I would really like to be able to display various things > during startup, shutdown, and once shutdown is complete to the LCD. I > assume I would have to modify the kernel for this. I done lots of C > programming, and hardware interface programming in C and assembler, but > never any UNIX kernel programming. > > First of all, is this doable? Also, would it be easier (from the kernel > programming perspective) to do this via USB or Serial? Opening a device etc from the kernel would be moderatly painful.. It write a userland program which did it first and then port it. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart2840352.zeMYW93JQy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBUsIi5ZPcIHs/zowRAkxXAKCV39RXlfYW+OGJ4qHiJ5+1pIuLhwCfSYbr DrwveMU30mMsUMxXz97a4+Y= =Dwna -----END PGP SIGNATURE----- --nextPart2840352.zeMYW93JQy-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 12:44:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B40316A51D; Thu, 23 Sep 2004 12:44:54 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id B669543D55; Thu, 23 Sep 2004 12:44:53 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id C5AED6542F; Thu, 23 Sep 2004 13:44:51 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 61798-01-2; Thu, 23 Sep 2004 13:44:51 +0100 (BST) Received: from empiric.dek.spc.org (adsl-64-171-185-240.dsl.snfc21.pacbell.net [64.171.185.240]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 652936542B; Thu, 23 Sep 2004 13:44:47 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 80ED863D3; Thu, 23 Sep 2004 05:44:44 -0700 (PDT) Date: Thu, 23 Sep 2004 05:44:44 -0700 From: Bruce M Simpson To: Phillip Crumpler Message-ID: <20040923124444.GE870@empiric.icir.org> Mail-Followup-To: Phillip Crumpler , freebsd-hackers@freebsd.org, freebsd-mobile@freebsd.org References: <4152BA25.70102@crippy.mel.crumpler.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4152BA25.70102@crippy.mel.crumpler.com.au> cc: freebsd-hackers@freebsd.org cc: freebsd-mobile@freebsd.org Subject: Re: Error 1802: IBM T41 doesn't like other network cards X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 12:44:54 -0000 Hi, On Thu, Sep 23, 2004 at 09:57:25PM +1000, Phillip Crumpler wittered thus: > Anyone else has similar problems? BMS@ reported ditching the Centrino > card in his T40 but didn't mention if he replaced it with something else. I used an official IBM Atheros part, so I didn't run into this problem. > http://www.ussg.iu.edu/hypermail/linux/kernel/0406.1/1048.html The quickest way to do this is to use the DOS program linked to above. Porting the CMOS code to FreeBSD is fairly trivial for someone who knows, though, but you probably don't want to wait. BMS From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 14:46:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30D1C16A4CE for ; Thu, 23 Sep 2004 14:46:31 +0000 (GMT) Received: from magellan.palisadesys.com (magellan.palisadesys.com [192.188.162.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA00F43D31 for ; Thu, 23 Sep 2004 14:46:30 +0000 (GMT) (envelope-from ghelmer@palisadesys.com) Received: from [192.188.162.240] (ghelmer@volans.palisadesys.com [192.188.162.240]) (authenticated bits=0)i8NEkSlk030290 for ; Thu, 23 Sep 2004 09:46:28 -0500 (CDT) (envelope-from ghelmer@palisadesys.com) Message-ID: <4152E1C4.6030003@palisadesys.com> Date: Thu, 23 Sep 2004 09:46:28 -0500 From: Guy Helmer User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040902) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Palisade-MailScanner-Information: Please contact the ISP for more information X-Palisade-MailScanner: Found to be clean X-MailScanner-From: ghelmer@palisadesys.com Subject: Niagara 2250/2260 dual Gigabit passthrough NIC watchdog driver? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 14:46:31 -0000 I'm looking at the Interface Masters Niagara 2250 dual gig passthrough NIC for a filtering system. It has a watchdog timer that can bypass the interfaces if the software fails to update the timer. Interface Masters' web site claims FreeBSD 4 support, but when asked they were only able to provide a Linux driver. Has anyone done a FreeBSD driver for this card or patched if_em.c for it? Thanks, Guy Helmer -- Guy Helmer, Ph.D., Principal System Architect, Palisade Systems, Inc. ghelmer@palisadesys.com http://www.palisadesys.com/~ghelmer From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 15:09:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 624E816A4CE for ; Thu, 23 Sep 2004 15:09:19 +0000 (GMT) Received: from intelli7.com (host350.jtan.com [207.106.6.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35BC543D1F for ; Thu, 23 Sep 2004 15:09:19 +0000 (GMT) (envelope-from bcg@intelli7.com) Received: from [192.168.0.2] (unknown [65.222.158.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intelli7.com (Postfix) with ESMTP id 1D3CE7DC86A; Thu, 23 Sep 2004 11:13:06 -0400 (EDT) From: Brenden Grace To: freebsd-hackers@freebsd.org In-Reply-To: <4152E1C4.6030003@palisadesys.com> References: <4152E1C4.6030003@palisadesys.com> Content-Type: text/plain Message-Id: <1095952016.2670.228.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 23 Sep 2004 11:06:57 -0400 Content-Transfer-Encoding: 7bit Subject: Re: Niagara 2250/2260 dual Gigabit passthrough NIC watchdog driver? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 15:09:19 -0000 On Thu, 2004-09-23 at 10:46, Guy Helmer wrote: > Has anyone done a FreeBSD driver for this card or patched if_em.c for it? The Niagara "driver" is really just the em driver with a character device to handle the user land utility. I have ported the basic functionality of the Niagara cdev to FreeBSD 5.x, but have yet to finish the watchdog stuff. Currently you can use the user land utility to put the interface in bypass or active mode and retrieve information about the card. There is a decent chance that this work will be open sourced by either InterfaceMasters or by us, but I can not speak with complete authority on the matter. -- Brenden C. Grace Intelli7 From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 15:12:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8ECF716A4CE for ; Thu, 23 Sep 2004 15:12:50 +0000 (GMT) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54CE043D4C for ; Thu, 23 Sep 2004 15:12:50 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 32037 invoked from network); 23 Sep 2004 15:12:49 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Sep 2004 15:12:49 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i8NFCibd009523; Thu, 23 Sep 2004 11:12:45 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Thu, 23 Sep 2004 10:07:47 -0400 User-Agent: KMail/1.6.2 References: <20040923082945.AC5EC43D4C@mx1.FreeBSD.org> In-Reply-To: <20040923082945.AC5EC43D4C@mx1.FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409231007.47467.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx Subject: Re: Dell gx280 and acpi problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 15:12:50 -0000 On Thursday 23 September 2004 04:29 am, Danny Braniss wrote: > > On Wednesday 22 September 2004 04:58 am, Danny Braniss wrote: > > > could some acpi expert shed some light? > > > > > > -current panics on boot with BIOS default settings (Suspend Mode is S3) > > > fix: set Power Management/Suspend Mode to S1 in BIOS > > > > > > disabling ACPI on boot is not good, since this box has no PS/2, and the > > > USB keyboard/mouse don't work with ACPI off. > > > > > > the acpi dumps are available from: > > > ftp://ftp.cs.huji.ac.il/users/danny/freebsd/gx280 > > > > > > this is the panic: > > > > > > > > > KDB: debugger backends: ddb > > > KDB: current backend: ddb > > > Copyright (c) 1992-2004 The FreeBSD Project. > > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, > > > 1994 The Regents of the University of California. All rights reserved. > > > FreeBSD 5.3-BETA5 #14: Tue Sep 21 13:44:32 IDT 2004 > > > danny@new-dev:/r+d/obj/new-dev/r+d/5.3/src/sys/HUJI > > > Timecounter "i8254" frequency 1193182 Hz quality 0 > > > CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2992.52-MHz 686-class CPU) > > > Origin = "GenuineIntel" Id = 0xf34 Stepping = 4 > > > > > > Features=0xbfebfbff > >E,MC A, CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> > > > Hyperthreading: 2 logical CPUs > > > real memory = 1063813120 (1014 MB) > > > avail memory = 1031565312 (983 MB) > > > kernel trap 12 with interrupts disabled > > > > > > > > > Fatal trap 12: page fault while in kernel mode > > > cpuid = 0; apic id = 00 > > > fault virtual address = 0x1c > > > fault code = supervisor write, page not present > > > instruction pointer = 0x8:0xc075dab5 > > > stack pointer = 0x10:0xc0c21be0 > > > frame pointer = 0x10:0xc0c21cac > > > code segment = base 0x0, limit 0xfffff, type 0x1b > > > = DPL 0, pres 1, def32 1, gran 1 > > > processor eflags = interrupt enabled, resume, IOPL = 0 > > > current process = 0 () > > > [thread 0] > > > Stopped at vm_fault+0x1b1: lock cmpxchgl %ecx,0x1c(%edx) > > > db> trace > > > vm_fault(c103a000,c1004000,1,0,c08e36c0) at vm_fault+0x1b1 > > > trap_pfault(c0c21d14,0,c1004c29) at trap_pfault+0x184 > > > trap(fffd0018,c1000010,c0c20010,c1004bfd,7) at trap+0x2f1 > > > calltrap() at calltrap+0x5 > > > --- trap 0xc, eip = 0xc0a18574, esp = 0xc0c21d54, ebp = 0xc0c21d74 --- > > > madt_probe(c22264f0,c08bb1f0,c0c21d98,c05e8302,0) at madt_probe+0x174 > > > apic_init(0,c1ec00,c1e000,0,c0441225) at apic_init+0x47 > > > mi_startup() at mi_startup+0x96 > > > begin() at begin+0x2c > > > > Can you do a 'gdb kernel.debug' and then do 'l madt_probe+0x174' and > > e-mail the results? > > I think i'm doing something wrong :-), tip -38400 com1 works fine, > Type '?' for a list of commands, 'help' for more detailed help. > OK boot -d > /boot/kernel/acpi.ko text=0x3fa30 data=0x1be4+0x110c > syms=[0x4+0x72a0+0x4+0x9743] > GDB: debug ports: sio > GDB: current port: sio > KDB: debugger backends: ddb gdb > KDB: current backend: ddb > KDB: enter: Boot flags requested debugger > [thread 0] > Stopped at kdb_enter+0x2b: nop > db> gdb > Step to enter the remote GDB backend. > > backing out of tip via ~. > > > shuttle-2# gdb -b 38400 kernel.debug > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are welcome to change it and/or distribute copies of it under certain > conditions. Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "i386-marcel-freebsd"... > Ready to go. Enter 'tr' to connect to the remote target > with /dev/cuaa0, 'tr /dev/cuaa1' to connect to a different port > or 'trf portno' to connect to the remote target with the firewire > interface. portno defaults to 5556. > > Type 'getsyms' after connection to load kld symbols. > > If you're debugging a local system, you can use 'kldsyms' instead > to load the kld symbols. That's a less obnoxious interface. > (gdb) tr /dev/cuaa0 > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Couldn't establish connection to remote target > Malformed response to offset query, timeout > (gdb) You don't have to do the gdb during the panic. You just need access to the kernel.debug corresponding to the kernel you are booting. Is this a custom kernel on the box or are you doing an install? If you are doing an install, try disabling apic support by entering 'set hint.apic.0.disabled=1' at the loader prompt and install that way. Then, once the box is running, build a debug kernel, reproduce the panic, get the instruction pointer address, and then fire up gdb on the kernel.debug file and do 'l *'. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 22:41:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9402A16A4CE for ; Thu, 23 Sep 2004 22:41:03 +0000 (GMT) Received: from caine.easynet.fr (smarthost144.mail.easynet.fr [212.180.1.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5F3643D3F for ; Thu, 23 Sep 2004 22:41:02 +0000 (GMT) (envelope-from tataz@tatooine.tataz.chchile.org) Received: from [212.180.127.72] (helo=tatooine.tataz.chchile.org) by caine.easynet.fr with esmtp (Exim 4.34) id 1CAcGo-0001QD-Bh for freebsd-hackers@freebsd.org; Fri, 24 Sep 2004 00:40:59 +0200 Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id C31D440AC; Fri, 24 Sep 2004 00:40:09 +0200 (CEST) Resent-From: jeremie@le-hen.org Resent-Date: Fri, 24 Sep 2004 00:40:09 +0200 Resent-Message-ID: <20040923224009.GB12440@obiwan.tataz.chchile.org> Resent-To: freebsd-hackers@freebsd.org X-Original-To: jeremie@le-hen.org Delivered-To: tataz@tataz.chchile.org Received: from ideliver (deliver.epitech.net [163.5.0.25]) by tatooine.tataz.chchile.org (Postfix) with SMTP id 58CB840A0 for ; Fri, 24 Sep 2004 00:38:36 +0200 (CEST) Received: from epita.fr ([10.42.1.60]) by ideliver (SAVSMTP 3.1.2.35) with SMTP id M2004092400380617822 for ; Fri, 24 Sep 2004 00:38:06 +0200 Received: from rocco (rocco [10.42.14.9]) by epita.fr id i8NMdGg08586 for jeremie@le-hen.org EPITA Paris France Fri, 24 Sep 2004 00:39:16 +0200 (CEST) Resent-From: jeremie le-hen Resent-Message-Id: <200409232239.i8NMdGg08586@epita.fr> Date: Tue, 21 Sep 2004 15:47:07 +0200 From: Jeremie Le Hen To: freebsd-hackers@freebsd.org Message-ID: <20040921134707.GA1276@rocco.epita.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Resent-Date: Fri, 24 Sep 2004 00:39:17 +0200 Resent-To: jeremie@le-hen.org X-Broken-Reverse-DNS: no host name found for IP address 212.180.127.72 Subject: STRIP in /usr/share/mk/ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 22:41:03 -0000 Hi, while playing around ifconfig.c, I needed to use gdb(1) on the generated binary : z6po:ifconfig# make clean ; make DEBUG_FLAGS=-ggdb && make install [...] install -s -o root -g wheel -m 555 ifconfig /sbin install -o root -g wheel -m 444 ifconfig.8.gz /usr/share/man/man8 As you can see, although I compiled with DEBUG_FLAGS, the binary is stripped on install(1) so I cannot easily use gdb(1) on it. I looked at the Makefile which includes bsd.prog.mk : .if !defined(DEBUG_FLAGS) STRIP?= -s .endif Obviously the only way to have STRIP set to "-s" is that it is set elsewhere ; bsd.prog.mk also includes bsd.lib.mk and indirectly bsd.own.mk but they contain _exactly_ the same statement. Nothing else seems to modify the STRIP variable : z6po:mk# grep -C 1 'STRIP.*=' * bsd.lib.mk-.if !defined(DEBUG_FLAGS) bsd.lib.mk:STRIP?= -s bsd.lib.mk-.endif -- bsd.own.mk-.if !defined(DEBUG_FLAGS) bsd.own.mk:STRIP?= -s bsd.own.mk-.endif -- bsd.prog.mk-.if !defined(DEBUG_FLAGS) bsd.prog.mk:STRIP?= -s bsd.prog.mk-.endif I absolutly don't understand how this variable is set. Note that make make.conf(5) doesn't contain anything about STRIP, and I also tried to do : make DEBUG_FLAGS=-ggdb STRIP='' but the result is exactly the sale unfortunately. I surely have missed something, but I can't find what. I'm pretty sure that ru@ has some explanations on this black magic stuff. :-) Thanks in advance. Regards, -- Jeremie LE HEN aka TtZ jeremie.le-hen@epita.fr ttz@epita.fr Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 00:01:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98A7716A4CE for ; Fri, 24 Sep 2004 00:01:56 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5724E43D1F for ; Fri, 24 Sep 2004 00:01:53 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i8O01jZ8035816; Fri, 24 Sep 2004 09:31:46 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Tim Pushor Date: Fri, 24 Sep 2004 09:31:44 +0930 User-Agent: KMail/1.7 References: <4151C8F6.5060905@crossthread.com> <200409232201.30201.doconnor@gsoft.com.au> <41535CCE.8070503@crossthread.com> In-Reply-To: <41535CCE.8070503@crossthread.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4060357.UgblMQGHEe"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200409240931.45075.doconnor@gsoft.com.au> X-Spam-Score: -2.5 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: freebsd-hackers@freebsd.org Subject: Re: Crystalfontz LCD display from kernel? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 00:01:56 -0000 --nextPart4060357.UgblMQGHEe Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Fri, 24 Sep 2004 09:01, Tim Pushor wrote: > Theres' really nothing to port. I just want to output various things at > different points in the bootup process, and again when the system is > safe to shut off. I mean test the basics in a place that's easy to debug. > How painful is it to open/use a device from inside the kernel? Not really sure.. Opening files isn't too bad, but device nodes is probably harder. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart4060357.UgblMQGHEe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBU2Pp5ZPcIHs/zowRAre9AKCQCZxLzygUvgSL0KBP9ur4pbbgkgCeKIBy wdoBk82cDyjmJB5riOFZEBg= =6UGz -----END PGP SIGNATURE----- --nextPart4060357.UgblMQGHEe-- From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 00:02:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9D6216A4CE for ; Fri, 24 Sep 2004 00:02:36 +0000 (GMT) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [69.194.102.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E54C43D31 for ; Fri, 24 Sep 2004 00:02:36 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 1F4F854898; Thu, 23 Sep 2004 17:02:52 -0700 (PDT) Date: Thu, 23 Sep 2004 17:02:51 -0700 From: Kris Kennaway To: Jeremie Le Hen Message-ID: <20040924000251.GA53006@xor.obsecurity.org> References: <20040921134707.GA1276@rocco.epita.fr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: <20040921134707.GA1276@rocco.epita.fr> User-Agent: Mutt/1.4.2.1i cc: freebsd-hackers@freebsd.org Subject: Re: STRIP in /usr/share/mk/ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 00:02:37 -0000 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 21, 2004 at 03:47:07PM +0200, Jeremie Le Hen wrote: > Hi, >=20 > while playing around ifconfig.c, I needed to use gdb(1) on the generated > binary : >=20 > z6po:ifconfig# make clean ; make DEBUG_FLAGS=3D-ggdb && make install > [...] > install -s -o root -g wheel -m 555 ifconfig /sbin > install -o root -g wheel -m 444 ifconfig.8.gz /usr/share/man/man8 >=20 >=20 > As you can see, although I compiled with DEBUG_FLAGS, the binary is > stripped on install(1) so I cannot easily use gdb(1) on it. > I looked at the Makefile which includes bsd.prog.mk : What's wrong with 'make DEBUG_FLAGS=3D-ggdb all install'? Kris --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBU2QqWry0BWjoQKURAgELAKC8ObuXxwtD8tiZmDFvxLQyVqnJbwCfUCiO 6yCvq3EBSESte1zyJQ5OLBQ= =Ezwe -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY-- From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 00:12:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2525B16A4CE for ; Fri, 24 Sep 2004 00:12:38 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 159D343D2F for ; Fri, 24 Sep 2004 00:12:37 +0000 (GMT) (envelope-from keramida@linux.gr) Received: from gothmog.gr (patr530-a179.otenet.gr [212.205.215.179]) i8O0CVgg019946; Fri, 24 Sep 2004 03:12:32 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i8O0CV5k027719; Fri, 24 Sep 2004 03:12:31 +0300 (EEST) (envelope-from keramida@linux.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i8O0CSIR027718; Fri, 24 Sep 2004 03:12:28 +0300 (EEST) (envelope-from keramida@linux.gr) Date: Fri, 24 Sep 2004 03:12:28 +0300 From: Giorgos Keramidas To: Jeremie Le Hen Message-ID: <20040924001227.GC27322@gothmog.gr> References: <20040921134707.GA1276@rocco.epita.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040921134707.GA1276@rocco.epita.fr> cc: freebsd-hackers@freebsd.org Subject: Re: STRIP in /usr/share/mk/ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 00:12:38 -0000 On 2004-09-21 15:47, Jeremie Le Hen wrote: > Hi, > > while playing around ifconfig.c, I needed to use gdb(1) on the generated > binary : > > z6po:ifconfig# make clean ; make DEBUG_FLAGS=-ggdb && make install > [...] > install -s -o root -g wheel -m 555 ifconfig /sbin > install -o root -g wheel -m 444 ifconfig.8.gz /usr/share/man/man8 DEBUG_FLAGS isn't set in the second invocation of make. Try either passing both the "all" and "install" targets to the same make instance or defining DEBUG_FLAGS both times: # env DEBUG_FLAGS="-ggdb" make clean all install # make DEBUG_FLAGS="-ggdb" clean all install # make clean && make DEBUG_FLAGS="-ggdb" && make DEBUG_FLAGS="-ggdb" install Pick one of the above. They should all work as expected. From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 05:23:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C286F16A4CE for ; Fri, 24 Sep 2004 05:23:29 +0000 (GMT) Received: from crumpler-s1.mel.crumpler.com.au (b20FB.static.pacific.net.au [210.23.137.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AA6343D4C for ; Fri, 24 Sep 2004 05:23:28 +0000 (GMT) (envelope-from listsubs@crippy.mel.crumpler.com.au) Received: from [203.208.117.170] ([203.208.117.170]) by crumpler-s1.mel.crumpler.com.au over TLS secured channel with Microsoft SMTPSVC(5.0.2195.6713); Fri, 24 Sep 2004 15:23:26 +1000 Message-ID: <4153AF49.6020603@crippy.mel.crumpler.com.au> Date: Fri, 24 Sep 2004 15:23:21 +1000 From: Phillip Crumpler User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040818) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Sep 2004 05:23:26.0294 (UTC) FILETIME=[9E4AB760:01C4A1F6] Subject: ifunit and struct ifnet/ieee80211com X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 05:23:29 -0000 Hi hackers, A few questions re. ifunit and struct ifnet/ieee80211com, if anyone can help me out: I assume that for a wireless interface ifunit will return a pointer to a struct ieee80211com. Is there any way to tell which of these I have, so I don't try to access ieee80211com members in a struct that is actually the smaller infet? Both ethernet and wireless ethernet seem to use if_type == 6 (IFT_ETHER) and if_physical == 0. Can I distinguish which type I have or should I just make sure I know beforehand? Also, what is the lifetime of the (struct ifnet *) that ifunit returns? If an interface goes away is the ifnet freed, leaving me with a dangling pointer, or is it kept but marked inactive in some way? cheers, Phillip From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 05:46:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13D5716A4CE for ; Fri, 24 Sep 2004 05:46:36 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E645E43D45 for ; Fri, 24 Sep 2004 05:46:35 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8O5nHTg000707; Thu, 23 Sep 2004 22:49:17 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8O5nHam000706; Thu, 23 Sep 2004 22:49:17 -0700 Date: Thu, 23 Sep 2004 22:49:17 -0700 From: Brooks Davis To: Phillip Crumpler Message-ID: <20040924054917.GA31309@odin.ac.hmc.edu> References: <4153AF49.6020603@crippy.mel.crumpler.com.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <4153AF49.6020603@crippy.mel.crumpler.com.au> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-hackers@freebsd.org Subject: Re: ifunit and struct ifnet/ieee80211com X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 05:46:36 -0000 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 24, 2004 at 03:23:21PM +1000, Phillip Crumpler wrote: > Hi hackers, >=20 > A few questions re. ifunit and struct ifnet/ieee80211com, if anyone can= =20 > help me out: >=20 > I assume that for a wireless interface ifunit will return a pointer to a= =20 > struct ieee80211com. Is there any way to tell which of these I have, so= =20 > I don't try to access ieee80211com members in a struct that is actually= =20 > the smaller infet? Both ethernet and wireless ethernet seem to use=20 > if_type =3D=3D 6 (IFT_ETHER) and if_physical =3D=3D 0. Can I distinguish = which=20 > type I have or should I just make sure I know beforehand? You need to know that the struct ifnet is actually embeded in a struct ieee80211com if you want to access the members. In properly designed code this won't generally be ambiguious. If you some how manage to get into a state where it is, if_dname is probably your best bet. That sort of thing is discouraged though. > Also, what is the lifetime of the (struct ifnet *) that ifunit returns?= =20 > If an interface goes away is the ifnet freed, leaving me with a dangling= =20 > pointer, or is it kept but marked inactive in some way? There is currently no assurance that a pointer to a struct ifnet is valid. If you're going to hold a pointer over anything but trivial operations, don't. Hold the index and us ifnet_byindex instead. Currently that also dies since it returns NULL after attach, but I plan to look in to returning a special dead_if to avoid crashes. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBU7VcXY6L6fI4GtQRAgokAKCsGf+fU7wta+ty6ZQpUDaLy03bmwCggrcy Iln7mtnzCGV8s3HgZJ90194= =SPtJ -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM-- From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 06:57:40 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E8F616A4CE for ; Fri, 24 Sep 2004 06:57:40 +0000 (GMT) Received: from corwin.easynet.fr (smarthost143.mail.easynet.fr [212.180.1.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8882643D54 for ; Fri, 24 Sep 2004 06:57:39 +0000 (GMT) (envelope-from tataz@tatooine.tataz.chchile.org) Received: from [212.180.127.72] (helo=tatooine.tataz.chchile.org) by corwin.easynet.fr with esmtp (Exim 4.34) id 1CAk1R-0002NO-BG; Fri, 24 Sep 2004 08:57:37 +0200 Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id EBCDF40AC; Fri, 24 Sep 2004 08:56:44 +0200 (CEST) Date: Fri, 24 Sep 2004 08:56:43 +0200 From: Jeremie Le Hen To: Giorgos Keramidas Message-ID: <20040924065643.GC12440@obiwan.tataz.chchile.org> References: <20040921134707.GA1276@rocco.epita.fr> <20040924001227.GC27322@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040924001227.GC27322@gothmog.gr> User-Agent: Mutt/1.5.6i X-Broken-Reverse-DNS: no host name found for IP address 212.180.127.72 cc: freebsd-hackers@freebsd.org cc: Jeremie Le Hen Subject: Re: STRIP in /usr/share/mk/ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 06:57:40 -0000 > > while playing around ifconfig.c, I needed to use gdb(1) on the generated > > binary : > > > > z6po:ifconfig# make clean ; make DEBUG_FLAGS=-ggdb && make install > > [...] > > install -s -o root -g wheel -m 555 ifconfig /sbin > > install -o root -g wheel -m 444 ifconfig.8.gz /usr/share/man/man8 > > DEBUG_FLAGS isn't set in the second invocation of make. Try either > passing both the "all" and "install" targets to the same make instance > or defining DEBUG_FLAGS both times: > > # env DEBUG_FLAGS="-ggdb" make clean all install > # make DEBUG_FLAGS="-ggdb" clean all install > # make clean && make DEBUG_FLAGS="-ggdb" && make DEBUG_FLAGS="-ggdb" install > > Pick one of the above. They should all work as expected. Thanks, I'm really stupid. -- Jeremie LE HEN aka TtZ jeremie.le-hen@epita.fr ttz@epita.fr Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 10:04:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 366AC16A4CE for ; Fri, 24 Sep 2004 10:04:08 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E87AA43D55 for ; Fri, 24 Sep 2004 10:04:07 +0000 (GMT) (envelope-from des@des.no) Received: from dwp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id DC1E63ED6; Fri, 24 Sep 2004 12:04:48 +0200 (MEST) Received: by dwp.des.no (Postfix, from userid 2602) id E7F0EB85E; Fri, 24 Sep 2004 12:04:06 +0200 (CEST) To: Niels Heinen References: From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Fri, 24 Sep 2004 12:04:06 +0200 In-Reply-To: (Niels Heinen's message of "Thu, 23 Sep 2004 11:38:28 +0200") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: freebsd-hackers@freebsd.org Subject: Re: Copy data from kernel to user space memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 10:04:08 -0000 Niels Heinen writes: > The module buffers packets and currently copies it into user memory > when its system call interface is used. At the moment my user space > application is the one that allocates the memory. I want the memory > to be allocated by the module in order to make things more efficient. You can't do that. The kernel allocates address space, not memory. It is up to the application to manage its address space as it sees fit. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 15:34:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4CE116A4CE for ; Thu, 23 Sep 2004 15:34:39 +0000 (GMT) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DCC943D39 for ; Thu, 23 Sep 2004 15:34:39 +0000 (GMT) (envelope-from mwm-dated-1096816702.d01adc@mired.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 82645149E3D for ; Thu, 23 Sep 2004 08:34:39 -0700 (PDT) Received: from mired.org (mwm@idiom [216.240.32.1]) by idiom.com (8.12.11/8.12.11) with SMTP id i8NFIOxQ026561 for ; Thu, 23 Sep 2004 08:18:25 -0700 (PDT) (envelope-from mwm-dated-1096816702.d01adc@mired.org) Received: (qmail 91435 invoked by uid 100); 23 Sep 2004 15:18:23 -0000 Received: by guru.mired.org (tmda-sendmail, from uid 100); Thu, 23 Sep 2004 10:18:22 -0500 (CDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16722.59709.451226.932084@guru.mired.org> Date: Thu, 23 Sep 2004 10:18:21 -0500 To: "Gordon David" In-Reply-To: References: X-Mailer: VM 7.17 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer X-Mailman-Approved-At: Fri, 24 Sep 2004 12:15:34 +0000 cc: bzeeb-lists@lists.zabbadoz.net cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 15:34:39 -0000 In , Gordon David typed: > > >From: "Bjoern A. Zeeb" > >To: Gordon David > >CC: freebsd-hackers@freebsd.org > >Subject: Re: execute a user process in the kernel > >Date: Thu, 23 Sep 2004 08:02:18 +0000 (UTC) > > > >On Thu, 23 Sep 2004, Gordon David wrote: > > > > > That's the point. I do not want the userland program to check > /dev/fooctl > > > from time to time. I want the kernel to notify the userland program > > > instead. So how shall I do it? Maybe linker_load_file is a better way. > > > >man 2 kqueue ? > Kqueue is a good method to notify the user. But I want the code in the > kernel directly calls a user program. How about starting with the code in kern/kern_exec.c? http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 23:27:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D7F416A4CE for ; Thu, 23 Sep 2004 23:27:08 +0000 (GMT) Received: from hercules.crossthread.com (hercules.crossthread.com [64.56.149.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44E3243D31 for ; Thu, 23 Sep 2004 23:27:08 +0000 (GMT) (envelope-from timp@crossthread.com) Received: from [192.168.1.2] (dedalus.crossthread.com [192.168.1.2]) (authenticated)i8NNW3p47424; Thu, 23 Sep 2004 17:32:03 -0600 (MDT) Message-ID: <41535CCE.8070503@crossthread.com> Date: Thu, 23 Sep 2004 17:31:26 -0600 From: Tim Pushor User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Daniel O'Connor" References: <4151C8F6.5060905@crossthread.com> <200409232201.30201.doconnor@gsoft.com.au> In-Reply-To: <200409232201.30201.doconnor@gsoft.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 24 Sep 2004 12:15:34 +0000 cc: freebsd-hackers@freebsd.org Subject: Re: Crystalfontz LCD display from kernel? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 23:27:08 -0000 Daniel O'Connor wrote: >On Thu, 23 Sep 2004 04:18, Tim Pushor wrote: > > >>My question is, I would really like to be able to display various things >>during startup, shutdown, and once shutdown is complete to the LCD. I >>assume I would have to modify the kernel for this. I done lots of C >>programming, and hardware interface programming in C and assembler, but >>never any UNIX kernel programming. >> >>First of all, is this doable? Also, would it be easier (from the kernel >>programming perspective) to do this via USB or Serial? >> >> > >Opening a device etc from the kernel would be moderatly painful.. >It write a userland program which did it first and then port it. > > > Daniel, Theres' really nothing to port. I just want to output various things at different points in the bootup process, and again when the system is safe to shut off. How painful is it to open/use a device from inside the kernel? Thanks, Tim From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 15:49:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAEB316A4DC; Fri, 24 Sep 2004 15:49:58 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92D6743D31; Fri, 24 Sep 2004 15:49:58 +0000 (GMT) (envelope-from David.Bear@asu.edu) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0I4J00901YG8YI@asu.edu>; Fri, 24 Sep 2004 08:45:44 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) <0I4J0092IYG8SO@asu.edu>; Fri, 24 Sep 2004 08:45:44 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.69.200]) (8.12.10/8.12.10/asu_smtp_relay,nullclient,tcp_wrapped) with ESMTP id i8OFjg71010854; Fri, 24 Sep 2004 08:45:42 -0700 (MST) Received: by moroni.pp.asu.edu (Postfix, from userid 500) id E2878E04; Fri, 24 Sep 2004 08:45:40 -0700 (MST) Received: from post1.inre.asu.edu (post1.inre.asu.edu [129.219.110.72]) by imap1.asu.edu (8.11.0/8.11.0/asu_cyrus,tcp_wrapped) with ESMTP id f889kMX20194 for ; Sat, 08 Sep 2001 02:46:22 -0700 (MST) Received: from conversion.post1.inre.asu.edu by asu.edu (PMDF V6.0-24 #47346) david.bear@asu.edu) ; Sat, 08 Sep 2001 02:46:22 -0700 (MST) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by asu.edu (PMDF V6.0-24 #47346) with ESMTP id <0GJC00IKW8H92N@asu.edu> for iddwb@IMAP1.ASU.EDU (ORCPT david.bear@asu.edu); Sat, 08 Sep 2001 02:46:22 -0700 (MST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id AB29055ACB; Sat, 08 Sep 2001 02:46:11 -0700 Received: by hub.freebsd.org (Postfix, from userid 538) id C3E0537B40F; Sat, 08 Sep 2001 02:45:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id 38B822E8152; Sat, 08 Sep 2001 02:45:58 -0700 (PDT) Received: by hub.freebsd.org (bulk_mailer v1.12); Sat, 08 Sep 2001 02:45:58 -0700 Received: from ringworld.nanolink.com (sentinel.office1.bg [217.75.135.254]) by hub.freebsd.org (Postfix) with SMTP id 6568837B401 for ; Sat, 08 Sep 2001 02:45:52 -0700 (PDT) Received: (qmail 9160 invoked by uid 1000); Sat, 08 Sep 2001 09:45:28 +0000 From: Peter Pentchev In-reply-to: <"from deepak"@ai.net> Sender: owner-freebsd-security@FreeBSD.ORG To: dwbear75@gmail.com Message-id: <20010908124528.D2176@ringworld.oblivion.bg> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline Precedence: bulk X-Loop: FreeBSD.org Delivered-to: freebsd-security@freebsd.org Old-To: Deepak Jain User-Agent: Mutt/1.2.5i References: X-Keywords: X-Status: cc: freebsd-security@FreeBSD.ORG cc: "freebsd-hackers@FreeBSD. ORG" Subject: Re: Kernel-loadable Root Kits X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Fri, 24 Sep 2004 15:49:59 -0000 X-Original-Date: Sat, 08 Sep 2001 12:45:28 +0300 X-List-Received-Date: Fri, 24 Sep 2004 15:49:59 -0000 On Sat, Sep 08, 2001 at 05:43:41AM -0400, Deepak Jain wrote: > > Short question: > > Is there a way to prevent the kernel from allowing loadable modules? Run your system in securelevel 1 or higher. See the init(8) manual page and the kern_securelevel_enable and kern_securelevel variables in the rc.conf(5) manual page. G'luck, Peter -- .siht ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 15:50:40 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A8B316A565; Fri, 24 Sep 2004 15:50:40 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC0B643D53; Fri, 24 Sep 2004 15:50:31 +0000 (GMT) (envelope-from David.Bear@asu.edu) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0I4J00A01YHZJG@asu.edu>; Fri, 24 Sep 2004 08:46:47 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) <0I4J00ABOYHZ5Y@asu.edu>; Fri, 24 Sep 2004 08:46:47 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.69.200]) (8.12.10/8.12.10/asu_smtp_relay,nullclient,tcp_wrapped) with ESMTP id i8OFkj71012421; Fri, 24 Sep 2004 08:46:45 -0700 (MST) Received: by moroni.pp.asu.edu (Postfix, from userid 500) id E298BE0F; Fri, 24 Sep 2004 08:46:26 -0700 (MST) Received: from post1.inre.asu.edu (post1.inre.asu.edu [129.219.110.72]) by imap1.asu.edu (8.11.0/8.11.0/asu_cyrus,tcp_wrapped) with ESMTP id g3JG38E13889 for ; Fri, 19 Apr 2002 09:03:08 -0700 (MST) Received: from conversion.post1.inre.asu.edu by asu.edu (PMDF V6.1 #40110) david.bear@asu.edu) ; Fri, 19 Apr 2002 09:03:09 -0700 (MST) Received: from mx2.freebsd.org (mx2.FreeBSD.org [216.136.204.119]) by asu.edu (PMDF V6.1 #40110) with ESMTP id <0GUT00CQ3OL9FG@asu.edu> for iddwb@IMAP1.ASU.EDU (ORCPT david.bear@asu.edu); Fri, 19 Apr 2002 09:03:09 -0700 (MST) Received: from hub.freebsd.org (hub.FreeBSD.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A2D4E56115; Fri, 19 Apr 2002 09:03:04 -0700 Received: by hub.freebsd.org (Postfix, from userid 538) id AED8B37B417; Fri, 19 Apr 2002 09:02:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id 937612E8023; Fri, 19 Apr 2002 09:02:37 -0700 (PDT) Received: by hub.freebsd.org (bulk_mailer v1.12); Fri, 19 Apr 2002 09:02:37 -0700 Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id 0A32B37B41B; Fri, 19 Apr 2002 09:02:32 -0700 (PDT) Received: from madman.nectar.cc (madman.nectar.cc [10.0.1.111]) by gw.nectar.cc (Postfix) with ESMTP id 8D37D10; Fri, 19 Apr 2002 11:02:31 -0500 (CDT) Received: from madman.nectar.cc (localhost [IPv6:::1]) by madman.nectar.cc (8.12.2/8.11.6) with ESMTP id g3JG2VVw065064; Fri, 19 Apr 2002 11:02:31 -0500 Received: (from nectar@localhost) by madman.nectar.cc (8.12.2/8.12.2/Submit) id g3JG2V0v065060; Fri, 19 Apr 2002 11:02:31 -0500 (CDT) X-URL: http://www.nectar.cc/ From: "Jacques A. Vidrine" In-reply-to: <200204191459.g3JExEh08010@sheol.localdomain> Sender: owner-freebsd-security@FreeBSD.ORG To: dwbear75@gmail.com Message-id: <20020419160231.GI31829@madman.nectar.cc> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline Precedence: bulk X-Loop: FreeBSD.org Delivered-to: freebsd-security@freebsd.org Old-To: D J Hawkey Jr User-Agent: Mutt/1.3.28i Lines: 20 References: <20020419220844.D190_IPAustralia.Gov.AU@ns.sol.net> <3CC02BB3.1030209_unt.edu@ns.sol.net> <200204191459.g3JExEh08010@sheol.localdomain> X-Keywords: cc: freebsd-security@FreeBSD.ORG cc: freebsd-hackers@FreeBSD.ORG cc: searle@unt.edu Subject: Re: Older releases? was Re: FreeBSD Security Advisory FreeBSD-SA-02:21.tcpip X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Fri, 24 Sep 2004 15:50:40 -0000 X-Original-Date: Fri, 19 Apr 2002 11:02:31 -0500 X-List-Received-Date: Fri, 24 Sep 2004 15:50:40 -0000 On Fri, Apr 19, 2002 at 09:59:14AM -0500, D J Hawkey Jr wrote: > Developers: Userland is affected here - /usr/lib/libz. Would a > "make && make install" (sic) in /usr/src/lib/libz before building the > kernel suffice for a solid upgrade? No, the src/lib/libz is --- as you note --- for userland. It is not used by the kernel. Note that the patch includes updates to the kernel source as well. Also note that `savecore' statically links libz, so it must be recompiled and reinstalled also. I don't believe there are any other programs in the base system that statically link libz. Cheers, -- Jacques A. Vidrine http://www.nectar.cc/ NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos jvidrine@verio.net . nectar@FreeBSD.org . nectar@kth.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 16:21:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F123C16A4CF for ; Fri, 24 Sep 2004 16:21:26 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A306943D53 for ; Fri, 24 Sep 2004 16:21:26 +0000 (GMT) (envelope-from des@des.no) Received: from dwp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id 9D5A216C7; Fri, 24 Sep 2004 18:22:07 +0200 (MEST) Received: by dwp.des.no (Postfix, from userid 2602) id 9E014B85E; Fri, 24 Sep 2004 18:21:25 +0200 (CEST) To: Mike Meyer References: <16722.59709.451226.932084@guru.mired.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Fri, 24 Sep 2004 18:21:25 +0200 In-Reply-To: <16722.59709.451226.932084@guru.mired.org> (Mike Meyer's message of "Thu, 23 Sep 2004 10:18:21 -0500") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: bzeeb-lists@lists.zabbadoz.net cc: Gordon David cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 16:21:27 -0000 Mike Meyer writes: > Gordon David writes: > > Kqueue is a good method to notify the user. But I want the code in > > the kernel directly calls a user program. > How about starting with the code in kern/kern_exec.c? execve(2) assumes you already have a process. You get a process by forking another process. The only process we ever create from scratch is init(8), and that takes a s**tload of work (see kern/init_main.c). This is why we have stuff like nfsiod(8) which does nothing but provide the kernel with a process context it can use for other stuff. You could, of course, write a kernel API for creating processes from scratch. They'd still need a parent, but you can use init(8) (pid 1) for that. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 18:12:13 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A05B16A4CE for ; Fri, 24 Sep 2004 18:12:13 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B84743D2D for ; Fri, 24 Sep 2004 18:12:12 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id i8OIBOEr000235; Fri, 24 Sep 2004 14:11:24 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i8OIBJnA000232; Fri, 24 Sep 2004 14:11:19 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Fri, 24 Sep 2004 14:11:19 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE cc: bzeeb-lists@lists.zabbadoz.net cc: Mike Meyer cc: Gordon David cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 18:12:13 -0000 On Fri, 24 Sep 2004, Dag-Erling Sm=F8rgrav wrote: > execve(2) assumes you already have a process. You get a process by > forking another process. The only process we ever create from scratch > is init(8), and that takes a s**tload of work (see kern/init_main.c).=20 > This is why we have stuff like nfsiod(8) which does nothing but provide > the kernel with a process context it can use for other stuff.=20 >=20 > You could, of course, write a kernel API for creating processes from > scratch. They'd still need a parent, but you can use init(8) (pid 1)=20 > for that.=20 Well, we have kproc/kthread APIs, but none of that is semantically compatible with the notion of execve(), which is a very user-centric concept ("replace the address space with a mapping of binary "). You could fudge together a related notion, though, involving loadable kernel modules that have a main() routine run from a thread. That said, the notion of simply running user code in kernel (as has been pointed out) is fraught with peril, primarily because the kernel is basically one big program with many special requirements, and user applications are written with the assumption that they are the only program, not running in the context of another program. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 19:20:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E4E416A4D4; Fri, 24 Sep 2004 19:20:23 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0995443D39; Fri, 24 Sep 2004 19:20:23 +0000 (GMT) (envelope-from des@des.no) Received: from dwp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id 98F6541A3; Fri, 24 Sep 2004 21:21:03 +0200 (MEST) Received: by dwp.des.no (Postfix, from userid 2602) id 77E90B85E; Fri, 24 Sep 2004 21:20:21 +0200 (CEST) To: Robert Watson References: From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Fri, 24 Sep 2004 21:20:21 +0200 In-Reply-To: (Robert Watson's message of "Fri, 24 Sep 2004 14:11:19 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: bzeeb-lists@lists.zabbadoz.net cc: Mike Meyer cc: Gordon David cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 19:20:23 -0000 Robert Watson writes: > Well, we have kproc/kthread APIs, but none of that is semantically > compatible with the notion of execve(), which is a very user-centric > concept ("replace the address space with a mapping of binary "). You > could fudge together a related notion, though, involving loadable kernel > modules that have a main() routine run from a thread. That said, the > notion of simply running user code in kernel (as has been pointed out) is > fraught with peril, primarily because the kernel is basically one big > program with many special requirements, and user applications are written > with the assumption that they are the only program, not running in the > context of another program. I believe the OP actually wanted the kernel to spawn a userland process, but I may have misunderstood. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 22:37:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A359016A4CE; Fri, 24 Sep 2004 22:37:54 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C21B43D2D; Fri, 24 Sep 2004 22:37:54 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from freefall.freebsd.org (csjp@localhost [127.0.0.1]) i8OMbsd7086886; Fri, 24 Sep 2004 22:37:54 GMT (envelope-from csjp@freebsd.org) Received: (from csjp@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8OMbs3L086885; Fri, 24 Sep 2004 22:37:54 GMT (envelope-from csjp@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: csjp set sender to csjp@freebsd.org using -f Date: Fri, 24 Sep 2004 22:37:54 +0000 From: "Christian S.J. Peron" To: hackers@freebsd.org Message-ID: <20040924223754.GA86799@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i cc: max@love2party.net cc: ipfw@freebsd.org cc: freebsd-pf@freebsd.org Subject: fixes for ipfw and pf lock ordering issues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 22:37:54 -0000 Good day folks, we need some beta testers Currently, those who utilize ucred based firewalling, i.e. firewall rules which match based on UID, GID or JAIL ID are subject to lock order problems which often results in the system hard locking. (when giant is not present ... debug.mpsafenet=1). This problem affects all FreeBSD firewalls which implement ucred based matching, namely ipfw and pf. The lock order problem exists due to a layering violation which occurs when the IP stack attempts to acquire locks within lower level stacks such as UDP and TCP. Max Laier (mlaier@) and myself have been working together to solve this problem. Together we have generated a set of diffs which do the following: o Add a pointer to a PCB to pfil_hooks o Modify existing pfil_hooks API to handle this extra argument o Modify the pf and ipfw firewalls to utilize this extra argument so that lookups on local outbound TCP and UDP traffic can be deactivated (removing the requirement for holding INP locks, which was a primary suspect for these lock ordering issues). o Implement a shared locking mechanism for firewall rule chain protection The intended results of these changes are: 1) Remove the lock ordering issues which result in system hard locks 2) Avoid redundant PCB lookup overhead improving the overall performance of ucred based rule sets 3) Improving network and firewall parallelism, shared locks give the OS the ability to run multiple evaluation or rule check activations concurrently, which should increase the overall network throughput on devices which have ipfw or pf firewalls enabled (regardless of whether or not these rules contain ucred based constraints). If anyone could help us test these changes that would be great: download: http://people.freebsd.org/~csjp/inp_pfil_fw_lor_fixes_shared_locks.1096053274.diff cd /usr/src/sys fetch http://people.freebsd.org/~csjp/inp_pfil_fw_lor_fixes_shared_locks.1096053274.diff patch < inp_pfil_fw_lor_fixes_shared_locks.1096053274.diff Recompile your kernel and any related pf or ipfw modules add some user/group/jail based firewall rules Remember, these are pretty beta so ... be gentle :) -- Christian S.J. Peron csjp@FreeBSD.ORG FreeBSD Committer From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 22:57:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58D8D16A4CE; Fri, 24 Sep 2004 22:57:06 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BD8243D5F; Fri, 24 Sep 2004 22:57:06 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CAyzx-0000ms-00; Sat, 25 Sep 2004 00:57:05 +0200 Received: from [217.83.1.154] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CAyzx-0002SW-00; Sat, 25 Sep 2004 00:57:05 +0200 From: Max Laier To: "Christian S.J. Peron" Date: Sat, 25 Sep 2004 00:55:55 +0200 User-Agent: KMail/1.7 References: <20040924223754.GA86799@freefall.freebsd.org> In-Reply-To: <20040924223754.GA86799@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4033428.rfQkKE7BF2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200409250056.10275.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: bz@freebsd.org cc: hackers@freebsd.org cc: ipfw@freebsd.org cc: freebsd-pf@freebsd.org Subject: Re: fixes for ipfw and pf lock ordering issues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 22:57:06 -0000 --nextPart4033428.rfQkKE7BF2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 25 September 2004 00:37, Christian S.J. Peron wrote: > Good day folks, we need some beta testers > > Currently, those who utilize ucred based firewalling, i.e. firewall > rules which match based on UID, GID or JAIL ID are subject to lock order > problems which often results in the system hard locking. (when giant > is not present ... debug.mpsafenet=3D1). > > This problem affects all FreeBSD firewalls which implement ucred based > matching, namely ipfw and pf. The lock order problem exists due to a > layering violation which occurs when the IP stack attempts to acquire > locks within lower level stacks such as UDP and TCP. =46or the record [just realized that we forgot]: Talking about LOR id 14-17= ... =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart4033428.rfQkKE7BF2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBVKYKXyyEoT62BG0RAn4eAJ46af5V5qDZOC5y1Nkf51CLfDDH7QCffFFa KQ2b9SmNIRWsgpa8pz4KveU= =1xo3 -----END PGP SIGNATURE----- --nextPart4033428.rfQkKE7BF2-- From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 25 10:07:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1943416A4CE for ; Sat, 25 Sep 2004 10:07:47 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E96743D53 for ; Sat, 25 Sep 2004 10:07:46 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id B5097653F8; Sat, 25 Sep 2004 11:07:44 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 98330-06-2; Sat, 25 Sep 2004 11:07:44 +0100 (BST) Received: from empiric.dek.spc.org (unknown [217.51.144.185]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id D95B2653B5; Sat, 25 Sep 2004 11:07:43 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 9064963D3; Sat, 25 Sep 2004 03:07:41 -0700 (PDT) Date: Sat, 25 Sep 2004 03:07:40 -0700 From: Bruce M Simpson To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20040925100740.GA814@empiric.icir.org> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Mike Meyer , bzeeb-lists@lists.zabbadoz.net, Gordon David , freebsd-hackers@freebsd.org References: <16722.59709.451226.932084@guru.mired.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: cc: bzeeb-lists@lists.zabbadoz.net cc: Mike Meyer cc: Gordon David cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2004 10:07:47 -0000 On Fri, Sep 24, 2004 at 06:21:25PM +0200, Dag-Erling Smørgrav wrote: > You could, of course, write a kernel API for creating processes from > scratch. They'd still need a parent, but you can use init(8) (pid 1) > for that. If we were to implement POSIX spawn(), we'd need something like this. So this may be worth looking at. BMS From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 25 11:35:15 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2ED0716A4CE for ; Sat, 25 Sep 2004 11:35:15 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFB3643D3F for ; Sat, 25 Sep 2004 11:35:14 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id CDE40534B; Sat, 25 Sep 2004 13:35:13 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 422B05308; Sat, 25 Sep 2004 13:35:07 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 124C7B85E; Sat, 25 Sep 2004 13:35:07 +0200 (CEST) To: Mike Meyer References: <16722.59709.451226.932084@guru.mired.org> <20040925100740.GA814@empiric.icir.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Sat, 25 Sep 2004 13:35:07 +0200 In-Reply-To: <20040925100740.GA814@empiric.icir.org> (Bruce M. Simpson's message of "Sat, 25 Sep 2004 03:07:40 -0700") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: bzeeb-lists@lists.zabbadoz.net cc: Gordon David cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2004 11:35:15 -0000 Bruce M Simpson writes: > On Fri, Sep 24, 2004 at 06:21:25PM +0200, Dag-Erling Sm=F8rgrav wrote: > > You could, of course, write a kernel API for creating processes from > > scratch. They'd still need a parent, but you can use init(8) (pid 1) > > for that. > If we were to implement POSIX spawn(), we'd need something like this. Uh, no. posix_spawn(3) can be implemented entirely in userland and does not require any special kernel support. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 15:50:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 278BD16A557; Fri, 24 Sep 2004 15:50:08 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDEF143D48; Fri, 24 Sep 2004 15:50:07 +0000 (GMT) (envelope-from David.Bear@asu.edu) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0I4J00A01YGQ50@asu.edu>; Fri, 24 Sep 2004 08:46:02 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) <0I4J0097HYGQSO@asu.edu>; Fri, 24 Sep 2004 08:46:02 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.69.200]) (8.12.10/8.12.10/asu_smtp_relay,nullclient,tcp_wrapped) with ESMTP id i8OFk171011310; Fri, 24 Sep 2004 08:46:01 -0700 (MST) Received: by moroni.pp.asu.edu (Postfix, from userid 500) id D4215E05; Fri, 24 Sep 2004 08:45:54 -0700 (MST) Received: from post1.inre.asu.edu (post1.inre.asu.edu [129.219.110.72]) by imap1.asu.edu (8.11.0/8.11.0/asu_cyrus,tcp_wrapped) with ESMTP id fAQDjT010155 for ; Mon, 26 Nov 2001 06:45:29 -0700 (MST) Received: from conversion.post1.inre.asu.edu by asu.edu (PMDF V6.1 #40110) david.bear@asu.edu) ; Mon, 26 Nov 2001 06:45:28 -0700 (MST) Received: from mx2.freebsd.org (mx2.FreeBSD.org [216.136.204.119]) by asu.edu (PMDF V6.1 #40110) with ESMTP id <0GNE00MOOU7ROQ@asu.edu> for iddwb@IMAP1.ASU.EDU (ORCPT david.bear@asu.edu); Mon, 26 Nov 2001 06:45:27 -0700 (MST) Received: from hub.freebsd.org (hub.FreeBSD.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 8C55955C18; Mon, 26 Nov 2001 05:45:15 -0800 Received: by hub.freebsd.org (Postfix, from userid 538) id BC1B337B405; Mon, 26 Nov 2001 05:44:51 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id E59522E8209; Mon, 26 Nov 2001 05:44:47 -0800 (PST) Received: by hub.freebsd.org (bulk_mailer v1.12); Mon, 26 Nov 2001 05:44:43 -0800 Received: from mohegan.mohawk.net (mohegan.mohawk.net [63.66.68.21]) by hub.freebsd.org (Postfix) with ESMTP id 5513637B437; Mon, 26 Nov 2001 05:44:20 -0800 (PST) Received: from mohegan.mohawk.net (mohegan.mohawk.net [63.66.68.21]) by mohegan.mohawk.net (8.11.4/8.11.3) with ESMTP id fAQDi9W87538; Mon, 26 Nov 2001 08:44:09 -0500 (EST) From: Ralph Huntington In-reply-to: <200111261334.fAQDY4c95306@star.rila.bg> Sender: owner-freebsd-security@FreeBSD.ORG To: dwbear75@gmail.com Message-id: <20011126084254.I54163-100000@mohegan.mohawk.net> MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk X-Loop: FreeBSD.org Delivered-to: freebsd-security@freebsd.org Old-To: Vladimir Terziev Lines: 30 X-Keywords: X-Mailman-Approved-At: Sat, 25 Sep 2004 12:22:13 +0000 cc: freebsd-hackers@FreeBSD.ORG cc: freebsd-security@FreeBSD.ORG Subject: Re: Strange FTPD behavior X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Fri, 24 Sep 2004 15:50:08 -0000 X-Original-Date: Mon, 26 Nov 2001 08:44:09 -0500 (EST) X-List-Received-Date: Fri, 24 Sep 2004 15:50:08 -0000 Is the user's shell listed in /etc/shells? It must be there for ftpd to let them in. On Mon, 26 Nov 2001, Vladimir Terziev wrote: > > I run FreeBSD 4.3-STABLE machine. I use ftpd for ftp server daemon. It has > very strange behavior with one of user accounts on my machine. Every one user > account on my machine can access it via ftp, exept this account, let call it > ttt. The ttt is not in /etc/ftpusers file and it can access the machine via > ssh and telnet, but with ftp it can't! The ftpd says "530 User ttt access > denied", as a replay of command "user ttt". I saw in the rfc, that 530 replay > code means "Not logged in", but the ftpd doesn't allow on ttt to supply its > credentials. > My ftpd is not chroot -ed, if this is important! > > Any ideas? > > Vladimir > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-security" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 15:54:14 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20F9316A69D; Fri, 24 Sep 2004 15:54:14 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id F197543D2D; Fri, 24 Sep 2004 15:54:13 +0000 (GMT) (envelope-from David.Bear@asu.edu) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0I4J00C01YMYF0@asu.edu>; Fri, 24 Sep 2004 08:49:46 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) <0I4J00BNHYMXN5@asu.edu>; Fri, 24 Sep 2004 08:49:45 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.69.200]) (8.12.10/8.12.10/asu_smtp_relay,nullclient,tcp_wrapped) with ESMTP id i8OFni71017000; Fri, 24 Sep 2004 08:49:44 -0700 (MST) Received: by moroni.pp.asu.edu (Postfix, from userid 500) id BE0FAE4D; Fri, 24 Sep 2004 08:48:42 -0700 (MST) Received: from post1.inre.asu.edu (post1.inre.asu.edu [129.219.110.72]) by moroni.pp.asu.edu (8.11.6/8.11.6) with ESMTP id h2B3L1q14282 for ; Mon, 10 Mar 2003 20:21:01 -0700 Received: from conversion.post1.inre.asu.edu by asu.edu (PMDF V6.1 #40110) id <0HBK00401EN2MM@asu.edu> for iddwb@moroni.pp.asu.edu (ORCPT david.bear@asu.edu); Mon, 10 Mar 2003 20:21:02 -0700 (MST) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by asu.edu (PMDF V6.1 #40110) with ESMTP id <0HBK002B0EN1IN@asu.edu> for iddwb@moroni.pp.asu.edu (ORCPT david.bear@asu.edu); Mon, 10 Mar 2003 20:21:02 -0700 (MST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 2C0E0554C9; Mon, 10 Mar 2003 19:20:32 -0800 Received: by hub.freebsd.org (Postfix, from userid 538) id 1F03837B401; Mon, 10 Mar 2003 19:20:30 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id 5C52C2E8023; Mon, 10 Mar 2003 19:20:30 -0800 (PST) Received: by hub.freebsd.org (bulk_mailer v1.12); Mon, 10 Mar 2003 19:20:30 -0800 Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B99DF37B404 for ; Mon, 10 Mar 2003 19:20:28 -0800 (PST) Received: from vlk.dyndns.org (BSN-77-9-161.dsl.siol.net [193.77.9.161]) by mx1.FreeBSD.org (Postfix) with SMTP id B75E943F93 for ; Mon, 10 Mar 2003 19:20:26 -0800 (PST envelope-from borut@vlk.dyndns.org) Received: (qmail 2396 invoked from network); Tue, 11 Mar 2003 03:20:24 +0000 Received: from borut3.vlk.local (10.10.10.10) by 0 with SMTP; Tue, 11 Mar 2003 03:20:24 +0000 From: Borut Kurnik In-reply-to: <200303110310.h2B3AvKU025877@orthanc.ab.ca> Sender: owner-freebsd-questions@FreeBSD.ORG To: dwbear75@gmail.com Message-id: <1047352928.17186.35.camel@borut3> MIME-version: 1.0 X-Mailer: Ximian Evolution 1.0.8 (1.0.8-10) Content-type: text/plain Content-transfer-encoding: 7bit Precedence: bulk X-Loop: FreeBSD.ORG Delivered-to: freebsd-questions@freebsd.org Old-To: Lyndon Nerenberg {VE6BBM} Lines: 38 References: <200303110310.h2B3AvKU025877@orthanc.ab.ca> X-Mailman-Approved-At: Sat, 25 Sep 2004 12:22:13 +0000 cc: freebsd-hackers@FreeBSD.ORG cc: freebsd-questions@FreeBSD.ORG Subject: Re: Freebsd 5.0-RELEASE & named pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Fri, 24 Sep 2004 15:54:14 -0000 X-Original-Date: Tue, 11 Mar 2003 04:22:08 +0100 X-List-Received-Date: Fri, 24 Sep 2004 15:54:14 -0000 Hi! The system doesn't wait for me to open the reader, I get the message instantly. I worked on 4.7 & still does (also on linux, netbsd, ... :-) ) This is NetBSD 1.6 [root@himler root]# echo "test" > f & [1] 2383 [root@himler root]# cat < f test [1]+ Done echo "test" >f And this is FreeBSD 5.0 [root@bart root]# echo "test" > f & [1] 2436 [root@bart root]# -bash: f: Resource temporarily unavailable [1]+ Exit 1 echo "test" >f Borut On Tue, 2003-03-11 at 04:10, Lyndon Nerenberg {VE6BBM} wrote: > >[root@bart root]# mkfifo f; find /etc > f & > >[1] 2200 > >[root@bart root]# -bash: f: Resource temporarily unavailable > > You need a reader on the other side of the FIFO. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 25 12:21:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 792EC16A4CE for ; Sat, 25 Sep 2004 12:21:54 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id D714643D3F for ; Sat, 25 Sep 2004 12:21:53 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id C66C465213; Sat, 25 Sep 2004 13:21:51 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00663-01; Sat, 25 Sep 2004 13:21:51 +0100 (BST) Received: from empiric.dek.spc.org (unknown [217.51.144.185]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id BCEBD6520C; Sat, 25 Sep 2004 13:21:50 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id C3C8663D3; Sat, 25 Sep 2004 05:21:49 -0700 (PDT) Date: Sat, 25 Sep 2004 05:21:49 -0700 From: Bruce M Simpson To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20040925122149.GD814@empiric.icir.org> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Mike Meyer , bzeeb-lists@lists.zabbadoz.net, Gordon David , freebsd-hackers@freebsd.org References: <16722.59709.451226.932084@guru.mired.org> <20040925100740.GA814@empiric.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: cc: bzeeb-lists@lists.zabbadoz.net cc: Mike Meyer cc: Gordon David cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2004 12:21:54 -0000 On Sat, Sep 25, 2004 at 01:35:07PM +0200, Dag-Erling Smørgrav wrote: > > If we were to implement POSIX spawn(), we'd need something like this. > > Uh, no. posix_spawn(3) can be implemented entirely in userland and > does not require any special kernel support. Discussions with peter@ and others on IRC have been ongoing regarding doing it in kernel space, so as to avoid unnecessarily expensive VM fork operations when 'spawning' a process. I'd be interested to hear more about your proposal for doing this in userland. BMS From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 25 14:35:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2096416A4CE for ; Sat, 25 Sep 2004 14:35:19 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7816C43D46 for ; Sat, 25 Sep 2004 14:35:18 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 42255535A; Sat, 25 Sep 2004 16:35:17 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 3EF94533C; Sat, 25 Sep 2004 16:35:07 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id D5F21B85E; Sat, 25 Sep 2004 16:35:06 +0200 (CEST) To: Mike Meyer References: <16722.59709.451226.932084@guru.mired.org> <20040925100740.GA814@empiric.icir.org> <20040925122149.GD814@empiric.icir.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Sat, 25 Sep 2004 16:35:06 +0200 In-Reply-To: <20040925122149.GD814@empiric.icir.org> (Bruce M. Simpson's message of "Sat, 25 Sep 2004 05:21:49 -0700") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: bzeeb-lists@lists.zabbadoz.net cc: Gordon David cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2004 14:35:19 -0000 Bruce M Simpson writes: > On Sat, Sep 25, 2004 at 01:35:07PM +0200, Dag-Erling Sm=F8rgrav wrote: > > > If we were to implement POSIX spawn(), we'd need something like this. > > Uh, no. posix_spawn(3) can be implemented entirely in userland and > > does not require any special kernel support. > Discussions with peter@ and others on IRC have been ongoing regarding doi= ng > it in kernel space, so as to avoid unnecessarily expensive VM fork operat= ions > when 'spawning' a process. > > I'd be interested to hear more about your proposal for doing this in user= land. posix_spawn(3) can be implemented in terms of fork(2) / execve(2), and if you're worried about VM overhead you can always use vfork(2) (which has the additional benefit of allowing you to pass an error code back to the parent process, since the child can write to the parent's address space until it calls execve(2)). DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 25 22:34:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33B8F16A4CE for ; Sat, 25 Sep 2004 22:34:19 +0000 (GMT) Received: from mail.save-ferris.com (ip-69-33-104-67.nyc.megapath.net [69.33.104.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9665A43D39 for ; Sat, 25 Sep 2004 22:34:18 +0000 (GMT) (envelope-from jromero@save-ferris.com) Received: by mail.save-ferris.com (Postfix, from userid 1002) id 5975E17066; Sat, 25 Sep 2004 18:34:01 -0400 (EDT) Received: from 192.168.100.2 (unknown [192.168.100.3]) by mail.save-ferris.com (Postfix) with ESMTP id 6672E17064 for ; Sat, 25 Sep 2004 18:34:00 -0400 (EDT) Received: from 192.168.2.11 (SquirrelMail authenticated user jromero); by new.host.name with HTTP; Sat, 25 Sep 2004 18:34:00 -0400 (EDT) Message-ID: <18553.192.168.2.11.1096151640.squirrel@192.168.2.11> Date: Sat, 25 Sep 2004 18:34:00 -0400 (EDT) From: jromero@save-ferris.com To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on ws1.save-ferris.com X-Spam-Status: No, hits=0.3 required=3.0 tests=NO_REAL_NAME autolearn=no version=2.64 X-Spam-Level: Subject: SMP on quad xeons X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2004 22:34:19 -0000 Posted to freebsd-smp but didn't get too many replies, so I apologize for cross posting ahead of time. Need to configure groupware server and multiprotocol wireless proxy for aproximatly 2500 accounts. Application is heavily multi threaded and willrequire alot of CPU power. The OS will be FreeBSD 5.x Thinking of going with ServerWorks* Grand Champion HE quad xeon server board. Has anyone had any SMP experience with quad xeon systems on freebsd 5.x??? I'm curious to know if anyone experienced any major technical stumbling blocks. I guess I also want to know how well Freebsd 5.x will scale on a 4 proc. Will freeBSD 5.x utilize a quad xeon board as efficiently as linux2.6 system ?? Thanks, JR