From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 03:27: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 7A04616A42B for ; Sun, 7 Aug 2005 03:27:45 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F073442E7 for ; Sun, 7 Aug 2005 02:52:19 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id E2986208CBB; Sat, 6 Aug 2005 19:52:18 -0700 (PDT) Received: from [192.168.2.3] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j772qH1r039797; Sat, 6 Aug 2005 19:52:18 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <42F57761.6030607@elischer.org> Date: Sat, 06 Aug 2005 19:52:17 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Minh Tran References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel code of reseting/ignoring tcp SYN packets 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, 07 Aug 2005 03:27:45 -0000 Minh Tran wrote: > ** Reply Requested When Convenient ** > > Hi everyone, > > I was looking around for the files of Kernel code where SYN messages are sent, > so we can simply inject some code to send back a reset messages or ignore the SYN requests. > I was looking at the function ioctl() which takes fd of the tcp socket. > As i track the function down, there is also another call to the dev_ioclt() function where all parameters are passed down. > However, i was not sucessful with finding out the description of this dev_ioclt() function. > I am having a bit of trouble in finding out the way of injecting code in the kernel to deal with SYN packets. > I am thinking of using ipfw to either reset or drop SYN packets. that's what I would do as it already has that option. "reset" or "drop" keywords. reset Discard packets that match this rule, and if the packet is a TCP packet, try to send a TCP reset (RST) notice. The search termi- nates. in addition, in 6.x (or is it just 7?) you can hook an ipfw rule directly into a netgraph node that you have loaded that could do arbitrary processing. and even pass it back. > > Would anyone have some hints on the clean way of injecting some code to deal with SYN packets > or could you give me some ideas on which files i should look at? I really appreciate that. > I saw some promising files in src/sys/netinet but they are not all clear in my mind. > > Thanks heaps! > > > Swinburne University of Technology > CRICOS Provider Code: 00111D > > NOTICE > This e-mail and any attachments are confidential and intended only for the use of the addressee. They may contain information that is privileged or protected by copyright. If you are not the intended recipient, any dissemination, distribution, printing, copying or use is strictly prohibited. The University does not warrant that this e-mail and any attachments are secure and there is also a risk that it may be corrupted in transmission. It is your responsibility to check any attachments for viruses or defects before opening them. If you have received this transmission in error, please contact us on +61 3 9214 8000 and delete it immediately from your system. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 08:07:20 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 843A716A41F for ; Sun, 7 Aug 2005 08:07:20 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0105944525 for ; Sun, 7 Aug 2005 08:07:18 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from sinanica.bg.datamax (sinanica.bg.datamax [192.168.10.1]) by jengal.datamax.bg (Postfix) with QMQP id 21ACA87C8; Sun, 7 Aug 2005 11:07:17 +0300 (EEST) Received: (nullmailer pid 40328 invoked by uid 1004); Sun, 07 Aug 2005 08:07:16 -0000 Date: Sun, 7 Aug 2005 11:07:16 +0300 From: Vasil Dimov To: Peter Jeremy Message-ID: <20050807080716.GA40148@sinanica.bg.datamax> References: <20050806114935.GB7708@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <20050806114935.GB7708@cirb503493.alcatel.com.au> X-OS: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i Cc: hackers@FreeBSD.org Subject: Re: Finding an illegal instruction in gnucash/guile X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2005 08:07:20 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Aug 06, 2005 at 09:49:36PM +1000, Peter Jeremy wrote: > ... > scratch with different CPUTYPE and/or CFLAGS? (I'm currently using > CPUTYPE=athlon-xp and CFLAGS=-O -g). Hmmz, CFLAGS=-O -g, what do you expect from this combination? gcc(1): Without `-O', the compiler's goal is to reduce the cost of com- pilation and to make debugging produce the expected results. --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFC9cEzFw6SP/bBpCARAh/TAJ4hiXA6AJWef9Ppb4wa+hiyz6KXFwCg1f0i 2tPlG27zXxdSbh4a8EURmIc= =X1yB -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 09:04: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 0CA5C16A467 for ; Sun, 7 Aug 2005 09:04:03 +0000 (GMT) (envelope-from gh1001@rbg.informatik.tu-darmstadt.de) Received: from ultra02.rbg.informatik.tu-darmstadt.de (ultra02.rbg.informatik.tu-darmstadt.de [130.83.160.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E61844041 for ; Sun, 7 Aug 2005 09:03:25 +0000 (GMT) (envelope-from gh1001@rbg.informatik.tu-darmstadt.de) Received: from [130.83.160.104] (ultra14.rbg.informatik.tu-darmstadt.de [130.83.160.104]) by ultra02.rbg.informatik.tu-darmstadt.de (8.11.7p1+Sun/8.11.6) with ESMTP id j7793ON02606 for ; Sun, 7 Aug 2005 11:03:24 +0200 (MEST) Message-ID: <42F5CE5C.9060602@rbg.informatik.tu-darmstadt.de> Date: Sun, 07 Aug 2005 11:03:24 +0200 From: Gerhard Hoffmann User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.11) Gecko/20050731 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: pthreads 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: Sun, 07 Aug 2005 09:04:04 -0000 Hi Phil, I think the easiest solution for your problem is something like this: #include #include volatile unsigned long len = 0; pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static void cleanup_handler(void *arg) { (void)pthread_mutex_unlock(&lock); (void)pthread_mutex_destroy(&lock); (void)pthread_cond_destroy(&cond); } static void *thread_routine(void *args) { pthread_cleanup_push(cleanup_handler,(void*)NULL); while (1) { pthread_mutex_lock(&lock); while(len == 0) pthread_cond_wait(&cond, &lock); fprintf(stderr,"consumer: %lu\n", --len); pthread_cond_signal(&cond); pthread_mutex_unlock(&lock); } pthread_cleanup_pop(0); return NULL; } int main(int argc, char **argv) { pthread_t t; int i; pthread_create(&t, NULL, &thread_routine, NULL); for (i = 0; i < 100; i++) { pthread_mutex_lock(&lock); while(len > 5) pthread_cond_wait(&cond, &lock); fprintf(stderr,"producer: %lu\n", ++len); pthread_cond_signal(&cond); pthread_mutex_unlock(&lock); } pthread_cancel(t); pthread_join(t, NULL); return 0; } Gerhard From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 10:08: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 B783D16A41F for ; Sun, 7 Aug 2005 10:08:45 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38B584423A for ; Sun, 7 Aug 2005 10:08:45 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== Received: from mp-217-199-237.daxnet.no ([193.217.199.237] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 43307752; Sun, 07 Aug 2005 12:08:42 +0200 From: Hans Petter Selasky To: Ian Dowse Date: Sun, 7 Aug 2005 12:09:40 +0200 User-Agent: KMail/1.7 References: <200508061702.aa50464@nowhere.iedowse.com> In-Reply-To: <200508061702.aa50464@nowhere.iedowse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508071209.41695.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: How to do proper locking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hselasky@c2i.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2005 10:08:45 -0000 On Saturday 06 August 2005 18:02, Ian Dowse wrote: > In message <200508060139.57143.hselasky@c2i.net>, Hans Petter Selasky writes: > >Yes, you are right, but the problem is, that for most callback systems in > > the kernel, there is no mechanism that will pre-lock some custom mutex > > before calling the callback. > > > >I am not speaking about adding lines to existing code, but to add one > > extra parameter to the setup functions, where the mutex that should be > > locked before calling the callback(s) can be specified. If it is NULL, > > Giant will be used. > > > >The setup functions I have in mind are for example: "make_dev()", > >"bus_setup_intr()", "callout_reset()" ... and in general all callback > > systems that look like these. > > Note that FreeBSD's callout subsystem does already have such a > mechanism. Just use callout_init_mtx() and the specified mutex will > be acquired before the callback is invoked. See callout(9) for more > details. Ok, thanks for the pointer. The only limitation about the "callout"'s solution is that it only takes one callback at a time. So the global lock has to be locked every time it calls a callback. But actually, isn't it an idea that this "check some value before calling callback" mechanism, has some helper functions in the kernel, so that we don't end up with "n" different solutions ? --HPS > > Iancurr_cancelled From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 19:11:05 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 B9A4516A41F for ; Sun, 7 Aug 2005 19:11:05 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F32343D46 for ; Sun, 7 Aug 2005 19:11:04 +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 mail03.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j77JAg8M010493 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 8 Aug 2005 05:10:42 +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 j77JAfSR009963; Mon, 8 Aug 2005 05:10:41 +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 j77JAfGw009962; Mon, 8 Aug 2005 05:10:41 +1000 (EST) (envelope-from pjeremy) Date: Mon, 8 Aug 2005 05:10:41 +1000 From: Peter Jeremy To: Vasil Dimov Message-ID: <20050807191041.GE7708@cirb503493.alcatel.com.au> References: <20050806114935.GB7708@cirb503493.alcatel.com.au> <20050807080716.GA40148@sinanica.bg.datamax> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050807080716.GA40148@sinanica.bg.datamax> User-Agent: Mutt/1.4.2i Cc: hackers@freebsd.org Subject: Re: Finding an illegal instruction in gnucash/guile 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, 07 Aug 2005 19:11:05 -0000 On Sun, 2005-Aug-07 11:07:16 +0300, Vasil Dimov wrote: >On Sat, Aug 06, 2005 at 09:49:36PM +1000, Peter Jeremy wrote: >> >... >> scratch with different CPUTYPE and/or CFLAGS? (I'm currently using >> CPUTYPE=athlon-xp and CFLAGS=-O -g). > >Hmmz, CFLAGS=-O -g, what do you expect from this combination? Optimise the code and generate symbolic debugging information. Unlike many other compilers, "-O" and "-g" are not mutually exclusive in gcc. >gcc(1): >Without `-O', the compiler's goal is to reduce the cost of com- >pilation and to make debugging produce the expected results. Without "-O", gcc will compile each statement independently and ensure that any results are assigned to the target variables at the end of each statement. This makes is easy to debug because the program flow will match the source code. "-O" allows the compiler to re-order code, delete dead code, remove variable assignments, etc. The code is still functionally equivalent but is not as easy to debug because of the re-arrangements. This is more suited to production code where you don't intend to perform any debugging but do not want to make it impossible to debug if an unexpected problem occurs. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 20:24:11 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 936AF16A42B for ; Sun, 7 Aug 2005 20:24:11 +0000 (GMT) (envelope-from alexjeffburke@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 193AD44112 for ; Sun, 7 Aug 2005 20:00:58 +0000 (GMT) (envelope-from alexjeffburke@gmail.com) Received: by nproxy.gmail.com with SMTP id c2so189810nfe for ; Sun, 07 Aug 2005 13:00:57 -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=VQ9cqFV/TQkYK6JrIC41coD4IV679PkIAhu1lv9XrMrlKBylCMEybGvthEQfBZVIyiTkN5P7IMivLsrjeqr5BDK8gMFV6n0BKLLJElUGMAoGEqaf3FyzghkmLgorjpHN1y/LaKEubVxOnj6Z3vJQVIXE0h1hBqoQvv2R/1oE+/k= Received: by 10.48.144.1 with SMTP id r1mr137596nfd; Sun, 07 Aug 2005 13:00:57 -0700 (PDT) Received: by 10.48.249.8 with HTTP; Sun, 7 Aug 2005 13:00:57 -0700 (PDT) Message-ID: Date: Sun, 7 Aug 2005 21:00:57 +0100 From: Alex Burke To: FreeBSD-HACKERS Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Model device driver / Newbus 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, 07 Aug 2005 20:24:13 -0000 Hi, I want to try writing a driver for an MCA card. I am just wondering if there is any skeleton driver (preferably a bus like PCI), and also whether the newbus framework is used for MCA drivers. What is the preferred method of writing drivers now? Thanks, Alex J Burke. From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 20:24: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 8B94D16A478; Sun, 7 Aug 2005 20:24:32 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (www.creo.hu [217.113.62.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52CA84419F; Sun, 7 Aug 2005 20:05:39 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (localhost [127.0.0.1]) by beastie.creo.hu (8.13.3/8.13.3) with ESMTP id j77K4uq0002176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 7 Aug 2005 22:04:56 +0200 (CEST) (envelope-from csaba@beastie.creo.hu) Received: (from csaba@localhost) by beastie.creo.hu (8.13.3/8.13.3/Submit) id j77K4pIj002169; Sun, 7 Aug 2005 22:04:51 +0200 (CEST) (envelope-from csaba) Date: Sun, 7 Aug 2005 22:04:51 +0200 From: Csaba Henk To: freebsd-hackers@freebsd.org Message-ID: <20050807200451.GK73367@beastie.creo.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: brennan.stehling@offwhite.net, scottl@freebsd.org Subject: Soc ssh fs: dummy Fuse module aviable for review 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, 07 Aug 2005 20:24:33 -0000 Hi! I am Csaba Henk, Google Summer of Code participant at FreeBSD. I am to create an ssh based virtual networking filesystem, by now that boils down to porting Fuse (http://fuse.sourceforge.net) (doing so brings much more to FreeBSD than having an ssh based filesystem). Now I want to tell you about a test capable fragment of this ongoing work. If you are interested, you'll find all further info at a dedicated wiki page, http://wikitest.freebsd.org/moin.cgi/FuseFilesystem. I'd appreciate testing and code review. I can also serve with a weird bug when using multi-threaded Fuse daemons, with simple instructions how to trigger it. I guess seasoned BSD hackers will see immediately what's wrong with my read(2) handling. Please send comments to the soc-chenk email address of the FreeBSD project. Regards, Csaba From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 21:19: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 21E0016A41F for ; Sun, 7 Aug 2005 21:19:45 +0000 (GMT) (envelope-from jhopper@bsdhosting.net) Received: from bsdhosting.net (bsdhosting.net [65.39.221.113]) by mx1.FreeBSD.org (Postfix) with SMTP id A924843D55 for ; Sun, 7 Aug 2005 21:19:44 +0000 (GMT) (envelope-from jhopper@bsdhosting.net) Received: (qmail 18802 invoked from network); 7 Aug 2005 21:17:16 -0000 Received: from unknown (HELO ?192.168.1.2?) (jhopper@bsdhosting.net@65.39.221.113) by bsdhosting.net with SMTP; 7 Aug 2005 21:17:16 -0000 From: Justin Hopper To: freebsd-hackers@freebsd.org Content-Type: text/plain Date: Sun, 07 Aug 2005 14:19:41 -0700 Message-Id: <1123449581.10429.425.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) Content-Transfer-Encoding: 7bit Subject: unionfs umount 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: Sun, 07 Aug 2005 21:19:45 -0000 Hello, If this question belongs on freebsd-fs, let me know and I'll repost. I had emailed a question to the list a few months ago, asking what the current status was on unionfs and whether it was now somewhat stable, since the man page still reports it as broken and without a maintainer. Some people on the list had reported that they had been using unionfs without any problems for a few releases now, so I thought I would try merging some of what we do with jails into a model using unionfs and see if I ran into any problems. The initial tests went fine of mounting an empty vnode, which would represent client disk space, and mounting a unionfs mount of a complete world into the vnode and starting the jail with this unionfs mounted as / inside the jail. The system runs fine, but I ran into a problem when taking it down. The system calls /etc/rc.shutdown, then kills the remaining processes from the host environment, then umounts /proc and /dev. No problems. But when the unionfs is called for umount, it reports EBUSY, and never releases. Forcing it to umount with "-f" hangs the calling process, never to return. Even upon system shutdown or reboot, the process will not terminate, and will even prevent the box from rebooting sometimes. I've checked that no processes are left in the jail and the prison itself seems to be fully collapsed. I also checked open file handles with fstat and lsof. I can't seem to find anything running that would be tying up the mount point. Could it be that something called vfs_busy on the mountpoint, then terminated and never released it? Is there any tools available to check details like this? Or even, to remove such a bit from the mount so that it can be umounted safely? A few other side notes on unionfs, it seems pretty solid other than the above and the white-out support (if unionfs is the lower layer and vnode is the top layer, you can "delete" files that only exist in the lower layer and they do not show up in the upper vnode layer anymore, but are still intact in the lower unionfs layer) is nice, though that's probably a feature of ufs since ufs is controlling the upper layer. A completely different question: We are thinking of removing the use of vnodes to use as client disk space but need some way to control their disk space usage. Is there such a thing as directory quotas? I'm sure somebody must have asked this before, but I've never heard mention of it. I assume there must be some reason to avoid it, or somebody would have put this in by now. Thanks for any suggestions. -- Justin Hopper UNIX Systems Engineer BSDHosting.net Hosting Division of Digital Oasys Inc. http://www.bsdhosting.net From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 23:47:08 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 97AA216A41F for ; Sun, 7 Aug 2005 23:47:08 +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 8FE0C43D64 for ; Sun, 7 Aug 2005 23:47:02 +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 j77NjsLK084782; Sun, 7 Aug 2005 17:45:54 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 07 Aug 2005 17:46:57 -0600 (MDT) Message-Id: <20050807.174657.19493876.imp@bsdimp.com> To: alexjeffburke@gmail.com From: "M. Warner Losh" In-Reply-To: References: 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]); Sun, 07 Aug 2005 17:45:54 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: Model device driver / Newbus 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, 07 Aug 2005 23:47:08 -0000 In message: Alex Burke writes: : Hi, : : I want to try writing a driver for an MCA card. : : I am just wondering if there is any skeleton driver (preferably a bus : like PCI), and also whether the newbus framework is used for MCA : drivers. What is the preferred method of writing drivers now? MCA as in micro channel architecture? If so, then you should look at the ep driver. It is one of the few in the tree that has a mca attachment, and would be good to review. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 01:06: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 6F10E16A41F for ; Mon, 8 Aug 2005 01:06:02 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31F4E43E79 for ; Mon, 8 Aug 2005 01:06:02 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 925E11FDED6; Sun, 7 Aug 2005 18:06:01 -0700 (PDT) Received: from [192.168.2.3] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j78160d3022911; Sun, 7 Aug 2005 18:06:01 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <42F6AFF4.9070600@elischer.org> Date: Sun, 07 Aug 2005 18:05:56 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: "M. Warner Losh" References: <20050807.174657.19493876.imp@bsdimp.com> In-Reply-To: <20050807.174657.19493876.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, alexjeffburke@gmail.com Subject: Re: Model device driver / Newbus 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, 08 Aug 2005 01:06:02 -0000 M. Warner Losh wrote: > In message: > Alex Burke writes: > : Hi, > : > : I want to try writing a driver for an MCA card. > : > : I am just wondering if there is any skeleton driver (preferably a bus > : like PCI), and also whether the newbus framework is used for MCA > : drivers. What is the preferred method of writing drivers now? > > MCA as in micro channel architecture? If so, then you should look at > the ep driver. It is one of the few in the tree that has a mca > attachment, and would be good to review. Warner, A while back you indicated that you would like to redo the sample skeleton drivers in share/examples.. I can do that over the net few days if you could give me some pointers as to good examples of modern code to extract from. (I have a few days off since my recent brush with a PHM at work) It'll probaly take a few iterations as I haven't been following newbus so I'll need to pass teh results back to you for comment and fixing several times. > > 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" From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 01:50:53 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 6A33D16A41F for ; Mon, 8 Aug 2005 01:50:53 +0000 (GMT) (envelope-from andy@triera.net) Received: from mail.widelabs.net (widelabs.net [194.165.111.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0116543D45 for ; Mon, 8 Aug 2005 01:50:51 +0000 (GMT) (envelope-from andy@triera.net) Received: from seaquest.in.widelabs.net (unknown [192.168.0.104]) by mail.widelabs.net (Postfix) with ESMTP id 88F161F015D for ; Sun, 7 Aug 2005 18:58:26 +0200 (CEST) From: "Aleksander (Andy) Rozman" To: freebsd-hackers@freebsd.org Date: Sun, 7 Aug 2005 18:56:12 +0000 User-Agent: KMail/1.8 References: <200508021103.j72B39tv007542@marlena.vvi.at> In-Reply-To: <200508021103.j72B39tv007542@marlena.vvi.at> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508071856.12697.andy@triera.net> X-yoursite-MailScanner-Information: Please contact the ISP for more information X-yoursite-MailScanner: Found to be clean X-MailScanner-From: andy@triera.net Subject: Re: Sound 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: Mon, 08 Aug 2005 01:50:53 -0000 On Tuesday 02 of August 2005 11:03, ALeine wrote: > You may want to set the kernel variable hw.snd.pcm0.vchans to 0 > and tune other hw.snd.* kernel variables with sysctl(8). > Hi ! Problem is that if I set vchans to zero, sound stops working altogether under KDE. I have some weird mother board with integrated sound card and it doesn't work that good under FreeBSD. > In the future you may also want to include more details (like the > output of `cat /dev/sndstat`) and consider posting to a more > appropriate list (like freebsd-questions) first. It's really hard to determine which group to send to. Since I thought this was software (driver) problem, I decided to post here. BTW I resolved the problem now. It was problem with hardware. Someone has been playing with my speakers in my room, and it was just that, the bass setting was set to 0... It works much better now. But I will probably try to applt that vchan patch someone posted link for. Thanks, Andy From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 02:14: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 C893C16A41F for ; Mon, 8 Aug 2005 02:14:56 +0000 (GMT) (envelope-from maverick31337@vfemail.net) Received: from ybbsmtp16.mail.mci.yahoo.co.jp (ybbsmtp16.mail.mci.yahoo.co.jp [210.80.241.190]) by mx1.FreeBSD.org (Postfix) with SMTP id 30AF643EC1 for ; Mon, 8 Aug 2005 02:14:56 +0000 (GMT) (envelope-from maverick31337@vfemail.net) Received: from unknown (HELO ?219.197.212.21?) (badtrans666@219.197.212.21 with plain) by ybbsmtp16.mail.mci.yahoo.co.jp with SMTP; 8 Aug 2005 02:14:54 -0000 X-Apparently-From: Message-ID: <42F6C01E.4070907@vfemail.net> Date: Mon, 08 Aug 2005 11:14:54 +0900 From: "Tetsuji \"Maverick\" Rai" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050728 SeaMonkey/1.0a MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: FreeBSD port of ICC 9.0 wanted!? 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, 08 Aug 2005 02:14:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I installed ICC 8.1(Intel C++ compiler) for Linux on FreeBSD in ports/lang/icc and it's working fine. However Intel has released version 9.0 (I'm not sure how much performance has been improved, though) So I tried to install it on FreeBSD box (virtual box) by copying it from my Linux box but it doesn't work properly; for ex, simple command icc t1.c -o t1 aborts with iccbin: error: could not find directory in which g++ resides How should it be fixed? BTW I have done another fix on icpi, by brandelf -t Linux icpi (in /opt/intel/cc/9.0/bin) As a matter of course, icc -help and icpc -help work. Thanks in advance! - -- Tetsuji 'Maverick' Rai PGP Key fingerprint = 2021 6BF9 CEA3 73DE FF17 B326 F4DA F04E F784 3B85 gpg fingerprint Aviation Jokes: http://www.geocities.com/tetsuji_rai/ Profile http://maverick.ns1.name/ http://maverick.IsASecret.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFC9sAe9NrwTveEO4URAtJSAKCEaaTZkQjPRWuhWPiVm59BpxCQ2gCfTpXc wLq2MMtYRlMqNzjLA89yZog= =n8Ym -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 06:49: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 3FE0716A41F for ; Mon, 8 Aug 2005 06:49:46 +0000 (GMT) (envelope-from BORJAMAR@SARENET.ES) Received: from sollube.sarenet.es (mx1.sarenet.es [194.30.0.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id A47AC43D45 for ; Mon, 8 Aug 2005 06:49:45 +0000 (GMT) (envelope-from BORJAMAR@SARENET.ES) Received: from [127.0.0.1] (borja.sarenet.es [192.148.167.77]) by sollube.sarenet.es (Postfix) with ESMTP id B432C2436; Mon, 8 Aug 2005 08:49:43 +0200 (CEST) In-Reply-To: <20050807214338.GA34438@hub.freebsd.org> References: <20050807185129.GA61807@frontfree.net> <20050807214338.GA34438@hub.freebsd.org> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <86718C14-B790-43FE-94E0-499ECBB4FA34@SARENET.ES> Content-Transfer-Encoding: 7bit From: Borja Marcos Date: Mon, 8 Aug 2005 08:49:46 +0200 To: Darren Reed X-Mailer: Apple Mail (2.733) Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] Bumping ufs.dirhash_maxmem to a larger value? 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, 08 Aug 2005 06:49:46 -0000 > So why not make the determination of "dirhash_maxmem" the result of > some > calculation(s) that takes into account RAM size, etc ? > > The obvious lesson here is that picking a number to be a limit > based on > the current size of machines fails the test of time. I think that changing it now without a mechanism to reduce the memory amount in case of memory shortages would be a violation of the Principle of Minimal Surprise. Borja. From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 7 17:29:15 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 DD37216A41F for ; Sun, 7 Aug 2005 17:29:14 +0000 (GMT) (envelope-from enshow@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 775F843D45 for ; Sun, 7 Aug 2005 17:29:14 +0000 (GMT) (envelope-from enshow@gmail.com) Received: by wproxy.gmail.com with SMTP id i8so861940wra for ; Sun, 07 Aug 2005 10:29:14 -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=YMNmNti38if1N2De7ZTJlUxehu2J9Oo+53qfe/KD9mwOdtkfQDlFmwLX05aw4qvoRrbSztC87J16DTJVUIV1b3CFKOzHvaiXFvedyqrZbOygS/ydUUIy6B1GCJW+BZ8DKex1YBeSkBptPtWJKCPMhLDjAB/e2h93S+JFuNIbKMQ= Received: by 10.54.27.46 with SMTP id a46mr4348168wra; Sun, 07 Aug 2005 10:29:13 -0700 (PDT) Received: by 10.54.25.32 with HTTP; Sun, 7 Aug 2005 10:29:13 -0700 (PDT) Message-ID: <3c3ce1970508071029797ae723@mail.gmail.com> Date: Sun, 7 Aug 2005 13:29:13 -0400 From: chuck To: 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: Mon, 08 Aug 2005 12:18:24 +0000 Cc: Subject: FreeBSD 6.0BETA2 ndis(4) WPA-PSK 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, 07 Aug 2005 17:29:15 -0000 Hi, I've just install the 6.0Beta2 to test the new WPA-PSK functionality. Regarding this, I have 2 questions. 1) The signal strength is quite different between drivers. (ath vs ndis). - The signal is much stronger when I use the ndis drivers. Why ? 2) The wpa-psk works perfectly when I use the ath(4) driver and it doesn't = work with the ndis(4) drivers. When I use wpa_supplicant I get this (from dme= sg) ndis0: NDIS API version: 5.1 ndis0: Ethernet address: 00:0f:b5:5d:52:2f ndis0: failed to get bssid ndis0: setting encryption status to ENC2 failed Here's the specs and configurations: =3D=3D> uname FreeBSD silence 6.0-BETA2 FreeBSD 6.0-BETA2 #0: Sun Aug 7 09:30:39 EDT 200= 5 =3D=3D> Wirecard Card: ath0@pci0:11:0: class=3D0x020000 card=3D0x4d001385 chip=3D0x0013168c rev=3D= 0x01 hdr=3D0x00 vendor =3D 'Atheros Communications Inc.' device =3D 'AR5212, AR5213 802.11a/b/g Wireless Adapter' class =3D network subclass =3D ethernet =3D=3D> wpa_supplicant.conf ctrl_interface=3D/var/run/wpa_supplicant ctrl_interface_group=3Dwheel network=3D{ ssid=3D"somessid" scan_ssid=3D1 key_mgmt=3DWPA-PSK psk=3D"somekey" } =3D=3D> wpa_supplicant invocation (log) wpa_supplicant -i ndis0 -d -c /etc/wpa_supplicant.conf Initializing interface 'ndis0' conf '/etc/wpa_supplicant.conf' driver 'defa= ult' Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant.conf' ctrl_interface=3D'/var/run/wpa_supplicant' ctrl_interface_group=3D0 (from group name 'wheel') Priority group 0 id=3D0 ssid=3D'somessid' Initializing interface (2) 'ndis0' Own MAC address: 00:0f:b5:5d:52:2f wpa_driver_bsd_set_wpa: enabled=3D1 wpa_driver_bsd_del_key: keyidx=3D0 wpa_driver_bsd_del_key: keyidx=3D1 wpa_driver_bsd_del_key: keyidx=3D2 wpa_driver_bsd_del_key: keyidx=3D3 wpa_driver_bsd_set_countermeasures: enabled=3D0 wpa_driver_bsd_set_drop_unencrypted: enabled=3D1 Setting scan request: 0 sec 100000 usec Starting AP scan (specific SSID) Scan SSID - hexdump_ascii(len=3D6): 6f 6b 73 61 6c 61 somessid # (I know) Received 0 bytes of scan results (2 BSSes) Scan results: 2 Selecting BSS from priority group 0 0: 00:11:95:73:1d:08 ssid=3D'somessid' wpa_ie_len=3D24 rsn_ie_len=3D0 selected Trying to associate with 00:11:95:73:1d:08 (SSID=3D'somessid' freq=3D2462 M= Hz) Cancelling scan request Automatic auth_alg selection: 0x1 WPA: using IEEE 802.11i/D3.0 WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2 WPA: using GTK TKIP WPA: using PTK TKIP WPA: using KEY_MGMT WPA-PSK WPA: Own WPA IE - hexdump(len=3D24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02 No keys have been configured - skip key clearing wpa_driver_bsd_set_drop_unencrypted: enabled=3D1 wpa_driver_bsd_associate: ssid 'somessid' wpa ie len 24 pairwise 2 group 2 key mgmt 1 wpa_driver_bsd_associate: set PRIVACY 1 Setting authentication timeout: 5 sec 0 usec Authentication with 00:00:00:00:00:00 timed out. Added BSSID 00:00:00:00:00:00 into blacklist No keys have been configured - skip key clearing Setting scan request: 0 sec 0 usec Starting AP scan (broadcast SSID) Received 0 bytes of scan results (2 BSSes) Scan results: 2 Selecting BSS from priority group 0 0: 00:11:95:73:1d:08 ssid=3D'somessid' wpa_ie_len=3D24 rsn_ie_len=3D0 selected Trying to associate with 00:11:95:73:1d:08 (SSID=3D'somessid' freq=3D2462 M= Hz) Cancelling scan request Automatic auth_alg selection: 0x1 WPA: using IEEE 802.11i/D3.0 WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2 From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 03:37: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 12C3616A43A for ; Mon, 8 Aug 2005 03:37:19 +0000 (GMT) (envelope-from offwhite@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0222843E6E for ; Mon, 8 Aug 2005 03:11:42 +0000 (GMT) (envelope-from offwhite@gmail.com) Received: by wproxy.gmail.com with SMTP id i11so675905wra for ; Sun, 07 Aug 2005 20:11:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=I6dlhOt3msoYWxncunGIOw7xGPRR79oymJnNkhldBwqalwfU05GIzmnhUts7GeZdfj/CMiv1e5s2BWttrHNd1fR/wOo+HGIzvxXZS9eOhcSmSrIj7yo+pkWeaIRGVF3dXfeP1vKib/YG7AQtWElWJfRtglDA5TmJco6CE5ICQnM= Received: by 10.54.11.41 with SMTP id 41mr4606327wrk; Sun, 07 Aug 2005 20:11:42 -0700 (PDT) Received: by 10.54.118.19 with HTTP; Sun, 7 Aug 2005 20:11:42 -0700 (PDT) Message-ID: <8dd4018b050807201114817744@mail.gmail.com> Date: Sun, 7 Aug 2005 22:11:42 -0500 From: Brennan Stehling To: Csaba Henk In-Reply-To: <20050807200451.GK73367@beastie.creo.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050807200451.GK73367@beastie.creo.hu> X-Mailman-Approved-At: Mon, 08 Aug 2005 12:19:59 +0000 Cc: brennan.stehling@offwhite.net, freebsd-hackers@freebsd.org, scottl@freebsd.org Subject: Re: Soc ssh fs: dummy Fuse module aviable for review X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: brennan.stehling@offwhite.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2005 03:37:20 -0000 It is not allowing me to grab the CVS content with the anonymous user. I am using the instructions on the wiki to pull the files. Brennan On 8/7/05, Csaba Henk wrote: > Hi! >=20 > I am Csaba Henk, Google Summer of Code participant at FreeBSD. >=20 > I am to create an ssh based virtual networking filesystem, by now that > boils down to porting Fuse (http://fuse.sourceforge.net) (doing so > brings much more to FreeBSD than having an ssh based filesystem). >=20 > Now I want to tell you about a test capable fragment of this ongoing work= . >=20 > If you are interested, you'll find all further info at a dedicated wiki > page, http://wikitest.freebsd.org/moin.cgi/FuseFilesystem. >=20 > I'd appreciate testing and code review. I can also serve with a weird > bug when using multi-threaded Fuse daemons, with simple instructions how = to > trigger it. I guess seasoned BSD hackers will see immediately what's > wrong with my read(2) handling. Please send comments to the soc-chenk > email address of the FreeBSD project. >=20 > Regards, > Csaba >=20 --=20 Brennan Stehling : http://brennan.offwhite.net/blog/ From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 14:50: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 CCE0F16A41F for ; Mon, 8 Aug 2005 14:50:45 +0000 (GMT) (envelope-from fenix@ramb.com.ua) Received: from zero.ramb.com.ua (zero.ramb.com.ua [62.149.0.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3ADBA43D48 for ; Mon, 8 Aug 2005 14:50:44 +0000 (GMT) (envelope-from fenix@ramb.com.ua) Received: from [195.78.58.42] (sirius.ramb.com.ua [195.78.58.42]) by zero.ramb.com.ua (8.13.3/8.13.3) with ESMTP id j78I0Ef6034211 for ; Mon, 8 Aug 2005 18:00:24 GMT (envelope-from fenix@ramb.com.ua) Message-ID: <42F771A8.90600@ramb.com.ua> Date: Mon, 08 Aug 2005 17:52:24 +0300 From: "Sergey S. Ropchan" User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050624) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.80/1002/Wed Aug 3 10:29:36 2005 clamav-milter version 0.80j on zero.ramb.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=6.3 tests=none autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on zero.ramb.com.ua Subject: libevent and pre-forked server ... 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, 08 Aug 2005 14:50:46 -0000 Hi All I'm trying to create pre-forked server and trying to use libevent for accepting connections per worker process. Source code below. In result, only one forked process (worker) accept connection ! What i'm doing wrong !? Thanks. #include #include #include #include #include #include #include #include #include #include #include #define PORT 12000 #define MAXCONN 1024 #define MAXWORKERS 3 #define WORKER_TIMEOUT 1 void handle_connection(const int lsd, short event, void *ev); void make_worker(const int lsd); int main(void) { int workers; int lsd, reuse = 1; struct sockaddr_in sa; pid_t pid; bzero(&sa, sizeof(sa)); if ((lsd = socket(AF_INET, SOCK_STREAM, 0)) < 0) errx(1, "socket: %s (%d)\n", strerror(errno), errno); if (setsockopt(lsd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)) < 0) errx(2, "setsockopt: %s (%d)\n", strerror(errno), errno); sa.sin_family = AF_INET; sa.sin_port = htons(PORT); sa.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(lsd, (struct sockaddr *)&sa, sizeof(sa)) < 0) errx(3, "bind: %s (%d)\n", strerror(errno), errno); if (listen(lsd, MAXCONN) < 0) errx(4, "listen: %s (%d)\n", strerror(errno), errno); (void)fprintf(stderr, "Server is ready to accept clients\n"); workers = 0; for (;;) { if (workers < MAXWORKERS) { if((pid=fork()) == 0) { (void)fprintf(stderr, "Worker [%d] created\n", getpid()); make_worker(lsd); } else if ( pid > 0) workers++; else errx(6, "fork: %s(%d)\n", strerror(errno), errno); } else sleep(WORKER_TIMEOUT); } return 0; } void make_worker(const int lsd) { struct event ev; bzero(&ev, sizeof(ev)); event_init(); event_set(&ev, lsd, EV_READ | EV_PERSIST, handle_connection, &ev); if(event_add(&ev, NULL) < 0) errx(5, "event_add: %s (%d)\n", strerror(errno), errno); event_dispatch(); (void)fprintf(stderr, "aborted\n"); } void handle_connection(const int lsd, short event, void *ev) { struct sockaddr_in remote; int asd = 0, socklen = 0, flags = 0; pid_t pid = getpid(); socklen = sizeof(remote); bzero(&remote, socklen); event_add(ev, NULL); asd = accept(lsd, (struct sockaddr *)&remote, &socklen); if (asd > 0) { (void)fprintf(stderr, "#worker[%d]: received connection from: %s:%d, socket: %d\n", pid, inet_ntoa(remote.sin_addr), ntohs(remote.sin_port), asd); } else errx(6, "accept: %s (%d)\n", strerror(errno), errno); } From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 15:13: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 D199516A423 for ; Mon, 8 Aug 2005 15:13:14 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (www.creo.hu [217.113.62.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36D7A43D45 for ; Mon, 8 Aug 2005 15:13:13 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (localhost [127.0.0.1]) by beastie.creo.hu (8.13.3/8.13.3) with ESMTP id j78FCUOS019048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Aug 2005 17:12:30 +0200 (CEST) (envelope-from csaba@beastie.creo.hu) Received: (from csaba@localhost) by beastie.creo.hu (8.13.3/8.13.3/Submit) id j78FCTPv019047; Mon, 8 Aug 2005 17:12:29 +0200 (CEST) (envelope-from csaba) Date: Mon, 8 Aug 2005 17:12:29 +0200 From: Csaba Henk To: freebsd-hackers@freebsd.org Message-ID: <20050808151229.GN73367@beastie.creo.hu> References: <20050807200451.GK73367@beastie.creo.hu> <8dd4018b050807201114817744@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8dd4018b050807201114817744@mail.gmail.com> User-Agent: Mutt/1.5.9i Cc: Brennan Stehling Subject: Re: Soc ssh fs: dummy Fuse module aviable for review 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, 08 Aug 2005 15:13:14 -0000 On Sun, Aug 07, 2005 at 10:11:42PM -0500, Brennan Stehling wrote: > It is not allowing me to grab the CVS content with the anonymous user. > I am using the instructions on the wiki to pull the files. Well, Sourceforge AnonCVS service is like the Gate of the Sphynx in the Neverending Story... You may never know if it let's you through and if not, why. So, I put up my most recent snapshot to http://creo.hu/~csaba/projects/fuse4bsd/downloads/ as fuse-cvs.tar.bz2. Just to note, a few minutes before I suceeded to login. Regards, Csaba From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 15:55:37 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 6C0C816A41F; Mon, 8 Aug 2005 15:55:37 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CC4F43D45; Mon, 8 Aug 2005 15:55:37 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix4-1.free.fr (Postfix) with ESMTP id 3B18A319E2C; Mon, 8 Aug 2005 17:55:36 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id BCE17405B; Mon, 8 Aug 2005 17:55:50 +0200 (CEST) Date: Mon, 8 Aug 2005 17:55:50 +0200 From: Jeremie Le Hen To: Csaba Henk Message-ID: <20050808155550.GK45385@obiwan.tataz.chchile.org> References: <20050807200451.GK73367@beastie.creo.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050807200451.GK73367@beastie.creo.hu> User-Agent: Mutt/1.5.9i Cc: brennan.stehling@offwhite.net, freebsd-hackers@freebsd.org, scottl@freebsd.org Subject: Re: Soc ssh fs: dummy Fuse module aviable for review 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, 08 Aug 2005 15:55:37 -0000 Hi Csaba, > I am Csaba Henk, Google Summer of Code participant at FreeBSD. > > I am to create an ssh based virtual networking filesystem, by now that > boils down to porting Fuse (http://fuse.sourceforge.net) (doing so > brings much more to FreeBSD than having an ssh based filesystem). > > Now I want to tell you about a test capable fragment of this ongoing work. > > If you are interested, you'll find all further info at a dedicated wiki > page, http://wikitest.freebsd.org/moin.cgi/FuseFilesystem. > > I'd appreciate testing and code review. I can also serve with a weird > bug when using multi-threaded Fuse daemons, with simple instructions how to > trigger it. I guess seasoned BSD hackers will see immediately what's > wrong with my read(2) handling. Please send comments to the soc-chenk > email address of the FreeBSD project. Thanks for your work, this is going to be pretty handy. As a side note, another good filesystem project it would be nice to support in FreeBSD is FiST [1] and more specifically its powerful union filesystem [2] which seems to be far less broken than FreeBSD's unionfs. For those who don't know this, FiST only requires to have a no-op stackabke filesystem (called wrapfs IIRC) implemented on a given operating system to allow to take the best of all other filesystems implemented thanks to FiST. This includes unionfs, cryptfs, gzipfs, ... They are implemented in pseudo-C code and ``merged'' with the OS-dependant wrapfs to create a new filesystem. [1] http://www.filesystems.org/ [2] http://www.filesystems.org/project-unionfs.html Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 15:57: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 E74EF16A41F; Mon, 8 Aug 2005 15:57:46 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BA0143D45; Mon, 8 Aug 2005 15:57:46 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix3-1.free.fr (Postfix) with ESMTP id 9CA881734AC; Mon, 8 Aug 2005 17:57:45 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 81264405B; Mon, 8 Aug 2005 17:58:00 +0200 (CEST) Date: Mon, 8 Aug 2005 17:57:59 +0200 From: Jeremie Le Hen To: Csaba Henk Message-ID: <20050808155759.GL45385@obiwan.tataz.chchile.org> References: <20050807200451.GK73367@beastie.creo.hu> <20050808155550.GK45385@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050808155550.GK45385@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.9i Cc: brennan.stehling@offwhite.net, freebsd-hackers@freebsd.org, scottl@freebsd.org Subject: Re: Soc ssh fs: dummy Fuse module aviable for review 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, 08 Aug 2005 15:57:47 -0000 > Thanks for your work, this is going to be pretty handy. > > As a side note, another good filesystem project it would be nice to > support in FreeBSD is FiST [1] and more specifically its powerful > union filesystem [2] which seems to be far less broken than FreeBSD's > unionfs. I forgot to say it's already implemented for FreeBSD 4 and FreeBSD 5, but the latter doesn't work any more on FreeBSD 6/7 due to phk's modification to buffer cache (IIRC). -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 17:46: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 75C7716A425 for ; Mon, 8 Aug 2005 17:46:16 +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 B580743EBF for ; Mon, 8 Aug 2005 17:36:54 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j78Hasf9015596; Mon, 8 Aug 2005 10:36:54 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j78HarSZ015595; Mon, 8 Aug 2005 10:36:53 -0700 Date: Mon, 8 Aug 2005 10:36:53 -0700 From: Brooks Davis To: Jeremie Le Hen Message-ID: <20050808173653.GA1936@odin.ac.hmc.edu> References: <20050806125340.GA45385@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <20050806125340.GA45385@obiwan.tataz.chchile.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-hackers@freebsd.org Subject: Re: sed s///i 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, 08 Aug 2005 17:46:16 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 06, 2005 at 02:53:40PM +0200, Jeremie Le Hen wrote: > Hi, >=20 > I would like to implement the 'i' flag for the 's' command in sed(1). > This flag would mean that the match must be case insensitive. >=20 > I'm not willing to implement this to conform to GNU sed(1), I just find > it very handy : >=20 > s/[Ff][Oo][Oo]/bar/ >=20 > would become >=20 > s/foo/bar/i >=20 > Before I start modifying the code, I would like if it is something that > has chances to get commited or not, although SUSv3 doesn't talk about > this flag. I can't see any harm in implementing this. Anyone trying to make an "i" flag mean anything else would be taken out and shot. :) > I also need to add that this change would be a little intrusive in the > code. Actually the regular expression gets compiled, then the > substitute string and finally flags are handled. Thus this would > require scanning flags before compiling the regular expression. Are there any test cases out there for sed RE handling? If not, I'd suggest this would be a good time to create some to help insure this change maintains correctness. -- 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 --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC95giXY6L6fI4GtQRAjSrAKCs2Gw/41rZLSs9/N4erRZjuZvyQQCcCiDP e2Glkwm3sBVlC7HErnskXtg= =13C0 -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 18:10: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 1199116A420 for ; Mon, 8 Aug 2005 18:10:50 +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 9C15343D53 for ; Mon, 8 Aug 2005 18:10:49 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j78IAmvj055603; Mon, 8 Aug 2005 13:10:48 -0500 (CDT) (envelope-from dan) Date: Mon, 8 Aug 2005 13:10:48 -0500 From: Dan Nelson To: Brooks Davis Message-ID: <20050808181048.GD78669@dan.emsphone.com> References: <20050806125340.GA45385@obiwan.tataz.chchile.org> <20050808173653.GA1936@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050808173653.GA1936@odin.ac.hmc.edu> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org, Jeremie Le Hen Subject: Re: sed s///i 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, 08 Aug 2005 18:10:50 -0000 In the last episode (Aug 08), Brooks Davis said: > Are there any test cases out there for sed RE handling? If not, I'd > suggest this would be a good time to create some to help insure this > change maintains correctness. /usr/src/usr.bin/sed/TEST/sed.test has a lot of checks -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 18:23:37 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 CA99F16A41F for ; Mon, 8 Aug 2005 18:23:37 +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 7C89043D46 for ; Mon, 8 Aug 2005 18:23:37 +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 j78INbbb020271; Mon, 8 Aug 2005 11:23:37 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j78INbPa020270; Mon, 8 Aug 2005 11:23:37 -0700 Date: Mon, 8 Aug 2005 11:23:37 -0700 From: Brooks Davis To: chuck Message-ID: <20050808182337.GB1936@odin.ac.hmc.edu> References: <3c3ce1970508071029797ae723@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jq0ap7NbKX2Kqbes" Content-Disposition: inline In-Reply-To: <3c3ce1970508071029797ae723@mail.gmail.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: hackers@freebsd.org Subject: Re: FreeBSD 6.0BETA2 ndis(4) WPA-PSK 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, 08 Aug 2005 18:23:37 -0000 --jq0ap7NbKX2Kqbes Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 07, 2005 at 01:29:13PM -0400, chuck wrote: > Hi, >=20 > I've just install the 6.0Beta2 to test the new WPA-PSK functionality. > Regarding this, > I have 2 questions. >=20 > 1) The signal strength is quite different between drivers. (ath vs ndis). > - The signal is much stronger when I use the ndis drivers. Why ? Most likely they are reporting a value with different units. It's quite likely that ndis(4) isn't mapping the values correctly to what the 80211 framework expects. It's also possible they are programming the card differently and thus the signal is actually different, but that seems less likely. Unless ath is actually performing worse, I'd suggest ignoring it. > 2) The wpa-psk works perfectly when I use the ath(4) driver and it doesn'= t work > with the ndis(4) drivers. When I use wpa_supplicant I get this (from d= mesg) ndis(4) doesn't support the features required for wpa_supplicant to work. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --jq0ap7NbKX2Kqbes Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC96MoXY6L6fI4GtQRAoxJAJ0YvBHCQE0oG+rf6cJZ+s1O87ltoQCfSuC2 ThIDAyuql47odNd98qR/gUc= =4muj -----END PGP SIGNATURE----- --jq0ap7NbKX2Kqbes-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 19:05: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 6315216A41F for ; Mon, 8 Aug 2005 19:05:52 +0000 (GMT) (envelope-from bwkahle@binary.net) Received: from eterna.binary.net (eterna.binary.net [216.229.0.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 263B343D53 for ; Mon, 8 Aug 2005 19:05:52 +0000 (GMT) (envelope-from bwkahle@binary.net) Received: from [10.0.0.69] (xanadu-pub.binary.net [216.229.9.34]) by eterna.binary.net (Postfix) with ESMTP id AD9C1B4423 for ; Mon, 8 Aug 2005 14:05:51 -0500 (CDT) Message-ID: <42F7AD3F.8020301@binary.net> Date: Mon, 08 Aug 2005 14:06:39 -0500 From: Bryce Kahle User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: pw home directory creation 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, 08 Aug 2005 19:05:52 -0000 I recently sent the following to David L. Nugent, who is listed as the author and maintainer of pw, at the email address listed in the pw README within the FreeBSD source tree. I received no response, so I thought I would see if anyone here had any ideas about this. David, I have been using your program pw on FreeBSD for quite awhile now, and I've recently ran into a problem. I have been setting up a NIS network, and I would like to use pw to add new users to the NIS tables as it seems it is very well tailored to do this. The problem I have is that in order to do so I use the -V flag to pw for an alternate configuration directory. I examined the source code and noticed that when you use this flag, that it will absolutely not create home directories. I was wondering if there was a justification behind this decision, and what it might be? I would really like to be able to create home directories when not touching the actual passwd file of a machine. Thanks for your time. -- Bryce Kahle Systems Administrator - Binary Net 1-402-742-7042 http://www.binary.net/ From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 19:19: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 7439616A41F for ; Mon, 8 Aug 2005 19:19:43 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id A53B243D45 for ; Mon, 8 Aug 2005 19:19:42 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 28232 invoked from network); 8 Aug 2005 21:19:39 +0200 Received: from p508fedfe.dip.t-dialin.net (HELO localhost.skatecity) (80.143.237.254) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 8 Aug 2005 21:19:39 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j78JJAqS091702 for ; Mon, 8 Aug 2005 21:19:10 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j78JJAA5091701 for freebsd-hackers@freebsd.org; Mon, 8 Aug 2005 21:19:10 +0200 (CEST) (envelope-from arundel) From: alexander Date: Mon, 8 Aug 2005 21:19:10 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050808191910.GA91484@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Using sysarch specific syscalls in assembly? 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, 08 Aug 2005 19:19:43 -0000 Hi there. I wrote a program that needs to access I/O ports with the in/out machinecodes. To gain priviliges to do so I have opened /dev/io. Now somebody told me that I'd rather use i386_set_ioperm which will be much saver, because of the port range limitation. Plus it will make the program more portable because Linux does not have a /dev/io device node. i386_set_ioperm(2) states that this procedure is a system call. So it should be easily accessable through assembly language and it's specific syscall id. Unfortunately I wasn't able to find the syscall id in any of the syscalls.master files that are part of the source tree. states that this is a sysarch specific syscall for i386 (hence the i386_*). The following definitions are being made: #define I386_GET_IOPERM 3 #define I386_SET_IOPERM 4 These syscall numbers however are already taken by read(2) and write(2). So how can I make use of these i386 specific syscalls? Is it even possible? Thx in advance. From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 19:50: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 01FA816A41F for ; Mon, 8 Aug 2005 19:50:38 +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 96A4343D49 for ; Mon, 8 Aug 2005 19:50:37 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Mon, 08 Aug 2005 16:05:22 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 8 Aug 2005 15:50:55 -0400 User-Agent: KMail/1.8 References: <20050808191910.GA91484@skatecity> In-Reply-To: <20050808191910.GA91484@skatecity> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508081550.56292.jhb@FreeBSD.org> Cc: Subject: Re: Using sysarch specific syscalls in assembly? 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, 08 Aug 2005 19:50:38 -0000 On Monday 08 August 2005 03:19 pm, alexander wrote: > Hi there. > > I wrote a program that needs to access I/O ports with the in/out > machinecodes. To gain priviliges to do so I have opened /dev/io. Now > somebody told me that I'd rather use i386_set_ioperm which will be much > saver, because of the port range limitation. Plus it will make the program > more portable because Linux does not have a /dev/io device node. > > i386_set_ioperm(2) states that this procedure is a system call. So it > should be easily accessable through assembly language and it's specific > syscall id. Unfortunately I wasn't able to find the syscall id in any of > the > syscalls.master files that are part of the source tree. > > states that this is a sysarch specific syscall for i386 > (hence the i386_*). The following definitions are being made: > > #define I386_GET_IOPERM 3 > #define I386_SET_IOPERM 4 > > These syscall numbers however are already taken by read(2) and write(2). So > how can I make use of these i386 specific syscalls? Is it even possible? > > Thx in advance. You have to call the sysarch() system call. The first argument to it would be the operation (I386_GET_IOPERM, etc.). -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 20:10: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 F1F5916A42B for ; Mon, 8 Aug 2005 20:10:21 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DF9643D46 for ; Mon, 8 Aug 2005 20:10:20 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 30827 invoked from network); 8 Aug 2005 22:10:18 +0200 Received: from p508fedfe.dip.t-dialin.net (HELO localhost.skatecity) (80.143.237.254) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 8 Aug 2005 22:10:18 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j78K9nkx092670 for ; Mon, 8 Aug 2005 22:09:49 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j78K9nN1092669 for freebsd-hackers@freebsd.org; Mon, 8 Aug 2005 22:09:49 +0200 (CEST) (envelope-from arundel) From: alexander Date: Mon, 8 Aug 2005 22:09:49 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050808200949.GA92063@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050808191910.GA91484@skatecity> <200508081550.56292.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508081550.56292.jhb@FreeBSD.org> Subject: Re: Using sysarch specific syscalls in assembly? 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, 08 Aug 2005 20:10:22 -0000 On Mon Aug 8 05, John Baldwin wrote: > On Monday 08 August 2005 03:19 pm, alexander wrote: > > Hi there. > > > > I wrote a program that needs to access I/O ports with the in/out > > machinecodes. To gain priviliges to do so I have opened /dev/io. Now > > somebody told me that I'd rather use i386_set_ioperm which will be much > > saver, because of the port range limitation. Plus it will make the program > > more portable because Linux does not have a /dev/io device node. > > > > i386_set_ioperm(2) states that this procedure is a system call. So it > > should be easily accessable through assembly language and it's specific > > syscall id. Unfortunately I wasn't able to find the syscall id in any of > > the > > syscalls.master files that are part of the source tree. > > > > states that this is a sysarch specific syscall for i386 > > (hence the i386_*). The following definitions are being made: > > > > #define I386_GET_IOPERM 3 > > #define I386_SET_IOPERM 4 > > > > These syscall numbers however are already taken by read(2) and write(2). So > > how can I make use of these i386 specific syscalls? Is it even possible? > > > > Thx in advance. > > You have to call the sysarch() system call. The first argument to it would be > the operation (I386_GET_IOPERM, etc.). > > -- > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" = http://www.FreeBSD.org Thx a lot. That worked. From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 20:20: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 30A5916A41F for ; Mon, 8 Aug 2005 20:20:40 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: from episec.com (episec.com [69.55.237.141]) by mx1.FreeBSD.org (Postfix) with SMTP id C988B43D48 for ; Mon, 8 Aug 2005 20:20:39 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 44169 invoked from network); 8 Aug 2005 20:20:39 -0000 Received: from episec.com (HELO crypto.iownanisp.com) (69.55.237.141) by episec.com with SMTP; 8 Aug 2005 20:20:39 -0000 Received: from 199.172.169.7 (auth. user edelkind@episec.com) by crypto.iownanisp.com with HTTP; Mon, 08 Aug 2005 20:20:38 +0000 To: freebsd-hackers@freebsd.org Date: Mon, 08 Aug 2005 20:20:38 +0000 X-Mailer: IlohaMail/0.8.12 (On: crypto.iownanisp.com) In-Reply-To: <20050808191910.GA91484@skatecity> From: "ari edelkind" Bounce-To: "ari edelkind" Errors-To: "ari edelkind" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Message-Id: <20050808202039.C988B43D48@mx1.FreeBSD.org> Subject: Re: Using sysarch specific syscalls in assembly? 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, 08 Aug 2005 20:20:40 -0000 On 8/8/2005, "alexander" wrote: [...] >i386_set_ioperm(2) states that this procedure is a system call. So it should= be >easily accessable through assembly language and it's specific syscall id. >Unfortunately I wasn't able to find the syscall id in any of the >syscalls.master files that are part of the source tree. > > states that this is a sysarch specific syscall for i386 >(hence the i386_*). The following definitions are being made: > >#define I386_GET_IOPERM 3 >#define I386_SET_IOPERM 4 > >These syscall numbers however are already taken by read(2) and write(2). So >how can I make use of these i386 specific syscalls? Is it even possible? If you're unsure of how a function is called, you can always check the C library, under 'src/lib/libc/'. I won't repeat john baldwin's answer, but it's exactly what you'd find there. That said, C library calls are no more difficult to perform from assembly language than system calls, so long as you're willing to link in the standard C library. If you're trying to be more portable, then unless you have specific reasons for not doing so, perhaps it's something you'd like to consider. ari From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 22:59:20 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 E911216A420 for ; Mon, 8 Aug 2005 22:59:20 +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 67CF343D46 for ; Mon, 8 Aug 2005 22:59:20 +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 j78Mvpb4013661; Mon, 8 Aug 2005 16:57:52 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 08 Aug 2005 16:58:58 -0600 (MDT) Message-Id: <20050808.165858.77355763.imp@bsdimp.com> To: enshow@gmail.com From: "M. Warner Losh" In-Reply-To: <3c3ce1970508071029797ae723@mail.gmail.com> References: <3c3ce1970508071029797ae723@mail.gmail.com> 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, 08 Aug 2005 16:57:52 -0600 (MDT) Cc: hackers@freebsd.org Subject: Re: FreeBSD 6.0BETA2 ndis(4) WPA-PSK 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, 08 Aug 2005 22:59:21 -0000 In message: <3c3ce1970508071029797ae723@mail.gmail.com> chuck writes: : 1) The signal strength is quite different between drivers. (ath vs ndis). : - The signal is much stronger when I use the ndis drivers. Why ? The units they are reported in are likely different. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 04:35:32 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 3D25C16A41F for ; Tue, 9 Aug 2005 04:35:32 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id D51D943D45 for ; Tue, 9 Aug 2005 04:35:31 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.93] ([66.127.85.93]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j794ZVms051271 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Aug 2005 21:35:31 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <42F832BF.3050706@errno.com> Date: Mon, 08 Aug 2005 21:36:15 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: chuck References: <3c3ce1970508071029797ae723@mail.gmail.com> In-Reply-To: <3c3ce1970508071029797ae723@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: FreeBSD 6.0BETA2 ndis(4) WPA-PSK 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, 09 Aug 2005 04:35:32 -0000 chuck wrote: > Hi, > > I've just install the 6.0Beta2 to test the new WPA-PSK functionality. > Regarding this, > I have 2 questions. > > 1) The signal strength is quite different between drivers. (ath vs ndis). > - The signal is much stronger when I use the ndis drivers. Why ? No config info, no way to answer or even guess. > > > 2) The wpa-psk works perfectly when I use the ath(4) driver and it doesn't work > with the ndis(4) drivers. When I use wpa_supplicant I get this (from dmesg) > > ndis0: NDIS API version: 5.1 > ndis0: Ethernet address: 00:0f:b5:5d:52:2f > ndis0: failed to get bssid > ndis0: setting encryption status to ENC2 failed > > Here's the specs and configurations: ndis wpa-psk support is an unknown quantity. > > ==> uname > > FreeBSD silence 6.0-BETA2 FreeBSD 6.0-BETA2 #0: Sun Aug 7 09:30:39 EDT 2005 > > ==> Wirecard Card: > > ath0@pci0:11:0: class=0x020000 card=0x4d001385 chip=0x0013168c rev=0x01 hdr=0x00 > vendor = 'Atheros Communications Inc.' > device = 'AR5212, AR5213 802.11a/b/g Wireless Adapter' > class = network > subclass = ethernet > > ==> wpa_supplicant.conf > > ctrl_interface=/var/run/wpa_supplicant > ctrl_interface_group=wheel > network={ > ssid="somessid" > scan_ssid=1 > key_mgmt=WPA-PSK > psk="somekey" > } > > ==> wpa_supplicant invocation (log) > > wpa_supplicant -i ndis0 -d -c /etc/wpa_supplicant.conf > Initializing interface 'ndis0' conf '/etc/wpa_supplicant.conf' driver 'default' > Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' > Reading configuration file '/etc/wpa_supplicant.conf' > ctrl_interface='/var/run/wpa_supplicant' > ctrl_interface_group=0 (from group name 'wheel') > Priority group 0 > id=0 ssid='somessid' > Initializing interface (2) 'ndis0' > Own MAC address: 00:0f:b5:5d:52:2f > wpa_driver_bsd_set_wpa: enabled=1 > wpa_driver_bsd_del_key: keyidx=0 > wpa_driver_bsd_del_key: keyidx=1 > wpa_driver_bsd_del_key: keyidx=2 > wpa_driver_bsd_del_key: keyidx=3 > wpa_driver_bsd_set_countermeasures: enabled=0 > wpa_driver_bsd_set_drop_unencrypted: enabled=1 > Setting scan request: 0 sec 100000 usec > Starting AP scan (specific SSID) > Scan SSID - hexdump_ascii(len=6): > 6f 6b 73 61 6c 61 somessid > # (I know) > Received 0 bytes of scan results (2 BSSes) > Scan results: 2 > Selecting BSS from priority group 0 > 0: 00:11:95:73:1d:08 ssid='somessid' wpa_ie_len=24 rsn_ie_len=0 > selected > Trying to associate with 00:11:95:73:1d:08 (SSID='somessid' freq=2462 MHz) > Cancelling scan request > Automatic auth_alg selection: 0x1 > WPA: using IEEE 802.11i/D3.0 > WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2 > WPA: using GTK TKIP > WPA: using PTK TKIP > WPA: using KEY_MGMT WPA-PSK > WPA: Own WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 > 01 00 00 50 f2 02 01 00 00 50 f2 02 > No keys have been configured - skip key clearing > wpa_driver_bsd_set_drop_unencrypted: enabled=1 > wpa_driver_bsd_associate: ssid 'somessid' wpa ie len 24 pairwise 2 > group 2 key mgmt 1 > wpa_driver_bsd_associate: set PRIVACY 1 > Setting authentication timeout: 5 sec 0 usec > Authentication with 00:00:00:00:00:00 timed out. > Added BSSID 00:00:00:00:00:00 into blacklist > No keys have been configured - skip key clearing > Setting scan request: 0 sec 0 usec > Starting AP scan (broadcast SSID) > Received 0 bytes of scan results (2 BSSes) > Scan results: 2 > Selecting BSS from priority group 0 > 0: 00:11:95:73:1d:08 ssid='somessid' wpa_ie_len=24 rsn_ie_len=0 > selected > Trying to associate with 00:11:95:73:1d:08 (SSID='somessid' freq=2462 MHz) > Cancelling scan request > Automatic auth_alg selection: 0x1 > WPA: using IEEE 802.11i/D3.0 > WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2 > _______________________________________________ > 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 Aug 9 08:10: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 F366716A41F for ; Tue, 9 Aug 2005 08:10:43 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (www.creo.hu [217.113.62.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5489843D45 for ; Tue, 9 Aug 2005 08:10:42 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (localhost [127.0.0.1]) by beastie.creo.hu (8.13.3/8.13.3) with ESMTP id j7989u5u038070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 9 Aug 2005 10:09:56 +0200 (CEST) (envelope-from csaba@beastie.creo.hu) Received: (from csaba@localhost) by beastie.creo.hu (8.13.3/8.13.3/Submit) id j7989t3U038069 for freebsd-hackers@freebsd.org; Tue, 9 Aug 2005 10:09:55 +0200 (CEST) (envelope-from csaba) Date: Tue, 9 Aug 2005 10:09:55 +0200 From: Csaba Henk To: freebsd-hackers@freebsd.org Message-ID: <20050809080955.GW73367@beastie.creo.hu> References: <20050807200451.GK73367@beastie.creo.hu> <20050808155550.GK45385@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050808155550.GK45385@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.9i Subject: Re: Soc ssh fs: dummy Fuse module aviable for review 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, 09 Aug 2005 08:10:44 -0000 On Mon, Aug 08, 2005 at 05:55:50PM +0200, Jeremie Le Hen wrote: > As a side note, another good filesystem project it would be nice to > support in FreeBSD is FiST [1] and more specifically its powerful > union filesystem [2] which seems to be far less broken than FreeBSD's > unionfs. > > For those who don't know this, FiST only requires to have a no-op > stackabke filesystem (called wrapfs IIRC) implemented on a given > operating system to allow to take the best of all other filesystems > implemented thanks to FiST. This includes unionfs, cryptfs, gzipfs, ... > They are implemented in pseudo-C code and ``merged'' with the > OS-dependant wrapfs to create a new filesystem. > > [1] http://www.filesystems.org/ > [2] http://www.filesystems.org/project-unionfs.html Yes, I've heard of Fist. It's an interesting project! Zadok is a great guy... It's interesting to match Fist against Fuse. Both are meta-filesystems with the goal of providing an easy-to-use , higher-level tool for creating filesystems. Both have the property that code written using them will be pretty portable (actual portability is of course limited by the available ports of the basic tool). Yet in implementation they are orthogonal: Fist is for making in-kernel filesystems, Fuse is for making filesystems in userspace... To add, there is a Google SoC project around which is closer to Fist in the followed approach, the one about the K kernel metalanguage: http://wikitest.freebsd.org/moin.cgi/RuGang http://wikitest.freebsd.org/moin.cgi/K Csaba From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 09:13: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 87A7416A41F for ; Tue, 9 Aug 2005 09:13:48 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A86E43D48 for ; Tue, 9 Aug 2005 09:13:48 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 04E5B46B16; Tue, 9 Aug 2005 05:13:47 -0400 (EDT) Date: Tue, 9 Aug 2005 10:16:59 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: ari edelkind In-Reply-To: <20050808202039.C988B43D48@mx1.FreeBSD.org> Message-ID: <20050809101409.Y73394@fledge.watson.org> References: <20050808202039.C988B43D48@mx1.FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Using sysarch specific syscalls in assembly? 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, 09 Aug 2005 09:13:48 -0000 On Mon, 8 Aug 2005, ari edelkind wrote: > On 8/8/2005, "alexander" wrote: > > [...] >> i386_set_ioperm(2) states that this procedure is a system call. So it should be >> easily accessable through assembly language and it's specific syscall id. >> Unfortunately I wasn't able to find the syscall id in any of the >> syscalls.master files that are part of the source tree. >> >> states that this is a sysarch specific syscall for i386 >> (hence the i386_*). The following definitions are being made: >> >> #define I386_GET_IOPERM 3 >> #define I386_SET_IOPERM 4 >> >> These syscall numbers however are already taken by read(2) and >> write(2). So how can I make use of these i386 specific syscalls? Is it >> even possible? > > If you're unsure of how a function is called, you can always check the C > library, under 'src/lib/libc/'. I won't repeat john baldwin's answer, > but it's exactly what you'd find there. > > That said, C library calls are no more difficult to perform from > assembly language than system calls, so long as you're willing to link > in the standard C library. If you're trying to be more portable, then > unless you have specific reasons for not doing so, perhaps it's > something you'd like to consider. In general, it is much preferable that applications link against libc to get the system call stubs than that they directly invoke system calls. That way, if compatibility interfaces are introduced, etc, the application will continue to function. For example, there was at one point a migration away from explicit system calls to set certain kernel parameters, such as hostname and domainname, towards using sysctl, with the system calls being marked obsolete. The C library still provides a sethostname() interface, which is actually a wrapper in user space around sysctl(). So invoking the C function provided by libc for a system call will generally be preferred, even if the originating code is assembly. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 10:46:05 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 5C3A416A420 for ; Tue, 9 Aug 2005 10:46:05 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from mail.r61.net (relay.r61.net [195.208.245.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id A241C43D46 for ; Tue, 9 Aug 2005 10:46:02 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from stinger.cc.rsu.ru (stinger.cc.rsu.ru [195.208.252.82]) by mail.r61.net (8.13.4/8.13.4) with ESMTP id j79Ajr9J031457 for ; Tue, 9 Aug 2005 14:45:53 +0400 (MSD) (envelope-from bushman@rsu.ru) Date: Tue, 9 Aug 2005 14:48:59 +0400 (MSD) From: Michael Bushkov X-X-Sender: bushman@stinger.cc.rsu.ru To: hackers@freebsd.org Message-ID: <20050809143950.U921@stinger.cc.rsu.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on asterix.rsu.ru X-Virus-Status: Clean X-Spam-Status: No, score=-5.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on asterix.rsu.ru Cc: Subject: openssh port patch 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, 09 Aug 2005 10:46:05 -0000 Hello! As a participant of Google's Summer Of Code, I'm working on improving the nsswitch subsytem. The work is currently in progress, but some things are already completed. The patch for security/openssh-portable port is ready. It allows openssh to get the host keys not only from the ssh_known_hosts file, but from all possible nsswitch sources too. Files and NIS sources are implemented. Here is the link to download the patch: http://perforce.freebsd.org/fileDownLoad.cgi?FSPC=//depot/projects/soc2005/nsswitch%5fcached/tests/ssh%5fhostkeys%5ftest/patches/openssh%2dportable%5fport.patch&REV=1 To add the NIS map, copy the appropriate ssh_known_hosts file to the yp.src folder and the run the patched Makefile. The patch for the /var/yp/Makefile is here: http://perforce.freebsd.org/fileDownLoad.cgi?FSPC=//depot/projects/soc2005/nsswitch%5fcached/tests/ssh%5fhostkeys%5ftest/patches/var%5fyp%5fmakefile.patch&REV=1 After patching, OpenSSH will still use ~/.ssh/known_hosts files, but instead of looking through /usr/local/etc/ssh/ssh_known_hosts file directly, it will use nsswitch. So, with the help of the NIS, the known_hosts keys can be shared among different hosts. I'll be really glad to answer your questions and bug-reports. With best regards, Michael Bushkov Rostov State University From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 11:18:20 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 232A416A41F for ; Tue, 9 Aug 2005 11:18:20 +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 6A4BA43D45 for ; Tue, 9 Aug 2005 11:18:19 +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 j79BHvXm002843 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 9 Aug 2005 21:18:00 +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 j79BHuSR012693; Tue, 9 Aug 2005 21:17:57 +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 j79BHtGA012692; Tue, 9 Aug 2005 21:17:55 +1000 (EST) (envelope-from pjeremy) Date: Tue, 9 Aug 2005 21:17:54 +1000 From: Peter Jeremy To: Dirk GOUDERS Message-ID: <20050809111754.GG9970@cirb503493.alcatel.com.au> References: <20050806114935.GB7708@cirb503493.alcatel.com.au> <200508061221.j76CLexZ008206@sora.hank.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508061221.j76CLexZ008206@sora.hank.home> User-Agent: Mutt/1.4.2i Cc: hackers@freebsd.org Subject: Re: Finding an illegal instruction in gnucash/guile 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, 09 Aug 2005 11:18:20 -0000 On Sat, 2005-Aug-06 14:21:40 +0200, Dirk GOUDERS wrote: > > > gdb claims the problem is in libguile. I've tried rebuilding it with > > different CPU and optimisation options (in case I've triggered a gcc > > bug) but the SIGILL remains. > > > > I've had a look through google and not found anything relevant. > > > > Does anyone have any suggestions other than rebuilding the ports from > > scratch with different CPUTYPE and/or CFLAGS? (I'm currently using > > CPUTYPE=athlon-xp and CFLAGS=-O -g). > >I had a similar (if not the same) problem on a 4.11-STABLE machine. >Actually, I am running gnucash on two different 4.11-STABLE machines >-- on one, it worked, on the other, where I installed it some days ago >it didn't. > >Then, I cvsup'ed both machines and the first port I installed on both >was gnucash (the only difference betweeen the two machines was the >order the ports were installed) and now, it works on both machines. Tried that with no effect. I've added some debugging lines to the kernel and found that the SIGILL is triggered in sendsig() when the copyout of a sigframe to the user stack fails. Poking further, it appears that one of the threads is blowing its stack. Manually unwinding the stack suggests that gdb was right and there's very heavy recursion in scm_deval(). Since the thread stack sizes were increased about 6 months ago (at least in -current), this suggests something wrong in one of the ports. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 13:31: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 7FF0116A41F for ; Tue, 9 Aug 2005 13:31:43 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7424E43D45 for ; Tue, 9 Aug 2005 13:31:41 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 4290 invoked from network); 9 Aug 2005 15:31:39 +0200 Received: from p508ffce4.dip.t-dialin.net (HELO localhost.skatecity) (80.143.252.228) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 9 Aug 2005 15:31:39 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j79DV9gI015483 for ; Tue, 9 Aug 2005 15:31:09 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j79DV90P015482 for freebsd-hackers@freebsd.org; Tue, 9 Aug 2005 15:31:09 +0200 (CEST) (envelope-from arundel) From: alexander Date: Tue, 9 Aug 2005 15:31:09 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050809133109.GA15300@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050808202039.C988B43D48@mx1.FreeBSD.org> <20050809101409.Y73394@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050809101409.Y73394@fledge.watson.org> Subject: Re: Using sysarch specific syscalls in assembly? 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, 09 Aug 2005 13:31:43 -0000 On Tue Aug 9 05, Robert Watson wrote: > > In general, it is much preferable that applications link against libc to > get the system call stubs than that they directly invoke system calls. > That way, if compatibility interfaces are introduced, etc, the application > will continue to function. For example, there was at one point a > migration away from explicit system calls to set certain kernel > parameters, such as hostname and domainname, towards using sysctl, with > the system calls being marked obsolete. The C library still provides a > sethostname() interface, which is actually a wrapper in user space around > sysctl(). So invoking the C function provided by libc for a system call > will generally be preferred, even if the originating code is assembly. > > Robert N M Watson Thx. I'll try that. Unfortunately I'm experiencing some problems right now. From time to time I'm getting a 'Bus error: 10 (core dumped)' This however appears randomly. One time I run the app everything works fine,the next time it core dumps. Are there any errors in my code? %define SYSARCH 165 ; syscall sysarch(2) %define I386_SET_IOPERM 4 ; i386_set_ioperm(2) number ioperm_args dd 378h dd 3 dd 1 OpenIO: push byte ioperm_args push dword I386_SET_IOPERM mov eax,SYSARCH Call _syscall lea esp,[esp+8] ret I'm really confused by the fact that it works sometimes and sometimes it doesn't. I loaded the app into ddd and found more oddities. When I set a breakpoint before the first in/out and then hit continue everything works allright. However when I set a breakpoint after the first in/out the app core dumps with a bus error. Any ideas? Maybe a timing issue? I added a i386_get_ioperm(2) call just to check if the permsissions are being handled correctly. i386_get_ioperm(2) tells me everything is allright. Port range and enable argument are set according to my specs in ioperm_args. From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 14:12: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 74EBA16A41F for ; Tue, 9 Aug 2005 14:12:32 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FB1243D46 for ; Tue, 9 Aug 2005 14:12:30 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 31968 invoked from network); 9 Aug 2005 16:12:29 +0200 Received: from p508ffce4.dip.t-dialin.net (HELO localhost.skatecity) (80.143.252.228) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 9 Aug 2005 16:12:29 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j79EBxEl016011 for ; Tue, 9 Aug 2005 16:11:59 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j79EBxPH016010 for freebsd-hackers@freebsd.org; Tue, 9 Aug 2005 16:11:59 +0200 (CEST) (envelope-from arundel) From: alexander Date: Tue, 9 Aug 2005 16:11:59 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050809141159.GA15955@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050808202039.C988B43D48@mx1.FreeBSD.org> <20050809101409.Y73394@fledge.watson.org> <20050809133109.GA15300@skatecity> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050809133109.GA15300@skatecity> Subject: Re: Using sysarch specific syscalls in assembly? 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, 09 Aug 2005 14:12:32 -0000 On Tue Aug 9 05, alexander wrote: > > Any ideas? Maybe a timing issue? > Ehmm...can anybody explain the following to me? out dx,al ; -> bus error mov ecx,0FFFFFFh .wait: nop loop .wait,ecx out dx,al ; - > no bus error I'm clueless. :( From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 15:25:00 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 8568C16A420 for ; Tue, 9 Aug 2005 15:25:00 +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 9CC0043D48 for ; Tue, 9 Aug 2005 15:24:59 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Tue, 09 Aug 2005 11:39:46 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 9 Aug 2005 11:03:04 -0400 User-Agent: KMail/1.8 References: <20050808202039.C988B43D48@mx1.FreeBSD.org> <20050809101409.Y73394@fledge.watson.org> <20050809133109.GA15300@skatecity> In-Reply-To: <20050809133109.GA15300@skatecity> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508091103.04881.jhb@FreeBSD.org> Cc: Subject: Re: Using sysarch specific syscalls in assembly? 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, 09 Aug 2005 15:25:00 -0000 On Tuesday 09 August 2005 09:31 am, alexander wrote: > On Tue Aug 9 05, Robert Watson wrote: > > In general, it is much preferable that applications link against libc to > > get the system call stubs than that they directly invoke system calls. > > That way, if compatibility interfaces are introduced, etc, the > > application will continue to function. For example, there was at one > > point a migration away from explicit system calls to set certain kernel > > parameters, such as hostname and domainname, towards using sysctl, with > > the system calls being marked obsolete. The C library still provides a > > sethostname() interface, which is actually a wrapper in user space around > > sysctl(). So invoking the C function provided by libc for a system call > > will generally be preferred, even if the originating code is assembly. > > > > Robert N M Watson > > Thx. I'll try that. > > Unfortunately I'm experiencing some problems right now. From time to time > I'm getting a > > 'Bus error: 10 (core dumped)' > > This however appears randomly. One time I run the app everything works > fine,the next time it core dumps. Are there any errors in my code? > > %define SYSARCH 165 ; syscall sysarch(2) > %define I386_SET_IOPERM 4 ; i386_set_ioperm(2) number > > ioperm_args dd 378h > dd 3 > dd 1 > > OpenIO: > push byte ioperm_args > push dword I386_SET_IOPERM > mov eax,SYSARCH > Call _syscall > lea esp,[esp+8] > ret Just change this to: push byte ioperm_args ; this might be wrong, you need ; to be pushing a 32-bit pointer ; to the ioperm_args structure, not ; a byte push dword I386_SET_IOPERM call sysarch addl $8,%esp ret To use the sysarch() function in libc. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 15:45: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 2565316A41F for ; Tue, 9 Aug 2005 15:45:42 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: from episec.com (episec.com [69.55.237.141]) by mx1.FreeBSD.org (Postfix) with SMTP id C057243D45 for ; Tue, 9 Aug 2005 15:45:41 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 62656 invoked from network); 9 Aug 2005 15:45:41 -0000 Received: from episec.com (HELO crypto.iownanisp.com) (69.55.237.141) by episec.com with SMTP; 9 Aug 2005 15:45:41 -0000 Received: from 199.172.169.7 (auth. user edelkind@episec.com) by crypto.iownanisp.com with HTTP; Tue, 09 Aug 2005 15:45:41 +0000 To: freebsd-hackers@freebsd.org Date: Tue, 09 Aug 2005 15:45:41 +0000 X-Mailer: IlohaMail/0.8.12 (On: crypto.iownanisp.com) In-Reply-To: <20050809133109.GA15300@skatecity> From: "ari edelkind" Bounce-To: "ari edelkind" Errors-To: "ari edelkind" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Message-Id: <20050809154541.C057243D45@mx1.FreeBSD.org> Subject: Re: Using sysarch specific syscalls in assembly? 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, 09 Aug 2005 15:45:42 -0000 On 8/9/2005, "alexander" wrote: [...] >Unfortunately I'm experiencing some problems right now. From time to time >I'm getting a > >'Bus error: 10 (core dumped)' > >This however appears randomly. One time I run the app everything works fine,= the >next time it core dumps. Are there any errors in my code? > >%define SYSARCH=09=09165=09; syscall sysarch(2) >%define I386_SET_IOPERM 4=09; i386_set_ioperm(2) number > >ioperm_args=09dd=09378h >=09=09dd=093 >=09=09dd=091 > >OpenIO: >=09push byte ioperm_args >=09push dword I386_SET_IOPERM >=09mov eax,SYSARCH >=09Call _syscall [...] You need to push a _pointer_ to a structure as your second argument to sysarch(2). This means something more along the lines of: ioperm_args dd 378h dd 3 dd 1 argp dd ioperm_args [...] push dword argp push dword I386_SET_IOPERM [...] Get this wrong, and you'll have unpredictable results. ari From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 18:51:15 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 48FA216A41F for ; Tue, 9 Aug 2005 18:51:15 +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 1B75A43D5E for ; Tue, 9 Aug 2005 18:51:13 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id AC545DD4E; Tue, 9 Aug 2005 14:51:12 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id B826B1A07CE; Tue, 9 Aug 2005 14:51:05 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17144.64281.705769.294109@canoe.dclg.ca> Date: Tue, 9 Aug 2005 14:51:05 -0400 To: freebsd-hackers@freebsd.org X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid Subject: Bluetooth GPS for timekeeping? 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, 09 Aug 2005 18:51:15 -0000 I did a quick search and found some people sporadically talking about Bluetooth GPS units back in 2003 --- but only for navigation. While I intend to use my bluetooth GPS for navigation, I intend to use it primarily with my Treo 650 in that role. But ... since there are long patches of time where I'm not mobile, I was wondering if anyone had looked at using a Bluetooth GPS for timekeeping. Has anyone also ever had an ntp server sometimes use a GPS and othertimes use other servers ... depending on the availability of the GPS? 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 Tue Aug 9 18:58:35 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 E36BE16A428 for ; Tue, 9 Aug 2005 18:58:34 +0000 (GMT) (envelope-from frank@exit.com) Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2670F43D53 for ; Tue, 9 Aug 2005 18:58:34 +0000 (GMT) (envelope-from frank@exit.com) Received: from realtime.exit.com (realtime [206.223.0.5]) by tinker.exit.com (8.13.3/8.13.3) with ESMTP id j79IwVWb030085; Tue, 9 Aug 2005 11:58:31 -0700 (PDT) (envelope-from frank@exit.com) Received: from realtime.exit.com (localhost [127.0.0.1]) by realtime.exit.com (8.13.3/8.13.3) with ESMTP id j79IwUfE010517; Tue, 9 Aug 2005 11:58:30 -0700 (PDT) (envelope-from frank@exit.com) Received: (from frank@localhost) by realtime.exit.com (8.13.3/8.12.9/Submit) id j79IwUZ5010516; Tue, 9 Aug 2005 11:58:30 -0700 (PDT) (envelope-from frank@exit.com) X-Authentication-Warning: realtime.exit.com: frank set sender to frank@exit.com using -f From: Frank Mayhar To: David Gilbert In-Reply-To: <17144.64281.705769.294109@canoe.dclg.ca> References: <17144.64281.705769.294109@canoe.dclg.ca> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Exit Consulting Date: Tue, 09 Aug 2005 11:58:30 -0700 Message-Id: <1123613910.9836.15.camel@realtime.exit.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port X-Virus-Scanned: ClamAV 0.86.1/1011/Tue Aug 9 02:20:28 2005 on tinker.exit.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: Bluetooth GPS for timekeeping? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: frank@exit.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2005 18:58:35 -0000 On Tue, 2005-08-09 at 14:51 -0400, David Gilbert wrote: > But ... since there are long patches of time where I'm not mobile, I > was wondering if anyone had looked at using a Bluetooth GPS for > timekeeping. Has anyone also ever had an ntp server sometimes use a > GPS and othertimes use other servers ... depending on the availability > of the GPS? The former would depend strongly on the characteristics of the Bluetooth protocols, at least when it comes to accuracy. Keeping time to the half-second or so would be pretty easy, I would guess. The latter is the way it already works. Just configure other peers in your ntp.conf along with your GPS, viz: pps /dev/pps0 assert hardpps server 127.127.41.0 prefer # GPSClock fudge 127.127.41.0 stratum 0 fudge 127.127.41.0 time1 -1.0 peer 127.127.22.0 # PPS refclock fudge 127.127.22.0 stratum 0 flag3 1 # name it as a good clock peer 128.9.176.30 # timekeeper.isi.edu peer 164.67.62.194 # tick.ucla.edu peer 63.149.208.50 # nist1.datum.com peer 192.43.244.18 # time.nist.gov peer 206.223.0.15 # tick.exit.com That's the configuration for tock.exit.com. It uses the GPSClock if it's available, otherwise it falls back to the best of the other tickers. -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/ From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 19:19: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 752AD16A41F for ; Tue, 9 Aug 2005 19:19:57 +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 E810E44077 for ; Tue, 9 Aug 2005 19:19:56 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 686DEDBCF; Tue, 9 Aug 2005 15:19:56 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id 66FF91A0956; Tue, 9 Aug 2005 15:19:49 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17145.469.365833.447736@canoe.dclg.ca> Date: Tue, 9 Aug 2005 15:19:49 -0400 To: frank@exit.com In-Reply-To: <1123613910.9836.15.camel@realtime.exit.com> References: <17144.64281.705769.294109@canoe.dclg.ca> <1123613910.9836.15.camel@realtime.exit.com> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid Cc: freebsd-hackers@freebsd.org, David Gilbert Subject: Re: Bluetooth GPS for timekeeping? 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, 09 Aug 2005 19:19:57 -0000 >>>>> "Frank" == Frank Mayhar writes: Frank> On Tue, 2005-08-09 at 14:51 -0400, David Gilbert wrote: >> But ... since there are long patches of time where I'm not mobile, >> I was wondering if anyone had looked at using a Bluetooth GPS for >> timekeeping. Has anyone also ever had an ntp server sometimes use >> a GPS and othertimes use other servers ... depending on the >> availability of the GPS? Frank> The former would depend strongly on the characteristics of the Frank> Bluetooth protocols, at least when it comes to accuracy. Frank> Keeping time to the half-second or so would be pretty easy, I Frank> would guess. Frank> The latter is the way it already works. Just configure other Frank> peers in your ntp.conf along with your GPS, viz: How might you determine the accuracy of the GPS ... or the "characteristics of the Bluetooth protocols" ? The GPS docs "say" that the GPS chipset keep time to within 100ns. However (and I assume this is to save power) they also say that the position indication is only sent once per second. In my case, the Bluetooth GPS would be talking to a Bluetooth dongle hanging directly out a port of the server in question. 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 Tue Aug 9 19:38: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 6A7B416A420 for ; Tue, 9 Aug 2005 19:38:41 +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 EF43D43D66 for ; Tue, 9 Aug 2005 19:38:40 +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 j79JbX9Z030395 for ; Tue, 9 Aug 2005 13:37:33 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Aug 2005 13:37:34 -0600 (MDT) Message-Id: <20050809.133734.08360256.imp@bsdimp.com> To: hackers@freebsd.org From: "M. Warner Losh" 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, 09 Aug 2005 13:37:33 -0600 (MDT) Cc: Subject: Converting libfoo.so for linux to freebsd 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, 09 Aug 2005 19:38:41 -0000 I have recently purcahsed a device that comes with a .so for linux, but no sources. Is there any way one can take an arbitrary linux .so which appears to have no dependencies to a FreeBSD .so? The binary code is about 20k or so. Alternatively, anybody know how to take a linux .so and generate a .s that can be fed into the linux toolchain to generate a new .so... Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 19:40: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 6A70216A43B for ; Tue, 9 Aug 2005 19:40:30 +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 DDB2643D5E for ; Tue, 9 Aug 2005 19:40:29 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 5CA7ADF85; Tue, 9 Aug 2005 15:40:29 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id 496ED1A0578; Tue, 9 Aug 2005 15:40:22 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17145.1702.241994.49649@canoe.dclg.ca> Date: Tue, 9 Aug 2005 15:40:22 -0400 To: Maksim Yevmenkin In-Reply-To: <42F902C8.9050104@savvis.net> References: <17144.64281.705769.294109@canoe.dclg.ca> <1123613910.9836.15.camel@realtime.exit.com> <42F902C8.9050104@savvis.net> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid Cc: freebsd-hackers@freebsd.org, David Gilbert Subject: Re: Bluetooth GPS for timekeeping? 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, 09 Aug 2005 19:40:31 -0000 >>>>> "Maksim" == Maksim Yevmenkin writes: >> The latter is the way it already works. Just configure other peers >> in your ntp.conf along with your GPS, viz: Maksim> you can teach ntp to talk to bluetooth gps. all you need to do Maksim> is to write a new clock driver. or you could write a simple Maksim> proxy that would get the data from bluetooth gps and make it Maksim> available at pty(4) or nmdm(4). then you could use standard Maksim> serial nmea gps ntp driver (assuming that bluetooth gps uses Maksim> nmea messages). Well... I believe the bluetooth stack (or the tools available) already provide a bluetooth to pty serial emulation. 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 Tue Aug 9 20:27: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 B8FD916A41F for ; Tue, 9 Aug 2005 20:27:22 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fileserver.fields.utoronto.ca (fileserver.fields.utoronto.ca [128.100.216.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8105144652 for ; Tue, 9 Aug 2005 20:05:33 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fields.fields.utoronto.ca (fields.localdomain [192.168.216.11]) by fileserver.fields.utoronto.ca (8.12.8/8.12.8/Fields 6.0) with ESMTP id j79K5Rvf011240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Aug 2005 16:05:27 -0400 Received: from obsecurity.dyndns.org (localhost.localdomain [127.0.0.1]) by fields.fields.utoronto.ca (8.12.8/8.12.8/Fields WS 6.0) with ESMTP id j79K5Q6P010807; Tue, 9 Aug 2005 16:05:26 -0400 Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 19A2151333; Tue, 9 Aug 2005 16:05:25 -0400 (EDT) Date: Tue, 9 Aug 2005 16:05:25 -0400 From: Kris Kennaway To: "M. Warner Losh" Message-ID: <20050809200524.GA56682@xor.obsecurity.org> References: <20050809.133734.08360256.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline In-Reply-To: <20050809.133734.08360256.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 09 Aug 2005 20:27:23 -0000 --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 09, 2005 at 01:37:34PM -0600, M. Warner Losh wrote: > I have recently purcahsed a device that comes with a .so for linux, > but no sources. Is there any way one can take an arbitrary linux .so > which appears to have no dependencies to a FreeBSD .so? The binary > code is about 20k or so. >=20 > Alternatively, anybody know how to take a linux .so and generate a .s > that can be fed into the linux toolchain to generate a new .so... Would it be acceptable to just build your binary as a linux one? This would be easiest. Kris --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC+QyEWry0BWjoQKURAu8vAKDIC4GYLBYOPsLfZhJrMPsLuyc1YQCgjeeE 4sX1/fkr8FYkPWuaS2lzO7s= =aftE -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 20:27:24 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 376E616A430 for ; Tue, 9 Aug 2005 20:27:23 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94933441C0 for ; Tue, 9 Aug 2005 19:26:15 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 21481 invoked from network); 9 Aug 2005 21:26:13 +0200 Received: from p508ffce4.dip.t-dialin.net (HELO localhost.skatecity) (80.143.252.228) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 9 Aug 2005 21:26:13 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j79JPVX5019365 for ; Tue, 9 Aug 2005 21:25:31 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j79JPVpp019364 for freebsd-hackers@freebsd.org; Tue, 9 Aug 2005 21:25:31 +0200 (CEST) (envelope-from arundel) From: alexander Date: Tue, 9 Aug 2005 21:25:30 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050809192530.GA19230@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050809133109.GA15300@skatecity> <20050809154541.C057243D45@mx1.FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050809154541.C057243D45@mx1.FreeBSD.org> Subject: Re: Using sysarch specific syscalls in assembly? 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, 09 Aug 2005 20:27:25 -0000 On Tue Aug 9 05, ari edelkind wrote: > > You need to push a _pointer_ to a structure as your second argument to > sysarch(2). This means something more along the lines of: > > ioperm_args dd 378h > dd 3 > dd 1 > > argp dd ioperm_args > > [...] > push dword argp > push dword I386_SET_IOPERM > [...] > > > Get this wrong, and you'll have unpredictable results. > > ari Nope. That doesn't work. The carry flag is being set and eax is 16h, which is: [EINVAL] An invalid range was specified by the start or length arguments. (quoted from i386_set_ioperm(2)). Here is some data that might be usefull (c&p from ddd): %esp = 0xbfbfea58 mem(%esp) = 0x00000004 0x0804a214 mem(0x0804a214) = 0x0804a1fc mem(0x0804a1fc) = 0x00000378 0x00000004 0x00000003 From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 20:49: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 1EB3016A41F for ; Tue, 9 Aug 2005 20:49:14 +0000 (GMT) (envelope-from frank@exit.com) Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF90F43D58 for ; Tue, 9 Aug 2005 20:49:13 +0000 (GMT) (envelope-from frank@exit.com) Received: from realtime.exit.com (realtime [206.223.0.5]) by tinker.exit.com (8.13.3/8.13.3) with ESMTP id j79Kn8sX030846; Tue, 9 Aug 2005 13:49:08 -0700 (PDT) (envelope-from frank@exit.com) Received: from realtime.exit.com (localhost [127.0.0.1]) by realtime.exit.com (8.13.3/8.13.3) with ESMTP id j79Kn7wr011116; Tue, 9 Aug 2005 13:49:07 -0700 (PDT) (envelope-from frank@exit.com) Received: (from frank@localhost) by realtime.exit.com (8.13.3/8.12.9/Submit) id j79Kn7tF011115; Tue, 9 Aug 2005 13:49:07 -0700 (PDT) (envelope-from frank@exit.com) X-Authentication-Warning: realtime.exit.com: frank set sender to frank@exit.com using -f From: Frank Mayhar To: David Gilbert In-Reply-To: <17145.469.365833.447736@canoe.dclg.ca> References: <17144.64281.705769.294109@canoe.dclg.ca> <1123613910.9836.15.camel@realtime.exit.com> <17145.469.365833.447736@canoe.dclg.ca> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Exit Consulting Date: Tue, 09 Aug 2005 13:49:06 -0700 Message-Id: <1123620546.9836.31.camel@realtime.exit.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port X-Virus-Scanned: ClamAV 0.86.1/1011/Tue Aug 9 02:20:28 2005 on tinker.exit.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: Bluetooth GPS for timekeeping? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: frank@exit.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2005 20:49:14 -0000 On Tue, 2005-08-09 at 15:19 -0400, David Gilbert wrote: > >>>>> "Frank" == Frank Mayhar writes: > > Frank> On Tue, 2005-08-09 at 14:51 -0400, David Gilbert wrote: > >> But ... since there are long patches of time where I'm not mobile, > >> I was wondering if anyone had looked at using a Bluetooth GPS for > >> timekeeping. Has anyone also ever had an ntp server sometimes use > >> a GPS and othertimes use other servers ... depending on the > >> availability of the GPS? > > Frank> The former would depend strongly on the characteristics of the > Frank> Bluetooth protocols, at least when it comes to accuracy. > Frank> Keeping time to the half-second or so would be pretty easy, I > Frank> would guess. > > Frank> The latter is the way it already works. Just configure other > Frank> peers in your ntp.conf along with your GPS, viz: > > How might you determine the accuracy of the GPS ... or the > "characteristics of the Bluetooth protocols" ? First learn about the way Bluetooth works. Pay attention to the various delays that are built into the protocol and that might be forced by transmission and reception conditions. > The GPS docs "say" that the GPS chipset keep time to within 100ns. > However (and I assume this is to save power) they also say that the > position indication is only sent once per second. The way this accuracy is typically transmitting outside the GPS unit itself is via a (usually logic-level) pulse-per-second signal. As it happens, a lot of the older GPS units that do this have a 5V PPS, which is enough to get it over the 3V RS232 threshold so it can be seen as CD. (For those with a PPS of 3.3V or lower, you have to use another method; PHK has a good mechanism on his website, using a Soekris box.) While the RS232 hardware is pretty sloppy, it is good enough to get within a few microseconds of the real time; right now tock thinks he's within about nine us of UTC and tick agrees to within +/- 2us. Tick uses a Motorola Oncore (instead of the GPSClock) but also gets the PPS via the RS232 CD signal and he thinks he's within about a microsecond of UTC. Since it's wired, the PPS signal is just degraded by propagation and by the accuracy of the receiving system. I'm no RF expert but I'll bet that getting high accuracy via Bluetooth would be problematic. On the other hand, accuracy to within milliseconds should be doable and to within hundreds of ms easy, since that's what the position indication string gives you. > In my case, the Bluetooth GPS would be talking to a Bluetooth dongle > hanging directly out a port of the server in question. Well, you wouldn't want to run a stratum 0 NTP server on this, but it's probably plenty good enough for a human being. -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/ From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 20:53: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 8439E16A41F for ; Tue, 9 Aug 2005 20:53:47 +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 2849B43D58 for ; Tue, 9 Aug 2005 20:53:47 +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 j79Kq8NR031055; Tue, 9 Aug 2005 14:52:08 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Aug 2005 14:52:08 -0600 (MDT) Message-Id: <20050809.145208.41664460.imp@bsdimp.com> To: kris@obsecurity.org From: Warner Losh In-Reply-To: <20050809200524.GA56682@xor.obsecurity.org> References: <20050809.133734.08360256.imp@bsdimp.com> <20050809200524.GA56682@xor.obsecurity.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]); Tue, 09 Aug 2005 14:52:08 -0600 (MDT) Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 09 Aug 2005 20:53:47 -0000 > On Tue, Aug 09, 2005 at 01:37:34PM -0600, M. Warner Losh wrote: > > I have recently purcahsed a device that comes with a .so for linux, > > but no sources. Is there any way one can take an arbitrary linux .so > > which appears to have no dependencies to a FreeBSD .so? The binary > > code is about 20k or so. > > > > Alternatively, anybody know how to take a linux .so and generate a .s > > that can be fed into the linux toolchain to generate a new .so... > > Would it be acceptable to just build your binary as a linux one? This > would be easiest. Does the Linux Sane work on FreeBSD? I thought there were issues with libusb that precluded that... Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 21: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 9FB0016A41F for ; Tue, 9 Aug 2005 21:19:10 +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 2668744491 for ; Tue, 9 Aug 2005 21:19:10 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 7D5C5DCE4; Tue, 9 Aug 2005 17:19:09 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id 6B5061A0957; Tue, 9 Aug 2005 17:19:02 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17145.7622.381629.535747@canoe.dclg.ca> Date: Tue, 9 Aug 2005 17:19:02 -0400 To: frank@exit.com In-Reply-To: <1123620546.9836.31.camel@realtime.exit.com> References: <17144.64281.705769.294109@canoe.dclg.ca> <1123613910.9836.15.camel@realtime.exit.com> <17145.469.365833.447736@canoe.dclg.ca> <1123620546.9836.31.camel@realtime.exit.com> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid Cc: freebsd-hackers@freebsd.org, David Gilbert Subject: Re: Bluetooth GPS for timekeeping? 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, 09 Aug 2005 21:19:10 -0000 >>>>> "Frank" == Frank Mayhar writes: Frank> Well, you wouldn't want to run a stratum 0 NTP server on this, Frank> but it's probably plenty good enough for a human being. -- Hrm. So a stratum two ntp server is going to be more or less accurate than this type of setup? 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 Tue Aug 9 21:23:34 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 E9B9316A41F for ; Tue, 9 Aug 2005 21:23:34 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D5F44448D for ; Tue, 9 Aug 2005 21:23:34 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id j79LNS3T053487; Tue, 9 Aug 2005 16:23:28 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Date: Tue, 9 Aug 2005 16:23:29 -0500 (CDT) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: "M. Warner Losh" In-Reply-To: <20050809.133734.08360256.imp@bsdimp.com> Message-ID: <20050809161545.M871@thor.farley.org> References: <20050809.133734.08360256.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-910406556-1123622609=:871" Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 09 Aug 2005 21:23:35 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-910406556-1123622609=:871 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 9 Aug 2005, M. Warner Losh wrote: > I have recently purcahsed a device that comes with a .so for linux, > but no sources. Is there any way one can take an arbitrary linux .so > which appears to have no dependencies to a FreeBSD .so? The binary > code is about 20k or so. > > Alternatively, anybody know how to take a linux .so and generate a .s > that can be fed into the linux toolchain to generate a new .so... Although I have never tried it, I had read somewhere that you could possibly convert a Linux .so using objcopy. Found it: http://groups-beta.google.com/group/fa.freebsd.questions/browse_frm/thread/= 2c1ce35fab83427/7add378b8e5a7006 I am curious if it works for you too. Se=E1n --=20 sean-freebsd@farley.org --0-910406556-1123622609=:871-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 21:25:29 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 84ECB16A41F for ; Tue, 9 Aug 2005 21:25:29 +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 DB9E344491 for ; Tue, 9 Aug 2005 21:25:28 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 6CF42DCE4; Tue, 9 Aug 2005 17:25:28 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id 62A7B1A0939; Tue, 9 Aug 2005 17:25:21 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17145.8001.349961.334759@canoe.dclg.ca> Date: Tue, 9 Aug 2005 17:25:21 -0400 To: Warner Losh In-Reply-To: <20050809.150845.71119932.imp@bsdimp.com> References: <17144.64281.705769.294109@canoe.dclg.ca> <1123613910.9836.15.camel@realtime.exit.com> <17145.469.365833.447736@canoe.dclg.ca> <20050809.150845.71119932.imp@bsdimp.com> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid Cc: freebsd-hackers@freebsd.org, dgilbert@dclg.ca Subject: Re: Bluetooth GPS for timekeeping? 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, 09 Aug 2005 21:25:29 -0000 >>>>> "Warner" == Warner Losh writes: Warner> You'd likely be money ahead by using a simpler, wired GPS Warner> receiver directly into a legacy serial port. Heh. But I don't have one of those. You see, this was just a hey ... I have this ... and it's not currently in use... so it could have a cool second life ... type project. I suppose what you're saying is that to get accurate time ... since bluetooth has the characteristics of a "network" that there would have to be a somewhat sophisticated NTP over bluetooth protocol. Heh. 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 Tue Aug 9 21:28:03 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 65A1116A41F for ; Tue, 9 Aug 2005 21:28:03 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9AB344491 for ; Tue, 9 Aug 2005 21:28:02 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j79LRVBS034408 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 9 Aug 2005 23:27:33 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j79LRAJ7081160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Aug 2005 23:27:10 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j79LR94A025566; Tue, 9 Aug 2005 23:27:09 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j79LR9Hn025565; Tue, 9 Aug 2005 23:27:09 +0200 (CEST) (envelope-from ticso) Date: Tue, 9 Aug 2005 23:27:09 +0200 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20050809212708.GS94041@cicely12.cicely.de> References: <20050809.133734.08360256.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050809.133734.08360256.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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: Tue, 09 Aug 2005 21:28:03 -0000 On Tue, Aug 09, 2005 at 01:37:34PM -0600, M. Warner Losh wrote: > I have recently purcahsed a device that comes with a .so for linux, > but no sources. Is there any way one can take an arbitrary linux .so > which appears to have no dependencies to a FreeBSD .so? The binary > code is about 20k or so. Isn't this just brandelf'ing to FreeBSD-i386? Asuming that the lib really has no dependencies to linux specific device/kernel features or linux specific libs. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 21:31: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 B9D7416A41F for ; Tue, 9 Aug 2005 21:31:39 +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 4B5434448D for ; Tue, 9 Aug 2005 21:31:39 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j79LVUYY022367; Tue, 9 Aug 2005 16:31:30 -0500 (CDT) (envelope-from dan) Date: Tue, 9 Aug 2005 16:31:30 -0500 From: Dan Nelson To: "M. Warner Losh" Message-ID: <20050809213130.GB71687@dan.emsphone.com> References: <20050809.133734.08360256.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050809.133734.08360256.imp@bsdimp.com> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 09 Aug 2005 21:31:39 -0000 In the last episode (Aug 09), M. Warner Losh said: > I have recently purcahsed a device that comes with a .so for linux, > but no sources. Is there any way one can take an arbitrary linux .so > which appears to have no dependencies to a FreeBSD .so? The binary > code is about 20k or so. As long as any structs that are passed back and forth have the same members and alignment, it should work. This includes struct FILE, which means if the app tries to use stdio it'll likely crash. I just compiled a little "hello world" object file on SUSE and linked it on FreeBSD and it ran (it just calls printf, which is safe since it doesn't pass a FILE *). -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 21:34: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 1BF2116A42A for ; Tue, 9 Aug 2005 21:34:33 +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 9D99044374 for ; Tue, 9 Aug 2005 21:12:00 +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 j79L8j9W031191; Tue, 9 Aug 2005 15:08:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Aug 2005 15:08:45 -0600 (MDT) Message-Id: <20050809.150845.71119932.imp@bsdimp.com> To: dgilbert@dclg.ca From: Warner Losh In-Reply-To: <17145.469.365833.447736@canoe.dclg.ca> References: <17144.64281.705769.294109@canoe.dclg.ca> <1123613910.9836.15.camel@realtime.exit.com> <17145.469.365833.447736@canoe.dclg.ca> 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, 09 Aug 2005 15:08:45 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: Bluetooth GPS for timekeeping? 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, 09 Aug 2005 21:34:33 -0000 > The GPS docs "say" that the GPS chipset keep time to within 100ns. > However (and I assume this is to save power) they also say that the > position indication is only sent once per second. 100ns is really horrible GPS performance. However, it is likely more than good enough for using it to track time on a server. ntp over the net is good to the millisecond range anyway, and this is 4 orders of magnitude better. > In my case, the Bluetooth GPS would be talking to a Bluetooth dongle > hanging directly out a port of the server in question. ntpd will require direct access to the device, so it will need to be off the server in question. As to how accurate you'll be, that's another matter altogether. There's propigation delays that will give your system some fixed offset from true time. There's also likely going to be variance in latency due to bluetooth layer good, usb layer goo, interrupts, etc. This will likely be in the several tens to low hundreds of microseconds range given all the interconnect technology that's bettween the GPS receiver and the time keeping device. I don't think that the USB based com ports supports the pps time stamping interface. That's likely going to be what kills your project unless (a) the bluetooth dongle is connected via a sio port or (b) you hack the ucom driver to cope. You'd likely be money ahead by using a simpler, wired GPS receiver directly into a legacy serial port. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 21:37:18 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 6CADD16A425 for ; Tue, 9 Aug 2005 21:37:18 +0000 (GMT) (envelope-from flynn@energyhq.es.eu.org) Received: from mindfields.energyhq.es.eu.org (73.Red-213-97-200.pooles.rima-tde.net [213.97.200.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2587343D55 for ; Tue, 9 Aug 2005 21:37:09 +0000 (GMT) (envelope-from flynn@energyhq.es.eu.org) Received: from scienide.energyhq.es.eu.org (scienide.energyhq.es.eu.org [192.168.100.1]) by mindfields.energyhq.es.eu.org (Postfix) with SMTP id B82BB123FCA; Tue, 9 Aug 2005 23:37:06 +0200 (CEST) Date: Tue, 9 Aug 2005 23:36:57 +0200 From: Miguel Mendez To: "M. Warner Losh" Message-Id: <20050809233657.745c41b4.flynn@energyhq.es.eu.org> In-Reply-To: <20050809.133734.08360256.imp@bsdimp.com> References: <20050809.133734.08360256.imp@bsdimp.com> X-Mailer: Sylpheed version 2.0.0 (GTK+ 2.6.9; amd64-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__9_Aug_2005_23_36_57_+0200_6BEGAe4z2xq3eR+Q" Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 09 Aug 2005 21:37:18 -0000 --Signature=_Tue__9_Aug_2005_23_36_57_+0200_6BEGAe4z2xq3eR+Q Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 09 Aug 2005 13:37:34 -0600 (MDT) "M. Warner Losh" wrote: > I have recently purcahsed a device that comes with a .so for linux, > but no sources. Is there any way one can take an arbitrary linux .so > which appears to have no dependencies to a FreeBSD .so? The binary > code is about 20k or so. Could you be a bit more specific wrt dependencies? Does the device in question provide an API via said .so and a .h? You could try using ndisasm (from the /devel/nasm port) or a perl script called dasm that calls objdump and see if you can get something usable from there. If the .so is small it shouldn't be that much work, although it might be more practical to derive the interface code from the asm output (i.e. reverse engineer) than try to shoehorn the resulting .S into a FreeBSD .so. The other alternative would be building a Linux binary as Kris has suggested, although I suspect that this .so is involved in some sort of i/o which might or might not be easily ported to FreeBSD. Cheers, --=20 Miguel Mendez http://www.energyhq.es.eu.org PGP Key: 0xDC8514F1 --Signature=_Tue__9_Aug_2005_23_36_57_+0200_6BEGAe4z2xq3eR+Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFC+SH8nLctrNyFFPERAjizAKCmiWrwdPcKFPXWc4I0P8df2feamwCeNGIP LLVA6TPYRLEeu2AprO5886k= =v78V -----END PGP SIGNATURE----- --Signature=_Tue__9_Aug_2005_23_36_57_+0200_6BEGAe4z2xq3eR+Q-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 21:48:36 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 D3FE216A41F for ; Tue, 9 Aug 2005 21:48:36 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CBEC43D48 for ; Tue, 9 Aug 2005 21:48:28 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de (musashi.et.bocholt.fh-gelsenkirchen.de [193.175.197.95]) by alice.et.bocholt.fh-gelsenkirchen.de (8.12.9/8.12.9) with ESMTP id j79LmPeD030069 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 9 Aug 2005 23:48:25 +0200 Received: from sora.hank.home ([10.8.0.6]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.13.3/8.13.3) with ESMTP id j79LmOWD094761 for ; Tue, 9 Aug 2005 23:48:24 +0200 (CEST) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from localhost (localhost.hank.home [127.0.0.1]) by sora.hank.home (8.13.3/8.13.3) with ESMTP id j79Lnvn8013382 for ; Tue, 9 Aug 2005 23:49:57 +0200 (CEST) (envelope-from hank@sora.hank.home) Message-Id: <200508092149.j79Lnvn8013382@sora.hank.home> From: Dirk Gouders To: hackers@freebsd.org Date: Tue, 09 Aug 2005 23:49:57 +0200 Sender: gouders@et.bocholt.fh-ge.de X-Scanned-By: MIMEDefang 2.43 Cc: Subject: Include files that depend on include files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dirk Gouders List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2005 21:48:36 -0000 Hello, I am currently playing with the KLD facility on a 4.11-STABLE system and noticed that there are some include files that need other files included before them, e.g. sys/module.h and sys/linker.h cannot be preprocessed/compiled without including other necessary files before them. Is that intentional? And if yes, is there a difference of such a "rule" between "kernel include files" and those that are normally included in "user space code"? Dirk From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 22:01:35 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 A033016A420 for ; Tue, 9 Aug 2005 22:01:35 +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 6B4C643D67 for ; Tue, 9 Aug 2005 22:01:32 +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 j79M1LW2015987; Tue, 9 Aug 2005 15:01:22 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j79M1Lfw015986; Tue, 9 Aug 2005 15:01:21 -0700 Date: Tue, 9 Aug 2005 15:01:21 -0700 From: Brooks Davis To: Dirk Gouders Message-ID: <20050809220121.GB15004@odin.ac.hmc.edu> References: <200508092149.j79Lnvn8013382@sora.hank.home> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mxv5cy4qt+RJ9ypb" Content-Disposition: inline In-Reply-To: <200508092149.j79Lnvn8013382@sora.hank.home> 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: Include files that depend on include files 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, 09 Aug 2005 22:01:35 -0000 --mxv5cy4qt+RJ9ypb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 09, 2005 at 11:49:57PM +0200, Dirk Gouders wrote: > Hello, >=20 > I am currently playing with the KLD facility on a 4.11-STABLE system > and noticed that there are some include files that need other files > included before them, e.g. sys/module.h and sys/linker.h cannot be > preprocessed/compiled without including other necessary files before > them. >=20 > Is that intentional? And if yes, is there a difference of such > a "rule" between "kernel include files" and those that are normally > included in "user space code"? This is intentational. We try to avoid having headers bring in more then absolutly required when included. I'm not sure what your second question means. -- 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 --mxv5cy4qt+RJ9ypb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC+SexXY6L6fI4GtQRAtTsAKDDJghv7sMY2PmZHaBKDDwYOt2YgQCfcytK MYX/qfqM2/oVgawtC5v+WqE= =0+dk -----END PGP SIGNATURE----- --mxv5cy4qt+RJ9ypb-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 22:20:34 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 C5D5816A41F for ; Tue, 9 Aug 2005 22:20:34 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A82D43D58 for ; Tue, 9 Aug 2005 22:20:33 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de (musashi.et.bocholt.fh-gelsenkirchen.de [193.175.197.95]) by alice.et.bocholt.fh-gelsenkirchen.de (8.12.9/8.12.9) with ESMTP id j79MKVeD030149 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 10 Aug 2005 00:20:32 +0200 Received: from sora.hank.home ([10.8.0.6]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.13.3/8.13.3) with ESMTP id j79MKRxL094860; Wed, 10 Aug 2005 00:20:31 +0200 (CEST) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from localhost (localhost.hank.home [127.0.0.1]) by sora.hank.home (8.13.3/8.13.3) with ESMTP id j79MM1DR013799; Wed, 10 Aug 2005 00:22:01 +0200 (CEST) (envelope-from hank@sora.hank.home) Message-Id: <200508092222.j79MM1DR013799@sora.hank.home> To: Brooks Davis In-Reply-To: Message from Brooks Davis of "Tue, 09 Aug 2005 15:01:21 PDT." <20050809220121.GB15004@odin.ac.hmc.edu> Date: Wed, 10 Aug 2005 00:22:01 +0200 From: Dirk GOUDERS X-Scanned-By: MIMEDefang 2.43 Cc: hackers@freebsd.org Subject: Re: Include files that depend on include files 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, 09 Aug 2005 22:20:34 -0000 > This is intentational. We try to avoid having headers bring in more > then absolutly required when included. I'm not sure what your second > question means. With my second question I wanted to ask if this intention is only for kernel level code or a general one. I am asking this, because somewhen in a project that I was not actually participating in I heard or read a rule that roughly said: "all include files have to include all files they depend on and compile cleanly", but that project was on a user space program. Dirk From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 23:43:51 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 066BF16A41F for ; Tue, 9 Aug 2005 23:43:51 +0000 (GMT) (envelope-from jhs@flat.berklix.net) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F9E144F4E for ; Tue, 9 Aug 2005 23:43:49 +0000 (GMT) (envelope-from jhs@flat.berklix.net) Received: from js.berklix.net (p549A780D.dip.t-dialin.net [84.154.120.13]) (authenticated bits=0) by tower.berklix.org (8.12.9p2/8.12.9) with ESMTP id j79Nhlxr036710 for ; Wed, 10 Aug 2005 01:43:48 +0200 (CEST) (envelope-from jhs@flat.berklix.net) Received: from fire.jhs.private (fire.jhs.private [192.168.91.41]) by js.berklix.net (8.12.11/8.12.11) with ESMTP id j79NhbPX018015 for ; Wed, 10 Aug 2005 01:43:46 +0200 (CEST) (envelope-from jhs@flat.berklix.net) Received: from fire.jhs.private (localhost.jhs.private [127.0.0.1]) by fire.jhs.private (8.13.1/8.13.1) with ESMTP id j79Nhbrf057796 for ; Wed, 10 Aug 2005 01:43:37 +0200 (CEST) (envelope-from jhs@fire.jhs.private) Received: (from jhs@localhost) by fire.jhs.private (8.13.1/8.13.1/Submit) id j79NhbU9057795; Wed, 10 Aug 2005 01:43:37 +0200 (CEST) (envelope-from jhs) Date: Wed, 10 Aug 2005 01:43:37 +0200 (CEST) Message-Id: <200508092343.j79NhbU9057795@fire.jhs.private> To: hackers@freebsd.org From: "Julian Stacey" Organization: http://berklix.com Munich Unix, BSD, Internet Consultancy Fcc: sent-mail User-agent: EXMH http://beedub.com/exmh/ on FreeBSD http://freebsd.org X-URL: http://berklix.com/~jhs/ Cc: Subject: HP USB printer PSC 1315 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, 09 Aug 2005 23:43:51 -0000 Anyone got FreeBSD to recognise an HP USB printer ? I have a PSC 1315. With usbd -d -v 5.3-custom kernel & 6beta2-generic both dont even see it. ulpt & uscanner are in generic config & my config The 1315 is a rectangular printer with flat scanner on top. -- Julian Stacey Muenchner Unix Urlaubs Vertretung http://berklix.com Mail in Ascii. Html dumped as Spam. Ihr Rauch = mein allergischer Kopfschmerz. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 00:27: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 65B5A16A41F for ; Wed, 10 Aug 2005 00:27:52 +0000 (GMT) (envelope-from freebsd@thesnodgrass.com) Received: from fed1rmmtao06.cox.net (fed1rmmtao06.cox.net [68.230.241.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D61345560 for ; Wed, 10 Aug 2005 00:27:51 +0000 (GMT) (envelope-from freebsd@thesnodgrass.com) Received: from [192.168.1.100] (really [68.8.226.201]) by fed1rmmtao06.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050810002751.COCD19494.fed1rmmtao06.cox.net@[192.168.1.100]> for ; Tue, 9 Aug 2005 20:27:51 -0400 Message-ID: <42F93030.2050509@thesnodgrass.com> Date: Tue, 09 Aug 2005 17:37:36 -0500 From: j snod User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050712) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Realtek RTL8169 on FreeBSD 5.4: no carrier 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, 10 Aug 2005 00:27:52 -0000 I recently installed FreeBSD 5.4 on an ABIT AA-8 DuraMax and all went well. All hardware detected properly and everything was running great, until I got to configuring my network. ifconfig shows my onboard gigabit LAN as "status: no carrier" I can successfully ping localhost and the IP that was assigned to re0 (192.168.1.31). when I plug an ethernet cable from my FreeBSD box to my router, I get "status: no carrier." Oddly, when I plug an ethernet cable from my FreeBSD box to my laptop's LAN port, I get "status: active". The lights on the ethernet jack indicate the same. Additionally, if I manually set the media with the following command: # ifconfig re0 media 10baseT/UTP mediaopt full-duplex The status magically switches to "active" and I can use my ethernet! I know that there are known problems with RealTek chipsets, but it is listed in the 5.4 supported hardware list. Bottom line is that the onboard LAN is detected, installed, and working properly, but it seems as if the driver can't properly detect when a cable is plugged into the jack. I was hoping someone could help. uname -a: -------------------------------------- FreeBSD db.domain.com 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May 8 10:21:06 UTC 2005 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 ifconfig: -------------------------------------- re0: flags=8843 mtu 1500 options=18 inet 192.168.1.31 netmast 0xffffff00 broadcast 192.168.1.255 inet6 ... ether 00:50:8d:eb:e5:be media: Ethernet autoselect (none) status: no carrier lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 Relevant dmesg: -------------------------------------- re0: port 0xee00-0xeeff mem 0xfbfff000-0xfbfff0ff irc 16 at device 1.0 on pci1 miibus0: on re0 rgephy0: on miibus0 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto re0: Ethernet address: 00:50:8d:eb:e5:be pciconf -lv: -------------------------------------- re0@pci1:1:0: class=0x020000 card=0x1039147b chip=0x816910ec rev=0x10 hdr=0x00 vendor = 'Realtek Semiconductor' device = 'RTL8169 Gigabit Ethernet Adapter class = network subclass = ethernet pciconf -r pci1:1:0 0:0xff -------------------------------------- 816910ec 02b00007 02000010 00002008 0000ee01 fbfff000 00000000 00000000 00000000 00000000 00000000 1039147b 00000000 000000dc 00000000 40200110 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f7c20001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 00:38:12 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 5908716A42A for ; Wed, 10 Aug 2005 00:38:12 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48F3F44160 for ; Tue, 9 Aug 2005 22:31:32 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id D2D6D46B2C; Tue, 9 Aug 2005 18:31:31 -0400 (EDT) Date: Tue, 9 Aug 2005 23:34:49 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Dirk GOUDERS In-Reply-To: <200508092222.j79MM1DR013799@sora.hank.home> Message-ID: <20050809233345.K1195@fledge.watson.org> References: <200508092222.j79MM1DR013799@sora.hank.home> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Include files that depend on include files 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, 10 Aug 2005 00:38:13 -0000 On Wed, 10 Aug 2005, Dirk GOUDERS wrote: > > This is intentational. We try to avoid having headers bring in more > > then absolutly required when included. I'm not sure what your second > > question means. > > With my second question I wanted to ask if this intention is only for > kernel level code or a general one. I am asking this, because somewhen > in a project that I was not actually participating in I heard or read a > rule that roughly said: "all include files have to include all files > they depend on and compile cleanly", but that project was on a user > space program. In general, in the role the operating system vendor, it's important to minimize "header pollution" as much as possible. Unlike C++, C doesn't have a notion of structured use of the name space, and if things are massively nested included, that dramatically increases the chance of a conflict of use between "the system" and a user application. You'll notice that increasingly, FreeBSD-specific defines are prefixed with '_', as that indicates use of reserved "you're the system" symbol space. For example, the "#ifdef KERNEL"'s all over the place became "#ifdef _KERNEL", as there's no reason an application shouldn't use a define named KERNEL. The rules are a bit different if you're the application, although it's in your interest to include as a few unnecessary headers as possible, to reduce the chances of getting definitions that conflict with your application. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 03:08: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 5729D16A41F for ; Wed, 10 Aug 2005 03:08:19 +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 BE878444D2 for ; Tue, 9 Aug 2005 22:48:21 +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 j79Mkvwj049323; Tue, 9 Aug 2005 16:46:57 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Aug 2005 16:46:59 -0600 (MDT) Message-Id: <20050809.164659.115908116.imp@bsdimp.com> To: dgilbert@dclg.ca From: "M. Warner Losh" In-Reply-To: <17145.8001.349961.334759@canoe.dclg.ca> References: <17145.469.365833.447736@canoe.dclg.ca> <20050809.150845.71119932.imp@bsdimp.com> <17145.8001.349961.334759@canoe.dclg.ca> 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, 09 Aug 2005 16:46:57 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: Bluetooth GPS for timekeeping? 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, 10 Aug 2005 03:08:19 -0000 In message: <17145.8001.349961.334759@canoe.dclg.ca> David Gilbert writes: : >>>>> "Warner" == Warner Losh writes: : : Warner> You'd likely be money ahead by using a simpler, wired GPS : Warner> receiver directly into a legacy serial port. : : Heh. But I don't have one of those. You see, this was just a hey : ... I have this ... and it's not currently in use... so it could have : a cool second life ... type project. : : I suppose what you're saying is that to get accurate time ... since : bluetooth has the characteristics of a "network" that there would have : to be a somewhat sophisticated NTP over bluetooth protocol. Heh. If all you care about is millisecond accuracy, it may be sufficient. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 03:08:54 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 0D4DA16A41F for ; Wed, 10 Aug 2005 03:08:51 +0000 (GMT) (envelope-from gjb@gbch.net) Received: from gw.gbch.net (gw.gbch.net [203.143.238.93]) by mx1.FreeBSD.org (Postfix) with SMTP id BDB1645013 for ; Tue, 9 Aug 2005 23:48:03 +0000 (GMT) (envelope-from gjb@gbch.net) Received: (qmail 256 invoked from network); 10 Aug 2005 09:48:01 +1000 Received: from gecko.gbch.net (172.16.1.7) by bambi.gbch.net with SMTP; 10 Aug 2005 09:48:01 +1000 Received: (qmail 69479 invoked by uid 1001); 10 Aug 2005 09:48:00 +1000 Message-ID: Date: Wed, 10 Aug 2005 09:48:00 +1000 From: Greg Black To: Julian Stacey References: <200508092343.j79NhbU9057795@fire.jhs.private> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508092343.j79NhbU9057795@fire.jhs.private> User-Agent: Mutt/1.4.2.1i; gjb-muttsend.sh 1.7 2004-10-05 X-Uptime: 171 days X-Operating-System: FreeBSD 4.10-RELEASE i386 X-Location: Brisbane, Australia; 27.49841S 152.98439E X-URL: http://www.gbch.net/gjb.html X-Blog: http://www.gbch.net/gjb/blog/ X-Image-URL: http://www.gbch.net/gjb/gjb-auug048.gif X-PGP-Key-Fingerprint: EBB2 2A92 A79D 1533 AC00 3C46 5D83 B6FB 4B04 B7D6 X-Request-PGP: http://www.gbch.net/keys/4B04B7D6.asc Cc: hackers@freebsd.org Subject: Re: HP USB printer PSC 1315 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, 10 Aug 2005 03:08:54 -0000 On 2005-08-10, Julian Stacey wrote: > Anyone got FreeBSD to recognise an HP USB printer ? I have a PSC 1315. I have a Deskjet 6540 and it works fine with 5.4-R without any setup issues at all. Greg From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 05: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 051C316A421 for ; Wed, 10 Aug 2005 05:04:29 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87EFA45F48 for ; Wed, 10 Aug 2005 04:41:26 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id j7A4fPSX006146; Tue, 9 Aug 2005 21:41:25 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id j7A4fOeF006145; Tue, 9 Aug 2005 21:41:24 -0700 (PDT) (envelope-from jmg) Date: Tue, 9 Aug 2005 21:41:24 -0700 From: John-Mark Gurney To: Minh Tran Message-ID: <20050810044124.GE62369@funkthat.com> Mail-Followup-To: Minh Tran , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p1 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel code of reseting/ignoring tcp SYN packets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 05:04:33 -0000 Minh Tran wrote this message on Sat, Aug 06, 2005 at 21:42 +1000: > I was looking around for the files of Kernel code where SYN messages are sent, > so we can simply inject some code to send back a reset messages or ignore the SYN requests. You should probably simply look at ipfw... you can match outgoing syn requests with something like: ipfw add deny ip from any to any out setup > I am having a bit of trouble in finding out the way of injecting code in the kernel to deal with SYN packets. > I am thinking of using ipfw to either reset or drop SYN packets. > > Would anyone have some hints on the clean way of injecting some code to deal with SYN packets > or could you give me some ideas on which files i should look at? I really appreciate that. > I saw some promising files in src/sys/netinet but they are not all clear in my mind. The file that does the sending of SYN packets is sys/netinet/tcp_output.c in the function tcp_output... but I'd highly recommend you look at ipfw or divert sockets... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 05:52:37 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 DB59316A446 for ; Wed, 10 Aug 2005 05:52: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 1659B444C7 for ; Tue, 9 Aug 2005 22:48:10 +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 j79MkYrC049297; Tue, 9 Aug 2005 16:46:34 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Aug 2005 16:46:36 -0600 (MDT) Message-Id: <20050809.164636.112623550.imp@bsdimp.com> To: ticso@cicely.de From: "M. Warner Losh" In-Reply-To: <20050809212708.GS94041@cicely12.cicely.de> References: <20050809.133734.08360256.imp@bsdimp.com> <20050809212708.GS94041@cicely12.cicely.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]); Tue, 09 Aug 2005 16:46:34 -0600 (MDT) Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 10 Aug 2005 05:52:40 -0000 In message: <20050809212708.GS94041@cicely12.cicely.de> Bernd Walter writes: : On Tue, Aug 09, 2005 at 01:37:34PM -0600, M. Warner Losh wrote: : > I have recently purcahsed a device that comes with a .so for linux, : > but no sources. Is there any way one can take an arbitrary linux .so : > which appears to have no dependencies to a FreeBSD .so? The binary : > code is about 20k or so. : : Isn't this just brandelf'ing to FreeBSD-i386? : Asuming that the lib really has no dependencies to linux specific : device/kernel features or linux specific libs. I tried brandelfing, but that didn't work. There's some weird symbols in there: 00000000 DF *UND* 00000023 GLIBC_2.0 fprintf 00000000 DF *UND* 000000f8 GLIBC_2.0 fflush 00000000 DF *UND* 000001b4 GLIBC_2.0 malloc 00000000 DF *UND* 00000058 GLIBC_2.0 memmove 00000000 DO *UND* 00000004 GLIBC_2.0 stderr 00000000 DF *UND* 0000020d GLIBC_2.0 abort 00000000 DF *UND* 00000027 GLIBC_2.0 memcpy 00000000 w DF *UND* 000000ac GLIBC_2.1.3 __cxa_finalize 00000000 DF *UND* 00000043 GLIBC_2.0 memset So it looks like I'm close... objcopy -R kept the GLIBC_* references in place, alas, so that didn't work, as suggested elsewhere in this thread. The above list is small, but has hree bad entries: fprintf, fflush and stderr. So that may present a problem for me if these functions are ever called. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 05:53:27 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 4CF0C16A59A for ; Wed, 10 Aug 2005 05:52:58 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A6B14470A for ; Wed, 10 Aug 2005 00:05:01 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j7A04qFu020554; Tue, 9 Aug 2005 20:04:53 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <200508092222.j79MM1DR013799@sora.hank.home> References: <200508092222.j79MM1DR013799@sora.hank.home> Date: Tue, 9 Aug 2005 20:04:52 -0400 To: Dirk GOUDERS 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.3 Cc: hackers@freebsd.org Subject: Re: Include files that depend on include files 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, 10 Aug 2005 05:53:28 -0000 At 12:22 AM +0200 8/10/05, Dirk GOUDERS wrote: > > This is intentational. We try to avoid having headers bring in > > more then absolutly required when included. I'm not sure what > > your second question means. > >With my second question I wanted to ask if this intention is only >for kernel level code or a general one. I am asking this, because >somewhen in a project that I was not actually participating in I >heard or read a rule that roughly said: "all include files have to >include all files they depend on and compile cleanly", but that >project was on a user space program. It gets a little tricky. POSIX rules for include files include various requirements against "namespace pollution". So, if you bring in one particular include file, then you're supposed to be confident that it will only define the symbols that you expect from that one file. And yet you will need to have that include file reference some values which (according to standards) are defined by some other standard include file. You need one or two symbols, but you're not allowed to define any of the other symbols. To get around this in user-space, we do things like create /usr/include/sys/_types.h And then our include files include *that* file, and do not include the standard . This file, in turn, does not define any of the actual symbols. Let's say that some include file needs to know what typedef for 'off_t' is. The sys/_types.h file defines __off_t, and then the include file which needs off_t will do something like: #include #ifndef _OFF_T_DECLARED typedef __off_t off_t; #define _OFF_T_DECLARED #endif Thus, it has only defined the one name it actually needs, instead of defining all of the standard symbols in the real sys/types.h. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 05:53: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 E08B416A616 for ; Wed, 10 Aug 2005 05:53:07 +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 245F6444BF for ; Tue, 9 Aug 2005 22:48:02 +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 j79MlZEe049327; Tue, 9 Aug 2005 16:47:35 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Aug 2005 16:47:38 -0600 (MDT) Message-Id: <20050809.164738.102576325.imp@bsdimp.com> To: sean-freebsd@farley.org From: "M. Warner Losh" In-Reply-To: <20050809161545.M871@thor.farley.org> References: <20050809.133734.08360256.imp@bsdimp.com> <20050809161545.M871@thor.farley.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 09 Aug 2005 16:47:35 -0600 (MDT) Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 10 Aug 2005 05:53:30 -0000 In message: <20050809161545.M871@thor.farley.org> Se=E1n C. Farley writes: : Although I have never tried it, I had read somewhere that you could : possibly convert a Linux .so using objcopy. : = : Found it: : http://groups-beta.google.com/group/fa.freebsd.questions/browse_frm/t= hread/2c1ce35fab83427/7add378b8e5a7006 : = : I am curious if it works for you too. That method doesn't seem to work. I'm guessing that other options are needed these days since -R is a list of sections to remove... Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 05:54: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 2AB2F16A6D3 for ; Wed, 10 Aug 2005 05:53:59 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FEE943F38 for ; Wed, 10 Aug 2005 05:04:37 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:woE1jpVpl4o0OGR83T7v8XqFLTUfbCh7xsCXrLBv0f6emm7k3U4eyI18pkr5OXFi@localhost [IPv6:::1]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.3/8.13.3) with ESMTP/inet6 id j7A53fKL078096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Aug 2005 14:03:45 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 10 Aug 2005 14:03:41 +0900 Message-ID: From: Hajimu UMEMOTO To: Dan Nelson In-Reply-To: <20050809213130.GB71687@dan.emsphone.com> References: <20050809.133734.08360256.imp@bsdimp.com> <20050809213130.GB71687@dan.emsphone.com> User-Agent: xcite1.38> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 5.4-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0 (ameno.mahoroba.org [IPv6:::1]); Wed, 10 Aug 2005 14:03:46 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on ameno.mahoroba.org Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 10 Aug 2005 05:54:25 -0000 Hi, >>>>> On Tue, 9 Aug 2005 16:31:30 -0500 >>>>> Dan Nelson said: dnelson> In the last episode (Aug 09), M. Warner Losh said: > I have recently purcahsed a device that comes with a .so for linux, > but no sources. Is there any way one can take an arbitrary linux .so > which appears to have no dependencies to a FreeBSD .so? The binary > code is about 20k or so. dnelson> As long as any structs that are passed back and forth have the same dnelson> members and alignment, it should work. This includes struct FILE, dnelson> which means if the app tries to use stdio it'll likely crash. dnelson> I just compiled a little "hello world" object file on SUSE and linked dnelson> it on FreeBSD and it ran (it just calls printf, which is safe since it dnelson> doesn't pass a FILE *). As far as the Linux shlib uses the functions which ABI are compatible with FreeBSD's one, it should work. However, if there are some ABI incompatibility, you may want to consider the approach of linuxpluginwrapper. The PIPS ports (print/pips*) link Linux shlib to FreeBSD binary. To do this, the PIPS ports use www/linuxpluginwrapper to fixup some ABI incompatibility. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 05:56: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 6F15016A84D for ; Wed, 10 Aug 2005 05:55:09 +0000 (GMT) (envelope-from keramida@linux.gr) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E46144916 for ; Tue, 9 Aug 2005 23:09:51 +0000 (GMT) (envelope-from keramida@linux.gr) Received: (qmail 4977 invoked by uid 207); 9 Aug 2005 23:09:50 -0000 Received: from keramida@linux.gr by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.51):. Processed in 0.547416 secs); 09 Aug 2005 23:09:50 -0000 Received: from dialup51.ach.sch.gr (HELO gothmog.gr) ([81.186.70.51]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 9 Aug 2005 23:09:48 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.4/8.13.4) with ESMTP id j79N9fdI001068; Wed, 10 Aug 2005 02:09:41 +0300 (EEST) (envelope-from keramida@linux.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.4/8.13.4/Submit) id j79N9eF5001067; Wed, 10 Aug 2005 02:09:40 +0300 (EEST) (envelope-from keramida@linux.gr) Date: Wed, 10 Aug 2005 02:09:40 +0300 From: Giorgos Keramidas To: Dirk GOUDERS Message-ID: <20050809230940.GC618@gothmog.gr> References: <20050809220121.GB15004@odin.ac.hmc.edu> <200508092222.j79MM1DR013799@sora.hank.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508092222.j79MM1DR013799@sora.hank.home> Cc: hackers@freebsd.org Subject: Re: Include files that depend on include files 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, 10 Aug 2005 05:56:11 -0000 On 2005-08-10 00:22, Dirk GOUDERS wrote: >> This is intentational. We try to avoid having headers bring in more >> then absolutly required when included. I'm not sure what your second >> question means. > > With my second question I wanted to ask if this intention is only for > kernel level code or a general one. I am asking this, because > somewhen in a project that I was not actually participating in I heard > or read a rule that roughly said: "all include files have to include > all files they depend on and compile cleanly", but that project was on > a user space program. Well, first of all "include files" do not "compile". Then, there are two different schools of thought on this matter: a) the "purity and clean state of the namespace" school, and b) the "keep the header files a userlevel program has to include as few as possible" school Both approaches have their advantages and drawbacks. AFAIK, in FreeBSD the first is preferred. - Giorgos From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 07:43:36 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 2C44716A41F for ; Wed, 10 Aug 2005 07:43:36 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD70D43D46 for ; Wed, 10 Aug 2005 07:43:35 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 854958B8F; Wed, 10 Aug 2005 00:43:35 -0700 (PDT) Received: from [192.168.2.2] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j7A7hXiS058790; Wed, 10 Aug 2005 00:43:34 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <42F9B025.5070308@elischer.org> Date: Wed, 10 Aug 2005 00:43:33 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: "M. Warner Losh" References: <20050809.133734.08360256.imp@bsdimp.com> <20050809212708.GS94041@cicely12.cicely.de> <20050809.164636.112623550.imp@bsdimp.com> In-Reply-To: <20050809.164636.112623550.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, ticso@cicely.de Subject: Re: Converting libfoo.so for linux to freebsd 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, 10 Aug 2005 07:43:36 -0000 M. Warner Losh wrote: > In message: <20050809212708.GS94041@cicely12.cicely.de> > Bernd Walter writes: > : On Tue, Aug 09, 2005 at 01:37:34PM -0600, M. Warner Losh wrote: > : > I have recently purcahsed a device that comes with a .so for linux, > : > but no sources. Is there any way one can take an arbitrary linux .so > : > which appears to have no dependencies to a FreeBSD .so? The binary > : > code is about 20k or so. > : > : Isn't this just brandelf'ing to FreeBSD-i386? > : Asuming that the lib really has no dependencies to linux specific > : device/kernel features or linux specific libs. > > I tried brandelfing, but that didn't work. There's some weird symbols > in there: > > 00000000 DF *UND* 00000023 GLIBC_2.0 fprintf > 00000000 DF *UND* 000000f8 GLIBC_2.0 fflush > 00000000 DF *UND* 000001b4 GLIBC_2.0 malloc > 00000000 DF *UND* 00000058 GLIBC_2.0 memmove > 00000000 DO *UND* 00000004 GLIBC_2.0 stderr > 00000000 DF *UND* 0000020d GLIBC_2.0 abort > 00000000 DF *UND* 00000027 GLIBC_2.0 memcpy > 00000000 w DF *UND* 000000ac GLIBC_2.1.3 __cxa_finalize > 00000000 DF *UND* 00000043 GLIBC_2.0 memset > > So it looks like I'm close... objcopy -R kept the GLIBC_* references > in place, alas, so that didn't work, as suggested elsewhere in this > thread. couldn't you make a small stub library that supplies those and link with it statically? > > The above list is small, but has hree bad entries: fprintf, fflush and > stderr. So that may present a problem for me if these functions are > ever called. > > 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" From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 08:32: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 31E9C16A41F for ; Wed, 10 Aug 2005 08:32:38 +0000 (GMT) (envelope-from jpeg@thilelli.net) Received: from smtp.thilelli.net (smtp.thilelli.net [213.41.129.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 803A643D46 for ; Wed, 10 Aug 2005 08:32:36 +0000 (GMT) (envelope-from jpeg@thilelli.net) Received: from localhost (localhost [127.0.0.1]) by bento.thilelli.net (Postfix) with ESMTP id 30A655C7A; Wed, 10 Aug 2005 10:32:35 +0200 (CEST) Received: from bento.thilelli.net ([127.0.0.1]) by localhost (bento.thilelli.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 42868-01-3; Wed, 10 Aug 2005 10:32:29 +0200 (CEST) Received: from webmail.thilelli.net (localhost [127.0.0.1]) by bento.thilelli.net (Postfix) with ESMTP id 250A75C79; Wed, 10 Aug 2005 10:32:29 +0200 (CEST) Received: from 145.248.192.30 (SquirrelMail authenticated user jgabel) by webmail.thilelli.net with HTTP; Wed, 10 Aug 2005 10:32:29 +0200 (CEST) Message-ID: <10303.145.248.192.30.1123662749.squirrel@webmail.thilelli.net> In-Reply-To: <42F93030.2050509@thesnodgrass.com> References: <42F93030.2050509@thesnodgrass.com> Date: Wed, 10 Aug 2005 10:32:29 +0200 (CEST) From: "Julien Gabel" To: "j snod" 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 X-Virus-Scanned: amavisd-new at thilelli.net Cc: freebsd-hackers@freebsd.org Subject: Re: Realtek RTL8169 on FreeBSD 5.4: no carrier. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jpeg@thilelli.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 08:32:38 -0000 > I recently installed FreeBSD 5.4 on an ABIT AA-8 DuraMax and all went > well. All hardware detected properly and everything was running great, > until I got to configuring my network. ifconfig shows my onboard > gigabit LAN as "status: no carrier" > > I can successfully ping localhost and the IP that was assigned to re0 > (192.168.1.31). > > when I plug an ethernet cable from my FreeBSD box to my router, I get > "status: no carrier." Oddly, when I plug an ethernet cable from my > FreeBSD box to my laptop's LAN port, I get "status: active". The lights > on the ethernet jack indicate the same. > > Additionally, if I manually set the media with the following command: > # ifconfig re0 media 10baseT/UTP mediaopt full-duplex > The status magically switches to "active" and I can use my ethernet! > > I know that there are known problems with RealTek chipsets, but it is > listed in the 5.4 supported hardware list. > > Bottom line is that the onboard LAN is detected, installed, and working > properly, but it seems as if the driver can't properly detect when a > cable is plugged into the jack. > > I was hoping someone could help. > > uname -a: > -------------------------------------- > FreeBSD db.domain.com 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May 8 > 10:21:06 UTC 2005 > root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 > > ifconfig: > -------------------------------------- > re0: flags=8843 mtu 1500 > options=18 > inet 192.168.1.31 netmast 0xffffff00 broadcast 192.168.1.255 > inet6 ... > ether 00:50:8d:eb:e5:be > media: Ethernet autoselect (none) > status: no carrier > lo0: flags=8049 mtu 16384 > inet 127.0.0.1 netmask 0xff000000 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 > > > Relevant dmesg: > -------------------------------------- > re0: port 0xee00-0xeeff mem > 0xfbfff000-0xfbfff0ff irc 16 at device 1.0 on pci1 > miibus0: on re0 > rgephy0: on miibus0 > rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, > 1000baseTX-FDX, auto > re0: Ethernet address: 00:50:8d:eb:e5:be > > > pciconf -lv: > -------------------------------------- > re0@pci1:1:0: class=0x020000 card=0x1039147b chip=0x816910ec rev=0x10 > hdr=0x00 > vendor = 'Realtek Semiconductor' > device = 'RTL8169 Gigabit Ethernet Adapter > class = network > subclass = ethernet > > pciconf -r pci1:1:0 0:0xff > -------------------------------------- > 816910ec 02b00007 02000010 00002008 > 0000ee01 fbfff000 00000000 00000000 > 00000000 00000000 00000000 1039147b > 00000000 000000dc 00000000 40200110 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 f7c20001 > 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 00000000 Regrettably, i always encountered this problem. I spoke about that since the middle of 2004, and didn't really receive feedback on this. I try a lot of things but none worked better than the other. To not forget about it, i filled a bug report on this particular problem, see PR kern/80005 for more details. The last thing i want to give another try is to upgrade to RELENG_6, since i currently follow the RELENG_5 branch. But i am not *very* confident about that... Sorry not to have better answer to give you. -- -jpeg. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 09:00: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 1EDE116A41F for ; Wed, 10 Aug 2005 09:00:17 +0000 (GMT) (envelope-from dmitry.mityugov@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id A667643D45 for ; Wed, 10 Aug 2005 09:00:16 +0000 (GMT) (envelope-from dmitry.mityugov@gmail.com) Received: by wproxy.gmail.com with SMTP id i5so89960wra for ; Wed, 10 Aug 2005 02:00:14 -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=ohuvfMfm8tZtENUyZjKP1Xqu2Gfl7Gk3glNmHSIqdpIpmZ7hXxeRKMBu2xp4pqYj8khcj418cRGyPTvQ3LL69i0SskGKORkKfLvgtaAFSqHH0i7A23rxETr/VB9Be5Vv2yRZQbr5cNea7+6H2ZiSJpFRMc4TO30f4jfv9QX+F70= Received: by 10.54.132.14 with SMTP id f14mr323236wrd; Wed, 10 Aug 2005 02:00:14 -0700 (PDT) Received: by 10.54.56.33 with HTTP; Wed, 10 Aug 2005 02:00:14 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2005 13:00:14 +0400 From: Dmitry Mityugov To: jpeg@thilelli.net In-Reply-To: <10303.145.248.192.30.1123662749.squirrel@webmail.thilelli.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42F93030.2050509@thesnodgrass.com> <10303.145.248.192.30.1123662749.squirrel@webmail.thilelli.net> Cc: freebsd-hackers@freebsd.org, j snod Subject: Re: Realtek RTL8169 on FreeBSD 5.4: no carrier. 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, 10 Aug 2005 09:00:17 -0000 On 8/10/05, Julien Gabel wrote: ... > Regrettably, i always encountered this problem. I spoke about that since > the middle of 2004, and didn't really receive feedback on this. I try a > lot of things but none worked better than the other. >=20 > To not forget about it, i filled a bug report on this particular problem, > see PR kern/80005 for more details. >=20 > The last thing i want to give another try is to upgrade to RELENG_6, > since i currently follow the RELENG_5 branch. But i am not *very* > confident about that... >=20 > Sorry not to have better answer to give you. IIRC, I have a RTL8169S-based D-Link gigabit network card at home and it works with FreeBSD just fine. --=20 Dmitry Mityugov, St. Petersburg, Russia I ignore all messages with confidentiality statements "We live less by imagination than despite it" - Rockwell Kent, "N by E" From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 09:20: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 14EEE16A421 for ; Wed, 10 Aug 2005 09:20:20 +0000 (GMT) (envelope-from jpeg@thilelli.net) Received: from smtp.thilelli.net (smtp.thilelli.net [213.41.129.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FEB143D5E for ; Wed, 10 Aug 2005 09:20:17 +0000 (GMT) (envelope-from jpeg@thilelli.net) Received: from localhost (localhost [127.0.0.1]) by bento.thilelli.net (Postfix) with ESMTP id 384B15C7A; Wed, 10 Aug 2005 11:20:16 +0200 (CEST) Received: from bento.thilelli.net ([127.0.0.1]) by localhost (bento.thilelli.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 44383-04-2; Wed, 10 Aug 2005 11:20:10 +0200 (CEST) Received: from webmail.thilelli.net (localhost [127.0.0.1]) by bento.thilelli.net (Postfix) with ESMTP id B3CF65C7C; Wed, 10 Aug 2005 11:20:10 +0200 (CEST) Received: from 145.248.192.30 (SquirrelMail authenticated user jgabel) by webmail.thilelli.net with HTTP; Wed, 10 Aug 2005 11:20:10 +0200 (CEST) Message-ID: <57189.145.248.192.30.1123665610.squirrel@webmail.thilelli.net> In-Reply-To: References: <42F93030.2050509@thesnodgrass.com> <10303.145.248.192.30.1123662749.squirrel@webmail.thilelli.net> Date: Wed, 10 Aug 2005 11:20:10 +0200 (CEST) From: "Julien Gabel" To: "Dmitry Mityugov" 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 X-Virus-Scanned: amavisd-new at thilelli.net Cc: freebsd-hackers@freebsd.org Subject: Re: Realtek RTL8169 on FreeBSD 5.4: no carrier. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jpeg@thilelli.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 09:20:20 -0000 >> Regrettably, i always encountered this problem. I spoke about that >> since the middle of 2004, and didn't really receive feedback on this. >> I try a lot of things but none worked better than the other. >> >> To not forget about it, i filled a bug report on this particular >> problem, see PR kern/80005 for more details. >> >> The last thing i want to give another try is to upgrade to RELENG_6, >> since i currently follow the RELENG_5 branch. But i am not *very* >> confident about that... >> >> Sorry not to have better answer to give you. > IIRC, I have a RTL8169S-based D-Link gigabit network card at home and > it works with FreeBSD just fine. Yes, i know it simply works for a lot of users. It doesn't mean that it is the case for all users... i am of those. -- -jpeg. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 09:39: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 4DABE16A41F for ; Wed, 10 Aug 2005 09:39:34 +0000 (GMT) (envelope-from devif0@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AC2C43D58 for ; Wed, 10 Aug 2005 09:39:33 +0000 (GMT) (envelope-from devif0@gmail.com) Received: by wproxy.gmail.com with SMTP id i22so87107wra for ; Wed, 10 Aug 2005 02:39:32 -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=AG5b883TIOtYrcCio+9KYlSZvJxSRl6VTt+feItFZc1z0SBz3zQZmIWowo9yuk87pXUlH6wSQ24Xra/qkB9Pb0y4XMwfIsVmbbJYBqaVunY/5lUo/EHVJkrn080Nz8s/B9VGwBc/MLqs2rgQIEh29PcZwW19V/Ng9M/p46vFp1w= Received: by 10.54.16.26 with SMTP id 26mr342423wrp; Wed, 10 Aug 2005 02:39:32 -0700 (PDT) Received: by 10.54.69.4 with HTTP; Wed, 10 Aug 2005 02:39:32 -0700 (PDT) Message-ID: <356446ef0508100239320d2bf0@mail.gmail.com> Date: Wed, 10 Aug 2005 11:39:32 +0200 From: iv gan 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: howto make sysintall 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, 10 Aug 2005 09:39:34 -0000 Hi there, I try to make a custom installation of FreeBSD 5.3 in a way that there are no questions during the process but rather it detects the hard disk size makes the partitions etc... For the moment I smply try to compile sysinstall (cd /usr/src/usr.sbin/sysintall && make all) and it compiles without any problem. The size on the output file is about 1,2M. The problem comes when I put it in a mfsroot file and when it loads on startup. The sysinstall simply don't start. In the same time on the secont vty after 20secs I got a messages like "pid NNN (sh) uid 0, was killed: out of swap space" or something like it. So my question is is there a correct manner to make the sysinstall (like going to /usr/src and then make everything around). The original size is about 2.2 Megs and the one I got is about a 1meg less. It is compiled staticly (NOSHARED=3Dyes it have to mean that no??) For the moment i don't touch the code. Just compile it to try. The newly compiled sysinstall is running when it is executed from the directory where it is situated (like ./sysintall). Hm I thing thats all I have like symptoms. Any suggestions? Or better is there a way to script an Auto partitioning of the hard disk without touching the code. thanks and good luck to allz Ivo From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 10:02: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 B339616A41F for ; Wed, 10 Aug 2005 10:02:03 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FC4643D53 for ; Wed, 10 Aug 2005 10:02:02 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.13.3/8.13.3) with ESMTP id j7AA21pO022078 for ; Wed, 10 Aug 2005 14:02:01 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Wed, 10 Aug 2005 14:02:01 +0400 (MSD) From: Dmitry Morozovsky To: freebsd-hackers@FreeBSD.org Message-ID: <20050810135713.K18426@woozle.rinet.ru> X-NCC-RegID: ru.rinet MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (woozle.rinet.ru [0.0.0.0]); Wed, 10 Aug 2005 14:02:01 +0400 (MSD) Cc: Subject: ffs_alloc.c: minfree Q 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, 10 Aug 2005 10:02:03 -0000 Colleagues, from ffs_alloc.c: case FS_OPTSPACE: /* * Allocate an exact sized fragment. Although this makes * best use of space, we will waste time relocating it if * the file continues to grow. If the fragmentation is * less than half of the minimum free reserve, we choose * to begin optimizing for time. */ request = nsize; if (fs->fs_minfree <= 5 || --->>> ~~~~~~~~~~~~~~~~~~~~~~ fs->fs_cstotal.cs_nffree > (off_t)fs->fs_dsize * fs->fs_minfree / (2 * 100)) break; log(LOG_NOTICE, "%s: optimization changed from SPACE to TIME\n", fs->fs_fsmnt); fs->fs_optim = FS_OPTTIME; break; For contemporary situation, where total size of file system can grow to hundreds of Gs or even several Ts, 8% of space seems too high. Maybe this algorithm should be slightly adjusted (I'm thinking of logarithmic scale depending on file system size)? Any (contemporary) references would be highly appreciated. Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 10:06:36 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 6010216A41F for ; Wed, 10 Aug 2005 10:06:36 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6062243D46 for ; Wed, 10 Aug 2005 10:06:34 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de (musashi.et.bocholt.fh-gelsenkirchen.de [193.175.197.95]) by alice.et.bocholt.fh-gelsenkirchen.de (8.12.9/8.12.9) with ESMTP id j7AA6VeD031378 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 10 Aug 2005 12:06:32 +0200 Received: from localhost (localhost [127.0.0.1]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.13.3/8.13.3) with ESMTP id j7AA6VCB037633; Wed, 10 Aug 2005 12:06:31 +0200 (CEST) (envelope-from hank@musashi.et.bocholt.fh-gelsenkirchen.de) Message-Id: <200508101006.j7AA6VCB037633@musashi.et.bocholt.fh-gelsenkirchen.de> To: Garance A Drosihn In-Reply-To: Message from Garance A Drosihn of "Tue, 09 Aug 2005 20:04:52 EDT." Date: Wed, 10 Aug 2005 12:06:31 +0200 From: Dirk GOUDERS X-Scanned-By: MIMEDefang 2.43 Cc: hackers@freebsd.org Subject: Re: Include files that depend on include files 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, 10 Aug 2005 10:06:36 -0000 > To get around this in user-space, we do things like create > /usr/include/sys/_types.h > > And then our include files include *that* file, and do not include > the standard . This file, in turn, does > not define any of the actual symbols. Let's say that some include > file needs to know what typedef for 'off_t' is. The sys/_types.h > file defines __off_t, and then the include file which needs off_t > will do something like: > > #include > #ifndef _OFF_T_DECLARED > typedef __off_t off_t; > #define _OFF_T_DECLARED > #endif > > Thus, it has only defined the one name it actually needs, instead > of defining all of the standard symbols in the real sys/types.h. Can you point me to a real-life example where such a mechanism is used? I'd like to have a closer look at it. Dirk From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 10:12:00 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 E9D3A16A41F for ; Wed, 10 Aug 2005 10:12:00 +0000 (GMT) (envelope-from devif0@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AB9B43D48 for ; Wed, 10 Aug 2005 10:12:00 +0000 (GMT) (envelope-from devif0@gmail.com) Received: by wproxy.gmail.com with SMTP id i22so90572wra for ; Wed, 10 Aug 2005 03:11:59 -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=sn03JC2+rmps7LJ9GXtmHx/boMtmXsHQ3WwbbPISkrJqrTYxBhXMLPDikfuuWkiHBVHPXQru8Drgy4ipf4dXakZexjrnxZgwddSIYClH2uPPZbnIZhCnTs81zUeJeUt9qTb5++hFNgKk/EyHNvcSv3m0tQ6rN3XngwAla65YCz8= Received: by 10.54.69.1 with SMTP id r1mr349031wra; Wed, 10 Aug 2005 03:11:59 -0700 (PDT) Received: by 10.54.69.4 with HTTP; Wed, 10 Aug 2005 03:11:59 -0700 (PDT) Message-ID: <356446ef05081003115e8aed01@mail.gmail.com> Date: Wed, 10 Aug 2005 12:11:59 +0200 From: iv gan To: Glenn Dawson In-Reply-To: <6.1.0.6.2.20050810030653.078cadd0@cobalt.antimatter.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <356446ef0508100239320d2bf0@mail.gmail.com> <6.1.0.6.2.20050810030653.078cadd0@cobalt.antimatter.net> Cc: freebsd-hackers@freebsd.org Subject: Re: howto make sysintall 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, 10 Aug 2005 10:12:01 -0000 Yep that's write. but there is no way to script a generic install so to install on different drives with different sizes. So for that there is maybe a way to change something in the sysintall sources. But without any success for the moment Thanks Ivo On 8/10/05, Glenn Dawson wrote: > At 02:39 AM 8/10/2005, iv gan wrote: > >Hi there, > >I try to make a custom installation of FreeBSD 5.3 in a way that there > >are no questions during the process but rather it detects the hard > >disk size makes the partitions etc... > >For the moment I smply try to compile sysinstall (cd > >/usr/src/usr.sbin/sysintall && make all) > >and it compiles without any problem. The size on the output file is > >about 1,2M. The problem comes when I put it in a mfsroot file and when > >it loads on startup. The sysinstall simply don't start. In the same > >time on the secont vty after 20secs I got a messages like "pid NNN > >(sh) uid 0, was killed: out of swap space" or something like it. > >So my question is is there a correct manner to make the sysinstall > >(like going to /usr/src and then make everything around). The original > >size is about 2.2 Megs and the one I got is about a 1meg less. It is > >compiled staticly (NOSHARED=3Dyes it have to mean that no??) > >For the moment i don't touch the code. Just compile it to try. The > >newly compiled sysinstall is running when it is executed from the > >directory where it is situated (like ./sysintall). > >Hm I thing thats all I have like symptoms. > >Any suggestions? > >Or better is there a way to script an Auto partitioning of the hard > >disk without touching the code. >=20 > The bulk of the sysinstall man page covers how to script an install. >=20 > -Glenn >=20 >=20 > >thanks and good luck to allz > > > >Ivo > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g" >=20 > From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 11:00:04 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 4B27816A41F for ; Wed, 10 Aug 2005 11:00:04 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8857F43D49 for ; Wed, 10 Aug 2005 11:00:03 +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 mail03.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j7AB0048023320 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 10 Aug 2005 21:00:01 +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 j7AAxxSR014274 for ; Wed, 10 Aug 2005 21:00:00 +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 j7AAxxsS014273 for hackers@FreeBSD.org; Wed, 10 Aug 2005 20:59:59 +1000 (EST) (envelope-from pjeremy) Date: Wed, 10 Aug 2005 20:59:59 +1000 From: Peter Jeremy To: hackers@FreeBSD.org Message-ID: <20050810105959.GA14254@cirb503493.alcatel.com.au> References: <20050806114935.GB7708@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050806114935.GB7708@cirb503493.alcatel.com.au> User-Agent: Mutt/1.4.2i Cc: Subject: Re: Finding an illegal instruction in gnucash/guile 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, 10 Aug 2005 11:00:04 -0000 On Sat, 2005-Aug-06 21:49:35 +1000, Peter Jeremy wrote: >I recently upgraded gnucash and dependencies and am now getting SIGILL >during startup. This originally occurred on 5.3 but I'm getting >exactly the same thing running on a recent -CURRENT with a freshly >built (from scratch) ports tree. Well, I don't know what the actual problem was but blowing away .gnome/GnuCash, .gnome/accels/GnuCash and .gnucash fixed the problem. It appears there's been an incompatible change somewhere (though it also suggests a lack of error checking somewhere). Pity I didn't think of that a week ago :-(. (Though I did discover a bug in regex(3) during my otherwise fruitless search through gnucash's dependencies). -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 11:11:59 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 D3C3216A41F for ; Wed, 10 Aug 2005 11:11:59 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82AD043D46 for ; Wed, 10 Aug 2005 11:11:59 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id j7ABBpgg099977; Wed, 10 Aug 2005 04:11:55 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200508101111.j7ABBpgg099977@gw.catspoiler.org> Date: Wed, 10 Aug 2005 04:11:51 -0700 (PDT) From: Don Lewis To: marck@rinet.ru In-Reply-To: <20050810135713.K18426@woozle.rinet.ru> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: freebsd-hackers@FreeBSD.org Subject: Re: ffs_alloc.c: minfree Q 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, 10 Aug 2005 11:12:00 -0000 On 10 Aug, Dmitry Morozovsky wrote: > Colleagues, > > > from ffs_alloc.c: > > case FS_OPTSPACE: > /* > * Allocate an exact sized fragment. Although this makes > * best use of space, we will waste time relocating it if > * the file continues to grow. If the fragmentation is > * less than half of the minimum free reserve, we choose > * to begin optimizing for time. > */ > request = nsize; > if (fs->fs_minfree <= 5 || > --->>> ~~~~~~~~~~~~~~~~~~~~~~ > fs->fs_cstotal.cs_nffree > > (off_t)fs->fs_dsize * fs->fs_minfree / (2 * 100)) > break; > log(LOG_NOTICE, "%s: optimization changed from SPACE to TIME\n", > fs->fs_fsmnt); > fs->fs_optim = FS_OPTTIME; > break; > > For contemporary situation, where total size of file system can grow to > hundreds of Gs or even several Ts, 8% of space seems too high. > > Maybe this algorithm should be slightly adjusted (I'm thinking of logarithmic > scale depending on file system size)? I experimented with this back when I ran a Usenet server with a classic, one article per file, spool. If found that if I pushed the limit, I'd often lose the ability to create files that were greater than or equal to the file system block size because all of the free space consisted of partial blocks that had one or more fragments allocated. This would happen even though df said the file system still had plenty of free space. The severity of this problem depends on the file size distribution and its relationship to the file system block and fragment sizes, and doesn't depend on the file system size. If you double the size of the file system, you can double the number of files stored before you run into the problem, and you run into the problem at the about same percentage of fullness no matter what the size of the file system. You can avoid this problem if you set the fragment size the same as the block size when you create the file system, but then the wasted space is just hidden in the partially filled blocks at the end of each file, where it is invisible to df. This is similar to the behaviour of other types of file systems that only have one allocation unit size. Another problem that you are likely to run into if you run file systems very nearly full is that eventually sequential I/O performance on larger files tends to get very bad over time because the blocks contained in each file get spread all over the disk, requiring a large number of seeks to access them all. The number of contigous free blocks and the distance between free blocks is going to depend on the percentage of fullness and not the size of the file system. If you have two file systems of size N that are X% full, the distribution of the free space in each file system and the I/O performance will be very similar to one file system of size 2N that is also X% full. A special case where cranking down minfree ok is when you have a static set of a small number of large files that are created shortly after the file system is newfs'ed so that the blocks allocated to each file are largely contiguous. Re-writing these files is even ok as long as they are re-written in place and not truncated and re-extended. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 12:15:03 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 0823616A41F for ; Wed, 10 Aug 2005 12:15:03 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix3-2.free.fr (postfix3-2.free.fr [213.228.0.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 850C443D90 for ; Wed, 10 Aug 2005 12:14:58 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix3-2.free.fr (Postfix) with ESMTP id C94E4C035; Wed, 10 Aug 2005 14:14:57 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 11DC1405C; Wed, 10 Aug 2005 14:15:09 +0200 (CEST) Date: Wed, 10 Aug 2005 14:15:09 +0200 From: Jeremie Le Hen To: Dirk GOUDERS Message-ID: <20050810121509.GI45385@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org, Garance A Drosihn Subject: Re: Include files that depend on include files 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, 10 Aug 2005 12:15:03 -0000 Hi Dirk, > Can you point me to a real-life example where such a mechanism is > used? I'd like to have a closer look at it. /usr/include/sys/types.h :-) Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 20:27: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 AEA8816A459 for ; Tue, 9 Aug 2005 20:27:42 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE90F44569 for ; Tue, 9 Aug 2005 19:36:57 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from glenn-mobile.antimatter.net (216-70-228-172.cust.telepacific.net [216.70.228.172]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id j79JaWLv027390 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO); Tue, 9 Aug 2005 12:36:33 -0700 Message-Id: <6.1.0.6.2.20050809122453.04bd5250@cobalt.antimatter.net> X-Sender: lists@cobalt.antimatter.net X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Tue, 09 Aug 2005 12:37:38 -0700 To: David Gilbert , frank@exit.com From: Glenn Dawson In-Reply-To: <17145.469.365833.447736@canoe.dclg.ca> References: <17144.64281.705769.294109@canoe.dclg.ca> <1123613910.9836.15.camel@realtime.exit.com> <17145.469.365833.447736@canoe.dclg.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Mailman-Approved-At: Wed, 10 Aug 2005 12:19:48 +0000 Cc: freebsd-hackers@freebsd.org, David Gilbert Subject: Re: Bluetooth GPS for timekeeping? 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, 09 Aug 2005 20:27:46 -0000 At 12:19 PM 8/9/2005, David Gilbert wrote: > >>>>> "Frank" == Frank Mayhar writes: > >Frank> On Tue, 2005-08-09 at 14:51 -0400, David Gilbert wrote: > >> But ... since there are long patches of time where I'm not mobile, > >> I was wondering if anyone had looked at using a Bluetooth GPS for > >> timekeeping. Has anyone also ever had an ntp server sometimes use > >> a GPS and othertimes use other servers ... depending on the > >> availability of the GPS? > >Frank> The former would depend strongly on the characteristics of the >Frank> Bluetooth protocols, at least when it comes to accuracy. >Frank> Keeping time to the half-second or so would be pretty easy, I >Frank> would guess. > >Frank> The latter is the way it already works. Just configure other >Frank> peers in your ntp.conf along with your GPS, viz: > >How might you determine the accuracy of the GPS ... or the >"characteristics of the Bluetooth protocols" ? GPS relies heavily on the accuracy of the clocks in each of the satellites, without that accuracy GPS would not be able to give any sort of accurate position information. >The GPS docs "say" that the GPS chipset keep time to within 100ns. >However (and I assume this is to save power) they also say that the >position indication is only sent once per second. The satellites don't send any position information to the GPS receivers (well, actually they transmit their own location), pretty much all that they do is broadcast their clock information. The GPS receiver calculates the delays from all the satellites that it can hear to determine it's relative distance from each satellite. Using the precise location of each satellite the, and the relative distance from each satellite the receiver can calculate it's location. (it takes a minimum of 3 satellites to get a "fix". The more satellites the more accurately the receiver can determine it's position.) Because of the way GPS functions, the time that is transmitted has to be as accurate as possible. -Glenn >In my case, the Bluetooth GPS would be talking to a Bluetooth dongle >hanging directly out a port of the server in question. > >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================ >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 10:07: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 54C2216A41F for ; Wed, 10 Aug 2005 10:07:43 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C27943D45 for ; Wed, 10 Aug 2005 10:07:43 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from glenn-mobile.antimatter.net (cpe-66-27-86-22.san.res.rr.com [66.27.86.22]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id j7AA7fL8012912 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO); Wed, 10 Aug 2005 03:07:42 -0700 Message-Id: <6.1.0.6.2.20050810030653.078cadd0@cobalt.antimatter.net> X-Sender: lists@cobalt.antimatter.net X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Wed, 10 Aug 2005 03:08:44 -0700 To: iv gan , freebsd-hackers@freebsd.org From: Glenn Dawson In-Reply-To: <356446ef0508100239320d2bf0@mail.gmail.com> References: <356446ef0508100239320d2bf0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Mailman-Approved-At: Wed, 10 Aug 2005 12:19:48 +0000 Cc: Subject: Re: howto make sysintall 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, 10 Aug 2005 10:07:43 -0000 At 02:39 AM 8/10/2005, iv gan wrote: >Hi there, >I try to make a custom installation of FreeBSD 5.3 in a way that there >are no questions during the process but rather it detects the hard >disk size makes the partitions etc... >For the moment I smply try to compile sysinstall (cd >/usr/src/usr.sbin/sysintall && make all) >and it compiles without any problem. The size on the output file is >about 1,2M. The problem comes when I put it in a mfsroot file and when >it loads on startup. The sysinstall simply don't start. In the same >time on the secont vty after 20secs I got a messages like "pid NNN >(sh) uid 0, was killed: out of swap space" or something like it. >So my question is is there a correct manner to make the sysinstall >(like going to /usr/src and then make everything around). The original >size is about 2.2 Megs and the one I got is about a 1meg less. It is >compiled staticly (NOSHARED=yes it have to mean that no??) >For the moment i don't touch the code. Just compile it to try. The >newly compiled sysinstall is running when it is executed from the >directory where it is situated (like ./sysintall). >Hm I thing thats all I have like symptoms. >Any suggestions? >Or better is there a way to script an Auto partitioning of the hard >disk without touching the code. The bulk of the sysinstall man page covers how to script an install. -Glenn >thanks and good luck to allz > >Ivo >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 10:31: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 ACFEA16A432 for ; Wed, 10 Aug 2005 10:31:21 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6476043D46 for ; Wed, 10 Aug 2005 10:31:21 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from glenn-mobile.antimatter.net (cpe-66-27-86-22.san.res.rr.com [66.27.86.22]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id j7AAVJZM013256 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO); Wed, 10 Aug 2005 03:31:20 -0700 Message-Id: <6.1.0.6.2.20050810032350.078f3eb0@cobalt.antimatter.net> X-Sender: lists@cobalt.antimatter.net X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Wed, 10 Aug 2005 03:32:21 -0700 To: iv gan From: Glenn Dawson In-Reply-To: <356446ef05081003115e8aed01@mail.gmail.com> References: <356446ef0508100239320d2bf0@mail.gmail.com> <6.1.0.6.2.20050810030653.078cadd0@cobalt.antimatter.net> <356446ef05081003115e8aed01@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Mailman-Approved-At: Wed, 10 Aug 2005 12:19:48 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: howto make sysintall 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, 10 Aug 2005 10:31:21 -0000 At 03:11 AM 8/10/2005, iv gan wrote: >Yep that's write. >but there is no way to script a generic install so to install on >different drives with different sizes. >So for that there is maybe a way to change something in the sysintall >sources. But without any success for the moment I don't see anything in the man page that would prohibit you from using a single script to handle different size drives. In the description for diskLabelEditor it has an example for setting up a new disk. By that example you would specify sizes for all the partitions except one, and that partition would just take whatever space is left. (usually that would be /usr) Will that not do what you want? >Thanks >Ivo > >On 8/10/05, Glenn Dawson wrote: > > At 02:39 AM 8/10/2005, iv gan wrote: > > >Hi there, > > >I try to make a custom installation of FreeBSD 5.3 in a way that there > > >are no questions during the process but rather it detects the hard > > >disk size makes the partitions etc... > > >For the moment I smply try to compile sysinstall (cd > > >/usr/src/usr.sbin/sysintall && make all) > > >and it compiles without any problem. The size on the output file is > > >about 1,2M. The problem comes when I put it in a mfsroot file and when > > >it loads on startup. The sysinstall simply don't start. In the same > > >time on the secont vty after 20secs I got a messages like "pid NNN > > >(sh) uid 0, was killed: out of swap space" or something like it. > > >So my question is is there a correct manner to make the sysinstall > > >(like going to /usr/src and then make everything around). The original > > >size is about 2.2 Megs and the one I got is about a 1meg less. It is > > >compiled staticly (NOSHARED=yes it have to mean that no??) > > >For the moment i don't touch the code. Just compile it to try. The > > >newly compiled sysinstall is running when it is executed from the > > >directory where it is situated (like ./sysintall). > > >Hm I thing thats all I have like symptoms. > > >Any suggestions? > > >Or better is there a way to script an Auto partitioning of the hard > > >disk without touching the code. > > > > The bulk of the sysinstall man page covers how to script an install. > > > > -Glenn > > > > > > >thanks and good luck to allz > > > > > >Ivo > > >_______________________________________________ > > >freebsd-hackers@freebsd.org mailing list > > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > > >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 03:39:27 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 1CEDB16A41F; Wed, 10 Aug 2005 03:39:27 +0000 (GMT) (envelope-from bob@bomar.us) Received: from chaos.fxp.org (chaos.fxp.org [216.155.111.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id C640E45BB3; Wed, 10 Aug 2005 03:39:26 +0000 (GMT) (envelope-from bob@bomar.us) Received: from localhost (localhost.fxp.org [127.0.0.1]) by chaos.fxp.org (Postfix) with ESMTP id 4020028440; Tue, 9 Aug 2005 23:39:26 -0400 (EDT) Received: from chaos.fxp.org ([127.0.0.1]) by localhost (chaos.fxp.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 70589-01; Tue, 9 Aug 2005 23:39:22 -0400 (EDT) Received: from [10.0.1.150] (c-24-0-74-236.hsd1.tx.comcast.net [24.0.74.236]) by chaos.fxp.org (Postfix) with ESMTP id DAF9328420; Tue, 9 Aug 2005 23:39:21 -0400 (EDT) Message-ID: <42F976E8.60008@bomar.us> Date: Tue, 09 Aug 2005 22:39:20 -0500 From: Bob Bomar User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org, questions@freebsd.org X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at fxp.org X-Mailman-Approved-At: Wed, 10 Aug 2005 12:20:31 +0000 Cc: Subject: Long Uptime 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, 10 Aug 2005 03:39:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have a machine that is about to turn 700 days uptime, and I have no plans on rebooting it any time soon. I just wanted to see if there was any infomation from the machine that anybody wanted. [bob@bart] ~>uname -a FreeBSD bart.xxxx 4.8-RELEASE FreeBSD 4.8-RELEASE #3: Fri Jul 18 17:09:10 CDT 2003 root@bart.xxxx:/usr/obj/usr/src/sys/Bart i386 [bob@bart] ~>uptime 10:38PM up 699 days, 3:51, 1 user, load averages: 0.41, 0.27, 0.23 - -- Bob Bomar bob@bomar.us http://www.bomar.us/~bob -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC+Xbn9Jm/aTrtdKoRApqhAJ9r+fOjSnZsqOVi3LwI7cCyexg6hQCghh3B TxRh6NquKm0dcBHgQB8GRis= =kgVa -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 12:40:13 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 6CCBE16A422; Wed, 10 Aug 2005 12:40:13 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC26943D5F; Wed, 10 Aug 2005 12:40:10 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id E34C71FF9A7; Wed, 10 Aug 2005 14:40:07 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id 586441FF9A6; Wed, 10 Aug 2005 14:40:05 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id A6492153C4; Wed, 10 Aug 2005 12:38:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 9BE1915329; Wed, 10 Aug 2005 12:38:54 +0000 (UTC) Date: Wed, 10 Aug 2005 12:38:54 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Bob Bomar In-Reply-To: <42F976E8.60008@bomar.us> Message-ID: References: <42F976E8.60008@bomar.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de Cc: hackers@freebsd.org, questions@freebsd.org Subject: Re: Long Uptime 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, 10 Aug 2005 12:40:13 -0000 On Tue, 9 Aug 2005, Bob Bomar wrote: > I have a machine that is about to turn 700 days > uptime, and I have no plans on rebooting it any > time soon. I just wanted to see if there was > any infomation from the machine that anybody > wanted. Well, I think there are enough people around with nnn days uptime (for nnn > 500). I myself can think of a handfull of internal machines with such an uptime. In case you are interested in FreeBSD uptimes see for example: http://lists.freebsd.org/pipermail/freebsd-advocacy/2003-August/000225.html PS: In case this thread will continue please consider freebsd-chat or freebsd-advocacy. -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 12:42:56 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 857BE16A41F; Wed, 10 Aug 2005 12:42:56 +0000 (GMT) (envelope-from dave@horsfall.org) Received: from dave.horsfall.org (mrdavi2.lnk.telstra.net [139.130.75.233]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F40A43D46; Wed, 10 Aug 2005 12:42:53 +0000 (GMT) (envelope-from dave@horsfall.org) Received: from localhost (dave@localhost) by dave.horsfall.org (8.11.4/8.11.4) with ESMTP id j7ACgj724182; Wed, 10 Aug 2005 22:42:46 +1000 (EST) Date: Wed, 10 Aug 2005 22:42:45 +1000 (EST) From: Dave Horsfall To: Bob Bomar In-Reply-To: <42F976E8.60008@bomar.us> Message-ID: References: <42F976E8.60008@bomar.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: hackers@freebsd.org, questions@freebsd.org Subject: Re: Long Uptime 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, 10 Aug 2005 12:42:56 -0000 On Tue, 9 Aug 2005, Bob Bomar wrote: > I have a machine that is about to turn 700 days uptime, and I have no > plans on rebooting it any time soon. I just wanted to see if there was > any infomation from the machine that anybody wanted. Its IP address would be a good start :-) Two years of patches not applied, eh? -- Dave From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 13:09: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 87E3316A41F for ; Wed, 10 Aug 2005 13:09:22 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F74243D45 for ; Wed, 10 Aug 2005 13:09:20 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 29330 invoked from network); 10 Aug 2005 15:09:19 +0200 Received: from p508fc0d6.dip.t-dialin.net (HELO localhost.skatecity) (80.143.192.214) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 10 Aug 2005 15:09:19 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j7AD9TdH002179 for ; Wed, 10 Aug 2005 15:09:29 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j7AD9Tbm002178 for freebsd-hackers@freebsd.org; Wed, 10 Aug 2005 15:09:29 +0200 (CEST) (envelope-from arundel) From: alexander Date: Wed, 10 Aug 2005 15:09:28 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050810130928.GA2027@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050809133109.GA15300@skatecity> <20050809154541.C057243D45@mx1.FreeBSD.org> <20050809192530.GA19230@skatecity> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050809192530.GA19230@skatecity> Subject: Re: Using sysarch specific syscalls in assembly? 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, 10 Aug 2005 13:09:22 -0000 I tried to write a little C app that uses sysarch and i386_set_ioperm to gain access to certain ports and after a bit of testing I'm pretty sure that there is a bug or better a timing issue with the sysarch syscall or the i386_set_ioperm procedure. Please have a look at the following code: //CODE START #include int main (void) { unsigned int port = 0x378; unsigned char val = 'A'; int number = 4; static inline void outb (unsigned short int port, unsigned char val) { __asm__ volatile ("outb %0,%1\n"::"a" (val), "d" (port) ); } struct i386_ioperm_args { unsigned int start; unsigned int length; int enable; }; struct i386_ioperm_args *args; struct i386_ioperm_args arg; args = &arg; args->start = 0x378; args->length = 1; args->enable = 1; if(sysarch(number,args) == 0) { /* int i; for(i=0; i < 100; i++) { printf("DELAY\n"); } */ outb(0x378,0xF); exit(0); } else { printf("Error during syscall"); exit(1); } } //eof //CODE END On my PC this code will cause a core dump (Bus error: 10). If I however add a delay (the code that's commented out) the app will end without any errors. It seems FBSD needs some time to set the I/O permissions for an app. Can somebody test this code on his computer? Maybe this is a bug in RELENG_6. I'm running: FreeBSD 6.0-BETA1 #0: Mon Jul 18 03:00:45 CEST 2005 Thx a bunch. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 13:18: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 8F61C16A420 for ; Wed, 10 Aug 2005 13:18:23 +0000 (GMT) (envelope-from devif0@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF2A743D70 for ; Wed, 10 Aug 2005 13:18:13 +0000 (GMT) (envelope-from devif0@gmail.com) Received: by wproxy.gmail.com with SMTP id i22so116299wra for ; Wed, 10 Aug 2005 06:18:13 -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=cfgtQqCZENpbmCXs5YHcXfsEwwnq5YVpIqfpGV9GPXjPP0J05WRALiHCMfkNhdby0mUG6tg85CiXhqmB9G0ojQefLZ9PECDR/dEeI8eDNMfgWDR4KaCGTQL44LuYfZNxB8DiAeH70IndyPSP9pevi4ioUZ38C2hcadDDJjdJCEI= Received: by 10.54.143.7 with SMTP id q7mr441290wrd; Wed, 10 Aug 2005 06:18:13 -0700 (PDT) Received: by 10.54.69.4 with HTTP; Wed, 10 Aug 2005 06:18:13 -0700 (PDT) Message-ID: <356446ef050810061832003965@mail.gmail.com> Date: Wed, 10 Aug 2005 15:18:13 +0200 From: iv gan To: Glenn Dawson In-Reply-To: <6.1.0.6.2.20050810032350.078f3eb0@cobalt.antimatter.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <356446ef0508100239320d2bf0@mail.gmail.com> <6.1.0.6.2.20050810030653.078cadd0@cobalt.antimatter.net> <356446ef05081003115e8aed01@mail.gmail.com> <6.1.0.6.2.20050810032350.078f3eb0@cobalt.antimatter.net> Cc: freebsd-hackers@freebsd.org Subject: Re: howto make sysintall 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, 10 Aug 2005 13:18:23 -0000 I am not so sure because the script cannot detect different devices. It can be ad or ar or whatever but it cannot chechk for it. And what I would like to do is more to detect the device and then to do something like 10% to /, 20% to /tmp 35% to /var and 35% to /usr or something like it. Any suggestion? Ivo On 8/10/05, Glenn Dawson wrote: > At 03:11 AM 8/10/2005, iv gan wrote: > >Yep that's write. > >but there is no way to script a generic install so to install on > >different drives with different sizes. > >So for that there is maybe a way to change something in the sysintall > >sources. But without any success for the moment >=20 > I don't see anything in the man page that would prohibit you from using a > single script to handle different size drives. In the description for > diskLabelEditor it has an example for setting up a new disk. By that > example you would specify sizes for all the partitions except one, and th= at > partition would just take whatever space is left. (usually that would be = /usr) >=20 > Will that not do what you want? >=20 >=20 >=20 > >Thanks > >Ivo > > > >On 8/10/05, Glenn Dawson wrote: > > > At 02:39 AM 8/10/2005, iv gan wrote: > > > >Hi there, > > > >I try to make a custom installation of FreeBSD 5.3 in a way that the= re > > > >are no questions during the process but rather it detects the hard > > > >disk size makes the partitions etc... > > > >For the moment I smply try to compile sysinstall (cd > > > >/usr/src/usr.sbin/sysintall && make all) > > > >and it compiles without any problem. The size on the output file is > > > >about 1,2M. The problem comes when I put it in a mfsroot file and wh= en > > > >it loads on startup. The sysinstall simply don't start. In the same > > > >time on the secont vty after 20secs I got a messages like "pid NNN > > > >(sh) uid 0, was killed: out of swap space" or something like it. > > > >So my question is is there a correct manner to make the sysinstall > > > >(like going to /usr/src and then make everything around). The origin= al > > > >size is about 2.2 Megs and the one I got is about a 1meg less. It is > > > >compiled staticly (NOSHARED=3Dyes it have to mean that no??) > > > >For the moment i don't touch the code. Just compile it to try. The > > > >newly compiled sysinstall is running when it is executed from the > > > >directory where it is situated (like ./sysintall). > > > >Hm I thing thats all I have like symptoms. > > > >Any suggestions? > > > >Or better is there a way to script an Auto partitioning of the hard > > > >disk without touching the code. > > > > > > The bulk of the sysinstall man page covers how to script an install. > > > > > > -Glenn > > > > > > > > > >thanks and good luck to allz > > > > > > > >Ivo > > > >_______________________________________________ > > > >freebsd-hackers@freebsd.org mailing list > > > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > > >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebs= d.org" > > > > > > > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g" >=20 > From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 15:01: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 539B016A41F for ; Wed, 10 Aug 2005 15:01:40 +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 C5B8C43D49 for ; Wed, 10 Aug 2005 15:01:39 +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 j7AF1dLo044954 for ; Wed, 10 Aug 2005 08:01:39 -0700 (PDT) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.13.3/8.13.3/Submit) id j7AF1dmd044953 for hackers@freebsd.org; Wed, 10 Aug 2005 08:01:39 -0700 (PDT) (envelope-from steve) Message-Id: <200508101501.j7AF1dmd044953@wattres.watt.com> From: steve@Watt.COM (Steve Watt) Date: Wed, 10 Aug 2005 08:01:38 -0700 X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: hackers@freebsd.org X-Archived: 1123686099.349827697@wattres.Watt.COM X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on wattres.Watt.COM X-Virus-Status: Clean Cc: Subject: getdirtybuf()'s kdb_backtrace fired 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, 10 Aug 2005 15:01:40 -0000 A number of times yesterday. That's a first on this system, though I've seen the lock order reversal problem with ffs suspend vs fsync(). Anyhoo, the traces: Aug 9 15:08:26 wattres kernel: KDB: stack backtrace: > kdb_backtrace(c0931dd8,2,c5afb0cc,0,22) at kdb_backtrace+0x2f > getdirtybuf(d0287bac,0,1,c5afb0cc,1) at getdirtybuf+0x28 > flush_deplist(c253c94c,1,d0287bd4,d0287bd8,0) at flush_deplist+0x4a > flush_inodedep_deps(c15ee800,33c24,8,c08b2c61,c27d4c60) at flush_inodedep_deps+0x98 > softdep_sync_metadata(d0287c98,0,c08b2c61,137,0) at softdep_sync_metadata+0x95 > ffs_fsync(d0287c98,0,c08a5b1c,bd5,0) at ffs_fsync+0x3c0 > fsync(c1dbb780,d0287d04,c08bb2dd,3e7,1) at fsync+0x15a > syscall(2f,2f,2f,bfbfabb0,bfbfaba8) at syscall+0x291 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (95, FreeBSD ELF32, fsync), eip = 0x282cb56b, esp = 0xbfbfab7c, ebp = 0xbfbfb468 --- Aug 9 15:08:27 wattres kernel: KDB: stack backtrace: > kdb_backtrace(c0931dd8,2,c5b27030,0,22) at kdb_backtrace+0x2f > getdirtybuf(d05e3bac,0,1,c5b27030,1) at getdirtybuf+0x28 > flush_deplist(c29e42cc,1,d05e3bd4,d05e3bd8,0) at flush_deplist+0x4a > flush_inodedep_deps(c15ee800,33c26,8,c08b2c61,c21f3000) at flush_inodedep_deps+0x98 > softdep_sync_metadata(d05e3c98,0,c08b2c61,137,0) at softdep_sync_metadata+0x95 > ffs_fsync(d05e3c98,0,c08a5b1c,bd5,0) at ffs_fsync+0x3c0 > fsync(c2adfc00,d05e3d04,c08bb2dd,3e7,1) at fsync+0x15a > syscall(2f,2f,2f,bfbfabb0,bfbfaba8) at syscall+0x291 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (95, FreeBSD ELF32, fsync), eip = 0x282cb56b, esp = 0xbfbfab7c, ebp = 0xbfbfb468 --- Aug 9 15:08:27 wattres kernel: KDB: stack backtrace: > kdb_backtrace(c0931dd8,2,c5b5f6d8,0,22) at kdb_backtrace+0x2f > getdirtybuf(cf873bac,0,1,c5b5f6d8,1) at getdirtybuf+0x28 > flush_deplist(c2a71ecc,1,cf873bd4,cf873bd8,0) at flush_deplist+0x4a > flush_inodedep_deps(c15ee800,33c28,8,c08b2c61,c234b420) at flush_inodedep_deps+0x98 > softdep_sync_metadata(cf873c98,0,c08b2c61,137,0) at softdep_sync_metadata+0x95 > ffs_fsync(cf873c98,0,c08a5b1c,bd5,0) at ffs_fsync+0x3c0 > fsync(c1670000,cf873d04,c08bb2dd,3e7,1) at fsync+0x15a > syscall(2f,2f,2f,bfbfabb0,bfbfaba8) at syscall+0x291 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (95, FreeBSD ELF32, fsync), eip = 0x282cb56b, esp = 0xbfbfab7c, ebp = 0xbfbfb468 --- Aug 9 15:10:16 wattres kernel: KDB: stack backtrace: > kdb_backtrace(c0931dd8,2,c5b50f38,0,22) at kdb_backtrace+0x2f > getdirtybuf(d02d6bac,0,1,c5b50f38,1) at getdirtybuf+0x28 > flush_deplist(c24860cc,1,d02d6bd4,d02d6bd8,0) at flush_deplist+0x4a > flush_inodedep_deps(c15ee800,33cff,8,c08b2c61,c177a840) at flush_inodedep_deps+0x98 > softdep_sync_metadata(d02d6c98,0,c08b2c61,137,0) at softdep_sync_metadata+0x95 > ffs_fsync(d02d6c98,0,c08a5b1c,bd5,0) at ffs_fsync+0x3c0 > fsync(c179c780,d02d6d04,c08bb2dd,3e7,1) at fsync+0x15a > syscall(2f,2f,2f,bfbfc630,bfbfc628) at syscall+0x291 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (95, FreeBSD ELF32, fsync), eip = 0x282cb56b, esp = 0xbfbfc5fc, ebp = 0xbfbfcee8 --- Aug 9 15:10:52 wattres kernel: KDB: stack backtrace: > kdb_backtrace(c0931dd8,2,c5b46d6c,0,22) at kdb_backtrace+0x2f > getdirtybuf(d018cbac,0,1,c5b46d6c,1) at getdirtybuf+0x28 > flush_deplist(c229394c,1,d018cbd4,d018cbd8,0) at flush_deplist+0x4a > flush_inodedep_deps(c15ee800,33cc1,8,c08b2c61,c1f69b58) at flush_inodedep_deps+0x98 > softdep_sync_metadata(d018cc98,0,c08b2c61,137,0) at softdep_sync_metadata+0x95 > ffs_fsync(d018cc98,0,c08a5b1c,bd5,0) at ffs_fsync+0x3c0 > fsync(c1b21300,d018cd04,c08bb2dd,3e7,1) at fsync+0x15a > syscall(2f,2f,2f,810f560,0) at syscall+0x291 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (95, FreeBSD ELF32, fsync), eip = 0x282cb56b, esp = 0xbfbf94fc, ebp = 0xbfbfaed8 --- Aug 9 15:11:10 wattres kernel: KDB: stack backtrace: > kdb_backtrace(c0931dd8,2,c5b3a10c,0,22) at kdb_backtrace+0x2f > getdirtybuf(d0327bac,0,1,c5b3a10c,1) at getdirtybuf+0x28 > flush_deplist(c2a7184c,1,d0327bd4,d0327bd8,0) at flush_deplist+0x4a > flush_inodedep_deps(c15ee800,33d0f,8,c08b2c61,c1f20e70) at flush_inodedep_deps+0x98 > softdep_sync_metadata(d0327c98,0,c08b2c61,137,0) at softdep_sync_metadata+0x95 > ffs_fsync(d0327c98,0,c08a5b1c,bd5,0) at ffs_fsync+0x3c0 > fsync(c2166480,d0327d04,c08bb2dd,3e7,1) at fsync+0x15a > syscall(2f,2f,2f,bfbfc630,bfbfc628) at syscall+0x291 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (95, FreeBSD ELF32, fsync), eip = 0x282cb56b, esp = 0xbfbfc5fc, ebp = 0xbfbfcee8 --- The system in question is 5-STABLE updated around 17Z on 2 May. It's running inn, sendmail, and a bevy of milterish things, but is otherwise pretty quiet, a few thousand email per day, no jails, no weird (i.e. all are ufs or devfs) filesystems in use. -- 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 Aug 10 15:30:18 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 83F0016A421 for ; Wed, 10 Aug 2005 15:30:18 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFAD943D45 for ; Wed, 10 Aug 2005 15:30:17 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from [80.68.243.98] (account rojer@rbc.ru HELO [80.68.243.98]) by hermes.hw.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 89073769 for freebsd-hackers@freebsd.org; Wed, 10 Aug 2005 19:30:15 +0400 Message-ID: <42FA1D86.9000506@rojer.pp.ru> Date: Wed, 10 Aug 2005 19:30:14 +0400 From: Deomid Ryabkov User-Agent: Thunderbird 1.0+ (X11/20050731) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: filesystem implementation questions 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, 10 Aug 2005 15:30:18 -0000 Hello, hackers :) I am implementing a custom filesystem, based on nullfs, its purpose is tracking changes made to the fs, and the idea is to do that by changing the semantics of (largely unused anyway) atime attribute of the underlying UFS (which is mounted -o noatime for that reason. and I don't really care about filesystems with no atime attribute. extreme portability is not a requirement). Specifically, I want atime updated on directories from where the change has taken place all the way up to the mount point of my filesystem. This way, a tree of changed directories can be built at any given time and synchronised to mirrors. Now, I have a couple of questions about taking proper actions while doing my job inside the kernel. 1) I understand that it is generally impossible to find a parent directory for VREG or VLNK vnode (I don't care about pipes or sockets), as it may have many links. To overcome this, I store a pointer to a parent vnode as a member of my struct mirrfs_node upon successful lookup or creation of VREG vnode and create an additional refernce to the parent vnode. The refernce to parent is released when VREG vnode becomes inactive. The question is, what might be the implications of this? Could it be that I am doing something terribly wrong? 2) Each time I need to propagate a change, I walk my way up the directories starting at the directory where the change has occured by repeatedly calling VOP_LOOKUP with a hand-crafted struct componentname, where cnp.cn_nameptr is ".." Same question: is it the right thing to do? could this get me in trouble? 3) When updating directories while walking up, I might need root privileges which my curthread might not have. It is undesirable and might be impossible to have permissions needed for setattr to succeed for every curthread. So, I know what I am doing and I need root for that. The question is, what is the right way to get the needed struct ucred? I thought about crcopy'ing curthread->td_ucred and then change_[er]uid on it. Is that ok? Are there any implications? Thanks in advance... -- Deomid Ryabkov aka Rojer myself@rojer.pp.ru rojer@sysadmins.ru ICQ: 8025844 From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 15:41:00 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 2E21916A41F for ; Wed, 10 Aug 2005 15:41:00 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71ED143D45 for ; Wed, 10 Aug 2005 15:40:58 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (localhost.cc.fer.hr [127.0.0.1]) by geri.cc.fer.hr (8.13.3/8.13.1) with ESMTP id j7AFeZW1034827 for ; Wed, 10 Aug 2005 17:40:35 +0200 (CEST) (envelope-from ivoras@fer.hr) Received: from localhost (ivoras@localhost) by geri.cc.fer.hr (8.13.3/8.13.1/Submit) with ESMTP id j7AFeZic034824 for ; Wed, 10 Aug 2005 17:40:35 +0200 (CEST) (envelope-from ivoras@fer.hr) X-Authentication-Warning: geri.cc.fer.hr: ivoras owned process doing -bs Date: Wed, 10 Aug 2005 17:40:35 +0200 (CEST) From: Ivan Voras Sender: ivoras@geri.cc.fer.hr To: hackers@freebsd.org Message-ID: <20050810173509.I34802@geri.cc.fer.hr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: New Open1X (802.1x) 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, 10 Aug 2005 15:41:00 -0000 I've been requested (by Fernando) to pass the word that the new Open1X (802.1x supplicant) has support for FreeBSD "wired" mode (over Ethernet) built-in! This is important as now both wireless (via builtin WPA support) and wired modes can be used (client-side). Here's the announcement: From: Chris Hessing To: open1x-xsupplicant@lists.sourceforge.net, open1x-admin@lists.sf.net Message-id: <42F7A8D2.6090701@utah.edu> Subject: [Open1x-xsupplicant] Xsupplicant 1.2 Released Sender: open1x-xsupplicant-admin@lists.sourceforge.net I am pleased to announce a new release of Xsupplicant, along with some changes to how releases will be coming in the future. The new version of Xsupplicant contains basic support for WPA & 802.11i/WPA2. (WPA2 currently only works with private IOCTLs on the IPW card, and WE18 support with the hostap driver. Pre-authentication, amd PMKSA cacheing are not implemented yet.) We have also added wired support for FreeBSD, thanks to a contribution from Fernando Schapachnik. There were also numerous bug fixes, and code cleanups. There will also be some changes to the way that future Xsupplicant releases will come out. The plan is to release versions more frequently. Small bug fixes, and feature additions will be released in the format x.y.z. Once their is enough new features, and bug fixes, the "y" version number will be bumpped. So, version 1.2.1 will be small feature additions, and any needed bug fixes. The goal is to have releases more frequently. Enjoy! -- Every sufficiently advanced magic is indistinguishable from technology - Arthur C Anticlarke From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 16:18: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 20FC716A41F for ; Wed, 10 Aug 2005 16:18:52 +0000 (GMT) (envelope-from freebsd@thesnodgrass.com) Received: from fed1rmmtao08.cox.net (fed1rmmtao08.cox.net [68.230.241.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id A819343D48 for ; Wed, 10 Aug 2005 16:18:50 +0000 (GMT) (envelope-from freebsd@thesnodgrass.com) Received: from [192.168.1.33] (really [68.8.226.201]) by fed1rmmtao08.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050810161850.OKIT16890.fed1rmmtao08.cox.net@[192.168.1.33]>; Wed, 10 Aug 2005 12:18:50 -0400 Message-ID: <42FA28EF.2080502@thesnodgrass.com> Date: Wed, 10 Aug 2005 09:18:55 -0700 From: j snod User-Agent: Thunderbird 1.0+ (Windows/20050717) MIME-Version: 1.0 To: Dmitry Mityugov References: <42F93030.2050509@thesnodgrass.com> <10303.145.248.192.30.1123662749.squirrel@webmail.thilelli.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: jpeg@thilelli.net, freebsd-hackers@freebsd.org Subject: Re: Realtek RTL8169 on FreeBSD 5.4: no carrier. 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, 10 Aug 2005 16:18:52 -0000 I did some more research, it appears that the Abit AA8-DuraMax actually uses the RealTek RTL8100S chipset, not the 8169. The hardware compatibility list for 5.4 shows support for the 8110S chipset, but not my specific motherboard. Perhaps it is a new chip revision? I tried the patch by Dag-Erling Smųrgrav from a similar thread ( http://lists.freebsd.org/pipermail/freebsd-hackers/2005-March/011022.html ) but no luck. -j Dmitry Mityugov wrote: > On 8/10/05, Julien Gabel wrote: > ... >> Regrettably, i always encountered this problem. I spoke about that since >> the middle of 2004, and didn't really receive feedback on this. I try a >> lot of things but none worked better than the other. >> >> To not forget about it, i filled a bug report on this particular problem, >> see PR kern/80005 for more details. >> >> The last thing i want to give another try is to upgrade to RELENG_6, >> since i currently follow the RELENG_5 branch. But i am not *very* >> confident about that... >> >> Sorry not to have better answer to give you. > > IIRC, I have a RTL8169S-based D-Link gigabit network card at home and > it works with FreeBSD just fine. > From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 17:49: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 B8D3916A423 for ; Wed, 10 Aug 2005 17:49:21 +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 F13F843D5C for ; Wed, 10 Aug 2005 17:49:20 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 10 Aug 2005 14:04:09 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 10 Aug 2005 11:07:30 -0400 User-Agent: KMail/1.8 References: <356446ef0508100239320d2bf0@mail.gmail.com> <6.1.0.6.2.20050810032350.078f3eb0@cobalt.antimatter.net> <356446ef050810061832003965@mail.gmail.com> In-Reply-To: <356446ef050810061832003965@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508101107.31917.jhb@FreeBSD.org> Cc: iv gan , Glenn Dawson Subject: Re: howto make sysintall 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, 10 Aug 2005 17:49:22 -0000 On Wednesday 10 August 2005 09:18 am, iv gan wrote: > I am not so sure because the script cannot detect different devices. > It can be ad or ar or whatever but it cannot chechk for it. And what I > would like to do is more to detect the device and then to do something > like 10% to /, 20% to /tmp 35% to /var and 35% to /usr or something > like it. > Any suggestion? You can run a command to generate a config file that you then include. I use this with shell scripts that invoke 'dialog' to provide the user with custom menus. A sample is something like this: install.cfg: # select media command=sh /stand/setmedia.sh system configFile=/stand/setmedia.cfg loadConfig setmedia.sh: #!/bin/sh # # Set the installation media based on kernel environment variables. config=/stand/setmedia.cfg case `kenv media` in FTP) iface=`kenv iface` server=`kenv server` echo "abort" > ${config} if [ -z "${iface}" -o -z "${server}" ]; then dialog --title "Missing Settings" --msgbox "The network interface and FTP server must be specified\nvia the 'iface' and 'server' variables in loader.conf." -1 -1 exit 1 fi found=0 for ifn in `ifconfig -l`; do if [ "${ifn}" = "${iface}" ]; then found=1 fi done if [ ${found} -eq 0 ]; then dialog --title "Invalid Interface" --msgbox "The network interface ${iface} is not present." -1 -1 exit 1 fi echo "# Setup for FTP install" > ${config} echo "command=/stand/dhclient ${iface}" >> ${config} echo "system" >> ${config} echo "hostname=localhost" >> ${config} echo "netDev=${iface}" >> ${config} echo "_ftpPath=ftp://${server}/pub/FreeBSD" >> ${config} echo "ifconfig_${iface}=DHCP" >> ${config} echo "mediaSetFTP" >> ${config} ;; *) # Default to CD echo "# select CDROM media" > ${config} echo "mediaSetCDROM" >> ${config} esac This is just the part to setup the install media. What I do here is share the same mfsroot across both CD installs and installs over PXE, but in the /usr/nfsroot on the PXE server I have a boot/loader.conf that looks like: boot/loader.conf: # NFS install media=FTP iface=fxp0 server=10.1.2.3 I also use a similar approach to use different disk layouts for different configurations, etc. In my case I patched the release sources to include kenv and dialog in the crunch for the mfsroot and added my custom scripts to stand/ in the mfsroot. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 17:53: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 2745B16A41F for ; Wed, 10 Aug 2005 17:53:32 +0000 (GMT) (envelope-from samuel.pierson@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBECB43D45 for ; Wed, 10 Aug 2005 17:53:31 +0000 (GMT) (envelope-from samuel.pierson@gmail.com) Received: by wproxy.gmail.com with SMTP id i22so173765wra for ; Wed, 10 Aug 2005 10:53:30 -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=eshfu3BzJkDvDsS/n3G8pA4Fv4DyjUiFblWQXvuOG9wIYLV5Mormfm4+/ku2NpUTi3HZA9OhbJm2nHrOQjaEuchjWUC3x45Y1ddRC9OPssh1oC/AG7WLNM4rk47SPZd0ms948DKEGiPabWa6LQg+oC4auXYFqy1CJTKRd1BFO0k= Received: by 10.54.23.8 with SMTP id 8mr625881wrw; Wed, 10 Aug 2005 10:53:30 -0700 (PDT) Received: by 10.54.144.1 with HTTP; Wed, 10 Aug 2005 10:53:30 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2005 12:53:30 -0500 From: Sam Pierson To: FreeBSD Hackers Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Global txpower in ath 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, 10 Aug 2005 17:53:32 -0000 I noticed that when I control the signal strength through ifconfig, I can effectively reduce the signal when I set it as something like: ifconfig ath0 txpower 1. I have read that this input is device driver dependent and I couldn't find anything in the interface that handles txcontrol. Are these values taken in exactly or are they rounded to some less fine-grained control number? Thanks, Sam From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 18:00:42 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 69C8B16A41F for ; Wed, 10 Aug 2005 18:00:42 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1C8143D53 for ; Wed, 10 Aug 2005 18:00:41 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j7AI0Zkm016207; Wed, 10 Aug 2005 14:00:36 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <200508101006.j7AA6VCB037633@musashi.et.bocholt.fh-gelsenkirchen.de> References: <200508101006.j7AA6VCB037633@musashi.et.bocholt.fh-gelsenkirchen.de> Date: Wed, 10 Aug 2005 14:00:35 -0400 To: Dirk GOUDERS 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.4 Cc: hackers@freebsd.org Subject: Re: Include files that depend on include files 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, 10 Aug 2005 18:00:42 -0000 At 12:06 PM +0200 8/10/05, Dirk GOUDERS wrote: > > To get around this in user-space, we do things like create > > /usr/include/sys/_types.h > > > > And then our include files include *that* file, and do not include > > the standard . This file, in turn, does > > not define any of the actual symbols. Let's say that some include > > file needs to know what typedef for 'off_t' is. The sys/_types.h > > file defines __off_t, and then the include file which needs off_t > > will do something like: > > > > #include > > #ifndef _OFF_T_DECLARED > > typedef __off_t off_t; > > #define _OFF_T_DECLARED > > #endif > > > > Thus, it has only defined the one name it actually needs, instead > > of defining all of the standard symbols in the real sys/types.h. > >Can you point me to a real-life example where such a mechanism is >used? I'd like to have a closer look at it. The above lines came from FreeBSD's /usr/include/sys/stat.h Note that it includes and not There are many other examples in the FreeBSD system includes, at least once you get to the 5.x-series of FreeBSD. I don't remember if we were doing that in the 4.x-series. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 18:20: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 8690B16A41F for ; Wed, 10 Aug 2005 18:20:07 +0000 (GMT) (envelope-from Danovitsch@Vitsch.net) Received: from amsfep15-int.chello.nl (amsfep15-int.chello.nl [213.46.243.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FE8A43D58 for ; Wed, 10 Aug 2005 18:20:06 +0000 (GMT) (envelope-from Danovitsch@Vitsch.net) Received: from Vitsch.net ([62.195.249.78]) by amsfep15-int.chello.nl (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050810182004.NJPM10024.amsfep15-int.chello.nl@Vitsch.net>; Wed, 10 Aug 2005 20:20:04 +0200 Received: from [192.168.45.9] (i248222.upc-i.chello.nl [62.195.248.222]) by Vitsch.net (8.12.3p2/8.11.3) with ESMTP id j7AIIewU074801; Wed, 10 Aug 2005 20:18:45 +0200 (CEST) (envelope-from Danovitsch@Vitsch.net) From: "Daan Vreeken [PA4DAN]" Organization: Vitsch Electronics To: Alexander , freebsd-hackers@freebsd.org Date: Wed, 10 Aug 2005 20:19:14 +0200 User-Agent: KMail/1.8 References: <20050809133109.GA15300@skatecity> <20050809192530.GA19230@skatecity> <20050810130928.GA2027@skatecity> In-Reply-To: <20050810130928.GA2027@skatecity> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508102019.15147.Danovitsch@Vitsch.net> Cc: Subject: Re: Using sysarch specific syscalls in assembly? 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, 10 Aug 2005 18:20:07 -0000 On Wednesday 10 August 2005 15:09, alexander wrote: > I tried to write a little C app that uses sysarch and i386_set_ioperm to > gain access to certain ports and after a bit of testing I'm pretty sure > that there is a bug or better a timing issue with the sysarch syscall or > the > i386_set_ioperm procedure. Please have a look at the following code: > > //CODE START > > #include > > int main (void) { > > unsigned int port = 0x378; > unsigned char val = 'A'; > int number = 4; > > static inline void outb (unsigned short int port, unsigned char val) { > __asm__ volatile ("outb %0,%1\n"::"a" (val), "d" (port) ); > } > > struct i386_ioperm_args { > unsigned int start; > unsigned int length; > int enable; > }; > > struct i386_ioperm_args *args; > struct i386_ioperm_args arg; > args = &arg; > > args->start = 0x378; > args->length = 1; > args->enable = 1; > > if(sysarch(number,args) == 0) { > /* int i; > for(i=0; i < 100; i++) { > printf("DELAY\n"); > } > */ > outb(0x378,0xF); > exit(0); > } > > else { > printf("Error during syscall"); > exit(1); > } > } > > //eof > > //CODE END > > On my PC this code will cause a core dump (Bus error: 10). If I however add > a delay (the code that's commented out) the app will end without any > errors. > > It seems FBSD needs some time to set the I/O permissions for an app. Can > somebody test this code on his computer? Maybe this is a bug in RELENG_6. > I'm running: > > FreeBSD 6.0-BETA1 #0: Mon Jul 18 03:00:45 CEST 2005 I can confirm that. I have tested the program on 5.4-RELEASE here. Testing your program (I called it "p") 10 times gives the following output : root@Racebeest# for a in 0 1 2 3 4 5 6 7 8 9;do echo "starting p"; ./p ;done starting p starting p starting p Bus error (core dumped) starting p Bus error (core dumped) starting p starting p starting p Bus error (core dumped) starting p Bus error (core dumped) starting p starting p root@Racebeest# However, opening /dev/io to gain IO privileges instead of using sysarch always works. I tested that with the following program : #include static inline void outb (unsigned short int port, unsigned char val) { __asm__ volatile ("outb %0,%1\n"::"a" (val), "d" (port) ); } int main (void) { if (open("/dev/io", O_RDONLY) == -1) { printf("EEK!\n"); exit(1); } outb(0x378, 0xff); } --- EOF --- grtz, Daan From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 19:07: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 389C416A41F for ; Wed, 10 Aug 2005 19:07:07 +0000 (GMT) (envelope-from freebsd@thesnodgrass.com) Received: from fed1rmmtao04.cox.net (fed1rmmtao04.cox.net [68.230.241.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id C261B43D49 for ; Wed, 10 Aug 2005 19:07:06 +0000 (GMT) (envelope-from freebsd@thesnodgrass.com) Received: from [192.168.1.100] (really [68.8.226.201]) by fed1rmmtao04.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050810190706.IITN15197.fed1rmmtao04.cox.net@[192.168.1.100]>; Wed, 10 Aug 2005 15:07:06 -0400 Message-ID: <42FA3684.3050807@thesnodgrass.com> Date: Wed, 10 Aug 2005 12:16:52 -0500 From: j snod User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050712) MIME-Version: 1.0 References: <42F93030.2050509@thesnodgrass.com> <10303.145.248.192.30.1123662749.squirrel@webmail.thilelli.net> <42FA28EF.2080502@thesnodgrass.com> In-Reply-To: <42FA28EF.2080502@thesnodgrass.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: jpeg@thilelli.net, freebsd-hackers@freebsd.org Subject: Re: Realtek RTL8100S on FreeBSD 5.4: no carrier. 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, 10 Aug 2005 19:07:07 -0000 I just tried a clean install of 6.0 Beta 2, and still the same problem, but now with additional error messages: re0: link state changed to UP re0: link state changed to DOWN re0: link state changed to UP re0: link state changed to DOWN Over and over and over, whenever the LED on the network jack blinks. Further research indicated that ACPI could be a problem, so I disabled it by adding hint.acpi.0.disabled="1" to /boot/device.hints. This produced a different error: re0: 2 link states coalesced re0: link state changed to DOWN re0: 2 link states coalesced re0: link state changed to DOWN Over and over on every LED blink. -j j snod wrote: > > I did some more research, it appears that the Abit AA8-DuraMax actually > uses the RealTek RTL8100S chipset, not the 8169. > > The hardware compatibility list for 5.4 shows support for the 8110S > chipset, but not my specific motherboard. Perhaps it is a new chip > revision? > > I tried the patch by Dag-Erling Smųrgrav from a similar thread ( > http://lists.freebsd.org/pipermail/freebsd-hackers/2005-March/011022.html > ) but no luck. > > -j > > > Dmitry Mityugov wrote: >> On 8/10/05, Julien Gabel wrote: >> ... >>> Regrettably, i always encountered this problem. I spoke about that >>> since >>> the middle of 2004, and didn't really receive feedback on this. I try a >>> lot of things but none worked better than the other. >>> >>> To not forget about it, i filled a bug report on this particular >>> problem, >>> see PR kern/80005 for more details. >>> >>> The last thing i want to give another try is to upgrade to RELENG_6, >>> since i currently follow the RELENG_5 branch. But i am not *very* >>> confident about that... >>> >>> Sorry not to have better answer to give you. >> >> IIRC, I have a RTL8169S-based D-Link gigabit network card at home and >> it works with FreeBSD just fine. >> > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 19:18: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 E049516A41F for ; Wed, 10 Aug 2005 19:18:01 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB96B43D5A for ; Wed, 10 Aug 2005 19:17:57 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de (musashi.et.bocholt.fh-gelsenkirchen.de [193.175.197.95]) by alice.et.bocholt.fh-gelsenkirchen.de (8.12.9/8.12.9) with ESMTP id j7AJHteD000603 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 10 Aug 2005 21:17:55 +0200 Received: from sora.hank.home ([10.8.0.6]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.13.3/8.13.3) with ESMTP id j7AJHs9X043258; Wed, 10 Aug 2005 21:17:54 +0200 (CEST) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from localhost (localhost.hank.home [127.0.0.1]) by sora.hank.home (8.13.3/8.13.3) with ESMTP id j7AJJReX048641; Wed, 10 Aug 2005 21:19:28 +0200 (CEST) (envelope-from hank@sora.hank.home) Message-Id: <200508101919.j7AJJReX048641@sora.hank.home> To: Jeremie Le Hen In-Reply-To: Message from Jeremie Le Hen of "Wed, 10 Aug 2005 14:15:09 +0200." <20050810121509.GI45385@obiwan.tataz.chchile.org> Date: Wed, 10 Aug 2005 21:19:27 +0200 From: Dirk GOUDERS X-Scanned-By: MIMEDefang 2.43 Cc: hackers@freebsd.org, Garance A Drosihn Subject: Re: Include files that depend on include files 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, 10 Aug 2005 19:18:02 -0000 > > Can you point me to a real-life example where such a mechanism is > > used? I'd like to have a closer look at it. > > /usr/include/sys/types.h :-) Thank you :-) Now, I found the comment in /usr/include/machine/ansi.h that also describes this mechanism. Thanks for all other answers, as well. Dirk From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 19:21:29 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 CEBB916A41F for ; Wed, 10 Aug 2005 19:21:29 +0000 (GMT) (envelope-from jpeg@thilelli.net) Received: from smtp.thilelli.net (smtp.thilelli.net [213.41.129.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38D5743D45 for ; Wed, 10 Aug 2005 19:21:28 +0000 (GMT) (envelope-from jpeg@thilelli.net) Received: from localhost (localhost [127.0.0.1]) by bento.thilelli.net (Postfix) with ESMTP id AD9005C7A; Wed, 10 Aug 2005 21:21:27 +0200 (CEST) Received: from bento.thilelli.net ([127.0.0.1]) by localhost (bento.thilelli.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 79755-04-2; Wed, 10 Aug 2005 21:21:23 +0200 (CEST) Received: from webmail.thilelli.net (localhost [127.0.0.1]) by bento.thilelli.net (Postfix) with ESMTP id E5C035C79; Wed, 10 Aug 2005 21:21:22 +0200 (CEST) Received: from 192.168.1.20 (SquirrelMail authenticated user jgabel) by webmail.thilelli.net with HTTP; Wed, 10 Aug 2005 21:21:22 +0200 (CEST) Message-ID: <64459.192.168.1.20.1123701682.squirrel@webmail.thilelli.net> In-Reply-To: <42FA3684.3050807@thesnodgrass.com> References: <42F93030.2050509@thesnodgrass.com> <10303.145.248.192.30.1123662749.squirrel@webmail.thilelli.net> <42FA28EF.2080502@thesnodgrass.com> <42FA3684.3050807@thesnodgrass.com> Date: Wed, 10 Aug 2005 21:21:22 +0200 (CEST) From: "Julien Gabel" To: "j snod" 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 X-Virus-Scanned: amavisd-new at thilelli.net Cc: freebsd-hackers@freebsd.org Subject: Re: Realtek RTL8100S on FreeBSD 5.4: no carrier. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jpeg@thilelli.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 19:21:29 -0000 >>>> Regrettably, i always encountered this problem. I spoke about that >>> since the middle of 2004, and didn't really receive feedback on this. >>> I try a lot of things but none worked better than the other. >>> >>> To not forget about it, i filled a bug report on this particular >>> problem, see PR kern/80005 for more details. >>> >>> The last thing i want to give another try is to upgrade to RELENG_6, >>> since i currently follow the RELENG_5 branch. But i am not *very* >>> confident about that... >>> >>> Sorry not to have better answer to give you. >> I did some more research, it appears that the Abit AA8-DuraMax actually >> uses the RealTek RTL8100S chipset, not the 8169. >> >> The hardware compatibility list for 5.4 shows support for the 8110S >> chipset, but not my specific motherboard. Perhaps it is a new chip >> revision? >> >> I tried the patch by Dag-Erling Smųrgrav from a similar thread ( >> http://lists.freebsd.org/pipermail/freebsd-hackers/2005-March/011022.html >> ) but no luck. > I just tried a clean install of 6.0 Beta 2, and still the same problem, > but now with additional error messages: > > re0: link state changed to UP > re0: link state changed to DOWN > re0: link state changed to UP > re0: link state changed to DOWN > > Over and over and over, whenever the LED on the network jack blinks. > > Further research indicated that ACPI could be a problem, so I disabled > it by adding hint.acpi.0.disabled="1" to /boot/device.hints. This > produced a different error: > > re0: 2 link states coalesced > re0: link state changed to DOWN > re0: 2 link states coalesced > re0: link state changed to DOWN > > Over and over on every LED blink. Same behaviour here: RELENG_5 or RELENG_6, with or without ACPI support. -- -jpeg. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 19:31:56 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 0D17C16A41F for ; Wed, 10 Aug 2005 19:31:56 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FF1A43D53 for ; Wed, 10 Aug 2005 19:31:55 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de (musashi.et.bocholt.fh-gelsenkirchen.de [193.175.197.95]) by alice.et.bocholt.fh-gelsenkirchen.de (8.12.9/8.12.9) with ESMTP id j7AJVqeD000659 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 10 Aug 2005 21:31:53 +0200 Received: from sora.hank.home ([10.8.0.6]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.13.3/8.13.3) with ESMTP id j7AJVqRC043304; Wed, 10 Aug 2005 21:31:52 +0200 (CEST) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from localhost (localhost.hank.home [127.0.0.1]) by sora.hank.home (8.13.3/8.13.3) with ESMTP id j7AJXEqf078624; Wed, 10 Aug 2005 21:33:14 +0200 (CEST) (envelope-from hank@sora.hank.home) Message-Id: <200508101933.j7AJXEqf078624@sora.hank.home> To: Garance A Drosihn In-Reply-To: Message from Garance A Drosihn of "Wed, 10 Aug 2005 14:00:35 EDT." Date: Wed, 10 Aug 2005 21:33:14 +0200 From: Dirk GOUDERS X-Scanned-By: MIMEDefang 2.43 Cc: hackers@freebsd.org Subject: Re: Include files that depend on include files 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, 10 Aug 2005 19:31:56 -0000 > The above lines came from FreeBSD's /usr/include/sys/stat.h > > Note that it includes and not > > There are many other examples in the FreeBSD system includes, at > least once you get to the 5.x-series of FreeBSD. I don't remember > if we were doing that in the 4.x-series. In 4.x I did not find any referece to but Jeremie pointed me to another example. And now, I also can have a look at the newer version of stat.h via cvsweb. Thanks a lot. Dirk From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 19:42: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 E521416A41F for ; Wed, 10 Aug 2005 19:42:19 +0000 (GMT) (envelope-from deker@slackdot.org) Received: from mail.slackdot.org (stang.slackdot.org [64.92.162.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91E9143D49 for ; Wed, 10 Aug 2005 19:42:19 +0000 (GMT) (envelope-from deker@slackdot.org) Received: from [157.185.81.194] (unknown [158.69.81.194]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mail.slackdot.org (Postfix) with ESMTP id 6DBB12E051 for ; Wed, 10 Aug 2005 14:45:33 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v733) In-Reply-To: References: <469E8187-1E83-449D-8410-8BF52FDC27F1@slackdot.org> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1A60ADD1-FE0C-4716-AC44-A6498CA9FAAE@slackdot.org> Content-Transfer-Encoding: 7bit From: Deker Date: Wed, 10 Aug 2005 15:42:16 -0400 To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.733) Subject: Re: Global txpower in ath 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, 10 Aug 2005 19:42:20 -0000 Whoops, I replied to the first message wrong, so I'll bring it back to the list... I don't have access at the moment to a FreeBSD box to point to specifics, but I'd recommend looking at ifconfig sources (/usr/src/ sbin/ifconfig/ifieee80211.c?) to see which ioctl is being called for the txpower argument. Then, follow that down into /usr/src/sys/ net80211/ieee80211_ioctl.c and see what's happening from the net80211 layer to the driver. -d On Aug 10, 2005, at 2:50 PM, Sam Pierson wrote: > I'm not sure, exactly. What happened was, I brought a laptop > far away and then sent some UDP packets to it from an ath > card. It receives all of them correctly. When I turn the global > power down (ifconfig ath0 txpower 1), it cannot receive the > packets. There is a little variation, when I set it to 9, only > some of the packets are received, and when I set it to 19 > or greater, most of the packets are received. > > -Sam > > On 8/10/05, Deker wrote: > >> >> I wasn't aware that the HAL supported variable TX power yet. Has >> there been some update to allow the txpower argument to >> ath_hal_tx_start to be honored? >> >> -d >> >> On Aug 10, 2005, at 1:53 PM, Sam Pierson wrote: >> >> >>> I noticed that when I control the signal strength through >>> ifconfig, I can effectively reduce the signal when I set it >>> as something like: ifconfig ath0 txpower 1. I have read >>> that this input is device driver dependent and I couldn't >>> find anything in the interface that handles txcontrol. Are >>> these values taken in exactly or are they rounded to some >>> less fine-grained control number? Thanks, >>> >>> Sam >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to "freebsd-hackers- >>> unsubscribe@freebsd.org" >>> >>> >> >> > From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 20:26: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 EFF2A16A41F for ; Wed, 10 Aug 2005 20:26:07 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: from mail.lsi.ru (mail.lsi.ru [212.58.192.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6975843D46 for ; Wed, 10 Aug 2005 20:26:07 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: by mail.lsi.ru (Postfix, from userid 426) id C9D13386CDF; Thu, 11 Aug 2005 00:26:04 +0400 (MSD) Received: from [10.0.0.3] (unknown [212.58.210.222]) by mail.lsi.ru (Postfix) with ESMTP id 88A4A386C91 for ; Thu, 11 Aug 2005 00:26:03 +0400 (MSD) Message-ID: <42FA63A3.4040802@mail.pnpi.spb.ru> Date: Thu, 11 Aug 2005 00:29:23 +0400 From: Sergey Uvarov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: preferable way to control kernel 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: Wed, 10 Aug 2005 20:26:08 -0000 Hello hackers, I'm writing a kernel module for my own needs. AFAIK the following methods could be used: 1) allocate not used system call with help of SYSCALL_MODULE macro 2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an appropriate sysctl handler(s) 3) add a file in /dev and use ioctl(2) call What is a preferable way to control my module? Thanks in advance, Sergey. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 20:36: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 AEF6C16A41F for ; Wed, 10 Aug 2005 20:36:57 +0000 (GMT) (envelope-from vladgalu@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 469A543D48 for ; Wed, 10 Aug 2005 20:36:57 +0000 (GMT) (envelope-from vladgalu@gmail.com) Received: by zproxy.gmail.com with SMTP id z6so137950nzd for ; Wed, 10 Aug 2005 13:36:56 -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=e3/G8/47F1SJiYJx03GhOfQvwZpkLDrzv/h3rbPQHSYYiKR2/IViS+7ENFhS9mKV/8VOqhC1PgSY08Voa7xUdI6ogqDuHRJD6aNmnrQ2b+D+IcUREnc+IqjsEPWKg6S1sUc9TGP9v6rXYIO0AZyhs8FdlKUVO5U7AKKDFTos7TM= Received: by 10.36.221.9 with SMTP id t9mr759753nzg; Wed, 10 Aug 2005 13:36:56 -0700 (PDT) Received: by 10.36.86.4 with HTTP; Wed, 10 Aug 2005 13:36:56 -0700 (PDT) Message-ID: <79722fad050810133651d0bc25@mail.gmail.com> Date: Wed, 10 Aug 2005 23:36:56 +0300 From: Vlad GALU To: Sergey Uvarov In-Reply-To: <42FA63A3.4040802@mail.pnpi.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42FA63A3.4040802@mail.pnpi.spb.ru> Cc: freebsd-hackers@freebsd.org Subject: Re: preferable way to control kernel 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: Wed, 10 Aug 2005 20:36:57 -0000 On 8/10/05, Sergey Uvarov wrote: > Hello hackers, >=20 > I'm writing a kernel module for my own needs. AFAIK the following > methods could be used: >=20 > 1) allocate not used system call with help of SYSCALL_MODULE macro >=20 1 syscall > 2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an > appropriate sysctl handler(s) > 1 syscall + some work on the handler, but less flexibility. You can't pass much information as an OID value. =20 > 3) add a file in /dev and use ioctl(2) call >=20 at least 2 syscalls (open()/ioctl()). The flexibility would be the same as 1), since you would also probably pass info packed in a structure that is the argument for the ioctl(). But you'd have to do slightly more work involving the /dev entry. > What is a preferable way to control my module? >=20 =20 I would go for 1. But then again, I might be wrong. Better wait to hear more suggestions before choosing a design. > Thanks in advance, > Sergey. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " >=20 --=20 If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 20:57: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 7FFBA16A421 for ; Wed, 10 Aug 2005 20:57:38 +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 E5A0E43D45 for ; Wed, 10 Aug 2005 20:57:37 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 10 Aug 2005 17:12:26 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 10 Aug 2005 16:40:27 -0400 User-Agent: KMail/1.8 References: <42FA63A3.4040802@mail.pnpi.spb.ru> In-Reply-To: <42FA63A3.4040802@mail.pnpi.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508101640.28555.jhb@FreeBSD.org> Cc: Sergey Uvarov Subject: Re: preferable way to control kernel 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: Wed, 10 Aug 2005 20:57:38 -0000 On Wednesday 10 August 2005 04:29 pm, Sergey Uvarov wrote: > Hello hackers, > > I'm writing a kernel module for my own needs. AFAIK the following > methods could be used: > > 1) allocate not used system call with help of SYSCALL_MODULE macro > > 2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an > appropriate sysctl handler(s) > > 3) add a file in /dev and use ioctl(2) call > > What is a preferable way to control my module? It depends on what you want to do really. I've used sysctl's for simple debug modules where I write to the sysctl to have it perform a desired action. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 21:08: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 D91D316A41F for ; Wed, 10 Aug 2005 21:08:03 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: from mail.lsi.ru (mail.lsi.ru [212.58.192.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 741E243D45 for ; Wed, 10 Aug 2005 21:08:03 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: by mail.lsi.ru (Postfix, from userid 426) id AD917386E24; Thu, 11 Aug 2005 01:08:02 +0400 (MSD) Received: from [10.0.0.3] (unknown [212.58.210.222]) by mail.lsi.ru (Postfix) with ESMTP id 65E7B386E1A for ; Thu, 11 Aug 2005 01:08:01 +0400 (MSD) Message-ID: <42FA6D78.4020306@mail.pnpi.spb.ru> Date: Thu, 11 Aug 2005 01:11:20 +0400 From: Sergey Uvarov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <42FA63A3.4040802@mail.pnpi.spb.ru> <200508101640.28555.jhb@FreeBSD.org> In-Reply-To: <200508101640.28555.jhb@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: preferable way to control kernel 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: Wed, 10 Aug 2005 21:08:04 -0000 John Baldwin wrote: > On Wednesday 10 August 2005 04:29 pm, Sergey Uvarov wrote: > >>Hello hackers, >> >>I'm writing a kernel module for my own needs. AFAIK the following >>methods could be used: >> >>1) allocate not used system call with help of SYSCALL_MODULE macro >> >>2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an >>appropriate sysctl handler(s) >> >>3) add a file in /dev and use ioctl(2) call >> >>What is a preferable way to control my module? > > > It depends on what you want to do really. I've used sysctl's for simple debug > modules where I write to the sysctl to have it perform a desired action. I need to pass some configuration parameters to my module and retrieve a status back. Interface is quite similar to ptrace(2) syscall. I don't need to pass large amount of data. Thanks, Sergey. From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 21:38: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 6635816A41F for ; Wed, 10 Aug 2005 21:38:39 +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 F2E5D43D55 for ; Wed, 10 Aug 2005 21:38:38 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 10 Aug 2005 17:53:28 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 10 Aug 2005 17:37:35 -0400 User-Agent: KMail/1.8 References: <42FA63A3.4040802@mail.pnpi.spb.ru> <200508101640.28555.jhb@FreeBSD.org> <42FA6D78.4020306@mail.pnpi.spb.ru> In-Reply-To: <42FA6D78.4020306@mail.pnpi.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508101737.36542.jhb@FreeBSD.org> Cc: Sergey Uvarov Subject: Re: preferable way to control kernel 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: Wed, 10 Aug 2005 21:38:39 -0000 On Wednesday 10 August 2005 05:11 pm, Sergey Uvarov wrote: > John Baldwin wrote: > > On Wednesday 10 August 2005 04:29 pm, Sergey Uvarov wrote: > >>Hello hackers, > >> > >>I'm writing a kernel module for my own needs. AFAIK the following > >>methods could be used: > >> > >>1) allocate not used system call with help of SYSCALL_MODULE macro > >> > >>2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an > >>appropriate sysctl handler(s) > >> > >>3) add a file in /dev and use ioctl(2) call > >> > >>What is a preferable way to control my module? > > > > It depends on what you want to do really. I've used sysctl's for simple > > debug modules where I write to the sysctl to have it perform a desired > > action. > > I need to pass some configuration parameters to my module and retrieve a > status back. Interface is quite similar to ptrace(2) syscall. I don't > need to pass large amount of data. If it's a single integer or some such, I'd say use sysctl. If it's a structure, I'd go the ioctl(2) route. Creating /dev entries isn't all that hard. In your case you'd just need open/close/ioctl in a cdevsw, then use make_dev() during MOD_LOAD and destroy_dev() during MOD_UNLOAD. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 21:47: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 CD60216A41F; Wed, 10 Aug 2005 21:47:32 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: from mail.lsi.ru (mail.lsi.ru [212.58.192.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6280F43D46; Wed, 10 Aug 2005 21:47:30 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: by mail.lsi.ru (Postfix, from userid 426) id 883DA386C8B; Thu, 11 Aug 2005 01:47:29 +0400 (MSD) Received: from [10.0.0.3] (unknown [212.58.210.222]) by mail.lsi.ru (Postfix) with ESMTP id 20EAF386C6F; Thu, 11 Aug 2005 01:47:26 +0400 (MSD) Message-ID: <42FA76B4.8010007@mail.pnpi.spb.ru> Date: Thu, 11 Aug 2005 01:50:44 +0400 From: Sergey Uvarov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: John Baldwin References: <42FA63A3.4040802@mail.pnpi.spb.ru> <200508101640.28555.jhb@FreeBSD.org> <42FA6D78.4020306@mail.pnpi.spb.ru> <200508101737.36542.jhb@FreeBSD.org> In-Reply-To: <200508101737.36542.jhb@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: preferable way to control kernel 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: Wed, 10 Aug 2005 21:47:32 -0000 >>>>I'm writing a kernel module for my own needs. AFAIK the following >>>>methods could be used: >>>> >>>>1) allocate not used system call with help of SYSCALL_MODULE macro >>>> >>>>2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an >>>>appropriate sysctl handler(s) >>>> >>>>3) add a file in /dev and use ioctl(2) call >>>> >>>>What is a preferable way to control my module? >>> >>>It depends on what you want to do really. I've used sysctl's for simple >>>debug modules where I write to the sysctl to have it perform a desired >>>action. >> >>I need to pass some configuration parameters to my module and retrieve a >>status back. Interface is quite similar to ptrace(2) syscall. I don't >>need to pass large amount of data. > > > If it's a single integer or some such, I'd say use sysctl. If it's a > structure, I'd go the ioctl(2) route. Creating /dev entries isn't all that > hard. In your case you'd just need open/close/ioctl in a cdevsw, then use > make_dev() during MOD_LOAD and destroy_dev() during MOD_UNLOAD. > Thank you for advise. But I wonder: what is wrong with syscall approach (via SYSCALL_MODULE macro)? Thanks again, Sergey. From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 12:01: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 7DC4316A41F for ; Thu, 11 Aug 2005 12:01:09 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0438343D45 for ; Thu, 11 Aug 2005 12:01:06 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 25495 invoked from network); 11 Aug 2005 14:01:03 +0200 Received: from p508fff88.dip.t-dialin.net (HELO localhost.skatecity) (80.143.255.136) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 11 Aug 2005 14:01:03 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j7BC18FO020690 for ; Thu, 11 Aug 2005 14:01:08 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j7BC18rL020689 for freebsd-hackers@freebsd.org; Thu, 11 Aug 2005 14:01:08 +0200 (CEST) (envelope-from arundel) From: alexander Date: Thu, 11 Aug 2005 14:01:08 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050811120108.GA20415@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050809133109.GA15300@skatecity> <20050809192530.GA19230@skatecity> <20050810130928.GA2027@skatecity> <200508102019.15147.Danovitsch@Vitsch.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508102019.15147.Danovitsch@Vitsch.net> Subject: Re: Using sysarch specific syscalls in assembly? 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, 11 Aug 2005 12:01:09 -0000 On Wed Aug 10 05, Daan Vreeken [PA4DAN] wrote: > > I can confirm that. I have tested the program on 5.4-RELEASE here. Testing > your program (I called it "p") 10 times gives the following output : > > root@Racebeest# for a in 0 1 2 3 4 5 6 7 8 9;do echo "starting p"; ./p ;done > starting p > starting p > starting p > Bus error (core dumped) > starting p > Bus error (core dumped) > starting p > starting p > starting p > Bus error (core dumped) > starting p > Bus error (core dumped) > starting p > starting p > root@Racebeest# > > However, opening /dev/io to gain IO privileges instead of using sysarch always > works. I tested that with the following program : > > #include > > static inline void outb (unsigned short int port, unsigned char val) { > __asm__ volatile ("outb %0,%1\n"::"a" (val), "d" (port) ); > } > > int main (void) { > > if (open("/dev/io", O_RDONLY) == -1) { > printf("EEK!\n"); > exit(1); > } > > outb(0x378, 0xff); > } > > --- EOF --- > > grtz, > Daan Hmm...very odd. Should I file a bug report about this problem? From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 10 15:42: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 0FAA516A41F for ; Wed, 10 Aug 2005 15:42:47 +0000 (GMT) (envelope-from jordan@bit-box.com) Received: from fed1rmmtao07.cox.net (fed1rmmtao07.cox.net [68.230.241.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id A74D143D46 for ; Wed, 10 Aug 2005 15:42:46 +0000 (GMT) (envelope-from jordan@bit-box.com) Received: from [192.168.1.33] (really [68.8.226.201]) by fed1rmmtao07.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050810154246.QFNH1367.fed1rmmtao07.cox.net@[192.168.1.33]>; Wed, 10 Aug 2005 11:42:46 -0400 Message-ID: <42FA207B.3070306@bit-box.com> Date: Wed, 10 Aug 2005 08:42:51 -0700 From: Jordan Snodgrass User-Agent: Thunderbird 1.0+ (Windows/20050717) MIME-Version: 1.0 To: jpeg@thilelli.net References: <42F93030.2050509@thesnodgrass.com> <10303.145.248.192.30.1123662749.squirrel@webmail.thilelli.net> <57189.145.248.192.30.1123665610.squirrel@webmail.thilelli.net> In-Reply-To: <57189.145.248.192.30.1123665610.squirrel@webmail.thilelli.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 11 Aug 2005 12:26:31 +0000 Cc: freebsd-hackers@freebsd.org, Dmitry Mityugov Subject: Re: Realtek RTL8100S on FreeBSD 5.4: no carrier. 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, 10 Aug 2005 15:42:47 -0000 I did some more research, it appears that the Abit AA8-DuraMax actually uses the RealTek RTL8100S chipset, not the 8169. The hardware compatibility list for 5.4 shows support for the 8110S chipset, but not my specific motherboard. Perhaps it is a new chip revision? I tried the patch by Dag-Erling Smųrgrav from a similar thread ( http://lists.freebsd.org/pipermail/freebsd-hackers/2005-March/011022.html ) but no luck. -j Julien Gabel wrote: >>> Regrettably, i always encountered this problem. I spoke about that >>> since the middle of 2004, and didn't really receive feedback on this. >>> I try a lot of things but none worked better than the other. >>> >>> To not forget about it, i filled a bug report on this particular >>> problem, see PR kern/80005 for more details. >>> >>> The last thing i want to give another try is to upgrade to RELENG_6, >>> since i currently follow the RELENG_5 branch. But i am not *very* >>> confident about that... >>> >>> Sorry not to have better answer to give you. > >> IIRC, I have a RTL8169S-based D-Link gigabit network card at home and >> it works with FreeBSD just fine. > > Yes, i know it simply works for a lot of users. It doesn't mean that it > is the case for all users... i am of those. > From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 12:45:32 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 E866B16A41F for ; Thu, 11 Aug 2005 12:45:32 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8799443D83 for ; Thu, 11 Aug 2005 12:45:19 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.171] (dhcp-171-171.centtech.com [10.177.171.171]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id j7BCjDcc057640; Thu, 11 Aug 2005 07:45:13 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <42FB486D.3060505@centtech.com> Date: Thu, 11 Aug 2005 07:45:33 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.10) Gecko/20050809 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ivan Voras References: <20050803183010.X32344@geri.cc.fer.hr> In-Reply-To: <20050803183010.X32344@geri.cc.fer.hr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.82/1011/Tue Aug 9 04:20:28 2005 on mh1.centtech.com X-Virus-Status: Clean Cc: hackers@freebsd.org Subject: Re: gjournal public alpha release 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, 11 Aug 2005 12:45:33 -0000 Ivan Voras wrote: > Hi! > > I'm announcing the first public version of the gjournal GEOM class :) > The code is here: http://ivoras.sharanet.org/gjournal.tgz, together with > a README file (reproduced below). > > I'd like to hear as many testing and bug reports as possible :) [..snip..] # make Warning: Object directory not changed from original /root/gjournal/gjournal @ -> /usr/src/sys machine -> /usr/src/sys/i386/include cc -O2 -fno-strict-aliasing -pipe -g -DINVARIANTS -DINVARIANT_SUPPORT -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c g_journal.c cc -O2 -fno-strict-aliasing -pipe -g -DINVARIANTS -DINVARIANT_SUPPORT -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c binstream.c cc -O2 -fno-strict-aliasing -pipe -g -DINVARIANTS -DINVARIANT_SUPPORT -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c g_journal_md.c cc -O2 -fno-strict-aliasing -pipe -g -DINVARIANTS -DINVARIANT_SUPPORT -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c hl.c hl.c:467: warning: 'hl_print' defined but not used hl.c:486: warning: 'hl_print_entry' defined but not used *** Error code 1 Stop in /root/gjournal/gjournal. On a 6-0-BETA2 machine.. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 13:45:52 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 784DC16A41F for ; Thu, 11 Aug 2005 13:45:52 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id C61BA43D46 for ; Thu, 11 Aug 2005 13:45:45 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.4/8.13.3) with ESMTP id j7BDjgg8066042 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 11 Aug 2005 15:45:42 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.4/8.13.3/Submit) id j7BDjfjw066040 for hackers@freebsd.org; Thu, 11 Aug 2005 15:45:41 +0200 (CEST) Date: Thu, 11 Aug 2005 15:45:41 +0200 From: Divacky Roman To: hackers@freebsd.org Message-ID: <20050811134541.GA65951@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.49 on 147.229.10.14 Cc: Subject: [RFC] usr.bin patches for compilation with gcc 4.x 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, 11 Aug 2005 13:45:52 -0000 hi I made patches for usr.bin to compile with gcc4.x (tested with 4.1 snapshot), here it is: hysteria.sk/~neologism/find.patch hysteria.sk/~neologism/hexdump.patch hysteria.sk/~neologism/mkuzip.patch hysteria.sk/~neologism/tar.patch hysteria.sk/~neologism/wc.patch hysteria.sk/~neologism/window.patch pls someone take a look at it and possibly commit if you think its ok roman From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 14:31: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 4250F16A420 for ; Thu, 11 Aug 2005 14:31:01 +0000 (GMT) (envelope-from pablo.delgado@lsi.mine.nu) Received: from vhost.ethernext.com (vhost.ethernext.com [66.28.75.36]) by mx1.FreeBSD.org (Postfix) with SMTP id 7A12C43D49 for ; Thu, 11 Aug 2005 14:31:00 +0000 (GMT) (envelope-from pablo.delgado@lsi.mine.nu) Received: (qmail 15419 invoked by uid 2526); 11 Aug 2005 14:57:29 -0000 Received: from 12.8.180.42 ( [12.8.180.42]) as user pablo.delgado@localhost by webmail.lsi.mine.nu with HTTP; Thu, 11 Aug 2005 10:57:29 -0400 Message-ID: <1123772249.42fb67599fa7d@webmail.lsi.mine.nu> Date: Thu, 11 Aug 2005 10:57:29 -0400 From: pablo.delgado@lsi.mine.nu To: Bob Bomar References: <42F976E8.60008@bomar.us> In-Reply-To: <42F976E8.60008@bomar.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 X-Originating-IP: 12.8.180.42 Cc: hackers@freebsd.org, questions@freebsd.org Subject: Re: Long Uptime 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, 11 Aug 2005 14:31:01 -0000 Nice, I to have a machine that is not to far behind you, its been up for 1 year and 4 months. I use it to show potential customers the power and stability of the FreeBSD System. I dont ever recall any windows server staying up that long. =) -Pablo > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have a machine that is about to turn 700 days > uptime, and I have no plans on rebooting it any > time soon. I just wanted to see if there was > any infomation from the machine that anybody > wanted. > > [bob@bart] ~>uname -a > FreeBSD bart.xxxx 4.8-RELEASE FreeBSD 4.8-RELEASE #3: Fri Jul 18 > 17:09:10 CDT 2003 root@bart.xxxx:/usr/obj/usr/src/sys/Bart i386 > [bob@bart] ~>uptime > 10:38PM up 699 days, 3:51, 1 user, load averages: 0.41, 0.27, 0.23 > > - -- > Bob Bomar > bob@bomar.us > http://www.bomar.us/~bob > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (Darwin) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFC+Xbn9Jm/aTrtdKoRApqhAJ9r+fOjSnZsqOVi3LwI7cCyexg6hQCghh3B > TxRh6NquKm0dcBHgQB8GRis= > =kgVa > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 15:35: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 D7A3016A422 for ; Thu, 11 Aug 2005 15:35:57 +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 60BBE43D45 for ; Thu, 11 Aug 2005 15:35:57 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 11 Aug 2005 11:50:47 -0400 From: John Baldwin To: Sergey Uvarov Date: Thu, 11 Aug 2005 11:22:38 -0400 User-Agent: KMail/1.8 References: <42FA63A3.4040802@mail.pnpi.spb.ru> <200508101737.36542.jhb@FreeBSD.org> <42FA76B4.8010007@mail.pnpi.spb.ru> In-Reply-To: <42FA76B4.8010007@mail.pnpi.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508111122.39336.jhb@FreeBSD.org> Cc: freebsd-hackers@freebsd.org Subject: Re: preferable way to control kernel 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: Thu, 11 Aug 2005 15:35:58 -0000 On Wednesday 10 August 2005 05:50 pm, Sergey Uvarov wrote: > >>>>I'm writing a kernel module for my own needs. AFAIK the following > >>>>methods could be used: > >>>> > >>>>1) allocate not used system call with help of SYSCALL_MODULE macro > >>>> > >>>>2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an > >>>>appropriate sysctl handler(s) > >>>> > >>>>3) add a file in /dev and use ioctl(2) call > >>>> > >>>>What is a preferable way to control my module? > >>> > >>>It depends on what you want to do really. I've used sysctl's for simple > >>>debug modules where I write to the sysctl to have it perform a desired > >>>action. > >> > >>I need to pass some configuration parameters to my module and retrieve a > >>status back. Interface is quite similar to ptrace(2) syscall. I don't > >>need to pass large amount of data. > > > > If it's a single integer or some such, I'd say use sysctl. If it's a > > structure, I'd go the ioctl(2) route. Creating /dev entries isn't all > > that hard. In your case you'd just need open/close/ioctl in a cdevsw, > > then use make_dev() during MOD_LOAD and destroy_dev() during MOD_UNLOAD. > > Thank you for advise. But I wonder: what is wrong with syscall approach > (via SYSCALL_MODULE macro)? I just haven't done one personally. I think there's also a lot more potential for collisions when trying to pick a syscall number versus picking a string name for a sysctl or /dev entry. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 16:15: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 F146216A420; Thu, 11 Aug 2005 16:15:11 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09EE443D5C; Thu, 11 Aug 2005 16:15:07 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de (musashi.et.bocholt.fh-gelsenkirchen.de [193.175.197.95]) by alice.et.bocholt.fh-gelsenkirchen.de (8.12.9/8.12.9) with ESMTP id j7BGF4eD003045 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 11 Aug 2005 18:15:05 +0200 Received: from sora.hank.home ([10.8.0.6]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.13.3/8.13.3) with ESMTP id j7BGF4XU079109; Thu, 11 Aug 2005 18:15:04 +0200 (CEST) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from localhost (localhost.hank.home [127.0.0.1]) by sora.hank.home (8.13.3/8.13.3) with ESMTP id j7BGGZWG055221; Thu, 11 Aug 2005 18:16:39 +0200 (CEST) (envelope-from hank@sora.hank.home) Message-Id: <200508111616.j7BGGZWG055221@sora.hank.home> To: John Baldwin , Sergey Uvarov In-Reply-To: Message from John Baldwin of "Thu, 11 Aug 2005 11:22:38 EDT." <200508111122.39336.jhb@FreeBSD.org> Date: Thu, 11 Aug 2005 18:16:35 +0200 From: Dirk GOUDERS X-Scanned-By: MIMEDefang 2.43 Cc: freebsd-hackers@freebsd.org Subject: Re: preferable way to control kernel 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: Thu, 11 Aug 2005 16:15:12 -0000 > > Thank you for advise. But I wonder: what is wrong with syscall approach > > (via SYSCALL_MODULE macro)? > > I just haven't done one personally. I think there's also a lot more potenti > al > for collisions when trying to pick a syscall number versus picking a string > name for a sysctl or /dev entry. Shouldn't that be no problem if he sets the offset parameter to SYSCALL_MODULE to NO_SYSCALL (get the next free offset)? Dirk From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 16:48:27 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 15E5D16A41F; Thu, 11 Aug 2005 16:48:27 +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 A9A9E43D46; Thu, 11 Aug 2005 16:48:26 +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 j7BGjxtH087488; Thu, 11 Aug 2005 10:45:59 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 11 Aug 2005 10:46:04 -0600 (MDT) Message-Id: <20050811.104604.61335403.imp@bsdimp.com> To: ume@FreeBSD.org From: "M. Warner Losh" In-Reply-To: References: <20050809.133734.08360256.imp@bsdimp.com> <20050809213130.GB71687@dan.emsphone.com> 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]); Thu, 11 Aug 2005 10:46:04 -0600 (MDT) Cc: hackers@FreeBSD.org, dnelson@allantgroup.com Subject: Re: Converting libfoo.so for linux to freebsd 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, 11 Aug 2005 16:48:27 -0000 In message: Hajimu UMEMOTO writes: : Hi, : : >>>>> On Tue, 9 Aug 2005 16:31:30 -0500 : >>>>> Dan Nelson said: : : dnelson> In the last episode (Aug 09), M. Warner Losh said: : > I have recently purcahsed a device that comes with a .so for linux, : > but no sources. Is there any way one can take an arbitrary linux .so : > which appears to have no dependencies to a FreeBSD .so? The binary : > code is about 20k or so. : : dnelson> As long as any structs that are passed back and forth have the same : dnelson> members and alignment, it should work. This includes struct FILE, : dnelson> which means if the app tries to use stdio it'll likely crash. : : dnelson> I just compiled a little "hello world" object file on SUSE and linked : dnelson> it on FreeBSD and it ran (it just calls printf, which is safe since it : dnelson> doesn't pass a FILE *). : : As far as the Linux shlib uses the functions which ABI are compatible : with FreeBSD's one, it should work. However, if there are some ABI : incompatibility, you may want to consider the approach of : linuxpluginwrapper. : The PIPS ports (print/pips*) link Linux shlib to FreeBSD binary. To : do this, the PIPS ports use www/linuxpluginwrapper to fixup some ABI : incompatibility. umemoto-san This was exactly the hint that I needed to get things working. My brother MCP-5440CN scanner is now working (don't know about the printing side of things, since I've not tried that at all). Thank you so very much! Here's a breif outline of what I've learned: (1) To remove the symbol versioning goo from a shared library, objcopy -R .gnu.version linux.so freebsd.so (there's also a .gnu.version_r on some libraries, that can also be removed this way). Doing this allows one to directly link the .so into your program, modulo ABI issues. (2) dlopen (and likely ld-elf.so in general) doesn't check the version information at all. If all you are doing is linking dynamically at run time, you don't have to perform step #1. The compile time linker, however, whines about missing symbol versions. (3) Use libmap.conf to map libc.so.6 for the shared library that you are loading to overcome ABI issues. See the man page for an example. The linuxplugwrapper port can be used to generate shims for the ABI issues, in general, and works well. I'll likely not use it for the brother scanner port I'm working on since all I need is stderr defined in a linuxly correct, and I can do that in the source part of the driver. I'd love to get the network side of things working, but I think that might be more effort than I care to go to at the moment. I'd also like to get faxing and printing working, but again, time... I bought it for the 35 sheet document feeder + scanner at $100.00 after rebate :-) Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 17:29: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 3195B16A41F for ; Thu, 11 Aug 2005 17:29:45 +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 BF78043D45 for ; Thu, 11 Aug 2005 17:29:44 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 11 Aug 2005 13:44:10 -0400 From: John Baldwin To: Dirk GOUDERS Date: Thu, 11 Aug 2005 13:29:41 -0400 User-Agent: KMail/1.8 References: <200508111616.j7BGGZWG055221@sora.hank.home> In-Reply-To: <200508111616.j7BGGZWG055221@sora.hank.home> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508111329.42154.jhb@FreeBSD.org> Cc: freebsd-hackers@freebsd.org, Sergey Uvarov Subject: Re: preferable way to control kernel 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: Thu, 11 Aug 2005 17:29:45 -0000 On Thursday 11 August 2005 12:16 pm, Dirk GOUDERS wrote: > > > Thank you for advise. But I wonder: what is wrong with syscall > > > approach (via SYSCALL_MODULE macro)? > > > > I just haven't done one personally. I think there's also a lot more > > potenti al > > for collisions when trying to pick a syscall number versus picking a > > string name for a sysctl or /dev entry. > > Shouldn't that be no problem if he sets the offset parameter to > SYSCALL_MODULE to NO_SYSCALL (get the next free offset)? But then you have to communicate the syscall number out to your userland applications somehow, and the applications have to know how to invoke a syscall by hand (perhaps they could use the syscall() function, but still). -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 17:50: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 27F1D16A41F; Thu, 11 Aug 2005 17:50:06 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: from mail.lsi.ru (mail.lsi.ru [212.58.192.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF12043D46; Thu, 11 Aug 2005 17:50:05 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: by mail.lsi.ru (Postfix, from userid 426) id 82E41386C84; Thu, 11 Aug 2005 21:50:02 +0400 (MSD) Received: from [10.0.0.10] (unknown [212.58.210.222]) by mail.lsi.ru (Postfix) with ESMTP id C327E386C2B; Thu, 11 Aug 2005 21:50:01 +0400 (MSD) Message-ID: <42FB8FCA.2050803@mail.pnpi.spb.ru> Date: Thu, 11 Aug 2005 21:50:02 +0400 From: Sergey Uvarov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Fedora/1.7.10-1.5.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200508111616.j7BGGZWG055221@sora.hank.home> <200508111329.42154.jhb@FreeBSD.org> In-Reply-To: <200508111329.42154.jhb@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Dirk GOUDERS Subject: Re: preferable way to control kernel 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: Thu, 11 Aug 2005 17:50:06 -0000 John Baldwin wrote: > On Thursday 11 August 2005 12:16 pm, Dirk GOUDERS wrote: > >> > > Thank you for advise. But I wonder: what is wrong with syscall >> > > approach (via SYSCALL_MODULE macro)? >> > >> > I just haven't done one personally. I think there's also a lot more >> > potenti al >> > for collisions when trying to pick a syscall number versus picking a >> > string name for a sysctl or /dev entry. >> >>Shouldn't that be no problem if he sets the offset parameter to >>SYSCALL_MODULE to NO_SYSCALL (get the next free offset)? > > > But then you have to communicate the syscall number out to your userland > applications somehow, and the applications have to know how to invoke a > syscall by hand (perhaps they could use the syscall() function, but still). > It is not a big problem. Look at the following piece of code: /* Kernel module portion of code. */ static int my_syscall = NO_SYSCALL; static struct sysent my_sysent = { 2, /* sy_arg */ (sy_call_t *)&my_func /* sy_call */ }; SYSCALL_MODULE(my_syscall_name, &my_syscall, &my_sysent, NULL, NULL); /* User-land portion of code. */ int get_syscall(const char *syscall_name) { struct module_stat stat; int mod_id; int syscall_num; if ((mod_id = modfind(syscall_name)) < 0) return (-1); stat.version = sizeof(stat); if (modstat(mod_id, &stat) < 0) return (-1); return (stat.data.intval); } ... syscall_num = get_syscall("my_syscall_name"); /* Issue a syscall with necessary parameters. */ syscall(syscall_num, ...); From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 18:12: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 2E1E016A41F; Thu, 11 Aug 2005 18:12:10 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FB6343D46; Thu, 11 Aug 2005 18:12:08 +0000 (GMT) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de (musashi.et.bocholt.fh-gelsenkirchen.de [193.175.197.95]) by alice.et.bocholt.fh-gelsenkirchen.de (8.12.9/8.12.9) with ESMTP id j7BIC6eD003303 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 11 Aug 2005 20:12:07 +0200 Received: from sora.hank.home ([10.8.0.6]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.13.3/8.13.3) with ESMTP id j7BIC5Cn079314; Thu, 11 Aug 2005 20:12:05 +0200 (CEST) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from localhost (localhost.hank.home [127.0.0.1]) by sora.hank.home (8.13.3/8.13.3) with ESMTP id j7BIDeFP055360; Thu, 11 Aug 2005 20:13:40 +0200 (CEST) (envelope-from hank@sora.hank.home) Message-Id: <200508111813.j7BIDeFP055360@sora.hank.home> To: Sergey Uvarov In-Reply-To: Message from Sergey Uvarov of "Thu, 11 Aug 2005 21:50:02 +0400." <42FB8FCA.2050803@mail.pnpi.spb.ru> Date: Thu, 11 Aug 2005 20:13:40 +0200 From: Dirk GOUDERS X-Scanned-By: MIMEDefang 2.43 Cc: freebsd-hackers@freebsd.org Subject: Re: preferable way to control kernel 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: Thu, 11 Aug 2005 18:12:10 -0000 > >>Shouldn't that be no problem if he sets the offset parameter to > >>SYSCALL_MODULE to NO_SYSCALL (get the next free offset)? > > > > > > But then you have to communicate the syscall number out to your userland > > applications somehow, and the applications have to know how to invoke a > > syscall by hand (perhaps they could use the syscall() function, but still) > . > > > It is not a big problem. Look at the following piece of code: > > > /* Kernel module portion of code. */ > static int my_syscall = NO_SYSCALL; > static struct sysent my_sysent = { > 2, /* sy_arg */ > (sy_call_t *)&my_func /* sy_call */ > }; > SYSCALL_MODULE(my_syscall_name, &my_syscall, &my_sysent, > NULL, NULL); > > > /* User-land portion of code. */ > int get_syscall(const char *syscall_name) > { > struct module_stat stat; > int mod_id; > int syscall_num; > > if ((mod_id = modfind(syscall_name)) < 0) > return (-1); > > stat.version = sizeof(stat); > if (modstat(mod_id, &stat) < 0) > return (-1); > > return (stat.data.intval); > } > > ... > > syscall_num = get_syscall("my_syscall_name"); > > /* Issue a syscall with necessary parameters. */ > syscall(syscall_num, ...); That is roughly what I accidently played with, today. Don't know about the probability that there may be no free offset, though. Dirk From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 18:48: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 3E82C16A41F; Thu, 11 Aug 2005 18:48:08 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A7BC43D46; Thu, 11 Aug 2005 18:48:07 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.13.3/8.13.3/NinthNine) with SMTP id j7BIlUvQ085453; Fri, 12 Aug 2005 03:47:31 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Fri, 12 Aug 2005 03:47:30 +0900 (JST) Message-Id: <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com> From: Norikatsu Shigemura To: "M. Warner Losh" In-Reply-To: <20050811.104604.61335403.imp@bsdimp.com> References: <20050809.133734.08360256.imp@bsdimp.com> <20050809213130.GB71687@dan.emsphone.com> <20050811.104604.61335403.imp@bsdimp.com> X-Mailer: Sylpheed version 2.0.0 (GTK+ 2.6.9; i386-portbld-freebsd7.0) 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 (sakura.ninth-nine.com [219.127.74.121]); Fri, 12 Aug 2005 03:47:31 +0900 (JST) Cc: hackers@FreeBSD.org, dnelson@allantgroup.com, ume@FreeBSD.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 11 Aug 2005 18:48:08 -0000 Linuxpluginwrapper(LPW) is a most famous killer application of libmap.conf(5)! (I think:-) On Thu, 11 Aug 2005 10:46:04 -0600 (MDT) "M. Warner Losh" wrote: > Here's a breif outline of what I've learned: > (1) To remove the symbol versioning goo from a shared library, > objcopy -R .gnu.version linux.so freebsd.so > (there's also a .gnu.version_r on some libraries, that can > also be removed this way). Doing this allows one to directly > link the .so into your program, modulo ABI issues. Humm, When I made LPW, I didn't have a trouble about symbol versioning. I think no need objcopy. > (2) dlopen (and likely ld-elf.so in general) doesn't check the > version information at all. If all you are doing is linking > dynamically at run time, you don't have to perform step #1. > The compile time linker, however, whines about missing symbol > versions. > (3) Use libmap.conf to map libc.so.6 for the shared library > that you are loading to overcome ABI issues. See the man page > for an example. Humm.. I have no comment. > The linuxplugwrapper port can be used to generate shims for the ABI > issues, in general, and works well. I'll likely not use it for the > brother scanner port I'm working on since all I need is stderr defined > in a linuxly correct, and I can do that in the source part of the > driver. I'd love to get the network side of things working, but I > think that might be more effort than I care to go to at the moment. > I'd also like to get faxing and printing working, but again, time... > I bought it for the 35 sheet document feeder + scanner at $100.00 > after rebate :-) LPW has a FORCE ABOUTER[TM:-)]. $ cd /usr/ports/www/linuxpluginwrapper $ make extract $ cd work/linuxpluginwrapper-20050613 $ make dummy.c TARGET_PLUGIN=LINUX_SHARED_LIBRARY_YOU_WANT.so $ mv dummy.c dummy_APPLICATION_NAME.c please add dummy_APPLICATION_NAME.o and related macros to Makefile on top directory. So you can develop pluginwrapper like acrobat/flash7/realplayer support:-). From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 19:54:36 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 7C8D516A41F; Thu, 11 Aug 2005 19:54:36 +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 EFBEC43D46; Thu, 11 Aug 2005 19:54:35 +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 j7BJpf7j088859; Thu, 11 Aug 2005 13:51:42 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 11 Aug 2005 13:51:47 -0600 (MDT) Message-Id: <20050811.135147.21959222.imp@bsdimp.com> To: nork@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com> References: <20050811.104604.61335403.imp@bsdimp.com> <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com> 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]); Thu, 11 Aug 2005 13:51:42 -0600 (MDT) Cc: hackers@FreeBSD.org, dnelson@allantgroup.com, ume@FreeBSD.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 11 Aug 2005 19:54:36 -0000 In message: <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com> Norikatsu Shigemura writes: : Linuxpluginwrapper(LPW) is a most famous killer application : of libmap.conf(5)! (I think:-) Definitely. While threading games are interesting, the linux plugin wrapper definitely is much more useful. : On Thu, 11 Aug 2005 10:46:04 -0600 (MDT) : "M. Warner Losh" wrote: : > Here's a breif outline of what I've learned: : > (1) To remove the symbol versioning goo from a shared library, : > objcopy -R .gnu.version linux.so freebsd.so : > (there's also a .gnu.version_r on some libraries, that can : > also be removed this way). Doing this allows one to directly : > link the .so into your program, modulo ABI issues. : : Humm, When I made LPW, I didn't have a trouble about symbol : versioning. I think no need objcopy. If you are building programs from source and linking directly to these libraries, then the objcopy is needed. If you are just coaxing binaries to run that have already been linked, then no objcopy is needed. Also, if you load the library via dlopen, no objcopy is needed. : > The linuxplugwrapper port can be used to generate shims for the ABI : > issues, in general, and works well. I'll likely not use it for the : > brother scanner port I'm working on since all I need is stderr defined : > in a linuxly correct, and I can do that in the source part of the : > driver. I'd love to get the network side of things working, but I : > think that might be more effort than I care to go to at the moment. : > I'd also like to get faxing and printing working, but again, time... : > I bought it for the 35 sheet document feeder + scanner at $100.00 : > after rebate :-) : : LPW has a FORCE ABOUTER[TM:-)]. : $ cd /usr/ports/www/linuxpluginwrapper : $ make extract : $ cd work/linuxpluginwrapper-20050613 : $ make dummy.c TARGET_PLUGIN=LINUX_SHARED_LIBRARY_YOU_WANT.so : $ mv dummy.c dummy_APPLICATION_NAME.c : please add dummy_APPLICATION_NAME.o and related macros to : Makefile on top directory. : : So you can develop pluginwrapper like acrobat/flash7/realplayer : support:-). I noticed that when I was looking at the wrapepr. Definitely very cool tools to help in development. I was lucky that the Linux library I needed to run touched so few symbols. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 21:16: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 6F4D816A41F for ; Thu, 11 Aug 2005 21:16:13 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C74843D45 for ; Thu, 11 Aug 2005 21:16:13 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 0E7421F7CED; Thu, 11 Aug 2005 14:16:13 -0700 (PDT) Received: from [192.168.2.2] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j7BLGAc2075519; Thu, 11 Aug 2005 14:16:12 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <42FBC017.6050000@elischer.org> Date: Thu, 11 Aug 2005 14:16:07 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Dirk GOUDERS References: <200508111813.j7BIDeFP055360@sora.hank.home> In-Reply-To: <200508111813.j7BIDeFP055360@sora.hank.home> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Sergey Uvarov Subject: Re: preferable way to control kernel 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: Thu, 11 Aug 2005 21:16:13 -0000 Dirk GOUDERS wrote: > > >>Shouldn't that be no problem if he sets the offset parameter to > > >>SYSCALL_MODULE to NO_SYSCALL (get the next free offset)? > > > > > > > > > But then you have to communicate the syscall number out to your userland > > > applications somehow, and the applications have to know how to invoke a > > > syscall by hand (perhaps they could use the syscall() function, but still) In the past, I've used a sysctl to communicate out the syscall number. you only need to do the syscall once, and it confirms to the program that the syscall is correctly installed. From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 22:14: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 3FC5D16A41F for ; Thu, 11 Aug 2005 22:14:34 +0000 (GMT) (envelope-from samuel.pierson@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6B4C43D48 for ; Thu, 11 Aug 2005 22:14:31 +0000 (GMT) (envelope-from samuel.pierson@gmail.com) Received: by wproxy.gmail.com with SMTP id i22so471968wra for ; Thu, 11 Aug 2005 15:14:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MuHsN+sgy8YmRw7FVyTRUF9vXpShnmuT45Rl+quUHnTJP4RFB4b5FNa858hH5FznKZ47UlGN2r+9VKwf2yVWOwSvbaat9Lsg5VqRiZIoLm3l1RNMiTFfe/POyMZ9mFFSc5jQHRnWNjVGRjnXKz7UJxqiffHoqegmHIJzL1HhLbE= Received: by 10.54.37.64 with SMTP id k64mr1486417wrk; Thu, 11 Aug 2005 15:14:30 -0700 (PDT) Received: by 10.54.144.1 with HTTP; Thu, 11 Aug 2005 15:14:30 -0700 (PDT) Message-ID: Date: Thu, 11 Aug 2005 17:14:30 -0500 From: Sam Pierson To: Sam Leffler , FreeBSD Hackers In-Reply-To: <42FACAF6.4020805@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42FACAF6.4020805@errno.com> Cc: Subject: Re: Global txpower in ath 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, 11 Aug 2005 22:14:34 -0000 Is there a way to check the txpow in sysctl or something along those lines? I'm changing txpower and it appears as though it will do a reset every once in awhile. From=20 what I can gather from if_ath.c, it looks like ath_init resets the txpow as well. I'd like to know whether or not my originally intended txpow is still being respected. -Sam On 8/10/05, Sam Leffler wrote: > Sam Pierson wrote: > > I noticed that when I control the signal strength through > > ifconfig, I can effectively reduce the signal when I set it > > as something like: ifconfig ath0 txpower 1. I have read > > that this input is device driver dependent and I couldn't > > find anything in the interface that handles txcontrol. Are > > these values taken in exactly or are they rounded to some > > less fine-grained control number? Thanks, >=20 > The current support has a limited number of settings for the tx power. > I don't recall how many there are but it's chip dependent and possibly > also frequency-specific. 5212 parts are capable of controlling txpower > on a per-packet basis but getting it "right" has proven very hard and is > not yet supported. >=20 > Sam > From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 23:21: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 CA0B616A41F; Thu, 11 Aug 2005 23:21:02 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7825643D58; Thu, 11 Aug 2005 23:21:02 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by mail.ambrisko.com with ESMTP; 11 Aug 2005 16:21:02 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.12.11/8.12.9) with ESMTP id j7BNL27p001304; Thu, 11 Aug 2005 16:21:02 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.12.11/8.12.11/Submit) id j7BNL2rf001303; Thu, 11 Aug 2005 16:21:02 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200508112321.j7BNL2rf001303@ambrisko.com> In-Reply-To: <200508051101.33927.jhb@FreeBSD.org> To: John Baldwin Date: Thu, 11 Aug 2005 16:21:02 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: freebsd-hackers@freebsd.org, Dan Nelson Subject: Re: Checking sysctl values from within the kernel. 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, 11 Aug 2005 23:21:02 -0000 John Baldwin writes: | On Friday 05 August 2005 10:50 am, Dan Nelson wrote: | > In the last episode (Aug 05), Thordur I. Bjornsson said: | > > If I want to check a sysctl value from within the kernel (e.g. an | > > KLD), should I use the system calls described in sysctl(3) ? | > > | > > If not, what is the propper way to do so ? | > | > Since most sysctls are direct mappings onto integer variables in the | > kernel, just check the variable directly. | | There's also a kernel_sysctl() function available in the kernel for in-kernel | access to sysctls. You might have to lookup the OID for a given name | yourself though. Actually, there's a kernel_sysctlbyname() as well. This could be a fragile interface though. I used this scheme to do "soft-linking" between modules that could be kldloaded into the kernel or static. We called it several times every few seconds. Over time the system would wedge on a setjmp or something like that. We changed it to a function call since in a static kernel then the problem went away. Doug A. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 00:42:59 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 C852B16A41F for ; Fri, 12 Aug 2005 00:42:59 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 948FD43D53 for ; Fri, 12 Aug 2005 00:42:58 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j7C0gtum016717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 11 Aug 2005 17:42:55 -0700 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.8/Submit) id j7C0gs5h016714 for freebsd-hackers@freebsd.org; Thu, 11 Aug 2005 17:42:54 -0700 Date: Thu, 11 Aug 2005 17:42:54 -0700 From: "Loren M. Lang" To: FreeBSD Hackers Message-ID: <20050812004254.GA16614@alzatex.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C Subject: PXE Boot FreeBSD with Etherboot 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, 12 Aug 2005 00:42:59 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable It seems there are some problems with using pxeboot in combination with the network boot code from the etherboot project. I have tried many combinations of options with no success. The result is very similar to the following photo I found: http://photos.night-shade.org.uk/photo.php?photo=3D6364 I have tried it both on my local machine and in vmware with the same result. It seems that somehow etherboot is not setting up the environment the way pxeboot expects it too. Now the native pxe boot code in vmware does load pxeboot correctly and I have successfully booted freebsd in vmware, however I can't get the pxe boot code on my network card to load at all, hence my need for etherboot. Also, both pxeboot from FreeBSD 4.11 and 6.0-BETA2 crash the same way. I'm assuming this is really a bug in etherboot, but I'm not sure how to get a crash dump to play with. With vmware, it seems like I should be able to save a memory image to examine, but I'm not sure how to do that. Any ideas on a fix for this? --=20 I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 =20 --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC+/CObTXoRwEYo9IRAjQRAJ9bdPH1h1Zr6oOFZ4Z37R4dsLzaoQCfbMuE K+PLvJuq8SinEVZ7mHaBIcs= =JoT9 -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 01:50: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 1655A16A420 for ; Fri, 12 Aug 2005 01:50:19 +0000 (GMT) (envelope-from winter@jurai.net) Received: from sasami.jurai.net (sasami.jurai.net [69.17.104.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58C6E43D53 for ; Fri, 12 Aug 2005 01:50:14 +0000 (GMT) (envelope-from winter@jurai.net) Received: from sasami.jurai.net (winter@sasami.jurai.net [69.17.104.113]) by sasami.jurai.net (8.13.1/8.13.1) with ESMTP id j7C1nrvu044574; Thu, 11 Aug 2005 21:49:55 -0400 (EDT) (envelope-from winter@jurai.net) Date: Thu, 11 Aug 2005 21:49:52 -0400 (EDT) From: "Matthew N. Dodd" To: Julian Elischer In-Reply-To: <42FBC017.6050000@elischer.org> Message-ID: <20050811214919.B59089@sasami.jurai.net> References: <200508111813.j7BIDeFP055360@sora.hank.home> <42FBC017.6050000@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (sasami.jurai.net [69.17.104.113]); Thu, 11 Aug 2005 21:49:56 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, Sergey Uvarov , Dirk GOUDERS Subject: Re: preferable way to control kernel 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: Fri, 12 Aug 2005 01:50:19 -0000 On Thu, 11 Aug 2005, Julian Elischer wrote: > In the past, I've used a sysctl to communicate out the syscall number. > > you only need to do the syscall once, > and it confirms to the program that the syscall is correctly installed. Why not just use a sysctl period? Think of it as "syscall by name". -- 10 40 80 C0 00 FF FF FF FF C0 00 00 00 00 10 AA AA 03 00 00 00 08 00 From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 06:31:29 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 AE26716A41F for ; Fri, 12 Aug 2005 06:31:29 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37D8343D48 for ; Fri, 12 Aug 2005 06:31:28 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id 23D108B753; Fri, 12 Aug 2005 08:31:27 +0200 (CEST) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26802-08; Fri, 12 Aug 2005 08:31:22 +0200 (CEST) Received: from firewall.demig (p5083ACB4.dip0.t-ipconnect.de [80.131.172.180]) by server.absolute-media.de (Postfix) with ESMTP id 4A2098B3B3; Fri, 12 Aug 2005 08:31:22 +0200 (CEST) Received: from ws-ew-3 (ws-ew-3.w2kdemig [192.168.1.72]) by firewall.demig (8.13.4/8.13.4) with SMTP id j7C6QlNw009860; Fri, 12 Aug 2005 08:26:47 +0200 (CEST) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: "Loren M. Lang" , "FreeBSD Hackers" Date: Fri, 12 Aug 2005 08:26:47 +0200 Message-ID: <000401c59f06$d0fa1e40$4801a8c0@ws-ew-3.W2KDEMIG> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Importance: Normal In-Reply-To: <20050812004254.GA16614@alzatex.com> X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Cc: Subject: RE: PXE Boot FreeBSD with Etherboot 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, 12 Aug 2005 06:31:29 -0000 > It seems there are some problems with using pxeboot in combination with > the network boot code from the etherboot project. I have tried many > combinations of options with no success. The result is very similar to > the following photo I found: > > http://photos.night-shade.org.uk/photo.php?photo=6364 > > I have tried it both on my local machine and in vmware with the same > result. It seems that somehow etherboot is not setting up the > environment the way pxeboot expects it too. Now the native pxe boot > code in vmware does load pxeboot correctly and I have successfully > booted freebsd in vmware, however I can't get the pxe boot code on my > network card to load at all, hence my need for etherboot. Also, both > pxeboot from FreeBSD 4.11 and 6.0-BETA2 crash the same way. I'm > assuming this is really a bug in etherboot, but I'm not sure how to get > a crash dump to play with. With vmware, it seems like I should be able > to save a memory image to examine, but I'm not sure how to do that. > Any ideas on a fix for this? Just my experience. I never handled to successfully pxeboot FreeBSD. Norbert From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 07:03:20 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 A9EF716A42C; Fri, 12 Aug 2005 07:03:20 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BA8043D45; Fri, 12 Aug 2005 07:03:19 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix3-1.free.fr (Postfix) with ESMTP id 442D11734AC; Fri, 12 Aug 2005 09:03:18 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 48681405B; Fri, 12 Aug 2005 09:03:28 +0200 (CEST) Date: Fri, 12 Aug 2005 09:03:28 +0200 From: Jeremie Le Hen To: "M. Warner Losh" Message-ID: <20050812070328.GA45385@obiwan.tataz.chchile.org> References: <20050811.104604.61335403.imp@bsdimp.com> <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com> <20050811.135147.21959222.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050811.135147.21959222.imp@bsdimp.com> User-Agent: Mutt/1.5.9i Cc: hackers@FreeBSD.org, dnelson@allantgroup.com, nork@FreeBSD.org, ume@FreeBSD.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 12 Aug 2005 07:03:20 -0000 Hi Warner, Norikatsu-san, > : Linuxpluginwrapper(LPW) is a most famous killer application > : of libmap.conf(5)! (I think:-) > > Definitely. While threading games are interesting, the linux plugin > wrapper definitely is much more useful. Why don't import this in base system and wrap it in a user friendly tool ? Some kind of advanced Linux compatibility. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 07:26:29 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 D1D4B16A41F for ; Fri, 12 Aug 2005 07:26:29 +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 6280E43D45 for ; Fri, 12 Aug 2005 07:26:29 +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 1E3Tvw-000AOz-2v; Fri, 12 Aug 2005 10:26:28 +0300 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: "Norbert Koch" In-Reply-To: Message from "Norbert Koch" of "Fri, 12 Aug 2005 08:26:47 +0200." <000401c59f06$d0fa1e40$4801a8c0@ws-ew-3.W2KDEMIG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 12 Aug 2005 10:26:28 +0300 From: Danny Braniss Message-ID: Cc: FreeBSD Hackers , "Loren M. Lang" Subject: Re: PXE Boot FreeBSD with Etherboot 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, 12 Aug 2005 07:26:30 -0000 > > It seems there are some problems with using pxeboot in combination with > > the network boot code from the etherboot project. I have tried many > > combinations of options with no success. The result is very similar to > > the following photo I found: > > > > http://photos.night-shade.org.uk/photo.php?photo=6364 > > > > I have tried it both on my local machine and in vmware with the same > > result. It seems that somehow etherboot is not setting up the > > environment the way pxeboot expects it too. Now the native pxe boot > > code in vmware does load pxeboot correctly and I have successfully > > booted freebsd in vmware, however I can't get the pxe boot code on my > > network card to load at all, hence my need for etherboot. Also, both > > pxeboot from FreeBSD 4.11 and 6.0-BETA2 crash the same way. I'm > > assuming this is really a bug in etherboot, but I'm not sure how to get > > a crash dump to play with. With vmware, it seems like I should be able > > to save a memory image to examine, but I'm not sure how to do that. > > Any ideas on a fix for this? > > Just my experience. I never handled to successfully pxeboot FreeBSD. pxeboot works fine! i have some 50 hosts pxeboot'ing that say so. it's etherboot loading pxeboot that does not work. danny From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 08:31:28 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 C334C16A41F for ; Fri, 12 Aug 2005 08:31:28 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B62543D48 for ; Fri, 12 Aug 2005 08:31:27 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id 0C97A8B112; Fri, 12 Aug 2005 10:31:26 +0200 (CEST) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00855-06; Fri, 12 Aug 2005 10:31:22 +0200 (CEST) Received: from firewall.demig (p5083ACB4.dip0.t-ipconnect.de [80.131.172.180]) by server.absolute-media.de (Postfix) with ESMTP id 2FEA98B637; Fri, 12 Aug 2005 10:31:22 +0200 (CEST) Received: from ws-ew-3 (ws-ew-3.w2kdemig [192.168.1.72]) by firewall.demig (8.13.4/8.13.4) with SMTP id j7C8U6UC012001; Fri, 12 Aug 2005 10:30:06 +0200 (CEST) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: "Danny Braniss" Date: Fri, 12 Aug 2005 10:30:05 +0200 Message-ID: <000401c59f18$0a938a40$4801a8c0@ws-ew-3.W2KDEMIG> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 In-Reply-To: X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Cc: FreeBSD Hackers , "Loren M. Lang" Subject: RE: PXE Boot FreeBSD with Etherboot 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, 12 Aug 2005 08:31:28 -0000 > > > It seems there are some problems with using pxeboot in > combination with > > > the network boot code from the etherboot project. I have tried many > > > combinations of options with no success. The result is very > similar to > > > the following photo I found: > > > > > > http://photos.night-shade.org.uk/photo.php?photo=6364 > > > > > > I have tried it both on my local machine and in vmware with the same > > > result. It seems that somehow etherboot is not setting up the > > > environment the way pxeboot expects it too. Now the native pxe boot > > > code in vmware does load pxeboot correctly and I have successfully > > > booted freebsd in vmware, however I can't get the pxe boot code on my > > > network card to load at all, hence my need for etherboot. Also, both > > > pxeboot from FreeBSD 4.11 and 6.0-BETA2 crash the same way. I'm > > > assuming this is really a bug in etherboot, but I'm not sure > how to get > > > a crash dump to play with. With vmware, it seems like I > should be able > > > to save a memory image to examine, but I'm not sure how to do that. > > > Any ideas on a fix for this? > > > > Just my experience. I never handled to successfully pxeboot FreeBSD. > > pxeboot works fine! i have some 50 hosts pxeboot'ing that say so. > > it's etherboot loading pxeboot that does not work. I did not try etherboot. I tried a pc104 board with bios's internal pxe function for the integrated intel 82551/9er chip. And it is reported that e.g. linux boots successfully on these boards. I manage to boot from disk with etherboot (5.2.4), but not using pxe. Norbert From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 08:54: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 AFB7116A420 for ; Fri, 12 Aug 2005 08:54:21 +0000 (GMT) (envelope-from jumbler.chi@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id E24A143D48 for ; Fri, 12 Aug 2005 08:54:20 +0000 (GMT) (envelope-from jumbler.chi@gmail.com) Received: by wproxy.gmail.com with SMTP id 36so141031wri for ; Fri, 12 Aug 2005 01:54:20 -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=BjsamvHrvTFKkuW2orCukkgWTl54pT9gCUe35HUVQMFgHSuu90DmD3K30v8GQtLLY/gOYfl1CVQskyiWo3YlUgkUvZ86DrguzOiEteEwOwtMS3RhHOxmPfFtFUpPuYr1h+5QLlsRiPkZ3R2rLrhwBZJ1jBpmH4roXwEMI5VrdE0= Received: by 10.54.19.46 with SMTP id 46mr61554wrs; Fri, 12 Aug 2005 01:54:20 -0700 (PDT) Received: by 10.54.19.44 with HTTP; Fri, 12 Aug 2005 01:54:20 -0700 (PDT) Message-ID: Date: Fri, 12 Aug 2005 16:54:20 +0800 From: jumbler chi To: freebsd-questions@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 Cc: Subject: Diskless on FreeBSD 5.4-stable 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, 12 Aug 2005 08:54:21 -0000 hi : Anyone install and configure successfully on FreeBSD 5.x ?! I referenced the handbook of FreeBSD :http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-diskless= .html then my installation step as: 1. clone whole system via 'clone_root' script. ( /usr/share/examples/diskless/clone_root ) 2. install isc-dhcp3-server port , and configure the dhcpd.conf=20 3. setup TFTP service and NFS service both. 4. get etherboot Image file via following web site, and 'dd' this image to floppy disk. http://rom-o-matic.net/5.2.6/build.php?version=3D5.2.6&F=3D&arch=3Di386&nic= =3Dvia-rhine%3Adlink-530tx+--+%5B0x1106%2C0x3065%5D&ofmt=3DFloppy+bootable+= ROM+Image+%28.zdsk%29&A=3DConfigure ( since the remote machine's network card isn't Intel , is VIA-Rhine VT3043 . so it can't boot via PXE. ) 5. Finally, I booted the remote machine via this floppy . then I saw nothing in remote machine. why ?! Did I miss something else ?! if the network has another dhcp server , whether it will impact ?! BTW, I re-configure the etherboot image with=20 ALTERNATE_DHCP_PORTS_1067_1068 option, it still can't work .=20 Regards! Jumbler From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 09:09: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 30C7216A41F for ; Fri, 12 Aug 2005 09:09:22 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AC2F43D45 for ; Fri, 12 Aug 2005 09:09:21 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j7C98sum022397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Aug 2005 02:08:54 -0700 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.8/Submit) id j7C98s2q022390; Fri, 12 Aug 2005 02:08:54 -0700 Date: Fri, 12 Aug 2005 02:08:54 -0700 From: "Loren M. Lang" To: Danny Braniss Message-ID: <20050812090854.GA16790@alzatex.com> References: <000401c59f06$d0fa1e40$4801a8c0@ws-ew-3.W2KDEMIG> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C Cc: Norbert Koch , FreeBSD Hackers , "Loren M. Lang" Subject: Re: PXE Boot FreeBSD with Etherboot 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, 12 Aug 2005 09:09:22 -0000 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 12, 2005 at 10:26:28AM +0300, Danny Braniss wrote: > > > It seems there are some problems with using pxeboot in combination wi= th > > > the network boot code from the etherboot project. I have tried many > > > combinations of options with no success. The result is very similar = to > > > the following photo I found: > > >=20 > > > http://photos.night-shade.org.uk/photo.php?photo=3D6364 > > >=20 > > > I have tried it both on my local machine and in vmware with the same > > > result. It seems that somehow etherboot is not setting up the > > > environment the way pxeboot expects it too. Now the native pxe boot > > > code in vmware does load pxeboot correctly and I have successfully > > > booted freebsd in vmware, however I can't get the pxe boot code on my > > > network card to load at all, hence my need for etherboot. Also, both > > > pxeboot from FreeBSD 4.11 and 6.0-BETA2 crash the same way. I'm > > > assuming this is really a bug in etherboot, but I'm not sure how to g= et > > > a crash dump to play with. With vmware, it seems like I should be ab= le > > > to save a memory image to examine, but I'm not sure how to do that. > > > Any ideas on a fix for this? > >=20 > > Just my experience. I never handled to successfully pxeboot FreeBSD. >=20 > pxeboot works fine! i have some 50 hosts pxeboot'ing that say so. >=20 > it's etherboot loading pxeboot that does not work. I do believe that the bugs in etherboot, and it should be fixed, but there may also be a workaround that could be added to pxeboot to make it work until etherboot is fixed. Now etherboot loading pxelinux has always worked find. pxelinux then uses the pxe environment to load it's configuration environment, plus your choice of a tagged kernel so it should have what it takes to load freebsd, even if it's not compliant with the spec. If I could just find a way to get a dump of the environment of etherboot+pxeboot, either using vmware or my pc, I think that would be the best clue as to the problem in etherboot. >=20 > danny >=20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >=20 --=20 I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 =20 --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC/GclbTXoRwEYo9IRApDzAJ9jgobSBtSBcW/X9bYMYCkGmvxsrgCfU8W2 Lq0EQfBjwZkY1VPdLJJSGQk= =h2h4 -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62-- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 09:29: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 B4A2916A41F for ; Fri, 12 Aug 2005 09:29:30 +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 402BB43D48 for ; Fri, 12 Aug 2005 09:29:30 +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 1E3Vqy-000CTa-6v; Fri, 12 Aug 2005 12:29:28 +0300 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: "Loren M. Lang" In-Reply-To: Message from "Loren M. Lang" of "Fri, 12 Aug 2005 02:08:54 PDT." <20050812090854.GA16790@alzatex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 12 Aug 2005 12:29:27 +0300 From: Danny Braniss Message-ID: Cc: Norbert Koch , FreeBSD Hackers Subject: Re: PXE Boot FreeBSD with Etherboot 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, 12 Aug 2005 09:29:30 -0000 > > --+QahgC5+KEYLbs62 > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Fri, Aug 12, 2005 at 10:26:28AM +0300, Danny Braniss wrote: > > > > It seems there are some problems with using pxeboot in combination wi= > th > > > > the network boot code from the etherboot project. I have tried many > > > > combinations of options with no success. The result is very similar = > to > > > > the following photo I found: > > > >=20 > > > > http://photos.night-shade.org.uk/photo.php?photo=3D6364 > > > >=20 > > > > I have tried it both on my local machine and in vmware with the same > > > > result. It seems that somehow etherboot is not setting up the > > > > environment the way pxeboot expects it too. Now the native pxe boot > > > > code in vmware does load pxeboot correctly and I have successfully > > > > booted freebsd in vmware, however I can't get the pxe boot code on my > > > > network card to load at all, hence my need for etherboot. Also, both > > > > pxeboot from FreeBSD 4.11 and 6.0-BETA2 crash the same way. I'm > > > > assuming this is really a bug in etherboot, but I'm not sure how to g= > et > > > > a crash dump to play with. With vmware, it seems like I should be ab= > le > > > > to save a memory image to examine, but I'm not sure how to do that. > > > > Any ideas on a fix for this? > > >=20 > > > Just my experience. I never handled to successfully pxeboot FreeBSD. > >=20 > > pxeboot works fine! i have some 50 hosts pxeboot'ing that say so. > >=20 > > it's etherboot loading pxeboot that does not work. > > I do believe that the bugs in etherboot, and it should be fixed, but > there may also be a workaround that could be added to pxeboot to make it > work until etherboot is fixed. Now etherboot loading pxelinux has > always worked find. pxelinux then uses the pxe environment to load it's > configuration environment, plus your choice of a tagged kernel so it > should have what it takes to load freebsd, even if it's not compliant > with the spec. If I could just find a way to get a dump of the > environment of etherboot+pxeboot, either using vmware or my pc, I think > that would be the best clue as to the problem in etherboot. in my case it was etherboot which i couldn't get to work (it is a National something or other on a PCengine) danny From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 19:18: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 A2F3016A41F for ; Thu, 11 Aug 2005 19:18:21 +0000 (GMT) (envelope-from alex@complete-systems.net) Received: from atlantis.complete-systems.net (foxybanana.com [66.240.239.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62D7543D46 for ; Thu, 11 Aug 2005 19:18:21 +0000 (GMT) (envelope-from alex@complete-systems.net) Received: from localhost (localhost [127.0.0.1]) by atlantis.complete-systems.net (Postfix) with ESMTP id C9DE11461CA for ; Thu, 11 Aug 2005 12:18:20 -0700 (PDT) Received: from atlantis.complete-systems.net ([127.0.0.1]) by localhost (atlantis [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01554-05 for ; Thu, 11 Aug 2005 12:18:15 -0700 (PDT) Received: by atlantis.complete-systems.net (Postfix, from userid 503) id 28BC71461CE; Thu, 11 Aug 2005 12:18:14 -0700 (PDT) Date: Thu, 11 Aug 2005 12:18:14 -0700 From: Alexander Botero-Lowry To: freebsd-hackers@freebsd.org Message-ID: <20050811191814.GA4678@atlantis.foxybanana.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: amavisd-new at foxybanana.com X-Mailman-Approved-At: Fri, 12 Aug 2005 11:59:47 +0000 Subject: some rc.d cleanup 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, 11 Aug 2005 19:18:21 -0000 I've bene working on making src/sbin/chkconfig from NetBSD a more complete clone of chkconfig from IRIX as well as making it work on FreeBSD. In this task I have run into some nasty bugs in the implementation of some rc.d scripts in FreeBSD. Some of these bugs are minor, some are not. cleanvar and cleartmp are the worst culprits. These scripts if executed with the argument rcvar (which should only return the configuration value for the script) execute rm on a bunch of files. This action should only happen when the switch start is passed. abi also writes text outside of its start functions, which can be messy. I have a patch for cleartmp (breaking the x11 part of it out into a seperate file that is run by default) and a half patch for abi at: http://alex.complete-systems.net/freebsd-rc.d.patch /etc/rc.d/power_profile is also an issue. It's not a real rc.d script and therefore should not be in /etc/rc.d. Thanks, Alex Please CC as I am off list. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 09: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 8BDFA16A41F for ; Fri, 12 Aug 2005 09:02:25 +0000 (GMT) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (prime.gushi.org [65.125.228.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FA8343D45 for ; Fri, 12 Aug 2005 09:02:23 +0000 (GMT) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (danm@localhost.gushi.org [127.0.0.1]) by prime.gushi.org (8.13.4/8.13.4) with ESMTP id j7C97DFl096832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 12 Aug 2005 05:07:13 -0400 (EDT) Received: (from danm@localhost) by prime.gushi.org (8.13.4/8.13.4/Submit) id j7C97DLW096831; Fri, 12 Aug 2005 05:07:13 -0400 (EDT) Date: Fri, 12 Aug 2005 05:07:13 -0400 (EDT) From: "Dan Mahoney, System Admin" To: hackers@freebsd.org Message-ID: <20050812042749.H87994@prime.gushi.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 12 Aug 2005 11:59:47 +0000 Cc: Subject: 5.4 -- bridging, ipfw, dot1q 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, 12 Aug 2005 09:02:25 -0000 Note: I posted this to questions@ earlier, but upon further investigation of the issue, I realize that I basically need a "hack". Warning, long. My original question: [begin] I'm setting up a bridging firewall where the packets are passing through on dot1q trunks. Figure sixty or so. Too many to create separate interfaces. The bridge works. Packet counts in the default match rule work (so I assume the bridge at least sees the packets). Problem is, any "reasonable" rules (such as those which actually say to block traffic by ip or port or anything) aren't working at all. Not even logging counts. Setting the "bridged" flag doesn't seem to help. My only guess is that ipfw doesn't have the brains to look beyond the VLAN tags. Is this the case? Is this supported under 4.x (I'm using 5, but can downgrade), or is there any way AT ALL that I can get this to work? As a note, snort and trafshow and everything else work fine analyzing the bridge traffic, it seems only the kernel has an issue. [end] Now my plea to hackers@: >From what I can see, the packet type is mac, and that's the only rules that match. I'm not 100 percent sure if this is because of the point at which this is being received, or because of the dot1q headers. I have to assume it's the headers because, well, otherwise putting ipfw on a bridge would seem pretty silly to me. I basically need minor mods done to the kernel code so that dot1q trunked traffic seen through a bridge is seen by ipfw rules (and matched by the same)... I basically assume this doesn't work because of this post made by Ted Middelstadt a couple years ago http://groups-beta.google.com/group/mailing.freebsd.questions/browse_frm/thread/79d023785ddc58ed/4e280a013b6325d4?tvc=1&q=vlan+trunk+ipfw+bridge+ted&hl=en#4e280a013b6325d4 Of course, he says this: The biggest loss of NOT having an Ethernet-specific ipfw-like filtering program, is that there's no convenient vehicle to use for adding in code for filtering based on MAC addresses, which is certainly the domain of a bridge. And ipfw2 basically addresses this. This is what I see on my bridged packets with log: Aug 11 23:38:43 fwi kernel: ipfw: 360 Accept MAC in via em1 I've tried every possible combination of arguments to ipfw which seem to match. None are hitting: 00305 0 0 count ip from any to 56.199.242.178 layer2 mac-type 0x8100 00305 0 0 count ip from any to 56.199.242.178 mac-type 0x8100 00305 0 0 count ip from any to 56.199.242.178 mac-type 0x8100 00305 0 0 count ip from any to 56.199.242.178 mac-type 0x8100 via em1 00305 0 0 count ip from any to 56.199.242.82 mac-type 0x8100 via em1 00305 0 0 count ip from any to 56.199.242.82 layer2 mac-type 0x If this is possible with standard vanilla bridging and standard ipfw, please let me know, of course. I'm guessing dot1q encapsulated traffic just doesn't match this. I can match traffic with an "any to any mac-type vlan" or an "any to any layer2" rule. But I think I can't match on more specific criteria (like an IP address) because the ipfw layer sees it as non-ip traffic, and doesn't even attempt to match it (even though I'm telling it specifically to do so), so it falls into the "silently passed" portion. I don't know c. And this is a bad time and place to learn. The kernel code is also fairly streamlined, and I *really* don't have the time to learn structures and the like. It's on my long-term to-do list, I swear. Otherwise, I'm relatively sure this is less than an hour's worth of work, please someone let me know what it's worth to you and I'll make it happen. (While I'lll be happy with a quick hack, this really is something that should probably at least have a sysctl or hooks in ipfw or something -- assuming anyone else finds it useful). Thanks, Dan Mahoney -- "We need another cat. This one's retarded." -Cali, March 8, 2003 (3:43 AM) --------Dan Mahoney-------- Techie, Sysadmin, WebGeek Gushi on efnet/undernet IRC ICQ: 13735144 AIM: LarpGM Site: http://www.gushi.org --------------------------- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 12:33:55 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 D3F6216A41F for ; Fri, 12 Aug 2005 12:33:55 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EDBB43D46 for ; Fri, 12 Aug 2005 12:33:54 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.171] (dhcp-171-171.centtech.com [10.177.171.171]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id j7CCXmvd062362; Fri, 12 Aug 2005 07:33:49 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <42FC9740.3060609@centtech.com> Date: Fri, 12 Aug 2005 07:34:08 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.10) Gecko/20050809 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ivan Voras References: <20050803183010.X32344@geri.cc.fer.hr> In-Reply-To: <20050803183010.X32344@geri.cc.fer.hr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: gjournal public alpha release 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, 12 Aug 2005 12:33:55 -0000 Ivan Voras wrote: > Hi! > > I'm announcing the first public version of the gjournal GEOM class :) > The code is here: http://ivoras.sharanet.org/gjournal.tgz, together with > a README file (reproduced below). > > I'd like to hear as many testing and bug reports as possible :) [..snip..] Bug report: /dev/md0 is a mdconfig'ed 3gb drive sitting atop an IDE disk. md1 is a mdconfiged mmap'ed disk for the journal. bash-2.05b# ./gjournal label testjournal /dev/md0 /dev/md1 **Number of arguments: 3 bash-2.05b# dmesg GEOM_JOURNAL[0]: Creating device testjournal (id=3733383246). GEOM_JOURNAL[0]: Device testjournal created (id=3733383246). GEOM_JOURNAL[0]: Worker thread for testjournal created GEOM_JOURNAL[0]: Adding disk md0 to testjournal. GEOM_JOURNAL[0]: Disk md0 attached to testjournal (data). GEOM_JOURNAL[0]: Adding disk md1 to testjournal. GEOM_JOURNAL[0]: Disk md1 attached to testjournal (journal). GEOM_JOURNAL[0]: Device testjournal activated. malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following non-sleepable locks held: exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ g_journal.c:748 KDB: stack backtrace: kdb_backtrace(1,b82ed800,c21d5b40,3e7,e4147be8) at kdb_backtrace+0x29 witness_warn(5,0,c0871275,c298d39c,b82ed800) at witness_warn+0x18e uma_zalloc_arg(c21d5b40,0,2,b7fd4a00,0) at uma_zalloc_arg+0x41 hl_find_interval(c5293000,b82ed800,0,200,c28ad978) at hl_find_interval+0xbd g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at g_journal_journal_read+0x47 g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at g_journal_worker+0x9b2 fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following non-sleepable locks held: exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ g_journal.c:748 KDB: stack backtrace: kdb_backtrace(1,0,c21d5b40,1,e4147be8) at kdb_backtrace+0x29 witness_warn(5,0,c0871275,c298d39c,0) at witness_warn+0x18e uma_zalloc_arg(c21d5b40,0,2,0,0) at uma_zalloc_arg+0x41 hl_find_interval(c5293000,0,0,200,c28ad978) at hl_find_interval+0xbd g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at g_journal_journal_read+0x47 g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at g_journal_worker+0x9b2 fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following non-sleepable locks held: exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ g_journal.c:748 KDB: stack backtrace: kdb_backtrace(1,200,c21d5b40,0,e4147be8) at kdb_backtrace+0x29 witness_warn(5,0,c0871275,c298d39c,200) at witness_warn+0x18e uma_zalloc_arg(c21d5b40,0,2,2f2600,0) at uma_zalloc_arg+0x41 hl_find_interval(c5293000,200,0,200,c28ad978) at hl_find_interval+0xbd g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at g_journal_journal_read+0x47 g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at g_journal_worker+0x9b2 fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following non-sleepable locks held: exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ g_journal.c:748 KDB: stack backtrace: kdb_backtrace(1,0,c21d5b40,1,e4147be8) at kdb_backtrace+0x29 witness_warn(5,0,c0871275,c298d39c,0) at witness_warn+0x18e uma_zalloc_arg(c21d5b40,0,2,0,0) at uma_zalloc_arg+0x41 hl_find_interval(c5293000,0,0,200,c28ad978) at hl_find_interval+0xbd g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at g_journal_journal_read+0x47 g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at g_journal_worker+0x9b2 fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following non-sleepable locks held: exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ g_journal.c:748 KDB: stack backtrace: kdb_backtrace(1,0,c21d5b40,1,e4147be8) at kdb_backtrace+0x29 witness_warn(5,0,c0871275,c298d39c,0) at witness_warn+0x18e uma_zalloc_arg(c21d5b40,0,2,0,0) at uma_zalloc_arg+0x41 hl_find_interval(c5293000,0,0,400,c28ad978) at hl_find_interval+0xbd g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at g_journal_journal_read+0x47 g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at g_journal_worker+0x9b2 fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following non-sleepable locks held: exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ g_journal.c:748 KDB: stack backtrace: kdb_backtrace(1,b82ed800,c21d5b40,3e7,e4147be8) at kdb_backtrace+0x29 witness_warn(5,0,c0871275,c298d39c,b82ed800) at witness_warn+0x18e uma_zalloc_arg(c21d5b40,0,2,b7fd4a00,0) at uma_zalloc_arg+0x41 hl_find_interval(c5293000,b82ed800,0,200,c28ad978) at hl_find_interval+0xbd g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at g_journal_journal_read+0x47 g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at g_journal_worker+0x9b2 fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 12:46:45 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 70A8516A41F for ; Fri, 12 Aug 2005 12:46:45 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EA9A43D53 for ; Fri, 12 Aug 2005 12:46:44 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.171] (dhcp-171-171.centtech.com [10.177.171.171]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id j7CCkfAp087141; Fri, 12 Aug 2005 07:46:41 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <42FC9A45.9000500@centtech.com> Date: Fri, 12 Aug 2005 07:47:01 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.10) Gecko/20050809 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <20050803183010.X32344@geri.cc.fer.hr> <42FC9740.3060609@centtech.com> In-Reply-To: <42FC9740.3060609@centtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.82/1011/Tue Aug 9 04:20:28 2005 on mh1.centtech.com X-Virus-Status: Clean Cc: hackers@freebsd.org, Ivan Voras Subject: Re: gjournal public alpha release 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, 12 Aug 2005 12:46:45 -0000 Eric Anderson wrote: > Ivan Voras wrote: > >> Hi! >> >> I'm announcing the first public version of the gjournal GEOM class :) >> The code is here: http://ivoras.sharanet.org/gjournal.tgz, together with >> a README file (reproduced below). >> >> I'd like to hear as many testing and bug reports as possible :) > > > [..snip..] > > Bug report: > > /dev/md0 is a mdconfig'ed 3gb drive sitting atop an IDE disk. md1 is a > mdconfiged mmap'ed disk for the journal. > > > bash-2.05b# ./gjournal label testjournal /dev/md0 /dev/md1 > **Number of arguments: 3 > bash-2.05b# dmesg > GEOM_JOURNAL[0]: Creating device testjournal (id=3733383246). > GEOM_JOURNAL[0]: Device testjournal created (id=3733383246). > GEOM_JOURNAL[0]: Worker thread for testjournal created > GEOM_JOURNAL[0]: Adding disk md0 to testjournal. > GEOM_JOURNAL[0]: Disk md0 attached to testjournal (data). > GEOM_JOURNAL[0]: Adding disk md1 to testjournal. > GEOM_JOURNAL[0]: Disk md1 attached to testjournal (journal). > GEOM_JOURNAL[0]: Device testjournal activated. > malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following > non-sleepable locks held: > exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ > g_journal.c:748 > KDB: stack backtrace: > kdb_backtrace(1,b82ed800,c21d5b40,3e7,e4147be8) at kdb_backtrace+0x29 > witness_warn(5,0,c0871275,c298d39c,b82ed800) at witness_warn+0x18e > uma_zalloc_arg(c21d5b40,0,2,b7fd4a00,0) at uma_zalloc_arg+0x41 > hl_find_interval(c5293000,b82ed800,0,200,c28ad978) at hl_find_interval+0xbd > g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at > g_journal_journal_read+0x47 > g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at > g_journal_worker+0x9b2 > fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- > malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following > non-sleepable locks held: > exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ > g_journal.c:748 > KDB: stack backtrace: > kdb_backtrace(1,0,c21d5b40,1,e4147be8) at kdb_backtrace+0x29 > witness_warn(5,0,c0871275,c298d39c,0) at witness_warn+0x18e > uma_zalloc_arg(c21d5b40,0,2,0,0) at uma_zalloc_arg+0x41 > hl_find_interval(c5293000,0,0,200,c28ad978) at hl_find_interval+0xbd > g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at > g_journal_journal_read+0x47 > g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at > g_journal_worker+0x9b2 > fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- > malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following > non-sleepable locks held: > exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ > g_journal.c:748 > KDB: stack backtrace: > kdb_backtrace(1,200,c21d5b40,0,e4147be8) at kdb_backtrace+0x29 > witness_warn(5,0,c0871275,c298d39c,200) at witness_warn+0x18e > uma_zalloc_arg(c21d5b40,0,2,2f2600,0) at uma_zalloc_arg+0x41 > hl_find_interval(c5293000,200,0,200,c28ad978) at hl_find_interval+0xbd > g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at > g_journal_journal_read+0x47 > g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at > g_journal_worker+0x9b2 > fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- > malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following > non-sleepable locks held: > exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ > g_journal.c:748 > KDB: stack backtrace: > kdb_backtrace(1,0,c21d5b40,1,e4147be8) at kdb_backtrace+0x29 > witness_warn(5,0,c0871275,c298d39c,0) at witness_warn+0x18e > uma_zalloc_arg(c21d5b40,0,2,0,0) at uma_zalloc_arg+0x41 > hl_find_interval(c5293000,0,0,200,c28ad978) at hl_find_interval+0xbd > g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at > g_journal_journal_read+0x47 > g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at > g_journal_worker+0x9b2 > fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- > malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following > non-sleepable locks held: > exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ > g_journal.c:748 > KDB: stack backtrace: > kdb_backtrace(1,0,c21d5b40,1,e4147be8) at kdb_backtrace+0x29 > witness_warn(5,0,c0871275,c298d39c,0) at witness_warn+0x18e > uma_zalloc_arg(c21d5b40,0,2,0,0) at uma_zalloc_arg+0x41 > hl_find_interval(c5293000,0,0,400,c28ad978) at hl_find_interval+0xbd > g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at > g_journal_journal_read+0x47 > g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at > g_journal_worker+0x9b2 > fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- > malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following > non-sleepable locks held: > exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ > g_journal.c:748 > KDB: stack backtrace: > kdb_backtrace(1,b82ed800,c21d5b40,3e7,e4147be8) at kdb_backtrace+0x29 > witness_warn(5,0,c0871275,c298d39c,b82ed800) at witness_warn+0x18e > uma_zalloc_arg(c21d5b40,0,2,b7fd4a00,0) at uma_zalloc_arg+0x41 > hl_find_interval(c5293000,b82ed800,0,200,c28ad978) at hl_find_interval+0xbd > g_journal_journal_read(c21a9a0c,c28ad948,0,152e5,5790b0f0) at > g_journal_journal_read+0x47 > g_journal_worker(c28ad900,e4147d38,c28ad900,c2989258,0) at > g_journal_worker+0x9b2 > fork_exit(c2989258,c28ad900,e4147d38) at fork_exit+0xa0 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xe4147d6c, ebp = 0 --- > > Not to mention once I have the /dev/journeled/testjournal mounted, I get a streaming spewage of those messages in /var/log/messages, which causes syslogd to crank to 99% CPU, and the performance to be horrible as you'd expect with no CPU to do anything. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 13:34:02 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 E187616A41F for ; Fri, 12 Aug 2005 13:34:02 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97C2543D46 for ; Fri, 12 Aug 2005 13:34:02 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j7CDY0bG014412; Fri, 12 Aug 2005 06:34:00 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j7CDXxpi014411; Fri, 12 Aug 2005 06:34:00 -0700 (PDT) (envelope-from rizzo) Date: Fri, 12 Aug 2005 06:33:59 -0700 From: Luigi Rizzo To: "Dan Mahoney, System Admin" Message-ID: <20050812063359.A14229@xorpc.icir.org> References: <20050812042749.H87994@prime.gushi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20050812042749.H87994@prime.gushi.org>; from danm@prime.gushi.org on Fri, Aug 12, 2005 at 05:07:13AM -0400 Cc: hackers@freebsd.org Subject: Re: 5.4 -- bridging, ipfw, dot1q 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, 12 Aug 2005 13:34:03 -0000 I am afraid the existing code cannot help you. The packets you see are encapsulated in 802.1q aka VLAN frames, and since ipfw2 does not try to decapsulate the packets, you don't get to see the IP headers. Your most reasonable option would be to write a new ipufw2 opcode, say something like 'vlan-decap x-y', which succeeds if the packet has a vlan header in the range x to y, and in this case skips the VLAN header, tries to re-parse the header fields as in the beginning of ip_fw_chk() after the section /* * Collect parameters into local variables for faster matching. */ and then continues. It's not a lot of code, in the worst case you can just cut&paste the relevant 50-60 lines from the beginning of the code (though of course it would be nice to rearrange the code to reduce duplication). By doing this you can do something like ipfw add skipto 1000 vlan-decap 1-50 and then process vlans 1 to 50 at line 1000. Maybe it is a good idea to split the vlan-id matching and the decapsulation. cheers luigi On Fri, Aug 12, 2005 at 05:07:13AM -0400, Dan Mahoney, System Admin wrote: > Note: I posted this to questions@ earlier, but upon further investigation > of the issue, I realize that I basically need a "hack". > > Warning, long. > > My original question: > > [begin] > > I'm setting up a bridging firewall where the packets are passing through > on dot1q trunks. Figure sixty or so. Too many to create separate > interfaces. > > The bridge works. Packet counts in the default match rule work (so I > assume the bridge at least sees the packets). > > Problem is, any "reasonable" rules (such as those which actually say to > block traffic by ip or port or anything) aren't working > at all. Not even logging counts. > > Setting the "bridged" flag doesn't seem to help. > > My only guess is that ipfw doesn't have the brains to look beyond the VLAN > tags. Is this the case? Is this supported under 4.x (I'm using 5, but > can downgrade), or is there any way AT ALL that I can get this to work? > > As a note, snort and trafshow and everything else work fine analyzing the > bridge traffic, it seems only the kernel has an issue. > > [end] > > Now my plea to hackers@: > > >From what I can see, the packet type is mac, and that's the only rules > that match. I'm not 100 percent sure if this is because of the point at > which this is being received, or because of the dot1q headers. I have to > assume it's the headers because, well, otherwise putting ipfw on a bridge > would seem pretty silly to me. > > I basically need minor mods done to the kernel code so that dot1q trunked > traffic seen through a bridge is seen by ipfw rules (and matched by the > same)... > > I basically assume this doesn't work because of this post made by Ted > Middelstadt a couple years ago > > http://groups-beta.google.com/group/mailing.freebsd.questions/browse_frm/thread/79d023785ddc58ed/4e280a013b6325d4?tvc=1&q=vlan+trunk+ipfw+bridge+ted&hl=en#4e280a013b6325d4 > > Of course, he says this: > > The biggest loss of NOT having an Ethernet-specific ipfw-like filtering > program, is that there's no convenient vehicle to use for adding in code > for filtering based on MAC addresses, which is certainly the domain of > a bridge. > > And ipfw2 basically addresses this. > > This is what I see on my bridged packets with log: > > Aug 11 23:38:43 fwi kernel: ipfw: 360 Accept MAC in via em1 > > I've tried every possible combination of arguments to ipfw which seem to > match. > None are hitting: > > 00305 0 0 count ip from any to 56.199.242.178 layer2 > mac-type 0x8100 > 00305 0 0 count ip from any to 56.199.242.178 mac-type > 0x8100 > 00305 0 0 count ip from any to 56.199.242.178 mac-type > 0x8100 > 00305 0 0 count ip from any to 56.199.242.178 mac-type > 0x8100 via em1 > 00305 0 0 count ip from any to 56.199.242.82 mac-type > 0x8100 via em1 > 00305 0 0 count ip from any to 56.199.242.82 layer2 > mac-type 0x > > If this is possible with standard vanilla bridging and standard ipfw, > please let me know, of course. I'm guessing dot1q encapsulated traffic > just doesn't match this. I can match traffic with an "any to any mac-type > vlan" or an "any to any layer2" rule. But I think I can't match on more > specific criteria (like an IP address) because the ipfw layer sees it as > non-ip traffic, and doesn't even attempt to match it (even though I'm > telling it specifically to do so), so it falls into the "silently passed" > portion. > > I don't know c. And this is a bad time and place to learn. The kernel > code is also fairly streamlined, and I *really* don't have the time to > learn structures and the like. It's on my long-term to-do list, I swear. > > Otherwise, I'm relatively sure this is less than an hour's worth of work, > please someone let me know what it's worth to you and I'll make it happen. > > (While I'lll be happy with a quick hack, this really is something that > should probably at least have a sysctl or hooks in ipfw or something -- > assuming anyone else finds it useful). > > Thanks, > > Dan Mahoney > > -- > > "We need another cat. This one's retarded." > > -Cali, March 8, 2003 (3:43 AM) > > --------Dan Mahoney-------- > Techie, Sysadmin, WebGeek > Gushi on efnet/undernet IRC > ICQ: 13735144 AIM: LarpGM > Site: http://www.gushi.org > --------------------------- > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 14:33: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 2BBF616A41F for ; Fri, 12 Aug 2005 14:33:16 +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 BD5D143D46 for ; Fri, 12 Aug 2005 14:33:15 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 12 Aug 2005 10:48:07 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 12 Aug 2005 10:33:52 -0400 User-Agent: KMail/1.8 References: <20050811191814.GA4678@atlantis.foxybanana.com> In-Reply-To: <20050811191814.GA4678@atlantis.foxybanana.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508121033.53671.jhb@FreeBSD.org> Cc: Alexander Botero-Lowry Subject: Re: some rc.d cleanup 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, 12 Aug 2005 14:33:16 -0000 On Thursday 11 August 2005 03:18 pm, Alexander Botero-Lowry wrote: > I've bene working on making src/sbin/chkconfig from NetBSD a more complete > clone of chkconfig from IRIX as well as making it work on FreeBSD. In this > task I have run into some nasty bugs in the implementation of some rc.d > scripts in FreeBSD. Some of these bugs are minor, some are not. cleanvar > and cleartmp are the worst culprits. These scripts if executed with the > argument rcvar (which should only return the configuration value for the > script) execute rm on a bunch of files. This action should only happen when > the switch start is passed. abi also writes text outside of its start > functions, which can be messy. I have a patch for cleartmp (breaking the > x11 part of it out into a seperate file that is run by default) and a half > patch for abi at: http://alex.complete-systems.net/freebsd-rc.d.patch > > /etc/rc.d/power_profile is also an issue. It's not a real rc.d script and > therefore should not be in /etc/rc.d. I'm guessing this part is extra: + if checkyesno ${rcvar}; then + echo "sysv" + else + echo "you suck" + fi in the abi script? :) Also, why not just move the extra rm commands in cleartmp up into the cleartmp_start() function instead of creating a whole separate script? I also don't understand why it matters that one use start_precmd instead of using echo in the foo_start() functions. -- 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 Aug 12 16:32: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 7C94F16A41F for ; Fri, 12 Aug 2005 16:32:26 +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 2125243D46 for ; Fri, 12 Aug 2005 16:32:26 +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 j7CGWDmF016527; Fri, 12 Aug 2005 09:32:13 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7CGWDfC016526; Fri, 12 Aug 2005 09:32:13 -0700 Date: Fri, 12 Aug 2005 09:32:13 -0700 From: Brooks Davis To: Norbert Koch Message-ID: <20050812163213.GC13376@odin.ac.hmc.edu> References: <000401c59f18$0a938a40$4801a8c0@ws-ew-3.W2KDEMIG> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline In-Reply-To: <000401c59f18$0a938a40$4801a8c0@ws-ew-3.W2KDEMIG> 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 , "Loren M. Lang" Subject: Re: PXE Boot FreeBSD with Etherboot 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, 12 Aug 2005 16:32:26 -0000 --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 12, 2005 at 10:30:05AM +0200, Norbert Koch wrote: > > > > It seems there are some problems with using pxeboot in=20 > > combination with > > > > the network boot code from the etherboot project. I have tried many > > > > combinations of options with no success. The result is very=20 > > similar to > > > > the following photo I found: > > > >=20 > > > > http://photos.night-shade.org.uk/photo.php?photo=3D6364 > > > >=20 > > > > I have tried it both on my local machine and in vmware with the same > > > > result. It seems that somehow etherboot is not setting up the > > > > environment the way pxeboot expects it too. Now the native pxe boot > > > > code in vmware does load pxeboot correctly and I have successfully > > > > booted freebsd in vmware, however I can't get the pxe boot code on = my > > > > network card to load at all, hence my need for etherboot. Also, bo= th > > > > pxeboot from FreeBSD 4.11 and 6.0-BETA2 crash the same way. I'm > > > > assuming this is really a bug in etherboot, but I'm not sure=20 > > how to get > > > > a crash dump to play with. With vmware, it seems like I=20 > > should be able > > > > to save a memory image to examine, but I'm not sure how to do that. > > > > Any ideas on a fix for this? > > >=20 > > > Just my experience. I never handled to successfully pxeboot FreeBSD. > >=20 > > pxeboot works fine! i have some 50 hosts pxeboot'ing that say so. > >=20 > > it's etherboot loading pxeboot that does not work. >=20 > I did not try etherboot. I tried a pc104 board with > bios's internal pxe function for the integrated intel 82551/9er chip. > And it is reported that e.g. linux boots successfully on these boards. > I manage to boot from disk with etherboot (5.2.4), but not using pxe. Some versions of the intel PXE support are broken and don't support the necessicary features for FreeBSD's pxeboot. The happen to support other methods, but are deficients. Upgrading the firmware on the chip can fix this. I've done it with fxp(4) cards in the past. -- 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 --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC/M8MXY6L6fI4GtQRAiJ5AJ4zmZD186s5YjQAoMIQjuQYlxOXQgCgtiyn RxfJZKfEDS6FLbjwraLt91s= =r90N -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu-- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 17:16:16 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 22ECA16A41F; Fri, 12 Aug 2005 17:16:16 +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 B588D43D46; Fri, 12 Aug 2005 17:16:15 +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 j7CHEhQO001075; Fri, 12 Aug 2005 11:14:44 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 12 Aug 2005 11:14:51 -0600 (MDT) Message-Id: <20050812.111451.115909154.imp@bsdimp.com> To: jeremie@le-hen.org From: "M. Warner Losh" In-Reply-To: <20050812070328.GA45385@obiwan.tataz.chchile.org> References: <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com> <20050811.135147.21959222.imp@bsdimp.com> <20050812070328.GA45385@obiwan.tataz.chchile.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, 12 Aug 2005 11:14:49 -0600 (MDT) Cc: hackers@FreeBSD.org, dnelson@allantgroup.com, nork@FreeBSD.org, ume@FreeBSD.org Subject: Re: Converting libfoo.so for linux to freebsd 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, 12 Aug 2005 17:16:16 -0000 In message: <20050812070328.GA45385@obiwan.tataz.chchile.org> Jeremie Le Hen writes: : Hi Warner, Norikatsu-san, : : > : Linuxpluginwrapper(LPW) is a most famous killer application : > : of libmap.conf(5)! (I think:-) : > : > Definitely. While threading games are interesting, the linux plugin : > wrapper definitely is much more useful. : : Why don't import this in base system and wrap it in a user friendly : tool ? Some kind of advanced Linux compatibility. The wrapper is specific for each library or plug-in that it wraps. It might be hard to generalize enough to warrant inclusion in the base... Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 18:41: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 CB76B16A41F for ; Fri, 12 Aug 2005 18:41:48 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 919C843D46 for ; Fri, 12 Aug 2005 18:41:48 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 07642208E71; Fri, 12 Aug 2005 11:41:48 -0700 (PDT) Received: from [192.168.2.2] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j7CIfkRa007676; Fri, 12 Aug 2005 11:41:47 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <42FCED67.7060506@elischer.org> Date: Fri, 12 Aug 2005 11:41:43 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Norbert Koch References: <000401c59f06$d0fa1e40$4801a8c0@ws-ew-3.W2KDEMIG> In-Reply-To: <000401c59f06$d0fa1e40$4801a8c0@ws-ew-3.W2KDEMIG> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers , "Loren M. Lang" Subject: Re: PXE Boot FreeBSD with Etherboot 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, 12 Aug 2005 18:41:48 -0000 Norbert Koch wrote: > > Just my experience. I never handled to successfully pxeboot FreeBSD. I have been completely successful with 4.8, 4.11, 5.4 and 6.0 using dhcpd and tftp(from inetd) and NFS for exporting the filesystem (i.e. the default setup) I've done it on Intel and IBM motherboards, and others with Intel NIC cards. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 19:51:35 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 3D3E916A41F for ; Fri, 12 Aug 2005 19:51:35 +0000 (GMT) (envelope-from igor@doom.homeunix.org) Received: from voodoo.oberon.net (voodoo.oberon.net [212.118.165.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id B563D43D46 for ; Fri, 12 Aug 2005 19:51:34 +0000 (GMT) (envelope-from igor@doom.homeunix.org) Received: from dialup84123-222.ip.peterstar.net ([84.204.123.222] helo=doom.homeunix.org) by voodoo.oberon.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.52 (FreeBSD)) id 1E3fYj-000AVR-NS for hackers@freebsd.org; Fri, 12 Aug 2005 21:51:30 +0200 Received: from doom.homeunix.org (localhost [127.0.0.1]) by doom.homeunix.org (8.13.3/8.13.3) with ESMTP id j7CJo1Qm074080 for ; Fri, 12 Aug 2005 23:50:32 +0400 (MSD) (envelope-from igor@doom.homeunix.org) Received: (from igor@localhost) by doom.homeunix.org (8.13.3/8.13.3/Submit) id j7CJnWJm074079 for hackers@freebsd.org; Fri, 12 Aug 2005 23:49:32 +0400 (MSD) (envelope-from igor) Date: Fri, 12 Aug 2005 23:49:27 +0400 From: Igor Pokrovsky To: hackers@freebsd.org Message-ID: <20050812194927.GA74052@doom.homeunix.org> Mail-Followup-To: hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Subject: perl's tie 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: Fri, 12 Aug 2005 19:51:35 -0000 Hi all, Consider the following except from a perl program: tie(%foodb, 'MLDBM', $BAR_FILE, O_CREAT | O_RDWR, 0666) or die("Cannot open $BAR_FILE: $!\n"); I expect it to create a new $BAR_FILE, if none existed, with 0666 permissions. But it doesn't. It creates a file with default umask specified permissions - 0644. So I have to manually do chmod on that file afterwards. Is there anything I don't understand? %uname -a FreeBSD doom.homeunix.org 4.11-STABLE FreeBSD 4.11-STABLE #0: Tue Jul 5 21:05:20 MSD 2005 [...] i386 Perl version is 5.8.7 Thanks, -ip -- Ignorance should be painful. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 20:31:44 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 6153116A41F; Fri, 12 Aug 2005 20:31:44 +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 E6A9043D45; Fri, 12 Aug 2005 20:31:43 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 12 Aug 2005 16:46:35 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 12 Aug 2005 16:32:12 -0400 User-Agent: KMail/1.8 References: <20050812194927.GA74052@doom.homeunix.org> In-Reply-To: <20050812194927.GA74052@doom.homeunix.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508121632.13436.jhb@FreeBSD.org> Cc: hackers@freebsd.org, Igor Pokrovsky Subject: Re: perl's tie 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: Fri, 12 Aug 2005 20:31:44 -0000 On Friday 12 August 2005 03:49 pm, Igor Pokrovsky wrote: > Hi all, > > Consider the following except from a perl program: > > tie(%foodb, 'MLDBM', $BAR_FILE, O_CREAT | O_RDWR, 0666) > or die("Cannot open $BAR_FILE: $!\n"); > > I expect it to create a new $BAR_FILE, if none existed, with 0666 > permissions. But it doesn't. It creates a file with default umask > specified permissions - 0644. So I have to manually do chmod on that > file afterwards. Is there anything I don't understand? > > %uname -a > FreeBSD doom.homeunix.org 4.11-STABLE FreeBSD 4.11-STABLE #0: > Tue Jul 5 21:05:20 MSD 2005 [...] i386 > > Perl version is 5.8.7 > > Thanks, > > -ip I think this is expected behavior. Your umask setting affects all calls to open(2) with O_CREAT to create a file, and from tie()'s arguments it seems that it uses open(2) to create the destination file. -- 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 Aug 12 20:31: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 6153116A41F; Fri, 12 Aug 2005 20:31:44 +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 E6A9043D45; Fri, 12 Aug 2005 20:31:43 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 12 Aug 2005 16:46:35 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 12 Aug 2005 16:32:12 -0400 User-Agent: KMail/1.8 References: <20050812194927.GA74052@doom.homeunix.org> In-Reply-To: <20050812194927.GA74052@doom.homeunix.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508121632.13436.jhb@FreeBSD.org> Cc: hackers@freebsd.org, Igor Pokrovsky Subject: Re: perl's tie 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: Fri, 12 Aug 2005 20:31:44 -0000 On Friday 12 August 2005 03:49 pm, Igor Pokrovsky wrote: > Hi all, > > Consider the following except from a perl program: > > tie(%foodb, 'MLDBM', $BAR_FILE, O_CREAT | O_RDWR, 0666) > or die("Cannot open $BAR_FILE: $!\n"); > > I expect it to create a new $BAR_FILE, if none existed, with 0666 > permissions. But it doesn't. It creates a file with default umask > specified permissions - 0644. So I have to manually do chmod on that > file afterwards. Is there anything I don't understand? > > %uname -a > FreeBSD doom.homeunix.org 4.11-STABLE FreeBSD 4.11-STABLE #0: > Tue Jul 5 21:05:20 MSD 2005 [...] i386 > > Perl version is 5.8.7 > > Thanks, > > -ip I think this is expected behavior. Your umask setting affects all calls to open(2) with O_CREAT to create a file, and from tie()'s arguments it seems that it uses open(2) to create the destination file. -- 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 Aug 12 20:34:54 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 4AA0F16A431 for ; Fri, 12 Aug 2005 20:34:54 +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 ECE9243D48 for ; Fri, 12 Aug 2005 20:34:53 +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 j7CKYp0I033830; Fri, 12 Aug 2005 13:34:51 -0700 (PDT) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.13.3/8.13.3/Submit) id j7CKYp2x033829; Fri, 12 Aug 2005 13:34:51 -0700 (PDT) (envelope-from steve) Message-Id: <200508122034.j7CKYp2x033829@wattres.watt.com> X-Newsgroups: local.freebsd-hackers In-Reply-To: <20050812194927.GA74052@doom.homeunix.org> Organization: Watt Consultants From: steve@Watt.COM (Steve Watt) Date: Fri, 12 Aug 2005 13:34:51 -0700 X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: ip@doom.homeunix.org X-Archived: 1123878891.847274086@wattres.Watt.COM X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on wattres.Watt.COM X-Virus-Status: Clean Cc: hackers@freebsd.org Subject: Re: perl's tie 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: Fri, 12 Aug 2005 20:34:54 -0000 In article <20050812194927.GA74052@doom.homeunix.org> you write: >Hi all, > >Consider the following except from a perl program: > >tie(%foodb, 'MLDBM', $BAR_FILE, O_CREAT | O_RDWR, 0666) > or die("Cannot open $BAR_FILE: $!\n"); > >I expect it to create a new $BAR_FILE, if none existed, with 0666 >permissions. But it doesn't. It creates a file with default umask >specified permissions - 0644. So I have to manually do chmod on that >file afterwards. Is there anything I don't understand? > >%uname -a >FreeBSD doom.homeunix.org 4.11-STABLE FreeBSD 4.11-STABLE #0: >Tue Jul 5 21:05:20 MSD 2005 [...] i386 umask applies after the open call's permissions, and is used to remove bits from the value passed in to the open. That's the way POSIX says it works, and that's how it works on UNIX machines. Down in the guts of the open() syscall, there's a line that effectively says file_permissions = passed_in_permissions & ~umask; It's working as designed. -- 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 Fri Aug 12 21:34:21 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 E676E16A41F for ; Fri, 12 Aug 2005 21:34:21 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F95B43D46 for ; Fri, 12 Aug 2005 21:34:21 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 662FB17003 for ; Fri, 12 Aug 2005 18:34:19 -0300 (BRT) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 92338-07 for ; Fri, 12 Aug 2005 18:34:15 -0300 (BRT) Received: from [10.0.0.15] (telco [201.8.56.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id 62B0E17007 for ; Fri, 12 Aug 2005 18:34:15 -0300 (BRT) Message-ID: <42FD15EA.8050500@jonny.eng.br> Date: Fri, 12 Aug 2005 18:34:34 -0300 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Luis?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAADBQ TFRFAAAAgAAAAIAAgIAAAACAgACAAICAgICAwMDA/wAAAP8A//8AAAD//wD/AP//////ex+xxAAA Ac9JREFUOMtdk8FupDAMhr1qRbjR2x77GD3uq7BS1TkuhyrmFnppcvOrUlUquXltJ2EAIw1Dvvz+ bRPgrQbU6NpzuY0AF1LABIc4AH9crxLwb/4VztEU42W9SOBezwX4ClzeLuC9PBFRq+2xpJJHN8KQ Oa9Hd/ACnldgUVADvgHKA2usVwW12BVSkrThJH+5lqqQXIAAvRkQM6WqkADpO5gBx5m5VOxRgBZV HRLRcgc4dv3ukbOBm3de8uHIe1n0BBUBIi4hi0U2ownGkkwrwN425ygVPjntsvOmkFyyXYfreHXq f1tugFLCFDhZcsffYIqxKNAB/FkNbBDslUTz0MMQfuRnkN6D5nLVQ0G2H3bWC6KByTZPZWhJ/jgs ChX3e/P5y0VReCUCYm0/pUQd1lQ4/aIty/YtW6y3WMHc8yazpcU8UuqqB+LfMql/wVx4kXNTwGQO PxTuL7+AhbSkWS4z0TdZFbo1BR6qQkA08DnogNNHey/SGc5GejqFttxhjBHd3rjd62nR08gnxeFr Ic2e52we+QC0rIg6KYn1AKQsbF3wcgAP00MZrZ6X0yc5v5TRXgTi/jtVwef5I6Y+J7kyb+d1eB6K 4LoOLphBW/8PdNW9dapKWXwAAAAASUVORK5CYII= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at coe.ufrj.br Cc: Subject: File create permissions, what am I missing? 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, 12 Aug 2005 21:34:22 -0000 In a directory with -rwxrwxrwx, any user can create files, but who should be the owner/group of this file? Long time ago in Unix history, the owner would be the user who created the file, and the group would be the users's primary group. Later, IIRC, if the directory group was one of the user's secondary groups, the file would also be from this group. A later modification defined that a setgid directory would effect in all files created belonging to the directory's user. Am I correct? But I have already tested 3 system, 2 with 5-stable and 1 with 4-stable, in which the created file inside a -rwxrwxrwx directory is created belonging to the directory's group, WITHOUT the setgid bit. What did I miss? From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 22:49: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 6626916A41F for ; Fri, 12 Aug 2005 22:49:47 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0996E43D45 for ; Fri, 12 Aug 2005 22:49:47 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix4-1.free.fr (Postfix) with ESMTP id B990F257C5B; Sat, 13 Aug 2005 00:49:45 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 06BA0405B; Sat, 13 Aug 2005 00:49:56 +0200 (CEST) Date: Sat, 13 Aug 2005 00:49:56 +0200 From: Jeremie Le Hen To: Luigi Rizzo Message-ID: <20050812224956.GG45385@obiwan.tataz.chchile.org> References: <20050812042749.H87994@prime.gushi.org> <20050812063359.A14229@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050812063359.A14229@xorpc.icir.org> User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org, "Dan Mahoney, System Admin" Subject: Re: 5.4 -- bridging, ipfw, dot1q 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, 12 Aug 2005 22:49:47 -0000 Hi, > I am afraid the existing code cannot help you. > The packets you see are encapsulated in 802.1q aka VLAN frames, > and since ipfw2 does not try to decapsulate the packets, you > don't get to see the IP headers. > > Your most reasonable option would be to write a new ipufw2 opcode, > say something like 'vlan-decap x-y', which succeeds if the packet has > a vlan header in the range x to y, and in this case skips the VLAN header, > tries to re-parse the header fields as in the beginning of > ip_fw_chk() after the section > > /* > * Collect parameters into local variables for faster matching. > */ > > and then continues. > It's not a lot of code, in the worst case you can just cut&paste > the relevant 50-60 lines from the beginning of the code > (though of course it would be nice to rearrange the code to > reduce duplication). > > By doing this you can do something like > > ipfw add skipto 1000 vlan-decap 1-50 > > and then process vlans 1 to 50 at line 1000. > Maybe it is a good idea to split the vlan-id matching and the decapsulation. Isn't it posible to cheat using vlan(4) interface ? I think it's possible to create them in order to use its code to zap the VLAN header and then use ipfw to filter on these vlan(4) interfaces. This isn't more than a workaround, but it might help. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 23:22: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 E953416A41F for ; Fri, 12 Aug 2005 23:22:51 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2204D43D48 for ; Fri, 12 Aug 2005 23:22:50 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 3011 invoked from network); 13 Aug 2005 01:22:49 +0200 Received: from p508fe702.dip.t-dialin.net (HELO localhost.skatecity) (80.143.231.2) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 13 Aug 2005 01:22:49 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j7CNMraV046989 for ; Sat, 13 Aug 2005 01:22:53 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j7CNMrq8046986 for freebsd-hackers@freebsd.org; Sat, 13 Aug 2005 01:22:53 +0200 (CEST) (envelope-from arundel) From: alexander Date: Sat, 13 Aug 2005 01:22:53 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050812232253.GA42088@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050809133109.GA15300@skatecity> <20050809192530.GA19230@skatecity> <20050810130928.GA2027@skatecity> <200508102019.15147.Danovitsch@Vitsch.net> <20050811120108.GA20415@skatecity> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050811120108.GA20415@skatecity> Subject: Re: Using sysarch specific syscalls in assembly? 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, 12 Aug 2005 23:22:52 -0000 On Thu Aug 11 05, alexander wrote: > > Hmm...very odd. Should I file a bug report about this problem? Alright. I submitted a PR and got a suggestion on how to solve the problem by Bruce Evans. Could somebody (apart from me) try out his workaround and see if it works? Thx a bunch. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 23:37:29 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 BF30216A41F for ; Fri, 12 Aug 2005 23:37:29 +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 6FDDD43D46 for ; Fri, 12 Aug 2005 23:37: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 j7CNbSGe022467; Fri, 12 Aug 2005 16:37:28 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7CNbSjN022466; Fri, 12 Aug 2005 16:37:28 -0700 Date: Fri, 12 Aug 2005 16:37:28 -0700 From: Brooks Davis To: =?iso-8859-1?Q?Jo=E3o?= Carlos Mendes Luis Message-ID: <20050812233728.GA22225@odin.ac.hmc.edu> References: <42FD15EA.8050500@jonny.eng.br> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <42FD15EA.8050500@jonny.eng.br> 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: File create permissions, what am I missing? 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, 12 Aug 2005 23:37:29 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 12, 2005 at 06:34:34PM -0300, Jo=E3o Carlos Mendes Luis wrote: > In a directory with -rwxrwxrwx, any user can create files, but who should= =20 > be the owner/group of this file? >=20 > Long time ago in Unix history, the owner would be the user who created th= e=20 > file, and the group would be the users's primary group. >=20 > Later, IIRC, if the directory group was one of the user's secondary group= s,=20 > the file would also be from this group. >=20 > A later modification defined that a setgid directory would effect in all= =20 > files created belonging to the directory's user. >=20 > Am I correct? >=20 > But I have already tested 3 system, 2 with 5-stable and 1 with 4-stable, = in=20 > which the created file inside a -rwxrwxrwx directory is created belonging= =20 > to the directory's group, WITHOUT the setgid bit. What did I miss? On BSD systems, the group of a file is always the group of the directory it is in. This differs from SysV UNIX. The resident grey-beard at work feels this is a new and annoying behavior. (i.e. it wasn't always this way. :) -- 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 --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC/TK4XY6L6fI4GtQRAqO+AKCk+gbMNknN7HlHNWllu1EcfVCRZgCeMrA0 h3DIz0Dq9svwqgEC2b2kYsc= =YtZ0 -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3-- From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 00:03:51 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 6B90E16A41F for ; Sat, 13 Aug 2005 00:03:51 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 139F543D46 for ; Sat, 13 Aug 2005 00:03:51 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j7D03mr8020864; Fri, 12 Aug 2005 17:03:48 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j7D03moX020863; Fri, 12 Aug 2005 17:03:48 -0700 (PDT) (envelope-from rizzo) Date: Fri, 12 Aug 2005 17:03:48 -0700 From: Luigi Rizzo To: Jeremie Le Hen Message-ID: <20050812170348.A20828@xorpc.icir.org> References: <20050812042749.H87994@prime.gushi.org> <20050812063359.A14229@xorpc.icir.org> <20050812224956.GG45385@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20050812224956.GG45385@obiwan.tataz.chchile.org>; from jeremie@le-hen.org on Sat, Aug 13, 2005 at 12:49:56AM +0200 Cc: hackers@freebsd.org, "Dan Mahoney, System Admin" Subject: Re: 5.4 -- bridging, ipfw, dot1q 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, 13 Aug 2005 00:03:51 -0000 On Sat, Aug 13, 2005 at 12:49:56AM +0200, Jeremie Le Hen wrote: > Hi, > > > I am afraid the existing code cannot help you. > > The packets you see are encapsulated in 802.1q aka VLAN frames, > > and since ipfw2 does not try to decapsulate the packets, you > > don't get to see the IP headers. > > > > Your most reasonable option would be to write a new ipufw2 opcode, > > say something like 'vlan-decap x-y', which succeeds if the packet has > > a vlan header in the range x to y, and in this case skips the VLAN header, > > tries to re-parse the header fields as in the beginning of > > ip_fw_chk() after the section > > > > /* > > * Collect parameters into local variables for faster matching. > > */ > > > > and then continues. > > It's not a lot of code, in the worst case you can just cut&paste > > the relevant 50-60 lines from the beginning of the code > > (though of course it would be nice to rearrange the code to > > reduce duplication). > > > > By doing this you can do something like > > > > ipfw add skipto 1000 vlan-decap 1-50 > > > > and then process vlans 1 to 50 at line 1000. > > Maybe it is a good idea to split the vlan-id matching and the decapsulation. > > Isn't it posible to cheat using vlan(4) interface ? I think it's > possible to create them in order to use its code to zap the VLAN header > and then use ipfw to filter on these vlan(4) interfaces. This isn't > more than a workaround, but it might help. well it would be painful to configure, because the number of vlans is (according to what Dan says) is large, and he would have to define N vlan interfaces on each of the physical ones, then define N bridges between the corresponding vlans (and i think there is a limit on how large N can be). Additionally demuxing incoming packets would take O(N) time. cheers luigi From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 00:13:33 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 B64C116A41F for ; Sat, 13 Aug 2005 00:13:33 +0000 (GMT) (envelope-from mwm-keyword-hackers.e471b2@mired.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6298143D49 for ; Sat, 13 Aug 2005 00:13:33 +0000 (GMT) (envelope-from mwm-keyword-hackers.e471b2@mired.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id BBBB921862B for ; Fri, 12 Aug 2005 17:13:32 -0700 (PDT) Received: from mired.org (mwm@idiom [216.240.32.1]) by idiom.com (8.12.11/8.12.11) with SMTP id j7D0DVwU057475 for ; Fri, 12 Aug 2005 17:13:32 -0700 (PDT) (envelope-from mwm-keyword-hackers.e471b2@mired.org) Received: (qmail 27967 invoked by uid 1001); 13 Aug 2005 00:14:44 -0000 Received: by localhost.mired.org (tmda-sendmail, from uid 1001); Fri, 12 Aug 2005 20:14:43 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <17149.15219.714658.707699@bhuda.mired.org> Date: Fri, 12 Aug 2005 20:14:43 -0400 To: Brooks Davis In-Reply-To: <20050812233728.GA22225@odin.ac.hmc.edu> References: <42FD15EA.8050500@jonny.eng.br> <20050812233728.GA22225@odin.ac.hmc.edu> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer Cc: hackers@freebsd.org, =?iso-8859-1?Q?Jo=E3o?= Carlos Mendes Luis Subject: Re: File create permissions, what am I missing? 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, 13 Aug 2005 00:13:33 -0000 In <20050812233728.GA22225@odin.ac.hmc.edu>, Brooks Davis typed: > On Fri, Aug 12, 2005 at 06:34:34PM -0300, Jo=E3o Carlos Mendes Luis w= rote: > > In a directory with -rwxrwxrwx, any user can create files, but who = should=20 > > be the owner/group of this file? > >=20 > > Long time ago in Unix history, the owner would be the user who crea= ted the=20 > > file, and the group would be the users's primary group. > >=20 > > Later, IIRC, if the directory group was one of the user's secondary= groups,=20 > > the file would also be from this group. > >=20 > > A later modification defined that a setgid directory would effect i= n all=20 > > files created belonging to the directory's user. > >=20 > > Am I correct? > >=20 > > But I have already tested 3 system, 2 with 5-stable and 1 with 4-st= able, in=20 > > which the created file inside a -rwxrwxrwx directory is created bel= onging=20 > > to the directory's group, WITHOUT the setgid bit. What did I miss?= >=20 > On BSD systems, the group of a file is always the group of the direct= ory > it is in. This differs from SysV UNIX. The resident grey-beard at w= ork > feels this is a new and annoying behavior. (i.e. it wasn't always thi= s > way. :) SysV lets you toggle that behavior on a per-directory basis. Turn the setgid bit on in the directory, and files created in it will be owned by the group that owns the directory. =09=09=09http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more informatio= n. From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 01:09: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 085B016A41F for ; Sat, 13 Aug 2005 01:09:01 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6198043D45 for ; Sat, 13 Aug 2005 01:08:59 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (localhost.cc.fer.hr [127.0.0.1]) by geri.cc.fer.hr (8.13.3/8.13.1) with ESMTP id j7D18cF3030340; Sat, 13 Aug 2005 03:08:38 +0200 (CEST) (envelope-from ivoras@fer.hr) Received: from localhost (ivoras@localhost) by geri.cc.fer.hr (8.13.3/8.13.1/Submit) with ESMTP id j7D18bRR030337; Sat, 13 Aug 2005 03:08:37 +0200 (CEST) (envelope-from ivoras@fer.hr) X-Authentication-Warning: geri.cc.fer.hr: ivoras owned process doing -bs Date: Sat, 13 Aug 2005 03:08:37 +0200 (CEST) From: Ivan Voras Sender: ivoras@geri.cc.fer.hr To: Eric Anderson In-Reply-To: <42FC9A45.9000500@centtech.com> Message-ID: <20050813030703.H30330@geri.cc.fer.hr> References: <20050803183010.X32344@geri.cc.fer.hr> <42FC9740.3060609@centtech.com> <42FC9A45.9000500@centtech.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: gjournal public alpha release 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, 13 Aug 2005 01:09:01 -0000 On Fri, 12 Aug 2005, Eric Anderson wrote: >> Bug report: >> GEOM_JOURNAL[0]: Device testjournal activated. >> malloc(M_WAITOK) of "gjournal.hl", forcing M_NOWAIT with the following >> non-sleepable locks held: >> exclusive sleep mutex gjournal:rmap r = 0 (0xc28ad978) locked @ >> g_journal.c:748 > > Not to mention once I have the /dev/journeled/testjournal mounted, I get a > streaming spewage of those messages in /var/log/messages, which causes > syslogd to crank to 99% CPU, and the performance to be horrible as you'd > expect with no CPU to do anything. Thanks for testing it! I'll make an updated version soon. -- Every sufficiently advanced magic is indistinguishable from technology - Arthur C Anticlarke From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 06:11:17 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 998FA16A41F for ; Sat, 13 Aug 2005 06:11:17 +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 3DFC443D49 for ; Sat, 13 Aug 2005 06:11:15 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j7D6BBVB042732; Sat, 13 Aug 2005 01:11:11 -0500 (CDT) (envelope-from dan) Date: Sat, 13 Aug 2005 01:11:11 -0500 From: Dan Nelson To: Mike Meyer Message-ID: <20050813061111.GA46146@dan.emsphone.com> References: <42FD15EA.8050500@jonny.eng.br> <20050812233728.GA22225@odin.ac.hmc.edu> <17149.15219.714658.707699@bhuda.mired.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17149.15219.714658.707699@bhuda.mired.org> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org, Jo~ao Carlos Mendes Luis Subject: Re: File create permissions, what am I missing? 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, 13 Aug 2005 06:11:17 -0000 In the last episode (Aug 12), Mike Meyer said: > In <20050812233728.GA22225@odin.ac.hmc.edu>, Brooks Davis typed: > > On Fri, Aug 12, 2005 at 06:34:34PM -0300, Jo~ao Carlos Mendes Luis wrote: > > > In a directory with -rwxrwxrwx, any user can create files, but > > > who should be the owner/group of this file? > > > > On BSD systems, the group of a file is always the group of the > > directory it is in. This differs from SysV UNIX. The resident > > grey-beard at work feels this is a new and annoying behavior. (i.e. > > it wasn't always this way. :) > > SysV lets you toggle that behavior on a per-directory basis. Turn the > setgid bit on in the directory, and files created in it will be owned > by the group that owns the directory. Unfortunately, FreeBSD doesn't honor the "subdirectories created under SGID subdirectories inherit the flag" rule, so you can't serve SysV clients from FreeBSD NFS hosts without the permissions getting screwed up (SysV clients expect the nfs server to set the bit). Fix: RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_vnops.c,v retrieving revision 1.271 diff -u -r1.271 ufs_vnops.c --- ufs_vnops.c 9 Jun 2005 20:20:31 -0000 1.271 +++ ufs_vnops.c 14 Jun 2005 18:22:01 -0000 @@ -1336,6 +1336,8 @@ ip = VTOI(tvp); ip->i_gid = dp->i_gid; DIP_SET(ip, i_gid, dp->i_gid); + if (dp->i_mode & ISGID) + dmode |= ISGID; #ifdef SUIDDIR { #ifdef QUOTA -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 09:03:07 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 A756E16A41F for ; Sat, 13 Aug 2005 09:03:07 +0000 (GMT) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (prime.gushi.org [65.125.228.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F4CB43D45 for ; Sat, 13 Aug 2005 09:03:07 +0000 (GMT) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (danm@localhost.gushi.org [127.0.0.1]) by prime.gushi.org (8.13.4/8.13.4) with ESMTP id j7D98BoZ074098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Aug 2005 05:08:11 -0400 (EDT) Received: (from danm@localhost) by prime.gushi.org (8.13.4/8.13.4/Submit) id j7D98Amm074092; Sat, 13 Aug 2005 05:08:10 -0400 (EDT) Date: Sat, 13 Aug 2005 05:08:10 -0400 (EDT) From: "Dan Mahoney, System Admin" To: Luigi Rizzo In-Reply-To: <20050812170348.A20828@xorpc.icir.org> Message-ID: <20050813044147.B61674@prime.gushi.org> References: <20050812042749.H87994@prime.gushi.org> <20050812063359.A14229@xorpc.icir.org> <20050812224956.GG45385@obiwan.tataz.chchile.org> <20050812170348.A20828@xorpc.icir.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Sat, 13 Aug 2005 15:11:16 +0000 Cc: hackers@freebsd.org, Jeremie Le Hen Subject: Re: 5.4 -- bridging, ipfw, dot1q 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, 13 Aug 2005 09:03:07 -0000 On Fri, 12 Aug 2005, Luigi Rizzo wrote: > On Sat, Aug 13, 2005 at 12:49:56AM +0200, Jeremie Le Hen wrote: >> Hi, >> >>> I am afraid the existing code cannot help you. >>> The packets you see are encapsulated in 802.1q aka VLAN frames, >>> and since ipfw2 does not try to decapsulate the packets, you >>> don't get to see the IP headers. >>> >>> Your most reasonable option would be to write a new ipufw2 opcode, >>> say something like 'vlan-decap x-y', which succeeds if the packet has >>> a vlan header in the range x to y, and in this case skips the VLAN header, >>> tries to re-parse the header fields as in the beginning of >>> ip_fw_chk() after the section >>> >>> /* >>> * Collect parameters into local variables for faster matching. >>> */ >>> >>> and then continues. >>> It's not a lot of code, in the worst case you can just cut&paste >>> the relevant 50-60 lines from the beginning of the code >>> (though of course it would be nice to rearrange the code to >>> reduce duplication). >>> >>> By doing this you can do something like >>> >>> ipfw add skipto 1000 vlan-decap 1-50 >>> >>> and then process vlans 1 to 50 at line 1000. >>> Maybe it is a good idea to split the vlan-id matching and the decapsulation. >> >> Isn't it posible to cheat using vlan(4) interface ? I think it's >> possible to create them in order to use its code to zap the VLAN header >> and then use ipfw to filter on these vlan(4) interfaces. This isn't >> more than a workaround, but it might help. After all, the demuxing is nothing more than ignoring a few extra bits at the beginning of the packet. Which all my BPF stuff is doing nicely. Snort, trafshow, etc all work fine and don't seem to choke on the extra frames. I'd personally just be happy if ipfw was smart enough to know that if I was using ip-type rules on something that's not ip...that it would handle the demuxing automagically. i.e. ipfw add 100 deny ip from any to 192.168.1.1 mac-type vlan via em1 or maybe i.e. ipfw add 100 deny ip from any to 192.168.1.1 mac-type vlan-as-inet via em1 assuming mac-type vlan is, of course, dot1q trunk traffic. or better still... ipfw add 200 deny ip from any to 10.2.2.2 mac-type vlan vlan-id 400 via em1 I'd also really like it if non-bridged interfaces kept their arp table separate from normal interfaces -- but that's a separate issue I'm experiencing when the management subnet (on a dedicated non-bridged nic) also happens to be one of the vlans within the dot1q trunk. A spanning tree daemon (user or kernelspace) wouldn't be bad either. > > well it would be painful to configure, because the number of vlans is > (according to what Dan says) is large, and he would have to define > N vlan interfaces on each of the physical ones, then define > N bridges between the corresponding vlans (and i think there is > a limit on how large N can be). It's worse than that. The device has four bridged interfaces. One up, three down to three switches. Each switch holds 24 vlans. That QUICKLY becomes a nightmare when bridging actually works without doing this. It's just ipfw saying "nope, there's no possible way for me to look > Additionally demuxing incoming packets would take O(N) time. > > cheers > luigi > -- "I hate Windows" -Tigerwolf, Anthrocon 2004 --------Dan Mahoney-------- Techie, Sysadmin, WebGeek Gushi on efnet/undernet IRC ICQ: 13735144 AIM: LarpGM Site: http://www.gushi.org --------------------------- From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 15:55:23 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 27F5316A41F for ; Sat, 13 Aug 2005 15:55:23 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90D7843D45 for ; Sat, 13 Aug 2005 15:55:22 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 8A0981771E; Sat, 13 Aug 2005 12:55:21 -0300 (BRT) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 75183-10; Sat, 13 Aug 2005 12:55:15 -0300 (BRT) Received: from [200.216.19.102] (unknown [200.216.19.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id 7FD7B1700E; Sat, 13 Aug 2005 12:55:11 -0300 (BRT) Message-ID: <42FE1781.9050403@jonny.eng.br> Date: Sat, 13 Aug 2005 12:53:37 -0300 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brooks Davis References: <42FD15EA.8050500@jonny.eng.br> <20050812233728.GA22225@odin.ac.hmc.edu> In-Reply-To: <20050812233728.GA22225@odin.ac.hmc.edu> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAADBQ TFRFAAAAgAAAAIAAgIAAAACAgACAAICAgICAwMDA/wAAAP8A//8AAAD//wD/AP//////ex+xxAAA Ac9JREFUOMtdk8FupDAMhr1qRbjR2x77GD3uq7BS1TkuhyrmFnppcvOrUlUquXltJ2EAIw1Dvvz+ bRPgrQbU6NpzuY0AF1LABIc4AH9crxLwb/4VztEU42W9SOBezwX4ClzeLuC9PBFRq+2xpJJHN8KQ Oa9Hd/ACnldgUVADvgHKA2usVwW12BVSkrThJH+5lqqQXIAAvRkQM6WqkADpO5gBx5m5VOxRgBZV HRLRcgc4dv3ukbOBm3de8uHIe1n0BBUBIi4hi0U2ownGkkwrwN425ygVPjntsvOmkFyyXYfreHXq f1tugFLCFDhZcsffYIqxKNAB/FkNbBDslUTz0MMQfuRnkN6D5nLVQ0G2H3bWC6KByTZPZWhJ/jgs ChX3e/P5y0VReCUCYm0/pUQd1lQ4/aIty/YtW6y3WMHc8yazpcU8UuqqB+LfMql/wVx4kXNTwGQO PxTuL7+AhbSkWS4z0TdZFbo1BR6qQkA08DnogNNHey/SGc5GejqFttxhjBHd3rjd62nR08gnxeFr Ic2e52we+QC0rIg6KYn1AKQsbF3wcgAP00MZrZ6X0yc5v5TRXgTi/jtVwef5I6Y+J7kyb+d1eB6K 4LoOLphBW/8PdNW9dapKWXwAAAAASUVORK5CYII= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at coe.ufrj.br Cc: hackers@freebsd.org Subject: Re: File create permissions, what am I missing? 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, 13 Aug 2005 15:55:23 -0000 Brooks Davis wrote: > On Fri, Aug 12, 2005 at 06:34:34PM -0300, Joćo Carlos Mendes Luis wrote: > >>In a directory with -rwxrwxrwx, any user can create files, but who should >>be the owner/group of this file? >> >>Long time ago in Unix history, the owner would be the user who created the >>file, and the group would be the users's primary group. >> >>Later, IIRC, if the directory group was one of the user's secondary groups, >>the file would also be from this group. >> >>A later modification defined that a setgid directory would effect in all >>files created belonging to the directory's user. >> >>Am I correct? >> >>But I have already tested 3 system, 2 with 5-stable and 1 with 4-stable, in >>which the created file inside a -rwxrwxrwx directory is created belonging >>to the directory's group, WITHOUT the setgid bit. What did I miss? > > > On BSD systems, the group of a file is always the group of the directory > it is in. This differs from SysV UNIX. The resident grey-beard at work > feels this is a new and annoying behavior. (i.e. it wasn't always this > way. :) So this is expected behavior? Isn't this someway insecure? From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 16:17: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 5AEA416A42B for ; Sat, 13 Aug 2005 16:17:49 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1808643D46 for ; Sat, 13 Aug 2005 16:17:48 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id j7DGHGOZ035229; Sat, 13 Aug 2005 09:17:17 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <42FE1D04.8090207@freebsd.org> Date: Sat, 13 Aug 2005 09:17:08 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Norbert Koch References: <000401c59f18$0a938a40$4801a8c0@ws-ew-3.W2KDEMIG> In-Reply-To: <000401c59f18$0a938a40$4801a8c0@ws-ew-3.W2KDEMIG> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers , "Loren M. Lang" Subject: Re: PXE Boot FreeBSD with Etherboot 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, 13 Aug 2005 16:17:49 -0000 Norbert Koch wrote: >>>>It seems there are some problems with using pxeboot in >> >>combination with >> >>>>the network boot code from the etherboot project. I have tried many >>>>combinations of options with no success. The result is very Last time I looked, etherboot didn't support PXE. In any case, it cannot support PXE unless it's running from ROM. Remember that PXE is a ROM BIOS specification; pxe loader programs (such as pxeboot) make PXE calls to the ROM BIOS for network operations. You can probably boot a FreeBSD kernel through etherboot, but you want to load the kernel directly; don't use pxeboot. Tim From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 16:51:31 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 D907A16A41F for ; Sat, 13 Aug 2005 16:51:31 +0000 (GMT) (envelope-from igor@doom.homeunix.org) Received: from voodoo.oberon.net (voodoo.oberon.net [212.118.165.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D65743D46 for ; Sat, 13 Aug 2005 16:51:31 +0000 (GMT) (envelope-from igor@doom.homeunix.org) Received: from dialup84116-41.ip.peterstar.net ([84.204.116.41] helo=doom.homeunix.org) by voodoo.oberon.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.52 (FreeBSD)) id 1E3zED-0000j5-6u for hackers@freebsd.org; Sat, 13 Aug 2005 18:51:26 +0200 Received: from doom.homeunix.org (localhost [127.0.0.1]) by doom.homeunix.org (8.13.3/8.13.3) with ESMTP id j7DGpJZq001547 for ; Sat, 13 Aug 2005 20:51:20 +0400 (MSD) (envelope-from igor@doom.homeunix.org) Received: (from igor@localhost) by doom.homeunix.org (8.13.3/8.13.3/Submit) id j7DGpJZ2001546 for hackers@freebsd.org; Sat, 13 Aug 2005 20:51:19 +0400 (MSD) (envelope-from igor) Date: Sat, 13 Aug 2005 20:51:19 +0400 From: Igor Pokrovsky To: hackers@freebsd.org Message-ID: <20050813165119.GA1234@doom.homeunix.org> Mail-Followup-To: hackers@freebsd.org References: <20050812194927.GA74052@doom.homeunix.org> <200508122034.j7CKYp2x033829@wattres.watt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508122034.j7CKYp2x033829@wattres.watt.com> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: perl's tie 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: Sat, 13 Aug 2005 16:51:32 -0000 On Fri, Aug 12, 2005 at 01:34:51PM -0700, Steve Watt wrote: > In article <20050812194927.GA74052@doom.homeunix.org> you write: > >Hi all, > > > >Consider the following except from a perl program: > > > >tie(%foodb, 'MLDBM', $BAR_FILE, O_CREAT | O_RDWR, 0666) > > or die("Cannot open $BAR_FILE: $!\n"); > > > >I expect it to create a new $BAR_FILE, if none existed, with 0666 > >permissions. But it doesn't. It creates a file with default umask > >specified permissions - 0644. So I have to manually do chmod on that > >file afterwards. Is there anything I don't understand? > > > >%uname -a > >FreeBSD doom.homeunix.org 4.11-STABLE FreeBSD 4.11-STABLE #0: > >Tue Jul 5 21:05:20 MSD 2005 [...] i386 > > umask applies after the open call's permissions, and is used to remove > bits from the value passed in to the open. That's the way POSIX > says it works, and that's how it works on UNIX machines. > > Down in the guts of the open() syscall, there's a line that > effectively says > file_permissions = passed_in_permissions & ~umask; > > It's working as designed. Thanks for explanation guys. I guess I'm still thinking windoze. -ip -- If there isn't a law, there will be. From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 23:12:07 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 86B4916A41F for ; Sat, 13 Aug 2005 23:12:07 +0000 (GMT) (envelope-from gjb@gbch.net) Received: from gw.gbch.net (gw.gbch.net [203.143.238.93]) by mx1.FreeBSD.org (Postfix) with SMTP id 6B78F43D49 for ; Sat, 13 Aug 2005 23:12:04 +0000 (GMT) (envelope-from gjb@gbch.net) Received: (qmail 37164 invoked from network); 14 Aug 2005 09:11:58 +1000 Received: from gecko.gbch.net (172.16.1.7) by bambi.gbch.net with SMTP; 14 Aug 2005 09:11:58 +1000 Received: (qmail 18306 invoked by uid 1001); 14 Aug 2005 09:11:57 +1000 Message-ID: Date: Sun, 14 Aug 2005 09:11:57 +1000 From: Greg Black To: =?unknown-8bit?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= References: <42FD15EA.8050500@jonny.eng.br> <20050812233728.GA22225@odin.ac.hmc.edu> <42FE1781.9050403@jonny.eng.br> Mime-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <42FE1781.9050403@jonny.eng.br> User-Agent: Mutt/1.4.2.1i; gjb-muttsend.sh 1.7 2004-10-05 X-Uptime: 175 days X-Operating-System: FreeBSD 4.10-RELEASE i386 X-Location: Brisbane, Australia; 27.49841S 152.98439E X-URL: http://www.gbch.net/gjb.html X-Blog: http://www.gbch.net/gjb/blog/ X-Image-URL: http://www.gbch.net/gjb/gjb-auug048.gif X-PGP-Key-Fingerprint: EBB2 2A92 A79D 1533 AC00 3C46 5D83 B6FB 4B04 B7D6 X-Request-PGP: http://www.gbch.net/keys/4B04B7D6.asc Cc: hackers@freebsd.org Subject: Re: File create permissions, what am I missing? 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, 13 Aug 2005 23:12:07 -0000 On 2005-08-13, Joćo Carlos Mendes Luķs wrote: > Brooks Davis wrote: > > On BSD systems, the group of a file is always the group of the directory > > it is in. This differs from SysV UNIX. The resident grey-beard at work > > feels this is a new and annoying behavior. (i.e. it wasn't always this > > way. :) > > So this is expected behavior? Isn't this someway insecure? It is documented behaviour (see open(2) for details). How is it insecure? Greg