From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 05:02:25 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E74816A41F for ; Sun, 16 Oct 2005 05:02:25 +0000 (GMT) (envelope-from anthony.maher@uts.edu.au) Received: from tak.itd.uts.edu.au (tak.itd.uts.EDU.AU [138.25.198.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id C06FB43D48 for ; Sun, 16 Oct 2005 05:02:24 +0000 (GMT) (envelope-from anthony.maher@uts.edu.au) Received: by tak.itd.uts.edu.au (Postfix, from userid 900) id 1F3E45D81B8; Sun, 16 Oct 2005 15:02:24 +1000 (EST) Received: from vimes (vimes.itd.uts.edu.au [138.25.243.34])by tak.itd.uts.edu.au (Postfix/Ingress) with ESMTP id 7A5355D80CFfor ; Sun, 16 Oct 2005 15:02:23 +1000 (EST) Received: from [192.168.0.16](d211-29-178-238.dsl.nsw.optusnet.com.au [211.29.178.238])by postoffice.uts.edu.au(Sun Java System Messaging Server 6.1 HotFix 0.09 (built Dec 14 2004))with ESMTPSA id <0IOF00902SNYOPB0@postoffice.uts.edu.au> forhackers@freebsd.org; Sun, 16 Oct 2005 15:02:23 +1000 (EST) Date: Sun, 16 Oct 2005 15:02:22 +1000 From: Tony Maher To: hackers@freebsd.org Message-id: <4351DEDE.9000900@uts.edu.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.11) Gecko/20050903 X-Virus-Scanned: amavisd-new at uts.edu.au Cc: Subject: getenv semantics X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 05:02:25 -0000 Hello, I am trying to create a port of some 3rd party software and while I can get it to compile ok and (mostly) run there are a few anomalies in it detecting environment variables. It appears to run ok on linux (I do not have a convenient linux box for testing with). I believe its the way the code get the environment variables that is the cause. But if thats the case then it would appear that getenv semantics differs slightly on different platforms. From http://notabug.com/2002/coherent/man/getenv.html "When VARIABLE is not found or has no value, getenv() returns NULL." But on FreeBSD it would appear that if VARIABLE is found but has no value it returns a pointer to a NUL ('\0') string. Is this analysis correct? Can someone point me to the (a?) standard that describes this. The FreeBSD behaviour makes sense, I am trying to understand what is the expected behaviour on other platforms. -------------------------------------------------------------------------- #!/bin/sh echo "unset foobar" unset foobar ./test-getenv echo "export foobar" export foobar ./test-getenv echo "export foobar=isset" export foobar=isset ./test-getenv echo "unset foobar" unset foobar ./test-getenv ---------------------------------------------------------------------------- /* test-getenv.c */ #include #include int main(int argc, char *argv[]) { char *p; p = getenv("foobar"); fprintf(stderr, "getenv('foobar') string is >%s< pointer is >%x<\n",p, p); exit(0); } ------------------------------------------------------------------------------- ./test-getenv.sh unset foobar getenv('foobar') string is >(null)< pointer is >0< export foobar getenv('foobar') string is >< pointer is >bfbfe933< export foobar=isset getenv('foobar') string is >isset< pointer is >bfbfe92f< unset foobar getenv('foobar') string is >(null)< pointer is >0< thanks -- tonym -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 05:54:22 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6756816A41F for ; Sun, 16 Oct 2005 05:54:22 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0001143D46 for ; Sun, 16 Oct 2005 05:54:21 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by xproxy.gmail.com with SMTP id t13so589837wxc for ; Sat, 15 Oct 2005 22:54:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bmmFzmIk7RZ/zwRZWjW3UwK2qfnKury6JvsqRv3xduByDkwSsiwtW44ZGPc+cxJDjf2eCoASJtTZY38luoYTYAEWJNEaB4TiLuvGy9XY56MhH0Wp6clqvM0hvVg1D+Lc/9IdolNIo/cisv5X30XVJCQ5YJJ0OEXgWM8sRAUouFI= Received: by 10.70.69.20 with SMTP id r20mr1856822wxa; Sat, 15 Oct 2005 22:54:21 -0700 (PDT) Received: by 10.70.116.10 with HTTP; Sat, 15 Oct 2005 22:54:21 -0700 (PDT) Message-ID: <84dead720510152254j5a75ee1ewad3b7556145fca3@mail.gmail.com> Date: Sun, 16 Oct 2005 11:24:21 +0530 From: Joseph Koshy To: Tony Maher In-Reply-To: <4351DEDE.9000900@uts.edu.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4351DEDE.9000900@uts.edu.au> Cc: hackers@freebsd.org Subject: Re: getenv semantics X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 05:54:22 -0000 > Is this analysis correct? Can someone point me to the (a?) > standard that describes this. The FreeBSD behaviour makes > sense, I am trying to understand what is the expected > behaviour on other platforms. >From "The Open Group Base Specifications Issue 6" http://www.cnop.net/docs/susv3/functions/getenv.html "The getenv() function shall search the environment of the calling process (see the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 8, Environment Variables) for the environment variable name if it exists and return a pointer to the value of the environment variable. If the specified environment variable cannot be found, a null pointer shall be returned." -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 06:47:43 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADFD216A420 for ; Sun, 16 Oct 2005 06:47:43 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4272F43D46 for ; Sun, 16 Oct 2005 06:47:43 +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 1ER2J2-000Cyc-Qy; Sun, 16 Oct 2005 08:47:40 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: Tony Maher In-Reply-To: Message from Tony Maher of "Sun, 16 Oct 2005 15:02:22 +1000." <4351DEDE.9000900@uts.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 16 Oct 2005 08:47:40 +0200 From: Danny Braniss Message-ID: Cc: hackers@freebsd.org Subject: Re: getenv semantics X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 06:47:43 -0000 > Hello, > > I am trying to create a port of some 3rd party software and while > I can get it to compile ok and (mostly) run there are a few anomalies in > it detecting environment variables. It appears to run ok on linux (I do > not have a convenient linux box for testing with). I believe its the > way the code get the environment variables that is the cause. But if > thats the case then it would appear that getenv semantics differs > slightly on different platforms. > > From http://notabug.com/2002/coherent/man/getenv.html > "When VARIABLE is not found or has no value, getenv() returns NULL." > > But on FreeBSD it would appear that if VARIABLE is found but has no > value it returns a pointer to a NUL ('\0') string. > > Is this analysis correct? Can someone point me to the (a?) standard > that describes this. The FreeBSD behaviour makes sense, I am trying to > understand what is the expected behaviour on other platforms. > > -------------------------------------------------------------------------- > #!/bin/sh > > echo "unset foobar" > unset foobar > ./test-getenv > > echo "export foobar" > export foobar > ./test-getenv > > echo "export foobar=isset" > export foobar=isset > ./test-getenv > > echo "unset foobar" > unset foobar > ./test-getenv > > ---------------------------------------------------------------------------- > > > /* test-getenv.c */ > > #include > #include > > int > main(int argc, char *argv[]) > { > char *p; > p = getenv("foobar"); > fprintf(stderr, "getenv('foobar') string is >%s< pointer is > >%x<\n",p, p); > exit(0); > } > ------------------------------------------------------------------------------- > > ./test-getenv.sh > unset foobar > getenv('foobar') string is >(null)< pointer is >0< > export foobar > getenv('foobar') string is >< pointer is >bfbfe933< > export foobar=isset > getenv('foobar') string is >isset< pointer is >bfbfe92f< > unset foobar > getenv('foobar') string is >(null)< pointer is >0< > > thanks > -- > tonym now why would FreeBSD supply sources? from /usr/src/lib/libc/stlib/getenv.c: ... /* * getenv -- * Returns ptr to value associated with name, if any, else NULL. */ char * getenv(name) const char *name; { int offset; return (__findenv(name, &offset)); } danny From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 06:59:41 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8320816A41F for ; Sun, 16 Oct 2005 06:59:41 +0000 (GMT) (envelope-from anthony.maher@uts.edu.au) Received: from tak.itd.uts.edu.au (tak.itd.uts.EDU.AU [138.25.198.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14DC743D46 for ; Sun, 16 Oct 2005 06:59:40 +0000 (GMT) (envelope-from anthony.maher@uts.edu.au) Received: by tak.itd.uts.edu.au (Postfix, from userid 900) id C1D4C5D80AF; Sun, 16 Oct 2005 16:59:39 +1000 (EST) Received: from vimes (vimes.itd.uts.edu.au [138.25.243.34])by tak.itd.uts.edu.au (Postfix/Ingress) with ESMTP id 29CFB5D8083; Sun, 16 Oct 2005 16:59:39 +1000 (EST) Received: from [192.168.0.16](d211-29-178-238.dsl.nsw.optusnet.com.au [211.29.178.238])by postoffice.uts.edu.au(Sun Java System Messaging Server 6.1 HotFix 0.09 (built Dec 14 2004))with ESMTPSA id <0IOF009VLY39OQC0@postoffice.uts.edu.au>; Sun,16 Oct 2005 16:59:39 +1000 (EST) Date: Sun, 16 Oct 2005 16:59:33 +1000 From: Tony Maher In-reply-to: <84dead720510152254j5a75ee1ewad3b7556145fca3@mail.gmail.com> To: Joseph Koshy Message-id: <4351FA55.6010006@uts.edu.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en References: <4351DEDE.9000900@uts.edu.au><84dead720510152254j5a75ee1ewad3b7556145fca3@mail.gmail.com> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.11) Gecko/20050903 X-Virus-Scanned: amavisd-new at uts.edu.au Cc: hackers@freebsd.org Subject: Re: getenv semantics X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 06:59:41 -0000 Thanks for the reference. As I read it FreeBSD is following standard (no surprise ;-) but it would appear other platforms may not be. I'll check this out when I get access to a linux box. Joseph Koshy wrote: >>From "The Open Group Base Specifications Issue 6" > http://www.cnop.net/docs/susv3/functions/getenv.html > > "The getenv() function shall search the environment of the > calling process (see the Base Definitions volume of IEEE Std > 1003.1-2001, Chapter 8, Environment Variables) for the > environment variable name if it exists and return a pointer to > the value of the environment variable. If the specified > environment variable cannot be found, a null pointer shall be > returned." -- tonym -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 07:05:57 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9574116A41F for ; Sun, 16 Oct 2005 07:05:57 +0000 (GMT) (envelope-from anthony.maher@uts.edu.au) Received: from zim.itd.uts.edu.au (zim.itd.uts.edu.au [138.25.22.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F08243D53 for ; Sun, 16 Oct 2005 07:05:56 +0000 (GMT) (envelope-from anthony.maher@uts.edu.au) Received: by zim.itd.uts.edu.au (Postfix, from userid 900) id ED8E9C2F69; Sun, 16 Oct 2005 17:05:55 +1000 (EST) Received: from vimes (vimes.itd.uts.edu.au [138.25.243.34])by zim.itd.uts.edu.au (Postfix/Ingress) with ESMTP id AD0D6C2F4D; Sun, 16 Oct 2005 17:05:52 +1000 (EST) Received: from [192.168.0.16](d211-29-178-238.dsl.nsw.optusnet.com.au [211.29.178.238])by postoffice.uts.edu.au(Sun Java System Messaging Server 6.1 HotFix 0.09 (built Dec 14 2004))with ESMTPSA id <0IOF009ASYDSOQD0@postoffice.uts.edu.au>; Sun,16 Oct 2005 17:05:52 +1000 (EST) Date: Sun, 16 Oct 2005 17:05:52 +1000 From: Tony Maher In-reply-to: To: Danny Braniss Message-id: <4351FBD0.6040706@uts.edu.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en References: User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.11) Gecko/20050903 X-Virus-Scanned: amavisd-new at uts.edu.au Cc: hackers@freebsd.org Subject: Re: getenv semantics X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 07:05:57 -0000 Danny Braniss wrote: > now why would FreeBSD supply sources? > from /usr/src/lib/libc/stlib/getenv.c: > ... Thanks I have the source but actually checking the call programatically should be better since since it does not rely on my interpretation of code. It also does not help me understand the problems when code appears to work on other platforms hence my request for standards reference. -- tonym -- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 07:23:48 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3357A16A41F for ; Sun, 16 Oct 2005 07:23:48 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B93B643D62 for ; Sun, 16 Oct 2005 07:23: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 1ER2rx-000DjZ-Hi; Sun, 16 Oct 2005 09:23:45 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: Tony Maher In-reply-to: Your message of Sun, 16 Oct 2005 17:05:52 +1000 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 16 Oct 2005 09:23:45 +0200 From: Danny Braniss Message-ID: Cc: hackers@freebsd.org Subject: Re: getenv semantics X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 07:23:48 -0000 > Danny Braniss wrote: > > > now why would FreeBSD supply sources? > > from /usr/src/lib/libc/stlib/getenv.c: > > ... > > Thanks I have the source but actually checking the call programatically > should be better since since it does not rely on my interpretation > of code. It also does not help me understand the problems when code > appears to work on other platforms hence my request for standards > reference. Standards/RFCs/etc are very nice piece of papers, reality tends to be less forgiven: a program/routine will always do what the programmer intended, now the problem is defining 'what the programmer intended' :-) the advantage of open source is that you can check what the real world does, and sometimes it reflects the wishes of the docs/posix/rfc, but mostly it reflects the programmer interpretation. danny danny From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 09:40:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8380016A420 for ; Sun, 16 Oct 2005 09:40:20 +0000 (GMT) (envelope-from stas@core.310.ru) Received: from core.310.ru (core.310.ru [83.97.105.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2B6843D48 for ; Sun, 16 Oct 2005 09:40:19 +0000 (GMT) (envelope-from stas@core.310.ru) Received: from core.310.ru (localhost [127.0.0.1]) by core.310.ru (8.13.3/8.12.11) with ESMTP id j9G9IcPl095868 for ; Sun, 16 Oct 2005 13:18:38 +0400 (MSD) (envelope-from stas@core.310.ru) Received: (from stas@localhost) by core.310.ru (8.13.3/8.12.11/Submit) id j9G9Ib15095867 for freebsd-hackers@freebsd.org; Sun, 16 Oct 2005 13:18:37 +0400 (MSD) (envelope-from stas) Date: Sun, 16 Oct 2005 13:18:37 +0400 From: Stanislav Sedov To: freebsd-hackers@freebsd.org Message-ID: <20051016091837.GA95809@core.310.ru> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: anti-briteforce PAM module X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 09:40:20 -0000 There is the first version of my anti bruteforce PAM module available. It's primarily intended for preventing bruteforce attacks on authentification- protected services (SSH, telnet, etc). This module mainatins per-host statistics list. When the number of failed authentification attempts from one hosts exeeds pre-configured limit, the module performs special actions. The module was tested on FreeBSD 7.x/6.x/5.x/4.x. It's still in alpha quality, since it was not widely testes. However, it's used already in production, on 20+ servers ;-) Feel free to send comments/bug reports/suggestions to me. It'll be very helpful for me. Home page of the module: http://mbsd.msk.ru/pam_af.html. Thanks in advance, Stanislav Sedov. From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 12:11:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1234916A41F for ; Sun, 16 Oct 2005 12:11:13 +0000 (GMT) (envelope-from alsbergt@zoopee.org) Received: from dexter.zoopee.org (zoopee.org [192.117.108.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B5F543D48 for ; Sun, 16 Oct 2005 12:11:12 +0000 (GMT) (envelope-from alsbergt@zoopee.org) Received: from alsbergt by dexter.zoopee.org with local (Exim 4.43) id 1ER7M4-00078B-E2 for freebsd-hackers@freebsd.org; Sun, 16 Oct 2005 14:11:08 +0200 Date: Sun, 16 Oct 2005 14:11:08 +0200 From: Tom Alsberg To: FreeBSD Hackers List Message-ID: <20051016121108.GA27391@zoopee.org> Mail-Followup-To: Tom Alsberg , FreeBSD Hackers List Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Face: "5"j@Y1Peoz1; ftTv>\|['ox-csmV+:_RDNdi/2lSe2x?0:HVAeVW~ajwQ7RfDlcb^18eJ; t,O,s5-aNdU/DJ2E8h1s,..4}N9$27u`pWmH|; s!zlqqVwr9R^_ji=1\3}Z6gQBYyQ]{gd5-V8s^fYf{$V2*_&S>eA|SH@Y\hOVUjd[5eah{EO@gCr.ydSpJHJIU[QsH~bC?$C@O:SzF=CaUxp80-iknM(]q(W Subject: Process/network information from kernel dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 12:11:13 -0000 Hi... Are there any tools to get information (listing and details) about open files, network connections, and currently running processes from a kernel core (e.g. one obtained using "call doadump" from DDB)? -- Tom -- Tom Alsberg - certified insane, complete illiterate. Homepage: http://www.cs.huji.ac.il/~alsbergt/ * An idea is not responsible for the people who believe in it. From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 14:59:26 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B8A816A41F for ; Sun, 16 Oct 2005 14:59:26 +0000 (GMT) (envelope-from jilles@stack.nl) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43F4443D48 for ; Sun, 16 Oct 2005 14:59:25 +0000 (GMT) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailhost.stack.nl (Postfix) with ESMTP id 1B620A3041; Sun, 16 Oct 2005 16:59:24 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 0E8E222880; Sun, 16 Oct 2005 16:59:24 +0200 (CEST) Date: Sun, 16 Oct 2005 16:59:24 +0200 From: Jilles Tjoelker To: Tom Alsberg , FreeBSD Hackers List Message-ID: <20051016145923.GA82397@stack.nl> References: <20051016121108.GA27391@zoopee.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051016121108.GA27391@zoopee.org> X-Operating-System: FreeBSD 5.4-RELEASE i386 User-Agent: Mutt/1.5.11 Cc: Subject: Re: Process/network information from kernel dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 14:59:26 -0000 On Sun, Oct 16, 2005 at 02:11:08PM +0200, Tom Alsberg wrote: > Are there any tools to get information (listing and details) about > open files, network connections, and currently running processes > from a kernel core (e.g. one obtained using "call doadump" from DDB)? You can use tools like fstat(1), netstat(1), ps(1), dmesg(1), vmstat(1), iostat(1) on a core dump with -N /path/to/kernel -M /path/to/vmcore Not all options work in this mode. Alternatively you can grovel around in the data structures using gdb. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 11:49:02 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A662316A41F for ; Mon, 17 Oct 2005 11:49:02 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35711.mail.mud.yahoo.com (web35711.mail.mud.yahoo.com [66.163.179.165]) by mx1.FreeBSD.org (Postfix) with SMTP id 06DBC43D53 for ; Mon, 17 Oct 2005 11:49:01 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 32414 invoked by uid 60001); 17 Oct 2005 11:49:01 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Y0gdjAS2gVbg8HyqdXaNY9kKH4nxrIHPsQCG47r8QWj6iH08bm8O5t7f7hOACBQyYZ/C/3qCsF8Iot0zH+9VsLZj9DRG4mG5Fxe4yJYAKV7+aCYAXhuqFxUksaQGk28Q2o2VsuNULpiadwJgTZduQx5KO1XZ60sNqKR0V18//dY= ; Message-ID: <20051017114901.32412.qmail@web35711.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35711.mail.mud.yahoo.com via HTTP; Mon, 17 Oct 2005 04:49:01 PDT Date: Mon, 17 Oct 2005 04:49:01 -0700 (PDT) From: kamal kc To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: malloc() in kernel and increasing mbuf and cluster size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 11:49:02 -0000 this may be a trivial question for many of you but i am confused in doing memory allocation in the kernel. sys/malloc.h has function prototypes for malloc() kern/kern_malloc.c defines the malloc() the malloc() definition is void * malloc(size, type, flags) unsigned long size; struct malloc_type *type; int flags; i understand the size and flags but what shall i do with the malloc_type. suppose i want to allocate 1024 bytes then how should i call the malloc ? i set --> size=1024 flags=M_WAITOK type=???? (i don't know what/how to initialize the type) Next thing is that i want to make the kernel process network packets very fast. i think of increasing the mbuf and cluster size. i want to if there will be any effect on increasing the mbuf and cluster size. what would be an appropriate size of mbuf and cluster if I use i. 512 MB RAM iI. 1024 MB RAM which parts of the kernel will be affected by changing the mbuf and cluster size ? i think somebody maybe able to help me. thanks folks. kamal __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 12:27:02 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A323016A420 for ; Mon, 17 Oct 2005 12:27:02 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35703.mail.mud.yahoo.com (web35703.mail.mud.yahoo.com [66.163.179.157]) by mx1.FreeBSD.org (Postfix) with SMTP id D13FA43D4C for ; Mon, 17 Oct 2005 12:26:57 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 58725 invoked by uid 60001); 17 Oct 2005 12:26:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=BjOJIls2l9EhbgySTLwhXYpnjkj0cLSzH/+SuQIy038KvHz9j0dwz9w15wf4KlitU78oBXQ9e2ySiDtsqmUqCrop2gZ3HEzNec9dpzaVL7Ma0fqAF4E4L9ZRZjxwWt6ysCLEBPcclS+uIc9sTb34G1NwTIFYbsTPN0FpovgH4dQ= ; Message-ID: <20051017122657.58723.qmail@web35703.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35703.mail.mud.yahoo.com via HTTP; Mon, 17 Oct 2005 05:26:57 PDT Date: Mon, 17 Oct 2005 05:26:57 -0700 (PDT) From: kamal kc To: freebsd-net@freebsd.org In-Reply-To: <20051017120734.GA820@taran.infoua.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: malloc() in kernel and increasing mbuf and cluster size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 12:27:02 -0000 > > sys/malloc.h has function prototypes for malloc() > > kern/kern_malloc.c defines the malloc() > > > > the malloc() definition is > > > > void * > > malloc(size, type, flags) > > unsigned long size; > > struct malloc_type *type; > > int flags; > > > > i understand the size and flags but what shall i > > do with the malloc_type. > > man 9 malloc :-) > i saw the man pages. it says to use malloc_type via MALLOC_DEFINE(type,shortdesc,longdesc) MALLOC_DECLARE(type) the man pages use M_FOOBUF(where did it come from ??) in the field type. Now how should i code it. struct malloc_type mytype; mytype=MALLOC_DEFINE(.....,"mybuffers","mybuffers"); what should i put in the type field ?? thanks in advance, kamal __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 12:34:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 272B816A41F; Mon, 17 Oct 2005 12:34:16 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C1C243D49; Mon, 17 Oct 2005 12:34:15 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp211-138.lns1.adl2.internode.on.net [203.122.211.138]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j9HCYC5Z040218 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 17 Oct 2005 22:04:13 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 17 Oct 2005 22:04:10 +0930 User-Agent: KMail/1.8.2 References: <20051017114901.32412.qmail@web35711.mail.mud.yahoo.com> In-Reply-To: <20051017114901.32412.qmail@web35711.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2003707.nlPXxie13S"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510172204.11162.doconnor@gsoft.com.au> X-Spam-Score: 0.05 () FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: kamal kc , freebsd-net@freebsd.org Subject: Re: malloc() in kernel and increasing mbuf and cluster size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 12:34:16 -0000 --nextPart2003707.nlPXxie13S Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 17 Oct 2005 21:19, kamal kc wrote: > void * > malloc(size, type, flags) > unsigned long size; > struct malloc_type *type; > int flags; > > i understand the size and flags but what shall i > do with the malloc_type. man 9 malloc It is used to do basic sanity checking and for statistics. =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 --nextPart2003707.nlPXxie13S Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDU5pD5ZPcIHs/zowRAvpWAKCW3QGmJhQRgjvzEJ0UAdM6R0dlzACfZx4v 4exRzp88/K58i47YpCTUJ9o= =9elw -----END PGP SIGNATURE----- --nextPart2003707.nlPXxie13S-- From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 16 22:47:05 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC38F16A41F; Sun, 16 Oct 2005 22:47:05 +0000 (GMT) (envelope-from dsacode@yandex.ru) Received: from tide.yandex.ru (tide.yandex.ru [213.180.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71BED43D46; Sun, 16 Oct 2005 22:47:05 +0000 (GMT) (envelope-from dsacode@yandex.ru) Received: from YAMAIL (tide.yandex.ru) by mail.yandex.ru id ; Mon, 17 Oct 2005 02:46:56 +0400 Date: Mon, 17 Oct 2005 02:46:56 +0400 (MSD) From: "Oleg Petrov" Sender: dsacode@yandex.ru Message-Id: <4352D860.000002.03681@tide.yandex.ru> MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] Errors-To: dsacode@yandex.ru To: freebsd-questions@freebsd.org X-Source-Ip: 83.149.193.45 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 17 Oct 2005 12:39:53 +0000 Cc: freebsd-hackers@freebsd.org Subject: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dsacode@yandex.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 22:47:05 -0000 Hello, FreeBSD people. First thing to mention is that I'm very experienced Emacs user. I was using it for 4-5 years or so. But sometime ago i began to feel myself so uncomfortable with it for some reasons: first, i use many different systems and emacs isn't default application for FreeBSD or any other *BSD\Linux distribution. Second, remote machines aren't powerful enough to start Emacs fast. I tried many small Emacs clones like jed, joe, uemacs and several others i just can't remember. But for different reasons i disliked all of them. Later I noticed default `nvi' editor, that has some nice features: it comes with FreeBSD by default and according to documentation it has powerful editing mechanism. So, my question goes to all FreeBSD hackers who uses `nvi' as their general editor. Is it possible to do serious hacking with it? More accurate: * What programming features it support? (Does it have something like etags? Does it have interface to gdb? And such other things..) * Is it possible to use it comfortable with Dvorak layout? (I noticed some bindings that relies on keys arrangement) * How to setup it to standard FreeBSD C code indentation? And don't use tabs as well. It's hard choice for me to switch old good Emacs to something new, so please give me your opinions. I'm not subscribed to list, so please CC me. Thanks! From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 00:35:07 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A16C816A41F; Mon, 17 Oct 2005 00:35:07 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFAC543D48; Mon, 17 Oct 2005 00:35:04 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.1/8.13.1) with ESMTP id j9H0Z2OH042365; Sun, 16 Oct 2005 17:35:03 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.1/8.13.1/Submit) id j9H0Z25q042364; Sun, 16 Oct 2005 17:35:02 -0700 (PDT) (envelope-from kline) Date: Sun, 16 Oct 2005 17:35:01 -0700 From: Gary Kline To: Oleg Petrov Message-ID: <20051017003501.GB41769@thought.org> References: <4352D860.000002.03681@tide.yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4352D860.000002.03681@tide.yandex.ru> User-Agent: Mutt/1.4.2.1i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 19 years of service to the Unix community X-Mailman-Approved-At: Mon, 17 Oct 2005 12:39:53 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 00:35:07 -0000 On Mon, Oct 17, 2005 at 02:46:56AM +0400, Oleg Petrov wrote: > Hello, FreeBSD people. > > First thing to mention is that I'm very experienced Emacs user. I was using it > for 4-5 years or so. But sometime ago i began to feel myself so uncomfortable > with it for some reasons: first, i use many different systems and emacs isn't > default application for FreeBSD or any other *BSD\Linux distribution. Second, > remote machines aren't powerful enough to start Emacs fast. I tried many small > Emacs clones like jed, joe, uemacs and several others i just can't remember. > But for different reasons i disliked all of them. Later I noticed default > `nvi' editor, that has some nice features: it comes with FreeBSD by default > and according to documentation it has powerful editing mechanism. > > So, my question goes to all FreeBSD hackers who uses `nvi' as their general > editor. Is it possible to do serious hacking with it? More accurate: > > * What programming features it support? (Does it have something like etags? > Does it have interface to gdb? And such other things..) > > * Is it possible to use it comfortable with Dvorak layout? (I noticed some > bindings that relies on keys arrangement) > > * How to setup it to standard FreeBSD C code indentation? And don't use > tabs as well. > > It's hard choice for me to switch old good Emacs to something new, so please > give me your opinions. > > I'm not subscribed to list, so please CC me. > vi was the first screen/cursor-based editor in computer history. Written by Bill Joy when he was in his early 20's. I've been using vi almost since Bill released his first draft; my fingers know it by default. And even after almost 30years there are still things I don't know. Nutshell, I've hacked hundreds of thousands of line using vi; millions of words of prose. I've used *tags, debuggers, and other tools with it. Have tried *emacs; just can't get the hang of it. With tools like [n]vi and ctags, plus a debugger you've got your own IDE. Since you've learned emacs, you'll learn vi in a flash. gary kline -- Gary Kline kline@thought.org www.thought.org Public service Unix From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 12:07:38 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C220416A41F; Mon, 17 Oct 2005 12:07:38 +0000 (GMT) (envelope-from nick@taran.infoua.com.ua) Received: from taran.infoua.com.ua (2s-49.colo1.kv.wnet.ua [217.20.163.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2612943D48; Mon, 17 Oct 2005 12:07:36 +0000 (GMT) (envelope-from nick@taran.infoua.com.ua) Received: from taran.infoua.com.ua (localhost [127.0.0.1]) by taran.infoua.com.ua (8.13.4/8.13.4) with ESMTP id j9HC7Ytf001581; Mon, 17 Oct 2005 15:07:34 +0300 (EEST) (envelope-from nick@taran.infoua.com.ua) Received: (from nick@localhost) by taran.infoua.com.ua (8.13.4/8.13.4/Submit) id j9HC7Ye5001580; Mon, 17 Oct 2005 15:07:34 +0300 (EEST) (envelope-from nick) Date: Mon, 17 Oct 2005 15:07:34 +0300 From: Nick Strebkov To: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20051017120734.GA820@taran.infoua.com.ua> Mail-Followup-To: Nick Strebkov , freebsd-net@freebsd.org, freebsd-hackers@freebsd.org References: <20051017114901.32412.qmail@web35711.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-u Content-Disposition: inline In-Reply-To: <20051017114901.32412.qmail@web35711.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 6.0-BETA4 X-Real-Name: =?koi8-u?B?89TSxcLLz9cgSMnLz8zByiDhzsHU?= =?koi8-u?B?z8zYxdfJ3g==?= X-Mailman-Approved-At: Mon, 17 Oct 2005 12:39:53 +0000 Cc: Subject: Re: malloc() in kernel and increasing mbuf and cluster size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 12:07:38 -0000 Hi, Kamal On 17.10.2005 04:49:01, kamal kc wrote: > this may be a trivial question for many of you > but i am confused in doing memory allocation in the > kernel. > > sys/malloc.h has function prototypes for malloc() > kern/kern_malloc.c defines the malloc() > > the malloc() definition is > > void * > malloc(size, type, flags) > unsigned long size; > struct malloc_type *type; > int flags; > > i understand the size and flags but what shall i > do with the malloc_type. man 9 malloc :-) -- Nick Strebkov Public key: http://humgat.org/~nick/pubkey.txt fpr: 552C 88D6 895B 6E64 F277 D367 8A70 8132 47F5 C1B6 From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 13:31:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5283616A41F; Mon, 17 Oct 2005 13:31:19 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83E8D43D46; Mon, 17 Oct 2005 13:31:18 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp211-138.lns1.adl2.internode.on.net [203.122.211.138]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j9HDVFuO040733 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 17 Oct 2005 23:01:15 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 17 Oct 2005 23:01:03 +0930 User-Agent: KMail/1.8.2 References: <20051017122657.58723.qmail@web35703.mail.mud.yahoo.com> In-Reply-To: <20051017122657.58723.qmail@web35703.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1889844.n68iqsc57Q"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510172301.10658.doconnor@gsoft.com.au> X-Spam-Score: 0.05 () FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: kamal kc , freebsd-net@freebsd.org Subject: Re: malloc() in kernel and increasing mbuf and cluster size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 13:31:19 -0000 --nextPart1889844.n68iqsc57Q Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 17 Oct 2005 21:56, kamal kc wrote: > the man pages use M_FOOBUF(where did it come from ??) > in the field type. 'foo' is a generic term for a random variable name. > Now how should i code it. > > struct malloc_type mytype; > mytype=3DMALLOC_DEFINE(.....,"mybuffers","mybuffers"); > > what should i put in the type field ?? Read the man page!! /* sys/something/foo_extern.h */ MALLOC_DECLARE(M_FOOBUF); /* sys/something/foo_main.c */ MALLOC_DEFINE(M_FOOBUF, "foobuffers", "Buffers to foo data into the ether"); /* sys/something/foo_subr.c */ ... MALLOC(buf, struct foo_buf *, sizeof *buf, M_FOOBUF, M_NOWAIT); Read other code, there are plenty of examples in the tree. =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 --nextPart1889844.n68iqsc57Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDU6ee5ZPcIHs/zowRAnuYAJ9GwEylrj8dC3y2wpxVWwXvnwGeuwCgh0L2 +iRcqEliPhd21JD6ENAZF7Y= =KgSV -----END PGP SIGNATURE----- --nextPart1889844.n68iqsc57Q-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 14:34:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A55116A41F for ; Mon, 17 Oct 2005 14:34:01 +0000 (GMT) (envelope-from alsbergt@zoopee.org) Received: from dexter.zoopee.org (zoopee.org [192.117.108.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9E6B43D48 for ; Mon, 17 Oct 2005 14:33:59 +0000 (GMT) (envelope-from alsbergt@zoopee.org) Received: from alsbergt by dexter.zoopee.org with local (Exim 4.43) id 1ERW3o-0003BX-OY for freebsd-hackers@freebsd.org; Mon, 17 Oct 2005 16:33:56 +0200 Date: Mon, 17 Oct 2005 16:33:56 +0200 From: Tom Alsberg To: FreeBSD Hackers List Message-ID: <20051017143356.GA12188@zoopee.org> Mail-Followup-To: Tom Alsberg , FreeBSD Hackers List Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Face: "5"j@Y1Peoz1; ftTv>\|['ox-csmV+:_RDNdi/2lSe2x?0:HVAeVW~ajwQ7RfDlcb^18eJ; t,O,s5-aNdU/DJ2E8h1s,..4}N9$27u`pWmH|; s!zlqqVwr9R^_ji=1\3}Z6gQBYyQ]{gd5-V8s^fYf{$V2*_&S>eA|SH@Y\hOVUjd[5eah{EO@gCr.ydSpJHJIU[QsH~bC?$C@O:SzF=CaUxp80-iknM(]q(W Subject: How to determine link of umass/da devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 14:34:01 -0000 Hi. I need to write some user interface to perform some tasks with USB storage devices. One of the tasks is to show a list of all USB storage connected and all slices/partitions and filesystems in them. With tools like usbdevs and sysctl, I can find out what USB devices are connected, and also what USB drivers handle them (so I can see, for example, that there is a SanDisk Cruzer Micro connected to port 2 in bus 3 and the umass driver under it). I can also find out what da devices there are using camcontrol. However, how can I find out which da device was assigned to which umass/usb device? I see this info in some inconvenient form in dmesg. But I need something easier to handle programmatically to write a program that uses that data. I prefer not to resort to some ugly hack like trying to parse dmesg. Also, I'd be interested if it were possible to have my program informed when devices are connected/disconnected. Can a process ask usbd to send it some signal and somehow provide the details of the event when a device is connected/disconnected? Thanks, -- Tom -- Tom Alsberg - certified insane, complete illiterate. Homepage: http://www.cs.huji.ac.il/~alsbergt/ * An idea is not responsible for the people who believe in it. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 14:49:48 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 256E616A421; Mon, 17 Oct 2005 14:49:48 +0000 (GMT) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (blackend.org [212.11.35.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6932A43D55; Mon, 17 Oct 2005 14:49:42 +0000 (GMT) (envelope-from marc@blackend.org) Received: from gothic.blackend.org (gothic.blackend.org [192.168.1.203]) by abigail.blackend.org (8.13.3/8.13.3) with ESMTP id j9HEnZ6d076706; Mon, 17 Oct 2005 16:49:35 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from gothic.blackend.org (localhost.blackend.org [127.0.0.1]) by gothic.blackend.org (8.13.3/8.13.3) with ESMTP id j9HEnZpc001000; Mon, 17 Oct 2005 16:49:35 +0200 (CEST) (envelope-from marc@gothic.blackend.org) Received: (from marc@localhost) by gothic.blackend.org (8.13.3/8.13.3/Submit) id j9HEnKn8000999; Mon, 17 Oct 2005 16:49:20 +0200 (CEST) (envelope-from marc) Date: Mon, 17 Oct 2005 16:49:20 +0200 From: Marc Fonvieille To: Oleg Petrov Message-ID: <20051017144920.GA597@gothic.blackend.org> References: <4352D860.000002.03681@tide.yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4352D860.000002.03681@tide.yandex.ru> X-Useless-Header: blackend.org X-Operating-System: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 14:49:48 -0000 On Mon, Oct 17, 2005 at 02:46:56AM +0400, Oleg Petrov wrote: > Hello, FreeBSD people. > > First thing to mention is that I'm very experienced Emacs user. I was using it > for 4-5 years or so. But sometime ago i began to feel myself so uncomfortable > with it for some reasons: first, i use many different systems and emacs isn't > default application for FreeBSD or any other *BSD\Linux distribution. Second, > remote machines aren't powerful enough to start Emacs fast. I tried many small > Emacs clones like jed, joe, uemacs and several others i just can't remember. > But for different reasons i disliked all of them. Later I noticed default > `nvi' editor, that has some nice features: it comes with FreeBSD by default > and according to documentation it has powerful editing mechanism. > > So, my question goes to all FreeBSD hackers who uses `nvi' as their general > editor. Is it possible to do serious hacking with it? More accurate: > I'd say "s/nvi/vim" (see http://www.vim.org/) if you want to really do everything with your Vi. Marc From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 14:51:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D75C16A41F for ; Mon, 17 Oct 2005 14:51:42 +0000 (GMT) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (blackend.org [212.11.35.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF5AE43D76 for ; Mon, 17 Oct 2005 14:51:31 +0000 (GMT) (envelope-from marc@blackend.org) Received: from gothic.blackend.org (gothic.blackend.org [192.168.1.203]) by abigail.blackend.org (8.13.3/8.13.3) with ESMTP id j9HEpU7f076762 for ; Mon, 17 Oct 2005 16:51:30 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from gothic.blackend.org (localhost.blackend.org [127.0.0.1]) by gothic.blackend.org (8.13.3/8.13.3) with ESMTP id j9HEpUTA001011 for ; Mon, 17 Oct 2005 16:51:30 +0200 (CEST) (envelope-from marc@gothic.blackend.org) Received: (from marc@localhost) by gothic.blackend.org (8.13.3/8.13.3/Submit) id j9HEpUkN001010 for freebsd-hackers@freebsd.org; Mon, 17 Oct 2005 16:51:30 +0200 (CEST) (envelope-from marc) Date: Mon, 17 Oct 2005 16:51:30 +0200 From: Marc Fonvieille To: freebsd-hackers@freebsd.org Message-ID: <20051017145130.GB597@gothic.blackend.org> References: <4352D860.000002.03681@tide.yandex.ru> <20051017144920.GA597@gothic.blackend.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051017144920.GA597@gothic.blackend.org> X-Useless-Header: blackend.org X-Operating-System: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 14:51:42 -0000 On Mon, Oct 17, 2005 at 04:49:20PM +0200, Marc Fonvieille wrote: > > I'd say "s/nvi/vim" (see http://www.vim.org/) if you want to really do > everything with your Vi. > Err, sorry for the cross-post :( Marc From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 16:54:04 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9B8216A41F for ; Mon, 17 Oct 2005 16:54:04 +0000 (GMT) (envelope-from jerry@evasefor.com) Received: from mout.perfora.net (mout.perfora.net [217.160.230.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BB3F43D5C for ; Mon, 17 Oct 2005 16:54:04 +0000 (GMT) (envelope-from jerry@evasefor.com) Received: from config16.kundenserver.de [172.23.4.143] (helo=togal2.1and1.com) by mrelay.perfora.net with ESMTP (Nemesis), id 0MKp2t-1ERYFO0at2-0001Ib; Mon, 17 Oct 2005 12:54:02 -0400 To: From: X-Binford: 6100 (more power) X-Originating-From: 29983738 X-Mailer: Webmail X-Received: from config16 by 67.103.124.219 with HTTP id 29983738 for freebsd-hackers@freebsd.org; Mon, 17 Oct 2005 18:52:02 +0200 Content-Type: text/plain; charset="iso-8859-1" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Priority: 3 Date: Mon, 17 Oct 2005 18:52:02 +0200 Message-ID: <0MKp2t-1ERYFO0at2-0001Ib@mrelay.perfora.net> Subject: adding new device to base system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 16:54:04 -0000 Hello list, I am trying to add a new directory (NIC) to my base system (FreeBSD5.4) to support an experimental card. But I have this error trying to build the kernel. -------------------------------------------------------------- >>> Kernel build for TARTAR started on Mon Oct 17 09:48:55 PDT 2005 -------------------------------------------------------------- ===> TARTAR mkdir -p /usr/obj/usr/src/sys -------------------------------------------------------------- >>> stage 1: configuring the kernel -------------------------------------------------------------- cd /usr/src/sys/i386/conf; PATH=/usr/obj/usr/src/i386/legacy/usr/sbin:/usr/obj/usr/src/i386/legacy/usr/bin:/usr/obj/usr/src/i386/legacy/usr/games:/usr/obj/usr/src/i386/usr/sbin:/usr/obj/usr/src/i386/usr/bin:/usr/obj/usr/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin config -d /usr/obj/usr/src/sys/TARTAR /usr/src/sys/i386/conf/TARTAR ../../conf/files: FreeBSD: must be count, optional, mandatory or standard *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. I have created /usr/src/sys/dev/tartar and put all it's source code there. in my kernel file I have added: device tartar in /sys/conf/files: dev/tartar/if_tartar.c optional tartar pci Why the error message? Same thing even with GENERIC. Thank you, Jerry From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 16:59:23 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2270316A421 for ; Mon, 17 Oct 2005 16:59:23 +0000 (GMT) (envelope-from sangwoos@gmail.com) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E82043D48 for ; Mon, 17 Oct 2005 16:59:22 +0000 (GMT) (envelope-from sangwoos@gmail.com) Received: by qproxy.gmail.com with SMTP id a39so825443qbd for ; Mon, 17 Oct 2005 09:59:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oxstNY7AEnesA0sQB6zdMBEKrD/Hsn8vZ+/A0kmTXr9yNeH2ajBcUi35GrrsZfR/4YKKYK2aAylX1l/i+S6uShKbfgqC19QfKu3xxH+fIYI1Q4UzIEZ0pC4a6uMbMrObywzH7gM4cCexjBfn8Q1ldDIvlmAO6dSXibmSu4D0WAM= Received: by 10.65.119.7 with SMTP id w7mr2161170qbm; Mon, 17 Oct 2005 09:59:21 -0700 (PDT) Received: by 10.65.52.5 with HTTP; Mon, 17 Oct 2005 09:59:21 -0700 (PDT) Message-ID: <4cbd01f40510170959l30f90bc1k@mail.gmail.com> Date: Tue, 18 Oct 2005 01:59:21 +0900 From: Sangwoo Shim To: kamal kc In-Reply-To: <20051017122657.58723.qmail@web35703.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051017120734.GA820@taran.infoua.com.ua> <20051017122657.58723.qmail@web35703.mail.mud.yahoo.com> Cc: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: malloc() in kernel and increasing mbuf and cluster size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 16:59:23 -0000 2005/10/17, kamal kc : > > > sys/malloc.h has function prototypes for malloc() > > > kern/kern_malloc.c defines the malloc() > > > > > > the malloc() definition is > > > > > > void * > > > malloc(size, type, flags) > > > unsigned long size; > > > struct malloc_type *type; > > > int flags; > > > > > > i understand the size and flags but what shall i > > > do with the malloc_type. > > > > man 9 malloc :-) > > > > i saw the man pages. > > it says to use malloc_type via > > MALLOC_DEFINE(type,shortdesc,longdesc) > MALLOC_DECLARE(type) > > the man pages use M_FOOBUF(where did it come from ??) > in the field type. > > Now how should i code it. > > struct malloc_type mytype; > mytype=3DMALLOC_DEFINE(.....,"mybuffers","mybuffers"); > > what should i put in the type field ?? > > thanks in advance, > kamal malloc type is defined for some kind of statistics/trackings. If you define some specific malloc types for your module/driver etc., you can track the memory usage more accurately. For example, if you do vmstat -= m you can see how much memories are used for specific allocations by looking at type field. Regards, Sangwoo Shim > > > > > > > > > __________________________________ > Yahoo! Music Unlimited > Access over 1 million songs. Try it free. > http://music.yahoo.com/unlimited/ > _______________________________________________ > 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 Mon Oct 17 17:08:43 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DC8E16A41F for ; Mon, 17 Oct 2005 17:08:43 +0000 (GMT) (envelope-from sangwoos@gmail.com) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68B1243D49 for ; Mon, 17 Oct 2005 17:08:42 +0000 (GMT) (envelope-from sangwoos@gmail.com) Received: by qproxy.gmail.com with SMTP id a39so827237qbd for ; Mon, 17 Oct 2005 10:08:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LCThHyi6QqgNd8G5RKq6iFeSGDLAu3Q9mQLXxX29r7Bxu46Q2UXdwOv003lw6KRLwHgwDJpgJFDyfC8mQQgF1DzFqHqRVsbRTtU3DO7kTcAXweAtcFdZhnHkhtFBk9MmXREUbdDnliwPdVEaYRfQ6Gj5L6gf0m0VualPkgAQbXQ= Received: by 10.65.123.17 with SMTP id a17mr2163907qbn; Mon, 17 Oct 2005 10:08:40 -0700 (PDT) Received: by 10.65.52.5 with HTTP; Mon, 17 Oct 2005 10:08:40 -0700 (PDT) Message-ID: <4cbd01f40510171008x42b4738bi@mail.gmail.com> Date: Tue, 18 Oct 2005 02:08:40 +0900 From: Sangwoo Shim To: Marc Fonvieille In-Reply-To: <20051017144920.GA597@gothic.blackend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4352D860.000002.03681@tide.yandex.ru> <20051017144920.GA597@gothic.blackend.org> Cc: freebsd-hackers@freebsd.org, Oleg Petrov Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 17:08:43 -0000 2005/10/17, Marc Fonvieille : > On Mon, Oct 17, 2005 at 02:46:56AM +0400, Oleg Petrov wrote: > > Hello, FreeBSD people. > > > > First thing to mention is that I'm very experienced Emacs user. I was u= sing it > > for 4-5 years or so. But sometime ago i began to feel myself so uncomfo= rtable > > with it for some reasons: first, i use many different systems and emacs= isn't > > default application for FreeBSD or any other *BSD\Linux distribution. S= econd, > > remote machines aren't powerful enough to start Emacs fast. I tried man= y small > > Emacs clones like jed, joe, uemacs and several others i just can't reme= mber. > > But for different reasons i disliked all of them. Later I noticed defau= lt > > `nvi' editor, that has some nice features: it comes with FreeBSD by def= ault > > and according to documentation it has powerful editing mechanism. > > > > So, my question goes to all FreeBSD hackers who uses `nvi' as their gen= eral > > editor. Is it possible to do serious hacking with it? More accurate: > > > > I'd say "s/nvi/vim" (see http://www.vim.org/) if you want to really do > everything with your Vi. Actually the first thing that I do after minimal installing of new system i= s to install vim from the ports tree. (in fact, installing cvsup, of course := -) I remember once upon a time someone (david?) made a suggestion that nvi in our tree should be changed to vim-lite(or something.) I'm tend to agree with that.. (Although vim is GPL'd, nvi is in the src/contrib anyway..) Regards, Sangwoo Shim > > Marc > _______________________________________________ > 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 Mon Oct 17 19:24:39 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA1AA16A41F; Mon, 17 Oct 2005 19:24:39 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 221C943D4C; Mon, 17 Oct 2005 19:24:39 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9HJOGvn012132; Mon, 17 Oct 2005 13:24:18 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 17 Oct 2005 13:25:32 -0600 (MDT) Message-Id: <20051017.132532.48669838.imp@bsdimp.com> To: kline@tao.thought.org From: "M. Warner Losh" In-Reply-To: <20051017003501.GB41769@thought.org> References: <4352D860.000002.03681@tide.yandex.ru> <20051017003501.GB41769@thought.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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 17 Oct 2005 13:24:19 -0600 (MDT) Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org, dsacode@yandex.ru Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 19:24:39 -0000 In message: <20051017003501.GB41769@thought.org> Gary Kline writes: : vi was the first screen/cursor-based editor in computer : history. Are you sure about this? I was using screen oriented editors over a 1200 baud dialup line in 1977 on a PDP-11 running RSTS/E on a Behive BH-100. Seems like one year from vi to being deployed at Berkeley to a completely different video editor being deployed on a completely different os in the schools that I used this in seems fast. So I did some digging. vi started in about 1976[1] as a project that grew out of the frustration taht a 200 line Pascal program was too big for the system to handle. These are based on recollections of Bill Joy in 1984. It appears that starting in 1972 Carl Mikkelson added screen editing features to TECO[2]. In 1974 Richard Stallman added macros to TECO. I don't know if Carl's work was the first, but it pre-dates the vi efforts. Other editors may have influanced Carl. Who knows. Warner [1] http://www.cs.pdx.edu/~kirkenda/joy84.html [2] http://www.emacswiki.org/cgi-bin/wiki/EmacsHistory From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 17 20:12:40 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FA1216A41F for ; Mon, 17 Oct 2005 20:12:40 +0000 (GMT) (envelope-from brucem@mail.cruzio.com) Received: from cruzio.com (dsl3-63-249-85-132.cruzio.com [63.249.85.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53C0043D48 for ; Mon, 17 Oct 2005 20:12:40 +0000 (GMT) (envelope-from brucem@mail.cruzio.com) Received: from mail.cruzio.com (localhost [127.0.0.1]) by cruzio.com (8.12.10/8.12.10) with ESMTP id j9HKEZIX000535; Mon, 17 Oct 2005 13:14:35 -0700 (PDT) (envelope-from brucem@mail.cruzio.com) Received: (from brucem@localhost) by mail.cruzio.com (8.12.10/8.12.10/Submit) id j9HKEZFH000534; Mon, 17 Oct 2005 13:14:35 -0700 (PDT) (envelope-from brucem) Date: Mon, 17 Oct 2005 13:14:35 -0700 (PDT) From: "Bruce R. Montague" Message-Id: <200510172014.j9HKEZFH000534@mail.cruzio.com> To: freebsd-hackers@freebsd.org Cc: kline@tao.thought.org Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 20:12:40 -0000 Hi, (wondering off on a tangent), re: > I was using screen oriented editors over a > 1200 baud dialup line in 1977 on a PDP-11 running RSTS/E on a Behive... Around this time I think full-screen editors from DEC that took advantage of the VT-52 (and later VT-100) included KED, EDT, and maybe SOS? EDT and KED took good advantage of the alternate keypad, basically the same keypad as on PC keyboards today. Weren't there full-screen editors on PDP-8's before this? Doug Engelbart's NLS demo in 1968 may not qualify as "available", but he demoed full-screen editing with a mouse: http://arstechnica.com/articles/paedia/gui.ars/2 "The demo featured hypertext linking, full-screen document editing, context-sensitive help, networked document collaboration, e-mail, instant messenging, even video conferencing!" NLS ran on a version of UC Berkeley's Genie system, which can be considered an ancestor of Unix (maybe more-so than Multics?) Although early versions of TECO may not have supported direct-cursor addressing, TECO might have played a role in popularizing the notion of full-screen editors. From the wikipedia: "TECO became well-known following a DEC PDP-6 implementation developed at MIT's Project MAC in 1964. This implementation continuously displayed the edited text visually on a CRT screen, and was used as an interactive online editor. This was, however, neither its origin nor its originally intended mode of use. Later versions of TECO were capable of driving full-screen mode on various DEC RS232 video terminals." - bruce From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 00:51:17 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E54C16A41F for ; Tue, 18 Oct 2005 00:51:17 +0000 (GMT) (envelope-from ray@redshift.com) Received: from mail.quickmeet.com (quickmeet.com [216.228.17.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1542E43D46 for ; Tue, 18 Oct 2005 00:51:17 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (workstation [192.168.20.250]) by mail.quickmeet.com (Postfix) with SMTP id 2493C17032; Mon, 17 Oct 2005 17:25:42 -0700 (PDT) Message-Id: <3.0.1.32.20051017175115.00a52d18@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Mon, 17 Oct 2005 17:51:15 -0700 To: freebsd-hackers@freebsd.org From: ray@redshift.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Limiting closed port RST response from XXX to 200... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 00:51:17 -0000 Hi, On a server I'm benchmark testing, via local host, I'm getting Limiting closed port RST response from XXXX to 200 packets/sec on the console when I'm running a lot of local connections very quickly all at once (about 7500 per second). I've added the following: net.inet.tcp.log_in_vain: 0 net.inet.udp.log_in_vain: 0 but still does it. Is there any way to disable it short of installing ipf? I'd like to see what the theoretical limit of the machine is without it perhaps limiting connections in some manner. Thanks! Ray From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 01:09:25 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39D4416A41F for ; Tue, 18 Oct 2005 01:09:25 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A00A43D46 for ; Tue, 18 Oct 2005 01:09:24 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.31]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j9I19Gn7065425 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 18 Oct 2005 10:39:17 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 18 Oct 2005 10:39:14 +0930 User-Agent: KMail/1.8.2 References: <0MKp2t-1ERYFO0at2-0001Ib@mrelay.perfora.net> In-Reply-To: <0MKp2t-1ERYFO0at2-0001Ib@mrelay.perfora.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart41837946.rbSIg5fAsV"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510181039.15415.doconnor@gsoft.com.au> X-Spam-Score: -2.82 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: jerry@evasefor.com Subject: Re: adding new device to base system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 01:09:25 -0000 --nextPart41837946.rbSIg5fAsV Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue, 18 Oct 2005 02:22, jerry@evasefor.com wrote: > /usr/src/sys/i386/conf/TARTAR ../../conf/files: FreeBSD: must be count, > optional, mandatory or > standard > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. Looks like you broke sys/conf/files somehow. Do a cvs diff on it and post it here. =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 --nextPart41837946.rbSIg5fAsV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDVEs75ZPcIHs/zowRAr6IAJ9eBWYHxSQZisz7/spM16qpTS5xHgCglimr lj2pe3Crmd3SMJm/V40ufy4= =yiRW -----END PGP SIGNATURE----- --nextPart41837946.rbSIg5fAsV-- From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 01:48:07 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7459416A41F for ; Tue, 18 Oct 2005 01:48:07 +0000 (GMT) (envelope-from silby@silby.com) Received: from wbm3.pair.net (wbm3.pair.net [209.68.3.66]) by mx1.FreeBSD.org (Postfix) with SMTP id DE00D43D45 for ; Tue, 18 Oct 2005 01:48:06 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 13105 invoked by uid 65534); 18 Oct 2005 01:48:06 -0000 Received: from 64.215.82.94 ([64.215.82.94]) (SquirrelMail authenticated user silby@silby.com) by webmail3.pair.com with HTTP; Mon, 17 Oct 2005 21:48:06 -0400 (EDT) Message-ID: <2718.64.215.82.94.1129600086.squirrel@webmail3.pair.com> In-Reply-To: <3.0.1.32.20051017175115.00a52d18@pop.redshift.com> References: <3.0.1.32.20051017175115.00a52d18@pop.redshift.com> Date: Mon, 17 Oct 2005 21:48:06 -0400 (EDT) From: "Mike Silbersack" To: ray@redshift.com User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-hackers@freebsd.org Subject: Re: Limiting closed port RST response from XXX to 200... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 01:48:07 -0000 > Hi, > > On a server I'm benchmark testing, via local host, I'm getting Limiting > closed > port RST response from XXXX to 200 packets/sec on the console when I'm > running a > lot of local connections very quickly all at once (about 7500 per second). > I've > added the following: > > net.inet.tcp.log_in_vain: 0 > net.inet.udp.log_in_vain: 0 > > but still does it. Is there any way to disable it short of installing > ipf? I'd > like to see what the theoretical limit of the machine is without it > perhaps > limiting connections in some manner. > > Thanks! > > Ray Er, if you're seeing those messages, your benchmark is going very awry! The kernel is telling you that 7500 junk packets per second are coming in, but that it has chosen to send RST packets in response to only 200 of them. What you should be asking is - why are 7500 junk packets per second coming into the system? This could be due to a flaw in how your benchmark is setup (if you're trying to connect to a port that has no listening service or DNS lookups to a nonexistent DNS server?), or it could be some kernel bug you've uncovered. If it's the latter, then I would be very interested in helping you get it fixed. There is a sysctl for disabling the reset rate limiting, but I would suggest that you track down the source of the problem before resorting to disabling the feature. Mike "Silby" Silbersack From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 02:08:10 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79B5C16A41F; Tue, 18 Oct 2005 02:08:10 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AD6843D48; Tue, 18 Oct 2005 02:08:09 +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 j9I27N9j022252; Mon, 17 Oct 2005 22:07:26 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <20051017.132532.48669838.imp@bsdimp.com> References: <4352D860.000002.03681@tide.yandex.ru> <20051017003501.GB41769@thought.org> <20051017.132532.48669838.imp@bsdimp.com> Date: Mon, 17 Oct 2005 22:07:22 -0400 To: "M. Warner Losh" , kline@tao.thought.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 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org, dsacode@yandex.ru Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 02:08:10 -0000 At 1:25 PM -0600 10/17/05, M. Warner Losh wrote: >In message: <20051017003501.GB41769@thought.org> > Gary Kline writes: >: vi was the first screen/cursor-based editor in computer >: history. > >Are you sure about this? I was using screen oriented editors over a >1200 baud dialup line in 1977 on a PDP-11 running RSTS/E on a Behive >BH-100. Seems like one year from vi to being deployed at Berkeley to >a completely different video editor being deployed on a completely >different os in the schools that I used this in seems fast. So I did >some digging. > >vi started in about 1976[1] as a project that grew out of the >frustration taht a 200 line Pascal program was too big for the system >to handle. These are based on recollections of Bill Joy in 1984. > >It appears that starting in 1972 Carl Mikkelson added screen editing >features to TECO[2]. In 1974 Richard Stallman added macros to TECO. >I don't know if Carl's work was the first, but it pre-dates the vi >efforts. Other editors may have influanced Carl. Who knows. I arrived in RPI in 1975. In December of 1975, we were just trying out a mainframe timesharing system called "Michigan Terminal System", or "MTS", from the university of Michigan. The editor was called 'edit', and was a Command Language Subsystem (CLS) in MTS. That meant it had a command language of it's one. One of the sub-commands in edit was 'visual', for visual mode. It only worked on IBM 3270-style terminals, but it was screen-based and cursor-based. The editor would put a bunch of fields up on the screen, some of which you could modify and some you couldn't. The text of your file was in the fields you could type over. Once you finished with whatever changes you wanted to make on that screen, you would hit one of 15 or 20 interrupt-generating keys on the 3270 terminal (12 of which were "programmable function keys", in a keypad with a layout similar to the numeric keypad on current keyboards). The 3270 terminal would then tell the mainframe which fields on the screen had been modified, and what those modifications were. The mainframe would update the file based on that info. I *THINK* the guy who wrote that was ... Bill Joy -- as a student at UofM. I can't find any confirmation of that, though. The closest I can come is the web page at http://www.jefallbright.net/node/3218 , which is an article written by Bill. In it he mentions: By 1967, MTS was up and running on the newly arrived 360/67, supporting 30 to 40 simultaneous users. ... By the time I arrived as an undergraduate at the University of Michigan in 1971, MTS and Merit were successful and stable systems. By that point, a multiprocessor system running MTS could support a hundred simultaneous interactive users, ... But he doesn't happen to mention anything about editors or visual mode. My memory of his connection to MTS's visual-mode could very well be wrong, since I didn't come along until after visual-mode already existed. I just remember his name coming up in later discussions. However, I also think there was someone named Victor who was part of the story of 3270 support in MTS. And Dave Twyver at University of British Columbia was the guy who wrote the 3270 DSR (Device Support Routine), as mentioned on the page at: http://mtswiki.westwood-tech.com/mtswiki-index.php/Dave%20Twyver In any case, I *am* sure that MTS had a visual editor in December of 1975, which puts before vi if vi started in 1976. Unfortunately, all of the documentation of MTS lived in the EBCDIC world, and pretty much disappeared when MTS did (in the late 1990's). -- 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 Tue Oct 18 05:05:03 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0223516A420 for ; Tue, 18 Oct 2005 05:05:02 +0000 (GMT) (envelope-from iwan@staff.usd.ac.id) Received: from staff.usd.ac.id (staff.usd.ac.id [202.152.7.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5131B43D45 for ; Tue, 18 Oct 2005 05:04:50 +0000 (GMT) (envelope-from iwan@staff.usd.ac.id) Received: from webmail.usd.ac.id (webmail.usd.ac.id [202.152.7.139]) by staff.usd.ac.id (8.11.0/8.11.0) with ESMTP id j9I5ARr06263 for ; Tue, 18 Oct 2005 12:10:40 +0700 Received: from 202.65.114.148 (proxying for 172.21.1.223) (SquirrelMail authenticated user iwan) by webmail.usd.ac.id with HTTP; Tue, 18 Oct 2005 12:17:54 -0000 (UTC) Message-ID: <3930.202.65.114.148.1129637874.squirrel@webmail.usd.ac.id> In-Reply-To: <49089.202.65.114.154.1129291871.squirrel@webmail.usd.ac.id> References: <38664.202.65.114.154.1129284462.squirrel@webmail.usd.ac.id> <20051014031654.43563.qmail@web33403.mail.mud.yahoo.com> <49089.202.65.114.154.1129291871.squirrel@webmail.usd.ac.id> Date: Tue, 18 Oct 2005 12:17:54 -0000 (UTC) From: iwan@staff.usd.ac.id To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: system password's file --failed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 05:05:03 -0000 Hi all, I failed this steps. FreeBSD cannot recognized my username. I will try it again. Have anybody another solution ?? Thanks before. regards. > Thanks for you all, > I will do this step. > > regards. > >> Hi, >> >> I would suggest you to try the below and make sure this >> works >> >> 1 ) Install a new freebsd server >> 2 ) create a user on your linux machine say with >> username >> freebsd and some >> password >> 3 ) now copy the data in your /etc/passwd file of linux >> machine to freebsd >> machine >> 4 ) Also copy the /etc/shadow file to freebsd server and >> renmae it as >> /etc/master.passwd >> 5 ) Also copy /etc/groups >> 6 ) Now try to login to freebsd machine with the new >> user >> created on the >> linux machine. >> >> Note : Please create a copy of the original file on >> freebsd machine before >> you change the real file >> >> If the test is successful. I suppose you can migrate >> from >> linux to freebsd >> with all the users and their passwords. >> >> Also while coping the file make sure that the default >> enteries are there. >> That just transfer the user details and not the system >> user details >> >> >> On 10/14/05, Jiawei Ye wrote: >>> >>> On 10/14/05, Simon Roberts >>> wrote: >>> > Try /etc/passwd and /etc/shadow >>> > User id and basic stuff in passwd, the encrypted >>> passwords in shadow. I >>> > don't know if the encryption algorithms are >>> compatible >>> between linux >>> > and bsd or not. >>> > >>> > hth >>> > Simon >>> Make sure you don't have >16 chars username before >>> migrating. FreeBSD >>> doesn't support really long usernames. >>> >>> Jiawei >>> -- >>> "Without the userland, the kernel is useless." >>> --inspired by The Tao of Programming >>> _______________________________________________ >>> 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 Tue Oct 18 05:15:14 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9208716A41F for ; Tue, 18 Oct 2005 05:15:14 +0000 (GMT) (envelope-from mezz7@cox.net) Received: from centrmmtao03.cox.net (centrmmtao03.cox.net [70.168.83.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9BE943D48 for ; Tue, 18 Oct 2005 05:15:13 +0000 (GMT) (envelope-from mezz7@cox.net) Received: from mezz.mezzweb.com ([68.103.32.140]) by centrmmtao03.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051018051438.QLHD4942.centrmmtao03.cox.net@mezz.mezzweb.com>; Tue, 18 Oct 2005 01:14:38 -0400 Date: Tue, 18 Oct 2005 00:15:46 -0500 To: iwan@staff.usd.ac.id References: <38664.202.65.114.154.1129284462.squirrel@webmail.usd.ac.id> <20051014031654.43563.qmail@web33403.mail.mud.yahoo.com> <49089.202.65.114.154.1129291871.squirrel@webmail.usd.ac.id> <3930.202.65.114.148.1129637874.squirrel@webmail.usd.ac.id> From: "Jeremy Messenger" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <3930.202.65.114.148.1129637874.squirrel@webmail.usd.ac.id> User-Agent: Opera M2/8.50 (Linux, build 1358) Cc: freebsd-hackers@freebsd.org Subject: Re: system password's file --failed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 05:15:14 -0000 On Tue, 18 Oct 2005 07:17:54 -0500, wrote: > Hi all, > I failed this steps. FreeBSD cannot recognized my username. > I will try it again. Have anybody another solution ?? Did you read link that I have given? Cheers, Mezz > Thanks before. > regards. > >> Thanks for you all, >> I will do this step. >> >> regards. >> >>> Hi, >>> >>> I would suggest you to try the below and make sure this >>> works >>> >>> 1 ) Install a new freebsd server >>> 2 ) create a user on your linux machine say with >>> username >>> freebsd and some >>> password >>> 3 ) now copy the data in your /etc/passwd file of linux >>> machine to freebsd >>> machine >>> 4 ) Also copy the /etc/shadow file to freebsd server and >>> renmae it as >>> /etc/master.passwd >>> 5 ) Also copy /etc/groups >>> 6 ) Now try to login to freebsd machine with the new >>> user >>> created on the >>> linux machine. >>> >>> Note : Please create a copy of the original file on >>> freebsd machine before >>> you change the real file >>> >>> If the test is successful. I suppose you can migrate >>> from >>> linux to freebsd >>> with all the users and their passwords. >>> >>> Also while coping the file make sure that the default >>> enteries are there. >>> That just transfer the user details and not the system >>> user details >>> >>> >>> On 10/14/05, Jiawei Ye wrote: >>>> >>>> On 10/14/05, Simon Roberts >>>> wrote: >>>> > Try /etc/passwd and /etc/shadow >>>> > User id and basic stuff in passwd, the encrypted >>>> passwords in shadow. I >>>> > don't know if the encryption algorithms are >>>> compatible >>>> between linux >>>> > and bsd or not. >>>> > >>>> > hth >>>> > Simon >>>> Make sure you don't have >16 chars username before >>>> migrating. FreeBSD >>>> doesn't support really long usernames. >>>> >>>> Jiawei >>>> -- >>>> "Without the userland, the kernel is useless." >>>> --inspired by The Tao of Programming -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 05:26:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4784E16A41F for ; Tue, 18 Oct 2005 05:26:20 +0000 (GMT) (envelope-from ray@redshift.com) Received: from mail.quickmeet.com (quickmeet.com [216.228.17.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BE9143D45 for ; Tue, 18 Oct 2005 05:26:19 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (workstation [192.168.20.250]) by mail.quickmeet.com (Postfix) with SMTP id 38A2217032; Mon, 17 Oct 2005 22:00:43 -0700 (PDT) Message-Id: <3.0.1.32.20051017222618.00a52d18@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Mon, 17 Oct 2005 22:26:18 -0700 To: "Mike Silbersack" From: ray@redshift.com In-Reply-To: <2718.64.215.82.94.1129600086.squirrel@webmail3.pair.com> References: <3.0.1.32.20051017175115.00a52d18@pop.redshift.com> <3.0.1.32.20051017175115.00a52d18@pop.redshift.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: freebsd-hackers@freebsd.org Subject: Re: Limiting closed port RST response from XXX to 200... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 05:26:20 -0000 At 09:48 PM 10/17/2005 -0400, Mike Silbersack wrote: | > Hi, | > | > On a server I'm benchmark testing, via local host, I'm getting Limiting | > closed | > port RST response from XXXX to 200 packets/sec on the console when I'm | > running a | > lot of local connections very quickly all at once (about 7500 per second). | > I've | > added the following: | > | > net.inet.tcp.log_in_vain: 0 | > net.inet.udp.log_in_vain: 0 | > | > but still does it. Is there any way to disable it short of installing | > ipf? I'd | > like to see what the theoretical limit of the machine is without it | > perhaps | > limiting connections in some manner. | > | > Thanks! | > | > Ray | | Er, if you're seeing those messages, your benchmark is going very awry! | | The kernel is telling you that 7500 junk packets per second are coming in, | but that it has chosen to send RST packets in response to only 200 of | them. What you should be asking is - why are 7500 junk packets per second | coming into the system? This could be due to a flaw in how your benchmark | is setup (if you're trying to connect to a port that has no listening | service or DNS lookups to a nonexistent DNS server?), or it could be some | kernel bug you've uncovered. If it's the latter, then I would be very | interested in helping you get it fixed. | | There is a sysctl for disabling the reset rate limiting, but I would | suggest that you track down the source of the problem before resorting to | disabling the feature. | | Mike "Silby" Silbersack | | Hi Mike, Thanks for the pointers. I will check some of those areas you mention. Since I just threw this machine together real fast, I may have some DNS off the mark or something. BTW, the benchmark I'm using is 'ab' in apache/bin. I'm running it with -c 50 and -n 1000. Seems to only cause the RST thing on small files. Thanks again for the tips. Ray From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 08:32:10 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 008FA16A422 for ; Tue, 18 Oct 2005 08:32:09 +0000 (GMT) (envelope-from molter@tin.it) Received: from ams-iport-1.cisco.com (ams-iport-1.cisco.com [144.254.224.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F4D343D46 for ; Tue, 18 Oct 2005 08:32:08 +0000 (GMT) (envelope-from molter@tin.it) Received: from ams-core-1.cisco.com ([144.254.224.150]) by ams-iport-1.cisco.com with ESMTP; 18 Oct 2005 10:32:08 +0200 Received: from xbh-ams-331.emea.cisco.com (xbh-ams-331.cisco.com [144.254.231.71]) by ams-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id j9I8W2HJ020535 for ; Tue, 18 Oct 2005 10:32:05 +0200 (MEST) Received: from xfe-ams-332.cisco.com ([144.254.231.73]) by xbh-ams-331.emea.cisco.com with Microsoft SMTPSVC(6.0.3790.0); Tue, 18 Oct 2005 10:31:44 +0200 Received: from barbapapa.cisco.com ([144.254.53.64]) by xfe-ams-332.cisco.com with Microsoft SMTPSVC(6.0.3790.0); Tue, 18 Oct 2005 01:31:44 -0700 Received: by barbapapa.cisco.com (Postfix, from userid 1000) id 31CB6122; Tue, 18 Oct 2005 10:31:44 +0200 (CEST) From: Marco Molteni To: hackers@freebsd.org Date: Tue, 18 Oct 2005 10:31:43 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510181031.43863.molter@tin.it> X-OriginalArrivalTime: 18 Oct 2005 08:31:44.0682 (UTC) FILETIME=[5F58A8A0:01C5D3BE] Cc: Subject: diskless: meaning of conf/base ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 08:32:10 -0000 Hi, lately I have been playing with diskless booting with 6.x and 7.x. I understand how the whole /conf overriding mechanism works, and I think it is useful. What I am missing is the usefulness of conf/base, especially conf/base/etc, that diskless(8) suggests to fill with the same etc in $disklessroot/etc. Let me say it in another way: conf/default/etc/ contains the overrides conf/base/etc/ contains the base etc that is overridden by the files in default/etc since anyway below $disklessroot we have an already existing etc: $disklessroot/ect/, and since the normal way to initialize conf/base/etc is: cp -Rp $disklessroot/etc/ $disklessroot/conf/base/etc So we get 3 copies of etc that need to be kept synchronized: /etc $disklessroot/etc $disklessroot/conf/base/etc why do we need $disklessroot/conf/base/etc at all? I know that there is the possibility to use conf/base/etc/diskless_remount to avoid filling conf/base/etc, but anyway, my question remains. diskless_remount could be moved to, say, /conf. thanks marco From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 09:21:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EF0716A41F for ; Tue, 18 Oct 2005 09:21:01 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71E6A43D55 for ; Tue, 18 Oct 2005 09:20:58 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (wlan034049.uni-rostock.de [139.30.34.49]) by hydra.bec.de (Postfix) with ESMTP id D73B335707 for ; Tue, 18 Oct 2005 11:20:55 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1000) id 23ACD2A26; Tue, 18 Oct 2005 11:20:48 +0200 (CEST) Date: Tue, 18 Oct 2005 11:20:48 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20051018092048.GB3541@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <3.0.1.32.20051017175115.00a52d18@pop.redshift.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3.0.1.32.20051017175115.00a52d18@pop.redshift.com> User-Agent: Mutt/1.5.10i Subject: Re: Limiting closed port RST response from XXX to 200... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 09:21:01 -0000 On Mon, Oct 17, 2005 at 05:51:15PM -0700, ray@redshift.com wrote: > Hi, > > On a server I'm benchmark testing, via local host, I'm getting Limiting closed > port RST response from XXXX to 200 packets/sec on the console when I'm running a > lot of local connections very quickly all at once (about 7500 per second). I've > added the following: Check that you don't run out of TCP ports. Adjusting MSS might help, netstat -an would show a long list of ports. Joerg From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 11:45:49 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3226B16A420 for ; Tue, 18 Oct 2005 11:45:49 +0000 (GMT) (envelope-from silby@silby.com) Received: from relay.pair.com (relay00.pair.com [209.68.5.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 8F7BE43D5E for ; Tue, 18 Oct 2005 11:45:47 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 60034 invoked from network); 18 Oct 2005 11:45:46 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 18 Oct 2005 11:45:46 -0000 X-pair-Authenticated: 209.68.2.70 Date: Tue, 18 Oct 2005 06:45:44 -0500 (CDT) From: Mike Silbersack To: Joerg Sonnenberger In-Reply-To: <20051018092048.GB3541@britannica.bec.de> Message-ID: <20051018064421.P20643@odysseus.silby.com> References: <3.0.1.32.20051017175115.00a52d18@pop.redshift.com> <20051018092048.GB3541@britannica.bec.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Limiting closed port RST response from XXX to 200... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 11:45:49 -0000 On Tue, 18 Oct 2005, Joerg Sonnenberger wrote: > On Mon, Oct 17, 2005 at 05:51:15PM -0700, ray@redshift.com wrote: >> Hi, >> >> On a server I'm benchmark testing, via local host, I'm getting Limiting closed >> port RST response from XXXX to 200 packets/sec on the console when I'm running a >> lot of local connections very quickly all at once (about 7500 per second). I've >> added the following: > > Check that you don't run out of TCP ports. Adjusting MSS might help, > netstat -an would show a long list of ports. > > Joerg The 5.x and 6.x series don't let you run out of ports due to TIME_WAIT sockets accumulating, so please stop spreading the advice that people should twiddle with the MSL. It's no longer useful advice. Mike "Silby" Silbersack From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 07:50:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D4D716A421; Tue, 18 Oct 2005 07:50:57 +0000 (GMT) (envelope-from jan@melen.org) Received: from foxgw.melen.org (Savi-Mel.dna.fi [83.143.60.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFC1543D64; Tue, 18 Oct 2005 07:50:46 +0000 (GMT) (envelope-from jan@melen.org) Received: from [2001:14b8:400:101:208:74ff:fee4:decb] ([IPv6:2001:14b8:400:101:208:74ff:fee4:decb]) (authenticated bits=0) by foxgw.melen.org (8.13.4/8.13.4) with ESMTP id j9I7oWfV024775 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 18 Oct 2005 10:50:43 +0300 (EEST) (envelope-from jan@melen.org) From: Jan Mikael Melen To: freebsd-hackers@freebsd.org, freebsd-net@freebsd.org Date: Tue, 18 Oct 2005 10:50:24 +0300 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510181050.27530.jan@melen.org> X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on foxgw.melen.org X-Virus-Status: Clean X-Mailman-Approved-At: Tue, 18 Oct 2005 12:19:17 +0000 Cc: Subject: Unique IPsec security policies X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 07:50:57 -0000 Hi, Is there a reason why the policies that are defined as unique can't be updated through the pfkey interface? What I'm trying to do is that: 1. I create SP entry and let the kernel assign a request id for policy (reqid in the add is 0). This policy is a tunnel mode policy and I don't have the outer addresses set at this point. Only the inner addresses are set so I'll get the SADB_AQUIRE message with the inner addresses. 2. When my keying daemon get's the acquire from the kernel I run the key exchange and then I send update to the SP with previously gotten reqid and with outer addresses but it fails and kernel prints out: "key_msg2sp: reqid=16384 range violation, updated by kernel." This message comes from the sys/netkey/key.c:1488. It's obvious when I'm adding a new SP entry that this check is done but when updating the SP shouldn't it just check that the value given in update matches the one assigned earlier? Cheers, Jan From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 13:31:22 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D782116A41F for ; Tue, 18 Oct 2005 13:31:22 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id D942143D49 for ; Tue, 18 Oct 2005 13:31:21 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: by qproxy.gmail.com with SMTP id e11so30349qbe for ; Tue, 18 Oct 2005 06:31:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Vn6eSEasjjAEvhyJE0U/iszHGlVpa8c36g+zNMphc2/MyXmHjNYF2wHQAo5pJKhf87fGiSsKwq/GqFdTlNGn6412dgf1r0lgmC45Uu+5jpAeAziEYn2Dl/wp13H0e6UYqlZHtvWBeVVJ3ivb2KssJjTis6jwqmnLISrj5Uq3074= Received: by 10.65.206.16 with SMTP id i16mr561775qbq; Tue, 18 Oct 2005 06:31:21 -0700 (PDT) Received: by 10.64.201.3 with HTTP; Tue, 18 Oct 2005 06:31:21 -0700 (PDT) Message-ID: <9f9993160510180631n147bf7catfe693452f89ebb06@mail.gmail.com> Date: Tue, 18 Oct 2005 19:01:21 +0530 From: rashmi ns To: bugi@lists.redbrick.dcu.ie, freebsd-drivers@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: help regarding : To recieve and tranmit packet th' an interface X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 13:31:23 -0000 Hello List-members, we are writing a driver for HDLC-Controller We have coded upto some extent and actully we are able to transmit and recieve a char buff in loopback (from inside a driver). But we want to tranmit/Rx a real packet in (mbuf structure) and test our code .As it is a HDLC controller does'nt have std MAC ADDRRSS . How can i actually achieve a packet transmition and reception .Are there some drivers which does the same Thanks and Regards, Memeber From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 13:38:54 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F34016A41F; Tue, 18 Oct 2005 13:38:54 +0000 (GMT) (envelope-from garyj@jennejohn.org) Received: from peedub.jennejohn.org (J9c05.j.pppool.de [85.74.156.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A0C543D45; Tue, 18 Oct 2005 13:38:53 +0000 (GMT) (envelope-from garyj@jennejohn.org) Received: from jennejohn.org (localhost [127.0.0.1]) by peedub.jennejohn.org (8.13.4/8.11.6) with ESMTP id j9IDcfw2006408; Tue, 18 Oct 2005 15:38:41 +0200 (CEST) (envelope-from garyj@jennejohn.org) Message-Id: <200510181338.j9IDcfw2006408@peedub.jennejohn.org> X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.0.4 To: rashmi ns In-Reply-To: Message from rashmi ns of "Tue, 18 Oct 2005 19:01:21 +0530." <9f9993160510180631n147bf7catfe693452f89ebb06@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 18 Oct 2005 15:38:41 +0200 From: Gary Jennejohn Cc: freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org, bugi@lists.redbrick.dcu.ie Subject: Re: help regarding : To recieve and tranmit packet th' an interface X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 13:38:54 -0000 rashmi ns writes: > Hello List-members, > we are writing a driver for HDLC-Controller We have coded upto some extent > and actully we are able to transmit and recieve a char buff in loopback > (from inside a driver). > But we want to tranmit/Rx a real packet in (mbuf structure) and test our > code .As it is a HDLC controller does'nt have std MAC ADDRRSS . How can i > actually achieve a packet transmition and reception .Are there some drivers > which does the same > I've done this under Linux (ethernet-over-HDLC) and just used a faked MAC which wouldn't conflict with existing HW. --- Gary Jennejohn / garyjATjennejohnDOTorg gjATfreebsdDOTorg garyjATdenxDOTde From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 13:39:17 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D557216A426; Tue, 18 Oct 2005 13:39:17 +0000 (GMT) (envelope-from david@madole.net) Received: from a.omd3.com (a.omd3.com [69.90.174.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56D2C43D46; Tue, 18 Oct 2005 13:39:17 +0000 (GMT) (envelope-from david@madole.net) Received: from dhcp-66-212-201-164.myeastern.com ([66.212.201.164] helo=david) by a.omd3.com with esmtpa (Exim 4.50) id 1ERrgP-000Fb6-A8; Tue, 18 Oct 2005 09:39:13 -0400 Message-ID: <141d01c5d3e9$53470090$c3e7a8c0@david> From: "David S. Madole" To: "rashmi ns" , , , References: <9f9993160510180631n147bf7catfe693452f89ebb06@mail.gmail.com> Date: Tue, 18 Oct 2005 09:39:11 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Cc: Subject: Re: help regarding : To recieve and tranmit packet th' an interface X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 13:39:18 -0000 From: "rashmi ns" > > But we want to tranmit/Rx a real packet in (mbuf structure) and test > our > code .As it is a HDLC controller does'nt have std MAC ADDRRSS . How can > i > actually achieve a packet transmition and reception .Are there some > drivers > which does the same I would think any of the existing drivers for WAN-type interfaces would be facing all of the the same issues as you might. Take a look at the Hardware Notes for whatever release you are using under the Miscellaneous Network section: http://www.freebsd.org/releases/5.4R/hardware-i386.html David From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 17:01:07 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3852A16A41F; Tue, 18 Oct 2005 17:01:07 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id C401243D49; Tue, 18 Oct 2005 17:01:06 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.13.4/8.13.1) with ESMTP id j9IH151N023966; Tue, 18 Oct 2005 10:01:06 -0700 (PDT) (envelope-from bakul@bitblocks.com) Message-Id: <200510181701.j9IH151N023966@gate.bitblocks.com> To: rashmi ns In-reply-to: Your message of "Tue, 18 Oct 2005 19:01:21 +0530." <9f9993160510180631n147bf7catfe693452f89ebb06@mail.gmail.com> Date: Tue, 18 Oct 2005 10:01:05 -0700 From: Bakul Shah Cc: freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org, bugi@lists.redbrick.dcu.ie Subject: Re: help regarding : To recieve and tranmit packet th' an interface X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 17:01:07 -0000 > we are writing a driver for HDLC-Controller We have coded upto some extent > and actully we are able to transmit and recieve a char buff in loopback > (from inside a driver). > > But we want to tranmit/Rx a real packet in (mbuf structure) and test our > code .As it is a HDLC controller does'nt have std MAC ADDRRSS . How can i > actually achieve a packet transmition and reception .Are there some drivers > which does the same Look at /sys/net/if_spppsubr.c or /sys/netgraph/ng_sppp.c. One other option is to let your driver present a simple serial IO interface and implement higher level logic in a user level daemon that uses a tun device to plug into the network layer (like /usr/sbin/ppp). Also be, sure to read RFC1661! From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 17:39:30 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F80116A41F for ; Tue, 18 Oct 2005 17:39:30 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA11A43D46 for ; Tue, 18 Oct 2005 17:39:29 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j9IHdTM2013576; Tue, 18 Oct 2005 10:39:29 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j9IHdSTB013575; Tue, 18 Oct 2005 10:39:28 -0700 Date: Tue, 18 Oct 2005 10:39:28 -0700 From: Brooks Davis To: Marco Molteni Message-ID: <20051018173928.GC9748@odin.ac.hmc.edu> References: <200510181031.43863.molter@tin.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OBd5C1Lgu00Gd/Tn" Content-Disposition: inline In-Reply-To: <200510181031.43863.molter@tin.it> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: hackers@freebsd.org Subject: Re: diskless: meaning of conf/base ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 17:39:30 -0000 --OBd5C1Lgu00Gd/Tn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 18, 2005 at 10:31:43AM +0200, Marco Molteni wrote: > Hi, >=20 > lately I have been playing with diskless booting with 6.x and 7.x. > I understand how the whole /conf overriding mechanism works, and > I think it is useful. >=20 > What I am missing is the usefulness of conf/base, especially=20 > conf/base/etc, that diskless(8) suggests to fill with the same > etc in $disklessroot/etc. >=20 > Let me say it in another way: >=20 > conf/default/etc/ contains the overrides > conf/base/etc/ contains the base etc that is overridden by the > files in default/etc >=20 > since anyway below $disklessroot we have an already existing etc: > $disklessroot/ect/, and since the normal way to initialize conf/base/etc > is: >=20 > cp -Rp $disklessroot/etc/ $disklessroot/conf/base/etc >=20 > So we get 3 copies of etc that need to be kept synchronized: >=20 > /etc > $disklessroot/etc > $disklessroot/conf/base/etc /etc and $disklessroot/etc do not necessarily have any relation. > why do we need $disklessroot/conf/base/etc at all? What should we use instead? You can't just use $disklessroot/etc because you have to remount it or copy it somewhere before mounting the mfs over /etc. Using some sort of loopback mount is a good option to avoid sync issues, but there are many ways to do it so the user needs to make that decision. > I know that there is the possibility to use=20 > conf/base/etc/diskless_remount to avoid filling conf/base/etc, but > anyway, my question remains. diskless_remount could be moved to, > say, /conf. Using diskless_remount to mount /conf would not addresses this. I use /conf/diskless_remount to allow me to share /conf directories between roots. I then use /conf/base/etc/diskless_remount to pick use the /etc of the root. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --OBd5C1Lgu00Gd/Tn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDVTNOXY6L6fI4GtQRAqAIAJoDHfWMpVxi9UWlROd6MI8e/iwsYgCfb3V7 aH0DN2ARDp8laph066Eb5Mk= =VK0H -----END PGP SIGNATURE----- --OBd5C1Lgu00Gd/Tn-- From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 18:04:48 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 842FE16A41F for ; Tue, 18 Oct 2005 18:04:48 +0000 (GMT) (envelope-from bv@bilver.wjv.com) Received: from wjv.com (fl-65-40-24-38.sta.sprint-hsd.net [65.40.24.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDEC443D45 for ; Tue, 18 Oct 2005 18:04:45 +0000 (GMT) (envelope-from bv@bilver.wjv.com) Received: from bilver.wjv.com (localhost.wjv.com [127.0.0.1]) by wjv.com (8.13.5/8.13.1) with ESMTP id j9II4hpW062606 for ; Tue, 18 Oct 2005 14:04:43 -0400 (EDT) (envelope-from bv@bilver.wjv.com) Received: (from bv@localhost) by bilver.wjv.com (8.13.5/8.13.1/Submit) id j9II4hkP062605 for freebsd-hackers@freebsd.org; Tue, 18 Oct 2005 14:04:43 -0400 (EDT) (envelope-from bv) Date: Tue, 18 Oct 2005 14:04:43 -0400 From: Bill Vermillion To: freebsd-hackers@freebsd.org Message-ID: <20051018180443.GC62265@wjv.com> References: <20051018120048.9279F16A41F@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051018120048.9279F16A41F@hub.freebsd.org> Organization: W.J.Vermillion / Orlando - Winter Park ReplyTo: bv@wjv.com User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED, J_CHICKENPOX_66 autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on bilver.wjv.com Subject: Re: system password's file --failed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bv@wjv.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 18:04:48 -0000 Throwing caution to the wind and speaking without thinking about what was being said on Tue, Oct 18, 2005 at 12:00 , freebsd-hackers-request@freebsd.org blurted this: > Send freebsd-hackers mailing list submissions to > Date: Tue, 18 Oct 2005 12:17:54 -0000 (UTC) > From: iwan@staff.usd.ac.id > Subject: Re: system password's file --failed > To: freebsd-hackers@freebsd.org > Hi all, > I failed this steps. FreeBSD cannot recognized my username. > I will try it again. Have anybody another solution ?? > Thanks before. > regards. > If you used those steps no wonder it failed. shadow is NOT at all like master.passwd. ... > >> I would suggest you to try the below and make sure this > >> works > >> 1 ) Install a new freebsd server > >> 2 ) create a user on your linux machine say with > >> username > >> freebsd and some > >> password > >> 3 ) now copy the data in your /etc/passwd file of linux > >> machine to freebsd > >> machine And the /etc/passwd in Linux and System V [or all the old Unix systems] is not the same format as in BSD. > >> 4 ) Also copy the /etc/shadow file to freebsd server and > >> renmae it as > >> /etc/master.passwd I'm surprised you could even log in with that. > >> 5 ) Also copy /etc/groups Groups are used differently by default in BSD. Don't blindly apply Linux knowledge to BSD> > >> 6 ) Now try to login to freebsd machine with the new > >> user > >> created on the > >> linux machine. > >> Note : Please create a copy of the original file on > >> freebsd machine before > >> you change the real file And DO NOT LOG OUT - as you might not be able to log in again. Look at the file formats of BSD and Linux. You'll note extra fields. If you have separate passwd and shadow on Linux, you need to manipulate those before putting in BSD. You can simply cut and paste [using Unix cut/paste not a gui thing] to add the fields and put the encrypted portion of shadow where it belongs. And put that in master.passwd and USE VIPW - which will check the file. If master.passwd is correct when you exit vipw it will build /etc/passwd. I don't recall the script the other person posted, but the directions above are really wrong. Bill -- Bill Vermillion - bv @ wjv . com From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 18:07:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82D4A16A41F for ; Tue, 18 Oct 2005 18:07:36 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: from smtp105.sbc.mail.mud.yahoo.com (smtp105.sbc.mail.mud.yahoo.com [68.142.198.204]) by mx1.FreeBSD.org (Postfix) with SMTP id 0F37543D45 for ; Tue, 18 Oct 2005 18:07:35 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: (qmail 66028 invoked from network); 18 Oct 2005 17:36:04 -0000 Received: from unknown (HELO ?192.168.0.190?) (dr2867.business@pacbell.net@68.126.216.127 with plain) by smtp105.sbc.mail.mud.yahoo.com with SMTP; 18 Oct 2005 17:36:04 -0000 Message-ID: <43553287.4030907@pacbell.net> Date: Tue, 18 Oct 2005 10:36:07 -0700 From: Daniel Rudy User-Agent: Mozilla/5.0 (X11R6; UNIX; FreeBSD/i386 5.4-RELEASE-p7; en-US; ja-JP; rv:1.7.12) Gecko/20050915 MultiZilla/1.6.2.0c Mnenhy/0.7.2.0 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Accessing USB Mass Storage Device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 18:07:36 -0000 When the umass driver is compiled into the kernel, and one inserts a USB mass storage device, how does one access the device descriptors (serial number) while the device is listed as a da device? I would perfer to have the OS do all the work of accessing the hardware. But if it cannot be done, then I have the following questions: How does one read and write data to the device using /dev/ugen? I have a reasonable idea as to how something like that would work as the following steps illustrate: 1. open bulk descriptor in for read. 2. open bulk descriptor out for write. 3. send CBW read data to device via write. 4. read result from device via read. 5. read CSW from device. etc.. I have the standards documents on the SCSI commands, the USB data structures, and other information, but at this point, I'm kinda stuck. Will the above method work? Or is there something else that needs to be done to program data access against /dev/ugen? Or am I entirely wrong. I have tried using google, but I just keep getting back junk which is of little value. -- Daniel Rudy From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 18:37:45 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B6DCC16A41F; Tue, 18 Oct 2005 18:37:45 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1633A43D53; Tue, 18 Oct 2005 18:37:45 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3FE67.dip.t-dialin.net [84.163.254.103] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML21M-1ERwLI0FOx-00037q; Tue, 18 Oct 2005 20:37:44 +0200 From: Max Laier To: freebsd-current@freebsd.org Date: Tue, 18 Oct 2005 20:37:59 +0200 User-Agent: KMail/1.8.2 References: <200510061950.09760.max@love2party.net> In-Reply-To: <200510061950.09760.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510182038.05677.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-hackers@freebsd.org Subject: Re: Call for FreeBSD Status Reports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 18:37:45 -0000 On Thursday 06 October 2005 19:49, Max Laier wrote: > All, > > again three month went by and exiting stuff has happend in FreeBSD. Many > subtle bugs have been identified and fixed during the most productive > QA-work in preparation for FreeBSD 6.0 (now entering final RC-phase). The > Google Summer of Code has produced a lot of exiting projects; either > finished (most visibly the new website) or still worked on > enthusiastically. Work in HEAD is also taking off and promises to bring > even more exiting stuff for the future ... > > I am sure you have interesting things to share for this round and we are > looking forward to your reports. Please send status reports about your > project's progess between July and now to monthly@freebsd.org > > To help you with fileing your report you will find a webform[1] or > xml-template[2] linked from http://www.freebsd.org/news/status/ > > Submissions are due October 15. Thanks a lot, and we are hoping for a big > turn-out. Turn-out is okay, so far, but we would welcome some additional entries. If you have something to report, please do so by Thu 20 October - LAST CALL! Again, this is not limited to FreeBSD developers. We are also interested in other FreeBSD related projects. Thanks a lot! -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 00:08:22 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0C5816A41F for ; Wed, 19 Oct 2005 00:08:22 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CAC343D53 for ; Wed, 19 Oct 2005 00:08:22 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id EAB2DF5BB; Tue, 18 Oct 2005 20:08:21 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id 9E6B81A08C5; Tue, 18 Oct 2005 20:08:20 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17237.36468.589364.753870@canoe.dclg.ca> Date: Tue, 18 Oct 2005 20:08:20 -0400 X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid To: freebsd-hackers@freebsd.org Subject: Mutlicast interface limit. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 00:08:22 -0000 My reading of the the code in ip_mroute.h seems to imply that FreeBSD carries a maximum of 32 multicast interfaces by default. Is the correct? MAXVIFS? If I'm reading it correctly, it shouldn't be rocket science to extend this limit to 64 (u_int64_t). Will making it larger break some large number of things, or are those macros strictly used? In my case, with an OSPF router with potentially 100's of interfaces (tunnels), 32 and 64 are fairly low limits. Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can only be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================ From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 04:39:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AE3916A41F for ; Wed, 19 Oct 2005 04:39:46 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E244343D49 for ; Wed, 19 Oct 2005 04:39:45 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9J4bQUe033117; Tue, 18 Oct 2005 22:37:26 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 18 Oct 2005 22:38:45 -0600 (MDT) Message-Id: <20051018.223845.67882192.imp@bsdimp.com> To: dr2867@pacbell.net From: "M. Warner Losh" In-Reply-To: <43553287.4030907@pacbell.net> References: <43553287.4030907@pacbell.net> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 18 Oct 2005 22:37:27 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: Accessing USB Mass Storage Device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 04:39:46 -0000 In message: <43553287.4030907@pacbell.net> Daniel Rudy writes: : : When the umass driver is compiled into the kernel, and one inserts a USB : mass storage device, how does one access the device descriptors (serial : number) while the device is listed as a da device? I would perfer to : have the OS do all the work of accessing the hardware. The serial number can be obtained with devifo. However, since cam doesn't hook into the device tree, mapping da number to umass number can be tricky in the arbitrary case. devinfo -v | grep umass umass0 pnpinfo vendor=0x054c product=0x014d devclass=0x00 devsubclass=0x00 release=0x0110 sernum="0052450548137984" intclass=0x08 intsubclass= at port=0 interface=0 : How does one read and write data to the device using /dev/ugen? One can't. You can't have multiple drivers attach to the same hardware. They would interfere with each other unless there was some sort of time domain sharing of the device. Even that would be, ummm, challanging in the arbitrary general case (but I want to get the serial number of my disk that's mounted, why can't I do that?). Arbitrary sharing is tough to do. Since ugen is so arbitrary in what you can do with it, I don't imagine it would ever be implemented. Another option would be to do what we do with pci already, and have a small set of information that we can query the device in a non-distruptive (mostly) way and expand that to usb. The usb bus (well uhub, since it is the usb bus) would create device nodes that could be querried for standard information. We've started doing this with pccard and cardbus, so you can now get, eg, the CIS, the power states (well, that's in my mind/tree right now), etc. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 08:47:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7EFC16A41F; Wed, 19 Oct 2005 08:47:20 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A450043D5C; Wed, 19 Oct 2005 08:47:11 +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 1ES9bH-00050G-I4; Wed, 19 Oct 2005 10:47:07 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: Garance A Drosihn In-reply-to: Your message of Mon, 17 Oct 2005 22:07:22 -0400 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 19 Oct 2005 10:47:07 +0200 From: Danny Braniss Message-ID: Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org, kline@tao.thought.org Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 08:47:21 -0000 > At 1:25 PM -0600 10/17/05, M. Warner Losh wrote: > >In message: <20051017003501.GB41769@thought.org> > > Gary Kline writes: > >: vi was the first screen/cursor-based editor in computer > >: history. > > > >Are you sure about this? I was using screen oriented editors over a > >1200 baud dialup line in 1977 on a PDP-11 running RSTS/E on a Behive > >BH-100. Seems like one year from vi to being deployed at Berkeley to > >a completely different video editor being deployed on a completely > >different os in the schools that I used this in seems fast. So I did > >some digging. > > > >vi started in about 1976[1] as a project that grew out of the > >frustration taht a 200 line Pascal program was too big for the system > >to handle. These are based on recollections of Bill Joy in 1984. > > > >It appears that starting in 1972 Carl Mikkelson added screen editing > >features to TECO[2]. In 1974 Richard Stallman added macros to TECO. > >I don't know if Carl's work was the first, but it pre-dates the vi > >efforts. Other editors may have influanced Carl. Who knows. > > I arrived in RPI in 1975. In December of 1975, we were just trying > out a mainframe timesharing system called "Michigan Terminal System", > or "MTS", from the university of Michigan. The editor was called > 'edit', and was a Command Language Subsystem (CLS) in MTS. That > meant it had a command language of it's one. > > One of the sub-commands in edit was 'visual', for visual mode. It > only worked on IBM 3270-style terminals, but it was screen-based and > cursor-based. The editor would put a bunch of fields up on the > screen, some of which you could modify and some you couldn't. The > text of your file was in the fields you could type over. Once you > finished with whatever changes you wanted to make on that screen, you > would hit one of 15 or 20 interrupt-generating keys on the 3270 > terminal (12 of which were "programmable function keys", in a keypad > with a layout similar to the numeric keypad on current keyboards). > The 3270 terminal would then tell the mainframe which fields on the > screen had been modified, and what those modifications were. The > mainframe would update the file based on that info. > > I *THINK* the guy who wrote that was ... Bill Joy -- as a student at > UofM. I can't find any confirmation of that, though. The closest > I can come is the web page at http://www.jefallbright.net/node/3218 , > which is an article written by Bill. In it he mentions: > > By 1967, MTS was up and running on the newly arrived 360/67, > supporting 30 to 40 simultaneous users. ... > > By the time I arrived as an undergraduate at the University > of Michigan in 1971, MTS and Merit were successful and stable > systems. By that point, a multiprocessor system running MTS > could support a hundred simultaneous interactive users, ... > > But he doesn't happen to mention anything about editors or visual > mode. My memory of his connection to MTS's visual-mode could very > well be wrong, since I didn't come along until after visual-mode > already existed. I just remember his name coming up in later > discussions. However, I also think there was someone named Victor > who was part of the story of 3270 support in MTS. And Dave Twyver > at University of British Columbia was the guy who wrote the > 3270 DSR (Device Support Routine), as mentioned on the page at: > http://mtswiki.westwood-tech.com/mtswiki-index.php/Dave%20Twyver > > In any case, I *am* sure that MTS had a visual editor in December of > 1975, which puts before vi if vi started in 1976. Unfortunately, all > of the documentation of MTS lived in the EBCDIC world, and pretty > much disappeared when MTS did (in the late 1990's). > In my case, the first visual editor that worked under Unix was DED from the Australian Distro. it only worked on a VT100, but that's was what i had :-), then came emacs, so im one of the few that doesn't know vi. danny From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 16:13:12 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DC4B16A41F; Tue, 18 Oct 2005 16:13:12 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2257543D46; Tue, 18 Oct 2005 16:13:12 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms170.mailsrvcs.net ([192.168.1.3]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IOK00GHHCI5D911@vms044.mailsrvcs.net>; Tue, 18 Oct 2005 11:01:17 -0500 (CDT) Date: Tue, 18 Oct 2005 11:01:17 -0500 (CDT) From: Sergey Babkin To: rashmi ns , bugi@lists.redbrick.dcu.ie, freebsd-drivers@freebsd.org, freebsd-hackers@freebsd.org Message-id: <9974216.1129651277680.JavaMail.root@vms170.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailman-Approved-At: Wed, 19 Oct 2005 12:40:42 +0000 Cc: Subject: Re: help regarding : To recieve and tranmit packet th' an interface X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 16:13:12 -0000 >From: rashmi ns >Hello List-members, >we are writing a driver for HDLC-Controller We have coded upto some extent >and actully we are able to transmit and recieve a char buff in loopback >(from inside a driver). >But we want to tranmit/Rx a real packet in (mbuf structure) and test our >code .As it is a HDLC controller does'nt have std MAC ADDRRSS . How can i >actually achieve a packet transmition and reception .Are there some drivers >which does the same All the point-to-point interfaces don't have a MAC address. You don't need it since there is only one place to which you can write data, into the port. Well, the problems start when you want to establish X.25 connections. Then you use the X.25 address similarly to a MAC address. But since usually the X.25 connections are static, you set up your table of connections and the translation table between the target IP address and X.25 address, similar to ARP but static. -SB From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 18 17:45:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6521716A41F; Tue, 18 Oct 2005 17:45:57 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2D9E43D58; Tue, 18 Oct 2005 17:45:53 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.1/8.13.1) with ESMTP id j9IHjjYl055903; Tue, 18 Oct 2005 10:45:45 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.1/8.13.1/Submit) id j9IHjhAE055902; Tue, 18 Oct 2005 10:45:43 -0700 (PDT) (envelope-from kline) Date: Tue, 18 Oct 2005 10:45:42 -0700 From: Gary Kline To: "M. Warner Losh" Message-ID: <20051018174542.GA55767@thought.org> References: <4352D860.000002.03681@tide.yandex.ru> <20051017003501.GB41769@thought.org> <20051017.132532.48669838.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051017.132532.48669838.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 19 years of service to the Unix community X-Mailman-Approved-At: Wed, 19 Oct 2005 12:40:42 +0000 Cc: kline@tao.thought.org, freebsd-questions@freebsd.org, dsacode@yandex.ru, freebsd-hackers@freebsd.org Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 17:45:57 -0000 On Mon, Oct 17, 2005 at 01:25:32PM -0600, M. Warner Losh wrote: > In message: <20051017003501.GB41769@thought.org> > Gary Kline writes: > : vi was the first screen/cursor-based editor in computer > : history. > > Are you sure about this? I was using screen oriented editors over a > 1200 baud dialup line in 1977 on a PDP-11 running RSTS/E on a Behive > BH-100. Seems like one year from vi to being deployed at Berkeley to > a completely different video editor being deployed on a completely > different os in the schools that I used this in seems fast. So I did > some digging. > > vi started in about 1976[1] as a project that grew out of the > frustration taht a 200 line Pascal program was too big for the system > to handle. These are based on recollections of Bill Joy in 1984. > > It appears that starting in 1972 Carl Mikkelson added screen editing > features to TECO[2]. In 1974 Richard Stallman added macros to TECO. > I don't know if Carl's work was the first, but it pre-dates the vi > efforts. Other editors may have influanced Carl. Who knows. > You're probably right. I didn't know the diff between a computer and a washing machine until I was past 30; found out in 1977 and haven't looked back! My first editor was "ed" on V6, followed by ex, followed by vi circa June, 1978. Bill used to haul around print outs of the src to vi and csh (&c). I'd be hacking in FORTRAN and Bill would be working in things that we lightyears beyond me. Ideas inspire new ideas; concepts build upon one another. This integration and cross-fertilization helps all of us. OT, but that is why I see "software patents" as being not only selfish but self-defeating in the longer scope of things. Let me amend my prev->statement to read that "vi was among the first screen/cursor-based editors...." gary -- Gary Kline kline@thought.org www.thought.org Public service Unix From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 13:35:25 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40CAE16A475 for ; Wed, 19 Oct 2005 13:35:25 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: from smtp102.sbc.mail.mud.yahoo.com (smtp102.sbc.mail.mud.yahoo.com [68.142.198.201]) by mx1.FreeBSD.org (Postfix) with SMTP id 4948043D5A for ; Wed, 19 Oct 2005 13:35:14 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: (qmail 18597 invoked from network); 19 Oct 2005 13:35:13 -0000 Received: from unknown (HELO ?192.168.0.190?) (dr2867.business@pacbell.net@68.126.216.127 with plain) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 19 Oct 2005 13:35:13 -0000 Message-ID: <43564B98.9000803@pacbell.net> Date: Wed, 19 Oct 2005 06:35:20 -0700 From: Daniel Rudy User-Agent: Mozilla/5.0 (X11R6; UNIX; FreeBSD/i386 5.4-RELEASE-p7; en-US; ja-JP; rv:1.7.12) Gecko/20050915 MultiZilla/1.6.2.0c Mnenhy/0.7.2.0 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: "M. Warner Losh" References: <43553287.4030907@pacbell.net> <20051018.223845.67882192.imp@bsdimp.com> In-Reply-To: <20051018.223845.67882192.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Accessing USB Mass Storage Device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 13:35:25 -0000 At about the time of 10/18/2005 9:38 PM, M. Warner Losh stated the following: > In message: <43553287.4030907@pacbell.net> > Daniel Rudy writes: > : > : When the umass driver is compiled into the kernel, and one inserts a USB > : mass storage device, how does one access the device descriptors (serial > : number) while the device is listed as a da device? I would perfer to > : have the OS do all the work of accessing the hardware. > > The serial number can be obtained with devifo. However, since cam > doesn't hook into the device tree, mapping da number to umass number > can be tricky in the arbitrary case. > > devinfo -v | grep umass > umass0 pnpinfo vendor=0x054c product=0x014d devclass=0x00 devsubclass=0x00 release=0x0110 sernum="0052450548137984" intclass=0x08 intsubclass= at port=0 interface=0 > > : How does one read and write data to the device using /dev/ugen? > > One can't. You can't have multiple drivers attach to the same > hardware. They would interfere with each other unless there was some > sort of time domain sharing of the device. Even that would be, ummm, > challanging in the arbitrary general case (but I want to get the > serial number of my disk that's mounted, why can't I do that?). > Arbitrary sharing is tough to do. Since ugen is so arbitrary in what > you can do with it, I don't imagine it would ever be implemented. > > Another option would be to do what we do with pci already, and have a > small set of information that we can query the device in a > non-distruptive (mostly) way and expand that to usb. The usb bus > (well uhub, since it is the usb bus) would create device nodes that > could be querried for standard information. We've started doing this > with pccard and cardbus, so you can now get, eg, the CIS, the power > states (well, that's in my mind/tree right now), etc. > > Warner > > _______________________________________________ > 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" > Looking at the man page for devinfo(8), it also contains a reference to devinfo(3). When examining the information for devinfo(3), I have come to the conclusion that this is exactly what I was looking for. I noticed a blurb in the man page for devinfo(3) that the interface is subject to refinement? Are there any plans to alter this interface in future versions? Thank You. -- Daniel Rudy From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 15:15:10 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1120C16A41F for ; Wed, 19 Oct 2005 15:15:10 +0000 (GMT) (envelope-from molter@tin.it) Received: from ams-iport-1.cisco.com (ams-iport-1.cisco.com [144.254.224.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5860843D45 for ; Wed, 19 Oct 2005 15:15:08 +0000 (GMT) (envelope-from molter@tin.it) Received: from ams-core-1.cisco.com ([144.254.224.150]) by ams-iport-1.cisco.com with ESMTP; 19 Oct 2005 17:15:08 +0200 Received: from xbh-ams-332.emea.cisco.com (xbh-ams-332.cisco.com [144.254.231.87]) by ams-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id j9JFEYHf011466 for ; Wed, 19 Oct 2005 17:15:05 +0200 (MEST) Received: from xfe-ams-331.emea.cisco.com ([144.254.231.72]) by xbh-ams-332.emea.cisco.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 19 Oct 2005 17:15:00 +0200 Received: from barbapapa.cisco.com ([144.254.53.64]) by xfe-ams-331.emea.cisco.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 19 Oct 2005 17:15:00 +0200 Received: by barbapapa.cisco.com (Postfix, from userid 1000) id DE41732D; Wed, 19 Oct 2005 17:15:21 +0200 (CEST) From: Marco Molteni To: hackers@freebsd.org Date: Wed, 19 Oct 2005 17:15:21 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510191715.21582.molter@tin.it> X-OriginalArrivalTime: 19 Oct 2005 15:15:00.0370 (UTC) FILETIME=[DF836720:01C5D4BF] Cc: Subject: rc scripts: how to start a process that doesn't daemonize itself? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 15:15:10 -0000 Hi, I have a program that I would like to control via a rc script, say /usr/local/etc/rc.d/myprog problem is this program needs to be put explicitly in background. I was playing with things like command="/usr/sbin/daemon /usr/local/bin/myprog" but this obviously works only for the start case. Should I just override start() completely or is there a common way to do it? I don't think I can simply pass a "&" somewhere... thanks marco From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 15:30:43 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9B7116A420 for ; Wed, 19 Oct 2005 15:30:43 +0000 (GMT) (envelope-from ale@FreeBSD.org) Received: from andxor.it (relay.andxor.it [195.223.2.3]) by mx1.FreeBSD.org (Postfix) with SMTP id DAAF943D46 for ; Wed, 19 Oct 2005 15:30:40 +0000 (GMT) (envelope-from ale@FreeBSD.org) Received: (qmail 16317 invoked from network); 19 Oct 2005 15:30:38 -0000 Received: from unknown (HELO ?192.168.2.5?) (192.168.2.5) by andxor.it with SMTP; 19 Oct 2005 15:30:38 -0000 Message-ID: <4356669D.5050801@FreeBSD.org> Date: Wed, 19 Oct 2005 17:30:37 +0200 From: Alex Dupre User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Marco Molteni References: <200510191715.21582.molter@tin.it> In-Reply-To: <200510191715.21582.molter@tin.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: rc scripts: how to start a process that doesn't daemonize itself? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 15:30:43 -0000 Marco Molteni wrote: > Should I just override start() completely or is there a > common way to do it? I don't think I can simply pass a "&" somewhere... Oh, yes, you can: command_args="&" should do the work. -- Alex Dupre From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 15:37:01 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D1CB16A41F for ; Wed, 19 Oct 2005 15:37:01 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09F8443D6E for ; Wed, 19 Oct 2005 15:36:56 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j9JFataF090060; Wed, 19 Oct 2005 10:36:55 -0500 (CDT) (envelope-from dan) Date: Wed, 19 Oct 2005 10:36:55 -0500 From: Dan Nelson To: Marco Molteni Message-ID: <20051019153655.GB4225@dan.emsphone.com> References: <200510191715.21582.molter@tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510191715.21582.molter@tin.it> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: hackers@freebsd.org Subject: Re: rc scripts: how to start a process that doesn't daemonize itself? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 15:37:01 -0000 In the last episode (Oct 19), Marco Molteni said: > I have a program that I would like to control via a rc script, > say /usr/local/etc/rc.d/myprog > > problem is this program needs to be put explicitly in background. > > I was playing with things like > > command="/usr/sbin/daemon /usr/local/bin/myprog" > > but this obviously works only for the start case. > > Should I just override start() completely or is there a > common way to do it? I don't think I can simply pass a "&" somewhere... Try putting the "&" in command_args; that way it'll only be used during startup. I do that in some of my homegrown rc.d scripts. A (probably cleaner) way is to set start_cmd="/usr/sbin/daemon /usr/local/bin/myprog" -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 15:40:44 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CC3916A41F for ; Wed, 19 Oct 2005 15:40:44 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A6A243D4C for ; Wed, 19 Oct 2005 15:40:44 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9JFaniN068295; Wed, 19 Oct 2005 09:36:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 19 Oct 2005 09:38:08 -0600 (MDT) Message-Id: <20051019.093808.123396894.imp@bsdimp.com> To: alsbergt@cs.huji.ac.il From: "M. Warner Losh" In-Reply-To: <20051017143356.GA12188@zoopee.org> References: <20051017143356.GA12188@zoopee.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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 19 Oct 2005 09:36:50 -0600 (MDT) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to determine link of umass/da devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 15:40:44 -0000 In message: <20051017143356.GA12188@zoopee.org> Tom Alsberg writes: : With tools like usbdevs and sysctl, I can find out what USB devices : are connected, and also what USB drivers handle them (so I can see, : for example, that there is a SanDisk Cruzer Micro connected to port 2 : in bus 3 and the umass driver under it). You can find this out best via the devinfo interface. : I can also find out what da devices there are using camcontrol. Right. cam doesn't hook the da devices into the device tree. : However, how can I find out which da device was assigned to which : umass/usb device? Generally, you can't. There's not really an interface to get this information. devinfo assumes that things like disk drives would be in the device tree and except for cam, all other drivers conform to this world view. There's some efforts to update and lock cam which I think will rectify this. : I see this info in some inconvenient form in : dmesg. But I need something easier to handle programmatically to : write a program that uses that data. I prefer not to resort to some : ugly hack like trying to parse dmesg. Especially since dmesg can disapper quickly on some systems. : Also, I'd be interested if it were possible to have my program : informed when devices are connected/disconnected. Can a process ask : usbd to send it some signal and somehow provide the details of the : event when a device is connected/disconnected? devd provides a pipe of all events from the kernel in /var/run/devd.pipe. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 19:36:40 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5D9516A41F for ; Wed, 19 Oct 2005 19:36:40 +0000 (GMT) (envelope-from molter@tin.it) Received: from vsmtp1.tin.it (vsmtp1.tin.it [212.216.176.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59E9443D5A for ; Wed, 19 Oct 2005 19:36:39 +0000 (GMT) (envelope-from molter@tin.it) Received: from tortellino.codalunga (82.122.119.121) by vsmtp1.tin.it (7.2.060.1) (authenticated as molter@tin.it) id 43567E2D0001B191 for hackers@freebsd.org; Wed, 19 Oct 2005 21:36:35 +0200 Received: by tortellino.codalunga (Postfix, from userid 1001) id 3B83B8126; Wed, 19 Oct 2005 21:38:07 +0200 (CEST) Date: Wed, 19 Oct 2005 21:38:07 +0200 From: Marco Molteni To: hackers@freebsd.org Message-Id: <20051019213807.2b676e95.molter@tin.it> In-Reply-To: <20051019153655.GB4225@dan.emsphone.com> References: <200510191715.21582.molter@tin.it> <20051019153655.GB4225@dan.emsphone.com> X-Mailer: Sylpheed version 1.0.5 (GTK+ 1.2.10; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: Re: rc scripts: how to start a process that doesn't daemonize itself? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 19:36:41 -0000 On Wed, 19 Oct 2005 10:36:55 -0500 Dan Nelson wrote: > In the last episode (Oct 19), Marco Molteni said: > > I have a program that I would like to control via a rc script, > > say /usr/local/etc/rc.d/myprog > > > > problem is this program needs to be put explicitly in background. > > > > I was playing with things like > > > > command="/usr/sbin/daemon /usr/local/bin/myprog" > > > > but this obviously works only for the start case. > > > > Should I just override start() completely or is there a > > common way to do it? I don't think I can simply pass a "&" > > somewhere... > > Try putting the "&" in command_args; that way it'll only be used > during startup. I do that in some of my homegrown rc.d scripts. A > (probably cleaner) way is to set > > start_cmd="/usr/sbin/daemon /usr/local/bin/myprog" thanks to you and the others posters for the & trick. It works, but as you say it smells hackish. For one, it doesn't detach from the controlling tty. Not a big deal when run from init I think, but it may make a difference when run multiuser from a terminal (say myprog forcestart). anyway, better than nothing ;-) thanks again marco -- He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me. -- Thomas Jefferson From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 19:59:08 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EA3516A41F for ; Wed, 19 Oct 2005 19:59:08 +0000 (GMT) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9287D43D76 for ; Wed, 19 Oct 2005 19:59:06 +0000 (GMT) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.13.3/8.13.3) with ESMTP id j9JJx5ph067681; Wed, 19 Oct 2005 12:59:05 -0700 (PDT) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.13.3/8.13.3/Submit) id j9JJx4Sr067680; Wed, 19 Oct 2005 12:59:04 -0700 (PDT) (envelope-from steve) Message-Id: <200510191959.j9JJx4Sr067680@wattres.watt.com> X-Newsgroups: local.freebsd-hackers In-Reply-To: <4352D860.000002.03681@tide.yandex.ru> Organization: Watt Consultants From: steve@Watt.COM (Steve Watt) Date: Wed, 19 Oct 2005 12:59:04 -0700 X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: dsacode@yandex.ru X-Archived: 1129751945.601729645@wattres.Watt.COM Cc: hackers@freebsd.org Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 19:59:08 -0000 In article <4352D860.000002.03681@tide.yandex.ru> you write: >Hello, FreeBSD people. > >First thing to mention is that I'm very experienced Emacs user. I was using it [ snip reasons for becoming a VI user ] >and according to documentation it has powerful editing mechanism. It is. >So, my question goes to all FreeBSD hackers who uses `nvi' as their general >editor. Is it possible to do serious hacking with it? More accurate: I mostly use vim, not nvi. Reasons: - vim can do syntax highlighting. - vim does smart indentation "correctly" for my value of correctly. >* What programming features it support? (Does it have something like etags? >Does it have interface to gdb? And such other things..) Ctags originated with vi. I can't imagine why an editor should interface with gdb -- that's what other windows are for. >* Is it possible to use it comfortable with Dvorak layout? (I noticed some >bindings that relies on keys arrangement) I use a Dvorak keyboard all the time. It works just fine; your fingers have already learned the hard part. Besides, j and k are still next to each other, and I almost never use h or l for moving left/right (usually use space or W for right and 0 to go to beginning of line). >* How to setup it to standard FreeBSD C code indentation? And don't use >tabs as well. :set tabstop=8 shiftwidth=4 Use tabs. They're part of the FreeBSD standard, last I checked, but that's an area of religious discussion I try to avoid. >It's hard choice for me to switch old good Emacs to something new, so please >give me your opinions. I've tried emacs several times, and keep going back to vi because I don't like hitting so many modifier keys. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9" Internet: steve @ Watt.COM Whois: SW32 Free time? There's no such thing. It just comes in varying prices... From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 20:27:39 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 099E516A41F for ; Wed, 19 Oct 2005 20:27:39 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46AC343D6A for ; Wed, 19 Oct 2005 20:27:37 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail05.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j9JKRXuS011668 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 20 Oct 2005 06:27:36 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id j9JKRXHh020522; Thu, 20 Oct 2005 06:27:33 +1000 (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 j9JKRXT1020521; Thu, 20 Oct 2005 06:27:33 +1000 (EST) (envelope-from pjeremy) Date: Thu, 20 Oct 2005 06:27:32 +1000 From: Peter Jeremy To: Steve Watt Message-ID: <20051019202732.GJ7346@cirb503493.alcatel.com.au> References: <4352D860.000002.03681@tide.yandex.ru> <200510191959.j9JJx4Sr067680@wattres.watt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510191959.j9JJx4Sr067680@wattres.watt.com> User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org Subject: Re: nvi for serious hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 20:27:39 -0000 On Wed, 2005-Oct-19 12:59:04 -0700, Steve Watt wrote: >In article <4352D860.000002.03681@tide.yandex.ru> you write: >>Does it have interface to gdb? And such other things..) ... >I can't imagine why an editor should interface with gdb -- that's what >other windows are for. When stepping through code, it's nice to have the current line and surrounding context automatically displayed (without clogging up your gdb session with an extra 10-20 lines of output for each step). It's also nice to able to scroll back through your entire debugging session. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 01:49:25 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A882616A41F for ; Thu, 20 Oct 2005 01:49:25 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59D0F43D66 for ; Thu, 20 Oct 2005 01:49:25 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 2A47E46B7F; Wed, 19 Oct 2005 21:49:24 -0400 (EDT) Date: Thu, 20 Oct 2005 02:49:23 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Marco Molteni In-Reply-To: <20051019213807.2b676e95.molter@tin.it> Message-ID: <20051020024753.M98055@fledge.watson.org> References: <200510191715.21582.molter@tin.it> <20051019153655.GB4225@dan.emsphone.com> <20051019213807.2b676e95.molter@tin.it> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: rc scripts: how to start a process that doesn't daemonize itself? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 01:49:25 -0000 On Wed, 19 Oct 2005, Marco Molteni wrote: >> Try putting the "&" in command_args; that way it'll only be used during >> startup. I do that in some of my homegrown rc.d scripts. A (probably >> cleaner) way is to set >> >> start_cmd="/usr/sbin/daemon /usr/local/bin/myprog" > > thanks to you and the others posters for the & trick. > > It works, but as you say it smells hackish. For one, it doesn't detach > from the controlling tty. Not a big deal when run from init I think, but > it may make a difference when run multiuser from a terminal (say myprog > forcestart). > > anyway, better than nothing ;-) The daemon(8) page claims it detaches from the tty. You may also want to use the -f argument to redirect stdio. If it isn't working properly, please file a PR, thanks! Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 02:59:50 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C34FE16A41F for ; Thu, 20 Oct 2005 02:59:50 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2307E43D62 for ; Thu, 20 Oct 2005 02:59:49 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp246-46.lns2.adl2.internode.on.net [203.122.246.46]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j9K2xbbq035657 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Thu, 20 Oct 2005 12:29:39 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: "Jerry" Date: Thu, 20 Oct 2005 12:29:34 +0930 User-Agent: KMail/1.8.2 References: <007001c5d3f3$515c14f0$7501a8c0@DHR3D981> In-Reply-To: <007001c5d3f3$515c14f0$7501a8c0@DHR3D981> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3104752.CTMeyReQv1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510201229.35422.doconnor@gsoft.com.au> X-Spam-Score: 0.05 () FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: adding new device to base system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 02:59:50 -0000 --nextPart3104752.CTMeyReQv1 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wed, 19 Oct 2005 00:20, Jerry wrote: > I reinstalled FreeBSD 5.4. It works now. I may have broken something > earlier. A reinstall is a bit agressive.. You could have just re-cvsup'd your source tree. > -----Original Message----- > From: Daniel O'Connor [mailto:doconnor@gsoft.com.au] > Sent: Monday, October 17, 2005 6:09 PM > To: freebsd-hackers@freebsd.org > Cc: jerry@evasefor.com > Subject: Re: adding new device to base system > > On Tue, 18 Oct 2005 02:22, jerry@evasefor.com wrote: > > /usr/src/sys/i386/conf/TARTAR ../../conf/files: FreeBSD: must be > > count, optional, mandatory or standard > > *** Error code 1 > > > > Stop in /usr/src. > > *** Error code 1 > > > > Stop in /usr/src. > > Looks like you broke sys/conf/files somehow. > Do a cvs diff on it and post it here. > > -- > Daniel O'Connor software and network engineer for Genesis Software - > http://www.gsoft.com.au "The nice thing about standards is that there are > so many of them to choose from." > -- Andrew Tanenbaum > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D-=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 --nextPart3104752.CTMeyReQv1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDVwgX5ZPcIHs/zowRApKDAJsHLZQH1rr0j64XXPbz4yyt4mX5HgCdGPcP u0pYAq+zhdruqPqnlNYntXE= =57bg -----END PGP SIGNATURE----- --nextPart3104752.CTMeyReQv1-- From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 04:08:59 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF31516A41F for ; Thu, 20 Oct 2005 04:08:59 +0000 (GMT) (envelope-from dmw@unete.cl) Received: from qmail0.ifxnetworks.com (qmail0.ifxnetworks.com [200.110.128.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A35843D5A for ; Thu, 20 Oct 2005 04:08:59 +0000 (GMT) (envelope-from dmw@unete.cl) Received: (qmail 17917 invoked from network); 20 Oct 2005 04:08:58 -0000 X-Spam-DCC: EATSERVER: qmail0.ifxnetworks.com 1166; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on qmail0.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.5 tests=none autolearn=disabled version=3.1.0 Received: from unknown (HELO daemon.unete.cl) ([200.73.82.96]) (envelope-sender ) by qmail0.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 20 Oct 2005 04:08:46 -0000 Received: from daemon.unete.cl (null@localhost.daemon.cl [127.0.0.1]) by daemon.unete.cl (8.13.3/8.13.1) with ESMTP id j9K493aB021906 for ; Thu, 20 Oct 2005 01:09:03 -0300 (CLST) (envelope-from dmw@unete.cl) Received: (from dmw@localhost) by daemon.unete.cl (8.13.3/8.13.1/Submit) id j9K492Ls021903 for hackers@freebsd.org; Thu, 20 Oct 2005 01:09:02 -0300 (CLST) (envelope-from dmw@unete.cl) X-Authentication-Warning: daemon.unete.cl: dmw set sender to dmw@unete.cl using -f Date: Thu, 20 Oct 2005 01:09:02 -0300 From: Daniel Molina Wegener To: FreeBSD Hackers Message-ID: <20051020040902.GA21873@daemon.unete.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: mensaje Content-Disposition: inline Organization: DMW Cc: Subject: Which branch? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Molina Wegener List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 04:08:59 -0000 Hello, My computer is running with FreeBSD 5.4-STABLE. I've tried updating the source tree with RELENG_5, but I get some compile time errors. Is the RELENG_5 branch abandoned? Also, I must download the RELENG_6 branch (6-STABLE) and contribute to this branch?. Thanks... Regards -- . 0 . | Daniel Molina Wegener . . 0 | dmw at unete dot cl 0 0 0 | FreeBSD Power User From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 04:17:10 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A97B16A41F for ; Thu, 20 Oct 2005 04:17:10 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D87843D62 for ; Thu, 20 Oct 2005 04:17:09 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j9K4H9bg023836; Wed, 19 Oct 2005 21:17:09 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j9K4H9gs023835; Wed, 19 Oct 2005 21:17:09 -0700 Date: Wed, 19 Oct 2005 21:17:09 -0700 From: Brooks Davis To: Daniel Molina Wegener Message-ID: <20051020041709.GC22319@odin.ac.hmc.edu> References: <20051020040902.GA21873@daemon.unete.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051020040902.GA21873@daemon.unete.cl> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: FreeBSD Hackers Subject: Re: Which branch? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 04:17:10 -0000 On Thu, Oct 20, 2005 at 01:09:02AM -0300, Daniel Molina Wegener wrote: > > Hello, > > My computer is running with FreeBSD 5.4-STABLE. I've tried > updating the source tree with RELENG_5, but I get some compile > time errors. > > Is the RELENG_5 branch abandoned? No. We can't help you with your errors though unless you tell use what they are. > Also, I must download the RELENG_6 branch (6-STABLE) and contribute > to this branch?. You don't have to, but you might want to. It's got improvements and is clearly the way forward. -- Brooks From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 04:22:26 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE96416A41F for ; Thu, 20 Oct 2005 04:22:26 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from mail.rdu.kirov.ru (ns.rdu.kirov.ru [217.9.151.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C5F943D81 for ; Thu, 20 Oct 2005 04:22:21 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from kirov.so-cdu.ru (kirov [172.21.81.1]) by mail.rdu.kirov.ru (Postfix) with ESMTP id F37C3FEC7 for ; Thu, 20 Oct 2005 08:22:18 +0400 (MSD) Received: from kirov.so-cdu.ru (localhost [127.0.0.1]) by rdu.kirov.ru (Postfix) with SMTP id E06E015C9E for ; Thu, 20 Oct 2005 08:22:18 +0400 (MSD) Received: by rdu.kirov.ru (Postfix, from userid 1014) id C23DF15C9D; Thu, 20 Oct 2005 08:22:18 +0400 (MSD) Received: from [172.21.81.52] (elsukov.kirov.so-cdu.ru [172.21.81.52]) by rdu.kirov.ru (Postfix) with ESMTP id 9453C15C94 for ; Thu, 20 Oct 2005 08:22:18 +0400 (MSD) Message-ID: <43571B7B.7030804@yandex.ru> Date: Thu, 20 Oct 2005 08:22:19 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.0.6 (FreeBSD/20050716) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: export nullfs via NFS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bu7cher@yandex.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 04:22:26 -0000 Hi, All! I want to export folder with very long pathname via NFS. This is inconvenient. I try to mount this folder into other folder with shorter pathname through nullfs. But nullfs can not be exported via NFS. I have made the small patch for mountd and nullfs that allow export nullfs. But i have one problem :) When i mount the remote file system, i can't work with it, i get the input/output error. What i can do for export nullfs via NFS? Patch can be found here: http://butcher.heavennet.ru/nullfs_export/ -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 04:36:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4196616A41F for ; Thu, 20 Oct 2005 04:36:46 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDE3543D64 for ; Thu, 20 Oct 2005 04:36:45 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from fw.home (pcp05405355pcs.norstn01.pa.comcast.net[68.81.66.212]) by comcast.net (rwcrmhc12) with SMTP id <20051020043645014006t16be>; Thu, 20 Oct 2005 04:36:45 +0000 Received: (qmail 7020 invoked from network); 20 Oct 2005 04:36:44 -0000 Received: from kris.home (f193b53bfd7ee2cfdc610ac00f3441d5@192.168.0.251) by fw.home with SMTP; 20 Oct 2005 04:36:44 -0000 Received: (qmail 49220 invoked by uid 1000); 20 Oct 2005 04:36:44 -0000 Date: Thu, 20 Oct 2005 00:36:44 -0400 From: Kris Maglione To: freebsd-hackers@freebsd.org Message-ID: <20051020043644.GB38525@kris.home> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: USB mouse problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 04:36:46 -0000 I've had a Gyration USB keyboard/mouse combo for a few years, and haven't used the mouse, simply because it didn't work with FreeBSD. I've finally gotten around to trying to do something about that. Both the mouse and keyboard are recognized. The problem is that all input is ignored unless the middle mouse button is depressed. In that case, though, the input is garbled... There are spurious button events and the x/y/z axes seemingly random values. y/z tend to stay around the same number, though those numbers change each time that ums is attached. I've found where the input is disguarded, in ums.c:447 (RELENG_5 tag) ibuf = sc->sc_ibuf; /* * The M$ Wireless Intellimouse 2.0 sends 1 extra leading byte of * data compared to most USB mice. This byte frequently switches * from 0x01 (usual state) to 0x02. I assume it is to allow * extra, non-standard, reporting (say battery-life). However * at the same time it generates a left-click message on the button * byte which causes spurious left-click's where there shouldn't be. * This should sort that. * Currently it's the only user of UMS_T so use it as an identifier. * We probably should switch to some more official quirk. */ if (sc->flags & UMS_T) { if (sc->sc_iid) { if (*ibuf++ == 0x02) return; } } else { if (sc->sc_iid) { if (*ibuf++ != sc->sc_iid) // Returns here return; } } It returns in the else block as labeled by the comment. The value of *ibuf (i.e. sc->sc_ibuf[0]) is always 0x00 and sc->sc_iid is always 0x04. With the wheel down, they're both 0x04. If I comment out the return line, I get the same garbled data that I get with the wheel button down. In that case, though, the x access movement values are more or less accurate. This seems to me like the problems caused by setting the wrong protocol for ps/2/serial mice, but you can't choose the protocol for USB mice. Any help on the matter would be appreciated. I have debugging output also, if that would help. Here's what I get on ums attach: > ums0: Gyration GyroPoint RF Technology Receiver, rev 1.10/1.20, addr 2, iclass > 3 > /1 > ums0: 7 buttons and Z dir. > ums_attach: sc=0xc1faa000 > ums_attach: X 8/8 > ums_attach: Y 16/8 > ums_attach: Z 24/8 > ums_attach: B1 0/1 > ums_attach: B2 1/1 > ums_attach: B3 2/1 > ums_attach: B4 3/1 > ums_attach: B5 4/1 > ums_attach: B6 32/1 > ums_attach: B7 33/1 > ums_attach: size=15, id=4 Thanks -- Kris Maglione If you are already in a hole, there's no use to continue digging. From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 05:05:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6703E16A41F for ; Thu, 20 Oct 2005 05:05:36 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [63.240.77.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 052F643D5A for ; Thu, 20 Oct 2005 05:05:35 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from fw.home (pcp05405355pcs.norstn01.pa.comcast.net[68.81.66.212]) by comcast.net (sccrmhc13) with SMTP id <20051020050524013003gv2ne>; Thu, 20 Oct 2005 05:05:30 +0000 Received: (qmail 10431 invoked from network); 20 Oct 2005 05:05:24 -0000 Received: from kris.home (9b0d6c6d2d7a731a6e9299acb3526cb5@192.168.0.251) by fw.home with SMTP; 20 Oct 2005 05:05:24 -0000 Received: (qmail 51074 invoked by uid 1000); 20 Oct 2005 05:05:24 -0000 Date: Thu, 20 Oct 2005 01:05:24 -0400 From: Kris Maglione To: freebsd-hackers@freebsd.org Message-ID: <20051020050524.GA50821@kris.home> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20051020043644.GB38525@kris.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20051020043644.GB38525@kris.home> User-Agent: Mutt/1.4.2.1i Subject: Re: USB mouse problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 05:05:36 -0000 I guess I shouldn't post to this list so late at night... The ++ part of *ibuf++ just hit me. Replacing if (sc->sc_iid) with if (0 && ...) fixes the whole problem. I'd still like to find a way to fix this permanantly. -- Kris Maglione Whatever can go to New York, will. From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 07:14:47 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86B9716A41F; Thu, 20 Oct 2005 07:14:47 +0000 (GMT) (envelope-from molter@tin.it) Received: from ams-iport-1.cisco.com (ams-iport-1.cisco.com [144.254.224.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1DBD43D5A; Thu, 20 Oct 2005 07:14:46 +0000 (GMT) (envelope-from molter@tin.it) Received: from ams-core-1.cisco.com ([144.254.224.150]) by ams-iport-1.cisco.com with ESMTP; 20 Oct 2005 09:14:45 +0200 Received: from xbh-ams-332.emea.cisco.com (xbh-ams-332.cisco.com [144.254.231.87]) by ams-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id j9K7EXHJ021613; Thu, 20 Oct 2005 09:14:43 +0200 (MEST) Received: from xfe-ams-332.cisco.com ([144.254.231.73]) by xbh-ams-332.emea.cisco.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 20 Oct 2005 09:14:42 +0200 Received: from barbapapa.cisco.com ([144.254.53.64]) by xfe-ams-332.cisco.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 20 Oct 2005 00:14:41 -0700 Received: by barbapapa.cisco.com (Postfix, from userid 1000) id 2EF84107; Thu, 20 Oct 2005 09:15:03 +0200 (CEST) From: Marco Molteni To: Robert Watson Date: Thu, 20 Oct 2005 09:15:02 +0200 User-Agent: KMail/1.8.2 References: <200510191715.21582.molter@tin.it> <20051019213807.2b676e95.molter@tin.it> <20051020024753.M98055@fledge.watson.org> In-Reply-To: <20051020024753.M98055@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510200915.02869.molter@tin.it> X-OriginalArrivalTime: 20 Oct 2005 07:14:41.0900 (UTC) FILETIME=[F0C79AC0:01C5D545] Cc: hackers@freebsd.org Subject: Re: rc scripts: how to start a process that doesn't daemonize itself? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 07:14:47 -0000 On Thursday 20 October 2005 03:49, Robert Watson wrote: > On Wed, 19 Oct 2005, Marco Molteni wrote: > >> Try putting the "&" in command_args; that way it'll only be used > >> during startup. I do that in some of my homegrown rc.d scripts. > >> A (probably cleaner) way is to set > >> > >> start_cmd="/usr/sbin/daemon /usr/local/bin/myprog" > > > > thanks to you and the others posters for the & trick. > > > > It works, but as you say it smells hackish. For one, it doesn't > > detach from the controlling tty. Not a big deal when run from init > > I think, but it may make a difference when run multiuser from a > > terminal (say myprog forcestart). > > > > anyway, better than nothing ;-) > > The daemon(8) page claims it detaches from the tty. You may also > want to use the -f argument to redirect stdio. If it isn't working > properly, please file a PR, thanks! Robert, we are actually saying the same thing ;-). I was comparing the & (backgroud) approach done with command_args="&" to the daemon approach done with start_cmd="/usr/sbin/daemon /usr/local/bin/myprog" Maybe it wasn't clear from the quoted context. marco From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 09:19:10 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3339416A41F for ; Thu, 20 Oct 2005 09:19:10 +0000 (GMT) (envelope-from apivovarov@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id B70E843D6A for ; Thu, 20 Oct 2005 09:19:09 +0000 (GMT) (envelope-from apivovarov@gmail.com) Received: by zproxy.gmail.com with SMTP id 40so47567nzk for ; Thu, 20 Oct 2005 02:19:09 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=roSjT2Iax9OWQXfBkwIOBdJdHoGDztzKCQWgMCr6VG/RL7ODqz1yQdYbaIJ9IgB/ZV33m5zHhI9g9vGIS6jQAPpzUaU6u0W+ixuiDnA9iUNziPYGijsC0kBjCJDJXwC+v66o9VI2Ac9ywYSboYbTe3BdpnvMTX1U3plQnZ6BwOQ= Received: by 10.36.121.6 with SMTP id t6mr326990nzc; Thu, 20 Oct 2005 02:19:09 -0700 (PDT) Received: by 10.36.118.6 with HTTP; Thu, 20 Oct 2005 02:19:09 -0700 (PDT) Message-ID: <426b510c0510200219q78b278e9if878cb5c8768edc8@mail.gmail.com> Date: Thu, 20 Oct 2005 13:19:09 +0400 From: Alex Pivovarov To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Backtrace (Computer reboots after printing CUPS test page on HP LaserJet 1010 USB) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 09:19:10 -0000 #Description After printing CUPS test page from "lynx localhost:631" I get an error described below and my computer halts. I get this error quite regulary after printing smth through CUPS (not always but aprox. 50/50). ---------------------------------------------------------------------------= ------ #uname st1# uname -a FreeBSD st1.fqdn 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Wed Oct 19 20:52:56 MSD 2005 root@st1.fqdn:/usr/src/sys/i386/compile/st1deb i386 ---------------------------------------------------------------------------= ------ #backtrace st1# kgdb kernel.debug.4 vmcore.4 [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you ar= e welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd". #0 doadump () at pcpu.h:159 159 pcpu.h: No such file or directory. in pcpu.h (kgdb) where #0 doadump () at pcpu.h:159 #1 0xc0501662 in boot (howto=3D260) at ../../../kern/kern_shutdown.c:410 #2 0xc0501928 in panic (fmt=3D0xc067a977 "from debugger") at ../../../kern/kern_shutdown.c:566 #3 0xc045fd91 in db_panic (addr=3D-1068810355, have_addr=3D0, count=3D-1, modif=3D0xd5221acc "") at ../../../ddb/db_command.c:435 #4 0xc045fd28 in db_command (last_cmdp=3D0xc06d3584, cmd_table=3D0x0, aux_cmd_tablep=3D0xc06a2c34, aux_cmd_tablep_end=3D0xc06a2c38) at ../../../ddb/db_command.c:349 #5 0xc045fdf0 in db_command_loop () at ../../../ddb/db_command.c:455 #6 0xc0461985 in db_trap (type=3D12, code=3D0) at ../../../ddb/db_main.c:2= 21 #7 0xc0518cca in kdb_trap (type=3D12, code=3D0, tf=3D0xd5221c5c) at ../../../kern/subr_kdb.c:468 #8 0xc0653fc9 in trap_fatal (frame=3D0xd5221c5c, eva=3D0) at ../../../i386/i386/trap.c:812 #9 0xc0653d4f in trap_pfault (frame=3D0xd5221c5c, usermode=3D0, eva=3D0) at ../../../i386/i386/trap.c:735 #10 0xc065396d in trap (frame=3D {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D -1068836304, tf_esi =3D -1050102144, tf_ebp =3D -719184740, tf_isp =3D -719184760, tf_eb= x =3D -1050102144, tf_edx =3D 0, tf_ecx =3D -1050102096, tf_eax =3D 0, tf_tra= pno =3D 12, tf_err =3D 2, tf_eip =3D -1068810355, tf_cs =3D 8, tf_eflags =3D 66= 118, tf_esp =3D -719184696, tf_ss =3D -1068836258}) at ../../../i386/i386/trap.c:425 #11 0xc064416a in calltrap () at ../../../i386/i386/exception.s:140 #12 0x00000018 in ?? () #13 0x00000010 in ?? () #14 0x00000010 in ?? () #15 0xc04ada30 in ulpt_read_cb () at ../../../dev/usb/ulpt.c:822 #16 0xc04ada5e in ulpt_tick (xsc=3D0x10246) at ../../../dev/usb/ulpt.c:835 #17 0xc050d4de in softclock (dummy=3D0x0) at ../../../kern/kern_timeout.c:2= 79 #18 0xc04ed98d in ithread_loop (arg=3D0xc15de280) at ../../../kern/kern_intr.c:547 #19 0xc04ecc20 in fork_exit (callout=3D0xc04ed83c , arg=3D0xc15de280, frame=3D0xd5221d48) at ../../../kern/kern_fork.c:791 #20 0xc06441cc in fork_trampoline () at ../../../i386/i386/exception.s:209 (kgdb) Quit #Fatal trap ---------------------------------------------------------- Fatal trap 12: page fault while in kernel mode fault virtual adress =3D 0x0 fault code =3D supervisor write, page not present instruction pointer =3D 0x8:0xc05b5df9 stack pointer =3D 0x10:0xe33a5c9c frame pointer =3D 0x10:0xe33a5c9c code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, def32 1, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 28 (swi5: clock sio) trap number =3D 12 panic: page fault Uptime: 1m5s ----------------------------------------------------------------- or this one ----------------------------------------------------------------- Fatal trap 12: page fault while in kernel mode fault virtual adress =3D 0x0 fault code =3D supervisor write, page not present instruction pointer =3D 0x8:0xc05b5df9 stack pointer =3D 0x10:0xe4de6c9c frame pointer =3D 0x10:0xe4de6c9c code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, def32 1, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 36 (swi5: clock sio) trap number =3D 12 panic: page fault Uptime: 2m59s ------------------------------------------------------------------ #Comp configuration: soft: FreeBSD 5.4-RELEASE #2 Kernel: GENERIC cups-1.1.23.0 cups-base-1.1.23.0_4 cups-lpr-1.1.23.0 cups-pstoraster-8.15 ghostscript-gnu-7.07_13 ghostview-1.5 gsfonts-8.11_2 hardware: CPU: AMD Athlon(tm) XP 1800+ (1531.03-MHz 686-class CPU) (not overclocked) Chipset: nVidia nForce 2 RAM: 512MB DDR400 (checked by memtest86 v.3.2 - no errors) Printer: HP LaserJet 1010 USB From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 10:32:03 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4707F16A41F for ; Thu, 20 Oct 2005 10:32:03 +0000 (GMT) (envelope-from abalan@bitdefender.com) Received: from mail.bitdefender.com (ns.bitdefender.com [217.156.83.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A9E943D64 for ; Thu, 20 Oct 2005 10:32:01 +0000 (GMT) (envelope-from abalan@bitdefender.com) Received: (qmail 26787 invoked by uid 1010); 20 Oct 2005 13:17:57 +0300 Content-Type: multipart/mixed; boundary="=-bd-boundary-MClmG1GIk1EF1W8G" Mime-Version: 1.0 Received: from ns.bitdefender.com (HELO abalan.dsd.ro) (217.156.83.1) by mail.bitdefender.com with SMTP; 20 Oct 2005 13:17:57 +0300 Received: from localhost.dsd.ro (localhost.dsd.ro [127.0.0.1]) by abalan.dsd.ro (Postfix) with ESMTP id 5FD6416A403 for ; Thu, 20 Oct 2005 13:34:52 +0300 (EEST) From: Alexandru Balan To: freebsd-hackers@freebsd.org Date: Thu, 20 Oct 2005 13:34:51 +0300 Message-Id: <1129804491.1092.23.camel@abalan.dsd.ro> X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port X-BitDefender-SpamStamp: 1.1.4 049000040111 X-BitDefender-Scanner: Clean, Agent: BitDefender Qmail 1.6.2 on mail.bitdefender.com X-BitDefender-Spam: No (0) Subject: iwi0: could not allocate firmware DMA memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 10:32:03 -0000 This is a multipart message in MIME format, containing the original message body and a footer added by BitDefender --=-bd-boundary-MClmG1GIk1EF1W8G Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-PBtlZA+p5JE/gjPp66YJ" --=-PBtlZA+p5JE/gjPp66YJ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello everyone,=20 I'm running 6.0-RC1 and have compiled if_iwi as a module. Whenever i try loading the firmware or doing ifconfig iwi0 up, after loading the firmware i get the following messages from the kernel:=20 Oct 20 13:18:27 kernel: iwi0: could not allocate firmware DMA memory Oct 20 13:18:27 kernel: iwi0: could not load main firmware Hence, nothing whatsoever works regarding my wireless card :( Machine specs: Dell Latitude D505, with Intel(R) PRO/Wireless 2200BG Anybody care to give an insight on this ? -- Jay --=-PBtlZA+p5JE/gjPp66YJ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDV3LLDK3n/S1e+fYRAmT1AJ4wNNJo8Fooc4CSatwQRr0ZZ48BBgCfTkhH Gmo8U1N0y3uSC+VQBlWuwBc= =35qO -----END PGP SIGNATURE----- --=-PBtlZA+p5JE/gjPp66YJ-- --=-bd-boundary-MClmG1GIk1EF1W8G Content-Type: text/plain; name="BitDefender.txt" Content-Disposition: inline; filename="BitDefender.txt" -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://www.bitdefender.com/ --=-bd-boundary-MClmG1GIk1EF1W8G-- From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 10:58:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4221016A423 for ; Thu, 20 Oct 2005 10:58:13 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from ant.bwct.de (ant.bwct.de [85.159.14.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7773443D62 for ; Thu, 20 Oct 2005 10:58:12 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by ant.bwct.de (8.12.11/8.12.11) with ESMTP id j9KAvaBb026356; Thu, 20 Oct 2005 12:57:36 +0200 (CEST) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id j9KAvWsD012640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Oct 2005 12:57:33 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id j9KAvWEC031997; Thu, 20 Oct 2005 12:57:32 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id j9KAvUAY031996; Thu, 20 Oct 2005 12:57:30 +0200 (CEST) (envelope-from ticso) Date: Thu, 20 Oct 2005 12:57:30 +0200 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20051020105729.GB31913@cicely12.cicely.de> References: <20051017143356.GA12188@zoopee.org> <20051019.093808.123396894.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051019.093808.123396894.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: freebsd-hackers@freebsd.org, alsbergt@cs.huji.ac.il Subject: Re: How to determine link of umass/da devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 20 Oct 2005 10:58:13 -0000 On Wed, Oct 19, 2005 at 09:38:08AM -0600, M. Warner Losh wrote: > In message: <20051017143356.GA12188@zoopee.org> > Tom Alsberg writes: > : With tools like usbdevs and sysctl, I can find out what USB devices > : are connected, and also what USB drivers handle them (so I can see, > : for example, that there is a SanDisk Cruzer Micro connected to port 2 > : in bus 3 and the umass driver under it). > > You can find this out best via the devinfo interface. > > : I can also find out what da devices there are using camcontrol. > > Right. cam doesn't hook the da devices into the device tree. > > : However, how can I find out which da device was assigned to which > : umass/usb device? > > Generally, you can't. There's not really an interface to get this > information. devinfo assumes that things like disk drives would be in > the device tree and except for cam, all other drivers conform to this > world view. There's some efforts to update and lock cam which I think > will rectify this. Not absolutely technicaly correct, but currently one can savely assume that the umass-sim number from camcontrol devlist -v is identic with the umass number from devinfo. This assumption likely won't hold forever. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 11:04:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B051B16A41F for ; Thu, 20 Oct 2005 11:04:44 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from ant.bwct.de (ant.bwct.de [85.159.14.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE4BC43D88 for ; Thu, 20 Oct 2005 11:04:37 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by ant.bwct.de (8.12.11/8.12.11) with ESMTP id j9KB4WJm022569; Thu, 20 Oct 2005 13:04:33 +0200 (CEST) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id j9KB4URI012667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Oct 2005 13:04:30 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id j9KB4TUD032023; Thu, 20 Oct 2005 13:04:29 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id j9KB4SfY032022; Thu, 20 Oct 2005 13:04:28 +0200 (CEST) (envelope-from ticso) Date: Thu, 20 Oct 2005 13:04:28 +0200 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20051020110428.GC31913@cicely12.cicely.de> References: <43553287.4030907@pacbell.net> <20051018.223845.67882192.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051018.223845.67882192.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: freebsd-hackers@freebsd.org, dr2867@pacbell.net Subject: Re: Accessing USB Mass Storage Device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 20 Oct 2005 11:04:44 -0000 On Tue, Oct 18, 2005 at 10:38:45PM -0600, M. Warner Losh wrote: > In message: <43553287.4030907@pacbell.net> > Daniel Rudy writes: > : > : When the umass driver is compiled into the kernel, and one inserts a USB > : mass storage device, how does one access the device descriptors (serial > : number) while the device is listed as a da device? I would perfer to > : have the OS do all the work of accessing the hardware. > > The serial number can be obtained with devifo. However, since cam > doesn't hook into the device tree, mapping da number to umass number > can be tricky in the arbitrary case. > > devinfo -v | grep umass > umass0 pnpinfo vendor=0x054c product=0x014d devclass=0x00 devsubclass=0x00 release=0x0110 sernum="0052450548137984" intclass=0x08 intsubclass= at port=0 interface=0 This is the USB serial number, there might even exist another one at CAM device layer. e.g.: [108]cicely13# camcontrol inquiry -n da -u 1 pass1: Removable Direct Access SCSI-2 device pass1: Serial Number ST92163-2000 pass1: 1.000MB/s transfers [110]cicely13# devinfo -v | grep umass0 umass0 pnpinfo vendor=0x0483 product=0x1307 devclass=0x00 devsubclass=0x00 sernum="4710765066451" interface=0 intclass=0x08 intsubclass=0x06 at port=1 -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 11:36:58 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE06216A41F for ; Thu, 20 Oct 2005 11:36:58 +0000 (GMT) (envelope-from Jimmy.Yin@Sun.COM) Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AAED43D64 for ; Thu, 20 Oct 2005 11:36:58 +0000 (GMT) (envelope-from Jimmy.Yin@Sun.COM) Received: from phys-eri-2 ([129.158.216.18]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j9KBaveT002987 for ; Thu, 20 Oct 2005 05:36:57 -0600 (MDT) Received: from conversion-daemon.eri-mail1.prc.sun.com by eri-mail1.prc.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0ION00L01OL5DR@eri-mail1.prc.sun.com> (original mail from Jimmy.Yin@Sun.COM) for freebsd-hackers@freebsd.org; Thu, 20 Oct 2005 19:36:56 +0800 (CST) Received: from [129.158.217.196] (striker.PRC.Sun.COM [129.158.217.196]) by eri-mail1.prc.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTPA id <0ION00HLRPLKHX@eri-mail1.prc.sun.com> for freebsd-hackers@freebsd.org; Thu, 20 Oct 2005 19:36:56 +0800 (CST) Date: Thu, 20 Oct 2005 19:34:39 +0800 From: "Jimmy.Yin" To: freebsd-hackers@freebsd.org Message-id: <1129808079.2774.4.camel@commissionaire> Organization: Sun Eri MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Content-type: text/plain Content-transfer-encoding: 7BIT Subject: Does CDCE driver work with Palm? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jimmy.Yin@Sun.COM List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 11:36:59 -0000 Hi, Does CDCE driver work with Palm? Could it be used between *BSD and unsimilar linux based devices? Has anyone ever made a tcp/ip connection over USB between Palm and *BSD with CDCE driver? If not, how about udbp + netgraph? Thanks, Jimmy From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 19 21:23:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11EB716A41F for ; Wed, 19 Oct 2005 21:23:09 +0000 (GMT) (envelope-from user@dhp.com) Received: from shell.dhp.com (shell.dhp.com [199.245.105.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id C263D43D66 for ; Wed, 19 Oct 2005 21:23:08 +0000 (GMT) (envelope-from user@dhp.com) Received: by shell.dhp.com (Postfix, from userid 896) id 8BBDA31350; Wed, 19 Oct 2005 17:23:07 -0400 (EDT) Date: Wed, 19 Oct 2005 17:23:07 -0400 (EDT) From: user To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Thu, 20 Oct 2005 12:47:52 +0000 Subject: FreeBSD UFS2 snapshots, and math ... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 21:23:09 -0000 I am trying to budget some disk space for filesystems with snapshots enabled on them. The following is simplified - I am just trying to get my concepts in order: Let's say I have a filesystem, and on that filesystem I create a snapshot every single night, and every night I delete the snapshot from 5 nights ago. This means that at all times, I have four snapshots running on that filesystem, one from 1 day ago, one from 2 days ago, one from 3 days ago, and one from 4 days ago. Let's also assume that the percent change of the filesystem is 5% (every day 5% of the blocks in the filesystem are either changed or deleted). ---- Does this mean that if that 5% change is a different 5% every day, that the one day ago snapshot will be size 5%_of_filesystem, and that the 2 day ago snapshot will be size 10%_of_filesystem, day 3 15% and day 4 20%, for a total of 50% of the total filesystem taken up with snapshot data ? Does that sound correct ? When I say that the 5% change is a different 5% every day, what I mean is that it is not the same files/data being altered every day, but rather there is 5% of new data changed every day, relative to the previous nights snapshot. The second question is this: If the 5% data changed per day is the _same_ 5% every day (perhaps changing the same table in a DB every day, or perhaps changing the same block of lines in a text file every day) does that mean that every day simply represents 5%_of_filesystem, for a total of 20% of the total filesystem in use at all times for snapshot data ? ----- Finally, are there any snapshot diag tools at all ? Like, something that reports snapshot sizes, percent of disk used for snapshots, and maybe even a way for me to actually calculate what the percent change for time period X is for a particular filsystem >? Thank you. From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 06:07:30 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F0D916A41F for ; Thu, 20 Oct 2005 06:07:30 +0000 (GMT) (envelope-from apivovarov@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0295743D5A for ; Thu, 20 Oct 2005 06:07:29 +0000 (GMT) (envelope-from apivovarov@gmail.com) Received: by zproxy.gmail.com with SMTP id 40so30899nzk for ; Wed, 19 Oct 2005 23:07:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=M30aLZqJG2TNPbVUUPbC0BPyWRhVrqOZpOjiIZHy964DwPhVUpwtsCUdzBoLoKqZaDIVHUVAgsX9WCxMytaNbey5nRZzlLs7hUjHVgeX84Bpmo+CsNsob2/n6TGetGc0h+YOak13eMVcE71Sx/fAqRBqIs+k7KSB49b8b3RprkU= Received: by 10.36.252.77 with SMTP id z77mr1531655nzh; Wed, 19 Oct 2005 23:07:29 -0700 (PDT) Received: by 10.36.118.6 with HTTP; Wed, 19 Oct 2005 23:07:29 -0700 (PDT) Message-ID: <426b510c0510192307i6bdfe39ek725315a2bc143f44@mail.gmail.com> Date: Thu, 20 Oct 2005 10:07:29 +0400 From: Alex Pivovarov To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Mailman-Approved-At: Thu, 20 Oct 2005 12:47:52 +0000 Subject: Backtrace (Computer reboots after printing CUPS test page on HP LaserJet 1010 USB) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 06:07:30 -0000 #Description After printing CUPS test page from "lynx localhost:631" I get an error described below and my computer halts. I get this error quite regulary after printing smth through CUPS (not always but aprox. 50/50). ---------------------------------------------------------------------------= ------ #uname st1# uname -a FreeBSD st1.fqdn 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Wed Oct 19 20:52:56 MSD 2005 root@st1.fqdn:/usr/src/sys/i386/compile/st1deb=20 i386 ---------------------------------------------------------------------------= ------ #backtrace st1# kgdb kernel.debug.4 vmcore.4 [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you ar= e welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd". #0 doadump () at pcpu.h:159 159=09pcpu.h: No such file or directory. =09in pcpu.h (kgdb) where #0 doadump () at pcpu.h:159 #1 0xc0501662 in boot (howto=3D260) at ../../../kern/kern_shutdown.c:410 #2 0xc0501928 in panic (fmt=3D0xc067a977 "from debugger") at ../../../kern/kern_shutdown.c:566 #3 0xc045fd91 in db_panic (addr=3D-1068810355, have_addr=3D0, count=3D-1, modif=3D0xd5221acc "") at ../../../ddb/db_command.c:435 #4 0xc045fd28 in db_command (last_cmdp=3D0xc06d3584, cmd_table=3D0x0, aux_cmd_tablep=3D0xc06a2c34, aux_cmd_tablep_end=3D0xc06a2c38) at ../../../ddb/db_command.c:349 #5 0xc045fdf0 in db_command_loop () at ../../../ddb/db_command.c:455 #6 0xc0461985 in db_trap (type=3D12, code=3D0) at ../../../ddb/db_main.c:2= 21 #7 0xc0518cca in kdb_trap (type=3D12, code=3D0, tf=3D0xd5221c5c) at ../../../kern/subr_kdb.c:468 #8 0xc0653fc9 in trap_fatal (frame=3D0xd5221c5c, eva=3D0) at ../../../i386/i386/trap.c:812 #9 0xc0653d4f in trap_pfault (frame=3D0xd5221c5c, usermode=3D0, eva=3D0) at ../../../i386/i386/trap.c:735 #10 0xc065396d in trap (frame=3D {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D -1068836304, tf_esi =3D -1050102144, tf_ebp =3D -719184740, tf_isp =3D -719184760, tf_eb= x =3D -1050102144, tf_edx =3D 0, tf_ecx =3D -1050102096, tf_eax =3D 0, tf_tra= pno =3D 12, tf_err =3D 2, tf_eip =3D -1068810355, tf_cs =3D 8, tf_eflags =3D 66= 118, tf_esp =3D -719184696, tf_ss =3D -1068836258}) at ../../../i386/i386/trap.c:425 #11 0xc064416a in calltrap () at ../../../i386/i386/exception.s:140 #12 0x00000018 in ?? () #13 0x00000010 in ?? () #14 0x00000010 in ?? () #15 0xc04ada30 in ulpt_read_cb () at ../../../dev/usb/ulpt.c:822 #16 0xc04ada5e in ulpt_tick (xsc=3D0x10246) at ../../../dev/usb/ulpt.c:835 #17 0xc050d4de in softclock (dummy=3D0x0) at ../../../kern/kern_timeout.c:2= 79 #18 0xc04ed98d in ithread_loop (arg=3D0xc15de280) at ../../../kern/kern_intr.c:547 #19 0xc04ecc20 in fork_exit (callout=3D0xc04ed83c , arg=3D0xc15de280, frame=3D0xd5221d48) at ../../../kern/kern_fork.c:791 #20 0xc06441cc in fork_trampoline () at ../../../i386/i386/exception.s:209 (kgdb) Quit #Fatal trap ---------------------------------------------------------- Fatal trap 12: page fault while in kernel mode fault virtual adress =3D 0x0 fault code =3D supervisor write, page not present instruction pointer =3D 0x8:0xc05b5df9 stack pointer =3D 0x10:0xe33a5c9c frame pointer =3D 0x10:0xe33a5c9c code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, def32 1, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 28 (swi5: clock sio) trap number =3D 12 panic: page fault Uptime: 1m5s ----------------------------------------------------------------- or this one ----------------------------------------------------------------- Fatal trap 12: page fault while in kernel mode fault virtual adress =3D 0x0 fault code =3D supervisor write, page not present instruction pointer =3D 0x8:0xc05b5df9 stack pointer =3D 0x10:0xe4de6c9c frame pointer =3D 0x10:0xe4de6c9c code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, def32 1, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 36 (swi5: clock sio) trap number =3D 12 panic: page fault Uptime: 2m59s ------------------------------------------------------------------ #Comp configuration: soft: FreeBSD 5.4-RELEASE #2 Kernel: GENERIC cups-1.1.23.0 cups-base-1.1.23.0_4 cups-lpr-1.1.23.0 cups-pstoraster-8.15 ghostscript-gnu-7.07_13 ghostview-1.5 gsfonts-8.11_2 hardware: CPU: AMD Athlon(tm) XP 1800+ (1531.03-MHz 686-class CPU) (not overclocked) Chipset: nVidia nForce 2 RAM: 512MB DDR400 (checked by memtest86 v.3.2 - no errors) Printer: HP LaserJet 1010 USB From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 13:12:07 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D756716A41F for ; Thu, 20 Oct 2005 13:12:07 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [204.127.198.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7908D43D66 for ; Thu, 20 Oct 2005 13:12:07 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from fw.home (pcp05405355pcs.norstn01.pa.comcast.net[68.81.66.212]) by comcast.net (rwcrmhc12) with SMTP id <20051020131206014006sucoe>; Thu, 20 Oct 2005 13:12:06 +0000 Received: (qmail 73014 invoked from network); 20 Oct 2005 13:12:05 -0000 Received: from kris.home (fc98850f36896a3beb78e6a5d3a32fca@192.168.0.251) by fw.home with SMTP; 20 Oct 2005 13:12:05 -0000 Received: (qmail 86898 invoked by uid 1000); 20 Oct 2005 13:12:04 -0000 Date: Thu, 20 Oct 2005 09:12:04 -0400 From: Kris Maglione To: freebsd-hackers@freebsd.org Message-ID: <20051020131204.GA86467@kris.home> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20051020043644.GB38525@kris.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20051020043644.GB38525@kris.home> User-Agent: Mutt/1.4.2.1i Subject: Re: USB mouse problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 13:12:08 -0000 Sorry for all of the extra posts, but... I do have the mouse working, but with a couple of issues. The main problem seems to be that the last 3 bytes of the sc_data seem to be wrong. Their values never change from the time that the device is attached. They're usually all 0, but sometimes have values. The forth byte is supposed to hold the Z axis, but I never get any Z axis data, at all (except for the possible random value in the forth byte previously mentioned). When I move the scroll wheel, I get a lot of events, but the data is all zeros, except, possibly, for the last 3 bytes, which have the same values as before. -- Kris Maglione Real programmers don't announce how many times the operations department called them last night. From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 13:41:28 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C198416A420 for ; Thu, 20 Oct 2005 13:41:28 +0000 (GMT) (envelope-from dmw@unete.cl) Received: from qmail2.ifxnetworks.com (qmail2.ifxnetworks.com [200.110.128.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4199F43D64 for ; Thu, 20 Oct 2005 13:41:27 +0000 (GMT) (envelope-from dmw@unete.cl) Received: (qmail 17726 invoked from network); 20 Oct 2005 13:41:26 -0000 X-Spam-DCC: CollegeOfNewCaledonia: qmail2.ifxnetworks.com 1189; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on qmail2.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.5 tests=none autolearn=disabled version=3.1.0 Received: from unknown (HELO daemon.unete.cl) ([200.73.82.96]) (envelope-sender ) by qmail2.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 20 Oct 2005 13:41:14 -0000 Received: from daemon.unete.cl (null@localhost.daemon.cl [127.0.0.1]) by daemon.unete.cl (8.13.3/8.13.1) with ESMTP id j9KDfSOn037655 for ; Thu, 20 Oct 2005 10:41:29 -0300 (CLST) (envelope-from dmw@unete.cl) Received: (from dmw@localhost) by daemon.unete.cl (8.13.3/8.13.1/Submit) id j9KDfScK037652 for hackers@freebsd.org; Thu, 20 Oct 2005 10:41:28 -0300 (CLST) (envelope-from dmw@unete.cl) X-Authentication-Warning: daemon.unete.cl: dmw set sender to dmw@unete.cl using -f Date: Thu, 20 Oct 2005 10:41:27 -0300 From: Daniel Molina Wegener To: FreeBSD Hackers Message-ID: <20051020134127.GA37483@daemon.unete.cl> References: <20051020040902.GA21873@daemon.unete.cl> <20051020041709.GC22319@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: mensaje Content-Disposition: inline In-Reply-To: <20051020041709.GC22319@odin.ac.hmc.edu> Organization: DMW Cc: Subject: Re: Which branch? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Molina Wegener List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 13:41:28 -0000 On Wed, Oct 19, 2005 at 09:17:09PM -0700, Brooks Davis wrote: > On Thu, Oct 20, 2005 at 01:09:02AM -0300, Daniel Molina Wegener wrote: > > > > Hello, > > > > My computer is running with FreeBSD 5.4-STABLE. I've tried > > updating the source tree with RELENG_5, but I get some compile > > time errors. > > > > Is the RELENG_5 branch abandoned? > > No. We can't help you with your errors though unless you tell > use what they are. > Ok, I want to know if the RELENG_5 bracnh is active, if have some sense use send-pr with this branch and send patches if any. > > Also, I must download the RELENG_6 branch (6-STABLE) and > > contribute to this branch?. > > You don't have to, but you might want to. It's got > improvements and is clearly the way forward. Ok, thanks. > -- Brooks > [SNIP] Regards -- . 0 . | Daniel Molina Wegener . . 0 | dmw at unete dot cl 0 0 0 | FreeBSD Power User From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 15:39:10 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2236316A41F for ; Thu, 20 Oct 2005 15:39:10 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95F8843D5A for ; Thu, 20 Oct 2005 15:39:09 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 808FC46B2D; Thu, 20 Oct 2005 11:39:08 -0400 (EDT) Date: Thu, 20 Oct 2005 16:39:08 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Daniel Molina Wegener In-Reply-To: <20051020134127.GA37483@daemon.unete.cl> Message-ID: <20051020155705.E28249@fledge.watson.org> References: <20051020040902.GA21873@daemon.unete.cl> <20051020041709.GC22319@odin.ac.hmc.edu> <20051020134127.GA37483@daemon.unete.cl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers Subject: Re: Which branch? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 15:39:10 -0000 On Thu, 20 Oct 2005, Daniel Molina Wegener wrote: > On Wed, Oct 19, 2005 at 09:17:09PM -0700, > Brooks Davis wrote: > >> On Thu, Oct 20, 2005 at 01:09:02AM -0300, Daniel Molina Wegener wrote: >>> >>> Hello, >>> >>> My computer is running with FreeBSD 5.4-STABLE. I've tried >>> updating the source tree with RELENG_5, but I get some compile >>> time errors. >>> >>> Is the RELENG_5 branch abandoned? >> >> No. We can't help you with your errors though unless you tell use what >> they are. > > Ok, I want to know if the RELENG_5 bracnh is active, if have some sense > use send-pr with this branch and send patches if any. The RELENG_5 branch is alive, but will probably be somewhat quiet compared to 6.x. I've been merging netperf changes to 5.x where possible, for example, but the definition of "possible" is constrained by compatibility requirements. I anticipate continuing to do so, subject to time and compatibility concerns. My hope is to see fairly rapid adoption of 6.x, although it's not yet clear to me how the first month or so of bug reports will go for it yet. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 16:52:38 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2651616A41F for ; Thu, 20 Oct 2005 16:52:38 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from sccrmhc14.comcast.net (sccrmhc14.comcast.net [204.127.202.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id B273C43D5A for ; Thu, 20 Oct 2005 16:52:37 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from fw.home (pcp05405355pcs.norstn01.pa.comcast.net[68.81.66.212]) by comcast.net (sccrmhc14) with SMTP id <2005102016410701400sjpsqe>; Thu, 20 Oct 2005 16:41:12 +0000 Received: (qmail 98165 invoked from network); 20 Oct 2005 16:40:59 -0000 Received: from kris.home (4ed317d2df2c914c0c155c02b7cac77e@192.168.0.251) by fw.home with SMTP; 20 Oct 2005 16:40:59 -0000 Received: (qmail 639 invoked by uid 1000); 20 Oct 2005 16:40:59 -0000 Date: Thu, 20 Oct 2005 12:40:59 -0400 From: Kris Maglione To: babkin@users.sf.net Message-ID: <20051020164059.GA116@kris.home> Mail-Followup-To: babkin@users.sf.net, freebsd-hackers@freebsd.org References: <17797651.1129822626662.JavaMail.root@vms068.mailsrvcs.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <17797651.1129822626662.JavaMail.root@vms068.mailsrvcs.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: USB mouse problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 16:52:38 -0000 On Thu, Oct 20, 2005 at 10:37:05AM -0500, Sergey Babkin wrote: >But, it looks to me like it does not use the HID >descriptor. The other possibility is that the HID >descriptor in your device is wrong (as in "a firmware >bug"). I wish it were that simple, but... it does use the HID. And it detects x/y/z axes and 7 buttons (the mouse has two buttons and a wheel). There seems to be no info relevant to the Z axis in the 6 bytes that the debugging info prints. When I move the wheel, it looks just the same as before. The mouse is spec'd to work with standard mouse drivers, so I wouldn't think that there would be any magic going on, but I suppose it's possible that it plays to the quirks of another mouse. Maybe FreeBSD supports those quirks, but if it does, it does so by vendor/device id. I'm probably asking, more than anything else, if anyone is familiar with quirks that produce similar problems to those that I'm having. -- Kris Maglione No one's life, liberty, or property are safe while the legislature is in session. From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 23:12:50 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0582516A41F for ; Thu, 20 Oct 2005 23:12:50 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B808043D62 for ; Thu, 20 Oct 2005 23:12:49 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id A57941A3C19; Thu, 20 Oct 2005 16:12:49 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id EBA365141B; Thu, 20 Oct 2005 19:12:48 -0400 (EDT) Date: Thu, 20 Oct 2005 19:12:48 -0400 From: Kris Kennaway To: Daniel Molina Wegener Message-ID: <20051020231248.GA77808@xor.obsecurity.org> References: <20051020040902.GA21873@daemon.unete.cl> <20051020041709.GC22319@odin.ac.hmc.edu> <20051020134127.GA37483@daemon.unete.cl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <20051020134127.GA37483@daemon.unete.cl> User-Agent: Mutt/1.4.2.1i Cc: FreeBSD Hackers Subject: Re: Which branch? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 23:12:50 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 20, 2005 at 10:41:27AM -0300, Daniel Molina Wegener wrote: > On Wed, Oct 19, 2005 at 09:17:09PM -0700, > Brooks Davis wrote: >=20 > > On Thu, Oct 20, 2005 at 01:09:02AM -0300, Daniel Molina Wegener wrote: > > >=20 > > > Hello, > > >=20 > > > My computer is running with FreeBSD 5.4-STABLE. I've tried > > > updating the source tree with RELENG_5, but I get some compile > > > time errors. > > >=20 > > > Is the RELENG_5 branch abandoned? >=20 > > > > No. We can't help you with your errors though unless you tell > > use what they are. > > >=20 > Ok, I want to know if the RELENG_5 bracnh is active, if have > some sense use send-pr with this branch and send patches if any. Compile errors are likely to be your fault, so please don't send-pr about them. If you need help after searching the archives for similar problems, please post here instead. Kris --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDWCRwWry0BWjoQKURAgAIAJ95dgEWF+MrMyj1FQaRbO9gZ1vArwCghBCo cPSgtkuXzeUiLjPQA+SqumI= =mKLU -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 08:35:55 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2117A16A420 for ; Fri, 21 Oct 2005 08:35:55 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from pinky.frank-behrens.de (pinky.frank-behrens.de [82.139.199.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63AB843D46 for ; Fri, 21 Oct 2005 08:35:53 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from [192.168.20.31] (pulse.behrens [192.168.20.31]) by pinky.frank-behrens.de (8.13.4/8.13.4) with ESMTP/MSA id j9L8Zn2P001846 for ; Fri, 21 Oct 2005 10:35:50 +0200 (CEST) (envelope-from frank@pinky.sax.de) Message-Id: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> From: "Frank Behrens" To: freebsd-hackers@freebsd.org Date: Fri, 21 Oct 2005 10:35:43 +0200 MIME-Version: 1.0 Priority: normal X-mailer: Pegasus Mail for Windows (4.30 public beta 1, DE v4.30 PB1 (for PB1)) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 08:35:55 -0000 Hi, I'm writing a device driver for UART with a protocol, that can not be handled by the default sio(4) driver. The driver works fine - the only problem I have is to disable the attachment of sio(4) driver to the device. Example: I'm using FreeBSD 6.0-BETA3 on a new machine with 2 UART interfaces on motherboard. I use the 1st port as console, it is initialialized as sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A, console I want to use the second port with my driver. I had no luck with hint.sio.1.disabled="1", but hint.sio.1.flags="0x40" gave me the desired result: sio1: reserved for low-level i/o It looks fine, but now come my problems. When I load my driver a new ISA probe is executed. Now there is a sio4 or sio5 device, that is probed and because there are no hints to disable this, the sio(4) driver attaches to the port. One partly working workaround I found is to patch the sio driver. If it does in DEVICE_PROBE(9) not return (0), but the value BUS_PROBE_DEFAULT, then my driver has a chance to attach. If my driver does not attach or another driver is loaded, the sio(4) attaches again and I have lost. Then I see only a reboot as solution to try my driver again. Now comes my question: How can I disable permanently, that sio(4) attaches to a specified interface? In FreeBSD-4 it was very easy, I removed the line from kernel configuration file and it worked. I think I did miss some important information, e.g. I could not find how the associations between PCI selectors (pciconf(8)) and device numers are made and what to insert in device.hints to modify this associations. Regards, Frank -- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available. From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 15:42:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C26F416A41F for ; Thu, 20 Oct 2005 15:42:44 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8187743D62 for ; Thu, 20 Oct 2005 15:42:44 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms068.mailsrvcs.net ([192.168.1.1]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IOO006Q20PUGZU0@vms048.mailsrvcs.net> for freebsd-hackers@freebsd.org; Thu, 20 Oct 2005 10:37:06 -0500 (CDT) Date: Thu, 20 Oct 2005 10:37:05 -0500 (CDT) From: Sergey Babkin To: Kris Maglione , freebsd-hackers@freebsd.org Message-id: <17797651.1129822626662.JavaMail.root@vms068.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailman-Approved-At: Fri, 21 Oct 2005 12:54:35 +0000 Cc: Subject: Re: USB mouse problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 15:42:44 -0000 >I do have the mouse working, but with a couple of issues. The main problem >seems to be that the last 3 bytes of the sc_data seem to be wrong. Their >values never change from the time that the device is attached. They're usually >all 0, but sometimes have values. The forth byte is supposed to hold the Z >axis, but I never get any Z axis data, at all (except for the possible random >value in the forth byte previously mentioned). When I move the scroll wheel, >I get a lot of events, but the data is all zeros, except, possibly, for the >last 3 bytes, which have the same values as before. First, a disclaimer: I haven't looked at the FreeBSD USB mouse driver and can't tell if what I say is truly relevant. But, it looks to me like it does not use the HID descriptor. The other possibility is that the HID descriptor in your device is wrong (as in "a firmware bug"). What the HID descriptor is: The USB spec is very clever, and requires that the normal USB devices provide not only the data itself by also the descriptor tables describing the meaning of the data - which fields are where and how they are formatted. Or at least it requires that for the Human Interface Devices (HID). The descriptors are stored in ROM inside the device and are sent to the computer on request. The exact formatting of the descriptors is complicated but in essence it boils down to the triplets of (meaning, location, format). There are pre-defined standardized tables of possible meanings (functions) and the codes associated with them. For the mouse the functions would be such as "X axis movement", "Y axis movement", "Button 1", "Button 2", "Button 3" etc. These tables are hierarchical: i.e. some meanings are applicable to any HID devices, some for any kind of pointer device, some specifically for mice. Of course the manufacturer includes only those meanings in the descriptor that are actually supported by the device. Then again the manufacturer is free to include any extra device-specific information that is not described by the descriptor. To use this device-specific information a device- specific driver would have to be used. On the other hand, a generic driver can be used with any device that provides a suitable descriptor with needed functions. So how a generic mouse drived should work: when writing the driver its author looks up the codes for all the related functions in the manual. Then when a mouse is connected, the driver should query its descriptor, and then go through it and find the information about these functions and remember it. Then when it receives the data from the device, it should look for data in it according to what it has found in the descriptor. And similarly for constructing messages to be sent to the device. >From your description it looks like the present driver does not go into all this trouble but instead assumes a particular hardcoded format of incoming data. But again, I might be wrong. -SB From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 15:42:54 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 774C216A41F for ; Thu, 20 Oct 2005 15:42:54 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26C7043D64 for ; Thu, 20 Oct 2005 15:42:54 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms068.mailsrvcs.net ([192.168.1.1]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IOO00IX80U6GMZ0@vms046.mailsrvcs.net> for freebsd-hackers@freebsd.org; Thu, 20 Oct 2005 10:39:42 -0500 (CDT) Date: Thu, 20 Oct 2005 10:39:42 -0500 (CDT) From: Sergey Babkin To: Kris Maglione , freebsd-hackers@freebsd.org Message-id: <11425819.1129822782834.JavaMail.root@vms068.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailman-Approved-At: Fri, 21 Oct 2005 12:54:35 +0000 Cc: Subject: Re: USB mouse problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 15:42:54 -0000 >I do have the mouse working, but with a couple of issues. The main problem >seems to be that the last 3 bytes of the sc_data seem to be wrong. Their >values never change from the time that the device is attached. They're usually >all 0, but sometimes have values. The forth byte is supposed to hold the Z >axis, but I never get any Z axis data, at all (except for the possible random >value in the forth byte previously mentioned). When I move the scroll wheel, >I get a lot of events, but the data is all zeros, except, possibly, for the >last 3 bytes, which have the same values as before. First, a disclaimer: I haven't looked at the FreeBSD USB mouse driver and can't tell if what I say is truly relevant. But, it looks to me like it does not use the HID descriptor. The other possibility is that the HID descriptor in your device is wrong (as in "a firmware bug"). What the HID descriptor is: The USB spec is very clever, and requires that the normal USB devices provide not only the data itself by also the descriptor tables describing the meaning of the data - which fields are where and how they are formatted. Or at least it requires that for the Human Interface Devices (HID). The descriptors are stored in ROM inside the device and are sent to the computer on request. The exact formatting of the descriptors is complicated but in essence it boils down to the triplets of (meaning, location, format). There are pre-defined standardized tables of possible meanings (functions) and the codes associated with them. For the mouse the functions would be such as "X axis movement", "Y axis movement", "Button 1", "Button 2", "Button 3" etc. These tables are hierarchical: i.e. some meanings are applicable to any HID devices, some for any kind of pointer device, some specifically for mice. Of course the manufacturer includes only those meanings in the descriptor that are actually supported by the device. Then again the manufacturer is free to include any extra device-specific information that is not described by the descriptor. To use this device-specific information a device- specific driver would have to be used. On the other hand, a generic driver can be used with any device that provides a suitable descriptor with needed functions. So how a generic mouse drived should work: when writing the driver its author looks up the codes for all the related functions in the manual. Then when a mouse is connected, the driver should query its descriptor, and then go through it and find the information about these functions and remember it. Then when it receives the data from the device, it should look for data in it according to what it has found in the descriptor. And similarly for constructing messages to be sent to the device. >From your description it looks like the present driver does not go into all this trouble but instead assumes a particular hardcoded format of incoming data. But again, I might be wrong. -SB From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 20 21:39:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5014316A420 for ; Thu, 20 Oct 2005 21:39:56 +0000 (GMT) (envelope-from user@dhp.com) Received: from shell.dhp.com (shell.dhp.com [199.245.105.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08CF843D62 for ; Thu, 20 Oct 2005 21:39:55 +0000 (GMT) (envelope-from user@dhp.com) Received: by shell.dhp.com (Postfix, from userid 896) id 3682931354; Thu, 20 Oct 2005 17:39:54 -0400 (EDT) Date: Thu, 20 Oct 2005 17:39:54 -0400 (EDT) From: user To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Fri, 21 Oct 2005 12:54:35 +0000 Subject: unexpected (temporary) free space when unlinking files on a snapshot FS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 21:39:56 -0000 Create 8 1gig files. (check free space on disk) Create a snapshot. Delete all 8 1gig files. At this point you would expect the free space on disk to match what it was when you just checked it earlier (see above). However, for a small amount of time (a minute or so ?) You actually get a fair amount of that space back - and it is reported as free in `df`. And then it goes back down to what it was when you made the snapshot. Why does df report (temporarily) a gain in disk space after deleting these files (which should not result in any disk space gain) Thank you. From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 13:13:31 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF78816A41F; Fri, 21 Oct 2005 13:13:30 +0000 (GMT) (envelope-from nocool@263.net) Received: from smtp.263.net (263.net.cn [211.150.96.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BFAE43D45; Fri, 21 Oct 2005 13:13:27 +0000 (GMT) (envelope-from nocool@263.net) Received: from iscas-zfw728iit (smtp1 [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id A16FC126E; Fri, 21 Oct 2005 21:13:29 +0800 (CST) (envelope-from nocool@263.net) X-Originating-IP: [159.226.5.225] Date: Fri, 21 Oct 2005 21:13:57 +0800 From: "nocool" To: "freebsd-hackers" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 Message-Id: <20051021131329.A16FC126E@smtp.263.net> X-Mailman-Approved-At: Fri, 21 Oct 2005 13:25:15 +0000 Cc: das , freebsd-current , delphij Subject: where to release proc.p_stats X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 13:13:31 -0000 ZnJlZWJzZC1oYWNrZXJzo6xoZWxsbw0KDQoJUXVlc3Rpb24gYWJvdXQgNS40IGtlcm5lbCBzb3Vy Y2UgY29kZS4NCglJIGhhdmUgc29tZSBxdWVzdGlvbiBhYm91dCBzdHJ1c3QgcHJvYydzIGluaXRp YWxpemUuIEtlcm5lbCB1c2UgcHJvY196b25lIHRvIGFsbG9jYXRlIHByb2MgaXRlbXMgYW5kIGlu aXRpYWxpemUgdGhlbSB3aXRoIHByb2NfaW5pdCAoc3lzXGtlcm5ca2Vybl9wcm9jLmMpIGZ1bmN0 aW9uLiBJbiB0aGlzIGZ1bmN0aW9uLCB3ZSBjYW4gZmluZCB0aGUgZmllbGQgcHJvYy5wX3N0YXRz IGlzIGFsbG9jYXRlZCB3aXRoIHBzdGF0c19hbGxvYygpLCBhcyANCg0KcC0+cF9zdGF0cyA9IHBz dGF0c19hbGxvYygpOyAgDQoNCmFuZCBwc3RhdHNfYWxsb2MgaXMgcmVhbGl6ZWQgYXMgDQoNCm1h bGxvYyhzaXplb2Yoc3RydWN0IHBzdGF0cyksIE1fU1VCUFJPQywgTV9aRVJPfE1fV0FJVE9LKTsN Cg0KQnV0IEkgY2FuJ3QgZmluZCB3aGVyZSB0aGlzIGZpZWxkIGlzIGZyZWVkLiBJZiBpdCB3aWxs IG5vdCBiZSByZWxlYXNlLCB3aWxsIHRoZXJlIGJlIG1lbW9yeSBsZWFrYWdlPw0KDQoNCg0KoaGh oaGhoaGhoaGhoaGhoW5vY29vbA0KoaGhoaGhoaGhoaGhoaGhoW5vY29vbEAyNjMubmV0DQqhoaGh oaGhoaGhoaGhoaGhoaGhoTIwMDUtMTAtMjENCg== From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 14:08:14 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF96916A41F for ; Fri, 21 Oct 2005 14:08:14 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CA5E43D49 for ; Fri, 21 Oct 2005 14:08:14 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-3.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.211); Fri, 21 Oct 2005 16:08:12 +0200 Date: Fri, 21 Oct 2005 16:08:14 +0200 (CEST) From: Harti Brandt X-X-Sender: harti@beagle.kn.op.dlr.de To: hackers@freebsd.org Message-ID: <20051021160017.D4007@beagle.kn.op.dlr.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-OriginalArrivalTime: 21 Oct 2005 14:08:12.0454 (UTC) FILETIME=[DF6F7460:01C5D648] Cc: Subject: telnetd/sshd and Kerberos tickets (PAM) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 14:08:15 -0000 Hi all, I have enabled the pam_krb5 module in pam.d/{login,telnetd,sshd}. When login in locally I get a Kerberos ticket as I would expect. When logging in via ssh or telnet I don't get one. I have digged around in the sources and it locks like telnetd never calls pam_setcred() which would do this work. My PAM-foo is rather limited so my question is: shouldn't sshd and telnetd call pam_setcred() somewhere? harti From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 14:17:57 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB75416A420; Fri, 21 Oct 2005 14:17:57 +0000 (GMT) (envelope-from stijn@pcwin002.win.tue.nl) Received: from kweetal.tue.nl (kweetal.tue.nl [131.155.3.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6598E43D45; Fri, 21 Oct 2005 14:17:54 +0000 (GMT) (envelope-from stijn@pcwin002.win.tue.nl) Received: from localhost (localhost [127.0.0.1]) by kweetal.tue.nl (Postfix) with ESMTP id 6E50813B71E; Fri, 21 Oct 2005 16:17:53 +0200 (CEST) Received: from kweetal.tue.nl ([127.0.0.1]) by localhost (kweetal.tue.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29642-08-2; Fri, 21 Oct 2005 16:17:52 +0200 (CEST) Received: from umta.win.tue.nl (umta.win.tue.nl [131.155.71.100]) by kweetal.tue.nl (Postfix) with ESMTP id 39FA013B75C; Fri, 21 Oct 2005 16:17:52 +0200 (CEST) Received: from pcwin002.win.tue.nl (pcwin002 [131.155.71.72]) by umta.win.tue.nl (Postfix) with ESMTP id 2CE2231401D; Fri, 21 Oct 2005 16:17:52 +0200 (CEST) Received: by pcwin002.win.tue.nl (Postfix, from userid 1001) id 1D4C140BA; Fri, 21 Oct 2005 16:17:52 +0200 (CEST) Date: Fri, 21 Oct 2005 16:17:52 +0200 From: Stijn Hoop To: Harti Brandt Message-ID: <20051021141752.GQ6916@pcwin002.win.tue.nl> References: <20051021160017.D4007@beagle.kn.op.dlr.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Xm/fll+QQv+hsKip" Content-Disposition: inline In-Reply-To: <20051021160017.D4007@beagle.kn.op.dlr.de> User-Agent: Mutt/1.4.2.1i X-Bright-Idea: Let's abolish HTML mail! X-Virus-Scanned: amavisd-new at tue.nl Cc: hackers@freebsd.org Subject: Re: telnetd/sshd and Kerberos tickets (PAM) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 14:17:58 -0000 --Xm/fll+QQv+hsKip Content-Type: multipart/mixed; boundary="YD3LsXFS42OYHhNZ" Content-Disposition: inline --YD3LsXFS42OYHhNZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 21, 2005 at 04:08:14PM +0200, Harti Brandt wrote: > I have enabled the pam_krb5 module in pam.d/{login,telnetd,sshd}. When=20 > login in locally I get a Kerberos ticket as I would expect. When logging= =20 > in via ssh or telnet I don't get one. I have digged around in the sources= =20 > and it locks like telnetd never calls pam_setcred() which would do this= =20 > work. My PAM-foo is rather limited so my question is: shouldn't sshd and= =20 > telnetd call pam_setcred() somewhere? WRT sshd I bugged des@ about this but did not receive an answer :( See the attached mail. --Stijn --=20 There are of course many problems connected with life, of which some of the most popular are 'Why are people born?', 'Why do they die?', and `Why do they spend so much of the intervening time wearing digital watches?' -- Douglas Adams, "The Hitchhikers Guide To The Galaxy" --YD3LsXFS42OYHhNZ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="des_mail.txt" Content-Transfer-Encoding: quoted-printable Hi, I sent this 2 weeks ago but got no response. Did I miss anything? I'd appreciate even a quick 'yes' or 'no' (although a pointer to more docs would also be nice). --Stijn ----- Forwarded message from Stijn Hoop ----- From: Stijn Hoop Date: Wed, 7 Sep 2005 20:48:09 +0200 To: des@freebsd.org Subject: pam_krb5 / pam_sm_setcred not getting called with PAM_ESTABLISH_CR= ED Hi Dag-Erling, sorry to bother you directly but I can't find good info on PAM internals on the net. If you do have some pointers I'll gladly read more myself. In any case, the quick quick version of the problem is this: is it allowed for an application to only call pam_setcred with the PAM_REINITIALIZE_FLAG, while never having called it with PAM_ESTABLISH_CRED? More details below and in my other post to arch@ with the same subject. I would be obliged if you could answer this question. Thanks! --Stijn ----- Forwarded message from Stijn Hoop ----- From: Stijn Hoop Date: Sat, 3 Sep 2005 16:55:06 +0200 To: freebsd-arch@freebsd.org Subject: Re: pam_krb5 / pam_sm_setcred not getting called with PAM_ESTABLIS= H_CRED' On Sat, Sep 03, 2005 at 11:44:34AM +0200, Stijn Hoop wrote: > I'm debugging a problem on 5-STABLE where I've setup a KDC using Heimdal > in the base system, and activated pam_krb5 in /etc/pam.d/sshd. It turns o= ut > that pam_krb5 does not establish the credential cache for the authenticat= ed > user. After reinstalling pam with DEBUG & PAM_DEBUG, it turns out that > pam_sm_setcred is only called with PAM_REINITIALIZE_CRED as flags, and > never with PAM_ESTABLISH_CRED, which is the only case for which a credent= ial > cache will be saved (in all other cases, PAM_SUCCESS is returned immediat= ely, > which is why I don't have a cache). Further digging reveals that this is due to the sshd code; it turns out that unless PrivilegeSeparation is off, it will not 'establish' credentials, only 'reinitialize' them. Found in src/crypto/openssh/auth-pam= .c and session.c. I really wouldn't know if this is appropriate or not, but it seems confusing to me. The second question still stands: > - shouldn't pam_krb5 re-establish the credential cache when called with > PAM_REINITIALIZE_CRED, instead of just returning PAM_SUCCESS? I'm a tot= al > pam newbie so I'm going only by the name of the flag; I couldn't find a > manpage that made the semantics of these flags more clear. Or of course someone pointing out the correct way to get an initialized Kerberos 5 ticket cache upon succesful ssh login... --Stijn ----- End forwarded message ----- --YD3LsXFS42OYHhNZ-- --Xm/fll+QQv+hsKip Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDWPiPY3r/tLQmfWcRAuvnAJ9TrSmB8t6kKWA0KMq560roxQz8NACgoEiz Bx6Q+f/fID1iqNz4tW/V0f4= =W4kU -----END PGP SIGNATURE----- --Xm/fll+QQv+hsKip-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 15:10:41 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CEF5116A41F for ; Fri, 21 Oct 2005 15:10:41 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DBE843D45 for ; Fri, 21 Oct 2005 15:10:40 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-3.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.211); Fri, 21 Oct 2005 17:10:39 +0200 Date: Fri, 21 Oct 2005 17:10:39 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Stijn Hoop In-Reply-To: <20051021141752.GQ6916@pcwin002.win.tue.nl> Message-ID: <20051021170843.A6955@beagle.kn.op.dlr.de> References: <20051021160017.D4007@beagle.kn.op.dlr.de> <20051021141752.GQ6916@pcwin002.win.tue.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 21 Oct 2005 15:10:39.0862 (UTC) FILETIME=[99108960:01C5D651] Cc: hackers@freebsd.org Subject: Re: telnetd/sshd and Kerberos tickets (PAM) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 15:10:42 -0000 On Fri, 21 Oct 2005, Stijn Hoop wrote: SH>On Fri, Oct 21, 2005 at 04:08:14PM +0200, Harti Brandt wrote: SH>> I have enabled the pam_krb5 module in pam.d/{login,telnetd,sshd}. When SH>> login in locally I get a Kerberos ticket as I would expect. When logging SH>> in via ssh or telnet I don't get one. I have digged around in the sources SH>> and it locks like telnetd never calls pam_setcred() which would do this SH>> work. My PAM-foo is rather limited so my question is: shouldn't sshd and SH>> telnetd call pam_setcred() somewhere? SH> SH>WRT sshd I bugged des@ about this but did not receive an answer :( See SH>the attached mail. Hmm. I digged around a little bit and found something: http://bugzilla.mindrot.org/show_bug.cgi?id=789 >From a first glance it seems that this bug was introduced by fixing another bug. harti From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 16:06:34 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D17716A435 for ; Fri, 21 Oct 2005 16:06:34 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9918743D45 for ; Fri, 21 Oct 2005 16:06:33 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9LG5Bw8026150; Fri, 21 Oct 2005 10:05:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 21 Oct 2005 10:06:35 -0600 (MDT) Message-Id: <20051021.100635.115989045.imp@bsdimp.com> To: frank@pinky.sax.de From: "M. Warner Losh" In-Reply-To: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 21 Oct 2005 10:05:12 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 16:06:34 -0000 In message: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> "Frank Behrens" writes: : I want to use the second port with my driver. I had no luck with : hint.sio.1.disabled="1", but hint.sio.1.flags="0x40" : gave me the desired result: : sio1: reserved for low-level i/o Allocate the resources it uses, and sio can't probe. : One partly working workaround I found is to patch the sio driver. If : it does in DEVICE_PROBE(9) not return (0), but the value : BUS_PROBE_DEFAULT, then my driver has a chance to attach. : If my driver does not attach or another driver is loaded, the sio(4) : attaches again and I have lost. Then I see only a reboot as solution : to try my driver again. Right. There's a weakness in the current scheme in that one can't rebid a device. I've been working on some patches for that. That's the real way to solve this problem. Another "soltution" is to not have sio in your kernel while you are debugging your driver. Another solution would be to have your driver use the tty layer instead of banging the hardware directly, if that is compatible with the goals of your driver. This solution isn't in quotes because for some class of devices (say a keyboard driver for a sun or apple newton keyboard that does serial), it might be the right one. : I think I did miss some important information, e.g. I could not find : how the associations between PCI selectors (pciconf(8)) and device : numers are made and what to insert in device.hints to modify this : associations. There's no way to tie the plug and play location to a device instance at this time. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 16:38:03 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4297116A420 for ; Fri, 21 Oct 2005 16:38:03 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD5AE43D45 for ; Fri, 21 Oct 2005 16:38:02 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 21 Oct 2005 12:54:38 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 21 Oct 2005 12:16:36 -0400 User-Agent: KMail/1.8.2 References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <20051021.100635.115989045.imp@bsdimp.com> In-Reply-To: <20051021.100635.115989045.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510211216.37814.jhb@freebsd.org> Cc: frank@pinky.sax.de Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 16:38:03 -0000 On Friday 21 October 2005 12:06 pm, M. Warner Losh wrote: > In message: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> > > "Frank Behrens" writes: > : I want to use the second port with my driver. I had no luck with > : hint.sio.1.disabled="1", but hint.sio.1.flags="0x40" > : gave me the desired result: > : sio1: reserved for low-level i/o > > Allocate the resources it uses, and sio can't probe. > > : One partly working workaround I found is to patch the sio driver. If > : it does in DEVICE_PROBE(9) not return (0), but the value > : BUS_PROBE_DEFAULT, then my driver has a chance to attach. > : If my driver does not attach or another driver is loaded, the sio(4) > : attaches again and I have lost. Then I see only a reboot as solution > : to try my driver again. > > Right. There's a weakness in the current scheme in that one can't > rebid a device. I've been working on some patches for that. That's > the real way to solve this problem. > > Another "soltution" is to not have sio in your kernel while you are > debugging your driver. > > Another solution would be to have your driver use the tty layer > instead of banging the hardware directly, if that is compatible with > the goals of your driver. This solution isn't in quotes because for > some class of devices (say a keyboard driver for a sun or apple newton > keyboard that does serial), it might be the right one. > > : I think I did miss some important information, e.g. I could not find > : how the associations between PCI selectors (pciconf(8)) and device > : numers are made and what to insert in device.hints to modify this > : associations. > > There's no way to tie the plug and play location to a device instance > at this time. But you could hack the sio(4) driver to check its IO port and return ENXIO if it has a certain value, for example. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 16:43:55 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CF4C16A41F; Fri, 21 Oct 2005 16:43:55 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id E99A343D45; Fri, 21 Oct 2005 16:43:54 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 21 Oct 2005 12:54:38 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 21 Oct 2005 12:39:33 -0400 User-Agent: KMail/1.8.2 References: <20051021131329.A16FC126E@smtp.263.net> In-Reply-To: <20051021131329.A16FC126E@smtp.263.net> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200510211239.35190.jhb@freebsd.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: delphij , das , freebsd-current , nocool Subject: Re: where to release proc.p_stats X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 16:43:55 -0000 On Friday 21 October 2005 09:13 am, nocool wrote: > freebsd-hackers=EF=BC=8Chello > > Question about 5.4 kernel source code. > I have some question about strust proc's initialize. Kernel use proc_zone > to allocate proc items and initialize them with proc_init > (sys\kern\kern_proc.c) function. In this function, we can find the field > proc.p_stats is allocated with pstats_alloc(), as > > p->p_stats =3D pstats_alloc(); > > and pstats_alloc is realized as > > malloc(sizeof(struct pstats), M_SUBPROC, M_ZERO|M_WAITOK); > > But I can't find where this field is freed. If it will not be release, wi= ll > there be memory leakage? Heh, das@ forgot to call pstats_free() when he did the changes. The reason= =20 is probably because proc_fini() doesn't do anything useful because we never= =20 recycle proc structs. We should probably at least add the operations there= =20 though for documentation purposes. Something like this would work I think: Index: kern_proc.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/cvs/src/sys/kern/kern_proc.c,v retrieving revision 1.232 diff -u -r1.232 kern_proc.c =2D-- kern_proc.c 2 Oct 2005 23:27:56 -0000 1.232 +++ kern_proc.c 21 Oct 2005 16:38:45 -0000 @@ -197,7 +197,14 @@ proc_fini(void *mem, int size) { +#ifdef notnow + pstats_free(p->p_stats); + mtx_destroy(&p->p_mtx); + ksegrp_free(FIRST_KSEGRP_IN_PROC(p)); + thread_free(FIRST_THREAD_IN_PROC(p)); +#else panic("proc reclaimed"); +#endif } /* =2D-=20 John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 17:36:52 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2EA716A41F; Fri, 21 Oct 2005 17:36:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3855043D46; Fri, 21 Oct 2005 17:36:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9LHaF0E027073; Fri, 21 Oct 2005 11:36:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 21 Oct 2005 11:37:39 -0600 (MDT) Message-Id: <20051021.113739.32720831.imp@bsdimp.com> To: jhb@FreeBSD.ORG From: "M. Warner Losh" In-Reply-To: <200510211216.37814.jhb@freebsd.org> References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <20051021.100635.115989045.imp@bsdimp.com> <200510211216.37814.jhb@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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 21 Oct 2005 11:36:15 -0600 (MDT) Cc: frank@pinky.sax.de, freebsd-hackers@FreeBSD.ORG Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 17:36:52 -0000 In message: <200510211216.37814.jhb@freebsd.org> John Baldwin writes: : But you could hack the sio(4) driver to check its IO port and return ENXIO if : it has a certain value, for example. Yes. You could also do that. I have a tree somewhere that has some changes in this direction, but I was unsatisified with it. I set out to solve the 'I want SIO0 to be defined as PORT_B, since that's the only one my server exports via acpi, how the heck do I know what adress it is at, really?' problem too. devinfo says: sio0 pnpinfo _HID=PNP0501 _UID=1 at handle=\_SB_.PCI0.PX40.UAR1 sio1 pnpinfo _HID=PNP0501 _UID=2 at handle=\_SB_.PCI0.PX40.UAR2 I'd like to be able to say that sio0 is at handle=\_SB_.PCI0.PX40.UAR2 rather than some arbitrary address. Or that bge1 is at bge0 pnpinfo vendor=0x14e4 device=0x16a6 subvendor=0x14e4 subdevice=0x8009 class=0x020000 at slot=3 function=0 handle=\_SB_.PCI0.G0PA.LAN0 miibus0 brgphy0 pnpinfo oui=0x818 model=0x16 rev=0x2 at phyno=1 bge1 pnpinfo vendor=0x14e4 device=0x16a6 subvendor=0x14e4 subdevice=0x8009 class=0x020000 at slot=4 function=0 handle=\_SB_.PCI0.G0PA.LAN1 either at pci2.4.0 *OR* at handle=\_SB_.PCI0.G0PA.LAN1 (or even handle=LAN1). So there'd need to be some kind of bus specific mapping function that would say true or false if a given device_t on that bus matched the string presented. You could then say that the device at handle=UAR1 belongs to mydev3, and sio would never even be given a chance to bid on it. I'm not sure how to work this into the current hints paradigm... Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 17:56:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F39DC16A41F for ; Fri, 21 Oct 2005 17:56:45 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D37843D46 for ; Fri, 21 Oct 2005 17:56:45 +0000 (GMT) (envelope-from bsdaemon@comcast.net) Received: from fw.home (pcp05405355pcs.norstn01.pa.comcast.net[68.81.66.212]) by comcast.net (rwcrmhc11) with SMTP id <2005102117564401300fspthe>; Fri, 21 Oct 2005 17:56:44 +0000 Received: (qmail 84094 invoked from network); 21 Oct 2005 17:56:43 -0000 Received: from kris.home (2d30ffc1ee241b6ab4b50c9e48679bcd@192.168.0.251) by fw.home with SMTP; 21 Oct 2005 17:56:43 -0000 Received: (qmail 75339 invoked by uid 1000); 21 Oct 2005 17:56:43 -0000 Date: Fri, 21 Oct 2005 13:56:42 -0400 From: Kris Maglione To: freebsd-hackers@freebsd.org Message-ID: <20051021175642.GA74774@kris.home> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: USB mouse, wheel doesn't work X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 17:56:46 -0000 I have a gyration mouse. At first, it didn't work, but I got it working by setting sc->sc_iid to 0 in USB_ATTACH in ums.c. The only problem that I have now is that the wheel doesn't work. The wheel is supposed to be reported in the 4th byte of sc_ibuf. The problem is that nothing after the third byte is touched. In fact, I had to zero the entire buffer after the malloc, so some junk value didn't cause a persistent Z axis value. When I turn the wheel, I get a bunch of events, but with no data... the first three bytes are set to 0, and the rest are either junk (if I haven't zerod after the malloc), or null (if I have). I don't know enough about the USB subsystem to go chasing after this myself, but I would assume that the problem is outside of the ums driver. Can someone point me in the right direction here? If it helps, the device is a combination keyboard/mouse reciever. Thanks -- Kris Maglione No matter what happens, there is always somebody who knew that it would. From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 18:24:06 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B93FE16A422 for ; Fri, 21 Oct 2005 18:24:06 +0000 (GMT) (envelope-from gbergling@0xfce3.net) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9936E43D46 for ; Fri, 21 Oct 2005 18:24:04 +0000 (GMT) (envelope-from gbergling@0xfce3.net) X-Envelope-From: gbergling@0xfce3.net X-Envelope-To: Received: from node26.0xfce3.net (port-212-202-34-7.dynamic.qsc.de [212.202.34.7]) (authenticated bits=128) by einhorn.in-berlin.de (8.12.10/8.12.10/Debian-4) with ESMTP id j9LIO0Xl014919 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 21 Oct 2005 20:24:00 +0200 Received: from node26.0xfce3.net (localhost [127.0.0.1]) by node26.0xfce3.net (8.13.4/8.13.4) with ESMTP id j9LINxZ7011096 for ; Fri, 21 Oct 2005 20:23:59 +0200 (CEST) (envelope-from gbergling@0xfce3.net) Received: (from gordon@localhost) by node26.0xfce3.net (8.13.4/8.13.4/Submit) id j9LINw9m011095 for freebsd-hackers@freebsd.org; Fri, 21 Oct 2005 20:23:58 +0200 (CEST) (envelope-from gbergling@0xfce3.net) X-Authentication-Warning: node26.0xfce3.net: gordon set sender to gbergling@0xfce3.net using -f Date: Fri, 21 Oct 2005 20:23:58 +0200 From: Gordon Bergling To: freebsd-hackers@freebsd.org Message-ID: <20051021182358.GA11009@node26.0xfce3.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Url: X-Operating-System: FreeBSD 6.0-RC1 i386 X-Host-Uptime: 8:12PM up 1:37, 3 users, load averages: 0.23, 0.13, 0.05 User-Agent: Mutt/1.5.11 X-Spam-Score: (0.721) AWL,BAYES_40,FORGED_RCVD_HELO,HELO_DYNAMIC_DHCP X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: locking of a subsystem (remove of spl calls) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 18:24:06 -0000 Hi, I am about to write a special display driver, which should be something like a framebuffer device, in terms of FreeBSD. I whould like to make this driver from at the beginning MPSAFE, but I am not sure that this is possible. Looking at some devices in sys/dev/fb and sys/dev/syscons there are a lot of spl calls with make these drivers require GIANT. My question is now where to start. Should I write my driver with spl calls or is there an MPSAFE way which could I take? And while I am here how hard whould it to get the looking of syscons right. I have studied the source code for a while now and could take this part. I am not sure about the other kernel subsystems like tty for example. Whould it be possible to lock down syscons and maybe some device in sys/dev/fb without a complete GIANT removal from the tty subsystem? best regards, Gordon -- Gordon Bergling http://www.0xFCE3.net/ PGP Fingerprint: 7732 9BB1 5013 AE8B E42C 28E0 93B9 D32B C76F 02A0 RIPE-HDL: MDTP-RIPE "There is no place like 127.0.0.0/8" From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 19:10:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C8FC16A41F for ; Fri, 21 Oct 2005 19:10:16 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id A042543D45 for ; Fri, 21 Oct 2005 19:10:15 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.250] (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.13.4/8.13.4) with ESMTP id j9LJA2xe087888; Fri, 21 Oct 2005 12:10:03 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <20051021.100635.115989045.imp@bsdimp.com> References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <20051021.100635.115989045.imp@bsdimp.com> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <24F58EA6-C84B-4966-A973-D91AB494239C@xcllnt.net> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Fri, 21 Oct 2005 12:10:01 -0700 To: "M. Warner Losh" X-Mailer: Apple Mail (2.734) Cc: frank@pinky.sax.de, freebsd-hackers@freebsd.org Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 19:10:16 -0000 On Oct 21, 2005, at 9:06 AM, M. Warner Losh wrote: > Another solution would be to have your driver use the tty layer > instead of banging the hardware directly, if that is compatible with > the goals of your driver. A better alternative is to teach uart(4) about the protocol. It's designed to allow multiple protocols. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 20:33:52 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 433F816A41F; Fri, 21 Oct 2005 20:33:52 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7950243D5C; Fri, 21 Oct 2005 20:33:49 +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 j9LKW9EL026815; Fri, 21 Oct 2005 16:32:09 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j9LKW7g3026814; Fri, 21 Oct 2005 16:32:07 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Fri, 21 Oct 2005 16:32:07 -0400 From: David Schultz To: John Baldwin Message-ID: <20051021203207.GA26616@VARK.MIT.EDU> Mail-Followup-To: John Baldwin , freebsd-hackers@FreeBSD.ORG, nocool , freebsd-current , delphij References: <20051021131329.A16FC126E@smtp.263.net> <200510211239.35190.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii:iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200510211239.35190.jhb@freebsd.org> Cc: freebsd-hackers@FreeBSD.ORG, delphij , freebsd-current , nocool Subject: Re: where to release proc.p_stats X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 20:33:52 -0000 On Fri, Oct 21, 2005, John Baldwin wrote: > On Friday 21 October 2005 09:13 am, nocool wrote: > > freebsd-hackersļ¼Œhello > > > > Question about 5.4 kernel source code. > > I have some question about strust proc's initialize. Kernel use proc_zone > > to allocate proc items and initialize them with proc_init > > (sys\kern\kern_proc.c) function. In this function, we can find the field > > proc.p_stats is allocated with pstats_alloc(), as > > > > p->p_stats = pstats_alloc(); > > > > and pstats_alloc is realized as > > > > malloc(sizeof(struct pstats), M_SUBPROC, M_ZERO|M_WAITOK); > > > > But I can't find where this field is freed. If it will not be release, will > > there be memory leakage? > > Heh, das@ forgot to call pstats_free() when he did the changes. The reason > is probably because proc_fini() doesn't do anything useful because we never > recycle proc structs. We should probably at least add the operations there > though for documentation purposes. Something like this would work I think: I didn't put in the call because we never free proc structures, but documenting what should happen if we ever do free them is a good idea. There's a fair amount of other cleanup that needs to happen as well, which you can probably find in the CVS history. (IIRC, I'm guilty of removing the code at a time when more things depended upon struct proc being type safe. Are there any remaining reasons why we can't free struct procs at this point?) By the way, there's no reason why we can't fold struct pstats into struct proc so we don't have to allocate and free it at all. It's never shared, so the extra level of indirection just adds overhead. The main reason I didn't make this change earlier was to maintain binary compatibility when I backported my U-area changes to -STABLE. From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 20:39:58 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E21A616A422 for ; Fri, 21 Oct 2005 20:39:58 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from ant.bwct.de (ant.bwct.de [85.159.14.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1770C43D45 for ; Fri, 21 Oct 2005 20:39:57 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by ant.bwct.de (8.12.11/8.12.11) with ESMTP id j9LKdssN026135; Fri, 21 Oct 2005 22:39:55 +0200 (CEST) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id j9LKdoXY038922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Oct 2005 22:39:51 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id j9LKdo3p037985; Fri, 21 Oct 2005 22:39:50 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id j9LKdni5037984; Fri, 21 Oct 2005 22:39:49 +0200 (CEST) (envelope-from ticso) Date: Fri, 21 Oct 2005 22:39:49 +0200 From: Bernd Walter To: Frank Behrens Message-ID: <20051021203948.GQ31913@cicely12.cicely.de> References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: freebsd-hackers@freebsd.org Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 21 Oct 2005 20:39:59 -0000 On Fri, Oct 21, 2005 at 10:35:43AM +0200, Frank Behrens wrote: > Hi, > > I'm writing a device driver for UART with a protocol, that can not be > handled by the default sio(4) driver. The driver works fine - the > only problem I have is to disable the attachment of sio(4) driver to > the device. If it is just needing tx-enable for RS485 you might use a standard FT232BM chip - they have support to do it transparently. However, if you need 9-bit or complex timing it's problematic. But even with 16550 and special kernel driver timing is hard to do it right. I personally build specialized USB and Ethernet devices for doing Modbus/RTU RS485 timing. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 21:32:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 011BC16A41F; Fri, 21 Oct 2005 21:32:01 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AFC043D5A; Fri, 21 Oct 2005 21:31:58 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 21 Oct 2005 17:48:33 -0400 From: John Baldwin To: David Schultz Date: Fri, 21 Oct 2005 17:28:30 -0400 User-Agent: KMail/1.8.2 References: <20051021131329.A16FC126E@smtp.263.net> <200510211239.35190.jhb@freebsd.org> <20051021203207.GA26616@VARK.MIT.EDU> In-Reply-To: <20051021203207.GA26616@VARK.MIT.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200510211728.32476.jhb@freebsd.org> Cc: delphij , freebsd-hackers@freebsd.org, freebsd-current , nocool Subject: Re: where to release proc.p_stats X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 21:32:01 -0000 On Friday 21 October 2005 04:32 pm, David Schultz wrote: > On Fri, Oct 21, 2005, John Baldwin wrote: > > On Friday 21 October 2005 09:13 am, nocool wrote: > > > freebsd-hackers=81=EF=81=BC=8Chello > > > > > > Question about 5.4 kernel source code. > > > I have some question about strust proc's initialize. Kernel use > > > proc_zone to allocate proc items and initialize them with proc_init > > > (sys\kern\kern_proc.c) function. In this function, we can find the > > > field proc.p_stats is allocated with pstats_alloc(), as > > > > > > p->p_stats =3D pstats_alloc(); > > > > > > and pstats_alloc is realized as > > > > > > malloc(sizeof(struct pstats), M_SUBPROC, M_ZERO|M_WAITOK); > > > > > > But I can't find where this field is freed. If it will not be release, > > > will there be memory leakage? > > > > Heh, das@ forgot to call pstats_free() when he did the changes. The > > reason is probably because proc_fini() doesn't do anything useful becau= se > > we never recycle proc structs. We should probably at least add the > > operations there though for documentation purposes. Something like this > > would work I think: > > I didn't put in the call because we never free proc structures, but > documenting what should happen if we ever do free them is a good > idea. There's a fair amount of other cleanup that needs to happen > as well, which you can probably find in the CVS history. (IIRC, > I'm guilty of removing the code at a time when more things depended > upon struct proc being type safe. Are there any remaining reasons > why we can't free struct procs at this point?) > > By the way, there's no reason why we can't fold struct pstats into > struct proc so we don't have to allocate and free it at all. > It's never shared, so the extra level of indirection just adds overhead. > The main reason I didn't make this change earlier was to maintain binary > compatibility when I backported my U-area changes to -STABLE. Looks like some of the functions (vm_dispose_proc() and sched_destroyproc()= )=20 have vanished, so this is all that would be in there now: Index: kern_proc.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/cvs/src/sys/kern/kern_proc.c,v retrieving revision 1.232 diff -u -r1.232 kern_proc.c =2D-- kern_proc.c 2 Oct 2005 23:27:56 -0000 1.232 +++ kern_proc.c 21 Oct 2005 21:21:45 -0000 @@ -196,8 +196,17 @@ static void proc_fini(void *mem, int size) { +#ifdef notnow + struct proc *p; + p =3D (struct proc *)mem; + pstats_free(p->p_stats); + ksegrp_free(FIRST_KSEGRP_IN_PROC(p)); + thread_free(FIRST_THREAD_IN_PROC(p)); + mtx_destroy(&p->p_mtx); +#else panic("proc reclaimed"); +#endif } /* =2D-=20 John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 22:04:32 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7594A16A42F; Fri, 21 Oct 2005 22:04:32 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26FAC43D45; Fri, 21 Oct 2005 22:04:32 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 21 Oct 2005 15:04:33 -0700 X-IronPort-Anti-Spam-Filtered: true Message-ID: <435965EE.7070504@elischer.org> Date: Fri, 21 Oct 2005 15:04:30 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <20051021131329.A16FC126E@smtp.263.net> <200510211239.35190.jhb@freebsd.org> <20051021203207.GA26616@VARK.MIT.EDU> <200510211728.32476.jhb@freebsd.org> In-Reply-To: <200510211728.32476.jhb@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: nocool , freebsd-hackers@freebsd.org, David Schultz , freebsd-current , delphij Subject: Re: where to release proc.p_stats X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 22:04:32 -0000 John Baldwin wrote: >On Friday 21 October 2005 04:32 pm, David Schultz wrote: > > >>On Fri, Oct 21, 2005, John Baldwin wrote: >> >> >>>On Friday 21 October 2005 09:13 am, nocool wrote: >>> >>> >>>>freebsd-hackersļ¼Œhello >>>> >>>> Question about 5.4 kernel source code. >>>> I have some question about strust proc's initialize. Kernel use >>>>proc_zone to allocate proc items and initialize them with proc_init >>>>(sys\kern\kern_proc.c) function. In this function, we can find the >>>>field proc.p_stats is allocated with pstats_alloc(), as >>>> >>>>p->p_stats = pstats_alloc(); >>>> >>>>and pstats_alloc is realized as >>>> >>>>malloc(sizeof(struct pstats), M_SUBPROC, M_ZERO|M_WAITOK); >>>> >>>>But I can't find where this field is freed. If it will not be release, >>>>will there be memory leakage? >>>> >>>> >>>Heh, das@ forgot to call pstats_free() when he did the changes. The >>>reason is probably because proc_fini() doesn't do anything useful because >>>we never recycle proc structs. We should probably at least add the >>>operations there though for documentation purposes. Something like this >>>would work I think: >>> >>> >>I didn't put in the call because we never free proc structures, but >>documenting what should happen if we ever do free them is a good >>idea. There's a fair amount of other cleanup that needs to happen >>as well, which you can probably find in the CVS history. (IIRC, >>I'm guilty of removing the code at a time when more things depended >>upon struct proc being type safe. Are there any remaining reasons >>why we can't free struct procs at this point?) >> >>By the way, there's no reason why we can't fold struct pstats into >>struct proc so we don't have to allocate and free it at all. >>It's never shared, so the extra level of indirection just adds overhead. >>The main reason I didn't make this change earlier was to maintain binary >>compatibility when I backported my U-area changes to -STABLE. >> >> > >Looks like some of the functions (vm_dispose_proc() and sched_destroyproc()) >have vanished, so this is all that would be in there now: > >Index: kern_proc.c >=================================================================== >RCS file: /usr/cvs/src/sys/kern/kern_proc.c,v >retrieving revision 1.232 >diff -u -r1.232 kern_proc.c >--- kern_proc.c 2 Oct 2005 23:27:56 -0000 1.232 >+++ kern_proc.c 21 Oct 2005 21:21:45 -0000 >@@ -196,8 +196,17 @@ > static void > proc_fini(void *mem, int size) > { >+#ifdef notnow >+ struct proc *p; > >+ p = (struct proc *)mem; >+ pstats_free(p->p_stats); >+ ksegrp_free(FIRST_KSEGRP_IN_PROC(p)); >+ thread_free(FIRST_THREAD_IN_PROC(p)); >+ mtx_destroy(&p->p_mtx); >+#else > panic("proc reclaimed"); >+#endif > } > > /* > > > sched_destroyproc was removed by someone I believe because "it was not used". if you were removing a proc you possibly should re introduce it. From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 22 06:31:41 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36FB716A41F for ; Sat, 22 Oct 2005 06:31:41 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9064243D45 for ; Sat, 22 Oct 2005 06:31:38 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp224-132.lns2.adl4.internode.on.net [203.122.224.132]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j9M6VPxI005636 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 22 Oct 2005 16:01:26 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org, ticso@cicely.de Date: Sat, 22 Oct 2005 16:00:59 +0930 User-Agent: KMail/1.8.2 References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <20051021203948.GQ31913@cicely12.cicely.de> In-Reply-To: <20051021203948.GQ31913@cicely12.cicely.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart19483092.JvN0611cXl"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510221601.07346.doconnor@gsoft.com.au> X-Spam-Score: 0.05 () FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: Frank Behrens Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2005 06:31:41 -0000 --nextPart19483092.JvN0611cXl Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 22 Oct 2005 06:09, Bernd Walter wrote: > I personally build specialized USB and Ethernet devices for doing > Modbus/RTU RS485 timing. We use 9 bit data RS485 (the ninth bit is used as an address mark so=20 microcontrollers can sleep until it turns up then check if it's addressed t= o=20 it and go back to sleep). I have been told it could be implemented as a line discipline but I am not = so=20 sure (since to do 9 bit transmition you need to change between mark & space= =20 parity on a byte by byte basis) We (well msmith originally) implemented it as a cut down hacked up copy of = sio=20 =2D this IS suboptimial so I think I'll have a look at implementing it via= =20 uart. =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 --nextPart19483092.JvN0611cXl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDWdyr5ZPcIHs/zowRAvZxAJ9AHmxao4hf0cjQl4nNNITSxC2FtgCffJGk N2AnORjfJuXzcnWo45U3WK4= =/pc1 -----END PGP SIGNATURE----- --nextPart19483092.JvN0611cXl-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 17:18:47 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF8F816A41F for ; Fri, 21 Oct 2005 17:18:47 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DAAC43D46 for ; Fri, 21 Oct 2005 17:18:46 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (kbczgz@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.1/8.13.1) with ESMTP id j9LHIi5Z060489 for ; Fri, 21 Oct 2005 19:18:45 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.1/8.13.1/Submit) id j9LHIi1o060488; Fri, 21 Oct 2005 19:18:44 +0200 (CEST) (envelope-from olli) Date: Fri, 21 Oct 2005 19:18:44 +0200 (CEST) Message-Id: <200510211718.j9LHIi1o060488@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.11-RELEASE (i386)) X-Mailman-Approved-At: Sat, 22 Oct 2005 12:08:17 +0000 Cc: Subject: Re: FreeBSD UFS2 snapshots, and math ... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 17:18:48 -0000 user wrote: > Let's say I have a filesystem, and on that filesystem I create a snapshot > every single night, and every night I delete the snapshot from 5 nights > ago. This means that at all times, I have four snapshots running on that > filesystem, one from 1 day ago, one from 2 days ago, one from 3 days ago, > and one from 4 days ago. > > Let's also assume that the percent change of the filesystem is 5% (every > day 5% of the blocks in the filesystem are either changed or deleted). > > Does this mean that if that 5% change is a different 5% every day, that > the one day ago snapshot will be size 5%_of_filesystem, and that the 2 day > ago snapshot will be size 10%_of_filesystem, day 3 15% and day 4 20%, for > a total of 50% of the total filesystem taken up with snapshot data ? No, the size requirement of every new snapshot should be 5%. Only the data that is modified requires new space in every case, even if there are multiple snapshots. In other words: If you have five snapshots, and you modify a file, should the original content of the file be copied to every snapshot, i.e. five times? That would be terribly inefficient. That's _not_ how snapshots work. Instead, when you modify the file, the new data will be written to new disk blocks, and the blocks containing the original data are assigned to the snapshots. There is no copying involved, and the data exists only once on the disk. Therefore, when you change 5%, the size requirement for the snapshots grows by 5%, no matter how many snapshots you have and how old they are. > If the 5% data changed per day is the _same_ 5% every day (perhaps > changing the same table in a DB every day, That depends on the DB. For PostgreSQL the WAL files will almost always occupy new (different) disk space, even if you only modify the same table over and over again. That's a feature, not a bug. ;-) > or perhaps changing the same > block of lines in a text file every day) That depends on the editor. Some editors write a completely new file and mv(2) it into the place of the original one. You can check for this case by watching the inode number of the file ("ls -li"). If it changed after editing, then the editor wrote a new file, so it has occupied different blocks on the filesystem. > does that mean that every day > simply represents 5%_of_filesystem, for a total of 20% of the total > filesystem in use at all times for snapshot data ? That should happen in all cases, no matter what data you modify, whether it's the same as the previous night or not. > Finally, are there any snapshot diag tools at all ? Like, something that > reports snapshot sizes Well, it's not easy to define "snapshot size". Of course it has a virtual size which is reported by df(1), and a physical size reported by "ls -l". But the data of the snapshots consists of regular filesystem blocks which have not been modified yet, and blocks of original content that has been modified -- but these might be shared between multiple snapshots, so how would you account them? > percent of disk used for snapshots, Well, that should be easy to calculate from df(1). I think there's already a tool in the ports collection which does that. > and maybe even > a way for me to actually calculate what the percent change for time period > X is for a particular filsystem >? Basically, it depends exactly on the amount of data that you modify. When you modify or delete blocks that have not been modified since the last snapshot had been created, the space requirement of the snapshot data will grow by blocks. The number of snapshots in existence does not matter. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "When your hammer is C++, everything begins to look like a thumb." -- Steve Haflich, in comp.lang.c++ From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 22 12:18:33 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C140816A41F for ; Sat, 22 Oct 2005 12:18:33 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from ant.bwct.de (ant.bwct.de [85.159.14.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D09E43D45 for ; Sat, 22 Oct 2005 12:18:32 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by ant.bwct.de (8.12.11/8.12.11) with ESMTP id j9MCIThM029473; Sat, 22 Oct 2005 14:18:30 +0200 (CEST) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id j9MCINvZ058033 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 22 Oct 2005 14:18:23 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id j9MCINKr041143; Sat, 22 Oct 2005 14:18:23 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id j9MCIJf2041142; Sat, 22 Oct 2005 14:18:19 +0200 (CEST) (envelope-from ticso) Date: Sat, 22 Oct 2005 14:18:19 +0200 From: Bernd Walter To: "Daniel O'Connor" Message-ID: <20051022121818.GR31913@cicely12.cicely.de> References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <20051021203948.GQ31913@cicely12.cicely.de> <200510221601.07346.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510221601.07346.doconnor@gsoft.com.au> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: Frank Behrens , freebsd-hackers@freebsd.org, ticso@cicely.de Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 22 Oct 2005 12:18:34 -0000 On Sat, Oct 22, 2005 at 04:00:59PM +0930, Daniel O'Connor wrote: > On Sat, 22 Oct 2005 06:09, Bernd Walter wrote: > > I personally build specialized USB and Ethernet devices for doing > > Modbus/RTU RS485 timing. > > We use 9 bit data RS485 (the ninth bit is used as an address mark so > microcontrollers can sleep until it turns up then check if it's addressed to > it and go back to sleep). That's the big win with 9 bit. Modbus uses 8 bit so each controller has to actively listen. The RTU variant uses fixed idle times to mark packet ends, which is hard to do right in kernel and unreliable to do from userland. Since I needed multi-OS support and have at least one customer with many busses the kernel was no option. > I have been told it could be implemented as a line discipline but I am not so > sure (since to do 9 bit transmition you need to change between mark & space > parity on a byte by byte basis) Don't know about line discipline abilities, but I remember that some trustfull persons declared this to be doable. It is the whole hardware design that won't fit. As long as timing is not critical and you have legacy serials it is OK. But many USB uarts don't have native 9 bit support as well, and the nature of USB is that you really want large FiFos. This is a dead track IMHO. > We (well msmith originally) implemented it as a cut down hacked up copy of sio > - this IS suboptimial so I think I'll have a look at implementing it via > uart. The whole thing is suboptiomal. Today there are no reasons to not offload the tricky parts into external devices. I'd originaly used Atmel Mega8 plus Philips PDIUSBD11 for this. It was a slow but reliable and cheap combination, but Piliphs stopped production of the chip. Today I use Mega64 and PDIUSBD12 for USB and Mega128 with RTL8019AS for Ethernet, which gives me two UART for use in a single device. The controller have 9 bit wide FiFos. If you are already in the 8051 world, you might look at TI TUSB3410. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 22 13:00:51 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E63A16A41F for ; Sat, 22 Oct 2005 13:00:51 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17D3143D49 for ; Sat, 22 Oct 2005 13:00:49 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp224-132.lns2.adl4.internode.on.net [203.122.224.132]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j9MD0ivF008273 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 22 Oct 2005 22:30:45 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: ticso@cicely.de Date: Sat, 22 Oct 2005 22:30:37 +0930 User-Agent: KMail/1.8.2 References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <200510221601.07346.doconnor@gsoft.com.au> <20051022121818.GR31913@cicely12.cicely.de> In-Reply-To: <20051022121818.GR31913@cicely12.cicely.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1606071.GO29isFLg7"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510222230.39376.doconnor@gsoft.com.au> X-Spam-Score: 0.05 () FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: Frank Behrens , freebsd-hackers@freebsd.org Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2005 13:00:51 -0000 --nextPart1606071.GO29isFLg7 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 22 Oct 2005 21:48, Bernd Walter wrote: > That's the big win with 9 bit. > Modbus uses 8 bit so each controller has to actively listen. > The RTU variant uses fixed idle times to mark packet ends, which is > hard to do right in kernel and unreliable to do from userland. > Since I needed multi-OS support and have at least one customer with > many busses the kernel was no option. =46air enough. Your solution sounds very flexible and useful! > Don't know about line discipline abilities, but I remember that some > trustfull persons declared this to be doable. > It is the whole hardware design that won't fit. > As long as timing is not critical and you have legacy serials it is OK. > But many USB uarts don't have native 9 bit support as well, and the > nature of USB is that you really want large FiFos. > This is a dead track IMHO. Yeah, I think the line discipline approach is feasible with legacy hardware= ,=20 but USB makes it difficult to do. > The whole thing is suboptiomal. > Today there are no reasons to not offload the tricky parts into > external devices. Heh, apart from dev time :) > I'd originaly used Atmel Mega8 plus Philips PDIUSBD11 for this. > It was a slow but reliable and cheap combination, but Piliphs stopped > production of the chip. > Today I use Mega64 and PDIUSBD12 for USB and Mega128 with RTL8019AS for > Ethernet, which gives me two UART for use in a single device. > The controller have 9 bit wide FiFos. > If you are already in the 8051 world, you might look at TI TUSB3410. Ahh looks interesting. I have used Atmel a bit to play around with it.. I h= ave=20 some sample 3410's but haven't even assembled the test board I made :-/ =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 --nextPart1606071.GO29isFLg7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDWjf35ZPcIHs/zowRAgcqAJkBQ5oPbnDKSfJ1odRtsTmYLnL8QACfd3IT QbrGuCas3huCBoUybB4M0Wg= =uuml -----END PGP SIGNATURE----- --nextPart1606071.GO29isFLg7-- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 22 15:17:09 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0C9B16A420; Sat, 22 Oct 2005 15:17:09 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from pinky.frank-behrens.de (pinky.frank-behrens.de [82.139.199.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 088A443D46; Sat, 22 Oct 2005 15:17:08 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from [192.168.20.31] (pulse.behrens [192.168.20.31]) by pinky.frank-behrens.de (8.13.4/8.13.4) with ESMTP/MSA id j9MFGnqT026691; Sat, 22 Oct 2005 17:16:50 +0200 (CEST) (envelope-from frank@pinky.sax.de) Message-Id: <200510221516.j9MFGnqT026691@pinky.frank-behrens.de> From: "Frank Behrens" To: freebsd-hackers@FreeBSD.ORG Date: Sat, 22 Oct 2005 17:16:49 +0200 MIME-Version: 1.0 Priority: normal In-reply-to: <20051021.113739.32720831.imp@bsdimp.com> References: <200510211216.37814.jhb@freebsd.org> X-mailer: Pegasus Mail for Windows (4.30 public beta 1, DE v4.30 PB1 (for PB1)) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Cc: jhb@FreeBSD.ORG Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2005 15:17:10 -0000 Warner, John and others, thanks for your fast responses. John Baldwin wrote on 21 Oct 2005 12:16: > But you could hack the sio(4) driver to check its IO port and return ENXIO if > it has a certain value, for example. Yes, this would not be a problem for me. But I want to publish my driver as port and make it for the user as easy as possible. That includes not the need for building a new kernel. M. Warner Losh wrote on 21 Oct 2005 10:06: > Another "soltution" is to not have sio in your kernel while you are > debugging your driver. Well, you used already the quotes. It is not an option for me, because my system has no keyboard and monitor attached and the serial console is my only way to see the panic messages. ;-) > Another solution would be to have your driver use the tty layer > instead of banging the hardware directly, if that is compatible with > the goals of your driver. This solution isn't in quotes because for > some class of devices (say a keyboard driver for a sun or apple newton > keyboard that does serial), it might be the right one. Hm, this looks even more complicated and has more overhead. To show shortly my requirements: The protocol is for an eib driver, (further information on http://www.sax.de/~frank/eib4bsd/), it uses 9600 baud on serial line. If the PC wants to send a telegram it resets RTS and has to poll CTS. If CTS is active the transmission of one byte is possible. If the last bit is sent (transceiver shift empty!) the PC sets RTS and waits until CTS is inactive. Then a new handshake can start and a transmission of about 30 bytes must be finished in 130 ms. IMHO this can be handled only in an interrupt routine with low overhead. M. Warner Losh wrote on 21 Oct 2005 11:37: > I'd like to be able to say that sio0 is at handle=\_SB_.PCI0.PX40.UAR2 > rather than some arbitrary address. Or that bge1 is at > > bge0 pnpinfo vendor=0x14e4 device=0x16a6 subvendor=0x14e4 subdevice=0x8009 class=0x020000 at slot=3 function=0 handle=\_SB_.PCI0.G0PA.LAN0 > miibus0 > brgphy0 pnpinfo oui=0x818 model=0x16 rev=0x2 at phyno=1 > bge1 pnpinfo vendor=0x14e4 device=0x16a6 subvendor=0x14e4 subdevice=0x8009 class=0x020000 at slot=4 function=0 handle=\_SB_.PCI0.G0PA.LAN1 > > either at pci2.4.0 *OR* at handle=\_SB_.PCI0.G0PA.LAN1 (or even > handle=LAN1). So there'd need to be some kind of bus specific mapping > function that would say true or false if a given device_t on that bus > matched the string presented. For my driver I made already a sort of this. Part of my probe routine is if (resource_string_value(EIBNAME, 0, "at", &hintBus)) return (ENXIO); if (strcmp(hintBus, "pci")) return (ENXIO); if (resource_int_value(EIBNAME, 0, "bus", &hint) == 0 && pci_get_bus(device) != hint) { return (ENXIO); } if (resource_int_value(EIBNAME, 0, "slot", &hint) == 0 && pci_get_slot(device) != hint) { return (ENXIO); } if (resource_int_value(EIBNAME, 0, "function", &hint) == 0 && pci_get_function(device) != hint) { return (ENXIO); } So my conclusion is: 1. Preventing a driver to attach to a specified resource is in current FreeBSD more complicated compared to FreeBSD 4.x 2. I will create a PR to change the sio(4) driver, that it returns BUS_PROBE_DEFAULT instead of BUS_PROBE_SPECIFIC. Then further patching is not necessary. Thanks for your suggestions. Regards, Frank -- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available. From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 22 15:17:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AE9816A41F for ; Sat, 22 Oct 2005 15:17:21 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from pinky.frank-behrens.de (pinky.frank-behrens.de [82.139.199.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B7FC43D45 for ; Sat, 22 Oct 2005 15:17:20 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from [192.168.20.31] (pulse.behrens [192.168.20.31]) by pinky.frank-behrens.de (8.13.4/8.13.4) with ESMTP/MSA id j9MFHIjL026698; Sat, 22 Oct 2005 17:17:19 +0200 (CEST) (envelope-from frank@pinky.sax.de) Message-Id: <200510221517.j9MFHIjL026698@pinky.frank-behrens.de> From: "Frank Behrens" To: Marcel Moolenaar , freebsd-hackers@freebsd.org Date: Sat, 22 Oct 2005 17:17:17 +0200 MIME-Version: 1.0 Priority: normal In-reply-to: <24F58EA6-C84B-4966-A973-D91AB494239C@xcllnt.net> References: <20051021.100635.115989045.imp@bsdimp.com> X-mailer: Pegasus Mail for Windows (4.30 public beta 1, DE v4.30 PB1 (for PB1)) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Cc: Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2005 15:17:21 -0000 Marcel Moolenaar wrote on 21 Oct 2005 12:10: > A better alternative is to teach uart(4) about the protocol. It's > designed to allow multiple protocols. May be this could be possible, but I believe I must rewrite big parts of the driver. I don't know if this is the better solution... Regards, Frank -- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available. From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 22 16:33:44 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3041A16A41F; Sat, 22 Oct 2005 16:33:44 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7D5E43D45; Sat, 22 Oct 2005 16:33:43 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9MGVIkK041074; Sat, 22 Oct 2005 10:31:18 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 22 Oct 2005 10:32:42 -0600 (MDT) Message-Id: <20051022.103242.98606517.imp@bsdimp.com> To: frank@pinky.sax.de From: "M. Warner Losh" In-Reply-To: <200510221516.j9MFGnqT026691@pinky.frank-behrens.de> References: <200510211216.37814.jhb@freebsd.org> <20051021.113739.32720831.imp@bsdimp.com> <200510221516.j9MFGnqT026691@pinky.frank-behrens.de> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 22 Oct 2005 10:31:18 -0600 (MDT) Cc: freebsd-hackers@FreeBSD.ORG, jhb@FreeBSD.ORG Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2005 16:33:44 -0000 In message: <200510221516.j9MFGnqT026691@pinky.frank-behrens.de> "Frank Behrens" writes: : > Another solution would be to have your driver use the tty layer : > instead of banging the hardware directly, if that is compatible with : > the goals of your driver. This solution isn't in quotes because for : > some class of devices (say a keyboard driver for a sun or apple newton : > keyboard that does serial), it might be the right one. : : Hm, this looks even more complicated and has more overhead. To show : shortly my requirements: The protocol is for an eib driver, (further : information on http://www.sax.de/~frank/eib4bsd/), it uses 9600 baud : on serial line. If the PC wants to send a telegram it resets RTS and : has to poll CTS. If CTS is active the transmission of one byte is : possible. If the last bit is sent (transceiver shift empty!) the PC : sets RTS and waits until CTS is inactive. Then a new handshake can : start and a transmission of about 30 bytes must be finished in 130 : ms. IMHO this can be handled only in an interrupt routine with low : overhead. That's only about a 25% duty cycle on the line. You might look at the uart driver to see if you can hook into it in such a way as to get the notification of these events via interrupt. I thought that when the control bits changed there was an interrupt. : M. Warner Losh wrote on 21 Oct 2005 11:37: : > I'd like to be able to say that sio0 is at handle=\_SB_.PCI0.PX40.UAR2 : > rather than some arbitrary address. Or that bge1 is at : > : > bge0 pnpinfo vendor=0x14e4 device=0x16a6 subvendor=0x14e4 subdevice=0x8009 class=0x020000 at slot=3 function=0 handle=\_SB_.PCI0.G0PA.LAN0 : > miibus0 : > brgphy0 pnpinfo oui=0x818 model=0x16 rev=0x2 at phyno=1 : > bge1 pnpinfo vendor=0x14e4 device=0x16a6 subvendor=0x14e4 subdevice=0x8009 class=0x020000 at slot=4 function=0 handle=\_SB_.PCI0.G0PA.LAN1 : > : > either at pci2.4.0 *OR* at handle=\_SB_.PCI0.G0PA.LAN1 (or even : > handle=LAN1). So there'd need to be some kind of bus specific mapping : > function that would say true or false if a given device_t on that bus : > matched the string presented. : : For my driver I made already a sort of this. Part of my probe routine : is : if (resource_string_value(EIBNAME, 0, "at", &hintBus)) : return (ENXIO); : if (strcmp(hintBus, "pci")) : return (ENXIO); : : if (resource_int_value(EIBNAME, 0, "bus", &hint) == 0 && : pci_get_bus(device) != hint) { : return (ENXIO); : } : if (resource_int_value(EIBNAME, 0, "slot", &hint) == 0 && : pci_get_slot(device) != hint) { : return (ENXIO); : } : if (resource_int_value(EIBNAME, 0, "function", &hint) == 0 && : pci_get_function(device) != hint) { : return (ENXIO); : } There's problems doing this in the general case. I tried doing something similar to this a few years back, and discovered that doing it in the driver caused problems. Specifically, if another device is before you in the probe order, that device might snag the hinted device's location. With most drivers returning BUS_PROBE_DEFAULT these days, this is effectively masked. It is also tedious and error-prone to specificy things this way... it will likely be completely adequate for most of your needs, however... : So my conclusion is: : 2. I will create a PR to change the sio(4) driver, that it returns : BUS_PROBE_DEFAULT instead of BUS_PROBE_SPECIFIC. : Then further patching is not necessary. I believe that's correct. Warner