From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 13 23:41: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 CBED016A4CE for ; Fri, 13 Aug 2004 23:41:28 +0000 (GMT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (80-219-165-162.dclient.hispeed.ch [80.219.165.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 056F543D75 for ; Fri, 13 Aug 2004 23:41:27 +0000 (GMT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [2002:50db:a5a2:0:20e:2eff:fe06:2376]) (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id i7DNfJC00955 verified NO) for ; Sat, 14 Aug 2004 01:41:24 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.11.6/FNORD) id i7DNfIN00954; Sat, 14 Aug 2004 01:41:18 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Sat, 14 Aug 2004 01:41:18 +0200 (CEST) Message-Id: <200408132341.i7DNfIN00954@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: <200408072049.i77KneE00932@Mail.NOSPAM.DynDNS.dK> <20040809.095023.103125553.imp@bsdimp.com> To: freebsd-hackers@freebsd.org X-Mailman-Approved-At: Sun, 15 Aug 2004 12:50:37 +0000 Subject: Re: ISA card and if_ed as module 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, 13 Aug 2004 23:41:28 -0000 [keep replies to the list and I'll catch up later, thanks] > : Is it to be expected that the kernel if_ed.ko module appears to > : be unable to probe and attach an ISA NIC, while when I build the > Yes and No. If the ISA nic is PNP, it will just work. IF not, you > have to have the 'hints' in the kernel. I have the hints framework > backported, but I don't know if it was ever committed. Too old for pnp, so I'm out of luck there. I have hints on my -stable machine (for other reasons), and I can see that they show up in the `loader' environment, but that still isn't enough to probe the device. I'll assume this means that hints doesn't work (hasn't been backported) in -stable. Would it be possible for me to get a copy of your work to see if that's enough to make the NIC appear? A pointer would suffice -- particularly if others would want to try it -- unless you prefer to mail it. (I've looked quickly for obvious differences between -stable and -current that would be relevant but don't really see them) And yes, the NIC does show up in -current, so while part of the framework is in -stable, actually turning those environment hints into action just doesn't happen. thanks barry bouwsma From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 14 08:03: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 DFE3B16A4CE; Sat, 14 Aug 2004 08:03:43 +0000 (GMT) Received: from outmx001.isp.belgacom.be (outmx001.isp.belgacom.be [195.238.3.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45BC443D4C; Sat, 14 Aug 2004 08:03:43 +0000 (GMT) (envelope-from geert@lori.mine.nu) Received: from outmx001.isp.belgacom.be (localhost [127.0.0.1]) with ESMTP id i7E83evX031879; Sat, 14 Aug 2004 10:03:40 +0200 (envelope-from ) Received: from lori.mine.nu (149-144.244.81.adsl.skynet.be [81.244.144.149]) with ESMTP id i7E83ce5031862; Sat, 14 Aug 2004 10:03:38 +0200 (envelope-from ) Received: by lori.mine.nu (Postfix, from userid 1000) id 504AD502; Sat, 14 Aug 2004 10:03:38 +0200 (CEST) Date: Sat, 14 Aug 2004 10:03:37 +0200 From: Geert Hendrickx To: freebsd-hackers@FreeBSD.org, simon@FreeBSD.org, ertr1013@student.uu.se Message-ID: <20040814080337.GA17811@lori.mine.nu> References: <20040810223606.GA75648@lori.mine.nu> <20040811124714.GA51160@eddie.nitro.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040811124714.GA51160@eddie.nitro.dk> User-Agent: Mutt/1.4.2i X-GPG-Key: http://lori.mine.nu/gnupgkey.asc X-GPG-Key-ID: 1024D/766C1E92 X-Accept-Language: nl,en X-Mailman-Approved-At: Sun, 15 Aug 2004 12:50:37 +0000 Subject: Re: make "quickworld"? (like in DragonFly) 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, 14 Aug 2004 08:03:44 -0000 On Wed, Aug 11, 2004 at 02:47:14PM +0200, Simon L. Nielsen wrote: > On 2004.08.11 00:36:06 +0200, Geert Hendrickx wrote: > > Hi, > > > > is there any way (or could it be implemented) to rebuild only the > > changes in world and kernel sources after a cvsup? DragonFly BSD > > features "make quickworld" and "make quickkernel" which does exactly > > that. > > You can do that already: > > make buildworld buildkernel -DNOCLEAN Does adding "NOCLEAN=true" to /etc/make.conf have the same effect? GH From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 15 16:53: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 9839B16A4CE; Sun, 15 Aug 2004 16:53: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 7186D43D48; Sun, 15 Aug 2004 16:53:20 +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 i7FGrV4G005122; Sun, 15 Aug 2004 09:53:31 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i7FGrUCF005121; Sun, 15 Aug 2004 09:53:30 -0700 Date: Sun, 15 Aug 2004 09:53:30 -0700 From: Brooks Davis To: Geert Hendrickx Message-ID: <20040815165330.GA4726@odin.ac.hmc.edu> References: <20040810223606.GA75648@lori.mine.nu> <20040811124714.GA51160@eddie.nitro.dk> <20040814080337.GA17811@lori.mine.nu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: <20040814080337.GA17811@lori.mine.nu> 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: simon@freebsd.org Subject: Re: make "quickworld"? (like in DragonFly) 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, 15 Aug 2004 16:53:20 -0000 --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 14, 2004 at 10:03:37AM +0200, Geert Hendrickx wrote: > On Wed, Aug 11, 2004 at 02:47:14PM +0200, Simon L. Nielsen wrote: > > On 2004.08.11 00:36:06 +0200, Geert Hendrickx wrote: > > > Hi,=20 > > >=20 > > > is there any way (or could it be implemented) to rebuild only the > > > changes in world and kernel sources after a cvsup? DragonFly BSD > > > features "make quickworld" and "make quickkernel" which does exactly > > > that. =20 > >=20 > > You can do that already: > >=20 > > make buildworld buildkernel -DNOCLEAN >=20 > Does adding "NOCLEAN=3Dtrue" to /etc/make.conf have the same effect? =20 Yes, but it's likely to attract flames because NOCLEAN does fail. If you forget it's in your make.conf there's a good chance you could report a bug that isn't a bug a waste a bunch of developer time. -- 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 --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBH5UJXY6L6fI4GtQRAo7hAJ9QigSz8VpTeiRY3SXM/V7c3t1n9ACZAZhH REqEuKx3541z1M1c9/jbkEA= =5Nrc -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+-- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 15 20:37: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 87E1516A526 for ; Sun, 15 Aug 2004 20:37:36 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51AF743E52 for ; Sun, 15 Aug 2004 20:09:28 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i7FK9Lab014676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Aug 2004 23:09:22 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i7FK9PRQ061776; Sun, 15 Aug 2004 23:09:25 +0300 (EEST) (envelope-from ru) Date: Sun, 15 Aug 2004 23:09:25 +0300 From: Ruslan Ermilov To: Geert Hendrickx Message-ID: <20040815200925.GC61654@ip.net.ua> References: <20040810223606.GA75648@lori.mine.nu> <20040811124714.GA51160@eddie.nitro.dk> <20040814080337.GA17811@lori.mine.nu> <20040815165330.GA4726@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8X7/QrJGcKSMr1RN" Content-Disposition: inline In-Reply-To: <20040815165330.GA4726@odin.ac.hmc.edu> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new cc: freebsd-hackers@FreeBSD.org Subject: Re: make "quickworld"? (like in DragonFly) 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, 15 Aug 2004 20:37:38 -0000 --8X7/QrJGcKSMr1RN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 15, 2004 at 09:53:30AM -0700, Brooks Davis wrote: > On Sat, Aug 14, 2004 at 10:03:37AM +0200, Geert Hendrickx wrote: > > On Wed, Aug 11, 2004 at 02:47:14PM +0200, Simon L. Nielsen wrote: > > > On 2004.08.11 00:36:06 +0200, Geert Hendrickx wrote: > > > > Hi,=20 > > > >=20 > > > > is there any way (or could it be implemented) to rebuild only the > > > > changes in world and kernel sources after a cvsup? DragonFly BSD > > > > features "make quickworld" and "make quickkernel" which does exactly > > > > that. =20 > > >=20 > > > You can do that already: > > >=20 > > > make buildworld buildkernel -DNOCLEAN > >=20 > > Does adding "NOCLEAN=3Dtrue" to /etc/make.conf have the same effect? = =20 >=20 > Yes, but it's likely to attract flames because NOCLEAN does fail. If > you forget it's in your make.conf there's a good chance you could report > a bug that isn't a bug a waste a bunch of developer time. >=20 Yes, please don't use NOCLEAN routinely. It's certainly okay to use it if you started a clean build, it failed for some reason, you corrected a cause, and want to resume. If may also work if you've updated the sources, but no guarantees -- often it has been shown that "make clean" is necessary to remove some old cruft that now conflicts with the new sources. For example, if compiler sources have been updated, it can generate different code, but foo.o will only depend on foo.c, and will not be rebuilt if you use -DNOCLEAN. In short, don't use it if you don't fully understand all the consequences. ;) Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --8X7/QrJGcKSMr1RN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBH8L1qRfpzJluFF4RApYhAJ4tEPwJBBKjnQBnrJ7n/uLZnqjBGQCfTe// pETYjd8Q5ciAr7AvxECx8Tg= =EMle -----END PGP SIGNATURE----- --8X7/QrJGcKSMr1RN-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 16 12:23: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 3555C16A4CE for ; Mon, 16 Aug 2004 12:23:20 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46E6A43D39 for ; Mon, 16 Aug 2004 12:23:19 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i7GCK84t039457 for freebsd-hackers@freebsd.org.checked; (8.12.8/vak/2.1) Mon, 16 Aug 2004 16:20:08 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru with ESMTP id i7GCIbrC039350; (8.12.8/vak/2.1) Mon, 16 Aug 2004 16:18:37 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <4120A660.9070909@cronyx.ru> Date: Mon, 16 Aug 2004 16:19:44 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD Current , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: LOR 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, 16 Aug 2004 12:23:20 -0000 Hi, Question to gurus. Does witness keep in mind lock recursion when it checks for LORs. rik From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 16 18:29: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 E188616A4CF for ; Mon, 16 Aug 2004 18:29:35 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F44243D1F for ; Mon, 16 Aug 2004 18:29:35 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 29820 invoked from network); 16 Aug 2004 18:29:35 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 16 Aug 2004 18:29:34 -0000 Received: from [10.50.40.208] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i7GITVxg031999; Mon, 16 Aug 2004 14:29:32 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Mon, 16 Aug 2004 11:59:09 -0400 User-Agent: KMail/1.6.2 References: <4120A660.9070909@cronyx.ru> In-Reply-To: <4120A660.9070909@cronyx.ru> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <200408161159.11250.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: FreeBSD Current cc: Roman Kurakin Subject: Re: LOR 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, 16 Aug 2004 18:29:36 -0000 On Monday 16 August 2004 08:19 am, Roman Kurakin wrote: > Hi, > > Question to gurus. Does witness keep in mind lock recursion when > it checks for LORs. Well, I'm not sure if I understand exactly what you are asking, but witness only does lock order checks when you first acquire the lock. Any recursive locks will skip the order checking altogether since recursive acquires can never block. Similarly, trylock operations also stick order checks altogether since they can never block either. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 16 21:44: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 9804F16A4CE for ; Mon, 16 Aug 2004 21:44:18 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4956643D58 for ; Mon, 16 Aug 2004 21:44:17 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i7GLf5G1077276 for freebsd-hackers@FreeBSD.org.checked; (8.12.8/vak/2.1) Tue, 17 Aug 2004 01:41:05 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by hanoi.cronyx.ru with ESMTP id i7GLePoO077212; (8.12.8/vak/2.1) Tue, 17 Aug 2004 01:40:25 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <4121281C.10006@cronyx.ru> Date: Tue, 17 Aug 2004 01:33:16 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: John Baldwin References: <4120A660.9070909@cronyx.ru> <200408161159.11250.jhb@FreeBSD.org> In-Reply-To: <200408161159.11250.jhb@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@FreeBSD.org cc: FreeBSD Current Subject: Re: LOR 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, 16 Aug 2004 21:44:18 -0000 John Baldwin: >On Monday 16 August 2004 08:19 am, Roman Kurakin wrote: > > >>Hi, >> >> Question to gurus. Does witness keep in mind lock recursion when >>it checks for LORs. >> >> > >Well, I'm not sure if I understand exactly what you are asking, but witness > My question was silly cause it is based on very silly ideas. >only does lock order checks when you first acquire the lock. Any recursive >locks will skip the order checking altogether since recursive acquires can >never block. Similarly, trylock operations also stick order checks > You've answered just that I want to know. Thanks! >altogether since they can never block either. > rik From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 16 23:21: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 40EBA16A4CE for ; Mon, 16 Aug 2004 23:21:44 +0000 (GMT) Received: from relay.gufi.org (civetta.gufi.org [193.27.203.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9CDB43D2D for ; Mon, 16 Aug 2004 23:21:43 +0000 (GMT) (envelope-from rionda@gufi.org) Received: by relay.gufi.org (Postfix, from userid 1012) id 55BEA20F9E; Tue, 17 Aug 2004 01:21:42 +0200 (CEST) To: freebsd-hackers@freebsd.org Message-Id: <20040816232142.55BEA20F9E@relay.gufi.org> Date: Tue, 17 Aug 2004 01:21:42 +0200 (CEST) From: rionda@gufi.org (Matteo Riondato) Subject: sysctl -b kern.geom.conftxt output 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, 16 Aug 2004 23:21:44 -0000 Can someone please explain me what each column of `sysctl -bkern.geom.conftxt` means? Example: 0 DISK ad1 40027029504 512 hd 16 sc 63 1 MBR ad1s1 40024180224 512 i 0 o 32256 0 DISK ad0 60040544256 512 hd 16 sc 63 1 MBR ad0s4 10733990400 512 i 3 o 29767288320 2 BSD ad0s4f 9928684032 512 i 5 o 805306368 2 BSD ad0s4e 268435456 512 i 4 o 536870912 2 BSD ad0s4d 268435456 512 i 3 o 268435456 2 BSD ad0s4c 10733990400 512 i 2 o 0 2 BSD ad0s4a 268435456 512 i 0 o 0 [SNIP] Thanks Best regards -- Rionda aka Matteo Riondato GUFI Staff Member (http://www.gufi.org) BSD-FAQ-it Main Developer (http://www.gufi.org/~rionda) FreeSBIE BugMeister (http://www.freesbie.org) GPG key at: http://www.riondabsd.net/riondagpg.asc Sent from: kaiser.sig11.org running FreeBSD-5.2-CURRENT From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 16 23:28: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 5F10816A4CE for ; Mon, 16 Aug 2004 23:28:56 +0000 (GMT) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id E121643D2F for ; Mon, 16 Aug 2004 23:28:55 +0000 (GMT) (envelope-from rionda@gufi.org) Received: from kaiser.sig11.org (82.52.112.245) by vsmtp3.tin.it (7.0.027) id 411B8C1700065432 for hackers@freebsd.org; Tue, 17 Aug 2004 01:28:56 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by kaiser.sig11.org (Postfix) with ESMTP id 343DBE2 for ; Tue, 17 Aug 2004 00:35:08 +0200 (CEST) From: Matteo Riondato To: hackers@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-XF63nwbUZ9VeFTi0oDb3" Message-Id: <1092695707.7816.10.camel@kaiser.sig11.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 17 Aug 2004 00:35:07 +0200 Subject: sysctl -b kern.geom.conftxt output 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: Mon, 16 Aug 2004 23:28:56 -0000 --=-XF63nwbUZ9VeFTi0oDb3 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Can someone please explain me what each column of `sysctl -bkern.geom.conftxt` means? Example: 0 DISK ad1 40027029504 512 hd 16 sc 63 1 MBR ad1s1 40024180224 512 i 0 o 32256 0 DISK ad0 60040544256 512 hd 16 sc 63 1 MBR ad0s4 10733990400 512 i 3 o 29767288320 2 BSD ad0s4f 9928684032 512 i 5 o 805306368 2 BSD ad0s4e 268435456 512 i 4 o 536870912 2 BSD ad0s4d 268435456 512 i 3 o 268435456 2 BSD ad0s4c 10733990400 512 i 2 o 0 2 BSD ad0s4a 268435456 512 i 0 o 0 [SNIP] Thanks Best regards --=20 Rionda aka Matteo Riondato GUFI Staff Member (http://www.gufi.org) BSD-FAQ-it Main Developer (http://www.gufi.org/~rionda) FreeSBIE BugMeister (http://www.freesbie.org) GPG key at: http://www.riondabsd.net/riondagpg.asc Sent from: kaiser.sig11.org running FreeBSD-5.2-CURRENT --=-XF63nwbUZ9VeFTi0oDb3 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.4 (FreeBSD) iD8DBQBBITab2Mp4pR7Fa+wRAvN0AKCmssCFapey41PNhOB2A6PrPpW8ZgCgufCn T3tqLhwWf+SqJfQeOK2VGh4= =EB6B -----END PGP SIGNATURE----- --=-XF63nwbUZ9VeFTi0oDb3-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 02:29: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 54AB616A4CE; Tue, 17 Aug 2004 02:29:31 +0000 (GMT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1F7043D3F; Tue, 17 Aug 2004 02:29:30 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id BEA7B2BD43; Tue, 17 Aug 2004 12:29:28 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id E854A511FA; Tue, 17 Aug 2004 11:59:26 +0930 (CST) Date: Tue, 17 Aug 2004 11:59:26 +0930 From: Greg 'groggy' Lehey To: FreeBSD Questions , FreeBSD Hackers Message-ID: <20040817022926.GK81257@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/ZYM6PqDyfNytx60" Content-Disposition: inline User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: BSD User Group of Adelaide cc: LinuxSA Subject: Samsung Cordless Mouse 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, 17 Aug 2004 02:29:31 -0000 --/ZYM6PqDyfNytx60 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline More by accident than by design, I find myself the owner of a Samsung PS/2 Cordless Mouse. To make identification easier, it doesn't have a model number, so I assume it's the only one they made. This mouse has five buttons: the normal three on top, and one on each side. I can't find a way to get the side buttons to work, and looking on the web hasn't shown anything of interest. I don't suppose anybody knows this mouse, though I'd be interested in hearing if somebody has. My real question is: how can I enable the side buttons? There's obviously some kind of initialization sequence that is performed by the Microsoft drivers included with the mouse, but how do I find out what they do? Is there some utility that runs under Microsoft and snoops what's going on on the PS/2 port? I know of something similar for USB, but so far I've drawn a blank for PS/2. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html Note: I discard all HTML mail unseen. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. --/ZYM6PqDyfNytx60 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFBIW2GIubykFB6QiMRAp0jAJ9nacG+UU6Nagb2ieGE1iV5Shjd8gCffKdC fAEDf4wpPl7qmmeqwqzbX/M= =BPu/ -----END PGP SIGNATURE----- --/ZYM6PqDyfNytx60-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 04:20: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 5480016A4CE; Tue, 17 Aug 2004 04:20:47 +0000 (GMT) Received: from robbins.dropbear.id.au (043.b.011.mel.iprimus.net.au [210.50.217.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id A396A43D48; Tue, 17 Aug 2004 04:20:44 +0000 (GMT) (envelope-from tim@robbins.dropbear.id.au) Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id 564084135; Tue, 17 Aug 2004 00:29:31 +1000 (EST) Date: Tue, 17 Aug 2004 00:29:31 +1000 From: Tim Robbins To: Craig Boston Message-ID: <20040816142931.GA18527@cat.robbins.dropbear.id.au> References: <20040813033048.GA33060@nowhere> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040813033048.GA33060@nowhere> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org cc: smkelly@freebsd.org Subject: Re: m4 is broken -- can't rename builtins (patch in PR) 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, 17 Aug 2004 04:20:47 -0000 On Thu, Aug 12, 2004 at 10:30:48PM -0500, Craig Boston wrote: > Hi -hackers: > > Just wondering if I could get a committer's attention to look at > bin/59883. It seems that m4 has been broken for quite some time -- at > least in the ability to rename builtin macros -- defn() doesn't work > correctly anymore. I've been using the simple patch in the PR locally > for the last several months and have yet to run into any problems with > it. I guess not many people use the bundled m4 for anything much more > complicated than making sendmail.cf files ;) > > I'm not sure who is the active maintainer for m4 is, or even if there is > one. CC: tjr & smkelly as they are the last couple people to touch the > code in a while. I hope I'm sending this to the right place :) I've just committed a temporary fix for this to -CURRENT, and will MFC it in about a week. I'll consider merging in the better (but more involved) OpenBSD fix and any other useful changes they've made, but this will have to wait until after 5.3-R. Thanks for bringing the problem to my attention. Tim From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 07:35: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 B202F16A4CE for ; Tue, 17 Aug 2004 07:35:23 +0000 (GMT) Received: from ns1.interbgc.com (mail.interbgc.com [217.9.224.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 196DB43D2D for ; Tue, 17 Aug 2004 07:35:22 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 21318 invoked from network); 17 Aug 2004 07:35:20 -0000 Received: from nike_d@cytexbg.com by keeper.interbgc.com by uid 1002 with qmail-scanner-1.14 (uvscan: v4.2.40/v4374. spamassassin: 2.63. Clear:SA:0(-4.9/8.0):. Processed in 0.949918 secs); 17 Aug 2004 07:35:20 -0000 X-Spam-Status: No, hits=-4.9 required=8.0 Received: from 213-240-202-139.1697748.ddns.cablebg.net (HELO tormentor.totalterror.net) (213.240.202.139) by mail.interbgc.com with SMTP; 17 Aug 2004 07:35:18 -0000 Received: (qmail 25308 invoked from network); 17 Aug 2004 07:38:26 -0000 Received: from unknown (HELO phobos.totalterror.net) (10.0.0.2) by tormentor.totalterror.net with SMTP; 17 Aug 2004 07:38:26 -0000 References: <200408090108.i7918C9x060958@sana.init-main.com> Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Niki Denev To: takawata@jp.freebsd.org Date: Tue, 17 Aug 2004 10:35:17 +0300 Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=_mimegpg-phobos.totalterror.net-782-1092728117-0001"; micalg=pgp-sha1; protocol="application/pgp-signature" cc: freebsd-hackers@freebsd.org Subject: Re: Driver for Thinkpad Hotkeys. 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, 17 Aug 2004 07:35:23 -0000 This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. --=_mimegpg-phobos.totalterror.net-782-1092728117-0001 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit takawata@jp.freebsd.org writes: > Hi, I updated ThinkPad Hotkey driver so that it can > > * Read Brightness > * Read Volume > * Read Mute status > * Read Keylight status > * AccessIBM, Zoom Screen(Fn+Sp) toggle. > > ToDo lists > > * Set Brightness > * Set Volume > * Bluetooth attach/detach. > * Userland worker. > > These features will come Real Soon Now. > > * Wireless LAN indicator > > Will be take more time. > > I wrote for ThinkPad X31, but it may work on some other ThinkPad X,R,T,S > series. > > Enjoy! > > http://www.init-main.com/acpi_tpkey/ > > On my X31, when i load acpi_tpkey and start 'devd -dD', i get notifications only when pressing the Fn+F3 (screen blank) combination. Am i missing something ? More info about my setup can be found here : http//totalterror.net/freebsd/ I will gladly provide more info if needed. P.S.: the acpi_tpkey_kldload.out file contains the console output, when i load the driver. and the acpi_tpkey_notify.out file contains the message i get when pressing Fn+F3. Any other special buttons, (AccessIBM, vol up/down, mute, brightness, key light) don't print notify messages, but they continue to work normal. - Niki --=_mimegpg-phobos.totalterror.net-782-1092728117-0001 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQBBIbU1HNAJ/fLbfrkRAnWkAKDNe5Teoj9ylWcuNQSzQMrMQ2Ua3wCdFsZ1 s266MY6AXUKfteR0UFNTzsI= =BrPu -----END PGP SIGNATURE----- --=_mimegpg-phobos.totalterror.net-782-1092728117-0001-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 08:59: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 576FD16A4CE; Tue, 17 Aug 2004 08:59:18 +0000 (GMT) Received: from axe-inc.co.jp (axegw.axe-inc.co.jp [61.199.217.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 407C043D70; Tue, 17 Aug 2004 08:59:17 +0000 (GMT) (envelope-from takawata@axe-inc.co.jp) Received: from localhost (localhost [127.0.0.1]) by axe-inc.co.jp (8.9.3+3.2W/3.7W) with SMTP id RAA16726; Tue, 17 Aug 2004 17:59:13 +0900 (JST) Message-Id: <200408170859.RAA16726@axe-inc.co.jp> X-Authentication-Warning: axegw.axe-inc.co.jp: localhost [127.0.0.1] didn't use HELO protocol To: Niki Denev From: takawata@jp.freebsd.org In-reply-to: Your message of "Tue, 17 Aug 2004 10:35:17 +0300." Date: Tue, 17 Aug 2004 17:59:12 +0900 Sender: takawata@axe-inc.co.jp cc: freebsd-hackers@freebsd.org cc: freebsd-acpi@freebsd.org Subject: Re: Driver for Thinkpad Hotkeys. 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, 17 Aug 2004 08:59:18 -0000 I updated the driver to be able to change wireless status, by dev.acpi_tpkey.0.bluetooth, dev.acpi_tpkey.0.wlan sysctl value. (WLAN handling may not be correct.) http://www.init-main.com/acpi_tpkey/acpi_tpkey.c In message , Niki Denev wrote: >On my X31, when i load acpi_tpkey and start 'devd -dD', i get notifications >only when pressing the Fn+F3 (screen blank) combination. >Am i missing something ? By default,only Fn+F3,Fn+F4(Suspend - This is handled by this driver, instead of sleep button driver), and Fn+F12(Suspend to Disk) will assert notification. In addition to that, you can transfer control of all *possible* button to operating system by setting dev.acpi_tpkey.0.key_mask to dev.acpi_tpkey.0.avail_mask. This will enable all notifications and disable all default hotkey actions. >P.S.: the acpi_tpkey_kldload.out file contains the console output, when i >load the driver. >and the acpi_tpkey_notify.out file contains the message i get when pressing >Fn+F3. >Any other special buttons, (AccessIBM, vol up/down, mute, brightness, key >light) don't print notify messages, but they continue to work normal. That's expected. Those button will not produce any ACPI notification, though it is dealt by ACPI byte code. Instead of it, those keys set toggle value to RTC ram and you can access the Fn+SPC(0x20) and AccessIBM(0x8) value by dev.acpi_tpkey.0.misckey . (Volume and Brightness toggle can be seen in RTC register, but it is not exported to user now.) To assert event from kernel, kernel thread will be needed. From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 09:14:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B2F616A4CE for ; Tue, 17 Aug 2004 09:14:55 +0000 (GMT) Received: from ns1.interbgc.com (mail.interbgc.com [217.9.224.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 2D43743D66 for ; Tue, 17 Aug 2004 09:14:54 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 28327 invoked from network); 17 Aug 2004 09:14:52 -0000 Received: from nike_d@cytexbg.com by keeper.interbgc.com by uid 1002 with qmail-scanner-1.14 (uvscan: v4.2.40/v4374. spamassassin: 2.63. Clear:SA:0(-4.9/8.0):. Processed in 2.257152 secs); 17 Aug 2004 09:14:52 -0000 X-Spam-Status: No, hits=-4.9 required=8.0 Received: from 213-240-202-139.1697748.ddns.cablebg.net (HELO tormentor.totalterror.net) (213.240.202.139) by mail.interbgc.com with SMTP; 17 Aug 2004 09:14:49 -0000 Received: (qmail 87047 invoked from network); 17 Aug 2004 09:17:56 -0000 Received: from unknown (HELO phobos.totalterror.net) (10.0.0.2) by tormentor.totalterror.net with SMTP; 17 Aug 2004 09:17:55 -0000 References: <200408170859.RAA16726@axe-inc.co.jp> Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Niki Denev To: takawata@jp.freebsd.org Date: Tue, 17 Aug 2004 12:14:48 +0300 Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=_mimegpg-phobos.totalterror.net-782-1092734088-0002"; micalg=pgp-sha1; protocol="application/pgp-signature" cc: freebsd-hackers@freebsd.org cc: freebsd-acpi@freebsd.org Subject: Re: Driver for Thinkpad Hotkeys. 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, 17 Aug 2004 09:14:55 -0000 This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. --=_mimegpg-phobos.totalterror.net-782-1092734088-0002 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit takawata@jp.freebsd.org writes: > I updated the driver to be able to change wireless status, by > dev.acpi_tpkey.0.bluetooth, > dev.acpi_tpkey.0.wlan > sysctl value. (WLAN handling may not be correct.) > http://www.init-main.com/acpi_tpkey/acpi_tpkey.c > > In message , Niki Denev > wrote: >>On my X31, when i load acpi_tpkey and start 'devd -dD', i get notifications >>only when pressing the Fn+F3 (screen blank) combination. >>Am i missing something ? > > By default,only Fn+F3,Fn+F4(Suspend - This is handled by this driver, > instead of sleep button driver), and Fn+F12(Suspend to Disk) > will assert notification. > In addition to that, you can transfer control of all *possible* button > to operating system by setting dev.acpi_tpkey.0.key_mask > to dev.acpi_tpkey.0.avail_mask. > This will enable all notifications and disable all default hotkey actions. > > > >>P.S.: the acpi_tpkey_kldload.out file contains the console output, when i >>load the driver. >>and the acpi_tpkey_notify.out file contains the message i get when pressing >>Fn+F3. >>Any other special buttons, (AccessIBM, vol up/down, mute, brightness, key >>light) don't print notify messages, but they continue to work normal. > > That's expected. Those button will not produce any ACPI notification, > though it is dealt by ACPI byte code. > Instead of it, those keys set toggle value to RTC ram and you can access > the Fn+SPC(0x20) and AccessIBM(0x8) value by dev.acpi_tpkey.0.misckey . > (Volume and Brightness toggle can be seen in RTC register, but > it is not exported to user now.) > To assert event from kernel, kernel thread will be needed. > > thanks for the clarification. - Niki --=_mimegpg-phobos.totalterror.net-782-1092734088-0002 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQBBIcyIHNAJ/fLbfrkRApWVAKCGiNg0hJFYD7mzAQJc68kZ1ZvAOACbBOi2 8uRjrHGcBGJvXcOYAsQvc34= =GpUL -----END PGP SIGNATURE----- --=_mimegpg-phobos.totalterror.net-782-1092734088-0002-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 15:53: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 1E69E16A4CE for ; Tue, 17 Aug 2004 15:53:00 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16D6A43D45 for ; Tue, 17 Aug 2004 15:52:59 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i7HFqv805671 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 18:52:57 +0300 Date: Tue, 17 Aug 2004 18:52:57 +0300 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Message-ID: <20040817185240.A5554@oasis.uptsoft.com> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-OS: FreeBSD 4.5-STABLE Subject: actual boot device 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, 17 Aug 2004 15:53:00 -0000 How would one know the actual boot device after kernel successfully booted ? From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 16:14: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 4037616A4CE; Tue, 17 Aug 2004 16:14:47 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id C162043D1D; Tue, 17 Aug 2004 16:14:46 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (cb3ali2c0md2g0km@thor.farley.org [IPv6:2002:4340:5fcd:1::5]) by mail.farley.org (8.12.11/8.12.11) with ESMTP id i7HGDJPa076058; Tue, 17 Aug 2004 11:13:19 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (localhost [127.0.0.1]) by thor.farley.org (8.12.11/8.12.11) with ESMTP id i7HGDIKC068159; Tue, 17 Aug 2004 11:13:18 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)i7HGDHO0068154; Tue, 17 Aug 2004 11:13:17 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Tue, 17 Aug 2004 11:13:17 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: "Greg 'groggy' Lehey" In-Reply-To: <20040817022926.GK81257@wantadilla.lemis.com> Message-ID: <20040817110515.F67959@thor.farley.org> References: <20040817022926.GK81257@wantadilla.lemis.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: FreeBSD Hackers cc: BSD User Group of Adelaide cc: FreeBSD Questions cc: LinuxSA Subject: Re: Samsung Cordless Mouse 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, 17 Aug 2004 16:14:47 -0000 On Tue, 17 Aug 2004, Greg 'groggy' Lehey wrote: > This mouse has five buttons: the normal three on top, and one on each > side. I can't find a way to get the side buttons to work, and looking > on the web hasn't shown anything of interest. I assume you mean in X as opposed to moused although moused appears to support at least five buttons according to its man page. This may help with your X issues: http://www.xfree86.org/current/mouse5.html#22 Sean ----------------------- sean-freebsd@farley.org From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 16:15: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 1AB5816A4CE for ; Tue, 17 Aug 2004 16:15:21 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id A93FE43D4C for ; Tue, 17 Aug 2004 16:15:16 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i7HGFGjn031089 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 11:15:16 -0500 (CDT) (envelope-from dan) Date: Tue, 17 Aug 2004 11:15:16 -0500 From: Dan Nelson To: freebsd-hackers@freebsd.org Message-ID: <20040817161516.GB53307@dan.emsphone.com> References: <20040817185240.A5554@oasis.uptsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040817185240.A5554@oasis.uptsoft.com> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i Subject: Re: actual boot device 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, 17 Aug 2004 16:15:21 -0000 In the last episode (Aug 17), Sergey Lyubka said: > How would one know the actual boot device after kernel successfully > booted ? The kern.bootfile sysctl points to the kernel file that was loaded, according to the loader. If you booted off of cdrom or floppy, you can run "kenv loaddev" to find out which device was actually used to read the file. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 16:25:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1ED4E16A4CE for ; Tue, 17 Aug 2004 16:25:55 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 263E043D41 for ; Tue, 17 Aug 2004 16:25:54 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i7HGPqu06823 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 19:25:52 +0300 Date: Tue, 17 Aug 2004 19:25:52 +0300 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Message-ID: <20040817192552.B5554@oasis.uptsoft.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040817185240.A5554@oasis.uptsoft.com> <20040817161516.GB53307@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040817161516.GB53307@dan.emsphone.com>; from dnelson@allantgroup.com on Tue, Aug 17, 2004 at 11:15:16AM -0500 X-OS: FreeBSD 4.5-STABLE Subject: Re: actual boot device 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, 17 Aug 2004 16:25:55 -0000 I am booting kernel directly from bootblock, and do not have boot loader, so kenv does not work. certainly, sysctl kern.bootfile points to /kernel, but it does not tell anything. The actual device may be floppy, CF card or harrdisk, and I do not have any means of figuring it out. On Tue, Aug 17, 2004 at 11:15:16AM -0500, Dan Nelson wrote: > In the last episode (Aug 17), Sergey Lyubka said: > > How would one know the actual boot device after kernel successfully > > booted ? > > The kern.bootfile sysctl points to the kernel file that was loaded, > according to the loader. If you booted off of cdrom or floppy, you can > run "kenv loaddev" to find out which device was actually used to read > the file. > > -- > Dan Nelson > dnelson@allantgroup.com -- Sergey Lyubka, Network Security Consultant NetFort ISS Ltd, Galway, Ireland From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 16:34: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 E867416A4CE for ; Tue, 17 Aug 2004 16:34:54 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9EC143D1D for ; Tue, 17 Aug 2004 16:34:54 +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 i7HGZ0WD030265 for ; Tue, 17 Aug 2004 09:35:00 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i7HGZ0lw030264 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 09:35:00 -0700 Date: Tue, 17 Aug 2004 09:35:00 -0700 From: Brooks Davis To: freebsd-hackers@freebsd.org Message-ID: <20040817163500.GC28054@odin.ac.hmc.edu> References: <20040817185240.A5554@oasis.uptsoft.com> <20040817161516.GB53307@dan.emsphone.com> <20040817192552.B5554@oasis.uptsoft.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yLVHuoLXiP9kZBkt" Content-Disposition: inline In-Reply-To: <20040817192552.B5554@oasis.uptsoft.com> 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 Subject: Re: actual boot device 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, 17 Aug 2004 16:34:55 -0000 --yLVHuoLXiP9kZBkt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please don't top post, it breaks context. Post reformatted.] On Tue, Aug 17, 2004 at 07:25:52PM +0300, Sergey Lyubka wrote: > On Tue, Aug 17, 2004 at 11:15:16AM -0500, Dan Nelson wrote: > > In the last episode (Aug 17), Sergey Lyubka said: > > > How would one know the actual boot device after kernel successfully > > > booted ? > >=20 > > The kern.bootfile sysctl points to the kernel file that was loaded, > > according to the loader. If you booted off of cdrom or floppy, you can > > run "kenv loaddev" to find out which device was actually used to read > > the file. > > I am booting kernel directly from bootblock, and do not have > boot loader, so kenv does not work. You don't say which version you are running, but in 5.x booting without the loader is not supported in any way shape or form. -- 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 --yLVHuoLXiP9kZBkt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBIjOzXY6L6fI4GtQRAgsOAKCvn0wm0Ed5to2uiPMPAwACSkmNBQCgzvvF RyLmcTkNV2y3klb1xQQoAyg= =SUaj -----END PGP SIGNATURE----- --yLVHuoLXiP9kZBkt-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 16:39: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 5E61316A4CE for ; Tue, 17 Aug 2004 16:39:17 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1079743D1D for ; Tue, 17 Aug 2004 16:39:17 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i7HGdFXN080682 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 11:39:15 -0500 (CDT) (envelope-from dan) Date: Tue, 17 Aug 2004 11:39:15 -0500 From: Dan Nelson To: freebsd-hackers@freebsd.org Message-ID: <20040817163915.GC53307@dan.emsphone.com> References: <20040817185240.A5554@oasis.uptsoft.com> <20040817161516.GB53307@dan.emsphone.com> <20040817192552.B5554@oasis.uptsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040817192552.B5554@oasis.uptsoft.com> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i Subject: Re: actual boot device 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, 17 Aug 2004 16:39:17 -0000 In the last episode (Aug 17), Sergey Lyubka said: > On Tue, Aug 17, 2004 at 11:15:16AM -0500, Dan Nelson wrote: > > In the last episode (Aug 17), Sergey Lyubka said: > > > How would one know the actual boot device after kernel > > > successfully booted ? > > > > The kern.bootfile sysctl points to the kernel file that was loaded, > > according to the loader. If you booted off of cdrom or floppy, you > > can run "kenv loaddev" to find out which device was actually used > > to read the file. > > I am booting kernel directly from bootblock, and do not have boot > loader, so kenv does not work. > > certainly, sysctl kern.bootfile points to /kernel, but it does not > tell anything. > > The actual device may be floppy, CF card or harrdisk, and I do not > have any means of figuring it out. The best you can do is search your mountpoints and see whether any of them has a "/kernel" file. The bootblock (and loader) uses the BIOS to read the kernel file, so it's possible that the device may not even be accessible from the running system. If, for example, you booted off a floppy but didn't have the floppy drivers in the kernel. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 16:43:49 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 3818516A4CE for ; Tue, 17 Aug 2004 16:43:49 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3102143D1D for ; Tue, 17 Aug 2004 16:43:48 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i7HGhlT07279 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 19:43:47 +0300 Date: Tue, 17 Aug 2004 19:43:47 +0300 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Message-ID: <20040817194347.C5554@oasis.uptsoft.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040817185240.A5554@oasis.uptsoft.com> <20040817161516.GB53307@dan.emsphone.com> <20040817192552.B5554@oasis.uptsoft.com> <20040817163500.GC28054@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040817163500.GC28054@odin.ac.hmc.edu>; from brooks@one-eyed-alien.net on Tue, Aug 17, 2004 at 09:35:00AM -0700 X-OS: FreeBSD 4.5-STABLE Subject: Re: actual boot device 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, 17 Aug 2004 16:43:49 -0000 > You don't say which version you are running, but in 5.x booting without > the loader is not supported in any way shape or form. >=20 > -- Brooks Well I am booting 5.2 -current, yes, without the loader. The image is here: http://oasis.uptsoft.com/~devnull/floppy.img MFS root is embedded into a kernel, so mount point is /dev/md0 and indeed does not say about actual boot device From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 16:54: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 8BA1016A4CE for ; Tue, 17 Aug 2004 16:54:16 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9484C43D1D for ; Tue, 17 Aug 2004 16:54:15 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i7HGsEb07536 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 19:54:14 +0300 Date: Tue, 17 Aug 2004 19:54:14 +0300 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Message-ID: <20040817195414.D5554@oasis.uptsoft.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040817185240.A5554@oasis.uptsoft.com> <20040817161516.GB53307@dan.emsphone.com> <20040817192552.B5554@oasis.uptsoft.com> <20040817163915.GC53307@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040817163915.GC53307@dan.emsphone.com>; from dnelson@allantgroup.com on Tue, Aug 17, 2004 at 11:39:15AM -0500 X-OS: FreeBSD 4.5-STABLE Subject: Re: actual boot device 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, 17 Aug 2004 16:54:16 -0000 > The best you can do is search your mountpoints and see whether any of > them has a "/kernel" file. The bootblock (and loader) uses the BIOS to > read the kernel file, so it's possible that the device may not even be > accessible from the running system. If, for example, you booted off a > floppy but didn't have the floppy drivers in the kernel. Yes, that makes sense, the boot device may not be even accessible. As I said, I am running picobsd-like system, it's / embedded into kernel so / mountpoint is /dev/md0 :-) I was thinking the kernel set some sysctl or something after getting parameters from bootblocks/loader, and user may read this something. Probably kenv loaddev is the answer, my problem is that I cannot fit loader into the image - it is already packed enough. Thanks for the answers. From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 17:07: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 C49D316A4CE for ; Tue, 17 Aug 2004 17:07:59 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 661BE43D49 for ; Tue, 17 Aug 2004 17:07:55 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i7HH7taj034626 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 12:07:55 -0500 (CDT) (envelope-from dan) Date: Tue, 17 Aug 2004 12:07:54 -0500 From: Dan Nelson To: freebsd-hackers@freebsd.org Message-ID: <20040817170754.GE53307@dan.emsphone.com> References: <20040817185240.A5554@oasis.uptsoft.com> <20040817161516.GB53307@dan.emsphone.com> <20040817192552.B5554@oasis.uptsoft.com> <20040817163915.GC53307@dan.emsphone.com> <20040817195414.D5554@oasis.uptsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040817195414.D5554@oasis.uptsoft.com> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i Subject: Re: actual boot device 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, 17 Aug 2004 17:07:59 -0000 In the last episode (Aug 17), Sergey Lyubka said: > > The best you can do is search your mountpoints and see whether any of > > them has a "/kernel" file. The bootblock (and loader) uses the BIOS to > > read the kernel file, so it's possible that the device may not even be > > accessible from the running system. If, for example, you booted off a > > floppy but didn't have the floppy drivers in the kernel. > > Yes, that makes sense, the boot device may not be even accessible. > As I said, I am running picobsd-like system, it's / embedded into kernel > so / mountpoint is /dev/md0 :-) What might work is reading the first 512 bytes of /dev/{da0,ad0,fd0,cd0} and see if any of them have your picobsd bootblock. Then you know where the filessytem holding /kernel is and can mount it yourself. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 18:43: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 1B0A316A4CE for ; Tue, 17 Aug 2004 18:43:17 +0000 (GMT) Received: from smtp.mmedia.is (smtp.mmedia.is [217.151.180.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 448B143D53 for ; Tue, 17 Aug 2004 18:43:16 +0000 (GMT) (envelope-from baldur@foo.is) Received: from acabus (tesla.foo.is [217.151.166.96]) by smtp.mmedia.is (8.12.10/8.12.10/1.0.1) with ESMTP id i7HIhECn002259 for ; Tue, 17 Aug 2004 18:43:15 GMT From: Baldur Gislason To: freebsd-hackers@freebsd.org Date: Tue, 17 Aug 2004 18:43:14 +0000 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408171843.14459.baldur@foo.is> Subject: Weird crashes 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, 17 Aug 2004 18:43:17 -0000 I have a computer running FreeBSD 5.2.1-REL, I've tried 3 different video cards (two nvidia and one matrox), I've tried two different motherboards (Aopen AK77-8XN and Aopen AK77-600GN), I've tried using just a single memory DIMM out of the two, I've tried two different processors (AMD AthlonXP 2500+ 1.83GHz and AMD Duron 1300MHz). I also tried moving the swap partition on a different hard drive. The problem is this: Programs crash, namely Xfree86. Xfree86 always stops on signal 6 (SIGABRT), and it seems to happen mostly when I've filled the RAM and have started to use quite a bit of swap. I'm mostly filling the ram with lots of browser windows opening heavy graphics off the network. Any debugging ideas? brgds. Baldur Gislason From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 20:25:48 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 D934116A4CE for ; Tue, 17 Aug 2004 20:25:48 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6ADAE43D1D for ; Tue, 17 Aug 2004 20:25:48 +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 i7HKPl4o039010 for ; Tue, 17 Aug 2004 16:25:47 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i7HKPln7039009 for freebsd-hackers@freebsd.org; Tue, 17 Aug 2004 16:25:47 -0400 (EDT) (envelope-from afields) Date: Tue, 17 Aug 2004 16:25:47 -0400 From: Allan Fields To: freebsd-hackers@freebsd.org Message-ID: <20040817202547.GB33859@afields.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Subject: Crunchgen (Was Re: actual boot device) 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, 17 Aug 2004 20:25:49 -0000 On Tue, Aug 17, 2004 at 07:54:14PM +0300, Sergey Lyubka wrote: > Probably kenv loaddev is the answer, my problem is that I cannot fit > loader into the image - it is already packed enough. Are you using/have you tried crunchgen(1)? This is how the rescue binaries are done. It might save on space in your image where memory is very tight and this could free up space for a loader. (I don't know if this has any relation to what your doing, but...) On a side note: I was experimenting around with a single process image that locked a shell and basic binaries into memory for administrative purposes (w/o using md), but haven't done much to eliminate problems with file descriptors, etc. (It also does strange things w/ some libraries, which isn't unexpected given the simplistic approach I took.) Even though it isn't something you want to use everyday: crunchgen made it quite space efficient. The idea was that the main() in each binary would be called from the shell with-in the same address space and it would then hook exit and return to the shell command-loop: which warps the unix binary tools based approach, but might be handy in some situations. It makes tools such as ps, kill and fsck shell built-ins. Sort of taking a statically linked base to the extreme while keeping the size down. If there is interest it could be rewritten properly to supplement rescue infrastructure. I did make mlockall(2) and rtprio(2) work (where it is supported) but haven't updated the project files yet. It's done in the style of a pseudo-port which needs the freebsd sources to build and uses some rather nasty patching techniques (patching on output of a tool, rather than patching crunchgen). Another approach would be to simply keep the crunched rescue binary & hardlinked entries in a memory disk which is loaded from rc scripts and then mounted at /rescue. I'm not sure if in all cases that would do it, but in case of a failed disk or other fs problems, it might be helpful. I'm also a fan of kill in the debugger, very handy in case a machine on the edge is still able to be resuscitated. -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 20:41: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 D337B16A4CE for ; Tue, 17 Aug 2004 20:41:06 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id A44D843D3F for ; Tue, 17 Aug 2004 20:41:06 +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 i7HKf2nS039095; Tue, 17 Aug 2004 16:41:02 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i7HKf2Q5039094; Tue, 17 Aug 2004 16:41:02 -0400 (EDT) (envelope-from afields) Date: Tue, 17 Aug 2004 16:41:02 -0400 From: Allan Fields To: Baldur Gislason Message-ID: <20040817204102.GC33859@afields.ca> References: <200408171843.14459.baldur@foo.is> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408171843.14459.baldur@foo.is> User-Agent: Mutt/1.4i cc: freebsd-hackers@freebsd.org Subject: Re: Weird crashes 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, 17 Aug 2004 20:41:06 -0000 On Tue, Aug 17, 2004 at 06:43:14PM +0000, Baldur Gislason wrote: > I have a computer running FreeBSD 5.2.1-REL, I've tried 3 different video > cards (two nvidia and one matrox), I've tried two different motherboards > (Aopen AK77-8XN and Aopen AK77-600GN), I've tried using just a single memory > DIMM out of the two, I've tried two different processors (AMD AthlonXP 2500+ > 1.83GHz and AMD Duron 1300MHz). If you've moved the processors, did you redo thermal interface? Even stock AMD Athlon heatsinks w/ thermal pad can be problematic, even at normal room temperatures, I would suggest if your a bit uncertain, clean the pads off the heatsinks and CPU mating surface and try reapplying thermal interface grease such as Arctic Silver 3 or 5. > I also tried moving the swap partition on a different hard drive. > > The problem is this: > Programs crash, namely Xfree86. > Xfree86 always stops on signal 6 (SIGABRT), and it seems to happen mostly when > I've filled the RAM and have started to use quite a bit of swap. I'm mostly > filling the ram with lots of browser windows opening heavy graphics off the > network. Do you get any panics, or just processes die? If no panics or lockups, it might not be a hardware issue. Have you looked into resource limits? > Any debugging ideas? Do you see any messages on the console? You could always take the debugging route explained in the handbook and employ a serial console. > brgds. > Baldur Gislason -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 01:01: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 779BD16A4CE for ; Wed, 18 Aug 2004 01:01:44 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A39A43D45 for ; Wed, 18 Aug 2004 01:01:44 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (sw1iwtkriyevmtgy@thor.farley.org [IPv6:2002:4340:5fcd:1::5]) by mail.farley.org (8.12.11/8.12.11) with ESMTP id i7I11XIG083124; Tue, 17 Aug 2004 20:01:33 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (localhost [127.0.0.1]) by thor.farley.org (8.12.11/8.12.11) with ESMTP id i7I11XD9005116; Tue, 17 Aug 2004 20:01:33 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)i7I11XT0005113; Tue, 17 Aug 2004 20:01:33 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Tue, 17 Aug 2004 20:01:33 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: Brian Astill In-Reply-To: <200408181002.54857.bastill@adam.com.au> Message-ID: <20040817195721.X4931@thor.farley.org> References: <20040817022926.GK81257@wantadilla.lemis.com> <20040817232816.GO88156@wantadilla.lemis.com> <200408181002.54857.bastill@adam.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Greg 'groggy' Lehey cc: FreeBSD Questions cc: FreeBSD Hackers cc: BSD User Group of Adelaide cc: freebsd-questions@freebsd.org cc: LinuxSA Subject: Re: What mouse? (was: Samsung Cordless Mouse) 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, 18 Aug 2004 01:01:44 -0000 On Wed, 18 Aug 2004, Brian Astill wrote: > On Tue, 17 Aug 2004 07:28 pm, Greg 'groggy' Lehey wrote: > >> Can anybody recommend a good mouse? My criteria are: >> >> - Middle button easy to use. The current crop of mice has the middle >> button integrated with the roller, and that makes the middle button >> either heavy or easy to confuse with the roller. >> - Preferably cordless. Cord mice tend to wander a little when you >> let go of them, and that's a real nuisance on a high-resolution >> display. > > if you want three buttons PLUS a wheel ... ?? > Otherwise, Logitech provide a very nice three-button mouse in either > wired or wireless form. I have two three-button mice without wheels (one Logitech MouseMan and a Dell that is looks just like it) that I protect with my life. :) I like three buttons, but I dislike wheels. When I checked Logitech's website, I could not find any three-button mice without wheels. Did I miss it, or are you speaking of the wheeled mice? Sean ----------------------- sean-freebsd@farley.org From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 01:18:48 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 9005516A4CE; Wed, 18 Aug 2004 01:18:48 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0287343D2D; Wed, 18 Aug 2004 01:18:48 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (yzfnkdla5v4r9lie@thor.farley.org [IPv6:2002:4340:5fcd:1::5]) by mail.farley.org (8.12.11/8.12.11) with ESMTP id i7I1IgMa083359; Tue, 17 Aug 2004 20:18:42 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (localhost [127.0.0.1]) by thor.farley.org (8.12.11/8.12.11) with ESMTP id i7I1Ig7E005405; Tue, 17 Aug 2004 20:18:42 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)i7I1IgSK005402; Tue, 17 Aug 2004 20:18:42 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Tue, 17 Aug 2004 20:18:42 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: "Greg 'groggy' Lehey" In-Reply-To: <20040817232816.GO88156@wantadilla.lemis.com> Message-ID: <20040817200137.P4931@thor.farley.org> References: <20040817022926.GK81257@wantadilla.lemis.com> <20040817232816.GO88156@wantadilla.lemis.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: BSD User Group of Adelaide cc: FreeBSD Hackers cc: FreeBSD Questions cc: LinuxSA Subject: Re: What mouse? (was: Samsung Cordless Mouse) 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, 18 Aug 2004 01:18:48 -0000 On Wed, 18 Aug 2004, Greg 'groggy' Lehey wrote: > On Tuesday, 17 August 2004 at 11:13:17 -0500, Sean Farley wrote: >> On Tue, 17 Aug 2004, Greg 'groggy' Lehey wrote: >> >>> This mouse has five buttons: the normal three on top, and one on >>> each side. I can't find a way to get the side buttons to work, and >>> looking on the web hasn't shown anything of interest. >> >> I assume you mean in X as opposed to moused although moused appears >> to support at least five buttons according to its man page. > > No, this is with moused. It still needs to initialize the mouse. Will you be using moused on the console? It is not needed to run X. > Can anybody recommend a good mouse? My criteria are: > > - Middle button easy to use. The current crop of mice has the middle > button integrated with the roller, and that makes the middle button > either heavy or easy to confuse with the roller. I am not aware of any makers of three-button mice without wheels. However, I have always Logitech as a brand. > - Preferably cordless. Cord mice tend to wander a little when you let > go of them, and that's a real nuisance on a high-resolution display. Maybe you can find a cord-to-cordless converter--there is bound to be an engineer that has done this :)--if you find a mouse you like that just happens to have a tail. Sean ----------------------- sean-freebsd@farley.org From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 03:35: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 E735716A4CE for ; Wed, 18 Aug 2004 03:35:53 +0000 (GMT) Received: from pythagoras.math.uwaterloo.ca (pythagoras.math.uwaterloo.ca [129.97.140.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F14D43D31 for ; Wed, 18 Aug 2004 03:35:53 +0000 (GMT) (envelope-from anand@cs.uwaterloo.ca) Received: from hopper.math.uwaterloo.ca (anand@hopper.math.uwaterloo.ca [129.97.78.132])i7I3Zob07249 for ; Tue, 17 Aug 2004 23:35:51 -0400 (EDT) Date: Tue, 17 Aug 2004 23:35:48 -0400 (EDT) From: Anand Subramanian X-X-Sender: anand@hopper.math.uwaterloo.ca To: freebsd-hackers@freebsd.org In-Reply-To: <20040120200044.8377516A4D0@hub.freebsd.org> Message-ID: References: <20040120200044.8377516A4D0@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at rhadamanthus by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Virus-Scanned: clamd / ClamAV version 0.75, clamav-milter version 0.75g on localhost X-Virus-Status: Clean Subject: Network Packet drops in FreeBSD 5.2.1 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, 18 Aug 2004 03:35:54 -0000 Hi All, I am using an Intel Celeron box (single CPU,1.7GHz, 495MB real and 472 MB avail memory, FreeBSD 5.2.1 #15 release), to run a daemon process which shares a circular queue/buffer with the kernel. The daemon drains objects off the front of the queue while the queue objects are populated by the protocol processing function say, XXX_input() in the kernel, called by ip_input(). If the front and rear indices of the shared buffer are equal then the protocol stack drops the packet alright. This model works fine for packet (60-64 bytes in size) input rates upto 11500 packets/sec, after which packets are lost. The machine running the daemon uses the SiS 900 NIC, 10/100Mbps. The packet loss was detected using the "netstat -I sis0" command, run both on starting the daemon and upon shutting the daemon down. The Ipkts field in the netstat output should indicate the number of packets received by the interface in question.. With an appropriate chosen value for the shared buffer length, no packets are dropped because the shared queue is full. Hence packets seem to be dropped at the adapter level. The surprising part seems to be that though packets are being dropped/lost, top shows a ~70% idle system with peak interrupt time of ~25%. The daemon uses a "hacked" version of the select() call with a timeout value. The XXX_input() protocol processing function signals the thread/KSE waiting on the hacked select() call as soon as it sees that there are packets in the shared buffer(shared between the daemon and the kernel). Question is : 1. Is top really accurate in reporting all stats at such workloads, or input pkt rates? Can the %Idle time reported by top be trusted? 2. At increasing network input loads (12000 pkts/sec), much of the system time maybe spent in the hardware interrupt handler, ip processing functions. With the user daemon calling select(), any time spent in the select() call would be charged to the daemon's timeslice. Would it be fairly scheduled to run. It should be(of course depending on the RPLs), but wanted to confirm this. 3. When ip_drain() is called and it calls the DEQUEUE macro, it acquires Giant. DOes this mean other netisr's and handlers are disabled so that the queue gets emptied in a sort of batch-mode behavior? 4. I am trying different clock speeds by changing kern.hz in loader.conf. Doesn't seem to help but I am still looking into this. When network packets are being dropped at the interface level, is it really necessary for the system to be ~0% idle??? Any other input is greatly appreciated. Best, Anand From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 06:11: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 597B816A4CE for ; Wed, 18 Aug 2004 06:11:25 +0000 (GMT) Received: from web53906.mail.yahoo.com (web53906.mail.yahoo.com [206.190.36.216]) by mx1.FreeBSD.org (Postfix) with SMTP id A3ECD43D5C for ; Wed, 18 Aug 2004 06:11:24 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040818061124.83583.qmail@web53906.mail.yahoo.com> Received: from [202.168.70.130] by web53906.mail.yahoo.com via HTTP; Tue, 17 Aug 2004 23:11:24 PDT Date: Tue, 17 Aug 2004 23:11:24 -0700 (PDT) From: Dennis George To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Kernel Debugging 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, 18 Aug 2004 06:11:25 -0000 Hi, I am studying the kernel source of FreeBSD. I like to know the flow of packets from NIC to different modules of Kernel and then to the user-level. I studied the code and identified some of the functions through which the kernel handles network packets..... But I want to check from where the control goes to that function....... So I decided to debug the kernel.... since I have only one machine I am not checking for kgdb.... I decided to work with DDB so compiled the kernel with option DDB and with debugging enabled (-g option). After installing the new kernel I rebooted the system and in the boot prompt I gave "-d" option to enter the debugging module..... My problem is that I can't provide any breakpoints with this method... It gives me error saying "symbol not found"..... Can anybody tell me where is the problem................ thanks Joseph --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 06:37: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 C310716A4CE for ; Wed, 18 Aug 2004 06:37:25 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE13243D46 for ; Wed, 18 Aug 2004 06:37:24 +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 i7I6bLP4040869; Wed, 18 Aug 2004 16:07:21 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Wed, 18 Aug 2004 16:07:21 +0930 User-Agent: KMail/1.6.2 References: <20040818061124.83583.qmail@web53906.mail.yahoo.com> In-Reply-To: <20040818061124.83583.qmail@web53906.mail.yahoo.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200408181607.21435.doconnor@gsoft.com.au> X-Spam-Score: -5.2 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Dennis George Subject: Re: Kernel Debugging 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, 18 Aug 2004 06:37:25 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 18 Aug 2004 15:41, Dennis George wrote: > I am studying the kernel source of FreeBSD. I like to know the flow of > packets from NIC to different modules of Kernel and then to the > user-level. I studied the code and identified some of the functions throu= gh > which the kernel handles network packets..... But I want to check from > where the control goes to that function....... > > So I decided to debug the kernel.... since I have only one machine I am > not checking for kgdb.... I decided to work with DDB so compiled the > kernel with option DDB and with debugging enabled (-g option). After > installing the new kernel I rebooted the system and in the boot prompt I > gave "-d" option to enter the debugging module..... My problem is that I > can't provide any breakpoints with this method... It gives me error > saying "symbol not found"..... Can anybody tell me where is the > problem................ Maybe you should try vmware then you can pretend you have 2 machines :) Not sure how to answer your actual question though. =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 =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBIvkh5ZPcIHs/zowRAhWKAJ90opCOwSjJVvWBTy7LhIufOzf/tgCfX+er n0sG45x5nGJez+nq1PxiZ+g=3D =3DwyB4 =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 06:48: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 0304D16A4CE for ; Wed, 18 Aug 2004 06:48:17 +0000 (GMT) Received: from pimout2-ext.prodigy.net (pimout2-ext.prodigy.net [207.115.63.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99AE143D39 for ; Wed, 18 Aug 2004 06:48:16 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-68-124-233-133.dsl.snfc21.pacbell.net [68.124.233.133])i7I6mAfA028834; Wed, 18 Aug 2004 02:48:11 -0400 Message-ID: <4122FBA9.2030105@elischer.org> Date: Tue, 17 Aug 2004 23:48:09 -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: "Daniel O'Connor" References: <20040818061124.83583.qmail@web53906.mail.yahoo.com> <200408181607.21435.doconnor@gsoft.com.au> In-Reply-To: <200408181607.21435.doconnor@gsoft.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: Dennis George Subject: Re: Kernel Debugging 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, 18 Aug 2004 06:48:17 -0000 Daniel O'Connor wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wed, 18 Aug 2004 15:41, Dennis George wrote: > >>I am studying the kernel source of FreeBSD. I like to know the flow of >>packets from NIC to different modules of Kernel and then to the >>user-level. I studied the code and identified some of the functions through >>which the kernel handles network packets..... But I want to check from >>where the control goes to that function....... >> >>So I decided to debug the kernel.... since I have only one machine I am >>not checking for kgdb.... I decided to work with DDB so compiled the >>kernel with option DDB and with debugging enabled (-g option). After >>installing the new kernel I rebooted the system and in the boot prompt I >>gave "-d" option to enter the debugging module..... My problem is that I >>can't provide any breakpoints with this method... It gives me error >>saying "symbol not found"..... Can anybody tell me where is the >>problem................ > > > Maybe you should try vmware then you can pretend you have 2 machines :) > > Not sure how to answer your actual question though. In some releases of freebsd.. you can not see symbols at the moment that boot -d stops. for some reason they have not been enabled yet. so use nm to find the address of something that will be called and use the address to set a breakpoint there.. when it stops you will have symbols. I also would suggest vmware.. I've used it very successfully in the past.. you can use the nmdm device to set up s 'serial link' with the virtual machine and debug across that. this is from my web page: ---- A screenshot of a FreeBSD system running under vmware, running X11, with its console output redirected out one serial port (with 'tip' on the other side of the nullmodem), and stopped in the kernel debugger, which is redirected to another serial port (actually the nullmodem driver again)with gdb (in the guise of xxgdb) showing the breakpoint and the current instruction pointer. You can also see that I was running ddb on the console port for a while too, all without disturbing the X11 display. Hopefully a more explicit description of how to do this will be forthcoming. The gif file is here. and the URL for the gif is: http://www.freebsd.org/~julian/VM-Debug_screenshot.gif > > - -- > 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 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (FreeBSD) > > iD8DBQFBIvkh5ZPcIHs/zowRAhWKAJ90opCOwSjJVvWBTy7LhIufOzf/tgCfX+er > n0sG45x5nGJez+nq1PxiZ+g= > =wyB4 > -----END PGP SIGNATURE----- > _______________________________________________ > 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 Aug 18 08:30:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9000516A4CE for ; Wed, 18 Aug 2004 08:30:32 +0000 (GMT) Received: from web53902.mail.yahoo.com (web53902.mail.yahoo.com [206.190.36.212]) by mx1.FreeBSD.org (Postfix) with SMTP id 346F243D46 for ; Wed, 18 Aug 2004 08:30:19 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040818083018.87246.qmail@web53902.mail.yahoo.com> Received: from [202.168.70.130] by web53902.mail.yahoo.com via HTTP; Wed, 18 Aug 2004 01:30:18 PDT Date: Wed, 18 Aug 2004 01:30:18 -0700 (PDT) From: Dennis George To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Zero copy Socket 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, 18 Aug 2004 08:30:32 -0000 Hi all, Is there any limitations in using zero copy socket.... I mean... do the sender has to follow any specific protocol (like the packet payload should be page alligned or so.) ??? Thanks in advance Dennis --------------------------------- Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 08:35: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 A656B16A4D0 for ; Wed, 18 Aug 2004 08:35:51 +0000 (GMT) Received: from web53902.mail.yahoo.com (web53902.mail.yahoo.com [206.190.36.212]) by mx1.FreeBSD.org (Postfix) with SMTP id 43EC543D1D for ; Wed, 18 Aug 2004 08:35:51 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040818083550.88034.qmail@web53902.mail.yahoo.com> Received: from [202.168.70.130] by web53902.mail.yahoo.com via HTTP; Wed, 18 Aug 2004 01:35:50 PDT Date: Wed, 18 Aug 2004 01:35:50 -0700 (PDT) From: Dennis George To: freebsd-hackers@freebsd.org In-Reply-To: <4122FBA9.2030105@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: Kernel Debugging 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, 18 Aug 2004 08:35:51 -0000 Hi, Thanks for quick response....... My Vmware is running on Windows XP machine.... In this installed two FreeBSD5.2 vritual machines.... Now can you tell me how do I enable serial communication between them ? And can you tell me any funtion which is called after the call to sysinit (after which the symbols get loaded)... so that I can set a break point on that function by seeing its address by nm Thanks in advance Dennis Julian Elischer wrote: Daniel O'Connor wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wed, 18 Aug 2004 15:41, Dennis George wrote: > >>I am studying the kernel source of FreeBSD. I like to know the flow of >>packets from NIC to different modules of Kernel and then to the >>user-level. I studied the code and identified some of the functions through >>which the kernel handles network packets..... But I want to check from >>where the control goes to that function....... >> >>So I decided to debug the kernel.... since I have only one machine I am >>not checking for kgdb.... I decided to work with DDB so compiled the >>kernel with option DDB and with debugging enabled (-g option). After >>installing the new kernel I rebooted the system and in the boot prompt I >>gave "-d" option to enter the debugging module..... My problem is that I >>can't provide any breakpoints with this method... It gives me error >>saying "symbol not found"..... Can anybody tell me where is the >>problem................ > > > Maybe you should try vmware then you can pretend you have 2 machines :) > > Not sure how to answer your actual question though. In some releases of freebsd.. you can not see symbols at the moment that boot -d stops. for some reason they have not been enabled yet. so use nm to find the address of something that will be called and use the address to set a breakpoint there.. when it stops you will have symbols. I also would suggest vmware.. I've used it very successfully in the past.. you can use the nmdm device to set up s 'serial link' with the virtual machine and debug across that. this is from my web page: ---- A screenshot of a FreeBSD system running under vmware, running X11, with its console output redirected out one serial port (with 'tip' on the other side of the nullmodem), and stopped in the kernel debugger, which is redirected to another serial port (actually the nullmodem driver again)with gdb (in the guise of xxgdb) showing the breakpoint and the current instruction pointer. You can also see that I was running ddb on the console port for a while too, all without disturbing the X11 display. Hopefully a more explicit description of how to do this will be forthcoming. The gif file is here. and the URL for the gif is: http://www.freebsd.org/~julian/VM-Debug_screenshot.gif > > - -- > 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 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (FreeBSD) > > iD8DBQFBIvkh5ZPcIHs/zowRAhWKAJ90opCOwSjJVvWBTy7LhIufOzf/tgCfX+er > n0sG45x5nGJez+nq1PxiZ+g= > =wyB4 > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --------------------------------- Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 09:11: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 1DE2816A4CE for ; Wed, 18 Aug 2004 09:11:24 +0000 (GMT) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 670F543D6D for ; Wed, 18 Aug 2004 09:11:23 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received-SPF: pass (mp2.macomnet.net: domain of maxim@macomnet.ru designates 127.0.0.1 as permitted sender) receiver=mp2.macomnet.net; client_ip=127.0.0.1; envelope-from=maxim@macomnet.ru; Received: from localhost (32839z73@localhost [127.0.0.1]) by mp2.macomnet.net (8.12.11/8.12.11) with ESMTP id i7I9BLHL011203; Wed, 18 Aug 2004 13:11:21 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Wed, 18 Aug 2004 13:11:21 +0400 (MSD) From: Maxim Konovalov To: Dennis George In-Reply-To: <20040818083018.87246.qmail@web53902.mail.yahoo.com> Message-ID: <20040818131010.A11174@mp2.macomnet.net> References: <20040818083018.87246.qmail@web53902.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Zero copy Socket 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, 18 Aug 2004 09:11:24 -0000 On Wed, 18 Aug 2004, 01:30-0700, Dennis George wrote: > Hi all, > Is there any limitations in using zero copy socket.... I mean... do > the sender has to follow any specific protocol (like the packet > payload should be page alligned or so.) ??? Have you read zero_copy(9) man page? For sending data, there are no special requirements or capabilities that the sending NIC must have. The data written to the socket, though, must be at least a page in size and page aligned in order to be mapped into the kernel. If it does not meet the page size and alignment constraints, it will be copied into the kernel, as is normally the case with socket I/O. -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 17 23:28: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 13D3116A4CE; Tue, 17 Aug 2004 23:28:23 +0000 (GMT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EDC343D3F; Tue, 17 Aug 2004 23:28:22 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 081782BD68; Wed, 18 Aug 2004 09:28:19 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 022F051201; Wed, 18 Aug 2004 08:58:16 +0930 (CST) Date: Wed, 18 Aug 2004 08:58:16 +0930 From: Greg 'groggy' Lehey To: Sean Farley Message-ID: <20040817232816.GO88156@wantadilla.lemis.com> References: <20040817022926.GK81257@wantadilla.lemis.com> <20040817110515.F67959@thor.farley.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K9fy5ol1Oes4Q/ix" Content-Disposition: inline In-Reply-To: <20040817110515.F67959@thor.farley.org> User-Agent: Mutt/1.4.1i Organization: AUUG: Australian UNIX and Open Systems User Group Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.auug.org.au/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 X-Mailman-Approved-At: Wed, 18 Aug 2004 12:39:13 +0000 cc: FreeBSD Hackers cc: BSD User Group of Adelaide cc: FreeBSD Questions cc: LinuxSA Subject: What mouse? (was: Samsung Cordless Mouse) 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, 17 Aug 2004 23:28:23 -0000 --K9fy5ol1Oes4Q/ix Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tuesday, 17 August 2004 at 11:13:17 -0500, Sean Farley wrote: > On Tue, 17 Aug 2004, Greg 'groggy' Lehey wrote: > >> This mouse has five buttons: the normal three on top, and one on each >> side. I can't find a way to get the side buttons to work, and looking >> on the web hasn't shown anything of interest. > > I assume you mean in X as opposed to moused although moused appears to > support at least five buttons according to its man page. No, this is with moused. It still needs to initialize the mouse. > This may help with your X issues: > http://www.xfree86.org/current/mouse5.html#22 Yes, been through all of that and more. Nothing worked. In the meantime I've connected it up anyway as a 3 button mouse and decided I really don't like it; the buttons are far too heavy in their action, and it's difficult to move it sideways without pressing one of the side buttons. So this is not much of an issue any more. Can anybody recommend a good mouse? My criteria are: - Middle button easy to use. The current crop of mice has the middle button integrated with the roller, and that makes the middle button either heavy or easy to confuse with the roller. - Preferably cordless. Cord mice tend to wander a little when you let go of them, and that's a real nuisance on a high-resolution display. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html Note: I discard all HTML mail unseen. Finger Greg.Lehey@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. --K9fy5ol1Oes4Q/ix Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFBIpSQIubykFB6QiMRAt7uAKCMf73tYGbMv93gqldZi0qf9127MwCgs+3P 1u79I8AjzGLRwkqESXfMJ8s= =OUHl -----END PGP SIGNATURE----- --K9fy5ol1Oes4Q/ix-- From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 00:06:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5366716A4CE; Wed, 18 Aug 2004 00:06:09 +0000 (GMT) Received: from fep.baea.com.au (gateway.baea.com.au [202.20.20.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id C59E043D1D; Wed, 18 Aug 2004 00:06:06 +0000 (GMT) (envelope-from blymn@baesystems.com.au) Received: from proxy.baea.com.au (HELO sbuxscan.baea.com.au) (150.207.31.25) by fep.baea.com.au with ESMTP; 18 Aug 2004 09:36:04 +0930 Received: from bunya.baea.com.au.awadi (bunya.baea.com.au.207.150.in-addr.arpa [150.207.1.63] (may be forged))i7I03vq4014961; Wed, 18 Aug 2004 09:33:58 +0930 (CST) Received: from nmallee.baea.com.au by bunya.baea.com.au.awadi (SMI-8.6/SMI-SVR4) id JAA16601; Wed, 18 Aug 2004 09:35:59 +0930 Received: (from blymn@localhost) by nmallee.baea.com.au (8.11.7p1+Sun/8.11.7) id i7I05vb11670; Wed, 18 Aug 2004 09:35:57 +0930 (CST) Date: Wed, 18 Aug 2004 09:35:57 +0930 From: Brett Lymn To: "Greg 'groggy' Lehey" Message-ID: <20040818000557.GA11663@baea.com.au> References: <20040817022926.GK81257@wantadilla.lemis.com> <20040817110515.F67959@thor.farley.org> <20040817232816.GO88156@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040817232816.GO88156@wantadilla.lemis.com> User-Agent: Mutt/1.3.28i X-Mailman-Approved-At: Wed, 18 Aug 2004 12:39:13 +0000 cc: LinuxSA cc: BSD User Group of Adelaide cc: FreeBSD Hackers cc: Sean Farley cc: FreeBSD Questions Subject: Re: [BUGA] What mouse? (was: Samsung Cordless Mouse) 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, 18 Aug 2004 00:06:09 -0000 On Wed, Aug 18, 2004 at 08:58:16AM +0930, Greg 'groggy' Lehey wrote: > > - Middle button easy to use. The current crop of mice has the middle > button integrated with the roller, and that makes the middle button > either heavy or easy to confuse with the roller. > I have a logitech wireless ball mouse. It is a bit old now but the thing functions fine. I solved the problem of the middle button being on the roller by buying a tiny push button switch from Dick Smith and mounting that as a thumb button. It was a relatively simple hardware hack to get a thumb button - because I prefer to use the mouse in my left hand my mousing options are rather limited. It sucks to be one of the superior minority ;) -- Brett Lymn From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 00:32: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 F10E716A4CE; Wed, 18 Aug 2004 00:32:27 +0000 (GMT) Received: from postit.mail.adnap.net.au (postit.mail.adnap.net.au [203.6.132.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8728343D4C; Wed, 18 Aug 2004 00:32:27 +0000 (GMT) (envelope-from bastill@adam.com.au) Received: from [192.168.1.11] (202-136-104-146.ip.adam.com.au [202.136.104.146]) by postit.mail.adnap.net.au (Postfix) with ESMTP id AA9E31E604; Wed, 18 Aug 2004 10:02:24 +0930 (CST) From: Brian Astill To: freebsd-questions@freebsd.org Date: Wed, 18 Aug 2004 10:02:54 -0400 User-Agent: KMail/1.6.2 References: <20040817022926.GK81257@wantadilla.lemis.com> <20040817110515.F67959@thor.farley.org> <20040817232816.GO88156@wantadilla.lemis.com> In-Reply-To: <20040817232816.GO88156@wantadilla.lemis.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408181002.54857.bastill@adam.com.au> X-Mailman-Approved-At: Wed, 18 Aug 2004 12:39:13 +0000 cc: Greg 'groggy' Lehey cc: Sean Farley cc: FreeBSD Questions cc: FreeBSD Hackers cc: BSD User Group of Adelaide cc: LinuxSA Subject: Re: What mouse? (was: Samsung Cordless Mouse) 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, 18 Aug 2004 00:32:28 -0000 On Tue, 17 Aug 2004 07:28 pm, Greg 'groggy' Lehey wrote: > Can anybody recommend a good mouse? My criteria are: > > - Middle button easy to use. The current crop of mice has the middle > button integrated with the roller, and that makes the middle button > either heavy or easy to confuse with the roller. > - Preferably cordless. Cord mice tend to wander a little when you > let go of them, and that's a real nuisance on a high-resolution > display. if you want three buttons PLUS a wheel ... ?? Otherwise, Logitech provide a very nice three-button mouse in either wired or wireless form. -- Regards, Brian sos-sa.org.au From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 08:45: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 CCCBF16A4CE for ; Wed, 18 Aug 2004 08:45:06 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5448F43D1D for ; Wed, 18 Aug 2004 08:45:05 +0000 (GMT) (envelope-from keramida@linux.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])i7I8inHN030587; Wed, 18 Aug 2004 11:44:55 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) i7I8iY9g004952; Wed, 18 Aug 2004 11:44:34 +0300 (EEST) (envelope-from keramida@linux.gr) Received: (from keramida@localhost)i7I8iPVa004951; Wed, 18 Aug 2004 11:44:25 +0300 (EEST) (envelope-from keramida@linux.gr) Date: Wed, 18 Aug 2004 11:44:25 +0300 (EEST) From: Giorgos Keramidas To: Dennis George In-Reply-To: <20040818083018.87246.qmail@web53902.mail.yahoo.com> Message-ID: <20040818114324.Y4343@orion> References: <20040818083018.87246.qmail@web53902.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Wed, 18 Aug 2004 12:39:13 +0000 cc: freebsd-hackers@FreeBSD.org Subject: Re: Zero copy Socket 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, 18 Aug 2004 08:45:06 -0000 On 2004-08-18 01:30, Dennis George wrote: > Hi all, > > Is there any limitations in using zero copy socket.... I mean... do > the sender has to follow any specific protocol (like the packet > payload should be page alligned or so.) ??? Yes. See the zero_copy(9) manpage. It includes a lot of details regarding zero-copy sockets. From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 19 10:55:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CAD016A4CE; Thu, 19 Aug 2004 10:55:11 +0000 (GMT) Received: from www.citello.it (host170-131.pool80117.interbusiness.it [80.117.131.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02D5643D41; Thu, 19 Aug 2004 10:55:10 +0000 (GMT) (envelope-from molter@tin.it) Received: from gattaccio.codalunga (ANice-205-1-5-94.w81-53.abo.wanadoo.fr [81.53.76.94]) by www.citello.it (Postfix) with ESMTP id DF3E915ED; Thu, 19 Aug 2004 12:55:07 +0200 (CEST) Received: by gattaccio.codalunga (Postfix, from userid 1001) id B9E58C0E1; Thu, 19 Aug 2004 12:53:26 +0200 (CEST) Date: Thu, 19 Aug 2004 12:53:26 +0200 From: Marco Molteni To: hackers@freebsd.org Message-Id: <20040819125326.565cd094.molter@tin.it> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: grog@freebsd.org cc: marcel@freebsd.org Subject: kernel debugging, console and GDB_REMOTE_CHAT option 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, 19 Aug 2004 10:55:11 -0000 Hi, kernel option GDB_REMOTE_CHAT allowed to share the same serial line for console and remote gdb. Looking at the following commit message for src/sys/conf/NOTES, it says that GDB_REMOTE_CHAT has been removed, but it is not clear to me how to obain the equivalent of that option. Could somebody explain? Also, the man page for gdb(4) is outdated, since it contains references to GDB_REMOTE_CHAT. thanks marco Revision 1.1244, Sun Jul 11 01:44:07 2004 UTC (5 weeks, 4 days ago) by marcel Branch: MAIN Changes since 1.1243: +18 -25 lines Diff to previous 1.1243 (colored) Update for the KDB framework: o Rename WITNESS_DDB to WITNESS_KDB. In the new world order KDB is the acronym to use for debugging related code. The DDB option is used to enable the DDB debugger backend only. o Likewise, rename DDB_TRACE to KDB_TRACE, rename DDB_UNATTENDED to KDB_UNATTENDED and rename SC_HISTORY_DDBKEY to SC_HISTORY_KDBKEY. o Remove DDB_NOKLDSYM. The new DDB backend supports pre-linker symbol lookups as well as KLD symbol lookups at the same time. o Remove GDB_REMOTE_CHAT. The GDB protocol hacks to allow this are FreeBSD specific. At the same time, the GDB protocol has packets for console output. -- From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 22:29: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 0D3B816A4CE for ; Wed, 18 Aug 2004 22:29:40 +0000 (GMT) Received: from coverity.dreamhost.com (coverity.dreamhost.com [66.33.192.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC39A43D46 for ; Wed, 18 Aug 2004 22:29:39 +0000 (GMT) (envelope-from tedu@coverity.com) Received: from coverity.com (dsl093-171-098.sfo4.dsl.speakeasy.net [66.93.171.98]) by coverity.dreamhost.com (Postfix) with ESMTP id 5F31290887 for ; Wed, 18 Aug 2004 15:29:39 -0700 (PDT) Message-ID: <4123049E.9000900@coverity.com> Date: Wed, 18 Aug 2004 00:26:22 -0700 From: Ted Unangst User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 19 Aug 2004 12:18:30 +0000 Subject: too late null checks 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, 18 Aug 2004 22:29:40 -0000 Bugs found with Coverity's automated analysis. In each case, either the NULL check is unnecessary, or it's too late because the variable was already deref'd. dev/firewire/fwohci.c:dump_db (debugging function) pp can not be null (crash if it is) dev/mpt/mpt_pci.c:mpt_detach a null mpt won't survive mpt_prt netinet/tcp_subr.c:tcp_mtudisc tp has already been dereferenced to obtain isipv6 result usb/dev/urio.c:urio_attach if uaa->device can be null, usbd_devinfo already used it. cam/cam_xpt.c:xptplistperiphfunc check at line 2532 looks wrong. perhaps should be *pdrv == NULL? dev/twe/twe.c:twe_ioctl if you make it to line 552, tr is definitely not null. kern/vfs_subr.c:reassignbufs (4.10) 1408 while (tbp && tbp->b_lblkno < 0) 1409 tdp = TAILQ_PREV(tbp, buflists, b_vnbufs); 1410 TAILQ_INSERT_AFTER(listheadp, tbp, bp, b_vnbufs); if the first while() test fails, tailq insert will crash. i'm not sure where this code went in current. some other bugs of a similar nature have already been fixed or the code removed in current, let me know if you are still interested in 4.10 results. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 22:38: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 28BD016A4CE; Wed, 18 Aug 2004 22:38:54 +0000 (GMT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E4C743D2D; Wed, 18 Aug 2004 22:38:53 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id F06642BDED; Thu, 19 Aug 2004 08:38:50 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id A11AF511FA; Thu, 19 Aug 2004 08:08:47 +0930 (CST) Date: Thu, 19 Aug 2004 08:08:47 +0930 From: Greg 'groggy' Lehey To: Sean Farley Message-ID: <20040818223847.GR88156@wantadilla.lemis.com> References: <20040817022926.GK81257@wantadilla.lemis.com> <20040817232816.GO88156@wantadilla.lemis.com> <20040817200137.P4931@thor.farley.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J9YdZykiGPT3Jhx7" Content-Disposition: inline In-Reply-To: <20040817200137.P4931@thor.farley.org> User-Agent: Mutt/1.4.1i Organization: AUUG: Australian UNIX and Open Systems User Group Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.auug.org.au/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 X-Mailman-Approved-At: Thu, 19 Aug 2004 12:18:30 +0000 cc: BSD User Group of Adelaide cc: FreeBSD Hackers cc: FreeBSD Questions cc: LinuxSA Subject: Re: What mouse? (was: Samsung Cordless Mouse) 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, 18 Aug 2004 22:38:54 -0000 --J9YdZykiGPT3Jhx7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tuesday, 17 August 2004 at 20:18:42 -0500, Sean Farley wrote: > On Wed, 18 Aug 2004, Greg 'groggy' Lehey wrote: > >> On Tuesday, 17 August 2004 at 11:13:17 -0500, Sean Farley wrote: >>> On Tue, 17 Aug 2004, Greg 'groggy' Lehey wrote: >>> >>>> This mouse has five buttons: the normal three on top, and one on >>>> each side. I can't find a way to get the side buttons to work, and >>>> looking on the web hasn't shown anything of interest. >>> >>> I assume you mean in X as opposed to moused although moused appears >>> to support at least five buttons according to its man page. >> >> No, this is with moused. It still needs to initialize the mouse. > > Will you be using moused on the console?=20 No. > It is not needed to run X. I know. Without a reason to change, I won't. >> - Preferably cordless. Cord mice tend to wander a little when you let >> go of them, and that's a real nuisance on a high-resolution display. > > Maybe you can find a cord-to-cordless converter--there is bound to be an > engineer that has done this :)--if you find a mouse you like that just > happens to have a tail. That would defeat the purpose of it being cordless. Greg -- Note: I discard all HTML mail unseen. Finger Greg.Lehey@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. --J9YdZykiGPT3Jhx7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFBI9p3IubykFB6QiMRAqi0AJ9MMhI45BScymqEWRO6Podn5db62ACgle2h U0d303xmoyajVYLIyziCK/8= =xZ8V -----END PGP SIGNATURE----- --J9YdZykiGPT3Jhx7-- From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 19 01:46: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 0A9FA16A4CE; Thu, 19 Aug 2004 01:46:00 +0000 (GMT) Received: from mail.bitfreak.org (mail.bitfreak.org [65.75.198.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id B68B743D58; Thu, 19 Aug 2004 01:45:59 +0000 (GMT) (envelope-from dmp@bitfreak.org) Received: from speck.techno.pagans (c-24-21-241-225.client.comcast.net [24.21.241.225]) by mail.bitfreak.org (Postfix) with ESMTP id 27F372A41A; Wed, 18 Aug 2004 18:45:57 -0700 (PDT) Received: from spud (w0.techno.pagans [172.21.42.20]) by speck.techno.pagans (Postfix) with ESMTP id C382C17027; Wed, 18 Aug 2004 18:45:53 -0700 (PDT) From: "Darren Pilgrim" To: "'Greg 'groggy' Lehey'" , "'Sean Farley'" Date: Wed, 18 Aug 2004 18:45:43 -0700 Message-ID: <000c01c4858e$40abd5f0$142a15ac@spud> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: <20040817232816.GO88156@wantadilla.lemis.com> Importance: Normal X-Mailman-Approved-At: Thu, 19 Aug 2004 12:18:30 +0000 cc: 'BSD User Group of Adelaide' cc: 'FreeBSD Hackers' cc: 'FreeBSD Questions' cc: 'LinuxSA' Subject: RE: What mouse? (was: Samsung Cordless Mouse) 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, 19 Aug 2004 01:46:00 -0000 > From: Greg 'groggy' Lehey >=20 > Can anybody recommend a good mouse? My criteria are: >=20 > - Middle button easy to use. The current crop of mice has the middle > button integrated with the roller, and that makes the middle button > either heavy or easy to confuse with the roller. > - Preferably cordless. Cord mice tend to wander a little when you let > go of them, and that's a real nuisance on a high-resolution display. I have a Logitech MX700. Very solid mouse, excellent performance and rechargable battery life. It can also run on standard alkalines (though you can't charge them). The mouse is heavier than most, but this seems to help with making smooth movements. The weight makes some of the more fervid in-game mouse maneuvers a bit tiresome on the wrist, though. It does integrate the middle button with the wheel. But there is hope! The force needed to press the wheel-button isn't much more than that of the right and left buttons. The return spring on the wheel housing can be easily removed. Doing so makes the return tension the same as the left and right buttons without affecting the wheel's functionality. It also has five additional buttons which are presented as separate buttons (6 through 10, in xf86config). They could be mapped to the middle button if you don't want to do surgery on your mouse. I've used the MX700 in 5.1 with XF86 4.3.x with great success. The only thing I couldn't get to work was the AppSwitch button, but I ended up never needing to use it anyway. From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 19 14:09: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 9B74A16A4CE for ; Thu, 19 Aug 2004 14:09:59 +0000 (GMT) Received: from www.citello.it (host170-131.pool80117.interbusiness.it [80.117.131.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1592343D39 for ; Thu, 19 Aug 2004 14:09:59 +0000 (GMT) (envelope-from molter@tin.it) Received: from gattaccio.codalunga (ANice-205-1-5-94.w81-53.abo.wanadoo.fr [81.53.76.94]) by www.citello.it (Postfix) with ESMTP id 2F01615ED for ; Thu, 19 Aug 2004 16:09:57 +0200 (CEST) Received: by gattaccio.codalunga (Postfix, from userid 1001) id B35BDC108; Thu, 19 Aug 2004 16:08:16 +0200 (CEST) Date: Thu, 19 Aug 2004 16:08:16 +0200 From: Marco Molteni To: freebsd-hackers@freebsd.org Message-Id: <20040819160816.4ce5883b.molter@tin.it> In-Reply-To: <20040819125326.565cd094.molter@tin.it> References: <20040819125326.565cd094.molter@tin.it> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: kernel debugging, console and GDB_REMOTE_CHAT option 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, 19 Aug 2004 14:09:59 -0000 Replying to myself: On Thu, 19 Aug 2004 Marco Molteni wrote: > kernel option GDB_REMOTE_CHAT allowed to share the same serial line > for console and remote gdb. > > Looking at the following commit message for src/sys/conf/NOTES, it > says that GDB_REMOTE_CHAT has been removed, but it is not clear to me > how to obain the equivalent of that option. Could somebody explain? [..] I tested and it "just works": sharing of serial line between console and gdb is enabled by default. marco From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 19 19:06: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 16FDD16A4CE for ; Thu, 19 Aug 2004 19:06:10 +0000 (GMT) Received: from www.citello.it (host170-131.pool80117.interbusiness.it [80.117.131.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F43743D2D for ; Thu, 19 Aug 2004 19:06:09 +0000 (GMT) (envelope-from molter@tin.it) Received: from gattaccio.codalunga (ANice-205-1-5-94.w81-53.abo.wanadoo.fr [81.53.76.94]) by www.citello.it (Postfix) with ESMTP id 9877015ED for ; Thu, 19 Aug 2004 21:06:07 +0200 (CEST) Received: by gattaccio.codalunga (Postfix, from userid 1001) id 3B85EC0E1; Thu, 19 Aug 2004 21:04:28 +0200 (CEST) Date: Thu, 19 Aug 2004 21:04:28 +0200 From: Marco Molteni To: hackers@freebsd.org Message-Id: <20040819210428.30f7cf1d.molter@tin.it> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: remote kernel gdb: break, continue: fatal trap 12 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, 19 Aug 2004 19:06:10 -0000 Hi, I am playing around with remote gdb on a -current cvsupped 2 days ago. In gdb I set a breakpoint on ums_open (USB mouse driver, as a module), in the console I execute cat /dev/ums0, the breakpoint triggers, in gdb I issue a continue and I get a Fatal trap 12: page fault while in kernel mode, as detailed below. Any ideas why? thanks marco (gdb) tr0 (gdb) getsyms [..] (gdb) b ums_open Breakpoint 1 at 0xc072eedf: file /home/usr.src/sys/modules/ums/../../dev/usb/ums.c, line 594. (gdb) c ================= cat /dev/ums0 ================= [New Thread 100057] [Switching to Thread 100057] Breakpoint 1, ums_open (dev=0xc064ef6c, flag=0x1, fmt=0x2000, p=0xc10242c0) at /home/usr.src/sys/modules/ums/../../dev/usb/ums.c:594 (gdb) c Program received signal SIGSEGV, Segmentation fault. cdevsw_rel (csw=0x0) at /home/usr.src/sys/kern/kern_conf.c:124 /home/usr.src/sys/kern/kern_conf.c:124:3280:beg:0xc0489e14 Fatal trap 12: page fault while in kernel mode fault virtual address = 0x48 fault code = supervisor write, page not present instruction pointer = 0x8:0xc0489e14 stack pointer = 0x10:0xcbf6e9c0 frame pointer = 0x10:0xcbf6e9c4 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 = 559 (cat) -- From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 19 20:18: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 D0A2F16A4CE for ; Thu, 19 Aug 2004 20:18:17 +0000 (GMT) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D7A943D2F for ; Thu, 19 Aug 2004 20:18:17 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 759 invoked from network); 19 Aug 2004 20:18:19 -0000 Received: from dotat.atdotat.at (HELO [62.48.0.47]) ([62.48.0.47]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 19 Aug 2004 20:18:19 -0000 Message-ID: <41250B09.6070006@freebsd.org> Date: Thu, 19 Aug 2004 22:18:17 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a1) Gecko/20040520 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ted Unangst References: <4123049E.9000900@coverity.com> In-Reply-To: <4123049E.9000900@coverity.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: too late null checks 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, 19 Aug 2004 20:18:18 -0000 Ted Unangst wrote: > Bugs found with Coverity's automated analysis. In each case, either the > NULL check is unnecessary, or it's too late because the variable was > already deref'd. ... > netinet/tcp_subr.c:tcp_mtudisc > tp has already been dereferenced to obtain isipv6 result Thanks, fixed. Did you run your entire tool on the FreeBSD tree or is this subset of the available tests and checks? -- Andre From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 04:01: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 F21A616A4CE for ; Fri, 20 Aug 2004 04:01:17 +0000 (GMT) Received: from mail.otel.net (gw3.OTEL.net [212.36.8.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9E6643D2F for ; Fri, 20 Aug 2004 04:01:16 +0000 (GMT) (envelope-from tbyte@OTEL.net) Received: from dragon.otel.net ([212.36.8.135]) by mail.otel.net with esmtp (Exim 4.30; FreeBSD) id 1By0aY-000Nhl-OH for freebsd-hackers@freebsd.org; Fri, 20 Aug 2004 07:01:14 +0300 Message-ID: <41257789.70508@OTEL.net> Date: Fri, 20 Aug 2004 07:01:13 +0300 From: Iasen Kostov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040728 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: How can I fake a device ? 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, 20 Aug 2004 04:01:18 -0000 Hi, I want to know is there a way to call *_probe (for device driver) with fake (PCI) device that does not exists in the system ? First of all a cant find how "struct device" is declared (i've searched even the compile/ dir) and second I think that I'll need to intercept pci_get_vendor and pci_get_device funcs with my own which should detect the fake device and thus will return vandor/device that I need to fake. I realy don't need anything else except _probe ... regards. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 05:49: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 CF56E16A4CE for ; Fri, 20 Aug 2004 05:49:47 +0000 (GMT) Received: from axe-inc.co.jp (axegw.axe-inc.co.jp [61.199.217.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 319CA43D5E for ; Fri, 20 Aug 2004 05:49:47 +0000 (GMT) (envelope-from takawata@axe-inc.co.jp) Received: from localhost (localhost [127.0.0.1]) by axe-inc.co.jp (8.9.3+3.2W/3.7W) with SMTP id OAA02607; Fri, 20 Aug 2004 14:49:44 +0900 (JST) Message-Id: <200408200549.OAA02607@axe-inc.co.jp> X-Authentication-Warning: axegw.axe-inc.co.jp: localhost [127.0.0.1] didn't use HELO protocol To: takawata@jp.freebsd.org From: takawata@jp.freebsd.org In-reply-to: Your message of "Fri, 20 Aug 2004 07:01:13 +0300." <41257789.70508@OTEL.net> Date: Fri, 20 Aug 2004 14:49:44 +0900 Sender: takawata@axe-inc.co.jp cc: freebsd-hackers@freebsd.org Subject: Re: How can I fake a device ? 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, 20 Aug 2004 05:49:48 -0000 In message <41257789.70508@OTEL.net>, Iasen Kostov wrote: > Hi, >I want to know is there a way to call *_probe (for device driver) with >fake (PCI) device that does not exists in the system ? >First of all a cant find how "struct device" is declared (i've searched >even the compile/ dir) and second I think that I'll need to intercept >pci_get_vendor and pci_get_device funcs with my own which should detect >the fake device and thus will return vandor/device that I need to fake. >I realy don't need anything else except _probe ... I have never tried such but grimpsed the PCI framework, I propose the following, though I don't imagine why you want to do so: Your driver have to contain DEVICE_IDENTIFY method that calls device_add_child to allocate device_t object. Then you allocate 'struct pci_devinfo' and initialize pci_devinfo as you like. And you have to make your driver as a module. Then a device object will show up on the device tree on your system. You may want to have a look at pci_add_children@/sys/dev/pci/pci.c From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 07:04: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 34F8D16A4CE for ; Fri, 20 Aug 2004 07:04:03 +0000 (GMT) Received: from mail.otel.net (gw3.OTEL.net [212.36.8.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id E036843D31 for ; Fri, 20 Aug 2004 07:04:02 +0000 (GMT) (envelope-from tbyte@OTEL.net) Received: from dragon.otel.net ([212.36.8.135]) by mail.otel.net with esmtp (Exim 4.30; FreeBSD) id 1By3RP-0000Pv-Tw; Fri, 20 Aug 2004 10:03:59 +0300 Message-ID: <4125A25E.4050602@OTEL.net> Date: Fri, 20 Aug 2004 10:03:58 +0300 From: Iasen Kostov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040728 X-Accept-Language: en-us, en MIME-Version: 1.0 To: takawata@jp.freebsd.org References: <200408200549.OAA02607@axe-inc.co.jp> In-Reply-To: <200408200549.OAA02607@axe-inc.co.jp> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: How can I fake a device ? 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, 20 Aug 2004 07:04:03 -0000 takawata@jp.freebsd.org wrote: >In message <41257789.70508@OTEL.net>, Iasen Kostov wrote: > > >> Hi, >>I want to know is there a way to call *_probe (for device driver) with >>fake (PCI) device that does not exists in the system ? >>First of all a cant find how "struct device" is declared (i've searched >>even the compile/ dir) and second I think that I'll need to intercept >>pci_get_vendor and pci_get_device funcs with my own which should detect >>the fake device and thus will return vandor/device that I need to fake. >>I realy don't need anything else except _probe ... >> >> > >I have never tried such but grimpsed the PCI framework, >I propose the following, though I don't imagine why you want >to do so: > >Your driver have to contain DEVICE_IDENTIFY method >that calls device_add_child to allocate device_t object. >Then you allocate 'struct pci_devinfo' and initialize >pci_devinfo as you like. And you have to make your >driver as a module. Then a device object will show up on >the device tree on your system. > >You may want to have a look at pci_add_children@/sys/dev/pci/pci.c > > > I think I was not clear .. .sorry. I ment to lie the driver that some device (that is not realy plugged in the machine) exists. Doing so I can check if drivers _probe() func returns "OK" or not and by checking every device from /usr/share/misc/pci_vendors I could build device<->driver_file database. I've patched a bit /sys/dev/pci/pci.c like this: typedef uintptr_t *pci_fake_read_ivars_t(pcicfgregs *cfg); static pci_fake_read_ivars_t *pci_fake_read_ivars = NULL; int pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct pci_devinfo *dinfo; pcicfgregs *cfg = NULL; if(pci_fake_read_ivars && !strcmp("fake0", dev->nameunit)) { (*pci_fake_read_ivars)(cfg); } else { dinfo = device_get_ivars(child); cfg = &dinfo->cfg; } And when I load my module it will set pci_fake_read_ivars and will start to test drivers probe sending devices with nameunit set to "fake0" thus telling pci_read_ivar() to fake the return values by calling pci_fake_read_ivars() callback ... I think this is very messy ... I hope that it will work this way :) regards From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 08:53: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 C4FFB16A4CE for ; Fri, 20 Aug 2004 08:53:23 +0000 (GMT) Received: from axe-inc.co.jp (axegw.axe-inc.co.jp [61.199.217.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFF2D43D41 for ; Fri, 20 Aug 2004 08:53:22 +0000 (GMT) (envelope-from takawata@axe-inc.co.jp) Received: from localhost (localhost [127.0.0.1]) by axe-inc.co.jp (8.9.3+3.2W/3.7W) with SMTP id RAA05110; Fri, 20 Aug 2004 17:53:14 +0900 (JST) Message-Id: <200408200853.RAA05110@axe-inc.co.jp> X-Authentication-Warning: axegw.axe-inc.co.jp: localhost [127.0.0.1] didn't use HELO protocol To: Iasen Kostov From: takawata@jp.freebsd.org In-reply-to: Your message of "Fri, 20 Aug 2004 10:03:58 +0300." <4125A25E.4050602@OTEL.net> Date: Fri, 20 Aug 2004 17:53:14 +0900 Sender: takawata@axe-inc.co.jp cc: freebsd-hackers@freebsd.org Subject: Re: How can I fake a device ? 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, 20 Aug 2004 08:53:23 -0000 In message <4125A25E.4050602@OTEL.net>, Iasen Kostov wrote: >>> Hi, >>>I want to know is there a way to call *_probe (for device driver) with >>>fake (PCI) device that does not exists in the system ? >>>First of all a cant find how "struct device" is declared (i've searched >>>even the compile/ dir) and second I think that I'll need to intercept >>>pci_get_vendor and pci_get_device funcs with my own which should detect >>>the fake device and thus will return vandor/device that I need to fake. >>>I realy don't need anything else except _probe ... >>> >>> >> >>I have never tried such but grimpsed the PCI framework, >>I propose the following, though I don't imagine why you want >>to do so: >> >>Your driver have to contain DEVICE_IDENTIFY method >>that calls device_add_child to allocate device_t object. >>Then you allocate 'struct pci_devinfo' and initialize >>pci_devinfo as you like. And you have to make your >>driver as a module. Then a device object will show up on >>the device tree on your system. >> >>You may want to have a look at pci_add_children@/sys/dev/pci/pci.c >> >> >> >I think I was not clear .. .sorry. I ment to lie the driver that some >device (that is not realy plugged in the machine) exists. Doing so I can >check if drivers _probe() func returns "OK" >or not and by checking every device from /usr/share/misc/pci_vendors I >could build device<->driver_file database. Hmm, do you want to implement docking station or something? This is a part of my interest. >I've patched a bit /sys/dev/pci/pci.c like this: > >typedef uintptr_t *pci_fake_read_ivars_t(pcicfgregs *cfg); >static pci_fake_read_ivars_t *pci_fake_read_ivars = NULL; > >int >pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) >{ > struct pci_devinfo *dinfo; > pcicfgregs *cfg = NULL; > > if(pci_fake_read_ivars && !strcmp("fake0", dev->nameunit)) { > (*pci_fake_read_ivars)(cfg); > } else { > dinfo = device_get_ivars(child); > cfg = &dinfo->cfg; > } > >And when I load my module it will set pci_fake_read_ivars and will start >to test drivers probe sending devices with nameunit set to "fake0" thus >telling pci_read_ivar() to fake the return values by calling >pci_fake_read_ivars() callback ... I think this is very messy ... I hope >that it will work this way :) pci_read_ivar itself will not access real hardware: cache its value and simply use hardware register index as ivar index. So it is enough to initialize struct pci_devinfo then call device_set_ivar. Rather, there may be problem when pci_cfg_save()@sys/dev/pci/pci.c is called. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 09:10: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 AFCB116A4CE for ; Fri, 20 Aug 2004 09:10:37 +0000 (GMT) Received: from mail.otel.net (gw3.OTEL.net [212.36.8.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id 357AD43D2F for ; Fri, 20 Aug 2004 09:10:37 +0000 (GMT) (envelope-from tbyte@OTEL.net) Received: from dragon.otel.net ([212.36.8.135]) by mail.otel.net with esmtp (Exim 4.30; FreeBSD) id 1By5Pv-0003Mt-BW; Fri, 20 Aug 2004 12:10:35 +0300 Message-ID: <4125C00A.4080205@OTEL.net> Date: Fri, 20 Aug 2004 12:10:34 +0300 From: Iasen Kostov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040728 X-Accept-Language: en-us, en MIME-Version: 1.0 To: takawata@jp.freebsd.org, freebsd-hackers@freebsd.org References: <200408200853.RAA05110@axe-inc.co.jp> In-Reply-To: <200408200853.RAA05110@axe-inc.co.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: How can I fake a device ? 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, 20 Aug 2004 09:10:37 -0000 takawata@jp.freebsd.org wrote: >In message <4125A25E.4050602@OTEL.net>, Iasen Kostov wrote: > > > >>>> Hi, >>>>I want to know is there a way to call *_probe (for device driver) with >>>>fake (PCI) device that does not exists in the system ? >>>>First of all a cant find how "struct device" is declared (i've searched >>>>even the compile/ dir) and second I think that I'll need to intercept >>>>pci_get_vendor and pci_get_device funcs with my own which should detect >>>>the fake device and thus will return vandor/device that I need to fake. >>>>I realy don't need anything else except _probe ... >>>> >>>> >>>> >>>> >>>I have never tried such but grimpsed the PCI framework, >>>I propose the following, though I don't imagine why you want >>>to do so: >>> >>>Your driver have to contain DEVICE_IDENTIFY method >>>that calls device_add_child to allocate device_t object. >>>Then you allocate 'struct pci_devinfo' and initialize >>>pci_devinfo as you like. And you have to make your >>>driver as a module. Then a device object will show up on >>>the device tree on your system. >>> >>>You may want to have a look at pci_add_children@/sys/dev/pci/pci.c >>> >>> >>> >>> >>> >>I think I was not clear .. .sorry. I ment to lie the driver that some >>device (that is not realy plugged in the machine) exists. Doing so I can >>check if drivers _probe() func returns "OK" >>or not and by checking every device from /usr/share/misc/pci_vendors I >>could build device<->driver_file database. >> >> > >Hmm, do you want to implement docking station or something? >This is a part of my interest. > > > Don't know what you mean whit "docking station". I want to create framework for extracting info from every driver which device it can handle. Then create create conf for devd or kernel_driver_autoloader :) or something like that (e.g. windoze .inf database). >>I've patched a bit /sys/dev/pci/pci.c like this: >> >>typedef uintptr_t *pci_fake_read_ivars_t(pcicfgregs *cfg); >>static pci_fake_read_ivars_t *pci_fake_read_ivars = NULL; >> >>int >>pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) >>{ >> struct pci_devinfo *dinfo; >> pcicfgregs *cfg = NULL; >> >> if(pci_fake_read_ivars && !strcmp("fake0", dev->nameunit)) { >> (*pci_fake_read_ivars)(cfg); >> } else { >> dinfo = device_get_ivars(child); >> cfg = &dinfo->cfg; >> } >> >>And when I load my module it will set pci_fake_read_ivars and will start >>to test drivers probe sending devices with nameunit set to "fake0" thus >>telling pci_read_ivar() to fake the return values by calling >>pci_fake_read_ivars() callback ... I think this is very messy ... I hope >>that it will work this way :) >> >> > >pci_read_ivar itself will not access real hardware: cache its value and >simply use hardware register index as ivar index. >So it is enough to initialize >struct pci_devinfo then call device_set_ivar. Rather, there may be problem > when pci_cfg_save()@sys/dev/pci/pci.c is called. > > Thank a lot this will realy simplify the work ! :) I won't need to patch sys/dev/pci/pci.c this way. Thanks . From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 19 22:38: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 B10E016A4CE; Thu, 19 Aug 2004 22:38:28 +0000 (GMT) Received: from coverity.dreamhost.com (coverity.dreamhost.com [66.33.192.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B96143D46; Thu, 19 Aug 2004 22:38:28 +0000 (GMT) (envelope-from tedu@coverity.com) Received: from coverity.com (dsl093-171-098.sfo4.dsl.speakeasy.net [66.93.171.98]) by coverity.dreamhost.com (Postfix) with ESMTP id 4694990888; Thu, 19 Aug 2004 15:38:28 -0700 (PDT) Message-ID: <41252AC0.7060702@coverity.com> Date: Thu, 19 Aug 2004 15:33:36 -0700 From: Ted Unangst User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andre Oppermann References: <4123049E.9000900@coverity.com> <41250B09.6070006@freebsd.org> In-Reply-To: <41250B09.6070006@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 20 Aug 2004 12:29:44 +0000 cc: hackers@freebsd.org Subject: Re: too late null checks 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, 19 Aug 2004 22:38:28 -0000 Andre Oppermann wrote: > Did you run your entire tool on the FreeBSD tree or is this subset of the > available tests and checks? > It's a small sample of the larger whole. The whole thing isn't as interesting to look at yet, but I'm working on it. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 14:20: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 2C2C216A4CE for ; Fri, 20 Aug 2004 14:20:19 +0000 (GMT) Received: from mail.gulfgate-inc.com (mail.gulfgate-inc.com [64.1.98.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F3C743D53 for ; Fri, 20 Aug 2004 14:20:18 +0000 (GMT) (envelope-from mpf@inodes.us) Received: (qmail 4919 invoked by uid 85); 20 Aug 2004 14:22:54 -0000 Received: from 192.168.0.4 by mail.gulfgate-inc.com (envelope-from , uid 89) with qmail-scanner-1.23 (clamdscan: 0.75.1. spamassassin: 2.64. Clear:RC:1(192.168.0.4):. Processed in 0.081429 secs); 20 Aug 2004 14:22:54 -0000 X-Qmail-Scanner-Mail-From: mpf@inodes.us via mail.gulfgate-inc.com X-Qmail-Scanner: 1.23 (Clear:RC:1(192.168.0.4):. Processed in 0.081429 secs) Received: from unknown (HELO ?127.0.0.1?) (192.168.0.4) by 192.168.0.40 with SMTP; 20 Aug 2004 14:22:53 -0000 Message-ID: <412608A0.7030704@inodes.us> Date: Fri, 20 Aug 2004 09:20:16 -0500 From: Matt Freitag User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 To: anand@cs.uwaterloo.ca, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Network Packet drops in FreeBSD 5.2.1 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, 20 Aug 2004 14:20:19 -0000 Anand Subramanian wrote: > Hi All, > I am using an Intel Celeron box (single CPU,1.7GHz, 495MB real and 472 MB > avail memory, FreeBSD 5.2.1 #15 release), to run a daemon process which > shares a circular queue/buffer with the kernel. The daemon drains objects > off the front of the queue while the queue objects are populated by the > protocol processing function say, XXX_input() in the kernel, called by > ip_input(). If the front and rear indices of the shared buffer are equal > then the protocol stack drops the packet alright. > > This model works fine for packet (60-64 bytes in size) input rates upto > 11500 packets/sec, after which packets are lost. The machine running the > daemon uses the SiS 900 NIC, 10/100Mbps. > > > Try a nic that has hardware support for checksum and fragmentation offloading. If I'm not mistaken that sis900 is an integrated nic? It was somewhat flaky for me.. If you're operating at 100Mbps, your line rate doesn't become saturated at 12kpps. In fact, 100Mbps isn't saturated until around ~140kpps from my own lab results. > The packet loss was detected using the "netstat -I sis0" command, run > both > on starting the daemon and upon shutting the daemon down. The Ipkts field > in the netstat output should indicate the number of packets received by > the interface in question.. > > With an appropriate chosen value for the shared buffer length, no packets > are dropped because the shared queue is full. Hence packets seem to be > dropped at the adapter level. The surprising part seems to be that though > packets are being dropped/lost, top shows a ~70% idle system with peak > interrupt time of ~25%. > > The daemon uses a "hacked" version of the select() call with a timeout > value. The XXX_input() protocol processing function signals the > thread/KSE > waiting on the hacked select() call as soon as it sees that there are > packets in the shared buffer(shared between the daemon and the kernel). > > Question is : > > 1. Is top really accurate in reporting all stats at such workloads, or > input pkt rates? Can the %Idle time reported by top be trusted? > > I've seen some exceptions to the rule, yet overall it seems accurate - but I've never read the inter workings of top, so I'm no expert. > 2. At increasing network input loads (12000 pkts/sec), much of the system > time maybe spent in the hardware interrupt handler, ip processing > functions. With the user daemon calling select(), any time spent in the > select() call would be charged to the daemon's timeslice. Would it be > fairly scheduled to run. It should be(of course depending on the RPLs), > but wanted to confirm this. > > I'm not sure if it's just the NIC you're using, but you should probably enable device polling, perhaps even enable fastforwarding. > 3. When ip_drain() is called and it calls the DEQUEUE macro, it acquires > Giant. DOes this mean other netisr's and handlers are disabled so that > the > queue gets emptied in a sort of batch-mode behavior? > > 4. I am trying different clock speeds by changing kern.hz in loader.conf. > Doesn't seem to help but I am still looking into this. > > When network packets are being dropped at the interface level, is it > really necessary for the system to be ~0% idle??? > > > I'm sure it's all interrupts, again a better NIC could help :> > Any other input is greatly appreciated. > > Best, > Anand > > > > HTH, -mpf > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" > > > From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 15:23:49 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 9BCD116A4CE; Fri, 20 Aug 2004 15:23:49 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 041A943D31; Fri, 20 Aug 2004 15:23:49 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i7KFNlio020036; Fri, 20 Aug 2004 17:23:47 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: current@freebsd.org, hackers@freebsd.org From: Poul-Henning Kamp Date: Fri, 20 Aug 2004 17:23:47 +0200 Message-ID: <20035.1093015427@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Subject: [TEST] rewritten floppy 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: Fri, 20 Aug 2004 15:23:49 -0000 Please help test this rewrite of the floppy driver so it can qualify to get into 5.3. Can the PC98 coders please try to create a fdc_cbus.c so we can use the same driver on PC98 ? If anybody wants to play with 2.88M floppies, I belive I found at least one bug which would have prevented it from working with the old driver. If you get into trouble with this driver, please set: sysctl debug.fdc.debugflags=255 and recreate the problem, then send me the stuff it prints. Thanks! Poul-Henning phk 2004-08-20 15:14:25 UTC FreeBSD src repository Modified files: sys/sys fdcio.h usr.sbin/fdcontrol fdcontrol.c usr.sbin/fdformat fdformat.c usr.sbin/fdread fdutil.c sys/dev/fdc fdc.c fdc_acpi.c fdc_isa.c fdc_pccard.c fdcvar.h Log: Rewrite of the floppy driver to make it MPsafe & GEOM friendly: [...] -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 18:15:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4578216A4CE for ; Fri, 20 Aug 2004 18:15:32 +0000 (GMT) Received: from coverity.dreamhost.com (coverity.dreamhost.com [66.33.192.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31EF343D1F for ; Fri, 20 Aug 2004 18:15:32 +0000 (GMT) (envelope-from tedu@coverity.com) Received: from coverity.com (dsl093-171-098.sfo4.dsl.speakeasy.net [66.93.171.98]) by coverity.dreamhost.com (Postfix) with ESMTP id DF47A90887 for ; Fri, 20 Aug 2004 11:15:31 -0700 (PDT) Message-ID: <41263E77.5040500@coverity.com> Date: Fri, 20 Aug 2004 11:09:59 -0700 From: Ted Unangst User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 21 Aug 2004 02:56:03 +0000 Subject: use after free bugs 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, 20 Aug 2004 18:15:32 -0000 these are results from running Coverity's analysis over Freebsd 4.10 kernel. two improper loops: if_ef.c:566 and atapi-all.c ng_socket.c: possible double free of resp 815 and 870, depending on caller context. is this possible? if_bfe.c: double call to bfe_release_resources will free lots of stuff twice on failure. aha_isa.c: aha_isa_attach: aha_free free "aha", can't use it afterwards, lots of examples. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 18:25: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 C729816A4CE for ; Fri, 20 Aug 2004 18:25:58 +0000 (GMT) Received: from coverity.dreamhost.com (coverity.dreamhost.com [66.33.192.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id B905D43D2F for ; Fri, 20 Aug 2004 18:25:58 +0000 (GMT) (envelope-from tedu@coverity.com) Received: from coverity.com (dsl093-171-098.sfo4.dsl.speakeasy.net [66.93.171.98]) by coverity.dreamhost.com (Postfix) with ESMTP id 81BE090887 for ; Fri, 20 Aug 2004 11:25:58 -0700 (PDT) Message-ID: <412640EA.4090403@coverity.com> Date: Fri, 20 Aug 2004 11:20:26 -0700 From: Ted Unangst User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 21 Aug 2004 02:56:03 +0000 Subject: malloc null bugs 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, 20 Aug 2004 18:25:58 -0000 Found during analysis with Coverity's tools. FreeBSD 4.10 atapi-cd.c, everywhere. I understand there was some question of not being to deal with failure gracefully in ata, but many of these are in functions like ioctl which can easily report errors. igmp.c:find_rti mii.c:mii_phy_probe. device_add_child can also fail, and is not checked. pst-raid.c:pst_add_raid if_dc.c:dc_decode_leaf_mii if_ti:ti_setmulti if_sk.c:sk_vpd_read uipc_syscalls.c:sf_buf_init mpt.c:mpt_send_port_enable, mpt_get_request can fail if_wi_pci.c:attach, bus_alloc_resource may fail From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 19:41: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 3638C16A4CE for ; Fri, 20 Aug 2004 19:41:43 +0000 (GMT) Received: from coverity.dreamhost.com (coverity.dreamhost.com [66.33.192.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E03D43D58 for ; Fri, 20 Aug 2004 19:41:43 +0000 (GMT) (envelope-from tedu@coverity.com) Received: from coverity.com (dsl093-171-098.sfo4.dsl.speakeasy.net [66.93.171.98]) by coverity.dreamhost.com (Postfix) with ESMTP id A789190887 for ; Fri, 20 Aug 2004 12:41:42 -0700 (PDT) Message-ID: <412652AA.5020308@coverity.com> Date: Fri, 20 Aug 2004 12:36:10 -0700 From: Ted Unangst User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 21 Aug 2004 02:56:03 +0000 Subject: off by one bounds 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, 20 Aug 2004 19:41:43 -0000 errors in freebsd 4.10 found by Coverity's analysis. awi_wep.c:awi_wep_setalgo, algo == sizeof svr4_signal.c:SVR4_NSIG one larger than TBLSIZ linprocfs_misc.c:linprocfs_doprocstatus, p_stat == sizeof ibcs2_msg.c:ibcs2_poll, fd == FD_SETSIZE if_ray.c:ray_rx_mgt_info, len == NWID_LEN ciss.c:ciss_cam_action_io, target == CISS_MAX_LOGICAL in6.c:in6_are_prefix_equal len == 128 in6.c:in6_prefixlen2mask, len == 128 ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 07:28:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04FBD16A4CE for ; Sat, 21 Aug 2004 07:28:55 +0000 (GMT) Received: from pimout1-ext.prodigy.net (pimout1-ext.prodigy.net [207.115.63.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id B656043D2F for ; Sat, 21 Aug 2004 07:28:54 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-68-124-233-133.dsl.snfc21.pacbell.net [68.124.233.133])i7L7Sqhh061584; Sat, 21 Aug 2004 03:28:52 -0400 Message-ID: <4126F9B3.8050900@elischer.org> Date: Sat, 21 Aug 2004 00:28:51 -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: Ted Unangst References: <41263E77.5040500@coverity.com> In-Reply-To: <41263E77.5040500@coverity.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: use after free bugs 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, 21 Aug 2004 07:28:55 -0000 Ted Unangst wrote: > these are results from running Coverity's analysis over Freebsd 4.10 > kernel. > two improper loops: > if_ef.c:566 and atapi-all.c > > ng_socket.c: possible double free of resp 815 and 870, depending on > caller context. is this possible? > I'm not seeing it.. Can you show the lines in the version that is being examined? (So I can be sure I'm looking at the right code) (and how do I interpret the above report? 815 and 870 are freeing different things.) > if_bfe.c: double call to bfe_release_resources will free lots of stuff > twice on failure. > > aha_isa.c: aha_isa_attach: aha_free free "aha", can't use it > afterwards, lots of examples. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 08:08: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 2770E16A4CE for ; Sat, 21 Aug 2004 08:08:45 +0000 (GMT) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DAA443D2D for ; Sat, 21 Aug 2004 08:08:44 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received-SPF: pass (mp2.macomnet.net: domain of maxim@macomnet.ru designates 127.0.0.1 as permitted sender) receiver=mp2.macomnet.net; client_ip=127.0.0.1; envelope-from=maxim@macomnet.ru; Received: from localhost (xuqz761l@localhost [127.0.0.1]) by mp2.macomnet.net (8.12.11/8.12.11) with ESMTP id i7L88eJn034587; Sat, 21 Aug 2004 12:08:40 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Sat, 21 Aug 2004 12:08:40 +0400 (MSD) From: Maxim Konovalov To: Ted Unangst In-Reply-To: <412652AA.5020308@coverity.com> Message-ID: <20040821120624.I34489@mp2.macomnet.net> References: <412652AA.5020308@coverity.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: off by one bounds 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, 21 Aug 2004 08:08:45 -0000 Hi Ted, On Fri, 20 Aug 2004, 12:36-0700, Ted Unangst wrote: > errors in freebsd 4.10 found by Coverity's analysis. [...] > ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 This one is not a bug really. If i == sizeof then mtutab[i] == 0 and we return 0 at the line 818. Or I miss something? -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 09:00: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 1849C16A4D2 for ; Sat, 21 Aug 2004 09:00:06 +0000 (GMT) Received: from out008.verizon.net (out008pub.verizon.net [206.46.170.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E39E43D62 for ; Sat, 21 Aug 2004 09:00:03 +0000 (GMT) (envelope-from skip.ford@verizon.net) Received: from pool-70-17-33-167.pskn.east.verizon.net ([70.17.33.167]) by out008.verizon.netESMTP <20040821090002.QAPL8960.out008.verizon.net@pool-70-17-33-167.pskn.east.verizon.net>; Sat, 21 Aug 2004 04:00:02 -0500 Date: Sat, 21 Aug 2004 05:00:01 -0400 From: Skip Ford To: Maxim Konovalov Message-ID: <20040821090001.GB593@lucy.pool-70-17-33-167.pskn.east.verizon.net> References: <412652AA.5020308@coverity.com> <20040821120624.I34489@mp2.macomnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040821120624.I34489@mp2.macomnet.net> User-Agent: Mutt/1.4.2.1i X-Authentication-Info: Submitted using SMTP AUTH at out008.verizon.net from [70.17.33.167] at Sat, 21 Aug 2004 04:00:02 -0500 cc: hackers@freebsd.org cc: Ted Unangst Subject: Re: off by one bounds 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, 21 Aug 2004 09:00:06 -0000 Maxim Konovalov wrote: > On Fri, 20 Aug 2004, 12:36-0700, Ted Unangst wrote: > >> errors in freebsd 4.10 found by Coverity's analysis. > >> ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 > > If i == sizeof then mtutab[i] == 0 If "i == sizeof" then mtutab[i] is out of bounds, off by one. There is no mtutab[sizeof mtutab / sizeof mtutab[0]]. This isn't specific to RELENG_4. -- Skip From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 09:19:48 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 6914316A4CE for ; Sat, 21 Aug 2004 09:19:48 +0000 (GMT) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7319C43D2D for ; Sat, 21 Aug 2004 09:19:47 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received-SPF: pass (mp2.macomnet.net: domain of maxim@macomnet.ru designates 127.0.0.1 as permitted sender) receiver=mp2.macomnet.net; client_ip=127.0.0.1; envelope-from=maxim@macomnet.ru; Received: from localhost (tpg04ddv@localhost [127.0.0.1]) by mp2.macomnet.net (8.12.11/8.12.11) with ESMTP id i7L9JiBg034855; Sat, 21 Aug 2004 13:19:44 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Sat, 21 Aug 2004 13:19:44 +0400 (MSD) From: Maxim Konovalov To: Skip Ford In-Reply-To: <20040821090001.GB593@lucy.pool-70-17-33-167.pskn.east.verizon.net> Message-ID: <20040821131924.U34847@mp2.macomnet.net> References: <412652AA.5020308@coverity.com> <20040821120624.I34489@mp2.macomnet.net> <20040821090001.GB593@lucy.pool-70-17-33-167.pskn.east.verizon.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org cc: Ted Unangst Subject: Re: off by one bounds 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, 21 Aug 2004 09:19:48 -0000 On Sat, 21 Aug 2004, 05:00-0400, Skip Ford wrote: > Maxim Konovalov wrote: > > On Fri, 20 Aug 2004, 12:36-0700, Ted Unangst wrote: > > > >> errors in freebsd 4.10 found by Coverity's analysis. > > > >> ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 > > > > If i == sizeof then mtutab[i] == 0 > > If "i == sizeof" then mtutab[i] is out of bounds, off by one. > There is no mtutab[sizeof mtutab / sizeof mtutab[0]]. > > This isn't specific to RELENG_4 Ah, yes, sorry. -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 11:07: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 C515916A4CE for ; Sat, 21 Aug 2004 11:07:53 +0000 (GMT) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id D78DB43D1D for ; Sat, 21 Aug 2004 11:07:52 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received-SPF: pass (mp2.macomnet.net: domain of maxim@macomnet.ru designates 127.0.0.1 as permitted sender) receiver=mp2.macomnet.net; client_ip=127.0.0.1; envelope-from=maxim@macomnet.ru; Received: from localhost (i1xxom2y@localhost [127.0.0.1]) by mp2.macomnet.net (8.12.11/8.12.11) with ESMTP id i7LB7np3035132; Sat, 21 Aug 2004 15:07:49 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Sat, 21 Aug 2004 15:07:49 +0400 (MSD) From: Maxim Konovalov To: Skip Ford In-Reply-To: <20040821131924.U34847@mp2.macomnet.net> Message-ID: <20040821150427.O35076@mp2.macomnet.net> References: <412652AA.5020308@coverity.com> <20040821120624.I34489@mp2.macomnet.net> <20040821090001.GB593@lucy.pool-70-17-33-167.pskn.east.verizon.net> <20040821131924.U34847@mp2.macomnet.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org cc: Ted Unangst Subject: Re: off by one bounds 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, 21 Aug 2004 11:07:53 -0000 On Sat, 21 Aug 2004, 13:19+0400, Maxim Konovalov wrote: > On Sat, 21 Aug 2004, 05:00-0400, Skip Ford wrote: > > > Maxim Konovalov wrote: > > > On Fri, 20 Aug 2004, 12:36-0700, Ted Unangst wrote: > > > > > >> errors in freebsd 4.10 found by Coverity's analysis. > > > > > >> ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 > > > > > > If i == sizeof then mtutab[i] == 0 > > > > If "i == sizeof" then mtutab[i] is out of bounds, off by one. > > There is no mtutab[sizeof mtutab / sizeof mtutab[0]]. > > > > This isn't specific to RELENG_4 After the second thought I still think it is not a error. mtu is always >= than the minimal value in mtutab[] that is why i is always less than (sizeof mtutab) / sizeof mtutab[0]). What do you think? -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 12:01: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 8BA1016A4CE for ; Sat, 21 Aug 2004 12:01:28 +0000 (GMT) Received: from out009.verizon.net (out009pub.verizon.net [206.46.170.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23C8F43D2D for ; Sat, 21 Aug 2004 12:01:28 +0000 (GMT) (envelope-from skip.ford@verizon.net) Received: from pool-70-17-33-17.pskn.east.verizon.net ([70.17.33.17]) by out009.verizon.netESMTP <20040821120127.UFNK23440.out009.verizon.net@pool-70-17-33-17.pskn.east.verizon.net>; Sat, 21 Aug 2004 07:01:27 -0500 Date: Sat, 21 Aug 2004 08:01:26 -0400 From: Skip Ford To: Maxim Konovalov Message-ID: <20040821120126.GA586@lucy.pool-70-17-33-167.pskn.east.verizon.net> References: <412652AA.5020308@coverity.com> <20040821120624.I34489@mp2.macomnet.net> <20040821090001.GB593@lucy.pool-70-17-33-167.pskn.east.verizon.net> <20040821131924.U34847@mp2.macomnet.net> <20040821150427.O35076@mp2.macomnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040821150427.O35076@mp2.macomnet.net> User-Agent: Mutt/1.4.2.1i X-Authentication-Info: Submitted using SMTP AUTH at out009.verizon.net from [70.17.33.17] at Sat, 21 Aug 2004 07:01:27 -0500 cc: hackers@freebsd.org cc: Ted Unangst Subject: Re: off by one bounds 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, 21 Aug 2004 12:01:28 -0000 Maxim Konovalov wrote: > On Sat, 21 Aug 2004, 13:19+0400, Maxim Konovalov wrote: > > On Sat, 21 Aug 2004, 05:00-0400, Skip Ford wrote: > > > Maxim Konovalov wrote: > > > > On Fri, 20 Aug 2004, 12:36-0700, Ted Unangst wrote: > > > > > > > > > errors in freebsd 4.10 found by Coverity's analysis. > > > > > > > > > ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 > > > > > > > > If i == sizeof then mtutab[i] == 0 > > > > > > If "i == sizeof" then mtutab[i] is out of bounds, off by one. > > > There is no mtutab[sizeof mtutab / sizeof mtutab[0]]. > > > > > > This isn't specific to RELENG_4 > > After the second thought I still think it is not a error. mtu is > always >= than the minimal value in mtutab[] that is why i is always > less than (sizeof mtutab) / sizeof mtutab[0]). What do you think? I have no idea if it can actually be triggered. Callers may never invoke it with the necessary parameters but if they do, the function doesn't handle it. If mtu is < 0 and dir >= 0 then mtutab is accessed out of bounds. -- Skip From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 20:02: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 6C5F716A4CE; Sat, 21 Aug 2004 20:02:05 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E77243D1F; Sat, 21 Aug 2004 20:02:05 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 55A525C8D4; Sat, 21 Aug 2004 13:02:05 -0700 (PDT) Date: Sat, 21 Aug 2004 13:02:05 -0700 From: Alfred Perlstein To: hackers@freebsd.org, phk@freebsd.org Message-ID: <20040821200205.GE26612@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: sysctl hacks 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, 21 Aug 2004 20:02:05 -0000 I'm doing some work that requires that I have a sysctl structure be passed around, but inside that structure are several pointers I may need to dereference. Basically: struct mysysctldata { .... (data here) void *moredata; size_t morelen; }; What is the proper way of sysctl'ing IN the data from moredata? I need to make a copy of the sysctl req, but... I'm not sure what to initialize the 'lock' member to. Any hints would be appeciated. -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684 From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 20:29: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 A297716A4CE; Sat, 21 Aug 2004 20:29:44 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id E949B43D46; Sat, 21 Aug 2004 20:29:43 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i7LKTf38046720; Sat, 21 Aug 2004 22:29:42 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Alfred Perlstein From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 21 Aug 2004 13:02:05 PDT." <20040821200205.GE26612@elvis.mu.org> Date: Sat, 21 Aug 2004 22:29:41 +0200 Message-ID: <46719.1093120181@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: hackers@freebsd.org Subject: Re: sysctl hacks 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, 21 Aug 2004 20:29:44 -0000 In message <20040821200205.GE26612@elvis.mu.org>, Alfred Perlstein writes: >I'm doing some work that requires that I have a sysctl structure >be passed around, but inside that structure are several pointers I >may need to dereference. > >Basically: > >struct mysysctldata { > .... (data here) > void *moredata; > size_t morelen; >}; > >What is the proper way of sysctl'ing IN the data from moredata? > >I need to make a copy of the sysctl req, but... I'm not sure what >to initialize the 'lock' member to. Just use the SYSCTL_IN() and ..._OUT() functions. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.