From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 01:09:58 2005 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 C4AE416A4CE for ; Sun, 20 Feb 2005 01:09:58 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACD6B43D2F for ; Sun, 20 Feb 2005 01:09:55 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id j1K19mZb005930; Sun, 20 Feb 2005 11:39:48 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sun, 20 Feb 2005 11:39:35 +1030 User-Agent: KMail/1.7.92 References: <20050219180907.GA53773@ussenterprise.ufp.org> In-Reply-To: <20050219180907.GA53773@ussenterprise.ufp.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2481705.hUTB6SufPp"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502201139.43293.doconnor@gsoft.com.au> X-Spam-Score: -5.4 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) Subject: Re: SSL connections not working. 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, 20 Feb 2005 01:09:58 -0000 --nextPart2481705.hUTB6SufPp Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sun, 20 Feb 2005 04:39, Leo Bicknell wrote: > I have a FreeBSD 4.8-RELEASE box, with saslv2 (from the ports tree) > and sendmail 8.13.3 (built by hand) installed. One of the things > they are configured to do is accept connections on port 465, that > is a native SSLv3 connection. This setup has been working for some > time. > > All the sudden clients (Outlook, Mulberry) that connect to port 465 > simply hang after the connection is made. Mail is never sent. > There is nothing in the sendmail logs, and the clients report a > generic timeout error. I tried reinstalling sendmail, reinstalling > sasl, and creating new certificates, and nothing changes the behavior. > I can connect (locally) with openssl's s_client and get what appears > to be a normal and correct sendmail dialog. Can you tcpdump and see what happens? Can you connect with s_client from a remote system? =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 --nextPart2481705.hUTB6SufPp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCF+NX5ZPcIHs/zowRAiUDAJ99Yv1sUd9NdHAdKSPT52tiVgQdXwCggU80 CmCbqgxI8ImTeclgPSYgtXY= =iZdl -----END PGP SIGNATURE----- --nextPart2481705.hUTB6SufPp-- From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 05:42:55 2005 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 18EBF16A4CE for ; Sun, 20 Feb 2005 05:42:55 +0000 (GMT) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27DF943D48 for ; Sun, 20 Feb 2005 05:42:54 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1K5gqGv019621 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 20 Feb 2005 16:42:52 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1K5gp7l082928 for ; Sun, 20 Feb 2005 16:42:51 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j1K5gpLO082927 for freebsd-hackers@freebsd.org; Sun, 20 Feb 2005 16:42:51 +1100 (EST) (envelope-from pjeremy) Date: Sun, 20 Feb 2005 16:42:51 +1100 From: Peter Jeremy To: freebsd-hackers@freebsd.org Message-ID: <20050220054251.GB28983@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i Subject: Signalling a process from a INTR_FAST handler 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, 20 Feb 2005 05:42:55 -0000 I have a hardware interrupt handler that has to forward a signal to userland and that I'd like to mark INTR_FAST. AFAIK, the normal way to forward a signal is: if ((p = pfind(sc->pid_to_signal)) != NULL) { psignal(p, SIGUSR2); PROC_UNLOCK(p); } But pfind(9) does a PROC_LOCK() which implies it can sleep and therefore can't be used by an INTR_FAST handler. Firstly, am I correct? If so, is there an alternative approach I can use? -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 07:36:25 2005 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 581DE16A4CE for ; Sun, 20 Feb 2005 07:36: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 4289643D31 for ; Sun, 20 Feb 2005 07:36:22 +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 j1K7aHoG010051; Sun, 20 Feb 2005 18:06:18 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sun, 20 Feb 2005 18:05:36 +1030 User-Agent: KMail/1.7.92 References: <20050220054251.GB28983@cirb503493.alcatel.com.au> In-Reply-To: <20050220054251.GB28983@cirb503493.alcatel.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3245070.EYrDeGpbY3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502201805.43307.doconnor@gsoft.com.au> X-Spam-Score: -5.1 () IN_REP_TO,MIME_LONG_LINE_QP,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Peter Jeremy Subject: Re: Signalling a process from a INTR_FAST handler 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, 20 Feb 2005 07:36:25 -0000 --nextPart3245070.EYrDeGpbY3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sun, 20 Feb 2005 16:12, Peter Jeremy wrote: > I have a hardware interrupt handler that has to forward a signal to > userland and that I'd like to mark INTR_FAST. AFAIK, the normal way > to forward a signal is: > if ((p =3D pfind(sc->pid_to_signal)) !=3D NULL) { > psignal(p, SIGUSR2); > PROC_UNLOCK(p); > } > > But pfind(9) does a PROC_LOCK() which implies it can sleep and therefore > can't be used by an INTR_FAST handler. > > Firstly, am I correct? If so, is there an alternative approach I can use? I think you are, and I think the only way to do it is to schedule another=20 kernel [heavy] thread to do the wakeup. =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 --nextPart3245070.EYrDeGpbY3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCGD3P5ZPcIHs/zowRApNPAJ4osMseZ+cUq/nMBhhbnbmiiuqXSACeOTa0 xWcg0/3Dt4vC4bk4T5GehXQ= =pRNJ -----END PGP SIGNATURE----- --nextPart3245070.EYrDeGpbY3-- From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 14:40:32 2005 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 5D84916A4CE for ; Sun, 20 Feb 2005 14:40:32 +0000 (GMT) Received: from agava.mipt.ru (ofc2.agava.net [81.5.88.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8579F43D5C for ; Sun, 20 Feb 2005 14:40:31 +0000 (GMT) (envelope-from rzhe@agava.com) Received: by agava.mipt.ru (Postfix, from userid 426) id 647239DA7E6; Sun, 20 Feb 2005 17:39:58 +0300 (MSK) Received: from mailhub (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 340699DA7DF for ; Sun, 20 Feb 2005 17:39:58 +0300 (MSK) Received: from rzhe.agava-dubna.local (unknown [213.33.195.194]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by agava.mipt.ru (Postfix) with ESMTP id DF26D9DA7E7 for ; Sun, 20 Feb 2005 17:39:57 +0300 (MSK) Date: Sun, 20 Feb 2005 17:40:28 +0300 From: Dmitry Agaphonov To: freebsd-hackers@freebsd.org Message-Id: <20050220174028.6efc483d.rzhe@agava.com> In-Reply-To: <20050209155136.GC65523@green.homeunix.org> References: <20050209173625.29d50ffd.rzhe@agava.com> <20050209144924.GB65523@green.homeunix.org> <20050209183952.30f4c5b6.rzhe@agava.com> <20050209155136.GC65523@green.homeunix.org> Organization: AGAVA Software X-Mailer: Sylpheed version 0.9.4claws (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: kqueue & pthread 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, 20 Feb 2005 14:40:32 -0000 On Wed, 9 Feb 2005 10:51:36 -0500 Brian Fundakowski Feldman wrote: BFF> The LinuxThreads library seems to be the best-supported way. I don't think BFF> that there should be legal/licensing issues using it. Unfortunatelly, I can't use the LinuxThreads library, it simply does not compile on FreeBSD 4.10 (and I assume that on latest 4.x too) with gcc-3.4.4. Errors appear when it's building code from /usr/src tree with the newer compiler. FreeBSD 4.x is a mandatory target platform and using gcc-3.4 is a strong wish. So, I'm going to have kernel threads via rfork_thread(3) and the main question I stuck on is which libc functions I need to wrap to make them thread-safe and reentrant on multiprocessor systems, since rfork_thread(3)s are created with RFMEM flag and libc_r is not used. Could one give ideas or point where to read? Thanks! From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 15:10:12 2005 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 C481E16A4CE for ; Sun, 20 Feb 2005 15:10:12 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17F2B43D41 for ; Sun, 20 Feb 2005 15:10:10 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j1KFAh1n036388; Sun, 20 Feb 2005 08:10:48 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4218A7DB.1050705@samsco.org> Date: Sun, 20 Feb 2005 08:08:11 -0700 From: Scott User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Daniel O'Connor" References: <20050220054251.GB28983@cirb503493.alcatel.com.au> <200502201805.43307.doconnor@gsoft.com.au> In-Reply-To: <200502201805.43307.doconnor@gsoft.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org cc: freebsd-hackers@freebsd.org cc: Peter Jeremy Subject: Re: Signalling a process from a INTR_FAST handler 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, 20 Feb 2005 15:10:12 -0000 Daniel O'Connor wrote: > On Sun, 20 Feb 2005 16:12, Peter Jeremy wrote: > >>I have a hardware interrupt handler that has to forward a signal to >>userland and that I'd like to mark INTR_FAST. AFAIK, the normal way >>to forward a signal is: >> if ((p = pfind(sc->pid_to_signal)) != NULL) { >> psignal(p, SIGUSR2); >> PROC_UNLOCK(p); >> } >> >>But pfind(9) does a PROC_LOCK() which implies it can sleep and therefore >>can't be used by an INTR_FAST handler. >> >>Firstly, am I correct? If so, is there an alternative approach I can use? > > > I think you are, and I think the only way to do it is to schedule another > kernel [heavy] thread to do the wakeup. > You can shift the operation off to a fast taskqueue. This assumes that latency between the interrupt and the signal delivery is not critical. Scott From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 16:22:17 2005 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 4FEA316A4CE for ; Sun, 20 Feb 2005 16:22:17 +0000 (GMT) Received: from f21.mail.ru (f21.mail.ru [194.67.57.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id F247543D1D for ; Sun, 20 Feb 2005 16:22:14 +0000 (GMT) (envelope-from shmukler@mail.ru) Received: from mail by f21.mail.ru with local id 1D2tqX-0003GO-00 for freebsd-hackers@freebsd.org; Sun, 20 Feb 2005 19:22:13 +0300 Received: from [24.185.245.107] by win.mail.ru with HTTP; Sun, 20 Feb 2005 19:22:13 +0300 From: Igor Shmukler To: freebsd-hackers@freebsd.org Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [24.185.245.107] Date: Sun, 20 Feb 2005 19:22:13 +0300 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: Subject: vn_fullpath() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Igor Shmukler List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2005 16:22:17 -0000 Hello, I was wondering if anyone has figured a way to make vn_fullpath() reliable? Perhaps there is another approach to attacking this problem. Here is what I need to accomplish: I need to be able to determine dynamic linker, shared libraries or executable name for a specific process. The alternative to vn_fullpath() is intercepting calls, however I need an interpreter name in case of a script. The problem with name cache is: a. name has to be in the cache b. hardlinks cause vnodes with multiple names This must be a common problem so I was curious whether there is a solution. If anyone has any experience making this work, please advise. Thank you, Igor. From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 16:23:37 2005 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 F22A616A4CF for ; Sun, 20 Feb 2005 16:23:36 +0000 (GMT) Received: from house.arach.net.au (house1.arach.net.au [203.30.44.84]) by mx1.FreeBSD.org (Postfix) with SMTP id 7FBC343D1D for ; Sun, 20 Feb 2005 16:23:32 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 24588 invoked from network); 20 Feb 2005 16:23:01 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house1.arach.net.au with SMTP for ; 20 Feb 2005 16:23:01 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1KGOvfL008996 for ; Mon, 21 Feb 2005 00:24:58 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.1.0]); Mon, 21 Feb 2005 00:22:56 +0800 Message-ID: <4218B960.1050403@kaqelectronics.dyndns.org> Date: Mon, 21 Feb 2005 00:22:56 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed Subject: Error in my C programming 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, 20 Feb 2005 16:23:37 -0000 Hi Guys, Here is a section of my code: *** Wtrend_Drivers.c *** void Reset_Network (unsigned char Network) { Length = 0x00; //Length = 0 as we are not sending any data with this command Receiver = 0x00; //Dummy Value for receiver, Node takes prefferance Node = 0xFF; //Node addy of 255 is broadcast to all nodes Command = Reset; //Command we want Make_Packet_Send(Head , Length, Network, Receiver, Node, Command, p_Data); } *** Wtrend_Drivers.h *** unsigned char Length , Network , Receiver , Node , Command = 0x00; //Some Variables These are some of the errors I get in pairs for each of the above variables: Wtrend_Drivers.c:15: conflicting types for `Receiver' Wtrend_Drivers.h:9: previous declaration of `Receiver' I am at a loss as to why I am getting these errors, BTW this code compiles fine on my AVR (Atmel uC) but I need for a current app to use them under *nix. Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 17:31:55 2005 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 1815916A4CE for ; Sun, 20 Feb 2005 17:31:55 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F78343D1F for ; Sun, 20 Feb 2005 17:31:54 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id j1KHTEvl077947; Sun, 20 Feb 2005 10:29:14 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 20 Feb 2005 10:29:16 -0700 (MST) Message-Id: <20050220.102916.39467732.imp@bsdimp.com> To: PeterJeremy@optushome.com.au From: "M. Warner Losh" In-Reply-To: <20050220054251.GB28983@cirb503493.alcatel.com.au> References: <20050220054251.GB28983@cirb503493.alcatel.com.au> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Signalling a process from a INTR_FAST handler 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, 20 Feb 2005 17:31:55 -0000 In message: <20050220054251.GB28983@cirb503493.alcatel.com.au> Peter Jeremy writes: : I have a hardware interrupt handler that has to forward a signal to : userland and that I'd like to mark INTR_FAST. AFAIK, the normal way : to forward a signal is: : if ((p = pfind(sc->pid_to_signal)) != NULL) { : psignal(p, SIGUSR2); : PROC_UNLOCK(p); : } : : But pfind(9) does a PROC_LOCK() which implies it can sleep and therefore : can't be used by an INTR_FAST handler. : : Firstly, am I correct? If so, is there an alternative approach I can use? I've been storing td->td_proc in my softc and using that to signal the process. However, I don't know if you can call psignal without the process being locked... Hmmm, the big 'PROC_LOCK_ASSERT()' says that you can't. And the routines that psignal calls also do the PROC_LOCK_ASSERT... You may be stuck using some kind of helper mechanism to accomplish this (wakeup another thread and send the signal from there, there are many variations on this theme). Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 17:38:36 2005 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 88C6816A4CE for ; Sun, 20 Feb 2005 17:38:36 +0000 (GMT) Received: from smtpout-1.priv.cc.uic.edu (smtpout-1.cc.uic.edu [128.248.155.232]) by mx1.FreeBSD.org (Postfix) with SMTP id 0296743D2F for ; Sun, 20 Feb 2005 17:38:36 +0000 (GMT) (envelope-from zholla1@uic.edu) Received: (qmail 9901 invoked from network); 20 Feb 2005 11:38:35 -0600 Received: from icarus.cc.uic.edu (128.248.155.80) by smtpout-1.cc.uic.edu with SMTP; 20 Feb 2005 11:38:35 -0600 Date: Sun, 20 Feb 2005 11:38:35 -0600 (CST) From: Zera William Holladay X-X-Sender: zholla1@icarus.cc.uic.edu To: freebsd-hackers@freebsd.org In-Reply-To: <4218B960.1050403@kaqelectronics.dyndns.org> Message-ID: References: <4218B960.1050403@kaqelectronics.dyndns.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: Error in my C programming 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, 20 Feb 2005 17:38:36 -0000 On Mon, 21 Feb 2005, Kathy Quinlan wrote: > Hi Guys, > > Here is a section of my code: > > *** Wtrend_Drivers.c *** > unsigned char Length , Network , Receiver , Node , Command = 0x00; > //Some Variables > > These are some of the errors I get in pairs for each of the above variables: > > Wtrend_Drivers.c:15: conflicting types for `Receiver' > Wtrend_Drivers.h:9: previous declaration of `Receiver' Try giving "Receiver" a different identifier. Also, if you are trying to limit the scope of Length, Network, Receiver, Node and Command to Wtrend_Drivers.*, then give line 9 of Wtrend_Driver.h the "static" qualifier. Hope this helps, Zera Holladay p.s. Watch the parameters in your function definitions too, you may get them mixed-up. From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 18:13:34 2005 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 54CFA16A4CF for ; Sun, 20 Feb 2005 18:13:34 +0000 (GMT) Received: from house.arach.net.au (house2.arach.net.au [203.30.44.85]) by mx1.FreeBSD.org (Postfix) with SMTP id DC2F443D3F for ; Sun, 20 Feb 2005 18:13:32 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 19408 invoked from network); 20 Feb 2005 18:13:30 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house2.arach.net.au with SMTP for ; 20 Feb 2005 18:13:30 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1KIFQM3013443; Mon, 21 Feb 2005 02:15:27 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.1.0]); Mon, 21 Feb 2005 02:13:25 +0800 Message-ID: <4218D345.30004@kaqelectronics.dyndns.org> Date: Mon, 21 Feb 2005 02:13:25 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: Zera William Holladay References: <4218B960.1050403@kaqelectronics.dyndns.org> In-Reply-To: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed cc: freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 20 Feb 2005 18:13:34 -0000 Zera William Holladay wrote: > > On Mon, 21 Feb 2005, Kathy Quinlan wrote: > > >>Hi Guys, >> >>Here is a section of my code: >> >>*** Wtrend_Drivers.c *** >>unsigned char Length , Network , Receiver , Node , Command = 0x00; >>//Some Variables >> >>These are some of the errors I get in pairs for each of the above variables: >> >>Wtrend_Drivers.c:15: conflicting types for `Receiver' >>Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > Try giving "Receiver" a different identifier. No difference, I renamed to wtReceiver :( Also, if you are trying to > limit the scope of Length, Network, Receiver, Node and Command to > Wtrend_Drivers.*, then give line 9 of Wtrend_Driver.h the "static" > qualifier. Nope my main program can set the variables. > Hope this helps, Zera Holladay > > p.s. Watch the parameters in your function definitions too, you may get > them mixed-up. ??? Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 18:32:22 2005 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 B9F9A16A4CF for ; Sun, 20 Feb 2005 18:32:22 +0000 (GMT) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18DDA43D45 for ; Sun, 20 Feb 2005 18:32:22 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1KIWKfM007534 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 21 Feb 2005 05:32:20 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1KIWJ7l083939; Mon, 21 Feb 2005 05:32:19 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j1KIWJ4F083938; Mon, 21 Feb 2005 05:32:19 +1100 (EST) (envelope-from pjeremy) Date: Mon, 21 Feb 2005 05:32:19 +1100 From: Peter Jeremy To: Kathy Quinlan Message-ID: <20050220183219.GK57256@cirb503493.alcatel.com.au> References: <4218B960.1050403@kaqelectronics.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4218B960.1050403@kaqelectronics.dyndns.org> User-Agent: Mutt/1.4.2i cc: freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 20 Feb 2005 18:32:22 -0000 On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: >These are some of the errors I get in pairs for each of the above variables: > >Wtrend_Drivers.c:15: conflicting types for `Receiver' >Wtrend_Drivers.h:9: previous declaration of `Receiver' Without knowing exactly what is on those lines, it's difficult to offer any concrete suggestions. Two possible ways forward: 1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' 2) Pre-process the source and have a close look at the definitions and declarations for Receiver. You may have a stray #define that is confusing the type or a missing semicolon. Peter From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 18:36:34 2005 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 ECDAD16A4CE for ; Sun, 20 Feb 2005 18:36:33 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6393243D31 for ; Sun, 20 Feb 2005 18:36:33 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1D2vwW-0003jK-00 for freebsd-hackers@freebsd.org; Sun, 20 Feb 2005 19:36:32 +0100 Received: from [84.128.137.65] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1D2vwW-0006Je-00 for freebsd-hackers@freebsd.org; Sun, 20 Feb 2005 19:36:32 +0100 From: Max Laier To: freebsd-hackers@freebsd.org Date: Sun, 20 Feb 2005 19:36:21 +0100 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1519726.JNeFxxl3j4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502201936.31366.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 Subject: Small bug fix from DragonFly / review requested 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, 20 Feb 2005 18:36:34 -0000 --nextPart1519726.JNeFxxl3j4 Content-Type: multipart/mixed; boundary="Boundary-01=_miNGCEO5vkILfbd" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_miNGCEO5vkILfbd Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Joerg Sonnenberger has discovered a problem in the snc(4) driver that might= =20 result in packets showing up on bpf multiple times. See the changelog for= =20 sys/dev/netif/snc/dp83932.c in their source tree[1]. Attached is a fix for HEAD. I am almost sure that it is right, but I'd=20 welcome a review as there might be a chance that sonicput() and the TX=20 interrupt free the mbuf before it gets to bpf. From my reading it seems th= at=20 the mbuf is "safe" until sc->mtd_free is altered (see comment). Thanks for your input. [1] http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/snc/dp83932.c =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_miNGCEO5vkILfbd Content-Type: text/x-diff; charset="us-ascii"; name="dp83932.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dp83932.c.diff" Index: dp83932.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/store/mlaier/fcvs/src/sys/dev/snc/dp83932.c,v retrieving revision 1.16 diff -u -r1.16 dp83932.c =2D-- dp83932.c 6 Jan 2005 01:43:15 -0000 1.16 +++ dp83932.c 20 Feb 2005 18:23:22 -0000 @@ -346,12 +346,6 @@ M_ASSERTPKTHDR(m); =20 /* =2D * If bpf is listening on this interface, let it =2D * see the packet before we commit it to the wire. =2D */ =2D BPF_MTAP(ifp, m); =2D =2D /* * If there is nothing in the o/p queue, and there is room in * the Tx ring, then send the packet directly. Otherwise append * it to the o/p queue. @@ -361,6 +355,14 @@ return; } =20 + /* + * If bpf is listening on this interface, let it see the packet + * before we commit it to the wire, but only if we are really + * committed to send it. The mbuf is "safe" until we modify + * sc->mtd_free (below). + */ + BPF_MTAP(ifp, m); + sc->mtd_prev =3D sc->mtd_free; sc->mtd_free =3D mtd_next; =20 --Boundary-01=_miNGCEO5vkILfbd-- --nextPart1519726.JNeFxxl3j4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCGNivXyyEoT62BG0RArtjAJ91DeXlwRUgl5bQZYaQMwadwLOSnwCfd/sx twUOdVJGrb4OUXFFJu4t4gI= =mDHd -----END PGP SIGNATURE----- --nextPart1519726.JNeFxxl3j4-- From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:02:37 2005 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 1571516A4CE for ; Sun, 20 Feb 2005 19:02:37 +0000 (GMT) Received: from house.arach.net.au (house2.arach.net.au [203.30.44.85]) by mx1.FreeBSD.org (Postfix) with SMTP id B4EDE43D1D for ; Sun, 20 Feb 2005 19:02:35 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 16234 invoked from network); 20 Feb 2005 19:02:34 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house2.arach.net.au with SMTP for ; 20 Feb 2005 19:02:34 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1KJ4UJ2015681; Mon, 21 Feb 2005 03:04:30 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.1.0]); Mon, 21 Feb 2005 03:02:29 +0800 Message-ID: <4218DEC5.1080600@kaqelectronics.dyndns.org> Date: Mon, 21 Feb 2005 03:02:29 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: Peter Jeremy , Freebsd-hackers@freebsd.org References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> In-Reply-To: <20050220183219.GK57256@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed Subject: Re: Error in my C programming 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, 20 Feb 2005 19:02:37 -0000 Peter Jeremy wrote: > On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: > >>These are some of the errors I get in pairs for each of the above variables: >> >>Wtrend_Drivers.c:15: conflicting types for `Receiver' >>Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > Without knowing exactly what is on those lines, it's difficult to offer > any concrete suggestions. > > Two possible ways forward: > 1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' > 2) Pre-process the source and have a close look at the definitions and > declarations for Receiver. You may have a stray #define that is > confusing the type or a missing semicolon. > > Peter > Here is a section of my code: *** Wtrend_Drivers.c *** (12)void Reset_Network (unsigned char Network) (13) { (14) Length = 0x00; (15) Receiver = 0x00; (16) Node = 0xFF; (17) Command = Reset; (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, Command, p_Data); (19) } *** Wtrend_Drivers.h *** unsigned char Length , Network , Receiver , Node , Command = 0x00; The above is line 9 of the Wtrend_Drivers.h The numbers in () I have added to show the line numbers in Wtrend_Drivers.c These are some of the errors I get in pairs for each of the above variables: Wtrend_Drivers.c:15: conflicting types for `Receiver' Wtrend_Drivers.h:9: previous declaration of `Receiver' Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:16:53 2005 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 B892716A4CE for ; Sun, 20 Feb 2005 19:16:53 +0000 (GMT) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E82543D46 for ; Sun, 20 Feb 2005 19:16:53 +0000 (GMT) (envelope-from reso3w83@verizon.net) Received: from ringworm.mechee.com ([4.26.84.7])0.04 <0IC8008065K4QMI0@vms044.mailsrvcs.net> for freebsd-hackers@freebsd.org; Sun, 20 Feb 2005 13:16:53 -0600 (CST) Received: by ringworm.mechee.com (Postfix, from userid 1001) id 8D46C2CE740; Sun, 20 Feb 2005 11:12:24 -0800 (PST) Date: Sun, 20 Feb 2005 11:12:24 -0800 From: "Michael C. Shultz" In-reply-to: <4218DEC5.1080600@kaqelectronics.dyndns.org> To: freebsd-hackers@freebsd.org Message-id: <200502201112.24220.reso3w83@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Content-disposition: inline References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> User-Agent: KMail/1.7.2 Subject: Re: Error in my C programming 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, 20 Feb 2005 19:16:53 -0000 On Sunday 20 February 2005 11:02 am, Kathy Quinlan wrote: > Peter Jeremy wrote: > > On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: > >>These are some of the errors I get in pairs for each of the above > >> variables: > >> > >>Wtrend_Drivers.c:15: conflicting types for `Receiver' > >>Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > > Without knowing exactly what is on those lines, it's difficult to > > offer any concrete suggestions. > > > > Two possible ways forward: > > 1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' > > 2) Pre-process the source and have a close look at the definitions > > and declarations for Receiver. You may have a stray #define that > > is confusing the type or a missing semicolon. > > > > Peter > > Here is a section of my code: > > *** Wtrend_Drivers.c *** > > (12)void Reset_Network (unsigned char Network) > (13) { > (14) Length = 0x00; > (15) Receiver = 0x00; > (16) Node = 0xFF; > (17) Command = Reset; > (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, > Command, p_Data); > (19) } > > *** Wtrend_Drivers.h *** > > unsigned char Length , Network , Receiver , Node , Command = 0x00; > > The above is line 9 of the Wtrend_Drivers.h > The numbers in () I have added to show the line numbers in > Wtrend_Drivers.c > > These are some of the errors I get in pairs for each of the above > variables: > > Wtrend_Drivers.c:15: conflicting types for `Receiver' > Wtrend_Drivers.h:9: previous declaration of `Receiver' > > Regards, > > Kat. How does it do when you use decimal equivalents? (14) Length = 0; (15) Receiver = 0; (16) Node = 255; -Mike From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:21:26 2005 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 22F7416A4CF for ; Sun, 20 Feb 2005 19:21:26 +0000 (GMT) Received: from smtp813.mail.sc5.yahoo.com (smtp813.mail.sc5.yahoo.com [66.163.170.83]) by mx1.FreeBSD.org (Postfix) with SMTP id A504943D2D for ; Sun, 20 Feb 2005 19:21:25 +0000 (GMT) (envelope-from rsharpe@richardsharpe.com) Received: from unknown (HELO ns.aus.com) (ngsharpe1@sbcglobal.net@67.125.87.116 with plain) by smtp813.mail.sc5.yahoo.com with SMTP; 20 Feb 2005 19:21:25 -0000 Received: from ns.aus.com (durable [127.0.0.1]) by ns.aus.com (8.12.11/8.12.8) with ESMTP id j1KJFUBc004110; Sun, 20 Feb 2005 11:15:32 -0800 Received: from localhost (rsharpe@localhost) by ns.aus.com (8.12.11/8.12.11/Submit) with ESMTP id j1KJFCE1004057; Sun, 20 Feb 2005 11:15:19 -0800 X-Authentication-Warning: ns.aus.com: rsharpe owned process doing -bs Date: Sun, 20 Feb 2005 11:15:12 -0800 (PST) From: Richard Sharpe X-X-Sender: rsharpe@durable To: Kathy Quinlan In-Reply-To: <4218DEC5.1080600@kaqelectronics.dyndns.org> Message-ID: References: <4218B960.1050403@kaqelectronics.dyndns.org> <4218DEC5.1080600@kaqelectronics.dyndns.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Peter Jeremy cc: Freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 20 Feb 2005 19:21:26 -0000 On Mon, 21 Feb 2005, Kathy Quinlan wrote: > Peter Jeremy wrote: > > > On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: > > > >>These are some of the errors I get in pairs for each of the above variables: > >> > >>Wtrend_Drivers.c:15: conflicting types for `Receiver' > >>Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > > > > Without knowing exactly what is on those lines, it's difficult to offer > > any concrete suggestions. > > > > Two possible ways forward: > > 1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' > > 2) Pre-process the source and have a close look at the definitions and > > declarations for Receiver. You may have a stray #define that is > > confusing the type or a missing semicolon. > > > > Peter > > > Here is a section of my code: > > *** Wtrend_Drivers.c *** > > (12)void Reset_Network (unsigned char Network) > (13) { > (14) Length = 0x00; > (15) Receiver = 0x00; > (16) Node = 0xFF; > (17) Command = Reset; > (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, > Command, p_Data); > (19) } > > *** Wtrend_Drivers.h *** > > unsigned char Length , Network , Receiver , Node , Command = 0x00; > > The above is line 9 of the Wtrend_Drivers.h > The numbers in () I have added to show the line numbers in Wtrend_Drivers.c > > These are some of the errors I get in pairs for each of the above variables: > > Wtrend_Drivers.c:15: conflicting types for `Receiver' > Wtrend_Drivers.h:9: previous declaration of `Receiver' Ummm, move the definition of all those variables to before their first use and see what that does. Also, check that you do not have an earlier definition that does not include the extern keyword. Regards ----- Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:27:37 2005 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 3B08616A4CE for ; Sun, 20 Feb 2005 19:27:37 +0000 (GMT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAF6543D2D for ; Sun, 20 Feb 2005 19:27:36 +0000 (GMT) (envelope-from garycor@comcast.net) Received: from [10.56.78.111] (pcp09118143pcs.union01.nj.comcast.net[69.142.234.88]) by comcast.net (sccrmhc13) with ESMTP id <200502201927350160009ftie>; Sun, 20 Feb 2005 19:27:36 +0000 Message-ID: <4218E5C8.1050900@comcast.net> Date: Sun, 20 Feb 2005 14:32:24 -0500 From: Gary Corcoran User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kathy Quinlan References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> In-Reply-To: <4218DEC5.1080600@kaqelectronics.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 20 Feb 2005 19:27:37 -0000 Kathy Quinlan wrote: > Peter Jeremy wrote: > >> On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: >> >>> These are some of the errors I get in pairs for each of the above >>> variables: >>> >>> Wtrend_Drivers.c:15: conflicting types for `Receiver' >>> Wtrend_Drivers.h:9: previous declaration of `Receiver' >> >> >> >> Without knowing exactly what is on those lines, it's difficult to offer >> any concrete suggestions. >> >> Two possible ways forward: >> 1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' >> 2) Pre-process the source and have a close look at the definitions and >> declarations for Receiver. You may have a stray #define that is >> confusing the type or a missing semicolon. >> >> Peter >> > Here is a section of my code: > > *** Wtrend_Drivers.c *** > > (12)void Reset_Network (unsigned char Network) > (13) { > (14) Length = 0x00; > (15) Receiver = 0x00; > (16) Node = 0xFF; > (17) Command = Reset; > (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, > Command, p_Data); > (19) } > > *** Wtrend_Drivers.h *** > > unsigned char Length , Network , Receiver , Node , Command = 0x00; > > The above is line 9 of the Wtrend_Drivers.h > The numbers in () I have added to show the line numbers in Wtrend_Drivers.c > > These are some of the errors I get in pairs for each of the above > variables: > > Wtrend_Drivers.c:15: conflicting types for `Receiver' > Wtrend_Drivers.h:9: previous declaration of `Receiver' I would try putting the variables in the header file on separate lines. For example: unsigned char Length = 0; unsigned char Network = 0; unsigned char Receiver = 0; etc. Gary From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:46:31 2005 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 5213216A4CE for ; Sun, 20 Feb 2005 19:46:31 +0000 (GMT) Received: from house.arach.net.au (house2.arach.net.au [203.30.44.85]) by mx1.FreeBSD.org (Postfix) with SMTP id B525843D41 for ; Sun, 20 Feb 2005 19:46:29 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 12621 invoked from network); 20 Feb 2005 19:46:28 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house2.arach.net.au with SMTP for ; 20 Feb 2005 19:46:28 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1KJmNgT017446; Mon, 21 Feb 2005 03:48:23 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.1.0]); Mon, 21 Feb 2005 03:46:21 +0800 Message-ID: <4218E90D.2080408@kaqelectronics.dyndns.org> Date: Mon, 21 Feb 2005 03:46:21 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: "Michael C. Shultz" References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> <200502201112.24220.reso3w83@verizon.net> In-Reply-To: <200502201112.24220.reso3w83@verizon.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed cc: freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 20 Feb 2005 19:46:31 -0000 Michael C. Shultz wrote: > On Sunday 20 February 2005 11:02 am, Kathy Quinlan wrote: > >>Peter Jeremy wrote: >> >>>On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: >>> >>>>These are some of the errors I get in pairs for each of the above >>>>variables: >>>> >>>>Wtrend_Drivers.c:15: conflicting types for `Receiver' >>>>Wtrend_Drivers.h:9: previous declaration of `Receiver' >>> >>>Without knowing exactly what is on those lines, it's difficult to >>>offer any concrete suggestions. >>> >>>Two possible ways forward: >>>1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' >>>2) Pre-process the source and have a close look at the definitions >>>and declarations for Receiver. You may have a stray #define that >>>is confusing the type or a missing semicolon. >>> >>>Peter >> >>Here is a section of my code: >> >>*** Wtrend_Drivers.c *** >> >>(12)void Reset_Network (unsigned char Network) >>(13) { >>(14) Length = 0x00; >>(15) Receiver = 0x00; >>(16) Node = 0xFF; >>(17) Command = Reset; >>(18) Make_Packet_Send(Head , Length, Network, Receiver, Node, >>Command, p_Data); >>(19) } >> >>*** Wtrend_Drivers.h *** >> >>unsigned char Length , Network , Receiver , Node , Command = 0x00; >> >>The above is line 9 of the Wtrend_Drivers.h >>The numbers in () I have added to show the line numbers in >>Wtrend_Drivers.c >> >>These are some of the errors I get in pairs for each of the above >>variables: >> >>Wtrend_Drivers.c:15: conflicting types for `Receiver' >>Wtrend_Drivers.h:9: previous declaration of `Receiver' >> >>Regards, >> >>Kat. > > > How does it do when you use decimal equivalents? > (14) Length = 0; > (15) Receiver = 0; > (16) Node = 255; > > -Mike Still the same :( Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:48:26 2005 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 DFCC916A4CE for ; Sun, 20 Feb 2005 19:48:26 +0000 (GMT) Received: from house.arach.net.au (house2.arach.net.au [203.30.44.85]) by mx1.FreeBSD.org (Postfix) with SMTP id 8165B43D45 for ; Sun, 20 Feb 2005 19:48:25 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 14219 invoked from network); 20 Feb 2005 19:48:24 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house2.arach.net.au with SMTP for ; 20 Feb 2005 19:48:24 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1KJoKvE017530; Mon, 21 Feb 2005 03:50:20 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.1.0]); Mon, 21 Feb 2005 03:48:18 +0800 Message-ID: <4218E982.6010107@kaqelectronics.dyndns.org> Date: Mon, 21 Feb 2005 03:48:18 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: Richard Sharpe References: <4218B960.1050403@kaqelectronics.dyndns.org> <4218DEC5.1080600@kaqelectronics.dyndns.org> In-Reply-To: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed cc: Peter Jeremy cc: Freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 20 Feb 2005 19:48:27 -0000 Richard Sharpe wrote: > On Mon, 21 Feb 2005, Kathy Quinlan wrote: > > >>Peter Jeremy wrote: >> >> >>>On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: >>> >>> >>>>These are some of the errors I get in pairs for each of the above variables: >>>> >>>>Wtrend_Drivers.c:15: conflicting types for `Receiver' >>>>Wtrend_Drivers.h:9: previous declaration of `Receiver' >>> >>> >>>Without knowing exactly what is on those lines, it's difficult to offer >>>any concrete suggestions. >>> >>>Two possible ways forward: >>>1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' >>>2) Pre-process the source and have a close look at the definitions and >>> declarations for Receiver. You may have a stray #define that is >>> confusing the type or a missing semicolon. >>> >>>Peter >>> >> >>Here is a section of my code: >> >>*** Wtrend_Drivers.c *** >> >>(12)void Reset_Network (unsigned char Network) >>(13) { >>(14) Length = 0x00; >>(15) Receiver = 0x00; >>(16) Node = 0xFF; >>(17) Command = Reset; >>(18) Make_Packet_Send(Head , Length, Network, Receiver, Node, >>Command, p_Data); >>(19) } >> >>*** Wtrend_Drivers.h *** >> >>unsigned char Length , Network , Receiver , Node , Command = 0x00; >> >>The above is line 9 of the Wtrend_Drivers.h >>The numbers in () I have added to show the line numbers in Wtrend_Drivers.c >> >>These are some of the errors I get in pairs for each of the above variables: >> >>Wtrend_Drivers.c:15: conflicting types for `Receiver' >>Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > Ummm, move the definition of all those variables to before their first > use and see what that does. Also, check that you do not have an earlier > definition that does not include the extern keyword. Checked all that, in Wtren_Drivers.h (which is listed before the c file they are used in) I have: extern unsigned char wtReceiver =0; is that what you mean ? Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:49:01 2005 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 1032216A4CE for ; Sun, 20 Feb 2005 19:49:01 +0000 (GMT) Received: from house.arach.net.au (house1.arach.net.au [203.30.44.84]) by mx1.FreeBSD.org (Postfix) with SMTP id E5FD343D1D for ; Sun, 20 Feb 2005 19:48:59 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 26212 invoked from network); 20 Feb 2005 19:48:58 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house1.arach.net.au with SMTP for ; 20 Feb 2005 19:48:58 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1KJosdM017538; Mon, 21 Feb 2005 03:50:54 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.1.0]); Mon, 21 Feb 2005 03:48:52 +0800 Message-ID: <4218E9A4.8060302@kaqelectronics.dyndns.org> Date: Mon, 21 Feb 2005 03:48:52 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: Gary Corcoran References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> <4218E5C8.1050900@comcast.net> In-Reply-To: <4218E5C8.1050900@comcast.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed cc: Freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 20 Feb 2005 19:49:01 -0000 Gary Corcoran wrote: > Kathy Quinlan wrote: > >> Peter Jeremy wrote: >> >>> On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: >>> >>>> These are some of the errors I get in pairs for each of the above >>>> variables: >>>> >>>> Wtrend_Drivers.c:15: conflicting types for `Receiver' >>>> Wtrend_Drivers.h:9: previous declaration of `Receiver' >>> >>> >>> >>> >>> Without knowing exactly what is on those lines, it's difficult to offer >>> any concrete suggestions. >>> >>> Two possible ways forward: >>> 1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' >>> 2) Pre-process the source and have a close look at the definitions and >>> declarations for Receiver. You may have a stray #define that is >>> confusing the type or a missing semicolon. >>> >>> Peter >>> >> Here is a section of my code: >> >> *** Wtrend_Drivers.c *** >> >> (12)void Reset_Network (unsigned char Network) >> (13) { >> (14) Length = 0x00; >> (15) Receiver = 0x00; >> (16) Node = 0xFF; >> (17) Command = Reset; >> (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, >> Command, p_Data); >> (19) } >> >> *** Wtrend_Drivers.h *** >> >> unsigned char Length , Network , Receiver , Node , Command = 0x00; >> >> The above is line 9 of the Wtrend_Drivers.h >> The numbers in () I have added to show the line numbers in >> Wtrend_Drivers.c >> >> These are some of the errors I get in pairs for each of the above >> variables: >> >> Wtrend_Drivers.c:15: conflicting types for `Receiver' >> Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > I would try putting the variables in the header file on separate lines. > For example: > > unsigned char Length = 0; > unsigned char Network = 0; > unsigned char Receiver = 0; > etc. Done that to no avail :( Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 20:12:50 2005 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 0623716A4CE for ; Sun, 20 Feb 2005 20:12:50 +0000 (GMT) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4CE143D2D for ; Sun, 20 Feb 2005 20:12:49 +0000 (GMT) (envelope-from reso3w83@verizon.net) Received: from ringworm.mechee.com ([4.26.84.7])0.04 <0IC8002RU85CDVM0@vms046.mailsrvcs.net> for freebsd-hackers@freebsd.org; Sun, 20 Feb 2005 14:12:49 -0600 (CST) Received: by ringworm.mechee.com (Postfix, from userid 1001) id DB2F22CE740; Sun, 20 Feb 2005 12:08:19 -0800 (PST) Date: Sun, 20 Feb 2005 12:08:17 -0800 From: "Michael C. Shultz" In-reply-to: <4218E9A4.8060302@kaqelectronics.dyndns.org> To: freebsd-hackers@freebsd.org Message-id: <200502201208.18130.reso3w83@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Content-disposition: inline References: <4218B960.1050403@kaqelectronics.dyndns.org> <4218E5C8.1050900@comcast.net> <4218E9A4.8060302@kaqelectronics.dyndns.org> User-Agent: KMail/1.7.2 Subject: Re: Error in my C programming 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, 20 Feb 2005 20:12:50 -0000 On Sunday 20 February 2005 11:48 am, Kathy Quinlan wrote: > Gary Corcoran wrote: > > Kathy Quinlan wrote: > >> Peter Jeremy wrote: > >>> On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: > >>>> These are some of the errors I get in pairs for each of the > >>>> above variables: > >>>> > >>>> Wtrend_Drivers.c:15: conflicting types for `Receiver' > >>>> Wtrend_Drivers.h:9: previous declaration of `Receiver' > >>> > >>> Without knowing exactly what is on those lines, it's difficult to > >>> offer any concrete suggestions. > >>> > >>> Two possible ways forward: > >>> 1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' > >>> 2) Pre-process the source and have a close look at the > >>> definitions and declarations for Receiver. You may have a stray > >>> #define that is confusing the type or a missing semicolon. > >>> > >>> Peter > >> > >> Here is a section of my code: > >> > >> *** Wtrend_Drivers.c *** > >> > >> (12)void Reset_Network (unsigned char Network) > >> (13) { > >> (14) Length = 0x00; > >> (15) Receiver = 0x00; > >> (16) Node = 0xFF; > >> (17) Command = Reset; > >> (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, > >> Command, p_Data); > >> (19) } > >> > >> *** Wtrend_Drivers.h *** > >> > >> unsigned char Length , Network , Receiver , Node , Command = 0x00; > >> > >> The above is line 9 of the Wtrend_Drivers.h > >> The numbers in () I have added to show the line numbers in > >> Wtrend_Drivers.c > >> > >> These are some of the errors I get in pairs for each of the above > >> variables: > >> > >> Wtrend_Drivers.c:15: conflicting types for `Receiver' > >> Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > > I would try putting the variables in the header file on separate > > lines. For example: > > > > unsigned char Length = 0; > > unsigned char Network = 0; > > unsigned char Receiver = 0; > > etc. > > Done that to no avail :( > > Regards, > > Kat. I wonder if Receiver is defined in a include file elsewhere? I checked all the header files on my system and it isn't, perhaps it is on your though? Maybe easier to rename it? Here is what I did to hunt for it: find /usr/include | xargs grep Receiver > log find /usr/local/include | xargs grep Receiver >> log find /usr/X11R6/include | xargs grep Receiver >> log -Mike From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 20:47:19 2005 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 BD83216A4CE for ; Sun, 20 Feb 2005 20:47:19 +0000 (GMT) Received: from smtp809.mail.sc5.yahoo.com (smtp809.mail.sc5.yahoo.com [66.163.168.188]) by mx1.FreeBSD.org (Postfix) with SMTP id 2D09643D58 for ; Sun, 20 Feb 2005 20:47:19 +0000 (GMT) (envelope-from rsharpe@richardsharpe.com) Received: from unknown (HELO ns.aus.com) (ngsharpe1@sbcglobal.net@67.125.87.116 with plain) by smtp809.mail.sc5.yahoo.com with SMTP; 20 Feb 2005 20:47:18 -0000 Received: from ns.aus.com (durable [127.0.0.1]) by ns.aus.com (8.12.11/8.12.8) with ESMTP id j1KKfILg005564; Sun, 20 Feb 2005 12:41:24 -0800 Received: from localhost (rsharpe@localhost) by ns.aus.com (8.12.11/8.12.11/Submit) with ESMTP id j1KKf52d005561; Sun, 20 Feb 2005 12:41:17 -0800 X-Authentication-Warning: ns.aus.com: rsharpe owned process doing -bs Date: Sun, 20 Feb 2005 12:41:05 -0800 (PST) From: Richard Sharpe X-X-Sender: rsharpe@durable To: "Michael C. Shultz" In-Reply-To: <200502201208.18130.reso3w83@verizon.net> Message-ID: References: <4218B960.1050403@kaqelectronics.dyndns.org> <4218E5C8.1050900@comcast.net> <200502201208.18130.reso3w83@verizon.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 20 Feb 2005 20:47:19 -0000 On Sun, 20 Feb 2005, Michael C. Shultz wrote: > > >> Here is a section of my code: > > >> > > >> *** Wtrend_Drivers.c *** > > >> > > >> (12)void Reset_Network (unsigned char Network) > > >> (13) { > > >> (14) Length = 0x00; > > >> (15) Receiver = 0x00; > > >> (16) Node = 0xFF; > > >> (17) Command = Reset; > > >> (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, > > >> Command, p_Data); > > >> (19) } > > >> > > >> *** Wtrend_Drivers.h *** > > >> > > >> unsigned char Length , Network , Receiver , Node , Command = 0x00; > > >> > > >> The above is line 9 of the Wtrend_Drivers.h > > >> The numbers in () I have added to show the line numbers in > > >> Wtrend_Drivers.c > > >> > > >> These are some of the errors I get in pairs for each of the above > > >> variables: > > >> > > >> Wtrend_Drivers.c:15: conflicting types for `Receiver' > > >> Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > > > > I would try putting the variables in the header file on separate > > > lines. For example: > > > > > > unsigned char Length = 0; > > > unsigned char Network = 0; > > > unsigned char Receiver = 0; > > > etc. > > > > Done that to no avail :( > > > > Regards, > > > > Kat. > > I wonder if Receiver is defined in a include file elsewhere? I checked > all the header files on my system and it isn't, perhaps it is on your > though? Maybe easier to rename it? However, the error messages point out that the conflicting definition is where Receiver is first used in the function in the .c file. If it was another definition, we would be told of the actual .h file where the definition came from. I have seen that lots of times :-) Regards ----- Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 20:57:41 2005 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 7B6C316A4CE for ; Sun, 20 Feb 2005 20:57:41 +0000 (GMT) Received: from mail.foolishgames.com (mail.foolishgames.com [216.55.178.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2098143D31 for ; Sun, 20 Feb 2005 20:57:41 +0000 (GMT) (envelope-from luke@foolishgames.com) Received: from [192.168.0.49] (24.247.120.6.kzo.mi.chartermi.net [24.247.120.6]) (authenticated bits=0)j1KKvdtG052243 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Sun, 20 Feb 2005 12:57:40 -0800 (PST) (envelope-from luke@foolishgames.com) X-Authentication-Warning: mail.foolishgames.com: Host 24.247.120.6.kzo.mi.chartermi.net [24.247.120.6] claimed to be [192.168.0.49] Message-Id: <619f5288d0257800fd01aff62e2905c1@foolishgames.com> X-Habeas-Swe-6: email in exchange for a license for this Habeas X-Habeas-Swe-3: like Habeas SWE (tm) Date: Sun, 20 Feb 2005 15:57:37 -0500 X-Habeas-Swe-8: Message (HCM) and not spam. Please report use of this From: Lucas Holt X-Habeas-Swe-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-Swe-2: brightly anticipated In-Reply-To: References: <4218B960.1050403@kaqelectronics.dyndns.org> <4218E5C8.1050900@comcast.net> <200502201208.18130.reso3w83@verizon.net> To: Richard Sharpe X-Habeas-Swe-7: warrant mark warrants that this is a Habeas Compliant Mime-Version: 1.0 (Apple Message framework v619.2) X-Habeas-Swe-4: Copyright 2002 Habeas (tm) Content-Type: text/plain; charset=US-ASCII; format=flowed X-Habeas-Swe-1: winter into spring Content-Transfer-Encoding: 7bit X-Habeas-Swe-9: mark in spam to . X-Mailer: Apple Mail (2.619.2) cc: freebsd-hackers@freebsd.org cc: "Michael C. Shultz" Subject: Re: Error in my C programming 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, 20 Feb 2005 20:57:41 -0000 On Feb 20, 2005, at 3:41 PM, Richard Sharpe wrote: > On Sun, 20 Feb 2005, Michael C. Shultz wrote: > >>>>> Here is a section of my code: >>>>> >>>>> *** Wtrend_Drivers.c *** >>>>> >>>>> (12)void Reset_Network (unsigned char Network) >>>>> (13) { >>>>> (14) Length = 0x00; >>>>> (15) Receiver = 0x00; >>>>> (16) Node = 0xFF; >>>>> (17) Command = Reset; >>>>> (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, >>>>> Command, p_Data); >>>>> (19) } >>>>> >>>>> *** Wtrend_Drivers.h *** >>>>> >>>>> unsigned char Length , Network , Receiver , Node , Command = 0x00; >>>>> >>>>> The above is line 9 of the Wtrend_Drivers.h >>>>> The numbers in () I have added to show the line numbers in >>>>> Wtrend_Drivers.c >>>>> >>>>> These are some of the errors I get in pairs for each of the above >>>>> variables: >>>>> >>>>> Wtrend_Drivers.c:15: conflicting types for `Receiver' >>>>> Wtrend_Drivers.h:9: previous declaration of `Receiver' >>> Kat. >> > Could there be a conflict between Receivers definition and the parameter in Make_Packet_send that uses receiver? Lucas Holt Luke@FoolishGames.com ________________________________________________________ FoolishGames.com (Jewel Fan Site) JustJournal.com (Free blogging) FoolishGames.net (Enemy Territory IoM site) From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 21:03:59 2005 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 E8F1816A4CE for ; Sun, 20 Feb 2005 21:03:59 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5AAB43D1D for ; Sun, 20 Feb 2005 21:03:59 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with SMTP id E130846B8A; Sun, 20 Feb 2005 16:03:58 -0500 (EST) Date: Sun, 20 Feb 2005 21:02:25 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Max Laier In-Reply-To: <200502201936.31366.max@love2party.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Small bug fix from DragonFly / review requested 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, 20 Feb 2005 21:04:00 -0000 On Sun, 20 Feb 2005, Max Laier wrote: > Joerg Sonnenberger has discovered a problem in the snc(4) driver that > might result in packets showing up on bpf multiple times. See the > changelog for sys/dev/netif/snc/dp83932.c in their source tree[1]. > > Attached is a fix for HEAD. I am almost sure that it is right, but I'd > welcome a review as there might be a chance that sonicput() and the TX > interrupt free the mbuf before it gets to bpf. From my reading it seems > that the mbuf is "safe" until sc->mtd_free is altered (see comment). This change seems fine -- in the current world order, Giant will prevent the driver from preempting itself and freeing the mbuf, and if we get per-softc locking for snc, presumably that locking will provide the same protection. It may be worth annotating that we rely on non-preemption by the interrupt handler to avoid the mbuf being freed with a comment. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 22:08:09 2005 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 7029C16A4CE for ; Sun, 20 Feb 2005 22:08:09 +0000 (GMT) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE49743D31 for ; Sun, 20 Feb 2005 22:08:08 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.55.112]) by hydra.bec.de (Postfix) with ESMTP id E2E4335707 for ; Sun, 20 Feb 2005 23:08:07 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1001) id 3A0ECA4; Sun, 20 Feb 2005 23:06:53 +0100 (CET) Date: Sun, 20 Feb 2005 23:06:53 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20050220220653.GB5041@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <200502201936.31366.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Subject: Re: Small bug fix from DragonFly / review requested 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, 20 Feb 2005 22:08:09 -0000 On Sun, Feb 20, 2005 at 09:02:25PM +0000, Robert Watson wrote: > > On Sun, 20 Feb 2005, Max Laier wrote: > > > Joerg Sonnenberger has discovered a problem in the snc(4) driver that > > might result in packets showing up on bpf multiple times. See the > > changelog for sys/dev/netif/snc/dp83932.c in their source tree[1]. > > > > Attached is a fix for HEAD. I am almost sure that it is right, but I'd > > welcome a review as there might be a chance that sonicput() and the TX > > interrupt free the mbuf before it gets to bpf. From my reading it seems > > that the mbuf is "safe" until sc->mtd_free is altered (see comment). > > This change seems fine -- in the current world order, Giant will prevent > the driver from preempting itself and freeing the mbuf, and if we get > per-softc locking for snc, presumably that locking will provide the same > protection. It may be worth annotating that we rely on non-preemption by > the interrupt handler to avoid the mbuf being freed with a comment. Quite a lot of the network drivers actually fully depend on that. So it might be better to add it to a global list of stuff to keep in mind :) Joerg From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 23:27:16 2005 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 BBDC616A4CE for ; Sun, 20 Feb 2005 23:27:16 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62A9B43D58 for ; Sun, 20 Feb 2005 23:27:16 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j1KNRDPd008350; Sun, 20 Feb 2005 18:27:13 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j1KNRC9e008349; Sun, 20 Feb 2005 18:27:12 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sun, 20 Feb 2005 18:27:12 -0500 From: David Schultz To: Igor Shmukler Message-ID: <20050220232712.GA8305@VARK.MIT.EDU> Mail-Followup-To: Igor Shmukler , freebsd-hackers@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: freebsd-hackers@FreeBSD.ORG Subject: Re: vn_fullpath() 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, 20 Feb 2005 23:27:16 -0000 On Sun, Feb 20, 2005, Igor Shmukler wrote: > Hello, > > I was wondering if anyone has figured a way to make vn_fullpath() reliable? > > Perhaps there is another approach to attacking this problem. Here is what I need > to accomplish: > > I need to be able to determine dynamic linker, shared libraries or executable > name for a specific process. You'd essentially need to write a full version of getcwd(3) in the kernel. This would be useful for a number of things, performance and Linux emulation included. You might take a look at how libc's getcwd() works and take it from there. From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 23:31:04 2005 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 92FDC16A4CE for ; Sun, 20 Feb 2005 23:31:04 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DE0343D39 for ; Sun, 20 Feb 2005 23:31:04 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j1KNV0RQ008447; Sun, 20 Feb 2005 18:31:00 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j1KNV0NA008446; Sun, 20 Feb 2005 18:31:00 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sun, 20 Feb 2005 18:31:00 -0500 From: David Schultz To: Igor Shmukler , freebsd-hackers@FreeBSD.ORG Message-ID: <20050220233100.GA8430@VARK.MIT.EDU> Mail-Followup-To: Igor Shmukler , freebsd-hackers@FreeBSD.ORG References: <20050220232712.GA8305@VARK.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050220232712.GA8305@VARK.MIT.EDU> Subject: Re: vn_fullpath() 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, 20 Feb 2005 23:31:04 -0000 On Sun, Feb 20, 2005, David Schultz wrote: > On Sun, Feb 20, 2005, Igor Shmukler wrote: > > Hello, > > > > I was wondering if anyone has figured a way to make vn_fullpath() reliable? > > > > Perhaps there is another approach to attacking this problem. Here is what I need > > to accomplish: > > > > I need to be able to determine dynamic linker, shared libraries or executable > > name for a specific process. > > You'd essentially need to write a full version of getcwd(3) in the > kernel. This would be useful for a number of things, performance > and Linux emulation included. You might take a look at how libc's > getcwd() works and take it from there. There's also a linux_getcwd() in the Linuxolator, but it's slightly broken in ways I don't recall. From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 00:08:12 2005 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 D5CAA16A4CE for ; Mon, 21 Feb 2005 00:08:12 +0000 (GMT) Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E1CB43D1D for ; Mon, 21 Feb 2005 00:08:12 +0000 (GMT) (envelope-from reso3w83@verizon.net) Received: from ringworm.mechee.com ([4.26.84.7])0.04 <0IC8004U0AP3UBS0@vms048.mailsrvcs.net> for freebsd-hackers@freebsd.org; Sun, 20 Feb 2005 15:07:51 -0600 (CST) Received: by ringworm.mechee.com (Postfix, from userid 1001) id EA82E2CE740; Sun, 20 Feb 2005 13:03:22 -0800 (PST) Date: Sun, 20 Feb 2005 13:03:21 -0800 From: "Michael C. Shultz" In-reply-to: To: freebsd-hackers@freebsd.org Message-id: <200502201303.22117.reso3w83@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Content-disposition: inline References: <4218B960.1050403@kaqelectronics.dyndns.org> <200502201208.18130.reso3w83@verizon.net> User-Agent: KMail/1.7.2 Subject: Re: Error in my C programming 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, 21 Feb 2005 00:08:13 -0000 On Sunday 20 February 2005 12:41 pm, Richard Sharpe wrote: > On Sun, 20 Feb 2005, Michael C. Shultz wrote: > > > >> Here is a section of my code: > > > >> > > > >> *** Wtrend_Drivers.c *** > > > >> > > > >> (12)void Reset_Network (unsigned char Network) > > > >> (13) { > > > >> (14) Length = 0x00; > > > >> (15) Receiver = 0x00; > > > >> (16) Node = 0xFF; > > > >> (17) Command = Reset; > > > >> (18) Make_Packet_Send(Head , Length, Network, Receiver, > > > >> Node, Command, p_Data); > > > >> (19) } > > > >> > > > >> *** Wtrend_Drivers.h *** > > > >> > > > >> unsigned char Length , Network , Receiver , Node , Command = > > > >> 0x00; > > > >> > > > >> The above is line 9 of the Wtrend_Drivers.h > > > >> The numbers in () I have added to show the line numbers in > > > >> Wtrend_Drivers.c > > > >> > > > >> These are some of the errors I get in pairs for each of the > > > >> above variables: > > > >> > > > >> Wtrend_Drivers.c:15: conflicting types for `Receiver' > > > >> Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > > > > > > I would try putting the variables in the header file on > > > > separate lines. For example: > > > > > > > > unsigned char Length = 0; > > > > unsigned char Network = 0; > > > > unsigned char Receiver = 0; > > > > etc. > > > > > > Done that to no avail :( > > > > > > Regards, > > > > > > Kat. > > > > I wonder if Receiver is defined in a include file elsewhere? I > > checked all the header files on my system and it isn't, perhaps it > > is on your though? Maybe easier to rename it? > > However, the error messages point out that the conflicting definition > is where Receiver is first used in the function in the .c file. If it > was another definition, we would be told of the actual .h file where > the definition came from. I have seen that lots of times :-) > > Regards Your right. We do not have enough of her code. I tried this: #include unsigned char Receiver = 0; int main(void) { Receiver = 0x00; printf( "Receiver -=>%c\n", Receiver ); return(0); } compiled it with: gcc -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ -Wcast-qual -Wchar-subscripts -Winline \ -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ -Wredundant-decls -Wshadow -Wstrict-prototypes zz.c -o zz and no warnings.... -Mike From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 00:53:16 2005 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 0AF8716A4CF for ; Mon, 21 Feb 2005 00:53:16 +0000 (GMT) Received: from smtp804.mail.sc5.yahoo.com (smtp804.mail.sc5.yahoo.com [66.163.168.183]) by mx1.FreeBSD.org (Postfix) with SMTP id 5E73243D5E for ; Mon, 21 Feb 2005 00:53:15 +0000 (GMT) (envelope-from rsharpe@richardsharpe.com) Received: from unknown (HELO ns.aus.com) (ngsharpe1@sbcglobal.net@67.125.87.116 with plain) by smtp804.mail.sc5.yahoo.com with SMTP; 21 Feb 2005 00:53:15 -0000 Received: from ns.aus.com (durable [127.0.0.1]) by ns.aus.com (8.12.11/8.12.8) with ESMTP id j1L0l3gl006259; Sun, 20 Feb 2005 16:47:10 -0800 Received: from localhost (rsharpe@localhost) by ns.aus.com (8.12.11/8.12.11/Submit) with ESMTP id j1L0kp21006256; Sun, 20 Feb 2005 16:47:03 -0800 X-Authentication-Warning: ns.aus.com: rsharpe owned process doing -bs Date: Sun, 20 Feb 2005 16:46:51 -0800 (PST) From: Richard Sharpe X-X-Sender: rsharpe@durable To: "Michael C. Shultz" In-Reply-To: <200502201303.22117.reso3w83@verizon.net> Message-ID: References: <4218B960.1050403@kaqelectronics.dyndns.org> <200502201303.22117.reso3w83@verizon.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 21 Feb 2005 00:53:16 -0000 On Sun, 20 Feb 2005, Michael C. Shultz wrote: > > > > >> *** Wtrend_Drivers.c *** > > > > >> > > > > >> (12)void Reset_Network (unsigned char Network) > > > > >> (13) { > > > > >> (14) Length = 0x00; > > > > >> (15) Receiver = 0x00; > > > > >> (16) Node = 0xFF; > > > > >> (17) Command = Reset; > > > > >> (18) Make_Packet_Send(Head , Length, Network, Receiver, > > > > >> Node, Command, p_Data); > > > > >> (19) } > > > > >> > > > > >> *** Wtrend_Drivers.h *** > > > > >> > > > > >> unsigned char Length , Network , Receiver , Node , Command = > > > > >> 0x00; > > > > >> > > > > >> The above is line 9 of the Wtrend_Drivers.h > > > > >> The numbers in () I have added to show the line numbers in > > > > >> Wtrend_Drivers.c > > > > >> > > > > >> These are some of the errors I get in pairs for each of the > > > > >> above variables: > > > > >> > > > > >> Wtrend_Drivers.c:15: conflicting types for `Receiver' > > > > >> Wtrend_Drivers.h:9: previous declaration of `Receiver' [Deletia ..] > > > I wonder if Receiver is defined in a include file elsewhere? I > > > checked all the header files on my system and it isn't, perhaps it > > > is on your though? Maybe easier to rename it? > > > > However, the error messages point out that the conflicting definition > > is where Receiver is first used in the function in the .c file. If it > > was another definition, we would be told of the actual .h file where > > the definition came from. I have seen that lots of times :-) > > > > Regards > > Your right. We do not have enough of her code. I tried this: > > #include > unsigned char Receiver = 0; > > int main(void) > { > Receiver = 0x00; > printf( "Receiver -=>%c\n", Receiver ); > return(0); > } > > compiled it with: > > gcc -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ > -Wcast-qual -Wchar-subscripts -Winline \ > -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ > -Wredundant-decls -Wshadow -Wstrict-prototypes zz.c -o zz > > and no warnings.... In private correspondence with the person asking the question it was indicated that initially GCC was used with no flags. Regards ----- Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 06:58:49 2005 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 DD68D16A4CE for ; Mon, 21 Feb 2005 06:58:49 +0000 (GMT) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1A9A43D31 for ; Mon, 21 Feb 2005 06:58:48 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1L6wjxB010826 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 21 Feb 2005 17:58:46 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1L6wj7l084534; Mon, 21 Feb 2005 17:58:45 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j1L6wiUS084533; Mon, 21 Feb 2005 17:58:45 +1100 (EST) (envelope-from pjeremy) Date: Mon, 21 Feb 2005 17:58:44 +1100 From: Peter Jeremy To: Kathy Quinlan Message-ID: <20050221065844.GB81063@cirb503493.alcatel.com.au> References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <4218DEC5.1080600@kaqelectronics.dyndns.org> User-Agent: Mutt/1.4.2i cc: Freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 21 Feb 2005 06:58:50 -0000 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, 2005-Feb-21 03:02:29 +0800, Kathy Quinlan wrote: >Peter Jeremy wrote: >>2) Pre-process the source and have a close look at the definitions and >> declarations for Receiver. You may have a stray #define that is >> confusing the type or a missing semicolon. ... >(14) Length = 0x00; >(15) Receiver = 0x00; >(16) Node = 0xFF; ... >unsigned char Length , Network , Receiver , Node , Command = 0x00; ... >Wtrend_Drivers.c:15: conflicting types for `Receiver' >Wtrend_Drivers.h:9: previous declaration of `Receiver' I'm unable to reproduce this with any of gcc2.95.4, gcc3.2.3 or gcc3.4.2 using the attached code. The cause of the problem is somewhere outside the code fragments you've posted. I suggest you try: gcc -E -P Wtrend_Drivers.c > foo.c gcc -c foo.c Then look at the lines in foo.c around the reported error(s). If you can't see the problem, chop down foo.c until you have something that is reasonable in size and safe to post and post the entire file. You might also like to indicate what version of FreeBSD you are running and the output from 'gcc -v'. I presume that you've verified that there are no non-ASCII characters in or near the lines in question that might be confusing things. -- Peter Jeremy --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="foo.c" #define Reset 0 #define Head 0 #define p_Data 0 unsigned char Length , Network , Receiver , Node , Command = 0x00; void Make_Packet_Send(int, int, int, int, int, int, int); void Reset_Network (unsigned char Network) { Length = 0x00; Receiver = 0x00; Node = 0xFF; Command = Reset; Make_Packet_Send(Head , Length, Network, Receiver, Node, Command, p_Data); } --gKMricLos+KVdGMg-- From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 09:01:30 2005 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 2931316A4CE for ; Mon, 21 Feb 2005 09:01:30 +0000 (GMT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4A8F43D4C for ; Mon, 21 Feb 2005 09:01:29 +0000 (GMT) (envelope-from mhersant@comcast.net) Received: from [192.168.2.102] (c-24-22-136-36.client.comcast.net[24.22.136.36]) by comcast.net (rwcrmhc12) with ESMTP id <2005022109012901400hlac6e>; Mon, 21 Feb 2005 09:01:29 +0000 Message-ID: <4219A362.2050800@comcast.net> Date: Mon, 21 Feb 2005 01:01:22 -0800 From: Matt User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: remote connection to mysql 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, 21 Feb 2005 09:01:30 -0000 Hi, I'm trying to connect remotely to my database server. It is MySQL 4.1.7 which I install from ports. I created a user with permissions to connect from any remote location. I'm using Perl DBI, like this: use DBI; my $dbh = DBI->connect( 'dbi:mysql:database@host.org:3306', 'user', 'passwd', { RaiseError => 1, AutoCommit => 1 } ); Yet I continue to receive connection errors. Can't connect to the MySQL server on 3306 (10061). I'v verified that the server is listening on the port. I also found some info on google about Perl DBD::mysql problems. I tried resetting the user's password with the OLD_PASSWORD option. Nothing works. Can anyone help??? From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 09:52:18 2005 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 98FA016A4CE for ; Mon, 21 Feb 2005 09:52:18 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59BD443D46 for ; Mon, 21 Feb 2005 09:52:18 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j1KDuroH034496; Sun, 20 Feb 2005 05:56:54 -0800 (PST) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j1KDul36034495; Sun, 20 Feb 2005 05:56:47 -0800 (PST) (envelope-from www) Date: Sun, 20 Feb 2005 05:56:47 -0800 (PST) Message-Id: <200502201356.j1KDul36034495@marlena.vvi.at> To: mhersant@comcast.net From: "ALeine" cc: freebsd-hackers@freebsd.org Subject: Re: remote connection to mysql 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, 21 Feb 2005 09:52:18 -0000 mhersant@comcast.net wrote: > use DBI; > > my $dbh = DBI->connect( > 'dbi:mysql:database@host.org:3306', > 'user', 'passwd', { > RaiseError => 1, AutoCommit => 1 > } > ); > > Yet I continue to receive connection errors. Can't connect to > the MySQL server on 3306 (10061). I'v verified that the server is > listening on the port. I also found some info on google about > Perl DBD::mysql problems. I tried resetting the user's password > with the OLD_PASSWORD option. Nothing works. Can anyone help??? Error code 10061 = connection refused. Are you sure there is no firewall in place blocking access to port 3306? Can you telnet to host.org 3306? If so, you might want to try changing your script like this: use DBI; my $dbh = DBI->connect( 'dbi:mysql:database=;host=;port=3306', 'user', 'passwd', { RaiseError => 1, AutoCommit => 1 } ); Otherwise if you are running 4.10 you might want to use sysctl to set net.inet.ip.portrange.randomized to 0. Use may also want to use sockstat to make sure your script is actually trying to connect to the right IP. ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 10:28:27 2005 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 2B13516A4CE for ; Mon, 21 Feb 2005 10:28:27 +0000 (GMT) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) by mx1.FreeBSD.org (Postfix) with SMTP id AAD1F43D53 for ; Mon, 21 Feb 2005 10:28:26 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 21522 invoked from network); 21 Feb 2005 10:28:26 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 21 Feb 2005 10:28:26 -0000 X-pair-Authenticated: 209.68.2.70 Date: Mon, 21 Feb 2005 04:28:25 -0600 (CST) From: Mike Silbersack To: Matt In-Reply-To: <4219A362.2050800@comcast.net> Message-ID: <20050221042738.T683@odysseus.silby.com> References: <4219A362.2050800@comcast.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Freebsd-hackers@freebsd.org Subject: Re: remote connection to mysql 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, 21 Feb 2005 10:28:27 -0000 On Mon, 21 Feb 2005, Matt wrote: > Hi, > > I'm trying to connect remotely to my database server. It is MySQL 4.1.7 > which I install from ports. I created a user with permissions to connect > from any remote location. I'm using Perl DBI, like this: Are you sure that you set up MySQL to accept TCP connections? I think it defaults to local sockets only; you can verify by running netstat -na and seeing if there's anything listening on port 3306. Mike "Silby" Silbersack From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 11:42:18 2005 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 CF8FC16A4CE for ; Mon, 21 Feb 2005 11:42:18 +0000 (GMT) Received: from house.arach.net.au (house1.arach.net.au [203.30.44.84]) by mx1.FreeBSD.org (Postfix) with SMTP id 37F3943D1D for ; Mon, 21 Feb 2005 11:42:17 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 11086 invoked from network); 21 Feb 2005 11:42:15 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house1.arach.net.au with SMTP for ; 21 Feb 2005 11:42:15 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1LBiA1c054724 for ; Mon, 21 Feb 2005 19:44:11 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.1.0]); Mon, 21 Feb 2005 19:42:10 +0800 Message-ID: <4219C912.2070207@kaqelectronics.dyndns.org> Date: Mon, 21 Feb 2005 19:42:10 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: freebsd-hackers@freebsd.org References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> <20050221065844.GB81063@cirb503493.alcatel.com.au> In-Reply-To: <20050221065844.GB81063@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed Subject: Re: Error in my C programming 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, 21 Feb 2005 11:42:19 -0000 Peter Jeremy wrote: OK it was all to do with the comments it did not like the //comments ARRGGHHHH the rest of the errors were bogus as soon as I changed EVERY comment over to the ANSI C /*comments*/ it now works (oh and removed the #pragma directives from a c compiler for the AVR uC I will have to put all the different complier directives in different #ifdef tags :) Thanks all for your help it is really apreciated (I may actually go to bed soon lol) If anyone can recomend online resources for Makefiles I would apreciate it :) Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 12:09:06 2005 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 E1B6C16A4CE for ; Mon, 21 Feb 2005 12:09:06 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AC6043D41 for ; Mon, 21 Feb 2005 12:09:06 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j1KGDdoH036548; Sun, 20 Feb 2005 08:13:44 -0800 (PST) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j1KGDXvx036547; Sun, 20 Feb 2005 08:13:33 -0800 (PST) (envelope-from www) Date: Sun, 20 Feb 2005 08:13:33 -0800 (PST) Message-Id: <200502201613.j1KGDXvx036547@marlena.vvi.at> To: kat-free@kaqelectronics.dyndns.org From: "ALeine" cc: freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 21 Feb 2005 12:09:07 -0000 kat-free@kaqelectronics.dyndns.org wrote: > If anyone can recomend online resources for Makefiles I would > apreciate it :) How about a source which is already on your disk? :-) zcat /usr/share/doc/psd/12.make/paper.ascii.gz | less You may also want to study the first chapter of the FreeBSD System Programming book at: http://www.khmere.com/freebsd_book/html/ch01.html Reading about the alternatives might be a good idea as well: http://developers.slashdot.org/article.pl?sid=05/01/29/2033230 ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 12:28:52 2005 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 C608116A4CE for ; Mon, 21 Feb 2005 12:28:52 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D1CC43D48 for ; Mon, 21 Feb 2005 12:28:52 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with SMTP id 042E746B49; Mon, 21 Feb 2005 07:28:52 -0500 (EST) Date: Mon, 21 Feb 2005 12:27:16 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Igor Shmukler In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: vn_fullpath() 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, 21 Feb 2005 12:28:52 -0000 On Sun, 20 Feb 2005, Igor Shmukler wrote: > I was wondering if anyone has figured a way to make vn_fullpath() > reliable? It depends a lot on the requirements. There are some nasty edge cases where the process of determining a name for an object can be quite expensive. Here's one of them: ln /usr/local/etc/apache/httpd.conf /usr/local/etc/apache.old/httpd.conf reboot apachectl start rm /usr/local/etc/apache/httpd.conf Now generate the name of the file that Apache has open. Note that you can't just look in the name cache, because the object has a name but the name used to open the object has been invalidated. And UFS even knows it has a name, because the link count remains non-zero when the unlink of one of the names occurs -- but the only way it can find the other name is to search the file system. So the first thing to do is to decied what your requirements are: are you willing to fail in the edge cases like the above? If so, life is a lot easier :-). Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 14:15:15 2005 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 0931016A4CE; Mon, 21 Feb 2005 14:15:15 +0000 (GMT) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39E4343D4C; Mon, 21 Feb 2005 14:15:13 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from [80.68.243.98] (account rojer@rbc.ru HELO [80.68.243.98]) by hermes.hw.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 72415064; Mon, 21 Feb 2005 17:15:11 +0300 Message-ID: <4219ECED.8060003@rojer.pp.ru> Date: Mon, 21 Feb 2005 17:15:09 +0300 From: Deomid Ryabkov User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: In-Reply-To: Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms080104000500060000070407" cc: freebsd-hackers@freebsd.org Subject: Re: vn_fullpath() 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, 21 Feb 2005 14:15:15 -0000 This is a cryptographically signed message in MIME format. --------------ms080104000500060000070407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This is an interesting discussion. As far as I understand, a function for performing reverse (object -> filename) lookup is being discussed. Having such a function would help me with implementation of my custom changes-tracking filesystem (I once started a discussion of such a thing on this list). I don't think i'm able to actually help with making vn_fullpath() reliable, but I'm definitely the one who's interested in the end result :) With such a call at hand i could actually begin writing my filesystem (changes-tracking wrapper for UFS). As to hard links, they will be simply disallowed. What are the other edge cases, beside hard links, that need to be taken care of? Robert Watson wrote: >On Sun, 20 Feb 2005, Igor Shmukler wrote: > > > >>I was wondering if anyone has figured a way to make vn_fullpath() >>reliable? >> >> > >It depends a lot on the requirements. There are some nasty edge cases >where the process of determining a name for an object can be quite >expensive. Here's one of them: > > ln /usr/local/etc/apache/httpd.conf /usr/local/etc/apache.old/httpd.conf > reboot > apachectl start > rm /usr/local/etc/apache/httpd.conf > >Now generate the name of the file that Apache has open. Note that you >can't just look in the name cache, because the object has a name but the >name used to open the object has been invalidated. And UFS even knows it >has a name, because the link count remains non-zero when the unlink of one >of the names occurs -- but the only way it can find the other name is to >search the file system. > >So the first thing to do is to decied what your requirements are: are you >willing to fail in the edge cases like the above? If so, life is a lot >easier :-). > >Robert N M Watson > > >_______________________________________________ >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" > > -- Deomid Ryabkov aka Rojer myself@rojer.pp.ru rojer@sysadmins.ru ICQ: 8025844 --------------ms080104000500060000070407 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJIzCC AuwwggJVoAMCAQICAwwKdjANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDQwMzMxMjIxODA5WhcNMDUwMzMxMjIxODA5 WjBfMRAwDgYDVQQEEwdSeWFia292MQ8wDQYDVQQqEwZEZW9taWQxFzAVBgNVBAMTDkRlb21p ZCBSeWFia292MSEwHwYJKoZIhvcNAQkBFhJteXNlbGZAcm9qZXIucHAucnUwggEiMA0GCSqG SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBxXgFP/1lZDqp0dzUDzR5IBb7aKki6TD+HMMkRjtP IOcaNHsfoDer9RFrFICoxNQZF86iopYFVYr7msgB9y2dKZTRQQoOA72lFrOyH3sgrztx/3LL axEsihA2cxcrglrIgPEm6FF2aabbKVpSdeslMCDPBr0auAm0QLo8ch9c5j0vuQUBrs8TKU6f 6YZLNO2Sk/fPZP2kfJEkXyZhkU6wq3ER1CHq2qgfNpW2Ni7Kuv/eYI/CV1BGgm37ZPubOyxI LNiRUGT0pv0wocrCIehKqoI1uFPZgGS0ANYTqPJQSdjlSzMGQJjT510PNDJnDfKOvLhcadD+ 6gSL/ovNM/LPAgMBAAGjLzAtMB0GA1UdEQQWMBSBEm15c2VsZkByb2plci5wcC5ydTAMBgNV HRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBACunC6DhFX4I6Nvdy/UevjSd3VmKWPRmqwoR l0RXvuI/JVyPO9KHGqxCMpRu7ArJz7d8ShPVs5kynysrB+Nm6/fwWjeaW21+gViojeO9gGP6 Np/LeMIqkqSYMoElq7Feqh/3qp7a/UxuofFtAW9V/2tRunxaPo4/WOxcdcmdcC86MIIC7DCC AlWgAwIBAgIDDAp2MA0GCSqGSIb3DQEBBAUAMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxU aGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwg RnJlZW1haWwgSXNzdWluZyBDQTAeFw0wNDAzMzEyMjE4MDlaFw0wNTAzMzEyMjE4MDlaMF8x EDAOBgNVBAQTB1J5YWJrb3YxDzANBgNVBCoTBkRlb21pZDEXMBUGA1UEAxMORGVvbWlkIFJ5 YWJrb3YxITAfBgkqhkiG9w0BCQEWEm15c2VsZkByb2plci5wcC5ydTCCASIwDQYJKoZIhvcN AQEBBQADggEPADCCAQoCggEBAMHFeAU//WVkOqnR3NQPNHkgFvtoqSLpMP4cwyRGO08g5xo0 ex+gN6v1EWsUgKjE1BkXzqKilgVVivuayAH3LZ0plNFBCg4DvaUWs7IfeyCvO3H/cstrESyK EDZzFyuCWsiA8SboUXZpptspWlJ16yUwIM8GvRq4CbRAujxyH1zmPS+5BQGuzxMpTp/phks0 7ZKT989k/aR8kSRfJmGRTrCrcRHUIeraqB82lbY2Lsq6/95gj8JXUEaCbftk+5s7LEgs2JFQ ZPSm/TChysIh6EqqgjW4U9mAZLQA1hOo8lBJ2OVLMwZAmNPnXQ80MmcN8o68uFxp0P7qBIv+ i80z8s8CAwEAAaMvMC0wHQYDVR0RBBYwFIESbXlzZWxmQHJvamVyLnBwLnJ1MAwGA1UdEwEB /wQCMAAwDQYJKoZIhvcNAQEEBQADgYEAK6cLoOEVfgjo293L9R6+NJ3dWYpY9GarChGXRFe+ 4j8lXI870ocarEIylG7sCsnPt3xKE9WzmTKfKysH42br9/BaN5pbbX6BWKiN472AY/o2n8t4 wiqSpJgygSWrsV6qH/eqntr9TG6h8W0Bb1X/a1G6fFo+jj9Y7Fx1yZ1wLzowggM/MIICqKAD AgECAgENMA0GCSqGSIb3DQEBBQUAMIHRMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2VzdGVy biBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5n MSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMSQwIgYDVQQDExtU aGF3dGUgUGVyc29uYWwgRnJlZW1haWwgQ0ExKzApBgkqhkiG9w0BCQEWHHBlcnNvbmFsLWZy ZWVtYWlsQHRoYXd0ZS5jb20wHhcNMDMwNzE3MDAwMDAwWhcNMTMwNzE2MjM1OTU5WjBiMQsw CQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoG A1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwgZ8wDQYJKoZIhvcN AQEBBQADgY0AMIGJAoGBAMSmPFVzVftOucqZWh5owHUEcJ3f6f+jHuy9zfVb8hp2vX8MOmHy v1HOAdTlUAow1wJjWiyJFXCO3cnwK4Vaqj9xVsuvPAsH5/EfkTYkKhPPK9Xzgnc9A74r/rsY Pge/QIACZNenprufZdHFKlSFD0gEf6e20TxhBEAeZBlyYLf7AgMBAAGjgZQwgZEwEgYDVR0T AQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3JsLnRoYXd0ZS5jb20v VGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNVHQ8EBAMCAQYwKQYDVR0RBCIwIKQe MBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0GCSqGSIb3DQEBBQUAA4GBAEiM0VCD 6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYvwPQcUCCTcDz9reFhYsPZOhl+hLGZ GwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3h9bGCE6u9uo05RAaWzVNd+NWIXiC 3CEZNd4ksdMdRv9dX2VPMYIDOzCCAzcCAQEwaTBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMc VGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFs IEZyZWVtYWlsIElzc3VpbmcgQ0ECAwwKdjAJBgUrDgMCGgUAoIIBpzAYBgkqhkiG9w0BCQMx CwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNTAyMjExNDE1MDlaMCMGCSqGSIb3DQEJ BDEWBBTFdLkJtdLXw5qujZHjbLQ7XOgafTBSBgkqhkiG9w0BCQ8xRTBDMAoGCCqGSIb3DQMH MA4GCCqGSIb3DQMCAgIAgDANBggqhkiG9w0DAgIBQDAHBgUrDgMCBzANBggqhkiG9w0DAgIB KDB4BgkrBgEEAYI3EAQxazBpMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29u c3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwg SXNzdWluZyBDQQIDDAp2MHoGCyqGSIb3DQEJEAILMWugaTBiMQswCQYDVQQGEwJaQTElMCMG A1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBl cnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAwwKdjANBgkqhkiG9w0BAQEFAASCAQCnMyw2 uzXI2QvaMIjTbvU0v2aoizQRTyjo0f4qoGIEDmXGvA0CI1TcJGGVbA9OjawYFDYQYNWBR4Pi R3NTGNDWjeN44Zx+D8td0eC+ws/z6iUZO4o2JIaZ5zPxOdKB55FhRm0aZCHSk3Bt2Bk0fB4k uJJYdequJlbUEVs6CmRCYU3wwrcaltW0/BaBKTkBEg98uiC6ELjA2hJ+0OYUhqSUXgeB5Yy/ T6tS5UISLQJegsnus/THWGjYKlpSHn9ucJ89zt0U+NFEh2f6wQgRQjlg86LgV4G2+wf8XLzL WcajsXNjjiSZZ0fM5CR2gpgkV6wv+Nwa4eeLomzmprpei5R9AAAAAAAA --------------ms080104000500060000070407-- From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 14:11:42 2005 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 54FAB16A4CE for ; Mon, 21 Feb 2005 14:11:42 +0000 (GMT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id E25AA43D5A for ; Mon, 21 Feb 2005 14:11:39 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from [193.64.42.134] (h86.vuokselantie10.fi [193.64.42.134]) by silver.he.iki.fi (8.13.1/8.11.4) with ESMTP id j1LEBbKU061480 for ; Mon, 21 Feb 2005 16:11:38 +0200 (EET) (envelope-from pete@he.iki.fi) Message-ID: <4219EC1D.7020401@he.iki.fi> Date: Mon, 21 Feb 2005 16:11:41 +0200 From: Petri Helenius User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 21 Feb 2005 14:16:36 +0000 Subject: 4M page size 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, 21 Feb 2005 14:11:42 -0000 Is there a way currently to utilize 4M page size with FreeBSD for large data set programs (to optimize TLB misses)? Pete From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 14:44:12 2005 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 25B0616A4D0 for ; Mon, 21 Feb 2005 14:44:12 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE57E43D1F for ; Mon, 21 Feb 2005 14:44:11 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j1LEidWl042397; Mon, 21 Feb 2005 07:44:40 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4219F349.8010106@samsco.org> Date: Mon, 21 Feb 2005 07:42:17 -0700 From: Scott User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Petri Helenius References: <4219EC1D.7020401@he.iki.fi> In-Reply-To: <4219EC1D.7020401@he.iki.fi> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org cc: freebsd-hackers@freebsd.org Subject: Re: 4M page size 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, 21 Feb 2005 14:44:12 -0000 Petri Helenius wrote: > > Is there a way currently to utilize 4M page size with FreeBSD for large > data set programs (to optimize TLB misses)? > > Pete > FreeBSD/i386 uses 4MB pages to hold the kernel text and data, but there is no way (to my knowledge) to ask the pmap layer for a 4MB page after that either from the kernel or from userland. However, it's also my understanding that most non-Xeon CPUs only have a 4kb TLB, and 4MB pages are just broken down into 4kb chunks for it. Scott From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 15:16:43 2005 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 78E1616A4CE; Mon, 21 Feb 2005 15:16:43 +0000 (GMT) Received: from f26.mail.ru (f26.mail.ru [194.67.57.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 035FB43D3F; Mon, 21 Feb 2005 15:16:43 +0000 (GMT) (envelope-from shmukler@mail.ru) Received: from mail by f26.mail.ru with local id 1D3FIe-000D0P-00; Mon, 21 Feb 2005 18:16:40 +0300 Received: from [24.185.245.107] by win.mail.ru with HTTP; Mon, 21 Feb 2005 18:16:40 +0300 From: Igor Shmukler To: Robert Watson Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [24.185.245.107] Date: Mon, 21 Feb 2005 18:16:40 +0300 In-Reply-To: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: cc: freebsd-hackers@freebsd.org Subject: Re[2]: vn_fullpath() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Igor Shmukler List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2005 15:16:43 -0000 Robert and David, Thank you for your help. > It depends a lot on the requirements. There are some nasty edge cases > where the process of determining a name for an object can be quite > expensive. Here's one of them: > > ln /usr/local/etc/apache/httpd.conf /usr/local/etc/apache.old/httpd.conf > reboot > apachectl start > rm /usr/local/etc/apache/httpd.conf > > Now generate the name of the file that Apache has open. Note that you > can't just look in the name cache, because the object has a name but the > name used to open the object has been invalidated. And UFS even knows it > has a name, because the link count remains non-zero when the unlink of one > of the names occurs -- but the only way it can find the other name is to > search the file system. > > So the first thing to do is to decied what your requirements are: are you > willing to fail in the edge cases like the above? If so, life is a lot > easier :-). I guess I am willing to fail :). Perhaps in some distant future, we will look into the nasty corner cases, but for now, as long as I get a name, it will do. We don't even mind the hardlinks so much, but we cannot afford to use existing vn_fullpath() because it does not guarantee "anything". Thank you, Igor From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 16:43:46 2005 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 EAF4416A4CE for ; Mon, 21 Feb 2005 16:43:46 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A8BD43D46 for ; Mon, 21 Feb 2005 16:43:46 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with SMTP id 3428846B37; Mon, 21 Feb 2005 11:43:46 -0500 (EST) Date: Mon, 21 Feb 2005 16:42:10 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Igor Shmukler In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Re[2]: vn_fullpath() 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, 21 Feb 2005 16:43:47 -0000 On Mon, 21 Feb 2005, Igor Shmukler wrote: > > So the first thing to do is to decied what your requirements are: are you > > willing to fail in the edge cases like the above? If so, life is a lot > > easier :-). > > I guess I am willing to fail :). Perhaps in some distant future, we will > look into the nasty corner cases, but for now, as long as I get a name, > it will do. We don't even mind the hardlinks so much, but we cannot > afford to use existing vn_fullpath() because it does not guarantee > "anything". There are a couple of issues to look at, if we can allow some obscure edge cases to fail, but want it to "generally" work: (1) File systems that don't use the centralized name cache facility, such as procfs and devfs. (2) What to do when useful paths fall out of the name cache. I think the answer to (1) is to let those file systems simply provide a vnode operation to answer the question: they're almost always synthetic file systems, or they would be using the cache. So I'm almost thinking: VOP_GETPATH(vp, char *buf) The call would say to the file system "Tell me the path from your root to the vnode in question". On the (2) front, I think there are a couple of possibilities -- the decision to let intermediate paths fall out of the name cache is an explicit design choice to reduce the vnode burden on the system. We can either back off that design choice forcing intermediate nodes to generally remain in the cache, or we can accept it and address it. My leaning is to add a new rule: "the last directory used to reach a file must not fall out of the cache if the file hasn't fallen out of the cache" -- with this in place, we can generate path names for most objects by walking back up the tree if elements are missing, either directly, or by asking the file system using the above call. It's the last step from the file back to a parent directory that is the hardest. Alternatively, we can back off dropping the intermediate nodes and see to what extent that hurts vs. helps. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 17:26:37 2005 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 198FA16A4CE for ; Mon, 21 Feb 2005 17:26:37 +0000 (GMT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD23843D31 for ; Mon, 21 Feb 2005 17:26:35 +0000 (GMT) (envelope-from mhersant@comcast.net) Received: from [192.168.2.102] (c-24-22-136-36.client.comcast.net[24.22.136.36]) by comcast.net (sccrmhc13) with ESMTP id <2005022117263301600sk1ihe>; Mon, 21 Feb 2005 17:26:33 +0000 Message-ID: <421A19C7.5080207@comcast.net> Date: Mon, 21 Feb 2005 09:26:31 -0800 From: Matt User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <4219A362.2050800@comcast.net> <20050221042738.T683@odysseus.silby.com> In-Reply-To: <20050221042738.T683@odysseus.silby.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Freebsd-hackers@freebsd.org Subject: Re: remote connection to mysql 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, 21 Feb 2005 17:26:37 -0000 Mike Silbersack wrote: > > On Mon, 21 Feb 2005, Matt wrote: > >> Hi, >> >> I'm trying to connect remotely to my database server. It is MySQL >> 4.1.7 which I install from ports. I created a user with permissions >> to connect from any remote location. I'm using Perl DBI, like this: > > > Are you sure that you set up MySQL to accept TCP connections? I think > it defaults to local sockets only; you can verify by running netstat > -na and seeing if there's anything listening on port 3306. > > Mike "Silby" Silbersack > Thanks for your reply. I do see this in netstat output: tcp4 0 0 192.168.2.23.3306 *.* LISTEN From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 20:13:28 2005 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 9EED316A4CE; Mon, 21 Feb 2005 20:13:28 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3006643D41; Mon, 21 Feb 2005 20:13:28 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.1/8.13.1) with ESMTP id j1LKDJPT042188; Mon, 21 Feb 2005 12:13:23 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200502212013.j1LKDJPT042188@gw.catspoiler.org> Date: Mon, 21 Feb 2005 12:13:19 -0800 (PST) From: Don Lewis To: rwatson@FreeBSD.org In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-hackers@FreeBSD.org Subject: Re: Re[2]: vn_fullpath() 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, 21 Feb 2005 20:13:28 -0000 On 21 Feb, Robert Watson wrote: > > On Mon, 21 Feb 2005, Igor Shmukler wrote: > >> > So the first thing to do is to decied what your requirements are: are you >> > willing to fail in the edge cases like the above? If so, life is a lot >> > easier :-). >> >> I guess I am willing to fail :). Perhaps in some distant future, we will >> look into the nasty corner cases, but for now, as long as I get a name, >> it will do. We don't even mind the hardlinks so much, but we cannot >> afford to use existing vn_fullpath() because it does not guarantee >> "anything". > > There are a couple of issues to look at, if we can allow some obscure edge > cases to fail, but want it to "generally" work: > > (1) File systems that don't use the centralized name cache facility, such > as procfs and devfs. > > (2) What to do when useful paths fall out of the name cache. > > I think the answer to (1) is to let those file systems simply provide a > vnode operation to answer the question: they're almost always synthetic > file systems, or they would be using the cache. So I'm almost thinking: > > VOP_GETPATH(vp, char *buf) > > The call would say to the file system "Tell me the path from your root to > the vnode in question". > > On the (2) front, I think there are a couple of possibilities -- the > decision to let intermediate paths fall out of the name cache is an > explicit design choice to reduce the vnode burden on the system. We can > either back off that design choice forcing intermediate nodes to generally > remain in the cache, or we can accept it and address it. My leaning is to > add a new rule: "the last directory used to reach a file must not fall out > of the cache if the file hasn't fallen out of the cache" -- with this in > place, we can generate path names for most objects by walking back up the > tree if elements are missing, either directly, or by asking the file > system using the above call. It's the last step from the file back to a > parent directory that is the hardest. Alternatively, we can back off > dropping the intermediate nodes and see to what extent that hurts vs. > helps. I seem to recall that DragonFly keeps the intermediate nodes. From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 21:47:25 2005 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 BD50116A4CE; Mon, 21 Feb 2005 21:47:25 +0000 (GMT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D04143D49; Mon, 21 Feb 2005 21:47:25 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) j1LLlP0e010675; Mon, 21 Feb 2005 13:47:25 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id j1LLlP7n010674; Mon, 21 Feb 2005 13:47:25 -0800 (PST) (envelope-from dillon) Date: Mon, 21 Feb 2005 13:47:25 -0800 (PST) From: Matthew Dillon Message-Id: <200502212147.j1LLlP7n010674@apollo.backplane.com> To: Don Lewis References: <200502212013.j1LKDJPT042188@gw.catspoiler.org> cc: freebsd-hackers@freebsd.org cc: rwatson@freebsd.org Subject: Re: Re[2]: vn_fullpath() 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, 21 Feb 2005 21:47:25 -0000 :> tree if elements are missing, either directly, or by asking the file :> system using the above call. It's the last step from the file back to a :> parent directory that is the hardest. Alternatively, we can back off :> dropping the intermediate nodes and see to what extent that hurts vs. :> helps. : :I seem to recall that DragonFly keeps the intermediate nodes. There's no way to backport that, it would be hundreds of man hours of work. DragonFly uses a totally different namecache topology now, one that is mandatory and which guarentees the existance of intermediate nodes. You'd have to implement something similar to libc's getcwd code. e.g. ".." through and scan each directory to find the matching inode if the namecache entry is not present. It actually wouldn't be too hard to do. It wouldn't be efficient, but vn_fullpath() is rarely used so it shouldn't be a problem. -Matt Matthew Dillon From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 22:11:20 2005 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 980E016A4CE for ; Mon, 21 Feb 2005 22:11:20 +0000 (GMT) Received: from freebsd.czest.pl (silver.iplus.pl [80.48.250.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7ECA443D45 for ; Mon, 21 Feb 2005 22:11:19 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.12.10/8.12.9) with ESMTP id j1LMGv9r064225 for ; Mon, 21 Feb 2005 22:16:57 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.12.10/8.12.9/Submit) id j1LMGuZR064224 for freebsd-hackers@FreeBSD.org; Mon, 21 Feb 2005 22:16:57 GMT (envelope-from dunstan) Date: Mon, 21 Feb 2005 22:16:56 +0000 From: "Wojciech A. Koszek" To: freebsd-hackers@FreeBSD.org Message-ID: <20050221221656.GA64212@freebsd.czest.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: [PATCH] Dangerous jail()<->ioctl interactions. 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, 21 Feb 2005 22:11:20 -0000 Hello hackers, I would like to let you know I've been doing [partial] audit of ioctl() code. There are some places, which may interest you. These are: sys/cam/cam_xpt.c sys/contrib/ipfilter/netinet/ip_fil.c sys/contrib/pf/net/pf_ioctl.c sys/dev/ata/ata-all.c sys/dev/md/md.c sys/geom/geom_ctl.c Those files contain ioctl()s, which let us to interact between jailed processes and each of these subsystems. Although files like /dev/mdctl should not appear in /dev with normal DEVFS rulesets, I think it would be better if FreeBSD had those ioctl() disabled within jail()ed environment. There is probably one reason for keeping ipf/pf, since someone may want fetch information about NATed connections. How to repeat? Reproducing is very simple. Test environment: # jail / hostname 127.0.0.1 /bin/csh After this step you can monipulate ATA devices: # atacontrol detach Create/remove md(4) devices: # mdconfig -a -t malloc -s 100M # mdconfig -d -u md0 Manipulate cam(4) devices: # camcontrol reset cd0 # camcontrol eject cd0 Manipulate gbde devices: # mdconfig -a -t malloc -s 10M # gbde Manipulate ipnat/ipf/pf rules: # ipnat -f /etc/ipnat.conf # ipnat -CF a # pfctl -f /etc/pf.some.rules # ipf -f /etc/ipf.some.rules Patches with simple suser() tests added are available at: (sys/cam/cam_xpt.c): http://FreeBSD.czest.pl/dunstan/FreeBSD/diff.1.jail (sys/contrib/ipfilter/netinet/ip_fil.c): http://FreeBSD.czest.pl/dunstan/FreeBSD/diff.2.jail (/usr/src/sys/contrib/pf/net/pf_ioctl.c): http://FreeBSD.czest.pl/dunstan/FreeBSD/diff.3.jail (/usr/src/sys/dev/ata/ata-all.c): http://FreeBSD.czest.pl/dunstan/FreeBSD/diff.4.jail (If someone would like to commit it, I can also write style patch). (/usr/src/sys/dev/md/md.c): http://FreeBSD.czest.pl/dunstan/FreeBSD/diff.5.jail (/usr/src/sys/geom/geom_ctl.c): http://FreeBSD.czest.pl/dunstan/FreeBSD/diff.6.jail And comments are welcome. If you find some of these patches useful, please let me know. Regards, -- * Wojciech A. Koszek && dunstan@FreeBSD.czest.pl From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 06:27:17 2005 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 24BAB16A4CE for ; Tue, 22 Feb 2005 06:27:17 +0000 (GMT) Received: from agava.mipt.ru (ofc2.agava.net [81.5.88.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66F9F43D3F for ; Tue, 22 Feb 2005 06:27:16 +0000 (GMT) (envelope-from rzhe@agava.com) Received: by agava.mipt.ru (Postfix, from userid 426) id 1A037877CBC; Tue, 22 Feb 2005 09:26:35 +0300 (MSK) Received: from mailhub (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id E9C08877DFF for ; Tue, 22 Feb 2005 09:26:34 +0300 (MSK) Received: from rzhe.agava-dubna.local (unknown [213.33.195.194]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by agava.mipt.ru (Postfix) with ESMTP id 9C3FC877CBC for ; Tue, 22 Feb 2005 09:26:34 +0300 (MSK) Date: Tue, 22 Feb 2005 09:27:13 +0300 From: Dmitry Agaphonov To: freebsd-hackers@freebsd.org Message-Id: <20050222092713.43ed42c3.rzhe@agava.com> Organization: AGAVA Software X-Mailer: Sylpheed version 0.9.4claws (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Kernel threads & libc 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, 22 Feb 2005 06:27:17 -0000 Hello all, I'm forced to implement kernel threads in application not via LinuxThreads library (because it doesn't compile on FreeBSD 4.10 with gcc-3.4.4, too much errors while processing /usr/src code), but using rfork_thread(3). And the main question I currently stuck on is which libc functions I need to wrap to make them thread-safe and reentrant on multiprocessor systems, since rfork_thread(3)s are created with RFMEM flag and libc_r is not used. Could somebody please give ideas or point me to the appropriate reading? Thanks! From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 14:41:05 2005 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 5485516A4CE for ; Mon, 21 Feb 2005 14:41:05 +0000 (GMT) Received: from mother.ludd.ltu.se (mother.ludd.ltu.se [130.240.16.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id E984A43D1D for ; Mon, 21 Feb 2005 14:41:03 +0000 (GMT) (envelope-from pb@ludd.ltu.se) Received: from brother.ludd.ltu.se (brother.ludd.ltu.se [130.240.16.78]) j1LEf2tw002320 for ; Mon, 21 Feb 2005 15:41:02 +0100 (MET) Received: from brother.ludd.ltu.se (localhost [127.0.0.1]) j1LEf1CG012910 for ; Mon, 21 Feb 2005 15:41:02 +0100 (MET) Received: (from pb@localhost) by brother.ludd.ltu.se (8.12.10+Sun/8.12.2/Submit) id j1LEf1O4012908 for freebsd-hackers@freebsd.org; Mon, 21 Feb 2005 15:41:01 +0100 (MET) From: Peter B Message-Id: <200502211441.j1LEf1O4012908@brother.ludd.ltu.se> To: freebsd-hackers@freebsd.org Date: Mon, 21 Feb 2005 15:41:01 +0100 (MET) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 22 Feb 2005 13:12:13 +0000 Subject: Advanced USB snooping 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, 21 Feb 2005 14:41:05 -0000 Is it possible to program an "ordinary" (like Intel 82801CA/CAM (ICH3)) USB host controller into acting as an usb device instead? (just like scsi can). Idea: M$Win-Usb -> FreeBSD-USB#1 .. software .. FreeBSD-USB#2 -> Device The advantage would be then to possible use scripts to debug protocol in order to port drivers to freebsd. Ref: ftp://download.intel.com/design/chipsets/e7500/datashts/29073303.pdf From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 15:22:02 2005 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 4BF7E16A4CE for ; Mon, 21 Feb 2005 15:22:02 +0000 (GMT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0042643D2F for ; Mon, 21 Feb 2005 15:22:00 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from [193.64.42.134] (h86.vuokselantie10.fi [193.64.42.134]) by silver.he.iki.fi (8.13.1/8.11.4) with ESMTP id j1LFLxZb072458; Mon, 21 Feb 2005 17:21:59 +0200 (EET) (envelope-from pete@he.iki.fi) Message-ID: <4219FC99.3090002@he.iki.fi> Date: Mon, 21 Feb 2005 17:22:01 +0200 From: Petri Helenius User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scott References: <4219EC1D.7020401@he.iki.fi> <4219F349.8010106@samsco.org> In-Reply-To: <4219F349.8010106@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 22 Feb 2005 13:12:13 +0000 cc: freebsd-hackers@freebsd.org Subject: Re: 4M page size 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, 21 Feb 2005 15:22:02 -0000 Scott wrote: > Petri Helenius wrote: > > FreeBSD/i386 uses 4MB pages to hold the kernel text and data, but there > is no way (to my knowledge) to ask the pmap layer for a 4MB page after > that either from the kernel or from userland. However, it's also my > understanding that most non-Xeon CPUs only have a 4kb TLB, and 4MB pages > are just broken down into 4kb chunks for it. Does this hold true for amd64 too? And what does happen to the page size if the memory is mapped to userland? (probably 4k?) (I assume mmap does 4k, not 4M pages?) Pete From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 17:03:03 2005 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 331B216A4CE for ; Mon, 21 Feb 2005 17:03:03 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 927DF43D45 for ; Mon, 21 Feb 2005 17:03:01 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b202.otenet.gr [212.205.244.210]) j1LH2pxP015750 for ; Mon, 21 Feb 2005 19:02:52 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j1LH2heK002289 for ; Mon, 21 Feb 2005 19:02:44 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j1LGxpK0002253; Mon, 21 Feb 2005 18:59:51 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 21 Feb 2005 18:59:51 +0200 From: Giorgos Keramidas To: Kathy Quinlan Message-ID: <20050221165951.GA2124@gothmog.gr> References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> <20050221065844.GB81063@cirb503493.alcatel.com.au> <4219C912.2070207@kaqelectronics.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4219C912.2070207@kaqelectronics.dyndns.org> X-Mailman-Approved-At: Tue, 22 Feb 2005 13:12:13 +0000 cc: freebsd-hackers@freebsd.org Subject: Re: Error in my C programming 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, 21 Feb 2005 17:03:03 -0000 On 2005-02-21 19:42, Kathy Quinlan wrote: > Peter Jeremy wrote: > > OK it was all to do with the comments it did not like the //comments > ARRGGHHHH the rest of the errors were bogus as soon as I changed EVERY > comment over to the ANSI C /*comments*/ it now works (oh and removed the > #pragma directives from a c compiler for the AVR uC I will have to put > all the different complier directives in different #ifdef tags :) The quotations seem a bit messed up, so I don't know if Peter Jeremy or Kathy Quinlan wrote the above paragraph. Whoever the author was though, it may be worth to note that C99 *does* allow single-line comments delimited by //. The correct way to invoke the C compiler in C99-mode depends, of course, on the compiler and it enables far more features than // comments. For GCC, the correct option to use is -std=c99. Using this program as a test, you can check for yourself (note that the comments of the sort shown in the following program are EXTREMELY bad style; they only serve as a test for //-style comments): $ cat -n foo.c 1 #include // For printf() 2 #include // For EXIT_SUCCESS 3 4 int 5 main(void) 6 { 7 printf("Hello C99 world\n"); // Print a message. 8 return (EXIT_SUCCESS); // Terminate program. 9 } Compiling in C89 mode (which does not allow // comments) gives: $ gcc -O -Wall -std=c89 foo.c foo.c:1:23: warning: extra tokens at end of #include directive foo.c:2:24: warning: extra tokens at end of #include directive foo.c: In function `main': foo.c:7: error: syntax error before '/' token $ Compiling in C99 mode, works as expected: $ gcc -O -Wall -std=c99 foo.c $ ./a.out Hello C99 world $ From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 14:22:06 2005 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 9F89116A4D1 for ; Tue, 22 Feb 2005 14:22:06 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id E602943D4C for ; Tue, 22 Feb 2005 14:22:05 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id F30DA530C; Tue, 22 Feb 2005 15:22:03 +0100 (CET) Received: from xps.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id C349D5308; Tue, 22 Feb 2005 15:21:33 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id 4711933C3E; Tue, 22 Feb 2005 15:21:33 +0100 (CET) To: Giorgos Keramidas References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> <20050221065844.GB81063@cirb503493.alcatel.com.au> <4219C912.2070207@kaqelectronics.dyndns.org> <20050221165951.GA2124@gothmog.gr> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 22 Feb 2005 15:21:33 +0100 In-Reply-To: <20050221165951.GA2124@gothmog.gr> (Giorgos Keramidas's message of "Mon, 21 Feb 2005 18:59:51 +0200") Message-ID: <86is4kad5e.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: freebsd-hackers@freebsd.org cc: Kathy Quinlan Subject: Re: Error in my C programming 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, 22 Feb 2005 14:22:06 -0000 Giorgos Keramidas writes: > The quotations seem a bit messed up, so I don't know if Peter Jeremy or > Kathy Quinlan wrote the above paragraph. Whoever the author was though, > it may be worth to note that C99 *does* allow single-line comments > delimited by //. which leads to the following code being well-formed and well-defined in both C89 and C99 but having different semantics... #include int main(void) { int a, b, c; a =3D 10; b =3D 2; c =3D a //* oops! */ -b; switch (c) { case 8: printf("C99 or C++\n"); break; case -5: printf("C89\n"); break; default: printf("can't happen\n"); break; } return 0; } This is actually documented in the C99 rationale. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 15:37:17 2005 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 9284916A4CE for ; Tue, 22 Feb 2005 15:37:17 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CAD343D41 for ; Tue, 22 Feb 2005 15:37:17 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j1MFb8wq028172; Tue, 22 Feb 2005 09:37:08 -0600 (CST) (envelope-from dan) Date: Tue, 22 Feb 2005 09:37:08 -0600 From: Dan Nelson To: Dmitry Agaphonov Message-ID: <20050222153708.GD253@dan.emsphone.com> References: <20050222092713.43ed42c3.rzhe@agava.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050222092713.43ed42c3.rzhe@agava.com> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-hackers@freebsd.org Subject: Re: Kernel threads & libc 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, 22 Feb 2005 15:37:17 -0000 In the last episode (Feb 22), Dmitry Agaphonov said: > I'm forced to implement kernel threads in application not via > LinuxThreads library (because it doesn't compile on FreeBSD 4.10 with > gcc-3.4.4, too much errors while processing /usr/src code), but using > rfork_thread(3). Why not build the LinuxThreads port with the system's compiler? It's not C++ code, so you can link it to code compiled with any compiler (just like libc, which is built with gcc 2.95 as well). Just because your application may require gcc 3.4 doesn't mean that all supporting libraries have to be built with it too. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 16:25:31 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1467116A52C; Tue, 22 Feb 2005 16:25:31 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.3/8.13.1) with ESMTP id j1MGPOKC006534; Tue, 22 Feb 2005 11:25:24 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.3/8.13.1/Submit) id j1MGPOVj006533; Tue, 22 Feb 2005 11:25:24 -0500 (EST) (envelope-from green) Date: Tue, 22 Feb 2005 11:25:23 -0500 From: Brian Fundakowski Feldman To: Peter B Message-ID: <20050222162523.GB966@green.homeunix.org> References: <200502211441.j1LEf1O4012908@brother.ludd.ltu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200502211441.j1LEf1O4012908@brother.ludd.ltu.se> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: Advanced USB snooping 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, 22 Feb 2005 16:25:31 -0000 On Mon, Feb 21, 2005 at 03:41:01PM +0100, Peter B wrote: > > Is it possible to program an "ordinary" (like Intel 82801CA/CAM (ICH3)) USB > host controller into acting as an usb device instead? (just like scsi can). > > Idea: > M$Win-Usb -> FreeBSD-USB#1 .. software .. FreeBSD-USB#2 -> Device > > The advantage would be then to possible use scripts to debug protocol in order > to port drivers to freebsd. > > > Ref: ftp://download.intel.com/design/chipsets/e7500/datashts/29073303.pdf Wouldn't being able to do that violate the design criteria of USB? -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 16:41:59 2005 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 7CCEB16A4CE for ; Tue, 22 Feb 2005 16:41:59 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77A5443D5A for ; Tue, 22 Feb 2005 16:41:58 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j1MGfsHw034203 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 22 Feb 2005 17:41:56 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j1MGer55028326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Feb 2005 17:40:54 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j1MGercS043073; Tue, 22 Feb 2005 17:40:53 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j1MGeqNZ043072; Tue, 22 Feb 2005 17:40:52 +0100 (CET) (envelope-from ticso) Date: Tue, 22 Feb 2005 17:40:52 +0100 From: Bernd Walter To: Peter B Message-ID: <20050222164051.GG14312@cicely12.cicely.de> References: <200502211441.j1LEf1O4012908@brother.ludd.ltu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200502211441.j1LEf1O4012908@brother.ludd.ltu.se> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: freebsd-hackers@freebsd.org Subject: Re: Advanced USB snooping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2005 16:41:59 -0000 On Mon, Feb 21, 2005 at 03:41:01PM +0100, Peter B wrote: > > Is it possible to program an "ordinary" (like Intel 82801CA/CAM (ICH3)) USB > host controller into acting as an usb device instead? (just like scsi can). > > Idea: > M$Win-Usb -> FreeBSD-USB#1 .. software .. FreeBSD-USB#2 -> Device No - this wonn't work. Host Controllers are dedicated host controllers. Kombinations exist for USB-on-the-go, but they are intended for use with microcontrolers in devices and are basicly nothing more than a host controller and a device controller with shared port lines. Their purpose is that you can connect you picture camera directly to your printer and so on. If you use a microcontroller you can use normale device controllers, such as the PDIUSBD12 or the ISP1581 - there are many others as well. But the they are all limited to work as a single device and not as a path through device. Even a USB hub is very limited in what it can do in repect of delays. All USB sniffers I know run with some kind of ASIC, which is not very hard to do if you are familar with such devices. The hard work is doing software to present the sniffed data in a usefull way. There are some cheap USB sniffers for full and low speed available on the market. Their limitation is usually that they don't tell you anything about signal quality and such. > The advantage would be then to possible use scripts to debug protocol in order > to port drivers to freebsd. Sniffer Software exist at driver level at least for Windows and NetBSD derived stacks and I would be surprised if there isn't anything available for Linux as well. Hardware sniffers are very usefull if you are into debugging host controllers and sometimes device controllers on your own, but for debugging device drivers it's rarely usefull. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 19:06:10 2005 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 5604016A4CE for ; Tue, 22 Feb 2005 19:06:10 +0000 (GMT) Received: from mail-svr1.cs.utah.edu (mail-svr1.cs.utah.edu [155.98.64.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C64843D54 for ; Tue, 22 Feb 2005 19:06:10 +0000 (GMT) (envelope-from saggarwa@cs.utah.edu) Received: from localhost (localhost [127.0.0.1]) by mail-svr1.cs.utah.edu (Postfix) with ESMTP id E1525346E0 for ; Tue, 22 Feb 2005 12:06:09 -0700 (MST) Received: from mail-svr1.cs.utah.edu ([127.0.0.1]) by localhost (mail-svr1.cs.utah.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03862-02 for ; Tue, 22 Feb 2005 12:06:09 -0700 (MST) Received: from antitrust.cs.utah.edu (antitrust.cs.utah.edu [155.98.65.29]) by mail-svr1.cs.utah.edu (Postfix) with ESMTP id 9BB3D346D3 for ; Tue, 22 Feb 2005 12:06:09 -0700 (MST) Received: by antitrust.cs.utah.edu (Postfix, from userid 4973) id 9127E108E30; Tue, 22 Feb 2005 12:06:09 -0700 (MST) Received: from localhost (localhost [127.0.0.1]) by antitrust.cs.utah.edu (Postfix) with ESMTP id 8EA8C108E2F for ; Tue, 22 Feb 2005 12:06:09 -0700 (MST) Date: Tue, 22 Feb 2005 12:06:09 -0700 (MST) From: Siddharth Aggarwal To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at cs.utah.edu Subject: giving up on 1 buffers error messsage 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, 22 Feb 2005 19:06:10 -0000 syncing disks... 54 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up on 1 buffers Hi, I am referring to the message when the code in kern_shutdown.c in bsd 4.10 is called at the time of boot() system call My understanding is that this message tells us that 1 buffer from the buffer cache was not successfully flushed to disk, since the last call to sync(). Is that right? In that case what happens to this buffer? Is it discarded and assume that fsck will fix this on reboot? Since the syncer process runs periodically, can this error message be avoided if we wait long enough to guarantee flushing to disk (I have tried with DELAYS upto 30 seconds but I still get the error sometimes). I am actually trying to use this same code at a different point in time (not during shutdown, but to take a checkpoint), so I am not sure if that contributes to this error message? From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 21:55:04 2005 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 C71D316A4CF for ; Tue, 22 Feb 2005 21:55:04 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35B7A43D1D for ; Tue, 22 Feb 2005 21:55:04 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j1MLswHw041551 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 22 Feb 2005 22:55:01 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j1MLrv55037527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Feb 2005 22:53:58 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j1MLrvP1044676; Tue, 22 Feb 2005 22:53:57 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j1MLruE9044675; Tue, 22 Feb 2005 22:53:57 +0100 (CET) (envelope-from ticso) Date: Tue, 22 Feb 2005 22:53:56 +0100 From: Bernd Walter To: Peter B Message-ID: <20050222215356.GM14312@cicely12.cicely.de> References: <20050222164051.GG14312@cicely12.cicely.de> <200502222000.j1MK0w5U015905@brother.ludd.ltu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200502222000.j1MK0w5U015905@brother.ludd.ltu.se> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: freebsd-hackers@freebsd.org cc: ticso@cicely.de Subject: Re: Advanced USB snooping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2005 21:55:05 -0000 On Tue, Feb 22, 2005 at 09:00:58PM +0100, Peter B wrote: > >> > >> Is it possible to program an "ordinary" (like Intel 82801CA/CAM (ICH3)) USB > >> host controller into acting as an usb device instead? (just like scsi can). > >> > >> Idea: > >> M$Win-Usb -> FreeBSD-USB#1 .. software .. FreeBSD-USB#2 -> Device > > > >No - this wonn't work. > >Host Controllers are dedicated host controllers. > > >If you use a microcontroller you can use normale device controllers, > >such as the PDIUSBD12 or the ISP1581 - there are many others as well. > >But the they are all limited to work as a single device and not as a > >path through device. > > If I can connect it to the computer from the "other" side it solves the problem > I think. But it does behave a a sinlge device only - and even that not in every aspect. They are limited to the number of channels they can do and so on. > >All USB sniffers I know run with some kind of ASIC, which is not very > >hard to do if you are familar with such devices. > > Fpga is doable, asic requires a large factory run. > Unless there is a ready to buy asic. FPGA are ASIC - just a special kind of. Take an ISP1106 and an 48MHz oscillator with an 48MHz capable FPGA and you should get it runninng. 48MHz is the usuall clock used for oversampling the 12MHz line signal. The ISP1106 does the electrical part of the bus for you. > >> The advantage would be then to possible use scripts to debug protocol > >> in order to port drivers to freebsd. > > >Sniffer Software exist at driver level at least for Windows and NetBSD > >derived stacks and I would be surprised if there isn't anything > >available for Linux as well. > >Hardware sniffers are very usefull if you are into debugging host > >controllers and sometimes device controllers on your own, but for > >debugging device drivers it's rarely usefull. > > The catch with normal setup is that you need to poke around in the m$-win > machine which can cause other problems. So the idea would be to just insert > some device with one male + female connector and a connection to the snoop > computer. So that the m$-win computer don't need any special software. > Also m$-win host software snoop lack the nice programming enviroment of unix. > In order to filter out the stuff that one really wants. Public available Windows software can output ascii. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 22:18:06 2005 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 96E7C16A4CE for ; Tue, 22 Feb 2005 22:18:06 +0000 (GMT) Received: from mail23.sea5.speakeasy.net (mail23.sea5.speakeasy.net [69.17.117.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53F6543D54 for ; Tue, 22 Feb 2005 22:18:06 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 19920 invoked from network); 22 Feb 2005 22:18:06 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 22 Feb 2005 22:18:05 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j1MMHvg7017494; Tue, 22 Feb 2005 17:17:58 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Tue, 22 Feb 2005 15:34:41 -0500 User-Agent: KMail/1.6.2 References: <000801c51327$0e2bf020$58e243a4@ash> <20050215132020.GA376@pm514-9.comsys.ntu-kpi.kiev.ua> In-Reply-To: <20050215132020.GA376@pm514-9.comsys.ntu-kpi.kiev.ua> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200502221534.41979.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: Andrey Simonenko cc: Ashwin Chandra Subject: Re: Kernel monitor, the return 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, 22 Feb 2005 22:18:06 -0000 On Tuesday 15 February 2005 08:20 am, Andrey Simonenko wrote: > On Mon, Feb 14, 2005 at 10:24:50PM -0800, Ashwin Chandra wrote: > > In trying to create a simple kernel thread that prints out all > > the processes data and stack size, i still get a panic fault > > (vm_fault on no entry) at the printf statement...ive narrowed > > it down to the ru_idrss variable that is causing the problem, > > Definitely ru_idrss cannot cause any error, may be you made > such desition, because arguments are pushed to the stack > in the reverse order. p->p_stats pointer causes the error. > > > im not sure why > > (I think that) If some process is not running, then you cannot > use p->p_stats without additional checks for memory p->p_stats > points to, since p->p_stats points to u_stats in struct user{}, > which can be swapped out if a process is not running. > > Actually you can read this in the comment before struct user{} > in /sys/sys/user.h. > > >. I thought maybe I was not locking properly or > > obseriving correct mutexes, but I have tried everything. > > You'll get an error at some time, because of incorrect usage > (really not usage) of locks. > > > If anyone > > knows why the fault is occurring at the printf, please let me know. =) > > Following code works on my system: > > ---- > > sx_slock(&allproc_lock); > > FOREACH_PROC_IN_SYSTEM(p) { > mtx_lock_spin(&sched_lock); > PROC_LOCK(p); > printf("proc %ld:", (long)p->p_pid); > if ((p->p_sflag & PS_INMEM) && p->p_stats != NULL) > printf(" ru_isrss %ld, rui_idrss %ld\n", p->p_stats->p_ru.ru_isrss, > p->p_stats->p_ru.ru_idrss); else { > if (!(p->p_sflag & PS_INMEM)) > printf(" !PS_INMEM"); > if (p->p_stats == NULL) > printf(" p_stats == NULL"); > } > printf("\n"); > PROC_UNLOCK(p); > mtx_unlock(&sched_lock); > } > > sx_sunlock(&allproc_lock); You don't need sched_lock to check PS_INMEM, proc lock is sufficient (PS_INMEM is magic this way). If you did though, you would lock proc first, then sched_lock. You can _not_ lock a regular mutex (proc lock) after a spin mutex (sched_lock) or you can deadlock. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 01:22:34 2005 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 F387A16A4CE for ; Wed, 23 Feb 2005 01:22:33 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8B0F43D67 for ; Wed, 23 Feb 2005 01:22:33 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 759417A403 for ; Tue, 22 Feb 2005 17:22:33 -0800 (PST) Message-ID: <421BDAD9.5060304@elischer.org> Date: Tue, 22 Feb 2005 17:22:33 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en, hu MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: realplay and 4.11 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, 23 Feb 2005 01:22:34 -0000 Anyone made this combination work? I've reinstalled all the packages so all teh dependencies shoudl be there but the command "realplay" results in : /usr/local/lib/RealPlayer/realplay.bin: /lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/libstdc++.so.5) Anyone with a clue as to what this is trying to tell me? From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 02:22:12 2005 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 4CC0416A4CE for ; Wed, 23 Feb 2005 02:22:12 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA1EF43D31 for ; Wed, 23 Feb 2005 02:22:11 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j1N2M7pG038793; Tue, 22 Feb 2005 20:22:07 -0600 (CST) (envelope-from dan) Date: Tue, 22 Feb 2005 20:22:07 -0600 From: Dan Nelson To: Julian Elischer Message-ID: <20050223022207.GH253@dan.emsphone.com> References: <421BDAD9.5060304@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <421BDAD9.5060304@elischer.org> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: hackers@freebsd.org Subject: Re: realplay and 4.11 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, 23 Feb 2005 02:22:12 -0000 In the last episode (Feb 22), Julian Elischer said: > Anyone made this combination work? > > I've reinstalled all the packages so all teh dependencies shoudl be > there but the command "realplay" results in : > > /usr/local/lib/RealPlayer/realplay.bin: /lib/libgcc_s.so.1: version > `GCC_3.3' > not found (required by /usr/lib/libstdc++.so.5) > > Anyone with a clue as to what this is trying to tell me? linux_base-8 is apparently not new enough: $ pkg_which /usr/compat/linux/lib/libgcc_s.so.1 linux_base-8-8.0_6 $ nm /usr/compat/linux/lib/libgcc_s.so.1 | grep GCC_ 00000000 A GCC_3.0 The SUSE-9.0 machines here at work do provide the GCC_3.3 symbol, so maybe try linux_base-suse-9.2, or linux_base-rh-9. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 02:26:55 2005 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 DDCD016A4CE for ; Wed, 23 Feb 2005 02:26:55 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACDDC43D2D for ; Wed, 23 Feb 2005 02:26:55 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 765CF7A41E; Tue, 22 Feb 2005 18:26:55 -0800 (PST) Message-ID: <421BE9EF.6010605@elischer.org> Date: Tue, 22 Feb 2005 18:26:55 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en, hu MIME-Version: 1.0 To: Dan Nelson References: <421BDAD9.5060304@elischer.org> <20050223022207.GH253@dan.emsphone.com> In-Reply-To: <20050223022207.GH253@dan.emsphone.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: realplay and 4.11 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, 23 Feb 2005 02:26:56 -0000 Dan Nelson wrote: >In the last episode (Feb 22), Julian Elischer said: > > >>Anyone made this combination work? >> >>I've reinstalled all the packages so all teh dependencies shoudl be >>there but the command "realplay" results in : >> >>/usr/local/lib/RealPlayer/realplay.bin: /lib/libgcc_s.so.1: version >>`GCC_3.3' >> not found (required by /usr/lib/libstdc++.so.5) >> >>Anyone with a clue as to what this is trying to tell me? >> >> > >linux_base-8 is apparently not new enough: > >$ pkg_which /usr/compat/linux/lib/libgcc_s.so.1 >linux_base-8-8.0_6 >$ nm /usr/compat/linux/lib/libgcc_s.so.1 | grep GCC_ >00000000 A GCC_3.0 > >The SUSE-9.0 machines here at work do provide the GCC_3.3 symbol, so >maybe try linux_base-suse-9.2, or linux_base-rh-9. > > my workaround is to restore my backup of realplayer 8 Unfortunatly the port has disappeared so one cannot install it from scratch.. From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 04:01:13 2005 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 F40C716A4CE for ; Wed, 23 Feb 2005 04:01:12 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 783A043D49 for ; Wed, 23 Feb 2005 04:01:12 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id j1N41AZS081013 for ; Tue, 22 Feb 2005 22:01:10 -0600 (CST) (envelope-from sean-freebsd@farley.org) Received: from localhost (localhost [127.0.0.1]) by thor.farley.org (8.13.1/8.13.1) with ESMTP id j1N41CII027963 for ; Tue, 22 Feb 2005 22:01:12 -0600 (CST) (envelope-from sean-freebsd@farley.org) Date: Tue, 22 Feb 2005 22:01:12 -0600 (CST) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: freebsd-hackers@freebsd.org Message-ID: <20050222173013.B26342@thor.farley.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1396765616-1109117000=:26342" Content-ID: <20050222220040.T27937@thor.farley.org> Subject: setenv/unsetenv's known memory leak 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, 23 Feb 2005 04:01:13 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1396765616-1109117000=:26342 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: <20050222180603.T26686@thor.farley.org> While playing around with setenv(), I noticed that it can leak memory when a program overwrites a variable with a larger value. unsetenv() will just leak memory. All of this is documented in their man pages. The latest PR on this (two PR's mentioned in it are closed): http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dmisc/19406 I could find no apparent reason for continuing to allow for the memory leak. The only reason given to allow it was to permit programs to continue to use the environment variable retrieved by setenv() after the program had reset or deleted it. If a program can be assumed to have a persistent pointer, it should be considered memory that should be freed by the program later. Yes? Obviously, this is not the case with the setenv()/unsetenv() API. Also, if the pointer is used by a program after it has been overwritten, the program will be using the wrong value if the value was expanded in size. After updating an environment variable, the value will be wrong (freed memory or incorrect value) regardless if the leak is plugged or not. It stands to reason that fixing the leak should not be harmful. In checking a different system, I verified that Linux does not exhibit this leak. Here is a test program along with a patch to stop the leak: http://www.farley.org/freebsd/tmp/setenv.tar.bz2 Se=E1n --=20 sean-freebsd@farley.org --0-1396765616-1109117000=:26342-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 08:51:03 2005 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 BB2F616A4CE for ; Wed, 23 Feb 2005 08:51:03 +0000 (GMT) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id E477743D48 for ; Wed, 23 Feb 2005 08:51:02 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1N8osif007752 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 23 Feb 2005 19:50:56 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1N8os7l087677; Wed, 23 Feb 2005 19:50:54 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j1N8ortv087676; Wed, 23 Feb 2005 19:50:53 +1100 (EST) (envelope-from pjeremy) Date: Wed, 23 Feb 2005 19:50:53 +1100 From: Peter Jeremy To: =?iso-8859-1?Q?Se=E1n_C=2E?= Farley Message-ID: <20050223085053.GA85422@cirb503493.alcatel.com.au> References: <20050222173013.B26342@thor.farley.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050222173013.B26342@thor.farley.org> User-Agent: Mutt/1.4.2i cc: freebsd-hackers@freebsd.org Subject: Re: setenv/unsetenv's known memory leak 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, 23 Feb 2005 08:51:03 -0000 On Tue, 2005-Feb-22 22:01:12 -0600, Seán C. Farley wrote: >The latest PR on this (two PR's mentioned in it are closed): >http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/19406 ... >Here is a test program along with a patch to stop the leak: >http://www.farley.org/freebsd/tmp/setenv.tar.bz2 The diff is unnecessarily difficult to read because you've included both whitespace and functional changes. Your fix won't work because it assumes that all environment strings are malloc()'d. The environment that was passed to a program during exec() is static so if you tried to update (eg) $PATH, things blow up. If I change "TESTVAR" to "PATH" and run the program, I get: $ ./testenv testenv in realloc(): warning: malloc() has never been called As discussed in conjunction with the previous PRs, there is no easy solution (otherwise it would have been fixed 7 years ago). Most other OSs side-step the problem by requiring the caller to ensure that the strings passed as arguments remain in scope. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 08:52:29 2005 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 557D416A4CF for ; Wed, 23 Feb 2005 08:52:29 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id DAC8143D5A for ; Wed, 23 Feb 2005 08:52:28 +0000 (GMT) (envelope-from cristiano.deana@gmail.com) Received: by wproxy.gmail.com with SMTP id 36so63720wri for ; Wed, 23 Feb 2005 00:52:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=sLQoTukiWQIXOiGJDp/6GlGK6Z7QOWsh7V4S8HGM9ssCQ+16/RvOA8WJ5cNmDFOQlb5F3ZbS/5iFov18TpsUb+6EmRSCtGzO5LHl7yZOd8wVzCtzonYqLV9uNTQ0fR8ElaRqFX3NbDAFU4HUkvNECB8/xNAjrt3hP+4BBHd5XBc= Received: by 10.54.59.11 with SMTP id h11mr250087wra; Wed, 23 Feb 2005 00:52:25 -0800 (PST) Received: by 10.54.59.22 with HTTP; Wed, 23 Feb 2005 00:52:24 -0800 (PST) Message-ID: Date: Wed, 23 Feb 2005 09:51:24 +0059 From: Cristiano Deana To: freebsd-stable@freebsd.org, freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Promise FastTrak S150 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Cristiano Deana List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2005 08:52:29 -0000 Hi, I have a HP Proliant ML110, with a controller Promise FastTrak S150 SX4. It's a raid sata controller. At boot system halt with fatal trap 12 and these errors: ata2-master: FAILURE - ATA_IDENTIFY timed out ata2-master: FAILURE - ATA_IDENTIFY timed out ata2-master: FAILURE - SETFEATURES SET TRANSFER MODE timed out I've read in mailing list somebody make it works using src/sys/dev/ata from -CURRENT (i used 5.3). So i tried with latest -CURRENT snapshot, same error. What could i try? -- Cris, member of G.U.F.I Italian FreeBSD User Group http://www.gufi.org/ From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 09:06:27 2005 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 D6C2316A4CE for ; Wed, 23 Feb 2005 09:06:27 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8170B43D46 for ; Wed, 23 Feb 2005 09:06:27 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 12D8A530C; Wed, 23 Feb 2005 10:06:25 +0100 (CET) Received: from xps.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 7D4915308; Wed, 23 Feb 2005 10:05:59 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id EA54433C3E; Wed, 23 Feb 2005 10:05:58 +0100 (CET) To: =?iso-8859-1?q?Se=E1n_C=2E_Farley?= References: <20050222173013.B26342@thor.farley.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Wed, 23 Feb 2005 10:05:58 +0100 In-Reply-To: <20050222173013.B26342@thor.farley.org> 22:01:12 -0600 (CST)") Message-ID: <863bvnmyrt.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: freebsd-hackers@freebsd.org Subject: Re: setenv/unsetenv's known memory leak 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, 23 Feb 2005 09:06:28 -0000 Se=E1n C. Farley writes: > While playing around with setenv(), I noticed that it can leak memory > when a program overwrites a variable with a larger value. unsetenv() > will just leak memory. All of this is documented in their man pages. > > The latest PR on this (two PR's mentioned in it are closed): > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dmisc/19406 They were closed for a reason. Read their audit trails. > I could find no apparent reason for continuing to allow for the memory > leak. The only reason given to allow it was to permit programs to > continue to use the environment variable retrieved by setenv() after the > program had reset or deleted it. Wrong. The reason for the leak is that the initial environment array is not malloc()ed and therefore cannot be free()d or realloc()ed. To work around this requires a lot of bookkeeping. BTW, SUSv3 explicitly states that the application can not expect the pointer returned by getenv() to remain meaningful after a subsequent call to getenv(), setenv(), unsetenv() or (on XSI-conformant systems) putenv(), so that argument falls flat on its face. > Here is a test program along with a patch to stop the leak: > http://www.farley.org/freebsd/tmp/setenv.tar.bz2 You can't possibly have tested it very thoroughly. Try running your test program with MALLOC_OPTIONS=3DAX in your environment: des@xps ~/src/setenv% MALLOC_OPTIONS=3DAX ./testenv testenv in realloc(): error: junk pointer, too high to make sense zsh: abort (core dumped) MALLOC_OPTIONS=3DAX ./testenv DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 09:46:49 2005 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 C25A616A4CE for ; Wed, 23 Feb 2005 09:46:49 +0000 (GMT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id D540543D3F for ; Wed, 23 Feb 2005 09:46:48 +0000 (GMT) (envelope-from marcov@stack.nl) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mailhost.stack.nl (Postfix) with ESMTP id E36251F039 for ; Wed, 23 Feb 2005 10:46:47 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 816) id D6CC01D9F4; Wed, 23 Feb 2005 10:46:47 +0100 (CET) To: freebsd-hackers@freebsd.org Date: Wed, 23 Feb 2005 10:46:47 +0100 (CET) X-Mailer: ELM [version 2.4ME+ PL118 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20050223094647.D6CC01D9F4@turtle.stack.nl> From: marcov@stack.nl (Marco van de Voort) Subject: ARG_MAX increase 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, 23 Feb 2005 09:46:49 -0000 I saw ARG_MAX was increased in 6.0. Recently I noticed that the lang/fpc-devel port currently hits the old limit in certain (though rare) cases), and this is annoying. (some testing revealed that half the increase of 6.0 to 131k params is also ok) Any chance ARG_MAX will be upped in -STABLE too? From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 20:01:02 2005 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 E1B5316A4CE for ; Tue, 22 Feb 2005 20:01:02 +0000 (GMT) Received: from mother.ludd.ltu.se (mother.ludd.ltu.se [130.240.16.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80CE543D46 for ; Tue, 22 Feb 2005 20:01:01 +0000 (GMT) (envelope-from pb@ludd.ltu.se) Received: from brother.ludd.ltu.se (brother.ludd.ltu.se [130.240.16.78]) j1MK0wtw007291; Tue, 22 Feb 2005 21:00:58 +0100 (MET) Received: from brother.ludd.ltu.se (localhost [127.0.0.1]) j1MK0wCG015907; Tue, 22 Feb 2005 21:00:58 +0100 (MET) Received: (from pb@localhost) by brother.ludd.ltu.se (8.12.10+Sun/8.12.2/Submit) id j1MK0w5U015905; Tue, 22 Feb 2005 21:00:58 +0100 (MET) From: Peter B Message-Id: <200502222000.j1MK0w5U015905@brother.ludd.ltu.se> To: ticso@cicely.de Date: Tue, 22 Feb 2005 21:00:58 +0100 (MET) In-Reply-To: <20050222164051.GG14312@cicely12.cicely.de> from "Bernd Walter" at Feb 22, 2005 05:40:52 PM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 23 Feb 2005 13:13:49 +0000 cc: freebsd-hackers@freebsd.org Subject: Re: Advanced USB snooping 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, 22 Feb 2005 20:01:03 -0000 >> >> Is it possible to program an "ordinary" (like Intel 82801CA/CAM (ICH3)) USB >> host controller into acting as an usb device instead? (just like scsi can). >> >> Idea: >> M$Win-Usb -> FreeBSD-USB#1 .. software .. FreeBSD-USB#2 -> Device > >No - this wonn't work. >Host Controllers are dedicated host controllers. >If you use a microcontroller you can use normale device controllers, >such as the PDIUSBD12 or the ISP1581 - there are many others as well. >But the they are all limited to work as a single device and not as a >path through device. If I can connect it to the computer from the "other" side it solves the problem I think. >All USB sniffers I know run with some kind of ASIC, which is not very >hard to do if you are familar with such devices. Fpga is doable, asic requires a large factory run. Unless there is a ready to buy asic. >The hard work is doing software to present the sniffed data in a usefull way. >There are some cheap USB sniffers for full and low speed available >on the market. >Their limitation is usually that they don't tell you anything about >signal quality and such. Signal quality is infact not so important. It's the data structures not the electrical level ;) >> The advantage would be then to possible use scripts to debug protocol >> in order to port drivers to freebsd. >Sniffer Software exist at driver level at least for Windows and NetBSD >derived stacks and I would be surprised if there isn't anything >available for Linux as well. >Hardware sniffers are very usefull if you are into debugging host >controllers and sometimes device controllers on your own, but for >debugging device drivers it's rarely usefull. The catch with normal setup is that you need to poke around in the m$-win machine which can cause other problems. So the idea would be to just insert some device with one male + female connector and a connection to the snoop computer. So that the m$-win computer don't need any special software. Also m$-win host software snoop lack the nice programming enviroment of unix. In order to filter out the stuff that one really wants. There is one approach that could be efficient. Have a ethernet cable to the m$-win computer. Where a special usb snoop driver is controlled over that ethernet connection. From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 21:22:20 2005 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 C981F16A4CE for ; Tue, 22 Feb 2005 21:22:20 +0000 (GMT) Received: from oniws.ca (oniws.ca [67.71.253.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id E036543D55 for ; Tue, 22 Feb 2005 21:22:15 +0000 (GMT) (envelope-from Dwayne.MacKinnon@xwave.com) Received: from [192.168.0.126] (chiron.internal.oniws.ca [192.168.0.126]) by oniws.ca (8.12.10/8.12.8) with ESMTP id j1MLMEZp054516 for ; Tue, 22 Feb 2005 16:22:14 -0500 (EST) (envelope-from Dwayne.MacKinnon@xwave.com) Message-ID: <421BA281.5060304@xwave.com> Date: Tue, 22 Feb 2005 16:22:09 -0500 From: Dwayne MacKinnon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050105 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 23 Feb 2005 13:13:49 +0000 Subject: Remote upgrade of 4.X-5.3-Stable 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, 22 Feb 2005 21:22:20 -0000 Hi all, I've been experimenting with upgrading 4.X to 5.3-STABLE. The challenge I've been given is that the box to be upgraded is physically inaccessible and so there's no console access. All I have to work with is ssh and scp. In our lab I built a box to 5.3-STABLE. I then used the /usr/obj directories from that build to start a "remote" upgrade on another lab box. Things have gone reasonably well. I was able to successfully make installworld using a rc.d script even though it reboots into multi-user mode after installing the kernel. The problem is that rc.conf isn't getting sourced properly after the installworld. I figure that something more is needed with mergemaster. I run mergemaster -ia through my rc.d script, but that's apparently insufficient. So what I'm wondering is this: What do I need in place to make sure that networking will come up and sshd will start after upgrading 4.X to 5.3? Thanks, DMK From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 14:00:29 2005 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 8E83816A4D0; Wed, 23 Feb 2005 14:00:29 +0000 (GMT) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [195.245.194.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB0A443D1D; Wed, 23 Feb 2005 14:00:27 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from pm514-9.comsys.ntu-kpi.kiev.ua (pm514-9.comsys.ntu-kpi.kiev.ua [10.18.54.109]) (authenticated bits=0)j1NE3RcP085943 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Feb 2005 16:03:27 +0200 (EET) Received: by pm514-9.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1000) id 9FEC4110; Wed, 23 Feb 2005 16:00:17 +0200 (EET) Date: Wed, 23 Feb 2005 16:00:17 +0200 From: Andrey Simonenko To: John Baldwin Message-ID: <20050223140017.GA256@pm514-9.comsys.ntu-kpi.kiev.ua> References: <000801c51327$0e2bf020$58e243a4@ash> <20050215132020.GA376@pm514-9.comsys.ntu-kpi.kiev.ua> <200502221534.41979.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200502221534.41979.jhb@FreeBSD.org> User-Agent: Mutt/1.4.2.1i X-Spam-Status: No, score=-4.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on comsys.ntu-kpi.kiev.ua X-Virus-Scanned: ClamAV 0.82/707/Thu Feb 17 00:00:07 2005 on comsys.ntu-kpi.kiev.ua X-Virus-Status: Clean cc: freebsd-hackers@freebsd.org cc: Ashwin Chandra Subject: Re: Kernel monitor, the return 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, 23 Feb 2005 14:00:29 -0000 On Tue, Feb 22, 2005 at 03:34:41PM -0500, John Baldwin wrote: > > You don't need sched_lock to check PS_INMEM, proc lock is sufficient > (PS_INMEM is magic this way). I suggested the author of the original letter to get lock on sched_lock, because statclock() modifies ru_idrss and ru_isrss values and that values are read in that kproc. Having read some code in the kernel, now I think that lock on sched_lock is needed only before reading ru_idrss and ru_isrss for current thread. Am I right? (at least getrusage() does in this way.) In private letters we found that it is better to use _PHOLD/_PRELE for that task. > If you did though, you would lock proc first, then sched_lock. > You can _not_ lock a regular mutex (proc lock) after a spin > mutex (sched_lock) or you can deadlock. Thanks... mutex(9) also says about this. I've just looked at sources for mtx_lock_spin/unspin and for better understanding of meaning of the sentence you wrote. From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 16:28:29 2005 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 01C4B16A4CE for ; Wed, 23 Feb 2005 16:28:29 +0000 (GMT) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2B0343D46 for ; Wed, 23 Feb 2005 16:28:28 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.67]) by hydra.bec.de (Postfix) with ESMTP id 98D9C35710 for ; Wed, 23 Feb 2005 17:28:26 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1001) id 9F2A7A6; Wed, 23 Feb 2005 17:27:07 +0100 (CET) Date: Wed, 23 Feb 2005 17:27:07 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20050223162707.GA1113@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050221221656.GA64212@freebsd.czest.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050221221656.GA64212@freebsd.czest.pl> User-Agent: Mutt/1.5.8i Subject: Re: [PATCH] Dangerous jail()<->ioctl interactions. 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, 23 Feb 2005 16:28:29 -0000 On Mon, Feb 21, 2005 at 10:16:56PM +0000, Wojciech A. Koszek wrote: > Hello hackers, > I would like to let you know I've been doing [partial] audit of ioctl() > code. There are some places, which may interest you. These are: > > sys/cam/cam_xpt.c > sys/contrib/ipfilter/netinet/ip_fil.c > sys/contrib/pf/net/pf_ioctl.c > sys/dev/ata/ata-all.c > sys/dev/md/md.c > sys/geom/geom_ctl.c I would argue that the controlling device are not supposed to be in a jail if you are concerned about something attacking your system with it. At least for FreeBSD 4, MAKEDEV jail doesn't create any of those. Joerg From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 17:03:48 2005 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 3757516A4CE for ; Wed, 23 Feb 2005 17:03:48 +0000 (GMT) Received: from mail.freebsd.org.cn (dns3.freebsd.org.cn [61.129.66.75]) by mx1.FreeBSD.org (Postfix) with SMTP id 0264943D1F for ; Wed, 23 Feb 2005 17:03:43 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: (qmail 13948 invoked by uid 0); 23 Feb 2005 16:54:43 -0000 Received: from unknown (HELO beastie.frontfree.net) (219.239.99.7) by mail.freebsd.org.cn with SMTP; 23 Feb 2005 16:54:43 -0000 Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id D5870130F88; Thu, 24 Feb 2005 01:03:28 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 73426-06; Thu, 24 Feb 2005 01:03:18 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 6BE1013173E; Thu, 24 Feb 2005 01:03:17 +0800 (CST) Date: Thu, 24 Feb 2005 01:03:17 +0800 From: Xin LI To: "Wojciech A. Koszek" Message-ID: <20050223170317.GA73338@frontfree.net> References: <20050221221656.GA64212@freebsd.czest.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <20050221221656.GA64212@freebsd.czest.pl> User-Agent: Mutt/1.4.2.1i X-GPG-key-ID/Fingerprint: 0xCAEEB8C0 / 43B8 B703 B8DD 0231 B333 DC28 39FB 93A0 CAEE B8C0 X-GPG-Public-Key: http://www.delphij.net/delphij.asc X-Operating-System: FreeBSD beastie.frontfree.net 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #15: Wed Dec 15 10:43:16 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 X-URL: http://www.delphij.net X-By: delphij@beastie.frontfree.net X-Location: Beijing, China X-Virus-Scanned: by amavisd-new at frontfree.net cc: freebsd-hackers@FreeBSD.org Subject: Re: [PATCH] Dangerous jail()<->ioctl interactions. 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, 23 Feb 2005 17:03:48 -0000 --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 21, 2005 at 10:16:56PM +0000, Wojciech A. Koszek wrote: > Hello hackers, > I would like to let you know I've been doing [partial] audit of ioctl() > code. There are some places, which may interest you. These are: >=20 > sys/cam/cam_xpt.c > sys/contrib/ipfilter/netinet/ip_fil.c > sys/contrib/pf/net/pf_ioctl.c > sys/dev/ata/ata-all.c > sys/dev/md/md.c > sys/geom/geom_ctl.c >=20 > Those files contain ioctl()s, which let us to interact between jailed pro= cesses > and each of these subsystems. Although files like /dev/mdctl should not > appear in /dev with normal DEVFS rulesets, I think it would be better if = FreeBSD had > those ioctl() disabled within jail()ed environment. There is probably one > reason for keeping ipf/pf, since someone may want fetch information about= NATed > connections. These devices should all not be exposed to the jailed environment, in my op= inion. Since this can be done with devfs's rules, so I think this is not a bug... Default devfs configuration for a jail is not to mount it. Additionally, t= he default devfs ruleset hides everything but a limited set of pseudo devices = that should be commen for applications to consume. Therefore, I'd rather say th= at it's a configuration mistake of the user (^_^) Do you imply that there are other devices that enforce check against whethe= r they are ioctl'ed in jail? Cheers, --=20 Xin LI http://www.delphij.net/ See complete headers for GPG key and other information. --liOOAslEiF7prFVr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCHLdV/cVsHxFZiIoRAjxIAJ9hrFQcisCTRrmykZhijxcIoJWx7wCfambA uuG/lGGD0yqH7y7G+Aa3eQg= =reHn -----END PGP SIGNATURE----- --liOOAslEiF7prFVr-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 17:06:06 2005 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 225AA16A4CE for ; Wed, 23 Feb 2005 17:06:06 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFE6B43D41 for ; Wed, 23 Feb 2005 17:06:05 +0000 (GMT) (envelope-from aentgood@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so1366636wri for ; Wed, 23 Feb 2005 09:06:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=MHAjPxIMTmENt3Ed3cPHFckIsWtsu95Rx/glRgHl9bz+t9G557aDIHRzLKT9jeMyum+pJbpxvbz4dRZoAhYXBRfh3f+BTFClRY5i297Fn3dS/MhQWNV1RE/RsPo8rhTDtTDRERaGqmzuxRW1+/ZCmdeLIPNJk88pwNHeAQ4pqEY= Received: by 10.54.11.15 with SMTP id 15mr129090wrk; Wed, 23 Feb 2005 09:06:04 -0800 (PST) Received: by 10.54.27.6 with HTTP; Wed, 23 Feb 2005 09:06:02 -0800 (PST) Message-ID: <7603e5d8050223090633360cc1@mail.gmail.com> Date: Wed, 23 Feb 2005 17:06:02 +0000 From: Wouter van Rooij To: freebsd-hackers@freebsd.org In-Reply-To: <7603e5d80502230852509c2b0d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <421BA281.5060304@xwave.com> <7603e5d80502230852509c2b0d@mail.gmail.com> Subject: Remote upgrade of 4.X-5.3-Stable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Wouter van Rooij List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2005 17:06:06 -0000 You did a make buildworld? You just have to boot in single user mode and run mergemaster -p and mergemaster. I hope this helped you Wouter van Rooij From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 19:04:42 2005 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 E1C2A16A4CE for ; Wed, 23 Feb 2005 19:04:42 +0000 (GMT) Received: from mail24.sea5.speakeasy.net (mail24.sea5.speakeasy.net [69.17.117.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id A665543D31 for ; Wed, 23 Feb 2005 19:04:42 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 14367 invoked from network); 23 Feb 2005 19:04:42 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 23 Feb 2005 19:04:42 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j1NJ4aev024456; Wed, 23 Feb 2005 14:04:37 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Andrey Simonenko Date: Wed, 23 Feb 2005 13:18:26 -0500 User-Agent: KMail/1.6.2 References: <000801c51327$0e2bf020$58e243a4@ash> <200502221534.41979.jhb@FreeBSD.org> <20050223140017.GA256@pm514-9.comsys.ntu-kpi.kiev.ua> In-Reply-To: <20050223140017.GA256@pm514-9.comsys.ntu-kpi.kiev.ua> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200502231318.27002.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: freebsd-hackers@FreeBSD.org cc: Ashwin Chandra Subject: Re: Kernel monitor, the return 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, 23 Feb 2005 19:04:43 -0000 On Wednesday 23 February 2005 09:00 am, Andrey Simonenko wrote: > On Tue, Feb 22, 2005 at 03:34:41PM -0500, John Baldwin wrote: > > You don't need sched_lock to check PS_INMEM, proc lock is sufficient > > (PS_INMEM is magic this way). > > I suggested the author of the original letter to get lock on sched_lock, > because statclock() modifies ru_idrss and ru_isrss values and that > values are read in that kproc. Having read some code in the kernel, > now I think that lock on sched_lock is needed only before reading > ru_idrss and ru_isrss for current thread. Am I right? (at least > getrusage() does in this way.) > > In private letters we found that it is better to use _PHOLD/_PRELE > for that task. Well, the proc lock protects the p_stats pointer. There isn't a lock protecting the reading of the ru_* variables because getting the lock wouldn't actually buy you anything. It's a race that it doesn't hurt to lose. _PHOLD() can be very expensive on 5.x as if the process is swapped out it is going to block until the process is swapped back in. Just locking proc lock and skipping if PS_INMEM is clear is going to be a lot quicker. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 19:11:54 2005 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 D642A16A4CE for ; Wed, 23 Feb 2005 19:11:54 +0000 (GMT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E514443D1D for ; Wed, 23 Feb 2005 19:11:53 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j1NJBoVU028673; Wed, 23 Feb 2005 14:11:52 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <20050223094647.D6CC01D9F4@turtle.stack.nl> References: <20050223094647.D6CC01D9F4@turtle.stack.nl> Date: Wed, 23 Feb 2005 14:11:50 -0500 To: marcov@stack.nl (Marco van de Voort), freebsd-hackers@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) on 128.113.2.2 Subject: Re: ARG_MAX increase 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, 23 Feb 2005 19:11:55 -0000 At 10:46 AM +0100 2/23/05, Marco van de Voort wrote: >I saw ARG_MAX was increased in 6.0. Recently I noticed that >the lang/fpc-devel port currently hits the old limit in >certain (though rare) cases), and this is annoying. > >(some testing revealed that half the increase of 6.0 >to 131k params is also ok) > >Any chance ARG_MAX will be upped in -STABLE too? For this specific example, it would be better to fix the port. The port has to work on many releases in addition to 5.x-stable and 6.x-current. We can't change ARG_MAX in all of those releases to fix the port. We certainly can't change it in 5.3-RELEASE (because that's sitting on CD's), and we probably aren't going to change it in 5.3-ERRATA (the "minimal change security branch", which many people run on production servers), and it's even less likely that we'll change it in 4.x-stable. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 22:05:24 2005 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 5B2B216A4CE for ; Wed, 23 Feb 2005 22:05:24 +0000 (GMT) Received: from kuldipmanak.chamkila.org (node-40240ed2.sjc.onnet.us.uu.net [64.36.14.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id C86D043D45 for ; Wed, 23 Feb 2005 22:05:23 +0000 (GMT) (envelope-from aman@chamkila.org) Received: from mail.chamkila.org (kuldipmanak.chamkila.org [127.0.0.1]) j1NM3Zxx027081 for ; Wed, 23 Feb 2005 14:03:36 -0800 Received: from 69.36.228.194 (proxying for 192.168.96.110) (SquirrelMail authenticated user aman); by mail.chamkila.org with HTTP; Wed, 23 Feb 2005 14:03:36 -0800 (PST) Message-ID: <39142.69.36.228.194.1109196216.squirrel@69.36.228.194> In-Reply-To: <20050217115740.GA7507@gravitas.thebunker.net> References: <20050119103214.A27409@pooker.samsco.org> <36639.69.36.228.194.1108603989.squirrel@69.36.228.194> <20050217115740.GA7507@gravitas.thebunker.net> Date: Wed, 23 Feb 2005 14:03:36 -0800 (PST) From: "Amandeep Pannu" To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.5.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal Subject: Re: Freebsd problem: Upgrading 5.3-relase to 5.3-release-p5-How 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, 23 Feb 2005 22:05:24 -0000 Hi all, Seems like a dumb question but how do i upgrade FreeBSD 5.3-Release to FreeBSD 5.3-Release-p5. I am very new to this stuff. Not even know if I am posting in the right mailing list. Thanks in advance A From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 22:21:04 2005 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 3096316A4CE for ; Wed, 23 Feb 2005 22:21:04 +0000 (GMT) Received: from mxsf21.cluster1.charter.net (mxsf21.cluster1.charter.net [209.225.28.221]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7D9F43D45 for ; Wed, 23 Feb 2005 22:21:03 +0000 (GMT) (envelope-from c0ldbyte@myrealbox.com) Received: from mxip07.cluster1.charter.net (mxip07a.cluster1.charter.net [209.225.28.137])j1NML2Zg013745 for ; Wed, 23 Feb 2005 17:21:02 -0500 Received: from 24.247.253.134.gha.mi.chartermi.net (HELO eleanor.us1.wmi.uvac.net) (24.247.253.134) by mxip07.cluster1.charter.net with ESMTP; 23 Feb 2005 17:21:01 -0500 X-Ironport-AV: i="3.90,111,1107752400"; d="scan'208"; a="627397255:sNHT616934796" Date: Wed, 23 Feb 2005 17:21:00 -0500 (EST) From: c0ldbyte To: Amandeep Pannu In-Reply-To: <39142.69.36.228.194.1109196216.squirrel@69.36.228.194> Message-ID: <20050223171936.Q4483@eleanor.us1.wmi.uvac.net> References: <36639.69.36.228.194.1108603989.squirrel@69.36.228.194> <20050217115740.GA7507@gravitas.thebunker.net> <39142.69.36.228.194.1109196216.squirrel@69.36.228.194> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-hackers@freebsd.org Subject: Re: Freebsd problem: Upgrading 5.3-relase to 5.3-release-p5-How 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, 23 Feb 2005 22:21:04 -0000 Check out the handbook on freebsd.org and lookup 'CVSup' reading that should in hand help you to upgrade/update your system. as well as reading the section on upgrading kernel/world. On Wed, 23 Feb 2005, Amandeep Pannu wrote: > Hi all, > > Seems like a dumb question but how do i upgrade FreeBSD 5.3-Release to > FreeBSD 5.3-Release-p5. > I am very new to this stuff. Not even know if I am posting in the right > mailing list. > > Thanks in advance > > A > _______________________________________________ > 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" > This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 23:33:52 2005 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 E6B2E16A4CE for ; Wed, 23 Feb 2005 23:33:52 +0000 (GMT) Received: from meisai.numachi.com (meisai.numachi.com [198.175.254.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 0C79143D39 for ; Wed, 23 Feb 2005 23:33:52 +0000 (GMT) (envelope-from reichert@numachi.com) Received: (qmail 56836 invoked from network); 23 Feb 2005 23:33:51 -0000 Received: from natto.numachi.com (198.175.254.216) by meisai.numachi.com with SMTP; 23 Feb 2005 23:33:51 -0000 Received: (qmail 24212 invoked by uid 1001); 23 Feb 2005 23:33:51 -0000 Date: Wed, 23 Feb 2005 18:33:51 -0500 From: Brian Reichert To: hackers@freebsd.org Message-ID: <20050223233351.GP6881@numachi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.7i Subject: smartmontools vs HP Smart Array 642 controller 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, 23 Feb 2005 23:33:53 -0000 As per the combo in the subject: Does anyone have any experience with smartctl and a HP Smart Array 642 controller? When I boot with HP's provided CD, the utility tells me that the device is SMART enabled. When I run smartctl version 5.32 under 5.3-STABLE (circa yesterdays's CVSup), hoever, I get: new# smartd -d smartd version 5.32 Copyright (C) 2002-4 Bruce Allen Home page is http://smartmontools.sourceforge.net/ No configuration file /usr/local/etc/smartd.conf found, scanning devices glob(3) found no matches for patterns (/dev/ad[0-9]),(/dev/ad[0-9][0-9]) Device: /dev/da0, opened (pass0:ciss0:0:0:0): MODE SENSE(06). CDB: 1a 0 1c 0 40 0 (pass0:ciss0:0:0:0): CAM Status: SCSI Status Error (pass0:ciss0:0:0:0): SCSI Status: Check Condition (pass0:ciss0:0:0:0): ILLEGAL REQUEST asc:24,0 (pass0:ciss0:0:0:0): Invalid field in CDB Device: /dev/da0, Bad IEC (SMART) mode page, err=-1, skip device Unable to register SCSI device /dev/da0 Unable to monitor any SMART enabled devices. Exiting... My googling has revealed nothing useful, and I was hoping for some feedback on this... (HP's supplied Linux-based monitoring was uninstallable, and I was in no mood to de-Llinx the instal script.) -- Brian Reichert 37 Crystal Ave. #303 Daytime number: (603) 434-6842 Derry NH 03038-1713 USA BSD admin/developer at large From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 01:09:04 2005 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 BE3B116A4CE for ; Thu, 24 Feb 2005 01:09:04 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C17543D39 for ; Thu, 24 Feb 2005 01:09:04 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id j1O18vpI091220; Wed, 23 Feb 2005 19:08:57 -0600 (CST) (envelope-from sean-freebsd@farley.org) Received: from localhost (localhost [127.0.0.1]) by thor.farley.org (8.13.1/8.13.1) with ESMTP id j1O1914p037237; Wed, 23 Feb 2005 19:09:01 -0600 (CST) (envelope-from sean-freebsd@farley.org) Date: Wed, 23 Feb 2005 19:09:01 -0600 (CST) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <863bvnmyrt.fsf@xps.des.no> Message-ID: <20050223140733.T35108@thor.farley.org> References: <20050222173013.B26342@thor.farley.org> <863bvnmyrt.fsf@xps.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-919433075-1109189845=:35108" Content-ID: <20050223190609.W37193@thor.farley.org> cc: freebsd-hackers@freebsd.org Subject: Re: setenv/unsetenv's known memory leak 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, 24 Feb 2005 01:09:04 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-919433075-1109189845=:35108 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: <20050223185614.I37069@thor.farley.org> On Wed, 23 Feb 2005, Dag-Erling Sm=F8rgrav wrote: > Se=E1n C. Farley writes: >> While playing around with setenv(), I noticed that it can leak memory >> when a program overwrites a variable with a larger value. unsetenv() >> will just leak memory. All of this is documented in their man pages. >> >> The latest PR on this (two PR's mentioned in it are closed): >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dmisc/19406 > > They were closed for a reason. Read their audit trails. > >> I could find no apparent reason for continuing to allow for the >> memory leak. The only reason given to allow it was to permit >> programs to continue to use the environment variable retrieved by >> setenv() after the program had reset or deleted it. > > Wrong. The reason for the leak is that the initial environment array > is not malloc()ed and therefore cannot be free()d or realloc()ed. To > work around this requires a lot of bookkeeping. > > BTW, SUSv3 explicitly states that the application can not expect the > pointer returned by getenv() to remain meaningful after a subsequent > call to getenv(), setenv(), unsetenv() or (on XSI-conformant systems) > putenv(), so that argument falls flat on its face. Thank you. That is good to know. >> Here is a test program along with a patch to stop the leak: >> http://www.farley.org/freebsd/tmp/setenv.tar.bz2 > > You can't possibly have tested it very thoroughly. Try running your > test program with MALLOC_OPTIONS=3DAX in your environment: > > des@xps ~/src/setenv% MALLOC_OPTIONS=3DAX ./testenv > testenv in realloc(): error: junk pointer, too high to make sense > zsh: abort (core dumped) MALLOC_OPTIONS=3DAX ./testenv That is odd. I do not see that error with my changes (old or new) and using MALLOC_OPTIONS. I am running 5-STABLE. I have made a new set of patches based on your and Peter Jeremy's comments (variables on the stack). The first patch is just style changes. The second patch is the actual change. They were tested with MALLOC_OPTIONS=3DAX and dmalloc (not at the same time). The changes are: 1. Tracking of dynamically allocated environment variables. 2. Reallocation/freeing of variables using above tracking to prevent incorrect manipulation of variables allocated on the stack. http://www.farley.org/freebsd/tmp/setenv.tar.bz2 How does this version look? Se=E1n --=20 sean-freebsd@farley.org --0-919433075-1109189845=:35108-- From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 04:30:18 2005 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 C3E8B16A4D0 for ; Thu, 24 Feb 2005 04:30:18 +0000 (GMT) Received: from house.arach.net.au (house1.arach.net.au [203.30.44.84]) by mx1.FreeBSD.org (Postfix) with SMTP id 28CAA43D4C for ; Thu, 24 Feb 2005 04:30:17 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 5968 invoked from network); 24 Feb 2005 04:30:13 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house1.arach.net.au with SMTP for ; 24 Feb 2005 04:30:13 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1O4W1sj008427 for ; Thu, 24 Feb 2005 12:32:04 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.4.0]); Thu, 24 Feb 2005 12:30:02 +0800 Message-ID: <421D584A.90203@kaqelectronics.dyndns.org> Date: Thu, 24 Feb 2005 12:30:02 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed Subject: gcc question 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, 24 Feb 2005 04:30:18 -0000 Hi all, I have some code that I build for two targets, one an Atmel uC and the other FreeBSD. What is the best way to redefine getchar and putchar (in uC they use the serial port, in FreeBSD stdin stdout) Or would I be better #ifdef the commands and making getchar only used in uC and my serial port handler in FreeBSD ?? Thanks for the help Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 05:03:03 2005 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 9A38C16A4CE for ; Thu, 24 Feb 2005 05:03:03 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99E2A43D31 for ; Thu, 24 Feb 2005 05:03:02 +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 j1O52rQK045086; Thu, 24 Feb 2005 15:32:53 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Thu, 24 Feb 2005 15:32:39 +1030 User-Agent: KMail/1.7.92 References: <421D584A.90203@kaqelectronics.dyndns.org> In-Reply-To: <421D584A.90203@kaqelectronics.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3373236.7uS1DI0nbt"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502241532.50010.doconnor@gsoft.com.au> X-Spam-Score: -5.4 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Kathy Quinlan Subject: Re: gcc question 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, 24 Feb 2005 05:03:03 -0000 --nextPart3373236.7uS1DI0nbt Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thu, 24 Feb 2005 15:00, Kathy Quinlan wrote: > I have some code that I build for two targets, one an Atmel uC and the > other FreeBSD. > > What is the best way to redefine getchar and putchar (in uC they use the > serial port, in FreeBSD stdin stdout) > > Or would I be better #ifdef the commands and making getchar only used in > uC and my serial port handler in FreeBSD ?? I didn't think getchar/putchar existed in the Atmel libc implementation.. I would suggest using a different function name and implement it differentl= y=20 for either platform. Also you'll want to be careful about the fact that the Atmel has 2 separate= =20 address spaces (if it's an AVR anyway) which can cause problems because you= =20 have to read from the right one. =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 --nextPart3373236.7uS1DI0nbt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCHV/55ZPcIHs/zowRAlTqAJ9zJZHr2OAlgTNG06Y5MDBeNj+F4QCeOrEC WuRsKRbVVQRwD74rVFMUcx4= =emgK -----END PGP SIGNATURE----- --nextPart3373236.7uS1DI0nbt-- From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 06:27:55 2005 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 BCA5916A4CE for ; Thu, 24 Feb 2005 06:27:55 +0000 (GMT) Received: from smtp206.mail.sc5.yahoo.com (smtp206.mail.sc5.yahoo.com [216.136.129.96]) by mx1.FreeBSD.org (Postfix) with SMTP id 6A3A143D72 for ; Thu, 24 Feb 2005 06:27:55 +0000 (GMT) (envelope-from river_robert@yahoo.com.cn) Received: from unknown (HELO ZJZ) (river?robert@219.239.240.220 with login) by smtp206.mail.sc5.yahoo.com with SMTP; 24 Feb 2005 06:27:52 -0000 Date: Thu, 24 Feb 2005 14:27:42 +0800 From: "River" To: "freebsd-hackers" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: <20050224062755.6A3A143D72@mx1.FreeBSD.org> Subject: "sleep" "select" system call not work correctly when linking with multithread libray--FreeBSD 4.5 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: river_robert@yahoo.com.cn List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Feb 2005 06:27:55 -0000 Does anyone know why "sleep" "select" can not work correctly in FreeBSD 4.5 when the system time is set backward for a long time,i.e several hours. The behavior is: sleep or select will be blocked for a long time much longer than expected. Through testing, we found that these two system calls both are OK if linking with the program with standard system libray, but will be blocked when linking with "-pthread" option (I suppose this option will let program link with multithread library) if system time is set backward. Seems like that the implementation of "select" "sleep" in multithread library is reated to system date. It is really wired. This is select testing program-- When time is set backward,the program linked with "-pthread" option did not continue printing anything. But using the program linked with standard library, printing did not affected by system time backward and all is OK. int main(int argc, char *argv[]) { fd_set readset; int result =0; struct timeval interval; interval.tv_sec = 10; interval.tv_usec = 0; for(;;) { result = select(FD_SETSIZE, NULL, NULL,NULL, &interval); switch(result) { case -1: printf(" case -1\n"); continue; case 0: printf("case 0, after select;\n"); continue; case 1: printf("read sth\n"); continue; } } return 0; } This is sleep testing program. Just the same result as select. int main(int argc, char *argv[]) { for(;;) { printf("case 0, before sleep\n"); sleep(5); printf("case 1, after sleep\n"); } return 0; } From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 07:19:40 2005 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 54CED16A4CE for ; Thu, 24 Feb 2005 07:19:40 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90E8F43D49 for ; Thu, 24 Feb 2005 07:19:39 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 191D9530C; Thu, 24 Feb 2005 08:19:38 +0100 (CET) Received: from xps.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 0B8465308; Thu, 24 Feb 2005 08:19:10 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id 78B7B33C3E; Thu, 24 Feb 2005 08:19:10 +0100 (CET) To: =?iso-8859-1?q?Se=E1n_C=2E_Farley?= References: <20050222173013.B26342@thor.farley.org> <863bvnmyrt.fsf@xps.des.no> <20050223140733.T35108@thor.farley.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 24 Feb 2005 08:19:10 +0100 In-Reply-To: <20050223140733.T35108@thor.farley.org> 19:09:01 -0600 (CST)") Message-ID: <86ekf65ssx.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: freebsd-hackers@freebsd.org Subject: Re: setenv/unsetenv's known memory leak 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, 24 Feb 2005 07:19:40 -0000 Se=E1n C. Farley writes: > How does this version look? Needlessly complicated. I'd just copy the entire environment into malloc()ed space the first time setenv() or putenv() is called. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 07:27:43 2005 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 C606516A4CE for ; Thu, 24 Feb 2005 07:27:43 +0000 (GMT) Received: from house.arach.net.au (house1.arach.net.au [203.30.44.84]) by mx1.FreeBSD.org (Postfix) with SMTP id 84B6A43D1D for ; Thu, 24 Feb 2005 07:27:42 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 31395 invoked from network); 24 Feb 2005 07:27:41 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house1.arach.net.au with SMTP for ; 24 Feb 2005 07:27:41 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1O7Tagx015203; Thu, 24 Feb 2005 15:29:37 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.4.0]); Thu, 24 Feb 2005 15:27:37 +0800 Message-ID: <421D81E9.809@kaqelectronics.dyndns.org> Date: Thu, 24 Feb 2005 15:27:37 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: "Daniel O'Connor" References: <421D584A.90203@kaqelectronics.dyndns.org> <200502241532.50010.doconnor@gsoft.com.au> In-Reply-To: <200502241532.50010.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed cc: freebsd-hackers@freebsd.org Subject: Re: gcc question 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, 24 Feb 2005 07:27:43 -0000 Daniel O'Connor wrote: > On Thu, 24 Feb 2005 15:00, Kathy Quinlan wrote: > >>I have some code that I build for two targets, one an Atmel uC and the >>other FreeBSD. >> >>What is the best way to redefine getchar and putchar (in uC they use the >>serial port, in FreeBSD stdin stdout) >> >>Or would I be better #ifdef the commands and making getchar only used in >>uC and my serial port handler in FreeBSD ?? > > > I didn't think getchar/putchar existed in the Atmel libc implementation.. > > I would suggest using a different function name and implement it differently > for either platform. > > Also you'll want to be careful about the fact that the Atmel has 2 separate > address spaces (if it's an AVR anyway) which can cause problems because you > have to read from the right one. > ATM it is written in codevisionAVR which is where the function is called, so I guess for now I will just break the AVR support;) I am planning on moving wholey over to GCC and FreeBSD, once my final customer has agreed to Eagle for the EDA side, this PC will be Free of M$ crap and I will be wholy FreeBSD :) Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 23 15:10:00 2005 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 8A1C116A4CE for ; Wed, 23 Feb 2005 15:10:00 +0000 (GMT) Received: from buakaw.homelinux.net (ctv-217-147-43-176.init.lt [217.147.43.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FCD443D31 for ; Wed, 23 Feb 2005 15:09:59 +0000 (GMT) (envelope-from puramuk@buakaw.homelinux.net) Received: (qmail 23989 invoked by uid 1015); 23 Feb 2005 17:11:41 +0200 Received: from puramuk@buakaw.homelinux.net by buakaw by uid 1012 with qmail-scanner-1.22-st-qms (spamassassin: 2.63. Clear:RC:0(192.168.0.37):SA:0(0.5/5.0):. Processed in 0.995461 secs); 23 Feb 2005 15:11:41 -0000 X-Spam-Status: No, hits=0.5 required=5.0 X-Antivirus-MYDOMAIN-Mail-From: puramuk@buakaw.homelinux.net via buakaw X-Antivirus-MYDOMAIN: 1.22-st-qms (Clear:RC:0(192.168.0.37):SA:0(0.5/5.0):. Processed in 0.995461 secs Process 23981) Received: from unknown (HELO vga) (puramuk@192.168.0.37) by buakaw.homelinux.net with SMTP; 23 Feb 2005 17:11:40 +0200 Message-ID: <000a01c519b9$bcdc3740$2500a8c0@vga> From: "Puramukas" To: Date: Wed, 23 Feb 2005 17:09:57 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailman-Approved-At: Thu, 24 Feb 2005 14:08:59 +0000 Content-Type: text/plain; charset="windows-1257" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: link_elf:symol m_gethdr udefined 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, 23 Feb 2005 15:10:00 -0000 I get this error when try to load NICs driver kldload if_yk.ko for Marvel Yukon 88E8053 Gigabit adapter on frebsd 5.3 i tryed to recompile kernel with variuos conf but nothing helped and maybe the drive wich i try to use do not fit for 5.3 http://www.syskonnect.com/syskonnect/support/driver/d0102_driver.html i also posted this probelm in questions ML several times but with no = repsone so can someone help me pls? From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 14:17:47 2005 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 081D716A4CE for ; Thu, 24 Feb 2005 14:17:47 +0000 (GMT) Received: from gatekeeper.syskonnect.de (gatekeeper.syskonnect.de [213.144.13.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E1E243D1F for ; Thu, 24 Feb 2005 14:17:46 +0000 (GMT) (envelope-from gheinig@syskonnect.de) Received: from syskonnect.de (skd.de [10.9.15.1])j1OEI191004344; Thu, 24 Feb 2005 15:18:01 +0100 (MET) Received: from syskonnect.de (localhost [127.0.0.1]) by syskonnect.de (8.12.11/8.12.11) with ESMTP id j1OEHY2W015844; Thu, 24 Feb 2005 15:17:35 +0100 (MET) Message-ID: <421DE1CC.50807@syskonnect.de> Date: Thu, 24 Feb 2005 15:16:44 +0100 From: Gerald Heinig User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Puramukas References: <000a01c519b9$bcdc3740$2500a8c0@vga> In-Reply-To: <000a01c519b9$bcdc3740$2500a8c0@vga> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: link_elf:symol m_gethdr udefined 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, 24 Feb 2005 14:17:47 -0000 Hi Puramukas, which driver version are you using? Did you get this error message with the standard GENERIC kernel that came with 5.3-RELEASE, or did you get it with your own kernel? By the way, if you get problems with our drivers, please contact support@syskonnect.de. That way we can log problems officially and provide new releases. Cheers, Gerald Puramukas wrote: > I get this error when try to load NICs driver kldload if_yk.ko > for Marvel Yukon 88E8053 Gigabit adapter on frebsd 5.3 > i tryed to recompile kernel with variuos conf but nothing helped > and maybe the drive wich i try to use do not fit for 5.3 > http://www.syskonnect.com/syskonnect/support/driver/d0102_driver.html > i also posted this probelm in questions ML several times but with no repsone > so can someone help me pls? From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 14:30:59 2005 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 55FBF16A4CE for ; Thu, 24 Feb 2005 14:30:59 +0000 (GMT) Received: from gatekeeper.syskonnect.de (gatekeeper.syskonnect.de [213.144.13.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77DE543D41 for ; Thu, 24 Feb 2005 14:30:58 +0000 (GMT) (envelope-from gheinig@syskonnect.de) Received: from syskonnect.de (skd.de [10.9.15.1])j1OEVD91004630; Thu, 24 Feb 2005 15:31:13 +0100 (MET) Received: from syskonnect.de (localhost [127.0.0.1]) by syskonnect.de (8.12.11/8.12.11) with ESMTP id j1OEUla2016153; Thu, 24 Feb 2005 15:30:48 +0100 (MET) Message-ID: <421DE4E4.5020509@syskonnect.de> Date: Thu, 24 Feb 2005 15:29:56 +0100 From: Gerald Heinig User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Puramukas References: <000a01c519b9$bcdc3740$2500a8c0@vga> In-Reply-To: <000a01c519b9$bcdc3740$2500a8c0@vga> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: link_elf:symol m_gethdr udefined 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, 24 Feb 2005 14:30:59 -0000 Hi Puramukas, Puramukas wrote: > I get this error when try to load NICs driver kldload if_yk.ko > for Marvel Yukon 88E8053 Gigabit adapter on frebsd 5.3 -------------------^^^^^^^ This is a Yukon-EC adapter which isn't supported yet for FreeBSD. Where did you get this driver from? The page you cited below doesn't have any FreeBSD drivers for Yukon-EC cards. All the same, you certainly shouldn't get an error message about any undefined functions. The driver shouldn't even attach. Are you _sure_ that the error message is produced when you load the driver and that it isn't caused by something else? > i tryed to recompile kernel with variuos conf but nothing helped > and maybe the drive wich i try to use do not fit for 5.3 > http://www.syskonnect.com/syskonnect/support/driver/d0102_driver.html > i also posted this probelm in questions ML several times but with no repsone > so can someone help me pls? From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 16:33:25 2005 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 6A9AF16A4CE for ; Thu, 24 Feb 2005 16:33:25 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C36243D48 for ; Thu, 24 Feb 2005 16:33:24 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id j1OGUTjL032246; Thu, 24 Feb 2005 09:30:29 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 24 Feb 2005 09:30:31 -0700 (MST) Message-Id: <20050224.093031.25156907.imp@bsdimp.com> To: river_robert@yahoo.com.cn From: "M. Warner Losh" In-Reply-To: <20050224062755.6A3A143D72@mx1.FreeBSD.org> References: <20050224062755.6A3A143D72@mx1.FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@FreeBSD.ORG Subject: Re: "sleep" "select" system call not work correctly when linking with multithread libray--FreeBSD 4.5 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, 24 Feb 2005 16:33:25 -0000 In message: <20050224062755.6A3A143D72@mx1.FreeBSD.org> "River" writes: : This is select testing program-- When time is set backward,the : program linked with "-pthread" option did not continue printing : anything. But using the program linked with standard library, : printing did not affected by system time backward and all is OK. This is a well know bug. The problem is that the threading library unwisely uses absolute times for the various events... Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 19:15:38 2005 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 8D3FF16A4CE for ; Thu, 24 Feb 2005 19:15:38 +0000 (GMT) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26BD243D4C for ; Thu, 24 Feb 2005 19:15:38 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j1OJFZiM026053; Thu, 24 Feb 2005 14:15:36 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20050223094647.D6CC01D9F4@turtle.stack.nl> Date: Thu, 24 Feb 2005 14:15:35 -0500 To: marcov@stack.nl (Marco van de Voort), freebsd-hackers@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Subject: Re: ARG_MAX increase 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, 24 Feb 2005 19:15:38 -0000 At 2:11 PM -0500 2/23/05, Garance A Drosihn wrote: >At 10:46 AM +0100 2/23/05, Marco van de Voort wrote: >>I saw ARG_MAX was increased in 6.0. Recently I noticed that >>the lang/fpc-devel port currently hits the old limit in >>certain (though rare) cases), and this is annoying. >> >>(some testing revealed that half the increase of 6.0 >>to 131k params is also ok) >> >>Any chance ARG_MAX will be upped in -STABLE too? > >For this specific example, it would be better to fix the port. I should add to this that I have no objection to seeing it raised in 5.x-stable. I'm just saying that even if we do raise it right now, there are a lot of users who will not be helped if the value is only changed in 5.x-stable. I (personally) would rather not see it changed so close to 5.4-release, but it might make sense to increase it in -stable shortly after 5.4-release. I have no opinion on what value it should be changed to, though, if we do increase it. I do not work in that part of the system, so I don't know all the pros and cons that would be involved. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 21:24:20 2005 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 F104316A4CE for ; Thu, 24 Feb 2005 21:24:19 +0000 (GMT) Received: from mail.wolves.k12.mo.us (duey.wolves.k12.mo.us [207.160.214.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8922D43D53 for ; Thu, 24 Feb 2005 21:24:19 +0000 (GMT) (envelope-from cdillon@wolves.k12.mo.us) Received: from localhost (localhost [127.0.0.1]) by mail.wolves.k12.mo.us (Postfix) with ESMTP id 1824C1FE2D; Thu, 24 Feb 2005 15:24:19 -0600 (CST) Received: from mail.wolves.k12.mo.us ([127.0.0.1]) by localhost (mail.wolves.k12.mo.us [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32651-01-52; Thu, 24 Feb 2005 15:24:17 -0600 (CST) Received: by mail.wolves.k12.mo.us (Postfix, from userid 1001) id 1D15D1FE2B; Thu, 24 Feb 2005 15:24:17 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.wolves.k12.mo.us (Postfix) with ESMTP id 1B80B1A908; Thu, 24 Feb 2005 15:24:17 -0600 (CST) Date: Thu, 24 Feb 2005 15:24:17 -0600 (CST) From: Chris Dillon To: Brian Reichert In-Reply-To: <20050223233351.GP6881@numachi.com> Message-ID: <20050224152145.Y24672@duey.wolves.k12.mo.us> References: <20050223233351.GP6881@numachi.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: amavisd-new at wolves.k12.mo.us cc: hackers@freebsd.org Subject: Re: smartmontools vs HP Smart Array 642 controller 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, 24 Feb 2005 21:24:20 -0000 On Wed, 23 Feb 2005, Brian Reichert wrote: > Does anyone have any experience with smartctl and a HP Smart Array > 642 controller? Your problem with smartmontools doesn't seem to be limited to the Smart Array 642, I just tried it on a DL380 G3 with the Smart Array 5i+ and got the same error you did. It appears to be a driver-specific problem. -- Chris Dillon - cdillon(at)wolves.k12.mo.us FreeBSD: The fastest, most open, and most stable OS on the planet - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures - PowerPC, ARM, MIPS, and S/390 under development - http://www.freebsd.org Q: Because it reverses the logical flow of conversation. A: Why is putting a reply at the top of the message frowned upon? From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 23:15:31 2005 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 3992C16A4CE; Thu, 24 Feb 2005 23:15:31 +0000 (GMT) Received: from kuldipmanak.chamkila.org (node-40240ed2.sjc.onnet.us.uu.net [64.36.14.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADB9A43D58; Thu, 24 Feb 2005 23:15:30 +0000 (GMT) (envelope-from aman@chamkila.org) Received: from mail.chamkila.org (kuldipmanak.chamkila.org [127.0.0.1]) j1ONDZxx027605; Thu, 24 Feb 2005 15:13:35 -0800 Received: from 69.36.228.194 (proxying for 192.168.96.110) (SquirrelMail authenticated user aman); by mail.chamkila.org with HTTP; Thu, 24 Feb 2005 15:13:35 -0800 (PST) Message-ID: <37799.69.36.228.194.1109286815.squirrel@69.36.228.194> In-Reply-To: <20050119103214.A27409@pooker.samsco.org> References: <20050119103214.A27409@pooker.samsco.org> Date: Thu, 24 Feb 2005 15:13:35 -0800 (PST) From: "Amandeep Pannu" To: "Scott Long" User-Agent: SquirrelMail/1.5.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: freebsd-hackers@freebsd.org Subject: Re: freebsd problem: What SCSI RAID controller compatible with 5.3-Release 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, 24 Feb 2005 23:15:31 -0000 Hi Scott, Is there any SCSi RAID controller that works on FreeBSD 5.3 Release. I have tried a couple.like Adaptec 2120S Adaptec 39320A Megaraid LSI-320-1 None of them worked. Any clues. They are under the HCl for FreeBSD 5.3. My configuration is two drives wiht RAID-1. I am using X6DHP-8G SM MB. Also tried the onboard Adaptec 7902, no luck. Thanks in advance. Aman From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 24 23:18:34 2005 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 94BF316A4CE; Thu, 24 Feb 2005 23:18:34 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05E9543D48; Thu, 24 Feb 2005 23:18:34 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j1ONINEH064048; Thu, 24 Feb 2005 16:18:23 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <421E604F.3080305@samsco.org> Date: Thu, 24 Feb 2005 16:16:31 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Amandeep Pannu References: <20050119103214.A27409@pooker.samsco.org> <37799.69.36.228.194.1109286815.squirrel@69.36.228.194> In-Reply-To: <37799.69.36.228.194.1109286815.squirrel@69.36.228.194> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org cc: freebsd-hackers@freebsd.org cc: Scott Long Subject: Re: freebsd problem: What SCSI RAID controller compatible with 5.3-Release 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, 24 Feb 2005 23:18:34 -0000 Amandeep Pannu wrote: > Hi Scott, > > Is there any SCSi RAID controller that works on FreeBSD 5.3 Release. > I have tried a couple.like > Adaptec 2120S > Adaptec 39320A > Megaraid LSI-320-1 > > None of them worked. > > Any clues. They are under the HCl for FreeBSD 5.3. > > My configuration is two drives wiht RAID-1. I am using X6DHP-8G SM MB. > Also tried the onboard Adaptec 7902, no luck. > > Thanks in advance. > > Aman The software RAID functionality of the 7902 and 39320A is not supported in FreeBSD. The 2120S and LSI 320-1 should work fine, though. Can you provide details on what problems you had? Scott From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 00:34:01 2005 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 6606E16A4CE for ; Fri, 25 Feb 2005 00:34:01 +0000 (GMT) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 271CA43D45 for ; Fri, 25 Feb 2005 00:34:01 +0000 (GMT) (envelope-from cliftonr@lava.net) Received: by malasada.lava.net (Postfix, from userid 102) id 42C5C153883; Thu, 24 Feb 2005 14:34:00 -1000 (HST) Date: Thu, 24 Feb 2005 14:34:00 -1000 From: Clifton Royston To: freebsd-hackers@freebsd.org Message-ID: <20050225003359.GB17163@lava.net> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050224120108.274C916A4D6@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050224120108.274C916A4D6@hub.freebsd.org> User-Agent: Mutt/1.4.2i Subject: Re: Remote upgrade of 4.X-5.3-Stable 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, 25 Feb 2005 00:34:01 -0000 On Thu, Feb 24, 2005 at 12:01:08PM +0000, freebsd-hackers-request@freebsd.org wrote: > Date: Wed, 23 Feb 2005 17:06:02 +0000 > From: Wouter van Rooij > Subject: Remote upgrade of 4.X-5.3-Stable > To: freebsd-hackers@freebsd.org > Message-ID: <7603e5d8050223090633360cc1@mail.gmail.com> > Content-Type: text/plain; charset=US-ASCII > > You did a make buildworld? > You just have to boot in single user mode and run mergemaster -p and > mergemaster. This doesn't work for the remote update case without physical console access, which he's asking about. Once the machine comes up in single user mode, sshd is not running and there's no way to get into it. Sorry to belabor the obvious. I believe that what's really needed here is to replicate some magic that is done on the first boot after installing FreeBSD on a system. IIRC, there's a special one-time invocation of an rc file - I think after a quick check of /etc/rc that it's rc.early that I'm thinking of. You can put commands in here which are run very early on following the first automatic boot into multi-user of the system, after all virtual drives are "assembled" but before filesystems are checked and mounted. If all steps of your upgrade script succeed, you can then at the end have the rc.early file rename itself (so it won't run on the next boot) sync the root file system, and reboot again. Obviously you want to test this very carefully, because in a remote environment you will probably get just one shot at having it work correctly; but hopefully this puts you on a workable path. -- Clifton -- Clifton Royston -- cliftonr@tikitechnologies.com Tiki Technologies Lead Programmer/Software Architect "I'm gonna tell my son to grow up pretty as the grass is green And whip-smart as the English Channel's wide..." -- 'Whip-Smart', Liz Phair From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 00:49:46 2005 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 D0C1316A4CE for ; Fri, 25 Feb 2005 00:49:46 +0000 (GMT) Received: from smtp.ucla.edu (smtp.ucla.edu [169.232.48.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3B5243D41 for ; Fri, 25 Feb 2005 00:49:46 +0000 (GMT) (envelope-from ashcs@ucla.edu) Received: from mail.ucla.edu (mail.ucla.edu [169.232.46.135]) by smtp.ucla.edu (8.13.1/8.13.1) with ESMTP id j1P0nkbZ021136 for ; Thu, 24 Feb 2005 16:49:46 -0800 Received: from ash (s226-171.resnet.ucla.edu [164.67.226.171]) (authenticated bits=0) by mail.ucla.edu (8.13.3/8.13.3) with ESMTP id j1P0njir004354 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Thu, 24 Feb 2005 16:49:46 -0800 Message-ID: <003d01c51ad3$ef5b5910$abe243a4@ash> From: "Ashwin Chandra" To: Date: Thu, 24 Feb 2005 16:49:59 -0800 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Probable-Spam: no X-Spam-Hits: 1.054 X-Spam-Score: * X-Scanned-By: smtp.ucla.edu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: sched_4bsd.c Quantum change 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, 25 Feb 2005 00:49:46 -0000 Quick question for you hackers! If i wanted to change the scheduler to have a certain marked bad process = have a higher time quantum than everyone elses (because it is behaving = bad, high mem usage and context switching) to let it run longer to = finish faster and avoid context switches and swapping, is this possible = in the current scheduler without major changes to it? Right now the = scheduler works by having a uniform quantum for all processes, am i = correct? Thanks Ash From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 01:01:19 2005 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 6C6C516A4CE for ; Fri, 25 Feb 2005 01:01:19 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E60F43D2D for ; Fri, 25 Feb 2005 01:01:18 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j1P11Apj064574 for ; Thu, 24 Feb 2005 18:01:10 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <421E7867.9060101@samsco.org> Date: Thu, 24 Feb 2005 17:59:19 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 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-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Subject: Driver Update Disk discussion 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, 25 Feb 2005 01:01:19 -0000 The good news is that more and more vendors are supporting FreeBSD directly, many via paid staff to write and maintain drivers, testing labs for QA, and tech support for end-customers. The bad news is that FreeBSD puts up a number of roadblocks that makes their jobs very difficult. While we do a lot to help them get their sources into the tree, the real problem is that we make it very hard for them to provide driver updates that are asynchronous from FreeBSD releases. It is very common for a vendor to want to put out an updated driver with fixed bugs or updated support for a prior release of the OS. The ideal way to do this is by releasing a 'driver update disk' that contains binary modules of the updated driver, along with scripts or instructions for installing it into the system. This system has to be easy and smooth; the vendors often times deal with customers who are not savvy and are in need of an automated, fool-proof solution. It has to be able to cleanly override any existing modules or in-kernel versions of the modules, it has to be able to survive a system recompile, and it has to work in an environment where the system might not be able to boot or install without the updated module. So, in no particular order, the problems that are present right now include: - sysinstall support. Sysinstall has a minor menu for loading KLD's off of a disk, but whatever gets loaded does not get transfered to the new system at all. It's possible to break into a shell and copy and paste the bits by hand, but that's a very poor situation. A framework needs to be in place that lets sysinstall run pre- and post- install actions on a driver disk, with the vendor able to supply custom scripts for these actions. Support for the scripts interacting with the user should also be available (for custom readme's, EULA's, etc). Sysinstall should also be able to arbitrate between a vendor/user supplied driver and the stock driver. The current point where sysinstall allows a vendor disk is too late; the system is already up and all the drivers in the kernel have already probed and attached. This means that overriding an existing driver is impossible. Solving this likely means that the sysinstall kernel is completely stripped down, and all drivers exist as modules that get loaded after sysinstall has started and given the user the option to load a vendor driver. - runtime support. Where will modules be put, how will they be ensured to not collide with the base system modules, and how will the system ensure that they get loaded on every boot. Most of the pieces are in place right now via the loader knowing about /boot/modules, and /boot/loader.conf able to be modified to point to modules in there. What is missing is a formal definition of how these pieces work, and tools to automate and manage it for the user and vendor. - kernel option support. How do we support vendor modules in a kernel that might be compiled with PAE (rather common these days), SMP, MAC, etc. The loader and /boot infrastructure has no concept of this. It's highly important, though. - source code support. A vendor might want to distribute source code for the module that would be picked up in a kernel re-compile. Patching the src/ tree is the only way to do that now, and that creates problems when interacting with cvsup. Solving this would tie into the problem of compiling drivers out of ports/. In fact, a vendor driver, both in source and in binary form, should probably be treated as a port/package, and I describe below. - kernel api/abi. We are trying to keep the kernel api/abi stable now, which helps a lot. However, there is a chance that these could change for legitimate reasons. How do we protect binary-only modules from this? Linux has a fairly draconian system of hashing all of the exported kernel symbols with the kernel options and the kernel major/minor/subminor versions, and making the linker reject modules that don't have the right hash. Should we follow with something similar, or should we have runtime checks that check symbol/structure signatures? Or should we say that we make no guarantees about a binary-only module working on anything but a -RELEASE kernel? - management. How do ge let the user and vendor manage the updated drivers? The vendor might put out a series of updates during the lifecycle of a particular OS release, so we need to provide infrastructure to make this work. The obvious candidate is the ports/packages system, but does that really do all that we need. I need to sit down and think about this a lot before I can say. It would also need to tie in with sysinstall. - kernel namespace. Devclass collisions seem to already be handled gracefully. devfs collisions aren't, and maybe some seatbelts here would be good. Linker symbol collisions are what I really worry about, since they will prevent a vendor from installing an updated driver on top of an existing driver with a overlapping set of non-static symbols. I know that we do some sort of magic symbol hiding while compiling the kernel, but does that apply to modules also? These are the big things I can think of right now. Solving it is a big task, but it's something that we need to do if we want vendor support to continue and to grow. If anyone is interested in helping with the design and engineering of this (this isn't a call for testers!), please let me know. Scott From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 01:39:41 2005 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 C214D16A4CE for ; Fri, 25 Feb 2005 01:39:41 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57CBA43D2F for ; Fri, 25 Feb 2005 01:39:41 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id j1P1dZh7002513; Thu, 24 Feb 2005 19:39:35 -0600 (CST) (envelope-from sean-freebsd@farley.org) Received: from localhost (localhost [127.0.0.1]) by thor.farley.org (8.13.1/8.13.1) with ESMTP id j1P1dgwZ046662; Thu, 24 Feb 2005 19:39:42 -0600 (CST) (envelope-from sean-freebsd@farley.org) Date: Thu, 24 Feb 2005 19:39:42 -0600 (CST) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <86ekf65ssx.fsf@xps.des.no> Message-ID: <20050224174015.D45516@thor.farley.org> References: <20050222173013.B26342@thor.farley.org> <863bvnmyrt.fsf@xps.des.no> <20050223140733.T35108@thor.farley.org> <86ekf65ssx.fsf@xps.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-895816517-1109288758=:45516" Content-ID: <20050224193913.I46648@thor.farley.org> cc: freebsd-hackers@freebsd.org Subject: Re: setenv/unsetenv's known memory leak 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, 25 Feb 2005 01:39:41 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-895816517-1109288758=:45516 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: <20050224183507.Q46189@thor.farley.org> On Thu, 24 Feb 2005, Dag-Erling Sm=F8rgrav wrote: > Se=E1n C. Farley writes: >> How does this version look? > > Needlessly complicated. I'd just copy the entire environment into > malloc()ed space the first time setenv() or putenv() is called. I like complicated. :) I have written a new version that makes copies of all variables within the environment upon the first run of setenv(). Here are the two versions I have written to stop the memory leak. Old (complex): http://www.farley.org/freebsd/tmp/setenv-1.tar.bz2 New (simple): http://www.farley.org/freebsd/tmp/setenv-2.tar.bz2 Se=E1n --=20 sean-freebsd@farley.org --0-895816517-1109288758=:45516-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 02:01:10 2005 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 B2E4016A4CE for ; Fri, 25 Feb 2005 02:01:10 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C01743D45 for ; Fri, 25 Feb 2005 02:01:07 +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 j1P213vi072549; Fri, 25 Feb 2005 12:31:04 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Kathy Quinlan Date: Fri, 25 Feb 2005 12:30:58 +1030 User-Agent: KMail/1.7.92 References: <421D584A.90203@kaqelectronics.dyndns.org> <200502241532.50010.doconnor@gsoft.com.au> <421D81E9.809@kaqelectronics.dyndns.org> In-Reply-To: <421D81E9.809@kaqelectronics.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart138663145.eiyQ4XcL4m"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502251230.59147.doconnor@gsoft.com.au> X-Spam-Score: -5.4 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: freebsd-hackers@freebsd.org Subject: Re: gcc question 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, 25 Feb 2005 02:01:10 -0000 --nextPart138663145.eiyQ4XcL4m Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thu, 24 Feb 2005 17:57, Kathy Quinlan wrote: > ATM it is written in codevisionAVR which is where the function is > called, so I guess for now I will just break the AVR support;) Ahh.. So.. are you talking about getting the coding running _in FreeBSD_ or compi= led=20 on FreeBSD and running on an AVR? =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 --nextPart138663145.eiyQ4XcL4m Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCHobb5ZPcIHs/zowRAmHoAJ0cYZnzwCaSE4tJwiJOtGG9TaydvQCfd3/E 7TF5wMrSxFvUAvblzuHrzMY= =fnFt -----END PGP SIGNATURE----- --nextPart138663145.eiyQ4XcL4m-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 02:05:42 2005 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 5573C16A4CE for ; Fri, 25 Feb 2005 02:05:42 +0000 (GMT) Received: from smtp201.mail.sc5.yahoo.com (smtp201.mail.sc5.yahoo.com [216.136.129.91]) by mx1.FreeBSD.org (Postfix) with SMTP id 3ED9143D46 for ; Fri, 25 Feb 2005 02:05:42 +0000 (GMT) (envelope-from river_robert@yahoo.com.cn) Received: from unknown (HELO ZJZ) (river?robert@219.239.240.220 with login) by smtp201.mail.sc5.yahoo.com with SMTP; 25 Feb 2005 02:05:40 -0000 Date: Fri, 25 Feb 2005 10:05:26 +0800 From: "River" To: "M. Warner Losh" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: <20050225020542.3ED9143D46@mx1.FreeBSD.org> cc: "freebsd-hackers@FreeBSD.ORG" Subject: Re: Re: "sleep" "select" system call not work correctly when linkingwith multithread libray--FreeBSD 4.5 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: river_robert@yahoo.com.cn List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2005 02:05:42 -0000 Many thanks for your reply. Did the lastest FreeBSD fix this bug? And which version? Because our OS is based on FreeBSD 4.5 and can not port to other FreeBSD easily, Any method to fix it in 4.5? Thanks. From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 02:09:39 2005 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 E243816A4CE for ; Fri, 25 Feb 2005 02:09:39 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id E288643D39 for ; Fri, 25 Feb 2005 02:09:38 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id j1P29LYs055034; Thu, 24 Feb 2005 19:09:21 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 24 Feb 2005 19:09:25 -0700 (MST) Message-Id: <20050224.190925.29021204.imp@bsdimp.com> To: scottl@samsco.org From: "M. Warner Losh" In-Reply-To: <421E7867.9060101@samsco.org> References: <421E7867.9060101@samsco.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: Driver Update Disk discussion 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, 25 Feb 2005 02:09:40 -0000 In message: <421E7867.9060101@samsco.org> Scott Long writes: : - runtime support. Where will modules be put, how will they be ensured : to not collide with the base system modules, and how will the system : ensure that they get loaded on every boot. Most of the pieces are in : place right now via the loader knowing about /boot/modules, and : /boot/loader.conf able to be modified to point to modules in there. : What is missing is a formal definition of how these pieces work, and : tools to automate and manage it for the user and vendor. Right now /boot/modules is preserved on all kernel installs. What else is necessary? If we have a working packaging system, then installation is taken care of in a manner similar to /usr/local/bin/emacs. A bigger issue is that most of the probe routines return 0 now. This means that only devices that have no support at all in the base kernel can be overridden. I'm working to fix this and hope to get that done before 5.4 at least for PCI and maybe usb and firewire (those probe routines which can be called multiple times), but maybe not for ISA and some PC Card drivers. This likely will be sufficient for any vendor that will want to provide drivers for any modern system. : - kernel option support. How do we support vendor modules in a kernel : that might be compiled with PAE (rather common these days), SMP, MAC, : etc. The loader and /boot infrastructure has no concept of this. It's : highly important, though. The answer in the past is that 'there shall be only one'. SMP doesn't change the module ABI (you can use modules on SMP and non-SMP kernels), but PAE does (since it changes a few key data types). Right now I believe that it is the only option that does change the ABI. Last time I looked, MAC didn't change the ABI at all, but so much has happened there that this may have changed things. The discussions at the time when all this was hashed out for kld(9) and /boot stuff was that it was undesirable to be able to have options that affect the ABI since that would quickly lead into a combinatoric nightmare. Nothing has really changed here: we want to have as few ABIs as possible, ideally 1. I believe that PAE support really should be a seprate kernel architecture and branded as such. Clearly, we can revisit the decisions of the past on this issue. : - source code support. A vendor might want to distribute source code : for the module that would be picked up in a kernel re-compile. Patching : the src/ tree is the only way to do that now, and that creates problems : when interacting with cvsup. Solving this would tie into the problem of : compiling drivers out of ports/. In fact, a vendor driver, both in : source and in binary form, should probably be treated as a port/package, : and I describe below. One does not need to patch the source tree at to pick up ports modules for a kernel rebuild. One can build the ports modules as part of the kernel by simply defining PORTS_MODULES in a kernel config file. In addition, one can specify absolute paths with MODULES_OVERRIDE. One can also build modules outside the tree against a specific kernel (if they somehow depend on the config files). There is one bug with PORTS_MODULES, I'll grant, but that is easy to fix (install should be translated into deinstall/reinstall, but isn't). This bug is easy to work around right now by defining FORCE_PACKAGE_REGISTER, but it should be fixed. : - kernel api/abi. We are trying to keep the kernel api/abi stable now, : which helps a lot. However, there is a chance that these could change : for legitimate reasons. How do we protect binary-only modules from : this? Linux has a fairly draconian system of hashing all of the : exported kernel symbols with the kernel options and the kernel : major/minor/subminor versions, and making the linker reject modules that : don't have the right hash. Should we follow with something similar, or : should we have runtime checks that check symbol/structure signatures? : Or should we say that we make no guarantees about a binary-only module : working on anything but a -RELEASE kernel? Until we have a well defined API that's well documented, I think that any pretense of a guarantee overstates what we'll be able to deliver. Many of the APIs are documented, and most drivers can be written using just these APIs. However, the fussiness needs to change. We also need to have some sort of regression tests There was some work done to make all 5.x drivers depend on a kernel module version 5, but that didn't make it into 5.x due to time constraints on my part (and no one else seemed to be motivated to pick things up). We might want to revisit this. As a practical matter, we can make no guarantees about anything but -RELEASE. In fact, given the total lack of regression tests, it would be hard to tell vendors that we can be sure that their drivers will work. The documentation for the API we have is weak, but we manage to do a pretty good job of not making major changes to its core. I'll point out that most minor releases historically have changed something in the interfaces, but it has usually been so minor that no one noticed... : - kernel namespace. Devclass collisions seem to already be handled : gracefully. devfs collisions aren't, and maybe some seatbelts here : would be good. Linker symbol collisions are what I really worry about, : since they will prevent a vendor from installing an updated driver on : top of an existing driver with a overlapping set of non-static symbols. : I know that we do some sort of magic symbol hiding while compiling the : kernel, but does that apply to modules also? All the module symbols are completely hidden from everybody who does not profess a dependency on a module, unless the module goes out of its way to export symbols. So this works well for us. devfs isn't handled at all, you are right. : These are the big things I can think of right now. Solving it is a big : task, but it's something that we need to do if we want vendor support to : continue and to grow. If anyone is interested in helping with the : design and engineering of this (this isn't a call for testers!), please : let me know. Yes. There's a lot of issues to work through... Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 02:18:38 2005 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 4E3EA16A4CE for ; Fri, 25 Feb 2005 02:18:38 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id B657343D39 for ; Fri, 25 Feb 2005 02:18:37 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id j1P2Fdfs055103; Thu, 24 Feb 2005 19:15:39 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 24 Feb 2005 19:15:44 -0700 (MST) Message-Id: <20050224.191544.01024892.imp@bsdimp.com> To: river_robert@yahoo.com.cn From: "M. Warner Losh" In-Reply-To: <200502250205.j1P25hEU004737@rover.village.org> References: <200502250205.j1P25hEU004737@rover.village.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@FreeBSD.ORG Subject: Re: "sleep" "select" system call not work correctly when linkingwith multithread libray--FreeBSD 4.5 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, 25 Feb 2005 02:18:38 -0000 In message: <200502250205.j1P25hEU004737@rover.village.org> "River" writes: : Many thanks for your reply. Did the lastest FreeBSD fix this bug? : And which version? I believe that 5 fixes this bug, or at least mostly fixes things (since there's at least one pthread API that uses absolute time). However, I've not verified this on 5. : Because our OS is based on FreeBSD 4.5 and can not port to other : FreeBSD easily, Any method to fix it in 4.5? Thanks. The only fix that I could come up with was to base everything on uptime rather than system time. However, I ran into snags because the pthread's API is stupid: int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime); abstime is lame, because it doesn't cope well with system time changing. Your best bet is to make sure that the system time doesn't step after your application starts. This means you'll likely need to wait for ntpd to step the time, or use ntpdate to get things close and tell ntpd not to step things. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 03:14:44 2005 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 2488F16A4CE for ; Fri, 25 Feb 2005 03:14:44 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F61343D5A for ; Fri, 25 Feb 2005 03:14:43 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id j1P3EexU003608 for ; Thu, 24 Feb 2005 21:14:40 -0600 (CST) (envelope-from sean-freebsd@farley.org) Received: from localhost (localhost [127.0.0.1]) by thor.farley.org (8.13.1/8.13.1) with ESMTP id j1P3Elo9047443 for ; Thu, 24 Feb 2005 21:14:48 -0600 (CST) (envelope-from sean-freebsd@farley.org) Date: Thu, 24 Feb 2005 21:14:47 -0600 (CST) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: freebsd-hackers@freebsd.org In-Reply-To: <20050224174015.D45516@thor.farley.org> Message-ID: <20050224211301.D47252@thor.farley.org> References: <20050222173013.B26342@thor.farley.org> <863bvnmyrt.fsf@xps.des.no> <20050223140733.T35108@thor.farley.org> <86ekf65ssx.fsf@xps.des.no> <20050224174015.D45516@thor.farley.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-2013438569-1109301287=:47252" Subject: Re: setenv/unsetenv's known memory leak 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, 25 Feb 2005 03:14:44 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-2013438569-1109301287=:47252 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 24 Feb 2005, Se=E1n C. Farley wrote: > Here are the two versions I have written to stop the memory leak. > Old (complex): http://www.farley.org/freebsd/tmp/setenv-1.tar.bz2 > New (simple): http://www.farley.org/freebsd/tmp/setenv-2.tar.bz2 Also, you may find an uncompressed view of the two tar files: Old (complex): http://www.farley.org/freebsd/tmp/setenv-1/ New (simple): http://www.farley.org/freebsd/tmp/setenv-2/ Se=E1n --=20 sean-freebsd@farley.org --0-2013438569-1109301287=:47252-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 03:18:33 2005 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 AA3E716A4CF; Fri, 25 Feb 2005 03:18:33 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3054E43D64; Fri, 25 Feb 2005 03:18:32 +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 j1P3IAJH074207; Fri, 25 Feb 2005 13:48:10 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Fri, 25 Feb 2005 13:48:05 +1030 User-Agent: KMail/1.7.92 References: <421E7867.9060101@samsco.org> <20050224.190925.29021204.imp@bsdimp.com> In-Reply-To: <20050224.190925.29021204.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1142294.d4Tdyvpt0O"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502251348.06818.doconnor@gsoft.com.au> X-Spam-Score: -5.4 () IN_REP_TO,MIME_LONG_LINE_QP,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: scottl@samsco.org cc: hackers@freebsd.org Subject: Re: Driver Update Disk discussion 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, 25 Feb 2005 03:18:33 -0000 --nextPart1142294.d4Tdyvpt0O Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Fri, 25 Feb 2005 12:39, M. Warner Losh wrote: > One does not need to patch the source tree at to pick up ports modules > for a kernel rebuild. One can build the ports modules as part of the > kernel by simply defining PORTS_MODULES in a kernel config file. In > addition, one can specify absolute paths with MODULES_OVERRIDE. One > can also build modules outside the tree against a specific kernel (if > they somehow depend on the config files). I think PORTS_MODULES is a little suboptimal.. I have a patch set which allows a port to install KLD source in a directory= =20 and have it picked up during a build/install kernel. This has a few=20 advantages over calling the ports tree from those makefiles. The prime one= =20 being that your source code does not change between upgrades without you=20 saying so. This is matters since (for example) the newer nvidia driver does= =20 not work on some hardware the old driver does (eg Fx5200 Go). It also means= =20 that the kernel build/install does not result in non kernel things being=20 altered. The disadvantage is that the KLD ports need to be modified to install the=20 source code in the right place (not hard) and that you will need to upgrade= =20 your ports tree to keep up with ABI changes if you update your source but=20 IMHO it's better to make this sort of action explicit - otherwise the end=20 user is in the position of not knowing what has changed on their system. Also speaking of KLD ports.. I really wish they wouldn't install=20 into /boot/modules (I patch so they don't) as it is a really good way to=20 shoot yourself in the foot during an upgrade :( =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 --nextPart1142294.d4Tdyvpt0O Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCHpju5ZPcIHs/zowRAl0EAJ46ORi/H0f7cELLmBi0voPKiXGHDQCeL1FD x6Rat4Bi7CS8Dkw3xjt6i5o= =FtTs -----END PGP SIGNATURE----- --nextPart1142294.d4Tdyvpt0O-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 03:18:33 2005 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 AA3E716A4CF; Fri, 25 Feb 2005 03:18:33 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3054E43D64; Fri, 25 Feb 2005 03:18:32 +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 j1P3IAJH074207; Fri, 25 Feb 2005 13:48:10 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Fri, 25 Feb 2005 13:48:05 +1030 User-Agent: KMail/1.7.92 References: <421E7867.9060101@samsco.org> <20050224.190925.29021204.imp@bsdimp.com> In-Reply-To: <20050224.190925.29021204.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1142294.d4Tdyvpt0O"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502251348.06818.doconnor@gsoft.com.au> X-Spam-Score: -5.4 () IN_REP_TO,MIME_LONG_LINE_QP,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: scottl@samsco.org cc: hackers@freebsd.org Subject: Re: Driver Update Disk discussion 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, 25 Feb 2005 03:18:33 -0000 --nextPart1142294.d4Tdyvpt0O Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Fri, 25 Feb 2005 12:39, M. Warner Losh wrote: > One does not need to patch the source tree at to pick up ports modules > for a kernel rebuild. One can build the ports modules as part of the > kernel by simply defining PORTS_MODULES in a kernel config file. In > addition, one can specify absolute paths with MODULES_OVERRIDE. One > can also build modules outside the tree against a specific kernel (if > they somehow depend on the config files). I think PORTS_MODULES is a little suboptimal.. I have a patch set which allows a port to install KLD source in a directory= =20 and have it picked up during a build/install kernel. This has a few=20 advantages over calling the ports tree from those makefiles. The prime one= =20 being that your source code does not change between upgrades without you=20 saying so. This is matters since (for example) the newer nvidia driver does= =20 not work on some hardware the old driver does (eg Fx5200 Go). It also means= =20 that the kernel build/install does not result in non kernel things being=20 altered. The disadvantage is that the KLD ports need to be modified to install the=20 source code in the right place (not hard) and that you will need to upgrade= =20 your ports tree to keep up with ABI changes if you update your source but=20 IMHO it's better to make this sort of action explicit - otherwise the end=20 user is in the position of not knowing what has changed on their system. Also speaking of KLD ports.. I really wish they wouldn't install=20 into /boot/modules (I patch so they don't) as it is a really good way to=20 shoot yourself in the foot during an upgrade :( =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 --nextPart1142294.d4Tdyvpt0O Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCHpju5ZPcIHs/zowRAl0EAJ46ORi/H0f7cELLmBi0voPKiXGHDQCeL1FD x6Rat4Bi7CS8Dkw3xjt6i5o= =FtTs -----END PGP SIGNATURE----- --nextPart1142294.d4Tdyvpt0O-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 03:34:54 2005 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 D30F516A4CE for ; Fri, 25 Feb 2005 03:34:54 +0000 (GMT) Received: from house.arach.net.au (house1.arach.net.au [203.30.44.84]) by mx1.FreeBSD.org (Postfix) with SMTP id 324F643D49 for ; Fri, 25 Feb 2005 03:34:53 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 23105 invoked from network); 25 Feb 2005 03:34:51 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house1.arach.net.au with SMTP for ; 25 Feb 2005 03:34:51 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1P3akup051047; Fri, 25 Feb 2005 11:36:46 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.4.0]); Fri, 25 Feb 2005 11:34:48 +0800 Message-ID: <421E9CD7.5060503@kaqelectronics.dyndns.org> Date: Fri, 25 Feb 2005 11:34:47 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: "Daniel O'Connor" References: <421D584A.90203@kaqelectronics.dyndns.org> <200502241532.50010.doconnor@gsoft.com.au> <421D81E9.809@kaqelectronics.dyndns.org> <200502251230.59147.doconnor@gsoft.com.au> In-Reply-To: <200502251230.59147.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed cc: freebsd-hackers@freebsd.org Subject: Re: gcc question 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, 25 Feb 2005 03:34:54 -0000 Daniel O'Connor wrote: > On Thu, 24 Feb 2005 17:57, Kathy Quinlan wrote: > >>ATM it is written in codevisionAVR which is where the function is >>called, so I guess for now I will just break the AVR support;) > > > Ahh.. > So.. are you talking about getting the coding running _in FreeBSD_ or compiled > on FreeBSD and running on an AVR? > I am talking about getting the same code running under FreeBSD AND the AVR with minimal changes. Regards, Kat. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 03:45:36 2005 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 0A70A16A4CE for ; Fri, 25 Feb 2005 03:45:36 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C91C43D58 for ; Fri, 25 Feb 2005 03:45:35 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id j1P3iSSU056923; Thu, 24 Feb 2005 20:44:28 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 24 Feb 2005 20:44:33 -0700 (MST) Message-Id: <20050224.204433.46658352.imp@bsdimp.com> To: doconnor@gsoft.com.au From: "M. Warner Losh" In-Reply-To: <200502251348.06818.doconnor@gsoft.com.au> References: <421E7867.9060101@samsco.org> <20050224.190925.29021204.imp@bsdimp.com> <200502251348.06818.doconnor@gsoft.com.au> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Driver Update Disk discussion 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, 25 Feb 2005 03:45:36 -0000 [[ don't cc freebsd-hackers@ and hackers@ ]] In message: <200502251348.06818.doconnor@gsoft.com.au> "Daniel O'Connor" writes: : On Fri, 25 Feb 2005 12:39, M. Warner Losh wrote: : > One does not need to patch the source tree at to pick up ports modules : > for a kernel rebuild. One can build the ports modules as part of the : > kernel by simply defining PORTS_MODULES in a kernel config file. In : > addition, one can specify absolute paths with MODULES_OVERRIDE. One : > can also build modules outside the tree against a specific kernel (if : > they somehow depend on the config files). : : I think PORTS_MODULES is a little suboptimal.. How so? : I have a patch set which allows a port to install KLD source in a directory : and have it picked up during a build/install kernel. This has a few : advantages over calling the ports tree from those makefiles. The prime one : being that your source code does not change between upgrades without you : saying so. This is matters since (for example) the newer nvidia driver does : not work on some hardware the old driver does (eg Fx5200 Go). It also means : that the kernel build/install does not result in non kernel things being : altered. How do your patches work? Do they work with multiple kernel trees? : The disadvantage is that the KLD ports need to be modified to install the : source code in the right place (not hard) and that you will need to upgrade : your ports tree to keep up with ABI changes if you update your source but : IMHO it's better to make this sort of action explicit - otherwise the end : user is in the position of not knowing what has changed on their system. I guess I'm a little unclear why this is better or worse than PORTS_MODULES. I guess I'm missing the explicit step, since I only ever update the parts of my ports tree that I'm upgrading with portupgrade. : Also speaking of KLD ports.. I really wish they wouldn't install : into /boot/modules (I patch so they don't) as it is a really good way to : shoot yourself in the foot during an upgrade :( Usually this is only a problem when tracking or jumping to current, but I understand... Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 04:14:46 2005 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 97C1A16A4CE for ; Fri, 25 Feb 2005 04:14:46 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CF4C43D1D for ; Fri, 25 Feb 2005 04:14:45 +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 j1P4Ed1T074755; Fri, 25 Feb 2005 14:44:39 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: "M. Warner Losh" Date: Fri, 25 Feb 2005 14:44:27 +1030 User-Agent: KMail/1.7.92 References: <421E7867.9060101@samsco.org> <200502251348.06818.doconnor@gsoft.com.au> <20050224.204433.46658352.imp@bsdimp.com> In-Reply-To: <20050224.204433.46658352.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1169957.ZoKzpebqRW"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502251444.35329.doconnor@gsoft.com.au> X-Spam-Score: -5.1 () IN_REP_TO,MIME_LONG_LINE_QP,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: freebsd-hackers@freebsd.org Subject: Re: Driver Update Disk discussion 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, 25 Feb 2005 04:14:46 -0000 --nextPart1169957.ZoKzpebqRW Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Fri, 25 Feb 2005 14:14, M. Warner Losh wrote: > : I think PORTS_MODULES is a little suboptimal.. > > How so? If you upgrade your ports tree and then rebuild your kernel you may upgrade= a=20 port KLD without wanting to. > : Fx5200 Go). It also means that the kernel build/install does not result > : in non kernel things being altered. > > How do your patches work? http://www.dons.net.au/~darius/port-kld.diff http://www.dons.net.au/~darius/port-makefile.txt (Rename the later to Makefile and put it in /usr/local/kld) It hooks into /usr/src/sys/modules/Makfile and looks for module directories= to=20 build in a certain directory. It [is supposed to] acts like another=20 subdirectory of /usr/src/sys/modules. > Do they work with multiple kernel trees?=20 I am pretty sure it does but I haven't explicitly tested it - certainly the= =20 source directory doesn't get dirtied by builds. > I guess I'm a little unclear why this is better or worse than > PORTS_MODULES. I guess I'm missing the explicit step, since I only > ever update the parts of my ports tree that I'm upgrading with > portupgrade. Ahh.. I NFS mount my ports tree between a bunch of machines they all have=20 WRKDIRPREFIX, and the ports tree is updated each day using cvsup. I don't think this is an uncommon setup but I don't have any evidence. > : Also speaking of KLD ports.. I really wish they wouldn't install > : into /boot/modules (I patch so they don't) as it is a really good way to > : shoot yourself in the foot during an upgrade :( > > Usually this is only a problem when tracking or jumping to current, > but I understand... Yeah usually, but I have had it happen in -stable too (very rare). Even so = it=20 can be a pretty big waste of time as a developer when you're tracking=20 current ;) =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 --nextPart1169957.ZoKzpebqRW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCHqYr5ZPcIHs/zowRAvgCAJ92ghcRO7uwfg2fQaFWh8VHdS8awwCfXUvP C9YLjRLEoMA7xtnMaDzP9k0= =pZjT -----END PGP SIGNATURE----- --nextPart1169957.ZoKzpebqRW-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 07:13:29 2005 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 BB8E916A4CE for ; Fri, 25 Feb 2005 07:13:29 +0000 (GMT) Received: from mail.emict.com (brig.emict.com [212.90.172.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A93C43D53 for ; Fri, 25 Feb 2005 07:13:28 +0000 (GMT) (envelope-from andrit@ukr.net) Received: from BORJA (unknown [203.199.120.221]) by mail.emict.com (Postfix) with ESMTP id 24ED12E17B; Fri, 25 Feb 2005 09:13:22 +0200 (EET) Message-ID: <002b01c51b09$7e75eb80$090210ac@BORJA> From: "Andriy Tkachuk" To: "Clifton Royston" , References: <20050224120108.274C916A4D6@hub.freebsd.org> <20050225003359.GB17163@lava.net> Date: Fri, 25 Feb 2005 12:37:02 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Re: Remote upgrade of 4.X-5.3-Stable 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, 25 Feb 2005 07:13:29 -0000 Gentlemen, is this theme for this list? From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 08:17:03 2005 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 A52C116A4CE for ; Fri, 25 Feb 2005 08:17:03 +0000 (GMT) Received: from mail.emict.com (brig.emict.com [212.90.172.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C6CE43D2F for ; Fri, 25 Feb 2005 08:17:00 +0000 (GMT) (envelope-from andrit@ukr.net) Received: from BORJA (unknown [203.199.120.221]) by mail.emict.com (Postfix) with ESMTP id EC8652E35D for ; Fri, 25 Feb 2005 10:16:45 +0200 (EET) Message-ID: <00c601c51b12$5a9f0760$090210ac@BORJA> From: "Andriy Tkachuk" To: References: Date: Fri, 25 Feb 2005 13:46:30 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Re: giving up on 1 buffers error messsage 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, 25 Feb 2005 08:17:03 -0000 It is interesting why threre is no answer for this question so long time, regardless that it was posted 2 times :) For me it is also interesting to get the answer for this question since from time to time i also confused by such msgs on shutdown. > > syncing disks... 54 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up on 1 > buffers > > > Hi, > > I am referring to the message when the code in kern_shutdown.c in bsd > 4.10 is called at the time of boot() system call > > My understanding is that this message tells us that 1 buffer from the > buffer cache was not successfully flushed to disk, since the last call to > sync(). Is that right? In that case what happens to this buffer? Is it > discarded and assume that fsck will fix this on reboot? > > Since the syncer process runs periodically, can this error message be > avoided if we wait long enough to guarantee flushing to disk (I have tried > with DELAYS upto 30 seconds but I still get the error sometimes). > > I am actually trying to use this same code at a different point in time > (not during shutdown, but to take a checkpoint), so I am not sure if that > contributes to this error message? > > > > > _______________________________________________ > 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 Feb 25 09:39:32 2005 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 3C15E16A4CE for ; Fri, 25 Feb 2005 09:39:32 +0000 (GMT) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58B9943D5A for ; Fri, 25 Feb 2005 09:39:31 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1P9dO9s031027 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 25 Feb 2005 20:39:27 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1P9dO7l090727; Fri, 25 Feb 2005 20:39:24 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j1P9dHVa090726; Fri, 25 Feb 2005 20:39:17 +1100 (EST) (envelope-from pjeremy) Date: Fri, 25 Feb 2005 20:39:17 +1100 From: Peter Jeremy To: Scott Long Message-ID: <20050225093917.GA90508@cirb503493.alcatel.com.au> References: <421E7867.9060101@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <421E7867.9060101@samsco.org> User-Agent: Mutt/1.4.2i cc: hackers@freebsd.org Subject: Re: Driver Update Disk discussion 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, 25 Feb 2005 09:39:32 -0000 On Thu, 2005-Feb-24 17:59:19 -0700, Scott Long wrote: >- kernel option support. How do we support vendor modules in a kernel >that might be compiled with PAE (rather common these days), SMP, MAC, >etc. The loader and /boot infrastructure has no concept of this. It's >highly important, though. AFAIK, PAE is only relevant on iA32. I second the suggestion that PAE be treated as a distinct architecture for these purposes. INVARIANTS and WITNESS are the other options that impact ABI. These are probably unnecessary on -RELEASE but it would be nice if people could build a kernel with WITNESS and not have it panic if they loaded a module that wasn't compiled with WITNESS (which I think it the current behaviour). >- kernel api/abi. We are trying to keep the kernel api/abi stable now, ... >don't have the right hash. Should we follow with something similar, or >should we have runtime checks that check symbol/structure signatures? It would be wonderful if we could have a mechanism that did load-time validation that the module was compatible with the kernel. Unfortunately, I don't think there's any sane way to verify data structure compatability. (Verifying function call APIs is reasonably easy). Run-time checking adds overheads which may be significant for commonly used interfaces. >Or should we say that we make no guarantees about a binary-only module >working on anything but a -RELEASE kernel? At the very least we need to support errata branches. The RE team has expended a lot of effort to provide a mechanism to handle critical problems found post-release. We don't want to negate this by telling users that they have a choice of either using driver X or fixing hole Y. Unfortunately, in the rare case where an errata fix affects a kernel API/ABI, the change is probably critical to fixing the problem. This would require the FreeBSD fix to be co-ordinated with the driver vendor. I think that guaranteeing operation in -STABLE is probably impractical - though API/ABI changes would need to be flagged to vendors so they could test drivers for the next FreeBSD release. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 10:09:49 2005 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 2082216A4D6; Fri, 25 Feb 2005 10:09:47 +0000 (GMT) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE68E43D46; Fri, 25 Feb 2005 10:09:46 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1D4cPo-000F6b-OY; Fri, 25 Feb 2005 12:09:44 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 25 Feb 2005 12:09:44 +0200 From: Danny Braniss Message-ID: cc: Sam Leffler cc: Scott cc: scsi@freebsd.org Subject: iSCSI initiator driver beta version, testers wanted 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, 25 Feb 2005 10:09:50 -0000 hi, drop me a line if you are willing/interested in trying out the iSCSI initiator driver. Also if you are willing to just look at it and provide some feedback. So far I have tested it against: NetAPP, Intransa and Linux, so if you have other targets it would help. BTW, I've been using 5.3 rel, both UP and SMP processors. danny From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 06:28:56 2005 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 771C316A4CE for ; Fri, 25 Feb 2005 06:28:56 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA38643D1F for ; Fri, 25 Feb 2005 06:28:54 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b169.otenet.gr [212.205.244.177]) j1P6SdMG016165; Fri, 25 Feb 2005 08:28:40 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j1P6SV3w001848; Fri, 25 Feb 2005 08:28:31 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j1P6SUMc001847; Fri, 25 Feb 2005 08:28:30 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 25 Feb 2005 08:28:30 +0200 From: Giorgos Keramidas To: Kathy Quinlan Message-ID: <20050225062830.GD886@gothmog.gr> References: <421D584A.90203@kaqelectronics.dyndns.org> <200502241532.50010.doconnor@gsoft.com.au> <421D81E9.809@kaqelectronics.dyndns.org> <200502251230.59147.doconnor@gsoft.com.au> <421E9CD7.5060503@kaqelectronics.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <421E9CD7.5060503@kaqelectronics.dyndns.org> X-Mailman-Approved-At: Fri, 25 Feb 2005 12:58:20 +0000 cc: freebsd-hackers@freebsd.org Subject: Re: gcc question 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, 25 Feb 2005 06:28:56 -0000 On 2005-02-25 11:34, Kathy Quinlan wrote: >Daniel O'Connor wrote: >>On Thu, 24 Feb 2005 17:57, Kathy Quinlan wrote: >>> ATM it is written in codevisionAVR which is where the function is >>> called, so I guess for now I will just break the AVR support;) >> >> Ahh.. >> So.. are you talking about getting the coding running _in FreeBSD_ or >> compiled on FreeBSD and running on an AVR? > > I am talking about getting the same code running under FreeBSD AND the > AVR with minimal changes. The easiest way is to hide the differences of the two platforms under a properly designed abstraction layer. IIRC, it was putchar() that was giving you trouble. Don't call it as putchar(), then. Write a wrapper function, which gets properly defined either for either system. The header that defines the wrapped functions' API can be common, i.e.: #ifndef __WRAPPER_H #define __WRAPPER_H #ifdef __cplusplus extern "C" { #endif int sendbyte(int val); #ifdef __cplusplus } #endif #endif /* __WRAPPER_H */ The implementation of the sendbyte() function may be in either a common file sprinkled with #ifdef's for othe various platforms, or in separate files that are conditionally added to the build depending on the current platform. I hope this helps, Giorgos From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 08:51:59 2005 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 231FD16A4CF for ; Fri, 25 Feb 2005 08:51:59 +0000 (GMT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAFD843D64 for ; Fri, 25 Feb 2005 08:51:58 +0000 (GMT) (envelope-from YGB@mail.ru) Received: from [213.135.143.183] (port=1068 helo=athlon) by mx2.mail.ru with esmtp id 1D4bCW-000631-00 for hackers@FreeBSD.org; Fri, 25 Feb 2005 11:51:57 +0300 Date: Fri, 25 Feb 2005 11:50:47 +0300 From: =?koi8-r?B?4NLJyg==?= X-Mailer: The Bat! (v1.53d) Organization: Lumers X-Priority: 3 (Normal) Message-ID: <892267968.20050225115047@mail.ru> To: hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Spam: Not detected X-Mailman-Approved-At: Fri, 25 Feb 2005 12:58:20 +0000 Subject: Install Free BSD without floppy, without bootable CD-ROM-drive, without boot from LAN etc. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: =?koi8-r?B?4NLJyg==?= List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2005 08:51:59 -0000 Hello hackers, I wrote to @questions, but as result, I have advised to address the help to you. Sorry, if I spend your time I have notebook IP-120MHz without FDD He is NOT BOOT from CD. How can i install FreeBSD on it? Hardvare configuration: Compaq 5280 Intel Pentium 120MHz 80Mb RAM 4,3 Gb HDD Hitachi CD-ROM -8x Panasonic (I CAN NOT boot from it) NO able boot from LAN, NO FDD, 2,5" HDD - I can't connect this HDD to desktop and install FreeBSD on it. I try to load a kernen from DOS-partition usin "bsdboot.com kernel", but it have called a panic because of impossibility to mount root partition BUT I read in file /tools/00_index.txt (line 1): setup.exe Prepare for installation from a DOS partition. I hope it help me, but I can not FOUND IT - I can't found setup.exe in the installatoin CD-ROM, in the ftp-server on freebsd.org Where I can found this utilite??? Whether there is any other way of installation? How can i install FreeBSD? -- Best regards, àÒÉÊ mailto:YGB@mail.ru P.S. Sorry for my English. From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 13:08:35 2005 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 5E9BF16A4CE for ; Fri, 25 Feb 2005 13:08:35 +0000 (GMT) Received: from mail.aseed.antenna.nl (aseed.demon.nl [83.160.138.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBC8543D58 for ; Fri, 25 Feb 2005 13:08:34 +0000 (GMT) (envelope-from albi@scii.nl) Received: from http.aseed.antenna.nl (unknown [192.168.0.50]) by mail.aseed.antenna.nl (Postfix) with ESMTP id 2D579284682; Fri, 25 Feb 2005 14:09:08 +0100 (CET) Received: from amandla.scii.nl (82-197-198-30.dsl.cambrium.nl [82.197.198.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by http.aseed.antenna.nl (Postfix) with ESMTP id 62C7937022; Fri, 25 Feb 2005 14:08:34 +0100 (CET) Date: Fri, 25 Feb 2005 14:08:30 +0100 From: "albi@scii.nl" To: =?ISO-8859-1?Q?=E0=D2=C9=CA?= Message-Id: <20050225140830.7d3e789f.albi@scii.nl> In-Reply-To: <892267968.20050225115047@mail.ru> References: <892267968.20050225115047@mail.ru> X-Mailer: Sylpheed version 1.0.1 (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable cc: hackers@FreeBSD.org Subject: Re: Install Free BSD without floppy, without bootable CD-ROM-drive, without boot from LAN etc. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2005 13:08:35 -0000 On Fri, 25 Feb 2005 11:50:47 +0300 =E0=D2=C9=CA wrote: > Hardvare configuration: > Compaq 5280 > Intel Pentium 120MHz > 80Mb RAM > 4,3 Gb HDD Hitachi > CD-ROM -8x Panasonic (I CAN NOT boot from it) >=20 > NO able boot from LAN, NO FDD, > 2,5" HDD - I can't connect this HDD to desktop and install FreeBSD on > it. there are a few more options : - use a laptop-hdd-2-IDE converter (i have one and it works well!) - ask a friend with a laptop which has a cdrom, and put your hdd in that laptop during install and after install put it back in your laptop From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 13:36:42 2005 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 77A3616A4CE for ; Fri, 25 Feb 2005 13:36:42 +0000 (GMT) Received: from mailhost.faperj.br (cerbero-1.faperj.br [200.6.41.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B09243D48 for ; Fri, 25 Feb 2005 13:36:34 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost.faperj.br [127.0.0.1]) by mailhost.faperj.br (Postfix) with ESMTP id A0C79984AF; Fri, 25 Feb 2005 10:36:26 -0300 (BRT) Received: from mailhost.faperj.br ([127.0.0.1]) by localhost (zeus.faperj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04099-10; Fri, 25 Feb 2005 10:36:23 -0300 (BRT) Received: from [200.216.168.172] (200216168172.user.veloxzone.com.br [200.216.168.172]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhost.faperj.br (Postfix) with ESMTP id 8B5F3984D0; Fri, 25 Feb 2005 10:36:22 -0300 (BRT) Message-ID: <421F29D4.7050102@jonny.eng.br> Date: Fri, 25 Feb 2005 10:36:20 -0300 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andriy Tkachuk References: <00c601c51b12$5a9f0760$090210ac@BORJA> In-Reply-To: <00c601c51b12$5a9f0760$090210ac@BORJA> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at faperj.br cc: freebsd-hackers@freebsd.org Subject: Re: giving up on 1 buffers error messsage 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, 25 Feb 2005 13:36:42 -0000 Although I am not exactly an expert on the field, I'll try to explain. The disk write procedures should wait for the disk to be ready, and this involves (soft)interrupts. When rebooting, the system can only wait for the device drivers to empty the write buffers, since it is not in interrupt context. If, for some reason, a disk device does not empty its buffer after some time, you will receive this "give up" message. In your case, one last buffer did not get to its destination, but 53 did. I get this message mostly on hard disk failures or panics related to disk devices. Note that sync will not solve the problem. What sync does is exactly what the reboot is doing: asks the system to empty its buffers. The only difference is that sync() does not wait for return. Indeed, this was the behaviour on pre-softupdate ages, this may not be true anymore. ;-) Andriy Tkachuk wrote: > It is interesting why threre is no answer for this question so long time, > regardless that it was posted 2 times :) > > For me it is also interesting to get the answer for this question > since from time to time i also confused by such msgs on > shutdown. > > >>syncing disks... 54 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up on 1 >>buffers >> >> >>Hi, >> >>I am referring to the message when the code in kern_shutdown.c in bsd >>4.10 is called at the time of boot() system call >> >>My understanding is that this message tells us that 1 buffer from the >>buffer cache was not successfully flushed to disk, since the last call to >>sync(). Is that right? In that case what happens to this buffer? Is it >>discarded and assume that fsck will fix this on reboot? >> >>Since the syncer process runs periodically, can this error message be >>avoided if we wait long enough to guarantee flushing to disk (I have tried >>with DELAYS upto 30 seconds but I still get the error sometimes). >> >>I am actually trying to use this same code at a different point in time >>(not during shutdown, but to take a checkpoint), so I am not sure if that >>contributes to this error message? >> >> >> >> >>_______________________________________________ >>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" >> >> > > > _______________________________________________ > 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" Jonny -- João Carlos Mendes Luís - Networking Engineer - jonny@jonny.eng.br From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 18:25:35 2005 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 A29BE16A4CE for ; Fri, 25 Feb 2005 18:25:35 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A5AE43D2F for ; Fri, 25 Feb 2005 18:25:35 +0000 (GMT) (envelope-from kjelderg@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so548549rnf for ; Fri, 25 Feb 2005 10:25:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=NhgrspCr32iKOJjeGJO1pbRkwae3W3hDcP4B5LofhPysiaHq9sGozPfcWIjnA6mBcu0HtIKcyyOnELRQyttKXDQNinPhgnhMfs38CH46T2XqmtLaou5JfAp4i5p+rgKqm54VmhRYjpBp7JqBNOj0Evb124RBEpTIKOIqY6/KNLs= Received: by 10.39.2.48 with SMTP id e48mr159458rni; Fri, 25 Feb 2005 10:25:34 -0800 (PST) Received: by 10.38.101.19 with HTTP; Fri, 25 Feb 2005 10:25:34 -0800 (PST) Message-ID: Date: Fri, 25 Feb 2005 12:25:34 -0600 From: Eric Kjeldergaard To: Ashwin Chandra In-Reply-To: <003d01c51ad3$ef5b5910$abe243a4@ash> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <003d01c51ad3$ef5b5910$abe243a4@ash> cc: freebsd-hackers@freebsd.org Subject: Re: sched_4bsd.c Quantum change X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Eric Kjeldergaard List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2005 18:25:35 -0000 On Thu, 24 Feb 2005 16:49:59 -0800, Ashwin Chandra wrote: > Quick question for you hackers! > > If i wanted to change the scheduler to have a certain marked bad process have a higher time quantum than everyone elses (because it is behaving bad, high mem usage and context switching) to let it run longer to finish faster and avoid context switches and swapping, is this possible in the current scheduler without major changes to it? Right now the scheduler works by having a uniform quantum for all processes, am i correct? anything wrong with nice(1)? -- If I write a signature, my emails will appear more personalised. From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 18:51:26 2005 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 AEA1516A4CE for ; Fri, 25 Feb 2005 18:51:26 +0000 (GMT) Received: from mortis.over-yonder.net (adsl-19-138-57.jan.bellsouth.net [68.19.138.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDFB543D2D for ; Fri, 25 Feb 2005 18:51:25 +0000 (GMT) (envelope-from fullermd@over-yonder.net) Received: by mortis.over-yonder.net (Postfix, from userid 100) id 89A8121012; Fri, 25 Feb 2005 12:51:24 -0600 (CST) Date: Fri, 25 Feb 2005 12:51:24 -0600 From: "Matthew D. Fuller" To: Chris Dillon Message-ID: <20050225185123.GV79745@over-yonder.net> References: <20050223233351.GP6881@numachi.com> <20050224152145.Y24672@duey.wolves.k12.mo.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050224152145.Y24672@duey.wolves.k12.mo.us> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.6i-fullermd.2 cc: hackers@freebsd.org Subject: Re: smartmontools vs HP Smart Array 642 controller 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, 25 Feb 2005 18:51:26 -0000 On Thu, Feb 24, 2005 at 03:24:17PM -0600 I heard the voice of Chris Dillon, and lo! it spake thus: > > Your problem with smartmontools doesn't seem to be limited to the > Smart Array 642, I just tried it on a DL380 G3 with the Smart Array > 5i+ and got the same error you did. It appears to be a > driver-specific problem. It's been failing on me on RELENG_5 since I updated from ~5.1 to ~5.3+, on an ahc controller: (pass5:ahc1:0:5:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (pass5:ahc1:0:5:0): CAM Status: SCSI Status Error (pass5:ahc1:0:5:0): SCSI Status: Check Condition (pass5:ahc1:0:5:0): UNIT ATTENTION asc:29,3 (pass5:ahc1:0:5:0): Bus device reset function occurred device Test Unit Ready [Operation not permitted] and the like. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ "The only reason I'm burning my candle at both ends, is because I haven't figured out how to light the middle yet" From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 07:26:47 2005 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 4D8C916A4CE for ; Sat, 26 Feb 2005 07:26:47 +0000 (GMT) Received: from web26802.mail.ukl.yahoo.com (web26802.mail.ukl.yahoo.com [217.146.176.78]) by mx1.FreeBSD.org (Postfix) with SMTP id 86E6E43D53 for ; Sat, 26 Feb 2005 07:26:46 +0000 (GMT) (envelope-from aziz_kezzou@yahoo.fr) Received: (qmail 76952 invoked by uid 60001); 26 Feb 2005 07:26:45 -0000 Message-ID: <20050226072645.76950.qmail@web26802.mail.ukl.yahoo.com> Received: from [129.97.227.107] by web26802.mail.ukl.yahoo.com via HTTP; Sat, 26 Feb 2005 08:26:45 CET Date: Sat, 26 Feb 2005 08:26:45 +0100 (CET) From: Aziz KEZZOU To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: RE: Sharing data between user space and kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2005 07:26:47 -0000 >sleeping(). What you probably want to do is >actually allocate wired kernel pages and export them to >userspace. Take a >look at the GEOM gstat(8) implementation, which does >exactly that. >However, you have to make sure that if you ever decide >to reuse that >kernel memory for something else (i.e., free it back to >the allocator), >you've GC'd all userspace references to it. Could you please point me to the place where "GEOM gstat" is implemented ? I don't seem to find it :-( Thanks a lot, neo Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/ From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 08:58:23 2005 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 58A7816A4CE for ; Sat, 26 Feb 2005 08:58:23 +0000 (GMT) Received: from panther.cs.ucla.edu (Panther.CS.UCLA.EDU [131.179.128.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1387C43D55 for ; Sat, 26 Feb 2005 08:58:23 +0000 (GMT) (envelope-from yanyu@CS.UCLA.EDU) Received: from localhost (yanyu@localhost)j1Q8wMa13028 for ; Sat, 26 Feb 2005 00:58:22 -0800 (PST) Date: Sat, 26 Feb 2005 00:58:22 -0800 (PST) From: Yan Yu To: freebsd-hackers@freebsd.org In-Reply-To: <20050226072645.76950.qmail@web26802.mail.ukl.yahoo.com> Message-ID: References: <20050226072645.76950.qmail@web26802.mail.ukl.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: send file descriptor via ipc 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, 26 Feb 2005 08:58:23 -0000 Hello, there, I am looking for the function that handle send/recv file descriptors through sendmsg/recvmsg? by looking through source files, unp_internalize/unp_externalize in kern/uipc-usrreq.c seems relevant.. but i am not sure since i could not guess the meaning of the function name.. (btw, what is "unp", the prefix in the function name stands for?) Can someone please confirm if it is the right function or point me to the right one i should look at? many thanks, yan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 09:10:46 2005 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 D6E4C16A4CF for ; Sat, 26 Feb 2005 09:10:46 +0000 (GMT) Received: from panther.cs.ucla.edu (Panther.CS.UCLA.EDU [131.179.128.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A01443D49 for ; Sat, 26 Feb 2005 09:10:46 +0000 (GMT) (envelope-from yanyu@CS.UCLA.EDU) Received: from localhost (yanyu@localhost)j1Q9Ak413448 for ; Sat, 26 Feb 2005 01:10:46 -0800 (PST) Date: Sat, 26 Feb 2005 01:10:46 -0800 (PST) From: Yan Yu To: freebsd-hackers@freebsd.org In-Reply-To: Message-ID: References: <20050226072645.76950.qmail@web26802.mail.ukl.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: confusion on fopen()/falloc() 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, 26 Feb 2005 09:10:47 -0000 Hello, all, I have a user program as below: FILE *fd; while (1) { fd= fopen( "tmp", "r" ); if ( fd == NULL ) break; } from my understanding, since i open the same file to read, my process should create a new file descriptor each time when fopen is called. Therefore, inside the kernel, fdalloc() should be called, NOT falloc() (since falloc() allocates a new FILE * struct in addition to a new file descriptor), BUT based on what i observed (i instrumented falloc() function), it seems that falloc() is called each time when fopen() is called. I am wondering where i missed? Any hints is appreciated! Best, yan From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 09:12:22 2005 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 6B4DF16A4CE for ; Sat, 26 Feb 2005 09:12:22 +0000 (GMT) Received: from panther.cs.ucla.edu (Panther.CS.UCLA.EDU [131.179.128.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44F3243D60 for ; Sat, 26 Feb 2005 09:12:22 +0000 (GMT) (envelope-from yanyu@CS.UCLA.EDU) Received: from localhost (yanyu@localhost)j1Q9CMx13565 for ; Sat, 26 Feb 2005 01:12:22 -0800 (PST) Date: Sat, 26 Feb 2005 01:12:22 -0800 (PST) From: Yan Yu To: freebsd-hackers@freebsd.org In-Reply-To: Message-ID: References: <20050226072645.76950.qmail@web26802.mail.ukl.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: confusion on fopen()/falloc() 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, 26 Feb 2005 09:12:22 -0000 On Sat, 26 Feb 2005, Yan Yu wrote: > Hello, all, > I have a user program as below: > FILE *fd; > while (1) > { > fd= fopen( "tmp", "r" ); > if ( fd == NULL ) > break; > } > > from my understanding, since i open the same file to read, my process > should create a new file descriptor each time when fopen is called. > Therefore, inside the kernel, fdalloc() should be called, NOT falloc() > (since falloc() allocates a new FILE * struct in addition to a new file oops, what i really meant is a new FILE struct... > descriptor), > BUT based on what i observed (i instrumented falloc() function), it seems > that falloc() is called each time when fopen() is called. > I am wondering where i missed? > > Any hints is appreciated! > Best, > yan > > From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 09:39:09 2005 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 8226A16A4CE for ; Sat, 26 Feb 2005 09:39:09 +0000 (GMT) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3070943D5E for ; Sat, 26 Feb 2005 09:39:09 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 15845 invoked from network); 26 Feb 2005 09:39:08 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail28.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 26 Feb 2005 09:39:08 -0000 Received: from hydrogen.funkthat.com (yjgxwf@localhost.funkthat.com [127.0.0.1])j1Q9d8GH041252; Sat, 26 Feb 2005 01:39:08 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j1Q9d7r3041251; Sat, 26 Feb 2005 01:39:07 -0800 (PST) Date: Sat, 26 Feb 2005 01:39:07 -0800 From: John-Mark Gurney To: Yan Yu Message-ID: <20050226093907.GM89312@funkthat.com> Mail-Followup-To: Yan Yu , freebsd-hackers@freebsd.org References: <20050226072645.76950.qmail@web26802.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: send file descriptor via ipc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2005 09:39:09 -0000 Yan Yu wrote this message on Sat, Feb 26, 2005 at 00:58 -0800: > Hello, there, > I am looking for the function that handle send/recv file descriptors > through sendmsg/recvmsg? > by looking through source files, > unp_internalize/unp_externalize in kern/uipc-usrreq.c seems relevant.. > > but i am not sure since i could not guess the meaning of the function > name.. (btw, what is "unp", the prefix in the function name stands for?) > Can someone please confirm if it is the right function or point > me to the right one i should look at? I'd highly recommend that you get the book APUE (Advance Programming in the Unix Environment by the late Richard Stevens... It's a great book and covers this topic... You can also look at unix(4) which has a brief description.. You must use unix domain sockets in order to pass file descriptors, and so the unp probably refers to UNix Protocol... but I could be wrong about that... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 09:47:21 2005 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 E0D5A16A4CE for ; Sat, 26 Feb 2005 09:47:21 +0000 (GMT) Received: from mail25.sea5.speakeasy.net (mail25.sea5.speakeasy.net [69.17.117.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FE8843D4C for ; Sat, 26 Feb 2005 09:47:21 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 14502 invoked from network); 26 Feb 2005 09:47:21 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail25.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 26 Feb 2005 09:47:20 -0000 Received: from hydrogen.funkthat.com (wfwnet@localhost.funkthat.com [127.0.0.1])j1Q9lKGH041504; Sat, 26 Feb 2005 01:47:20 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j1Q9lKLP041503; Sat, 26 Feb 2005 01:47:20 -0800 (PST) Date: Sat, 26 Feb 2005 01:47:20 -0800 From: John-Mark Gurney To: Yan Yu Message-ID: <20050226094720.GN89312@funkthat.com> Mail-Followup-To: Yan Yu , freebsd-hackers@freebsd.org References: <20050226072645.76950.qmail@web26802.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: confusion on fopen()/falloc() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2005 09:47:22 -0000 Yan Yu wrote this message on Sat, Feb 26, 2005 at 01:10 -0800: > Hello, all, > I have a user program as below: > FILE *fd; > while (1) > { > fd= fopen( "tmp", "r" ); > if ( fd == NULL ) > break; > } > > from my understanding, since i open the same file to read, my process > should create a new file descriptor each time when fopen is called. > Therefore, inside the kernel, fdalloc() should be called, NOT falloc() > (since falloc() allocates a new FILE * struct in addition to a new file > descriptor), > BUT based on what i observed (i instrumented falloc() function), it seems > that falloc() is called each time when fopen() is called. > I am wondering where i missed? first off, if you are looking at this code, you probably want to be calling open instead of fopen... fopen is stdio and is implemented in src/lib/libc/stdio/fopen.c... There it'll do an open system call, but you don't have as direct control over it... Also, the kernel is not responsible for FILE * allocations, that is purely a userland implementation detail.. it will end up getting mapped to a file descriptor opened via open... if you look in src/sys/kern/vfs_syscalls.c at open, it calls kern_open (in the same file) which calls falloc... falloc by it's comment does more than just allocate a file descriptor, it also allocates a new file structure, but then it does call fdalloc to get the file descriptor.. Again, make sure you don't confuse the userland FILE * with the kernel.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 11:01:12 2005 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 BB0DC16A4CE for ; Sat, 26 Feb 2005 11:01:12 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1203A43D1F for ; Sat, 26 Feb 2005 11:01:12 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j1PF5woH072638; Fri, 25 Feb 2005 07:05:59 -0800 (PST) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j1PF5qPU072637; Fri, 25 Feb 2005 07:05:52 -0800 (PST) (envelope-from www) Date: Fri, 25 Feb 2005 07:05:52 -0800 (PST) Message-Id: <200502251505.j1PF5qPU072637@marlena.vvi.at> To: aziz_kezzou@yahoo.fr From: "ALeine" cc: freebsd-hackers@freebsd.org Subject: Re: Sharing data between user space and kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2005 11:01:12 -0000 aziz_kezzou@yahoo.fr wrote: > Could you please point me to the place where "GEOM > gstat" is implemented ? I don't seem to find it :-( You can find gstat in src/usr.sbin/gstat if you have the source tree on your disk or online at: http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/gstat/ ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 12:05:59 2005 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 D901C16A4CE for ; Sat, 26 Feb 2005 12:05:59 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C53343D3F for ; Sat, 26 Feb 2005 12:05:59 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with SMTP id F365E46B11; Sat, 26 Feb 2005 07:05:58 -0500 (EST) Date: Sat, 26 Feb 2005 12:04:10 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Yan Yu In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: send file descriptor via ipc 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, 26 Feb 2005 12:06:00 -0000 On Sat, 26 Feb 2005, Yan Yu wrote: > I am looking for the function that handle send/recv file descriptors > through sendmsg/recvmsg? by looking through source files, > unp_internalize/unp_externalize in kern/uipc-usrreq.c seems relevant.. > > but i am not sure since i could not guess the meaning of the function > name.. (btw, what is "unp", the prefix in the function name stands > for?) Can someone please confirm if it is the right function or point > me to the right one i should look at? You are indeed looking in the right place. When sendmsg() is called with ancillary data, sosend() will copy in the ancillary data into an mbuf chain named 'control', which is passed into pru_send(). pru_send() for UNIX domain sockets is implemented by uipc_send(), which will call unp_internalize() to convert file descriptor numbers into 'struct file' references. sbappendcontrol_locked() is used to append the the message and ancillary data onto the receive socket buffer for the remote socket. When recvmsg() is called, soreceive() will retrieve the regular and control mbufs from the receive socket buffer. It then calls the protocol domain's externalize function, which is implemented by unp_externalize(). unp_externalize() will extract the 'struct file' references and insert them into the file descriptor array of the receiving process. One of the complications in this code has to do with unp_gc() -- the problem is that when you send a file descriptor over a UNIX domain socket, the socket could be closed by both ends before the file descriptor is received. If the file descriptor "in transit" is a reference to the UNIX domain socket that the file descriptor was sent over, there's a cyclic reference. un_gpc() uses a mark-and-sweep graph algorithm to walk the set of file descriptors reachable by processes and identify sets of file descriptors that are referenced only by disconnected UNIX domain sockets so that those sockets can be reclaimed. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 25 14:14:14 2005 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 7C24916A4CE for ; Fri, 25 Feb 2005 14:14:14 +0000 (GMT) Received: from fw1.caa.army.mil (fw1.caa.army.mil [192.153.92.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E11243D1F for ; Fri, 25 Feb 2005 14:14:14 +0000 (GMT) (envelope-from ed.smithiii@us.army.mil) Received: from CAA-UNCLMAIL.caa.army.mil (caa-unclmail.caa.army.mil [192.153.92.29]) by fw1.caa.army.mil with ESMTP id j1PEEHDg029256 for ; Fri, 25 Feb 2005 09:14:17 -0500 (EST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Fri, 25 Feb 2005 09:12:12 -0500 Message-ID: <0A907D6523E90246822D32FA2344E244015EA7@CAA-UNCLMAIL.caa.army.mil> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: sched_4bsd.c Quantum change Thread-Index: AcUa08D+cD8nVb1ATv26V0HbXGk9gQAcA3ow From: "Smith III, Edward Mr. CAA/ISC" To: "Ashwin Chandra" , X-Mailman-Approved-At: Sat, 26 Feb 2005 13:01:32 +0000 Subject: RE: sched_4bsd.c Quantum change 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, 25 Feb 2005 14:14:14 -0000 just use the "nice" call with a negative value for the process. the = time quantum will be the same but it will get more run time. man nice -----Original Message----- From: owner-freebsd-hackers@freebsd.org [mailto:owner-freebsd-hackers@freebsd.org]On Behalf Of Ashwin Chandra Sent: Thursday, February 24, 2005 7:50 PM To: freebsd-hackers@freebsd.org Subject: sched_4bsd.c Quantum change Quick question for you hackers! If i wanted to change the scheduler to have a certain marked bad process = have a higher time quantum than everyone elses (because it is behaving = bad, high mem usage and context switching) to let it run longer to = finish faster and avoid context switches and swapping, is this possible = in the current scheduler without major changes to it? Right now the = scheduler works by having a uniform quantum for all processes, am i = correct? Thanks Ash _______________________________________________ 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 Feb 26 03:25:05 2005 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 1183316A4D1 for ; Sat, 26 Feb 2005 03:25:05 +0000 (GMT) Received: from cowbert.2y.net (d46h180.public.uconn.edu [137.99.46.180]) by mx1.FreeBSD.org (Postfix) with SMTP id 3905F43D5C for ; Sat, 26 Feb 2005 03:25:04 +0000 (GMT) (envelope-from sirmoo@cowbert.2y.net) Received: (qmail 307 invoked by uid 1001); 26 Feb 2005 03:25:01 -0000 Date: Fri, 25 Feb 2005 22:25:01 -0500 From: "Peter C. Lai" To: freebsd-usb@freebsd.org, freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Message-ID: <20050226032500.GA265@cowbert.2y.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-Mailman-Approved-At: Sat, 26 Feb 2005 13:01:32 +0000 Subject: sandisk cruzer mini quirks [failure] on RELENG_4 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, 26 Feb 2005 03:25:05 -0000 I have a 512mb version of the SanDisk Cruzer Mini keychain drive. ProductId = 0x5150 (VendorID=0x0781). I am unable to correctly get it to stop crashing the system when using cp(1) to copy large files to it. I patched /usr/src/sys/dev/usb/umass.c as: if (UGETW(dd->idVendor) == USB_VENDOR_SANDISK && (UGETW(dd->idProduct) == 0x5150) { sc->proto = UMASS_PROTO_SCSI | UMASS_PROTO_BBB; sc->quirks |= IGNORE_RESIDUE; } which is the same quirks patch that USB_PRODUCT_SANDISK_SDCZ2_256 (the cruzer mini 256mb) uses. However, this fails to rectify the problem. Notably dd(1) transfers files fine. This is on a RELENG_4 system, cvsup yesterday. Any ideas? thanks, pete -- Peter C. Lai University of Connecticut Dept. of Molecular and Cell Biology Yale University School of Medicine SenseLab | Research Assistant http://cowbert.2y.net/ From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 13:59:42 2005 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 B618A16A4CE for ; Sat, 26 Feb 2005 13:59:42 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C60E43D1F for ; Sat, 26 Feb 2005 13:59:42 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j1PI41oH074535; Fri, 25 Feb 2005 10:04:02 -0800 (PST) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j1PI3tsN074534; Fri, 25 Feb 2005 10:03:55 -0800 (PST) (envelope-from www) Date: Fri, 25 Feb 2005 10:03:55 -0800 (PST) Message-Id: <200502251803.j1PI3tsN074534@marlena.vvi.at> To: sirmoo@cowbert.2y.net From: "ALeine" cc: freebsd-hackers@freebsd.org Subject: Re: sandisk cruzer mini quirks [failure] on RELENG_4 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, 26 Feb 2005 13:59:42 -0000 sirmoo@cowbert.2y.net wrote: > I have a 512mb version of the SanDisk Cruzer Mini keychain drive. > ProductId = 0x5150 (VendorID=0x0781). I am unable to correctly > get it to stop crashing the system when using cp(1) to copy large > files to it. > I patched /usr/src/sys/dev/usb/umass.c as: > > if (UGETW(dd->idVendor) == USB_VENDOR_SANDISK && > (UGETW(dd->idProduct) == 0x5150) { > sc->proto = UMASS_PROTO_SCSI | UMASS_PROTO_BBB; > sc->quirks |= IGNORE_RESIDUE; > } Try extending da_quirk_table in sys/cam/scsi/scsi_da.c with an entry like this: { /* * SanDisk Cruzer Mini 512MB */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "SanDisk" , "Cruzer Mini", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE } ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 14:17:41 2005 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 5BB4216A4CE for ; Sat, 26 Feb 2005 14:17:41 +0000 (GMT) Received: from freebsd.czest.pl (silver.iplus.pl [80.48.250.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7601A43D54 for ; Sat, 26 Feb 2005 14:17:40 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.12.10/8.12.9) with ESMTP id j1QENS9r092904 for ; Sat, 26 Feb 2005 14:23:28 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.12.10/8.12.9/Submit) id j1QENSjY092903 for freebsd-hackers@freebsd.org; Sat, 26 Feb 2005 14:23:28 GMT (envelope-from dunstan) Date: Sat, 26 Feb 2005 14:23:27 +0000 From: "Wojciech A. Koszek" To: freebsd-hackers@freebsd.org Message-ID: <20050226142327.GA92852@freebsd.czest.pl> References: <20050221221656.GA64212@freebsd.czest.pl> <20050223170317.GA73338@frontfree.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050223170317.GA73338@frontfree.net> User-Agent: Mutt/1.4.2.1i Subject: Re: [PATCH] Dangerous jail()<->ioctl interactions. 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, 26 Feb 2005 14:17:41 -0000 On Thu, Feb 24, 2005 at 01:03:17AM +0800, Xin LI wrote: > On Mon, Feb 21, 2005 at 10:16:56PM +0000, Wojciech A. Koszek wrote: > > Hello hackers, > > I would like to let you know I've been doing [partial] audit of ioctl() [..] > > connections. > Default devfs configuration for a jail is not to mount it. Additionally, the > default devfs ruleset hides everything but a limited set of pseudo devices that > should be commen for applications to consume. Therefore, I'd rather say that > it's a configuration mistake of the user (^_^) > > Do you imply that there are other devices that enforce check against whether they > are ioctl'ed in jail? I agree these files should not appear inside jailed environment. I've just pointed devices, which are not secured by underlying code (I mean just like ioctl()ing interface files, which are secured with general ioctl() handler making suser() test). Cheers, -- * Wojciech A. Koszek && dunstan@FreeBSD.czest.pl