From owner-freebsd-arch@FreeBSD.ORG Sun Mar 29 00:36:58 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C311106566B for ; Sun, 29 Mar 2009 00:36:58 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail3.sea5.speakeasy.net (mail3.sea5.speakeasy.net [69.17.117.5]) by mx1.freebsd.org (Postfix) with ESMTP id 44BCA8FC12 for ; Sun, 29 Mar 2009 00:36:58 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: (qmail 30843 invoked from network); 29 Mar 2009 00:10:17 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 29 Mar 2009 00:10:17 -0000 Message-ID: <49CEBC72.1090601@telenix.org> Date: Sat, 28 Mar 2009 20:10:26 -0400 From: Chuck Robey User-Agent: Thunderbird 2.0.0.19 (X11/20090121) MIME-Version: 1.0 To: John Hein References: <18875.60334.947446.966085@gromit.timing.com> <20090315.080814.669286040.imp@bsdimp.com> <18877.57878.136116.691250@gromit.timing.com> <20090318.183646.-593221015.imp@bsdimp.com> <18881.38984.133668.539997@gromit.timing.com> <49C19F2A.10406@elischer.org> <18881.42546.640583.971867@gromit.timing.com> In-Reply-To: <18881.42546.640583.971867@gromit.timing.com> X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, Julian Elischer Subject: Re: Final sanity pass: xdev X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2009 00:36:59 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 John Hein wrote: > Julian Elischer wrote at 18:26 -0700 on Mar 18, 2009: > > John Hein wrote: I just ran into this ... I do pretty well with Makefiles, I can do all that playing myself, I was just wondering if you folks have done any benchmarking with new toy, and how it stacks up on FreeBSD current in the area of ... well, in too many areas to even begin to describe! Any mails discussing this (from a FreeBSD standpoint, doing our kernel & world? The thing that mosts concerns me is if it results with a compatible kernel, because I guess I can work out the rest. If you don't care to rehash what seems obvious to you, just tell me if it comes up with a compatible image. What a neat new toy! > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknOvHEACgkQz62J6PPcoOkwyQCdEYnxb5EWZW0BLnVd1wYRQdoU N50An0Cn8bFJLPZiA9231Z4KiN6gd5cl =vCv6 -----END PGP SIGNATURE----- From owner-freebsd-arch@FreeBSD.ORG Sun Mar 29 00:37:12 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF59D1065677 for ; Sun, 29 Mar 2009 00:37:12 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail12.sea5.speakeasy.net (mail12.sea5.speakeasy.net [69.17.117.14]) by mx1.freebsd.org (Postfix) with ESMTP id 986768FC25 for ; Sun, 29 Mar 2009 00:37:12 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: (qmail 30538 invoked from network); 29 Mar 2009 00:37:12 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail12.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 29 Mar 2009 00:37:12 -0000 Message-ID: <49CEC2C0.3020902@telenix.org> Date: Sat, 28 Mar 2009 20:37:20 -0400 From: Chuck Robey User-Agent: Thunderbird 2.0.0.19 (X11/20090121) MIME-Version: 1.0 To: John Hein References: <18875.60334.947446.966085@gromit.timing.com> <20090315.080814.669286040.imp@bsdimp.com> <18877.57878.136116.691250@gromit.timing.com> <20090318.183646.-593221015.imp@bsdimp.com> <18881.38984.133668.539997@gromit.timing.com> <49C19F2A.10406@elischer.org> <18881.42546.640583.971867@gromit.timing.com> In-Reply-To: <18881.42546.640583.971867@gromit.timing.com> X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, Julian Elischer Subject: Re: Final sanity pass: xdev X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2009 00:37:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I was going to ask in ports about this, but you folks really sound like you know the llvm tool a whole lot better, and if, in answering my question, you happened to answer things like benchmark results and if it makes good kernels, well, you wouldn't hear me complaining. Anyhow, my question regards the llvm-devel port. The install phase wants to build python26. Is that because the author of the port likes python26, or would it really work if I used my presently available python25? I could fix my makefile, if it'd work ok, but I need to understand why our llvm port needs python26, before I shoot myself in the foot. Maybe I just ought to be thankful it doesn't go off and try to install python30, which I truly have problems with. I just need to know, I hope one of you folks knows the reason why. In fact, needing that python26 would really stop this from ever getting into the base, wouldn't it? Not that I'd mind a good excuse to get python into our base, but I don't think anyone else would agree with me. Thanks -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknOwsAACgkQz62J6PPcoOn9SgCggZFLfGLcWtxUq9oFKl8OPBgG W4gAni7HrGCrBQ9bgW8mcsCE1DzwBpHc =ZR9q -----END PGP SIGNATURE----- From owner-freebsd-arch@FreeBSD.ORG Sun Mar 29 02:00:44 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C8431065673 for ; Sun, 29 Mar 2009 02:00:44 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id EFB078FC23 for ; Sun, 29 Mar 2009 02:00:43 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id EFFC76D43F; Sun, 29 Mar 2009 01:43:32 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id D6AE5844C2; Sun, 29 Mar 2009 03:43:32 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Chuck Robey References: <18875.60334.947446.966085@gromit.timing.com> <20090315.080814.669286040.imp@bsdimp.com> <18877.57878.136116.691250@gromit.timing.com> <20090318.183646.-593221015.imp@bsdimp.com> <18881.38984.133668.539997@gromit.timing.com> <49C19F2A.10406@elischer.org> <18881.42546.640583.971867@gromit.timing.com> <49CEC2C0.3020902@telenix.org> Date: Sun, 29 Mar 2009 03:43:32 +0200 In-Reply-To: <49CEC2C0.3020902@telenix.org> (Chuck Robey's message of "Sat, 28 Mar 2009 20:37:20 -0400") Message-ID: <86wsa96r3v.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, John Hein , Julian Elischer Subject: Re: Final sanity pass: xdev X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2009 02:00:44 -0000 Chuck Robey writes: > In fact, needing that python26 would really stop this from ever > getting into the base, wouldn't it? Not that I'd mind a good excuse > to get python into our base, but I don't think anyone else would agree > with me. Trust me, you *don't* want python (or any other widely used script language) in base. There's a good reason why we removed Tcl and Perl. Imagine a having Python 2.5 is in base, and needing to run a mission- critical application that requires 2.6. You would have no choice but to install 2.6 from ports, and you would run into all sorts of problems with the two versions interfering with each other, scripts mysteriously failing because they were invoked with the wrong $PATH and therefore the wrong interpreter, code running in the 2.5 interpreter trying to load 2.6 modules, etc. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Sun Mar 29 06:57:20 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67B22106566B for ; Sun, 29 Mar 2009 06:57:20 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 1FA748FC19 for ; Sun, 29 Mar 2009 06:57:19 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 956199CB08E; Sun, 29 Mar 2009 08:56:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MbRD9n3Ok0F6; Sun, 29 Mar 2009 08:56:29 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 029139CB102; Sun, 29 Mar 2009 08:56:28 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n2T6uRVQ008671; Sun, 29 Mar 2009 08:56:27 +0200 (CEST) (envelope-from rdivacky) Date: Sun, 29 Mar 2009 08:56:27 +0200 From: Roman Divacky To: Chuck Robey Message-ID: <20090329065627.GA4994@freebsd.org> References: <18875.60334.947446.966085@gromit.timing.com> <20090315.080814.669286040.imp@bsdimp.com> <18877.57878.136116.691250@gromit.timing.com> <20090318.183646.-593221015.imp@bsdimp.com> <18881.38984.133668.539997@gromit.timing.com> <49C19F2A.10406@elischer.org> <18881.42546.640583.971867@gromit.timing.com> <49CEC2C0.3020902@telenix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49CEC2C0.3020902@telenix.org> User-Agent: Mutt/1.4.2.3i Cc: arch@freebsd.org, John Hein , Julian Elischer Subject: Re: Final sanity pass: xdev X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2009 06:57:20 -0000 On Sat, Mar 28, 2009 at 08:37:20PM -0400, Chuck Robey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > I was going to ask in ports about this, but you folks really sound like you know > the llvm tool a whole lot better, and if, in answering my question, you > happened to answer things like benchmark results and if it makes good kernels, > well, you wouldn't hear me complaining. > > Anyhow, my question regards the llvm-devel port. The install phase wants to > build python26. Is that because the author of the port likes python26, or would > it really work if I used my presently available python25? I could fix my > makefile, if it'd work ok, but I need to understand why our llvm port needs > python26, before I shoot myself in the foot. the llvm/clang ships with a compiler driver that is written in python, the driver is being replaced by a C++ one. the C++ one currently works "just fine". expect the python dependency to be removed in a near future roman From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 08:04:27 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA07D106564A for ; Mon, 30 Mar 2009 08:04:27 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0A18FC1B for ; Mon, 30 Mar 2009 08:04:27 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id AD3BD78CC8; Mon, 30 Mar 2009 07:45:17 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2U7jGfj010068; Mon, 30 Mar 2009 07:45:16 GMT (envelope-from phk@critter.freebsd.dk) To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 29 Mar 2009 03:43:32 +0200." <86wsa96r3v.fsf@ds4.des.no> Date: Mon, 30 Mar 2009 07:45:16 +0000 Message-ID: <10067.1238399116@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Julian Elischer , arch@freebsd.org, Chuck Robey , John Hein Subject: Re: Final sanity pass: xdev X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 08:04:28 -0000 In message <86wsa96r3v.fsf@ds4.des.no>, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= wr ites: >Chuck Robey writes: >> In fact, needing that python26 would really stop this from ever >> getting into the base, wouldn't it? Not that I'd mind a good excuse >> to get python into our base, but I don't think anyone else would agree >> with me. > >Trust me, you *don't* want python (or any other widely used script >language) in base. There's a good reason why we removed Tcl and Perl. Actually, I think there is an obvious avenue for doing stuff like this: rename it. I faced this problem with libexpat for XML parsing and simply calling the library something else solved the problem entirely: We have had libexpat in src for seven years and not once has a port tripped over it. There is nothing preventing us from importing a scripting language[1] as long as we call it "bsdrun". The important distinction here, is that we import a language to be FreeBSD's built-in scripting language, we do *NOT* do it to make it easier to run tcl, perl or python programs under FreeBSD. Poul-Henning [1] Meet at dawn, with loaded weapons, in front of the cathedral to decide which, last man standing tells us which[2]. [2] If we do it, I would still argue for Tcl, because it is built to be embedded, and small enough that you can put it into programs like inetd, syslogd and similar[3] [3] But I'm not going to be present at the Cathedral, because just like our logo, this will not be decided on technical merit but by who has the larger fan-club. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 09:28:18 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62929106566B for ; Mon, 30 Mar 2009 09:28:18 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 2822F8FC14 for ; Mon, 30 Mar 2009 09:28:17 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id C6AD378CEF; Mon, 30 Mar 2009 09:28:16 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2U9SGl6071786; Mon, 30 Mar 2009 09:28:16 GMT (envelope-from phk@critter.freebsd.dk) To: Jase Thew From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 30 Mar 2009 10:13:21 +0100." <49D08D31.1050209@beardz.net> Date: Mon, 30 Mar 2009 09:28:16 +0000 Message-ID: <71785.1238405296@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org, Chuck Robey , John Hein Subject: Re: Final sanity pass: xdev X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 09:28:18 -0000 In message <49D08D31.1050209@beardz.net>, Jase Thew writes: >Poul-Henning Kamp wrote: > >> [2] If we do it, I would still argue for Tcl, because it is built to >> be embedded, and small enough that you can put it into programs >> like inetd, syslogd and similar[3] >> > >Wouldn't those properties mean that Lua is actually a better choice? ;) http://maps.google.com/maps?ll=48.853024,2.349711&spn=0.001318,0.002701 -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 09:31:12 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 214EC1065672 for ; Mon, 30 Mar 2009 09:31:12 +0000 (UTC) (envelope-from bazerka@beardz.net) Received: from mx-2.btshosting.co.uk (mx-2.btshosting.co.uk [87.117.208.79]) by mx1.freebsd.org (Postfix) with ESMTP id C743C8FC0A for ; Mon, 30 Mar 2009 09:31:11 +0000 (UTC) (envelope-from bazerka@beardz.net) Received: from localhost (mx-2.btshosting.co.uk [87.117.208.79]) by mx-2.btshosting.co.uk (Postfix) with ESMTP id 520B46E54FA; Mon, 30 Mar 2009 09:13:27 +0000 (UTC) Received: from mx-2.btshosting.co.uk ([87.117.208.79]) by localhost (mx-2.btshosting.co.uk [87.117.208.79]) (amavisd-maia, port 10024) with ESMTP id 27055-09; Mon, 30 Mar 2009 09:13:26 +0000 (UTC) Received: from mx-2.btshosting.co.uk (mx-2.btshosting.co.uk [87.117.208.79]) by mx-2.btshosting.co.uk (Postfix) with ESMTP id 62C716E5411; Mon, 30 Mar 2009 09:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=beardz.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=postfix; bh=GPpp0n4m7 pjp+beM2dxDqcDvIuLn2GLm6VPPJNAW+Nk=; b=QWdh4zd7OFxveIa3vkLEWoYtk y+2k3uIAZ58vQxhdS5cSFLcezeeTx/BDGud0Ak/FXqhyr6ZRDppdrZqViM88IlVO gTIITHv35pFRglRovyH73I0KjK9JHpvsr2Emz7d6EPnyvgebABukXX3R+TK8WZTH brf9fldwwiEGCK3tII= DomainKey-Signature: a=rsa-sha1; c=nofws; d=beardz.net; h=message-id:date :from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=postfix; b=DUG 8LefwO/Vu8onN66l+mGlivdIlF3Q8giQtIPLXj8ZSzTFHfp1HPJPIdq6KwlTteVk c3C/JLClhjnlMAV+tFKCfBGsK4rBMQOFDRl5ybRff+buYu4aowxJ6pbRbAMtk270 Luh4F8momX6tED4mXcaArpnWuWJMzc4KG5Y7Kb2Q= Received: from [192.168.1.65] (host86-166-255-136.range86-166.btcentralplus.com [86.166.255.136]) (Authenticated sender: bazerka@beardz.net) by mx-2.btshosting.co.uk (Postfix) with ESMTPA id 1291D6E5402; Mon, 30 Mar 2009 09:13:26 +0000 (UTC) Message-ID: <49D08D31.1050209@beardz.net> Date: Mon, 30 Mar 2009 10:13:21 +0100 From: Jase Thew User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Poul-Henning Kamp References: <10067.1238399116@critter.freebsd.dk> In-Reply-To: <10067.1238399116@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard Cc: arch@freebsd.org, Chuck Robey , John Hein Subject: Re: Final sanity pass: xdev X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 09:31:12 -0000 Poul-Henning Kamp wrote: > [2] If we do it, I would still argue for Tcl, because it is built to > be embedded, and small enough that you can put it into programs > like inetd, syslogd and similar[3] > Wouldn't those properties mean that Lua is actually a better choice? ;) Regards, Jase. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 11:06:49 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46C421065676 for ; Mon, 30 Mar 2009 11:06:49 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 193038FC4A for ; Mon, 30 Mar 2009 11:06:49 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n2UB6mor054669 for ; Mon, 30 Mar 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n2UB6mi6054665 for freebsd-arch@FreeBSD.org; Mon, 30 Mar 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 30 Mar 2009 11:06:48 GMT Message-Id: <200903301106.n2UB6mi6054665@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 11:06:49 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 15:04:05 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69F9C1065673 for ; Mon, 30 Mar 2009 15:04:05 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from skerryvore.cs.uoguelph.ca (skerryvore.cs.uoguelph.ca [131.104.94.204]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE788FC08 for ; Mon, 30 Mar 2009 15:04:04 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by skerryvore.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id n2UF43B9020374 for ; Mon, 30 Mar 2009 11:04:04 -0400 Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n2UF9tm15770 for ; Mon, 30 Mar 2009 11:09:55 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Mon, 30 Mar 2009 11:09:55 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: freebsd-arch@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.63 on 131.104.94.204 Subject: Unique machine identifier for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 15:04:05 -0000 An nfsv4 client needs a unique identifier that is persistent across reboots. My code currently uses the MAC address of the first net interface that it can find that has an Ethernet style MAC. There are two problems with this: 1 - If it can't find a net interface with a MAC, it falls back on a randomly generated identifier, which changes when it is rebooted. 2 - The code that finds the MAC breaks layering (ie knows stuff about the network code like struct ifnet) and only builds if "options VIMAGE_GLOBALS" is set. Can anyone suggest a better way to do this? If not, would it be reasonable to put a function in sys/net that returns a MAC address if it can find one? (At least this gets around the "options VIMAGE_GLOBALS" issue.) Thanks in advance for any help, rick From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 15:29:17 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 613B0106566C for ; Mon, 30 Mar 2009 15:29:16 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id ED4808FC12 for ; Mon, 30 Mar 2009 15:29:15 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DE5641CE9A; Mon, 30 Mar 2009 17:29:14 +0200 (CEST) Date: Mon, 30 Mar 2009 17:29:14 +0200 From: Ed Schouten To: Rick Macklem Message-ID: <20090330152914.GW73108@hoeg.nl> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1gsfN/+pS0/2Ta7u" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Arch Subject: Re: Unique machine identifier for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 15:29:17 -0000 --1gsfN/+pS0/2Ta7u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Rick Macklem wrote: > An nfsv4 client needs a unique identifier that is persistent across > reboots. My code currently uses the MAC address of the first net > interface that it can find that has an Ethernet style MAC. Don't we generate a unique uuid on startup? It is stored in the kern.hostuuid sysctl. --=20 Ed Schouten WWW: http://80386.nl/ --1gsfN/+pS0/2Ta7u Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknQ5UoACgkQ52SDGA2eCwUVQwCaA2LVsBYcWNAP8NFpSV+7EKpD p40An0eSPu+48lVyAAv3IJdJC/VZ0E9h =Ge1Z -----END PGP SIGNATURE----- --1gsfN/+pS0/2Ta7u-- From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 15:33:52 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA0E106564A for ; Mon, 30 Mar 2009 15:33:52 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id A09F08FC1B for ; Mon, 30 Mar 2009 15:33:52 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C86251CEBB; Mon, 30 Mar 2009 17:33:51 +0200 (CEST) Date: Mon, 30 Mar 2009 17:33:51 +0200 From: Ed Schouten To: Rick Macklem Message-ID: <20090330153351.GX73108@hoeg.nl> References: <20090330152914.GW73108@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v6gilOcl2gU05R9Q" Content-Disposition: inline In-Reply-To: <20090330152914.GW73108@hoeg.nl> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Arch Subject: Re: Unique machine identifier for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 15:33:53 -0000 --v6gilOcl2gU05R9Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ed Schouten wrote: > Don't we generate a unique uuid on startup? It is stored in the ^^^^^^^ > kern.hostuuid sysctl. Errrr... I mean: it gets generated when booting FreeBSD the for first time. --=20 Ed Schouten WWW: http://80386.nl/ --v6gilOcl2gU05R9Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknQ5l8ACgkQ52SDGA2eCwU11wCdFKfK/Xg9LMfg9vHqhpl0ETrL yLYAn27YUNbIp5BrzY6G96EHsOQuzELr =Jily -----END PGP SIGNATURE----- --v6gilOcl2gU05R9Q-- From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 15:41:58 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F31E1065687 for ; Mon, 30 Mar 2009 15:41:58 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 848898FC1B for ; Mon, 30 Mar 2009 15:41:57 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ey-out-2122.google.com with SMTP id 4so415939eyf.7 for ; Mon, 30 Mar 2009 08:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-pgp-agent:x-mailer; bh=2Bpp0ZQaoj9GOEvjskAo4RK5Y3RdLkO3uxM8yoNA1aA=; b=cWToYe3C17XPYoveYIz6eaJ2NgoEpZ5ARUc8Ib7RvOjQ4fJppeNWMAo6VzT2I8cV6Y NjJUgGBEPkzPTNKvM+w0T0IxBgA344CCbgDICBM1PoKdn3859+s5+z1TZy2+sG4JLsby oYMkDxb8InlwU4lRjaSTgO8TfR/PqFDuq6bnc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-pgp-agent:x-mailer; b=TDu8fuqHyIFr+ZlMJKVqkGpT+lNiHu7Obf7TLfLc38mvzLdk9Z7uXyFvOvZKwtI7ZT fcSMGhAWyCBWXaYdsmjc8gLg2ymgXp2AQJcnSDuIQWVIS7brCyG0oA1OHHwwRY5tnIvS xufMHSGA5DLCMlh+6vgUS1PnOPQn3tFNOJwg8= Received: by 10.216.18.212 with SMTP id l62mr1691999wel.76.1238426058722; Mon, 30 Mar 2009 08:14:18 -0700 (PDT) Received: from epsilon.lan (bl5-225-84.dsl.telepac.pt [82.154.225.84]) by mx.google.com with ESMTPS id u14sm8632189gvf.31.2009.03.30.08.14.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Mar 2009 08:14:18 -0700 (PDT) Sender: Rui Paulo Message-Id: <3E2EA002-4C26-4D44-ACEE-AD0F782F268E@freebsd.org> From: Rui Paulo To: Rick Macklem In-Reply-To: Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-2-273330164" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 30 Mar 2009 16:14:11 +0100 References: X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Cc: freebsd-arch@freebsd.org Subject: Re: Unique machine identifier for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 15:42:00 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-2-273330164 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 30 Mar 2009, at 16:09, Rick Macklem wrote: > An nfsv4 client needs a unique identifier that is persistent across > reboots. My code currently uses the MAC address of the first net > interface that it can find that has an Ethernet style MAC. > > There are two problems with this: > 1 - If it can't find a net interface with a MAC, it falls back on a > randomly generated identifier, which changes when it is rebooted. > 2 - The code that finds the MAC breaks layering (ie knows stuff about > the network code like struct ifnet) and only builds if > "options VIMAGE_GLOBALS" is set. This doesn't answer the question, but have you thought about the possibility of the using the UUID that the system provides? A lot of new machines come with UUIDs. -- Rui Paulo --Apple-Mail-2-273330164 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAknQ4cMACgkQfD8M/ASTygKW8wCgvZ5+kgElJgiAONT1TvAwIoaT tVIAn1ffeuex8Jb1xMdw9G5+Qb8Bko+D =hT3V -----END PGP SIGNATURE----- --Apple-Mail-2-273330164-- From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 15:47:28 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA2751065723 for ; Mon, 30 Mar 2009 15:47:28 +0000 (UTC) (envelope-from gordon.tetlow@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by mx1.freebsd.org (Postfix) with ESMTP id 7A2278FC12 for ; Mon, 30 Mar 2009 15:47:28 +0000 (UTC) (envelope-from gordon.tetlow@gmail.com) Received: by wa-out-1112.google.com with SMTP id m38so1477614waf.27 for ; Mon, 30 Mar 2009 08:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=CylDnbh4jQz/6szKAMqFKwwwS//FoVJz6GK3vCGZA+4=; b=l2Wzd2u6yPIjYejvxlmUPfjANDKD4aeIJXuYXEx9XBG/Y1VHXR0HIMZWtuHNuvvhzM aR93pv+oZGUOBYKkcsnehOXOkZ0LMLonux7inrsG8CZWXgaFuYghMwgkJG8YIoVUTBb/ uVkLL+PwB8j9chJqNQR3XyF51x6KaJWLqVIIg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=Pum84+9UMs5nZ8Ptb1Zc+fmGoPVC7kFy3KNW5z1H2x3Obc/4gkV38XJjXqzDCjSxiG itWjQn0JDtqGOp8zDsZylIh/Q7ATHE/ZYgt3TYhmFE5r/nIxooHtpGGqkWP/wjjiG91M cWOlZd7N+/dt49S9Pwr+MXdqHjtoAKbX+Hbsw= MIME-Version: 1.0 Sender: gordon.tetlow@gmail.com Received: by 10.114.149.8 with SMTP id w8mr3671205wad.39.1238426747215; Mon, 30 Mar 2009 08:25:47 -0700 (PDT) In-Reply-To: References: Date: Mon, 30 Mar 2009 08:25:47 -0700 X-Google-Sender-Auth: e5940ced94e78407 Message-ID: <4e571dd70903300825q63b4344bhdee6ba7c54c2deab@mail.gmail.com> From: Gordon Tetlow To: Rick Macklem Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-arch@freebsd.org Subject: Re: Unique machine identifier for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 15:47:29 -0000 On Mon, Mar 30, 2009 at 8:09 AM, Rick Macklem wrote: > An nfsv4 client needs a unique identifier that is persistent across > reboots. My code currently uses the MAC address of the first net > interface that it can find that has an Ethernet style MAC. > > There are two problems with this: > 1 - If it can't find a net interface with a MAC, it falls back on a > randomly generated identifier, which changes when it is rebooted. > 2 - The code that finds the MAC breaks layering (ie knows stuff about > the network code like struct ifnet) and only builds if > "options VIMAGE_GLOBALS" is set. > > Can anyone suggest a better way to do this? > > If not, would it be reasonable to put a function in sys/net that returns > a MAC address if it can find one? (At least this gets around the > "options VIMAGE_GLOBALS" issue.) > There is a uuid that is generated at first boot and persistent. Check /etc/rc.d/hostid. It sets kern.hostuuid and kern.hostid. Gordon From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 17:01:57 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEA30106566B for ; Mon, 30 Mar 2009 17:01:57 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from acadia.cs.uoguelph.ca (acadia.cs.uoguelph.ca [131.104.94.221]) by mx1.freebsd.org (Postfix) with ESMTP id 722218FC13 for ; Mon, 30 Mar 2009 17:01:57 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by acadia.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id n2UH1uBI025849; Mon, 30 Mar 2009 13:01:56 -0400 Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n2UH7m804660; Mon, 30 Mar 2009 13:07:48 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Mon, 30 Mar 2009 13:07:48 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Gordon Tetlow In-Reply-To: <4e571dd70903300825q63b4344bhdee6ba7c54c2deab@mail.gmail.com> Message-ID: References: <4e571dd70903300825q63b4344bhdee6ba7c54c2deab@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.63 on 131.104.94.221 Cc: freebsd-arch@freebsd.org Subject: Re: Unique machine identifier for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 17:01:58 -0000 On Mon, 30 Mar 2009, Gordon Tetlow wrote: > > There is a uuid that is generated at first boot and persistent. Check > /etc/rc.d/hostid. It sets kern.hostuuid and kern.hostid. > Duh (as Homer S might say;-). Yep, that should work just fine. From a quick glance at the rc.d script, the sysctl that loads it into the kernel happens before any nfs client stuff. (I also noticed that kern_uuid.c has a routine that gets a MAC, but I won't even need it.) Thanks everyone for the replies, rick From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 18:33:23 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F47F10656CC for ; Mon, 30 Mar 2009 18:33:23 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout021.mac.com (asmtpout021.mac.com [17.148.16.96]) by mx1.freebsd.org (Postfix) with ESMTP id 1053F8FC1C for ; Mon, 30 Mar 2009 18:33:22 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Received: from iphone-5.jnpr.net ([66.129.224.36]) by asmtp021.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KHB006RLY3H1N70@asmtp021.mac.com> for arch@freebsd.org; Mon, 30 Mar 2009 10:33:18 -0700 (PDT) Message-id: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> From: Marcel Moolenaar To: FreeBSD Arch Date: Mon, 30 Mar 2009 10:31:56 -0700 X-Mailer: Apple Mail (2.930.3) Cc: Subject: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 18:33:23 -0000 All, I've often found myself going over the existing error codes in search for one that seems to match best or is the least unsuitable. This begs the question: what is stopping us from adding new error codes? With so many drivers returning ENXIO whenever something (i.e anything) is wrong, how meaningful is ENXIO in diagnosing problems? What do the various standards dictate or allow us to do? -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 18:43:30 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F43C106564A for ; Mon, 30 Mar 2009 18:43:30 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id C612D8FC13 for ; Mon, 30 Mar 2009 18:43:29 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 7D2B878CCF; Mon, 30 Mar 2009 18:43:28 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2UIhRJp093379; Mon, 30 Mar 2009 18:43:28 GMT (envelope-from phk@critter.freebsd.dk) To: Marcel Moolenaar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 30 Mar 2009 10:31:56 MST." <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> Date: Mon, 30 Mar 2009 18:43:27 +0000 Message-ID: <93378.1238438607@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: FreeBSD Arch Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 18:43:30 -0000 In message <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com>, Marcel Moolenaar wri tes: >With so many drivers returning ENXIO whenever something (i.e >anything) is wrong, how meaningful is ENXIO in diagnosing >problems? > >What do the various standards dictate or allow us to do? Long time ago, I proposed a scheme where a process can register a userland error-text buffer with the kernel. Whenever a system call returns with error, the kernel has the opportunity to write an explanatory text in the registered buffer (if there is one). That is not only backwards and standards compatible, but it is also much more expressive than errno. If we start with teaching err(3) function about it, we even get a lot of coverage right away. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 19:13:52 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7376106564A for ; Mon, 30 Mar 2009 19:13:52 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 86AAB8FC17 for ; Mon, 30 Mar 2009 19:13:52 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n2UIts3b091715; Mon, 30 Mar 2009 11:55:54 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id ru482dr4ndgt8n5gyfgtiyv3ii; Mon, 30 Mar 2009 11:55:54 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <49D115B9.7030501@freebsd.org> Date: Mon, 30 Mar 2009 11:55:53 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.19) Gecko/20090226 SeaMonkey/1.1.14 MIME-Version: 1.0 To: Poul-Henning Kamp References: <93378.1238438607@critter.freebsd.dk> In-Reply-To: <93378.1238438607@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Arch , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 19:13:53 -0000 Poul-Henning Kamp wrote: > In message <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com>, Marcel Moolenaar wri > tes: > >> With so many drivers returning ENXIO whenever something (i.e >> anything) is wrong, how meaningful is ENXIO in diagnosing >> problems? >> >> What do the various standards dictate or allow us to do? POSIX does specify the range of allowable error codes for a lot of system calls, but not all. In my experience, straying outside of that causes more problems than it's worth. A lot of programs make error-recovery decisions based on errno values and that can get to be a portability headache rather quickly (remember that for most software, the default is going to be "if you don't recognize the errno value, exit with a fatal error.") > Long time ago, I proposed a scheme where a process can register > a userland error-text buffer with the kernel. > > Whenever a system call returns with error, the kernel has the > opportunity to write an explanatory text in the registered > buffer (if there is one). > > That is not only backwards and standards compatible, but it is also > much more expressive than errno. > > If we start with teaching err(3) function about it, we even get > a lot of coverage right away. This is the right direction: Basically, add a new variable that augments errno instead of extending the possible values of errno. One variation, though: I would argue for another integer variable (errno_fine?) so that translations can be done in userland (instead of having to deal with I18N in the kernel) but the principle is still sound. Tim From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 19:32:44 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D05121065687 for ; Mon, 30 Mar 2009 19:32:44 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 8B2C78FC0C for ; Mon, 30 Mar 2009 19:32:44 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 6C8B578CCC; Mon, 30 Mar 2009 19:32:43 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2UJWhhR093865; Mon, 30 Mar 2009 19:32:43 GMT (envelope-from phk@critter.freebsd.dk) To: Tim Kientzle From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 30 Mar 2009 11:55:53 MST." <49D115B9.7030501@freebsd.org> Date: Mon, 30 Mar 2009 19:32:43 +0000 Message-ID: <93864.1238441563@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: FreeBSD Arch , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 19:32:45 -0000 In message <49D115B9.7030501@freebsd.org>, Tim Kientzle writes: >This is the right direction: Basically, add a new variable >that augments errno instead of extending the possible values of >errno. One variation, though: I would argue for another >integer variable (errno_fine?) so that translations can be >done in userland (instead of having to deal with I18N in >the kernel) but the principle is still sound. The probelm with an integer is that you cannot give details like: "partition 3 overlaps bootcode" without precreating the N^2 possible messages of that kind. I'm very sympathetic to the I18N crowd, but I just don't see a sensible solution apart from: "Live with it". Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 19:50:05 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA3010657C6; Mon, 30 Mar 2009 19:50:05 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 579398FC1B; Mon, 30 Mar 2009 19:50:05 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DA23A1CEBB; Mon, 30 Mar 2009 21:50:03 +0200 (CEST) Date: Mon, 30 Mar 2009 21:50:03 +0200 From: Ed Schouten To: Tim Kientzle Message-ID: <20090330195003.GB73108@hoeg.nl> References: <93378.1238438607@critter.freebsd.dk> <49D115B9.7030501@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jE+K4o1MICf3EEet" Content-Disposition: inline In-Reply-To: <49D115B9.7030501@freebsd.org> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Arch , Poul-Henning Kamp , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 19:50:06 -0000 --jE+K4o1MICf3EEet Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tim Kientzle wrote: > POSIX does specify the range of allowable error codes > for a lot of system calls, but not all. In my experience, > straying outside of that causes more problems than it's > worth. A lot of programs make error-recovery decisions > based on errno values and that can get to be a portability > headache rather quickly (remember that for most software, > the default is going to be "if you don't recognize the errno > value, exit with a fatal error.") Create a new system call that allows you to obtain a more accurate error code afterwards. We should probably call this function GetLastError(). --=20 Ed Schouten WWW: http://80386.nl/ --jE+K4o1MICf3EEet Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknRImsACgkQ52SDGA2eCwXBbwCcDz+uWpuDzx6Qq+MstzoBzPSF xKkAniV6c+8vAMkyGdHe3sekZRuKfmpU =AXqT -----END PGP SIGNATURE----- --jE+K4o1MICf3EEet-- From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 19:50:06 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE6C410657DE; Mon, 30 Mar 2009 19:50:06 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6235F8FC12; Mon, 30 Mar 2009 19:50:06 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n2UJXmMi000876; Mon, 30 Mar 2009 15:33:48 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Mon, 30 Mar 2009 15:33:48 -0400 (EDT) Date: Mon, 30 Mar 2009 15:33:48 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Tim Kientzle In-Reply-To: <49D115B9.7030501@freebsd.org> Message-ID: References: <93378.1238438607@critter.freebsd.dk> <49D115B9.7030501@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Arch , Poul-Henning Kamp , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 19:50:10 -0000 On Mon, 30 Mar 2009, Tim Kientzle wrote: > Poul-Henning Kamp wrote: >> In message <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com>, Marcel Moolenaar >> wri >> tes: >> >>> With so many drivers returning ENXIO whenever something (i.e >>> anything) is wrong, how meaningful is ENXIO in diagnosing >>> problems? >>> >>> What do the various standards dictate or allow us to do? > > POSIX does specify the range of allowable error codes > for a lot of system calls, but not all. In my experience, > straying outside of that causes more problems than it's > worth. A lot of programs make error-recovery decisions > based on errno values and that can get to be a portability > headache rather quickly (remember that for most software, > the default is going to be "if you don't recognize the errno > value, exit with a fatal error.") > >> Long time ago, I proposed a scheme where a process can register >> a userland error-text buffer with the kernel. >> >> Whenever a system call returns with error, the kernel has the >> opportunity to write an explanatory text in the registered >> buffer (if there is one). >> >> That is not only backwards and standards compatible, but it is also >> much more expressive than errno. >> >> If we start with teaching err(3) function about it, we even get >> a lot of coverage right away. > > This is the right direction: Basically, add a new variable > that augments errno instead of extending the possible values of > errno. One variation, though: I would argue for another > integer variable (errno_fine?) so that translations can be > done in userland (instead of having to deal with I18N in > the kernel) but the principle is still sound. Just add the other error values in the upper half of the word, and have __errno() return with the upper half masked out. VxWorks doesn't something similar with their errno, the lower half is the error and they use the upper half to identify the module from which it came. -- DE From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 20:02:56 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 934731065675; Mon, 30 Mar 2009 20:02:56 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 4FECC8FC24; Mon, 30 Mar 2009 20:02:56 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 0A52278CCC; Mon, 30 Mar 2009 20:02:54 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2UK2rPF093980; Mon, 30 Mar 2009 20:02:54 GMT (envelope-from phk@critter.freebsd.dk) To: Ed Schouten From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 30 Mar 2009 21:50:03 +0200." <20090330195003.GB73108@hoeg.nl> Date: Mon, 30 Mar 2009 20:02:53 +0000 Message-ID: <93979.1238443373@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: FreeBSD Arch , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 20:02:57 -0000 In message <20090330195003.GB73108@hoeg.nl>, Ed Schouten writes: >Create a new system call that allows you to obtain a more accurate error >code afterwards. We should probably call this function GetLastError(). You have to produce the errorinformation on the spot, we don't want to keep old error messages lingering in case people will ask for them later. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 20:47:56 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B9EC106564A; Mon, 30 Mar 2009 20:47:56 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 0E3EF8FC0A; Mon, 30 Mar 2009 20:47:56 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 634761CE9A; Mon, 30 Mar 2009 22:47:55 +0200 (CEST) Date: Mon, 30 Mar 2009 22:47:55 +0200 From: Ed Schouten To: Poul-Henning Kamp Message-ID: <20090330204755.GC73108@hoeg.nl> References: <20090330195003.GB73108@hoeg.nl> <93979.1238443373@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y1+kC1Q2udlVMFpc" Content-Disposition: inline In-Reply-To: <93979.1238443373@critter.freebsd.dk> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Arch , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 20:47:56 -0000 --y1+kC1Q2udlVMFpc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Poul-Henning Kamp wrote: > In message <20090330195003.GB73108@hoeg.nl>, Ed Schouten writes: >=20 >=20 > >Create a new system call that allows you to obtain a more accurate error > >code afterwards. We should probably call this function GetLastError(). >=20 > You have to produce the errorinformation on the spot, we don't want > to keep old error messages lingering in case people will ask for > them later. You know I was making a joke, right? http://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx ;-) --=20 Ed Schouten WWW: http://80386.nl/ --y1+kC1Q2udlVMFpc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknRL/sACgkQ52SDGA2eCwXoYwCcDyUwlWRhV7oGFovQWgqLc/9+ JuAAnjMOmpAum2fwk3YXbN9sA9XPw8RO =OQo/ -----END PGP SIGNATURE----- --y1+kC1Q2udlVMFpc-- From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 21:35:19 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BE441065821 for ; Mon, 30 Mar 2009 21:35:19 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from skerryvore.cs.uoguelph.ca (skerryvore.cs.uoguelph.ca [131.104.94.204]) by mx1.freebsd.org (Postfix) with ESMTP id 2C87A8FC1E for ; Mon, 30 Mar 2009 21:35:19 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by skerryvore.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id n2ULZI5u031313 for ; Mon, 30 Mar 2009 17:35:18 -0400 Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n2ULfB718791 for ; Mon, 30 Mar 2009 17:41:11 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Mon, 30 Mar 2009 17:41:11 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: freebsd-arch@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.63 on 131.104.94.204 Subject: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 21:35:23 -0000 Well, since the last one turned out to be too easy, here's one I think is a little tougher... The nfsv4 client needs to know an ip address for the machine, that can be used by servers to do callbacks on the client. I currently use the following, which I know isn't correct, but usually works ok: loopb = htonl(INADDR_LOOPBACK); TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { if (IA_SIN(ia)->sin_addr.s_addr != loopb) return (&(IA_SIN(ia)->sin_addr.s_addr)); } return (NULL); Now, I could just make it a constant set by an rc script (argument to the callback daemon or a sysctl variable), but that's a bother for laptops using dhcp and similar. I think allowing an argument to the callback daemon is a good fallback, but it would be nice if it didn't normally have to be set for things to work ok. Any ideas on how to do this? Thanks in advance for any help, rick ps: Part of the reason that the above loop doesn't seem to be good enough is that it requires "options VIMAGE_GLOBALS" to build. From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 22:00:41 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C5C3106564A for ; Mon, 30 Mar 2009 22:00:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outN.internet-mail-service.net (outn.internet-mail-service.net [216.240.47.237]) by mx1.freebsd.org (Postfix) with ESMTP id 240DF8FC08 for ; Mon, 30 Mar 2009 22:00:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 19CF853305; Mon, 30 Mar 2009 14:49:59 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 1F6E32D603B; Mon, 30 Mar 2009 14:49:56 -0700 (PDT) Message-ID: <49D13E9C.8010005@elischer.org> Date: Mon, 30 Mar 2009 14:50:20 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Rick Macklem References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 22:00:41 -0000 Rick Macklem wrote: > Well, since the last one turned out to be too easy, here's one I think > is a little tougher... > > The nfsv4 client needs to know an ip address for the machine, that can > be used by servers to do callbacks on the client. I currently use the > following, which I know isn't correct, but usually works ok: > > loopb = htonl(INADDR_LOOPBACK); > TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { > if (IA_SIN(ia)->sin_addr.s_addr != loopb) > return (&(IA_SIN(ia)->sin_addr.s_addr)); > } > return (NULL); It's important that the address you use be an address that is in the same 'security domain' as the client.. The best way to do that is to find an address that is on the interface that will be used to send the packet out. So you want to do a route lookup so use rtalloc or friends (see route.c). you want to use the same code that is used in ip_output (or is it {udp/tcp}_output?) to fidn the local address when teh user specifies INADDR_ANY. > > Now, I could just make it a constant set by an rc script (argument to > the callback daemon or a sysctl variable), but that's a bother for > laptops using dhcp and similar. I think allowing an argument to the > callback daemon is a good fallback, but it would be nice if it didn't > normally have to be set for things to work ok. > > Any ideas on how to do this? > > Thanks in advance for any help, rick > ps: Part of the reason that the above loop doesn't seem to be good > enough is that it requires "options VIMAGE_GLOBALS" to build. > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 22:35:25 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0005106566B; Mon, 30 Mar 2009 22:35:25 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9AD8FC16; Mon, 30 Mar 2009 22:35:25 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n2UMZOiH094170; Mon, 30 Mar 2009 15:35:24 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id rejmf2sm78zt7hd2scij7fb65a; Mon, 30 Mar 2009 15:35:24 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <49D1492C.5050101@freebsd.org> Date: Mon, 30 Mar 2009 15:35:24 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.19) Gecko/20090226 SeaMonkey/1.1.14 MIME-Version: 1.0 To: Daniel Eischen References: <93378.1238438607@critter.freebsd.dk> <49D115B9.7030501@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Arch , Poul-Henning Kamp , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 22:35:26 -0000 Marcel Moolenar suggests adding new values of errno to further distinguish error conditions, leading to the following comments: Daniel Eischen wrote: > On Mon, 30 Mar 2009, Tim Kientzle wrote: >> Poul-Henning Kamp wrote: >>> Long time ago, I proposed a scheme where a process can register >>> a userland error-text buffer with the kernel. >> >> This is the right direction: Basically, add a new variable >> that augments errno instead of extending the possible values of >> errno. > > Just add the other error values in the upper half of the > word, and have __errno() return with the upper half > masked out. VxWorks doesn't something similar with > their errno,... I thought of that, but it won't work. Old binaries exist and you don't want to version every single system call. Poul-Henning Kamp wrote: > The probelm with an integer is that you cannot give details > like: > "partition 3 overlaps bootcode" > without precreating the N^2 possible messages of that kind. The standard solution if you need variable parameters, of course, is to pass the parameters back: int code: EPARTITIONOVERLAPSBOOTCODE char *default_text: "partition %1d overlaps bootcode" arg1: 3 This provides everything necessary for libc to generate an appropriate translated text. The "default_text" return is a common tweak, mostly to to make the code at the error source easier to read, though it also helps the consumer to provide something even when the translation catalogs are missing or damaged. Note that the code at the error source is essentially the same either way: generate_error(EPARTITIONOVERLAPSBOOTCODE, "partition %1d overlaps bootcode", partno); but the varargs values get passed back to userland to be formatted instead of being formatted in the kernel. Tim From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 05:22:23 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD714106564A; Tue, 31 Mar 2009 05:22:23 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 99DC68FC28; Tue, 31 Mar 2009 05:22:23 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 660E378CE4; Tue, 31 Mar 2009 05:22:22 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2V5MLkR095824; Tue, 31 Mar 2009 05:22:22 GMT (envelope-from phk@critter.freebsd.dk) To: Tim Kientzle From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 30 Mar 2009 15:35:24 MST." <49D1492C.5050101@freebsd.org> Date: Tue, 31 Mar 2009 05:22:21 +0000 Message-ID: <95823.1238476941@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Daniel Eischen , FreeBSD Arch , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 05:22:24 -0000 In message <49D1492C.5050101@freebsd.org>, Tim Kientzle writes: >> The probelm with an integer is that you cannot give details >> like: >> "partition 3 overlaps bootcode" >> without precreating the N^2 possible messages of that kind. > >The standard solution if you need variable parameters, >of course, is to pass the parameters back: > int code: EPARTITIONOVERLAPSBOOTCODE > char *default_text: "partition %1d overlaps bootcode" > arg1: 3 And the "standard" solution is stupid and useless, because more often than not, some language, typically french, will want the arguments in the opposite order... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 06:32:09 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7ABC106567A for ; Tue, 31 Mar 2009 06:32:09 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 951C28FC19 for ; Tue, 31 Mar 2009 06:32:09 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n2V6Vxt8009349; Tue, 31 Mar 2009 02:31:59 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n2V6VxDx009348; Tue, 31 Mar 2009 02:31:59 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 31 Mar 2009 02:31:59 -0400 From: David Schultz To: Poul-Henning Kamp Message-ID: <20090331063159.GA9265@zim.MIT.EDU> Mail-Followup-To: Poul-Henning Kamp , Tim Kientzle , Daniel Eischen , FreeBSD Arch , Marcel Moolenaar References: <49D1492C.5050101@freebsd.org> <95823.1238476941@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95823.1238476941@critter.freebsd.dk> Cc: Daniel Eischen , FreeBSD Arch , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 06:32:10 -0000 On Tue, Mar 31, 2009, Poul-Henning Kamp wrote: > In message <49D1492C.5050101@freebsd.org>, Tim Kientzle writes: > > >> The probelm with an integer is that you cannot give details > >> like: > >> "partition 3 overlaps bootcode" > >> without precreating the N^2 possible messages of that kind. > > > >The standard solution if you need variable parameters, > >of course, is to pass the parameters back: > > int code: EPARTITIONOVERLAPSBOOTCODE > > char *default_text: "partition %1d overlaps bootcode" > > arg1: 3 > > And the "standard" solution is stupid and useless, because more > often than not, some language, typically french, will want the > arguments in the opposite order... You could get the extensibility you're looking for without annoying the i18n folks by making the strings conform to a simple machine-parsable grammar. For instance, the above might be: "geom:part:overlaps bootcode(3)" A user-level library function could parse this, look up a natural language translation in a locale-specific database, and fall back on a generic format if no translation is available. From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 06:44:55 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 223A9106566B; Tue, 31 Mar 2009 06:44:55 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id D5D528FC19; Tue, 31 Mar 2009 06:44:54 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id AC8E973098; Tue, 31 Mar 2009 08:49:59 +0200 (CEST) Date: Tue, 31 Mar 2009 08:49:59 +0200 From: Luigi Rizzo To: Poul-Henning Kamp Message-ID: <20090331064959.GA3516@onelab2.iet.unipi.it> References: <49D1492C.5050101@freebsd.org> <95823.1238476941@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95823.1238476941@critter.freebsd.dk> User-Agent: Mutt/1.4.2.3i Cc: Daniel Eischen , FreeBSD Arch , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 06:44:55 -0000 On Tue, Mar 31, 2009 at 05:22:21AM +0000, Poul-Henning Kamp wrote: > In message <49D1492C.5050101@freebsd.org>, Tim Kientzle writes: > > >> The probelm with an integer is that you cannot give details > >> like: > >> "partition 3 overlaps bootcode" > >> without precreating the N^2 possible messages of that kind. > > > >The standard solution if you need variable parameters, > >of course, is to pass the parameters back: > > int code: EPARTITIONOVERLAPSBOOTCODE > > char *default_text: "partition %1d overlaps bootcode" > > arg1: 3 > > And the "standard" solution is stupid and useless, because more > often than not, some language, typically french, will want the > arguments in the opposite order... we are probably digressing but printf in glibc has specifiers to indicate which argument you want to use for each format. http://www.gnu.org/software/hello/manual/libc/Output-Conversion-Syntax.html I suppose this takes an extra pass over the format string to collect the proper type info for all arguments, so it is not not a dramatic change in the implementation of *printf. cheers luigi From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 06:46:30 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16BDA1065670; Tue, 31 Mar 2009 06:46:30 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id CC6AC8FC14; Tue, 31 Mar 2009 06:46:29 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 8A79E78CCD; Tue, 31 Mar 2009 06:46:28 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2V6kRjR096315; Tue, 31 Mar 2009 06:46:28 GMT (envelope-from phk@critter.freebsd.dk) To: Luigi Rizzo From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 31 Mar 2009 08:49:59 +0200." <20090331064959.GA3516@onelab2.iet.unipi.it> Date: Tue, 31 Mar 2009 06:46:27 +0000 Message-ID: <96314.1238481987@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Daniel Eischen , FreeBSD Arch , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 06:46:30 -0000 In message <20090331064959.GA3516@onelab2.iet.unipi.it>, Luigi Rizzo writes: >we are probably digressing but printf in glibc has specifiers to >indicate which argument you want to use for each format. > >http://www.gnu.org/software/hello/manual/libc/Output-Conversion-Syntax.html > >I suppose this takes an extra pass over the format string to collect >the proper type info for all arguments, so it is not >not a dramatic change in the implementation of *printf. Yeah, we have that crap too, and you can see how messy and slow our printf became as a result in SVN. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 06:48:36 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6F891065670; Tue, 31 Mar 2009 06:48:36 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 725978FC15; Tue, 31 Mar 2009 06:48:36 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 8F7BC78CCD; Tue, 31 Mar 2009 06:48:35 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2V6mZ22096333; Tue, 31 Mar 2009 06:48:35 GMT (envelope-from phk@critter.freebsd.dk) To: David Schultz From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 31 Mar 2009 02:31:59 -0400." <20090331063159.GA9265@zim.MIT.EDU> Date: Tue, 31 Mar 2009 06:48:35 +0000 Message-ID: <96332.1238482115@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Daniel Eischen , FreeBSD Arch , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 06:48:37 -0000 In message <20090331063159.GA9265@zim.MIT.EDU>, David Schultz writes: >You could get the extensibility you're looking for without >annoying the i18n folks by making the strings conform to a simple >machine-parsable grammar. For instance, the above might be: > "geom:part:overlaps bootcode(3)" >A user-level library function could parse this, look up a natural >language translation in a locale-specific database, and fall back >on a generic format if no translation is available. Or maybe emit all messages in Esparanto and use automatic translation ? Seriously, I don't see anybody advocating that dmesg(1) output be translated, so until such time as somebody starts that pointless project, I think we can leave error messages from the kernel in the same language as pretty much everything else in our system: English. Don't overengineer it guys. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 06:50:43 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A00CD106566B; Tue, 31 Mar 2009 06:50:43 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 603648FC12; Tue, 31 Mar 2009 06:50:43 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 263CD730A4; Tue, 31 Mar 2009 08:55:48 +0200 (CEST) Date: Tue, 31 Mar 2009 08:55:48 +0200 From: Luigi Rizzo To: Poul-Henning Kamp Message-ID: <20090331065548.GA3851@onelab2.iet.unipi.it> References: <20090331064959.GA3516@onelab2.iet.unipi.it> <96314.1238481987@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96314.1238481987@critter.freebsd.dk> User-Agent: Mutt/1.4.2.3i Cc: Daniel Eischen , FreeBSD Arch , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 06:50:43 -0000 On Tue, Mar 31, 2009 at 06:46:27AM +0000, Poul-Henning Kamp wrote: > In message <20090331064959.GA3516@onelab2.iet.unipi.it>, Luigi Rizzo writes: > > >we are probably digressing but printf in glibc has specifiers to > >indicate which argument you want to use for each format. > > > >http://www.gnu.org/software/hello/manual/libc/Output-Conversion-Syntax.html > > > >I suppose this takes an extra pass over the format string to collect > >the proper type info for all arguments, so it is not > >not a dramatic change in the implementation of *printf. > > Yeah, we have that crap too, and you can see how messy and slow our > printf became as a result in SVN. I have never run performance tests of printf, but it woudld be definitely interesting to figure out how expensive is the parsing of the format specifiers. cheers luigi From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 06:52:11 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41B9B1065672 for ; Tue, 31 Mar 2009 06:52:11 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (hergotha.csail.mit.edu [66.92.79.170]) by mx1.freebsd.org (Postfix) with ESMTP id EA1308FC30 for ; Tue, 31 Mar 2009 06:52:10 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.2/8.14.2) with ESMTP id n2V6KuSk072937; Tue, 31 Mar 2009 02:20:56 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.2/8.13.8/Submit) id n2V6Kudd072936; Tue, 31 Mar 2009 02:20:56 -0400 (EDT) (envelope-from wollman) Date: Tue, 31 Mar 2009 02:20:56 -0400 (EDT) From: Garrett Wollman Message-Id: <200903310620.n2V6Kudd072936@hergotha.csail.mit.edu> To: phk@phk.freebsd.dk X-Newsgroups: mit.lcs.mail.freebsd-arch In-Reply-To: <95823.1238476941@critter.freebsd.dk> References: <49D1492C.5050101@freebsd.org> Organization: None X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (hergotha.csail.mit.edu [127.0.0.1]); Tue, 31 Mar 2009 02:20:56 -0400 (EDT) X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hergotha.csail.mit.edu Cc: arch@freebsd.org Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 06:52:11 -0000 In article <95823.1238476941@critter.freebsd.dk>, phk@phk.freebsd.dk writes: >And the "standard" solution is stupid and useless, because more >often than not, some language, typically french, will want the >arguments in the opposite order... Which is why printf() supports putting the arguments in arbitrary order. A much more serious objection to this model is the desire someone will certainly have to use the %s format, with the attendent pain involved in moving variable-length strings along with the arguments across the user-kernel boundary. I'd much rather have plain integers, thank you very much. At most, a small structure, in which the only pointer is a reference to a user-space argument. (So [ENOENT] and [EACCES] could have an extended error code ECOMPONENTNAME which indicates that the pointer value is a substring of the pathname argument, and identifies the beginning of the pathname component being resolved when the failure occurred. You'd probably also want to have ENOTANERROR to indicate "error return indicates an expected success condition" and EFD to indicate "integer value is the file descriptor which caused the error condition.) But all this is really irrelevant if no other operating system or standard adopts the interface. Interfaces which are peculiar to FreeBSD are rarely useful. -GAWollman From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 11:15:11 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A57511065675; Tue, 31 Mar 2009 11:15:11 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:203:6dff:fe1a:4ddc]) by mx1.freebsd.org (Postfix) with ESMTP id 33E538FC1B; Tue, 31 Mar 2009 11:15:11 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id n2VBFHJZ081826 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 31 Mar 2009 07:15:17 -0400 (EDT) (envelope-from rrs@lakerest.net) Message-Id: From: Randall Stewart To: Poul-Henning Kamp In-Reply-To: <96332.1238482115@critter.freebsd.dk> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 31 Mar 2009 07:15:09 -0400 References: <96332.1238482115@critter.freebsd.dk> X-Mailer: Apple Mail (2.930.3) Cc: Daniel Eischen , FreeBSD Arch , David Schultz , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 11:15:12 -0000 P: I like your original idea best... its simple and seems to me a very positive way to go. Things that get complex tend to be avoided by application writers.. where simple things get picked up ;-) R On Mar 31, 2009, at 2:48 AM, Poul-Henning Kamp wrote: > In message <20090331063159.GA9265@zim.MIT.EDU>, David Schultz writes: > >> You could get the extensibility you're looking for without >> annoying the i18n folks by making the strings conform to a simple >> machine-parsable grammar. For instance, the above might be: >> "geom:part:overlaps bootcode(3)" >> A user-level library function could parse this, look up a natural >> language translation in a locale-specific database, and fall back >> on a generic format if no translation is available. > > Or maybe emit all messages in Esparanto and use automatic > translation ? > > Seriously, I don't see anybody advocating that dmesg(1) output be > translated, so until such time as somebody starts that pointless > project, I think we can leave error messages from the kernel in the > same language as pretty much everything else in our system: English. > > Don't overengineer it guys. > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by > incompetence. > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 11:33:52 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4A4D10656BB for ; Tue, 31 Mar 2009 11:33:52 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.freebsd.org (Postfix) with ESMTP id 4CC968FC15 for ; Tue, 31 Mar 2009 11:33:52 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-046-139.pools.arcor-ip.net [88.66.46.139]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1Loc1s1Ufm-000jb7; Tue, 31 Mar 2009 13:21:16 +0200 Received: (qmail 49943 invoked from network); 31 Mar 2009 11:21:15 -0000 Received: from fbsd8.laiers.local (192.168.4.200) by laiers.local with SMTP; 31 Mar 2009 11:21:15 -0000 From: Max Laier Organization: FreeBSD To: freebsd-arch@freebsd.org Date: Tue, 31 Mar 2009 12:21:14 +0100 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.1; i386; ; ) References: <49D13E9C.8010005@elischer.org> In-Reply-To: <49D13E9C.8010005@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903311321.14955.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/bp2nm5EWdxAvAtkwXE8WSNwfb6g7GcTdjL/P Ns5YSt8nOHHan7MOjYaazAne640pfHhwPRcUIWpRvweP/7cyPW RaHcqm5v3zVx64ePEfCsg== Cc: bz@freebsd.org, Rick Macklem , Julian Elischer Subject: Re: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 11:33:54 -0000 On Monday 30 March 2009 23:50:20 Julian Elischer wrote: > Rick Macklem wrote: > > Well, since the last one turned out to be too easy, here's one I think > > is a little tougher... > > > > The nfsv4 client needs to know an ip address for the machine, that can > > be used by servers to do callbacks on the client. I currently use the > > following, which I know isn't correct, but usually works ok: > > > > loopb = htonl(INADDR_LOOPBACK); > > TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { > > if (IA_SIN(ia)->sin_addr.s_addr != loopb) > > return (&(IA_SIN(ia)->sin_addr.s_addr)); > > } > > return (NULL); > > It's important that the address you use be an address that is in the > same 'security domain' as the client.. > > The best way to do that is to find an address that is on the interface > that will be used to send the packet out. > > So you want to do a route lookup so use rtalloc or friends > (see route.c). > > you want to use the same code that is used in ip_output (or is it > {udp/tcp}_output?) to fidn the local address when teh user specifies > INADDR_ANY. Mostly, but it's a bit more complicated than that. Basically you do a normal source address selection (i.e. your callback address is the address you'd use as source when talking to that server), but you might want to specify more restrictions. e.g. you might not want to use temporary IPv6 addresses etc. RFC 5014 suggests a userland API for source address selection (which we don't implement, yet). There are good guidelines for default behavior in there, as well - and they also apply to IPv4 (eventhough the title suggests otherwise). I'm CC'ing Bjoern who has done some work regarding source address selection recently - IIRC. > > Now, I could just make it a constant set by an rc script (argument to > > the callback daemon or a sysctl variable), but that's a bother for > > laptops using dhcp and similar. I think allowing an argument to the > > callback daemon is a good fallback, but it would be nice if it didn't > > normally have to be set for things to work ok. > > > > Any ideas on how to do this? > > > > Thanks in advance for any help, rick > > ps: Part of the reason that the above loop doesn't seem to be good > > enough is that it requires "options VIMAGE_GLOBALS" to build. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 17:48:11 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96595106566B for ; Tue, 31 Mar 2009 17:48:11 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 622398FC26 for ; Tue, 31 Mar 2009 17:48:11 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 8BEDC2C2C59; Tue, 31 Mar 2009 12:29:28 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RMuSbCBmZdzc; Tue, 31 Mar 2009 12:29:20 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 7193A2C2AAC; Tue, 31 Mar 2009 12:29:20 -0500 (CDT) Message-ID: <49D252EF.7060102@cs.rice.edu> Date: Tue, 31 Mar 2009 12:29:19 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.21 (X11/20090321) MIME-Version: 1.0 To: arch@freebsd.org Content-Type: multipart/mixed; boundary="------------030705020004080800040606" Cc: Robert Watson , Alan Cox Subject: memory protection and sbrk() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 17:48:11 -0000 This is a multi-part message in MIME format. --------------030705020004080800040606 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit For as long as I can remember, FreeBSD's sbrk() has provided memory with execute permission enabled. Before we branch for FreeBSD 8.0, I'd like to try removing execute permission on this memory. On (non-PAE) i386 and a few of the embedded processors, this change will have little tangible effect because there is no distinction in the processor's MMU between read and execute permissions. On amd64, the only potential problems are likely with a very few applications, like the JVM, that have their own internal implementation of "malloc()" and generate code on the fly (i.e., JIT compilation). However, I have verified that at least the Sun JVM works ok. I have also checked that cvsup, which is based on Modula-3 and does not use the standard malloc(), works ok. It's also worth noting that our standard malloc() has flip-flopped over the last year or so in terms of whether it uses sbrk() or mmap() by default to acquire memory. When it uses mmap(), it does not request execute permission on the allocated memory. So, depending on whether malloc() used mmap() or sbrk(), malloc() was returning memory with different permissions. Consequently, I think that any application problems due to the lack of execute permission on memory returned by malloc() would have long since been detected. As a final sanity check, I would appreciate it if three kinds of users would test the attached patch: (1) some IA64, PowerPC, and Sparc64 users, (2) amd64-based users of "exotic" languages, like common lisp, haskell, etc. and (3) amd64-based users of other JVMs, like kaffe. My plan is to commit the attached patch to HEAD on the 7th of April unless I hear of problems. Thanks, Alan --------------030705020004080800040606 Content-Type: text/plain; name="sbrk.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sbrk.patch" Index: vm/vm_unix.c =================================================================== --- vm/vm_unix.c (revision 190506) +++ vm/vm_unix.c (working copy) @@ -117,7 +117,7 @@ goto done; } rv = vm_map_insert(&vm->vm_map, NULL, 0, old, new, - VM_PROT_ALL, VM_PROT_ALL, 0); + VM_PROT_RW, VM_PROT_ALL, 0); if (rv != KERN_SUCCESS) { error = ENOMEM; goto done; --------------030705020004080800040606-- From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 20:07:46 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F6DB106564A for ; Tue, 31 Mar 2009 20:07:46 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from skerryvore.cs.uoguelph.ca (skerryvore.cs.uoguelph.ca [131.104.94.204]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4F28FC23 for ; Tue, 31 Mar 2009 20:07:46 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by skerryvore.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id n2VK7hxT007982; Tue, 31 Mar 2009 16:07:43 -0400 Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n2VKDcO17420; Tue, 31 Mar 2009 16:13:38 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Tue, 31 Mar 2009 16:13:38 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Julian Elischer In-Reply-To: <49D13E9C.8010005@elischer.org> Message-ID: References: <49D13E9C.8010005@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.63 on 131.104.94.204 Cc: freebsd-arch@freebsd.org Subject: Re: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 20:07:47 -0000 On Mon, 30 Mar 2009, Julian Elischer wrote: > > So you want to do a route lookup so use rtalloc or friends > (see route.c). > First off, I should say that, if there is a better mailing list for this kind of thing, please let me know. Also, if this fails, it is not the end of the world. All that happens is that the server doesn't issue delegations to the client, since the callbacks aren't working. Given that I'd like to avoid having code in nfs fiddling with *inp's and such, since it would have to worry about what global vars it can use, locking on them, etc., I haven't worried about what Max Laier mentioned and just used rtalloc(). Would someone like to review this function and see what you think? nfscl_getmyip(struct nfsmount *nmp, int *isinet6p) { struct route ro; struct sockaddr_in *sin, *rsin; struct rtentry *rt; u_int8_t *retp = NULL; static struct in_addr laddr; *isinet6p = 0; /* * Loop up a route for the destination address. */ if (nmp->nm_nam->sa_family == AF_INET) { bzero(&ro, sizeof (ro)); rsin = (struct sockaddr_in *)&ro.ro_dst; sin = (struct sockaddr_in *)nmp->nm_nam; rsin->sin_family = AF_INET; rsin->sin_len = sizeof (struct sockaddr_in); rsin->sin_addr = sin->sin_addr; rtalloc(&ro); rt = ro.ro_rt; if (rt != NULL) { if (rt->rt_ifp != NULL && rt->rt_ifa != NULL && ((rt->rt_ifp->if_flags & IFF_LOOPBACK) == 0) && rt->rt_ifa->ifa_addr->sa_family == AF_INET) { sin = (struct sockaddr_in *) rt->rt_ifa->ifa_addr; laddr = sin->sin_addr; retp = (u_int8_t *)&laddr; } RTFREE(rt); } #ifdef INET6 } else if (nmp->nm_nam->sa_family == AF_INET6) { struct sockaddr_in6 *sin6, *rsin6; struct route_in6 ro6; static struct in6_addr laddr6; bzero(&ro6, sizeof (ro6)); rsin6 = (struct sockaddr_in6 *)&ro6.ro_dst; sin6 = (struct sockaddr_in6 *)nmp->nm_nam; rsin6->sin6_family = AF_INET6; rsin6->sin6_len = sizeof (struct sockaddr_in6); rsin6->sin6_addr = sin6->sin6_addr; rtalloc((struct route *)&ro6); rt = ro6.ro_rt; if (rt != NULL) { if (rt->rt_ifp != NULL && rt->rt_ifa != NULL && ((rt->rt_ifp->if_flags & IFF_LOOPBACK) == 0) && rt->rt_ifa->ifa_addr->sa_family == AF_INET6) { sin6 = (struct sockaddr_in6 *) rt->rt_ifa->ifa_addr; laddr6 = sin6->sin6_addr; retp = (u_int8_t *)&laddr6; *isinet6p = 1; } RTFREE(rt); } #endif } return (retp); } Thanks everyone, for your help sofar, rick From owner-freebsd-arch@FreeBSD.ORG Tue Mar 31 20:32:07 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D7BF10656D3 for ; Tue, 31 Mar 2009 20:32:07 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outN.internet-mail-service.net (outn.internet-mail-service.net [216.240.47.237]) by mx1.freebsd.org (Postfix) with ESMTP id 0E35D8FC18 for ; Tue, 31 Mar 2009 20:32:06 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id C021B13DBB; Tue, 31 Mar 2009 13:32:06 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 8A9E92D60CB; Tue, 31 Mar 2009 13:32:03 -0700 (PDT) Message-ID: <49D27DDF.9@elischer.org> Date: Tue, 31 Mar 2009 13:32:31 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Rick Macklem References: <49D13E9C.8010005@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 20:32:09 -0000 Rick Macklem wrote: > > > On Mon, 30 Mar 2009, Julian Elischer wrote: > >> >> So you want to do a route lookup so use rtalloc or friends >> (see route.c). >> > > First off, I should say that, if there is a better mailing list for > this kind of thing, please let me know. Also, if this fails, it is > not the end of the world. All that happens is that the server doesn't > issue delegations to the client, since the callbacks aren't working. possibly freebsd-net@ might be a bit better. > > Given that I'd like to avoid having code in nfs fiddling > with *inp's and such, since it would have to worry about what global > vars it can use, locking on them, etc., I haven't worried about what > Max Laier mentioned and just used rtalloc(). > > Would someone like to review this function and see what you think? looks about right (without doing great analysis). You may be able to make it a bit simpler by calling rtalloc1() directly.. also, on might eventually think about the case where one might want to select a different routing table for NFS as one uses for other stuff.. but that can be ignored for now. As there are possibly many addresses on an interface, one needs to look for the one that has the same network as the gateway..(if it's not p2p). e.g. if you have 10.2.2.2/24 and 10.3.3.3/24 on an interface and the gateway is 10.3.3.1, then you obviously need to select the second address on that interface. > > nfscl_getmyip(struct nfsmount *nmp, int *isinet6p) > { > struct route ro; > struct sockaddr_in *sin, *rsin; > struct rtentry *rt; > u_int8_t *retp = NULL; > static struct in_addr laddr; > > *isinet6p = 0; > /* > * Loop up a route for the destination address. > */ > if (nmp->nm_nam->sa_family == AF_INET) { > bzero(&ro, sizeof (ro)); > rsin = (struct sockaddr_in *)&ro.ro_dst; > sin = (struct sockaddr_in *)nmp->nm_nam; > rsin->sin_family = AF_INET; > rsin->sin_len = sizeof (struct sockaddr_in); > rsin->sin_addr = sin->sin_addr; > rtalloc(&ro); > rt = ro.ro_rt; > if (rt != NULL) { > if (rt->rt_ifp != NULL && > rt->rt_ifa != NULL && > ((rt->rt_ifp->if_flags & IFF_LOOPBACK) == 0) && > rt->rt_ifa->ifa_addr->sa_family == AF_INET) { > sin = (struct sockaddr_in *) > rt->rt_ifa->ifa_addr; > laddr = sin->sin_addr; > retp = (u_int8_t *)&laddr; > } > RTFREE(rt); > } > #ifdef INET6 > } else if (nmp->nm_nam->sa_family == AF_INET6) { > struct sockaddr_in6 *sin6, *rsin6; > struct route_in6 ro6; > static struct in6_addr laddr6; > > bzero(&ro6, sizeof (ro6)); > rsin6 = (struct sockaddr_in6 *)&ro6.ro_dst; > sin6 = (struct sockaddr_in6 *)nmp->nm_nam; > rsin6->sin6_family = AF_INET6; > rsin6->sin6_len = sizeof (struct sockaddr_in6); > rsin6->sin6_addr = sin6->sin6_addr; > rtalloc((struct route *)&ro6); > rt = ro6.ro_rt; > if (rt != NULL) { > if (rt->rt_ifp != NULL && > rt->rt_ifa != NULL && > ((rt->rt_ifp->if_flags & IFF_LOOPBACK) == 0) && > rt->rt_ifa->ifa_addr->sa_family == AF_INET6) { > sin6 = (struct sockaddr_in6 *) > rt->rt_ifa->ifa_addr; > laddr6 = sin6->sin6_addr; > retp = (u_int8_t *)&laddr6; > *isinet6p = 1; > } > RTFREE(rt); > } > #endif > } > return (retp); > } > > Thanks everyone, for your help sofar, rick > > From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 01:24:21 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21C98106566C for ; Wed, 1 Apr 2009 01:24:21 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from skerryvore.cs.uoguelph.ca (skerryvore.cs.uoguelph.ca [131.104.94.204]) by mx1.freebsd.org (Postfix) with ESMTP id B69B48FC1D for ; Wed, 1 Apr 2009 01:24:20 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by skerryvore.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id n311OHfS030593; Tue, 31 Mar 2009 21:24:17 -0400 Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n311UDj07163; Tue, 31 Mar 2009 21:30:13 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Tue, 31 Mar 2009 21:30:13 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Julian Elischer In-Reply-To: <49D27DDF.9@elischer.org> Message-ID: References: <49D13E9C.8010005@elischer.org> <49D27DDF.9@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.63 on 131.104.94.204 Cc: freebsd-arch@freebsd.org Subject: Re: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 01:24:21 -0000 On Tue, 31 Mar 2009, Julian Elischer wrote: > > looks about right (without doing great analysis). > > You may be able to make it a bit simpler by calling rtalloc1() directly.. Yep, I can see it would be. Is there a preferred interface or should I just recode it using rtalloc1()? > > As there are possibly many addresses on an interface, one needs > to look for the one that has the same network as the gateway..(if > it's not p2p). e.g. if you have 10.2.2.2/24 and 10.3.3.3/24 on > an interface and the gateway is 10.3.3.1, then you obviously > need to select the second address on that interface. > I've been looking at this and it seems to me that it "falls out in the wash". It looks like in_pcbladdr() is what udp uses for this case and it just takes the rt_ifa->... as the address. It seems like there is a separate routing table entry for each address on an interface and that the search done by rtalloc() should get the correct one from what I can see. Does that make sense? Anyhow, thanks a lot for the help, rick From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 03:59:53 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E550106564A for ; Wed, 1 Apr 2009 03:59:53 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outW.internet-mail-service.net (outw.internet-mail-service.net [216.240.47.246]) by mx1.freebsd.org (Postfix) with ESMTP id 72CB28FC0A for ; Wed, 1 Apr 2009 03:59:53 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 6C69C3E1D5; Tue, 31 Mar 2009 20:59:53 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 2274B2D6028; Tue, 31 Mar 2009 20:59:50 -0700 (PDT) Message-ID: <49D2E6D1.7000106@elischer.org> Date: Tue, 31 Mar 2009 21:00:17 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Rick Macklem References: <49D13E9C.8010005@elischer.org> <49D27DDF.9@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 03:59:53 -0000 Rick Macklem wrote: > > > On Tue, 31 Mar 2009, Julian Elischer wrote: > >> >> looks about right (without doing great analysis). >> >> You may be able to make it a bit simpler by calling rtalloc1() directly.. > > Yep, I can see it would be. Is there a preferred interface or should I > just recode it using rtalloc1()? > >> >> As there are possibly many addresses on an interface, one needs >> to look for the one that has the same network as the gateway..(if >> it's not p2p). e.g. if you have 10.2.2.2/24 and 10.3.3.3/24 on >> an interface and the gateway is 10.3.3.1, then you obviously >> need to select the second address on that interface. >> > I've been looking at this and it seems to me that it "falls out in the > wash". It looks like in_pcbladdr() is what udp uses for this case and > it just takes the rt_ifa->... as the address. > > It seems like there is a separate routing table entry for each address > on an interface and that the search done by rtalloc() should get the > correct one from what I can see. Does that make sense? > yes as long as you take the ifa you should end up with the right one. but if you just take the ifp you need to refine to the right ifa. > Anyhow, thanks a lot for the help, rick From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 13:41:41 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDA931065677 for ; Wed, 1 Apr 2009 13:41:41 +0000 (UTC) (envelope-from newsletter@piekmarketing.eu) Received: from mail.piekmarketing.eu (mail.piekmarketing.eu [94.75.242.227]) by mx1.freebsd.org (Postfix) with ESMTP id 20CA88FC33 for ; Wed, 1 Apr 2009 13:41:40 +0000 (UTC) (envelope-from newsletter@piekmarketing.eu) Received: from mail pickup service by mail.piekmarketing.eu with Microsoft SMTPSVC; Wed, 1 Apr 2009 12:58:13 +0200 X-Mailing-Software: Newsletter Manager Pro by www.dfsol.com X-SID: 652646IDEND thread-index: AcmyuMD+ZPEsMp+aT7KBEyLRLSP/Iw== Thread-Topic: Newsletter PIEK International Education Center I.E.C. From: "Piek International Education Centre \(I.E.C.\)" To: Date: Wed, 1 Apr 2009 12:58:13 +0200 Message-ID: MIME-Version: 1.0 X-Mailer: Microsoft CDO for Windows 2000 Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 X-OriginalArrivalTime: 01 Apr 2009 10:58:13.0875 (UTC) FILETIME=[C103D430:01C9B2B8] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Newsletter PIEK International Education Center I.E.C. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Piek International Education Centre \(I.E.C.\)" List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 13:41:44 -0000 From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 16:13:54 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99DFD106564A for ; Wed, 1 Apr 2009 16:13:54 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout015.mac.com (asmtpout015.mac.com [17.148.16.90]) by mx1.freebsd.org (Postfix) with ESMTP id 876138FC18 for ; Wed, 1 Apr 2009 16:13:54 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Received: from jflores-gxdt755.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp015.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KHF002NJJQGXN30@asmtp015.mac.com> for arch@freebsd.org; Wed, 01 Apr 2009 09:13:54 -0700 (PDT) Message-id: From: Marcel Moolenaar To: FreeBSD Arch In-reply-to: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> Date: Wed, 01 Apr 2009 09:13:28 -0700 References: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> X-Mailer: Apple Mail (2.930.3) Cc: Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 16:13:54 -0000 On Mar 30, 2009, at 10:31 AM, Marcel Moolenaar wrote: > This begs the question: what is stopping us from adding new > error codes? >> kientzle@ wrote: >> POSIX does specify the range of allowable error codes >> for a lot of system calls, but not all. In my experience, >> straying outside of that causes more problems than it's >> worth. I agree that well-known system calls should not be changed willy-nilly. But what about error codes returned from GEOM or other FreeBSD-specific subsystems? >> phk@ wrote: > >> Long time ago, I proposed a scheme where a process can register >> a userland error-text buffer with the kernel. >> Whenever a system call returns with error, the kernel has the >> opportunity to write an explanatory text in the registered >> buffer (if there is one). Strings are not to be used to relay error conditions between kernel and processes. Interpretation of the string is unnecessarily hard (if not impossible) if the process wants to take corrective action. They're not even good for printing, because the process is not left in control over its own output (i18n has been mentioned). >> kientzle@ responded: >> This is the right direction: Basically, add a new variable >> that augments errno instead of extending the possible values of >> errno. Augmentation seems logical. Does anyone know if this has been done in some OS already? >> phk@ wrote: >> Don't overengineer it guys. I agree that over engineering is not a good thing, but under- engineering is worse. Handwaving real-world demands/requirements with nothing more than emotional responses that lack technical argumentation does not build the "damn best OS". Oh, and yes: I have been thinking about localization of the kernel. While I don't see this to be urgent or critical to FreeBSD itself, I can see a "market" for it. >> wollman@ wrote: >> But all this is really irrelevant if no other operating system or >> standard adopts the interface. Interfaces which are peculiar to >> FreeBSD are rarely useful. That's a very good point indeed. -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 16:48:08 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24902106564A for ; Wed, 1 Apr 2009 16:48:08 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id 07AE48FC12 for ; Wed, 1 Apr 2009 16:48:07 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 1 Apr 2009 09:36:09 -0700 Message-ID: <06D5F9F6F655AD4C92E28B662F7F853E02930FBC@seaxch09.desktop.isilon.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: On errno Thread-Index: Acmy5OOMaTu8kTKzQf2OS7Ycf3qZXwAAOqvg References: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> From: "Matthew Fleming" To: "FreeBSD Arch" Cc: Marcel Moolenaar Subject: RE: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 16:48:08 -0000 > Augmentation seems logical. Does anyone know if this has been done > in some OS already? AIX version 6.0 has a kerrno_t type which contains the 8-bit standard error code, as well as basically implementation defined bits that define where the error came from. This is for the kernel and kernel extensions; for binary and source compatibility reasons the existing interfaces could not be changed, but new interfaces used the new return type. I wasn't completely happy with the way it was done, but basically defined a 12-bit block of the kerrno_t that defined which "namespace" the error came with, and parceled out a bunch for the known AIX components with a bunch of unused ones too. So a kerrno_t looked like: (32-bit) 1b | [12 bits identifying a larger namespace like which header] | [11 bits identifying which specific error return from that header] | [8 bits for errno] (64-bit) 0xEEEE | 0x0000 | [12 bits identifying a larger namespace like which header] | [12 bits identifying which specific error return from that header] | [8 bits for errno] Using 0xEEEE was an eye-catcher, plus the error was negative. Similarly the 32-bit errors are negative, which means that functions can continue to return single positive scalars in success cases that contain meaningful information, instead of requiring a reference parameter. So e.g. kerrno.h parceled out the namespace like: __SYSVMM_BLOCK_00 0x008 __SYSPROC_BLOCK_00 0x010 __DMA_BLOCK_00 0x018 ... If a component wanted to use one "namespace" per header file, there was generally room for it. And then in each shipped header file were unique defines for each reason code, like: #define EINVAL_XMEMDMA_BADADDRESS KERROR(EINVAL, __DMA_BLOCK_00, 0x001) #define ENOENT_XMEMDMA_YOUSUCK KERROR(ENOENT, __DMA_BLOCK_00, 0x002) (non-shipped headers didn't always need to enumerate the unique error codes in the header, but instead in the source file, because the callers weren't expected to look for a specific error) The code then returned somewhat ugly looking codes like EINVAL_XMEMDMA_BADADDRESS. But they could be explicitly compared. The kernel also had an awk script that generated a .txt file that listed all the names and the hex value they were defined as; this was useful for doing lookups of whatever error codes we were looking at at the time. Something better could probably be done there. I don't recall that AIX finished out the story with user-space. But these kerrno_t's were extremely useful for debugging any component that had plumbed itself fully; no more guessing at the 23 reasons it could return EINVAL; no more wondering in which subroutine the error was produced. So yeah, it isn't perfect and there's probably a better way, but it was definitely better than nothing. Discuss. :-) Cheers, matthew From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 16:55:30 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1866D1065675 for ; Wed, 1 Apr 2009 16:55:30 +0000 (UTC) (envelope-from gordon.tetlow@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.229]) by mx1.freebsd.org (Postfix) with ESMTP id DDAB08FC1A for ; Wed, 1 Apr 2009 16:55:29 +0000 (UTC) (envelope-from gordon.tetlow@gmail.com) Received: by rv-out-0506.google.com with SMTP id l9so107679rvb.43 for ; Wed, 01 Apr 2009 09:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=8UIdIpGnt+uAQbVT7Ni3BOo6sgxlpqsuMjMOdCDH2vU=; b=wGPjD3g0vs150vaf7b1/mYt4KxgJiaE2LZOFsUMxdBg7eyOqwmqHm5epyYaTl1V6Bd TF3Ui4kK3ZoET8mpe2w7eOqPWkJ+2qjIavwbya5h7BjjwCoEabNnpUwea543GOaZZMXw b9cSE7fSgbi/MgJOBz2QYr8KkXqhd+gjyJaF8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=nnuqLf8qxFFezREpg+/+xo9YGdY6l/rCT8BZhlqxxZw3XxR+5IR0023JKqy8RcBy3Z R072oQrAEuWuy7A+4NLRwdRFkphabulmxjFkqvUj+YrYUF3AmBl4Z4avvKjkFpeLvsq+ nx28GGBSf1oZq6FFxmJ8wz56oamd/8LWtgTis= MIME-Version: 1.0 Sender: gordon.tetlow@gmail.com Received: by 10.114.95.12 with SMTP id s12mr5308851wab.223.1238603281651; Wed, 01 Apr 2009 09:28:01 -0700 (PDT) In-Reply-To: References: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> Date: Wed, 1 Apr 2009 09:28:01 -0700 X-Google-Sender-Auth: 2d7ca7a178bc9398 Message-ID: <4e571dd70904010928w1900ca9ey740f256c344cdd57@mail.gmail.com> From: Gordon Tetlow To: Marcel Moolenaar Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Arch Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 16:55:30 -0000 On Wed, Apr 1, 2009 at 9:13 AM, Marcel Moolenaar wrote: > Oh, and yes: I have been thinking about localization of the kernel. > While I don't see this to be urgent or critical to FreeBSD itself, > I can see a "market" for it. This is an interesting discussion in light of the recent article about the "Ugly American Programmer." Basically it says that programmers all understand English (or we can basically expect them to), so as long as the information is for programmers (user/kernel barrier qualifies in my mind), is it hugely important? http://www.codinghorror.com/blog/archives/001248.html Cheers, Gordon From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 17:24:05 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15A35106564A for ; Wed, 1 Apr 2009 17:24:05 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout017.mac.com (asmtpout017.mac.com [17.148.16.92]) by mx1.freebsd.org (Postfix) with ESMTP id 005168FC08 for ; Wed, 1 Apr 2009 17:24:04 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from iphone-5.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp017.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KHF001WKMZZ2N00@asmtp017.mac.com> for arch@freebsd.org; Wed, 01 Apr 2009 10:23:59 -0700 (PDT) Message-id: From: Marcel Moolenaar To: Gordon Tetlow In-reply-to: <4e571dd70904010928w1900ca9ey740f256c344cdd57@mail.gmail.com> Date: Wed, 01 Apr 2009 10:23:58 -0700 References: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> <4e571dd70904010928w1900ca9ey740f256c344cdd57@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) Cc: FreeBSD Arch Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 17:24:05 -0000 On Apr 1, 2009, at 9:28 AM, Gordon Tetlow wrote: > On Wed, Apr 1, 2009 at 9:13 AM, Marcel Moolenaar > wrote: > Oh, and yes: I have been thinking about localization of the kernel. > While I don't see this to be urgent or critical to FreeBSD itself, > I can see a "market" for it. > > This is an interesting discussion in light of the recent article > about the "Ugly American Programmer." Basically it says that > programmers all understand English (or we can basically expect them > to), so as long as the information is for programmers (user/kernel > barrier qualifies in my mind), is it hugely important? Errors are never for programmers. They are for programs or users. Programs work less well on strings, especially when those strings are "designed" to be printed and thus targeted towards users. Interpretation of such error messages is just painful. On top of that, the user may want a localized message. When arguments in the discussion on i18n or l10n focus on the developer, the argument is flawed by definition and pretty much useless. Only when users are considered in such discussions will you have a meaningful discussion. Thus, when a developer claims that i18n is pointless, you know that the statement can be ignored, for it puts the developer at the center of the universe and not the user. This is still assuming that we write an OS for users and not for developers. The assumption may be false... If we were to write a compiler, the "Ugly American Programmer." article would apply. Writing an OS, I would say that it applies partially at best (one can make a distinction between operators and users, and operators tend to prefer english AFAICT). Personally I'd like to think that that we write an OS for users. -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 17:30:07 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DE8F106564A for ; Wed, 1 Apr 2009 17:30:07 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 5DC928FC1F for ; Wed, 1 Apr 2009 17:30:07 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 3DCBF78CD6; Wed, 1 Apr 2009 17:30:06 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n31HU55H001572; Wed, 1 Apr 2009 17:30:05 GMT (envelope-from phk@critter.freebsd.dk) To: Marcel Moolenaar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 01 Apr 2009 10:23:58 MST." Date: Wed, 01 Apr 2009 17:30:05 +0000 Message-ID: <1571.1238607005@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: FreeBSD Arch , Gordon Tetlow Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 17:30:08 -0000 In message , Marcel Moolenaar wri tes: >Personally I'd like to think that that we write an OS for users. We write an OS for the people who can and will use an OS written by us. Absent a huge influx of translators, FreeBSD is not going to have a viable I18N footprint. Such an influx, should it happen, would most likely be rebuffed and resisted by the current developers of FreeBSD. Yes, we can dream about what we could do with 1000 full time developers under a benevolent dictatorship which unlimited financial resources. But we can also look at our current circumstances and conclude that I18N is not something we can afford at this point. Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 18:00:19 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A9821065680; Wed, 1 Apr 2009 18:00:19 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 446D48FC12; Wed, 1 Apr 2009 18:00:18 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n31I0RHH039722; Wed, 1 Apr 2009 14:00:27 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n31I0Q4I039721; Wed, 1 Apr 2009 14:00:26 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Wed, 1 Apr 2009 14:00:26 -0400 From: David Schultz To: Luigi Rizzo Message-ID: <20090401180026.GA39424@zim.MIT.EDU> Mail-Followup-To: Luigi Rizzo , Poul-Henning Kamp , Daniel Eischen , FreeBSD Arch , Tim Kientzle , Marcel Moolenaar References: <20090331064959.GA3516@onelab2.iet.unipi.it> <96314.1238481987@critter.freebsd.dk> <20090331065548.GA3851@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090331065548.GA3851@onelab2.iet.unipi.it> Cc: Daniel Eischen , FreeBSD Arch , Poul-Henning Kamp , Tim Kientzle , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 18:00:20 -0000 On Tue, Mar 31, 2009, Luigi Rizzo wrote: > On Tue, Mar 31, 2009 at 06:46:27AM +0000, Poul-Henning Kamp wrote: > > In message <20090331064959.GA3516@onelab2.iet.unipi.it>, Luigi Rizzo writes: > > > > >we are probably digressing but printf in glibc has specifiers to > > >indicate which argument you want to use for each format. > > > > > >http://www.gnu.org/software/hello/manual/libc/Output-Conversion-Syntax.html > > > > > >I suppose this takes an extra pass over the format string to collect > > >the proper type info for all arguments, so it is not > > >not a dramatic change in the implementation of *printf. > > > > Yeah, we have that crap too, and you can see how messy and slow our > > printf became as a result in SVN. > > I have never run performance tests of printf, but it woudld be > definitely interesting to figure out how expensive is the parsing > of the format specifiers. The expensive part, which accounts for more than 70% of the cost of processing a format specifier, is gluing together the iovec of output fragments in stdio and writing to the stream. The actual parsing accounts for almost none of the cost; it amounts to scanning for a `%', then using a switch statement (which gcc compiles into a jump table) to process the specifiers. Most of the code for handling positional parameters lives in printf-pos.c, and it's never invoked if you don't use positional parameters. From owner-freebsd-arch@FreeBSD.ORG Wed Apr 1 18:33:36 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56ED01065679 for ; Wed, 1 Apr 2009 18:33:36 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 167328FC12 for ; Wed, 1 Apr 2009 18:33:35 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n31IXZus022326; Wed, 1 Apr 2009 11:33:35 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id xjt6n78cuhdfsraycnav6nxu9w; Wed, 01 Apr 2009 11:33:35 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <49D3B37F.80509@freebsd.org> Date: Wed, 01 Apr 2009 11:33:35 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.19) Gecko/20090226 SeaMonkey/1.1.14 MIME-Version: 1.0 To: Marcel Moolenaar References: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Arch Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 18:33:36 -0000 >>> wollman@ wrote: >>> But all this is really irrelevant if no other operating system or >>> standard adopts the interface. Interfaces which are peculiar to >>> FreeBSD are rarely useful. > > That's a very good point indeed. PHK's suggestion of plumbing this into err(), perror() and similar functions that implicitly read errno already would help here. Tim From owner-freebsd-arch@FreeBSD.ORG Thu Apr 2 06:46:55 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEEE11065670 for ; Thu, 2 Apr 2009 06:46:55 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 795B78FC1A for ; Thu, 2 Apr 2009 06:46:55 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2E4AF.dip.t-dialin.net [217.226.228.175]) by redbull.bpaserver.net (Postfix) with ESMTP id 9716E2E0AD; Thu, 2 Apr 2009 08:46:22 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 856A87854E; Thu, 2 Apr 2009 08:46:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1238654777; bh=j8LGv/wp4lKhmEk7StNYQh1r3TvMoKLqI cm7xwb81Ig=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WU+jBAVrzptVKw0J+Nnk2RDYzJaOkKXbMS1uMWb3kl4Nd9QiPIDKVkNDn7Rfe0p/2 9uM0jvz3J16+wzcnd0PxlZ4LuSh/gvuGqOEUOCGoINuGdyiwiO+4FTqISPfrEDFAtF3 SM5fDFEOpJ5MKSTIbo3WGuxMHXRtFHYg1DTe1REZGjHdfDOsDSqM3H/ROLLPx1UgunS 7UOFZjtQtzclhFYBIVvz1gDXiHLEL3MIlbRy9YGK0XoJIDaU7YAFuMNIYu4xr08muZo jDKXvHS5xmIGe7d4MC0agQevGNFAnUWm7RGUPUk9bw5fffS+OgoyVQE6Rl1OY1R+EQw z5G55oTHA== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n326kHpq055344; Thu, 2 Apr 2009 08:46:17 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Thu, 02 Apr 2009 08:46:16 +0200 Message-ID: <20090402084616.19846py8s75ogp44@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Thu, 02 Apr 2009 08:46:16 +0200 From: Alexander Leidinger To: Marcel Moolenaar References: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> <4e571dd70904010928w1900ca9ey740f256c344cdd57@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 9716E2E0AD.6C1AF X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-13.4, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10, VOWEL_TOCC_6 1.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: FreeBSD Arch , Gordon Tetlow Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 06:46:56 -0000 Quoting Marcel Moolenaar (from Wed, 01 Apr 2009 =20 10:23:58 -0700): > If we were to write a compiler, the "Ugly American Programmer." > article would apply. Writing an OS, I would say that it applies > partially at best (one can make a distinction between operators > and users, and operators tend to prefer english AFAICT). In my experience operators prefer a language they understand well, but =20 this may be biased by the kind of operators I know (I work in a =20 multi-lingual environment, but we do not use FreeBSD at work). So =20 personally I would not distinguish between operators and users. I agree with your general opinion about i18n and think that it is not =20 a matter of workforce, it's a matter of feasability. As soon as we =20 have the infrastructure, translations will show up "soonish". It's not =20 "if", it's "when". Bye, Alexander. --=20 Real programmers don't write in BASIC. Actually, no programmers write in BASIC after reaching puberty. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-arch@FreeBSD.ORG Thu Apr 2 06:51:58 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1505106566C for ; Thu, 2 Apr 2009 06:51:58 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 858178FC15 for ; Thu, 2 Apr 2009 06:51:58 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 4B73478CC8; Thu, 2 Apr 2009 06:51:57 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n326puol004916; Thu, 2 Apr 2009 06:51:56 GMT (envelope-from phk@critter.freebsd.dk) To: Alexander Leidinger From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 02 Apr 2009 08:46:16 +0200." <20090402084616.19846py8s75ogp44@webmail.leidinger.net> Date: Thu, 02 Apr 2009 06:51:56 +0000 Message-ID: <4915.1238655116@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: FreeBSD Arch , Marcel Moolenaar , Gordon Tetlow Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 06:51:59 -0000 In message <20090402084616.19846py8s75ogp44@webmail.leidinger.net>, Alexander L eidinger writes: >I agree with your general opinion about i18n and think that it is not >a matter of workforce, it's a matter of feasability. As soon as we >have the infrastructure, translations will show up "soonish". It's not >"if", it's "when". And once the novelty has worn off, we are left, as so many other operating systems, with at best 70% translation into each language. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Thu Apr 2 09:49:26 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BB9F1065692 for ; Thu, 2 Apr 2009 09:49:26 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id B5FD18FC28 for ; Thu, 2 Apr 2009 09:49:25 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2E4AF.dip.t-dialin.net [217.226.228.175]) by redbull.bpaserver.net (Postfix) with ESMTP id D660F2E145; Thu, 2 Apr 2009 11:49:20 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id A5706C36D8; Thu, 2 Apr 2009 11:49:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1238665757; bh=jdcLEtp1KZrmCkzL/4IfCgL+WpWwGLqFZ Z2h7w3Yt/g=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=xgOlpjJASOY1R9uG7dAEUOFlrKP6MtG2jBiiRBiO9VDGSLU70aXrjPmKW+Eb/C/Fv AomYIzegoezFRyUpEJhILcIhUvYXb29yAnOkIOnml7ybYe80qzYIMuZ9Fkazv9HJZ51 ZBoC5/xS4sJxREkQquVPhhAs3iyoLQRxBd7o2+vNg3p71qKw/cLnqW65RKU25g43mrR quRVZFhGbD0CRe87noB0iNtUNosoPGWt4wGuOhsLsvsFHnLMn05JURXsK/tEqnMxHk2 aX8EKDL1Kl0/P9PD7EbZqq8y/Z9ZY/ZvzMdG1CJ3YGEKy6O0hAfjboaRsXpmh6r44ow Ms0YxjZSQ== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n329nGra086904; Thu, 2 Apr 2009 11:49:16 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Thu, 02 Apr 2009 11:49:16 +0200 Message-ID: <20090402114916.170547o692pg252c@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Thu, 02 Apr 2009 11:49:16 +0200 From: Alexander Leidinger To: Poul-Henning Kamp References: <4915.1238655116@critter.freebsd.dk> In-Reply-To: <4915.1238655116@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: D660F2E145.3D6D2 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-13.4, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10, VOWEL_TOCC_6 1.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: FreeBSD Arch , Marcel Moolenaar , Gordon Tetlow Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 09:49:27 -0000 Quoting Poul-Henning Kamp (from Thu, 02 Apr 2009 =20 06:51:56 +0000): > In message <20090402084616.19846py8s75ogp44@webmail.leidinger.net>, =20 > Alexander Leidinger writes: > >> I agree with your general opinion about i18n and think that it is not >> a matter of workforce, it's a matter of feasability. As soon as we >> have the infrastructure, translations will show up "soonish". It's not >> "if", it's "when". > > And once the novelty has worn off, we are left, as so many other > operating systems, with at best 70% translation into each language. If I adapt your reasoning to our docs, we need to delete all our =20 translations and only keep the english one. If you are pissed off by the missing 30%, submit a patch or stick with =20 english. That's an adaption of what we tell to people when they =20 complain about missing stuff in unmaintained areas of src/ports. =20 Alternatively we can disconnect languages from the system if we think =20 there's not enough coverage. Above you also average the interest over =20 all languages, an generalization which doesn't hold, see below. You assume we need to ship with 100% coverage in all languages. For a =20 person which only uses 40% of one specific language, and this 40% are =20 covered by 100%, it does not matter. If those 40% are a major part to =20 allow to earn a person an income to feed childs and the relative =20 other, great. Note, people which set their LANG to something else already get only a =20 xx% translated system, e.g. KDE/GNOME are displaying a lot of stuff in =20 other languages, but stuff which is comming from FreeBSD itself is in =20 english, so we have the situation you describe already and users are =20 used to it (don't tell me this does not apply because we only program =20 an OS, it applies, as for an user it does not matter what we program, =20 _he_ is using a complete system consisting of an OS and other stuff, =20 not only the OS without anything else). They do their best, they enjoy =20 their native language where it is available and try to handle english =20 when it is not available. At some point I expect that we have some strong languages, and some =20 not so strong languages. Which ones are which and how many languages =20 we would have... I assume the trends regarding this for the handbook =20 can give a hint. Bye, Alexander. --=20 In California they don't throw their garbage away -- they make it into television shows. =09=09-- Woody Allen, "Annie Hall" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-arch@FreeBSD.ORG Thu Apr 2 17:32:00 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B41FE10656C6 for ; Thu, 2 Apr 2009 17:32:00 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout014.mac.com (asmtpout014.mac.com [17.148.16.89]) by mx1.freebsd.org (Postfix) with ESMTP id A01638FC16 for ; Thu, 2 Apr 2009 17:32:00 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from sivam-t43.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp014.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KHH001OWI177M40@asmtp014.mac.com> for arch@freebsd.org; Thu, 02 Apr 2009 10:32:00 -0700 (PDT) Message-id: <17CC6EDA-E2F7-4BC3-B7EB-EAAA3F80A9C1@mac.com> From: Marcel Moolenaar To: Poul-Henning Kamp In-reply-to: <1571.1238607005@critter.freebsd.dk> Date: Thu, 02 Apr 2009 10:31:44 -0700 References: <1571.1238607005@critter.freebsd.dk> X-Mailer: Apple Mail (2.930.3) Cc: FreeBSD Arch , Gordon Tetlow Subject: On i18n [was: Re: On errno] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 17:32:01 -0000 On Apr 1, 2009, at 10:30 AM, Poul-Henning Kamp wrote: > In message , Marcel > Moolenaar wri > tes: > >> Personally I'd like to think that that we write an OS for users. > > We write an OS for the people who can and will use an OS written by > us. Doesn't this ipso facto mean that FreeBSD is bound to be used by the same people who develop it? Isn't this a recipe for cliques? Aren't we then predisposed to end up in a situation where only we think we have the best OS, while being ignorant of the fact that we've made ourselves entirely irrelevant to the rest of the world? > Absent a huge influx of translators, FreeBSD is not going to have > a viable I18N footprint. True. But the huge influx will not happen if we don't open the doors and welcome i18n. Your position on it has been far from welcoming indeed. In a sense you use the lack of influx to defend your position that i18n does not have to be considered. How can you be sure that your position that i18n does not have to be considered is the direct cause of the lack of influx? > Such an influx, should it happen, would most likely be rebuffed and > resisted by the current developers of FreeBSD. Right. You block the thing you argue will not happen. That's a comfortable armchair to be arguing from :-) Maybe we should ask ourselves this: if the current developers rebuf and resist influx, isn't it time for them to hand in their commit bits and find some other project to contribute to? note: this is not a personal attack, nor do I imply anyone. It's a philosophical question that applies to me to. I assume that I will block progress some time in the future (assuming I'm not doing it already) simply because I'm too firmly stuck in old ways or fail to catch up to new developments or just because my thinking becomes incompatible with the project. Isn't it better that I move on and let FreeBSD go its separate way? -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arch@FreeBSD.ORG Thu Apr 2 20:00:20 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF64B106566B for ; Thu, 2 Apr 2009 20:00:20 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173019pub.verizon.net (vms173019pub.verizon.net [206.46.173.19]) by mx1.freebsd.org (Postfix) with ESMTP id CEA828FC0C for ; Thu, 2 Apr 2009 20:00:20 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms062.mailsrvcs.net ([172.18.12.134]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KHH00DNMM35HZUM@vms173019.mailsrvcs.net> for arch@freebsd.org; Thu, 02 Apr 2009 13:59:29 -0500 (CDT) Received: from 65.242.108.162 ([65.242.108.162]) by vms062.mailsrvcs.net (Verizon Webmail) with HTTP; Thu, 02 Apr 2009 13:59:29 -0500 (CDT) Date: Thu, 02 Apr 2009 13:59:29 -0500 (CDT) From: Sergey Babkin To: xcllnt@mac.com Message-id: <11462013.196742.1238698769903.JavaMail.root@vms062.mailsrvcs.net> Content-transfer-encoding: quoted-printable X-Originating-IP: [65.242.108.162] MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: arch@freebsd.org, gordon@tetlows.org Subject: Re: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 20:00:21 -0000 Apr 2, 2009 01:04:19 AM, [1]xcllnt@mac.com wrote: >On Apr 1, 2009= , at 9:28 AM, Gordon Tetlow wrote: > >> On Wed, Apr 1, 2009 = at 9:13 AM, Marcel Moolenaar <[2]xcllnt@mac.com> &= gt;> wrote: >> Oh, and yes: I have been thinking about localiza= tion of the kernel. >> While I don't see this to be urgent or crit= ical to FreeBSD itself, >> I can see a "market" for it. >>= ; >> This is an interesting discussion in light of the recent arti= cle >> about the "Ugly American Programmer." Basically it says t= hat >> programmers all understand English (or we can basically e= xpect them >> to), so as long as the information is for programm= ers (user/kernel >> barrier qualifies in my mind), is it hugely = important? > >Errors are never for programmers. They are for pr= ograms or users. >Programs work less well on strings, especially when= those strings >are "designed" to be printed and thus targeted toward= s users. >Interpretation of such error messages is just painful. On t= op of >that, the user may want a localized message. > >Wh= en arguments in the discussion on i18n or l10n focus on the >develope= r, the argument is flawed by definition and pretty much >useless. Onl= y when users are considered in such discussions will >you have a mean= ingful discussion. There are two kinds of error messages: some are m= ore important for the users, some for developers. The system messages te= nd to be more important for developers. The messages in the end-user app= lications may be more importants for the users. Also, if the users are n= ot particularly computer-literate, even the translated messages look lik= e gibberish to them. On the other hand, for teh support people it's easi= er to deal with the original messages. For the developers, the trans= lated messages are a major pain. What if someone reports about a bug in = your program and attaches its log messages in a foreign language? I've h= ad to deal with such situations. You see some message in Spanish and get no= idea, what does it mean. Search through the translated messages, find i= t there, find how it maps to the English message. Sometimes the funny ch= aracters get cut along the way, so searching becomes more complicated. A= nd things get even worse with more strange languages like Japanese or Ru= ssian. -SB References 1. 3D"mailto:xcllnt@mac.com" 2. 3D"mailto:xcllnt@mac.com" From owner-freebsd-arch@FreeBSD.ORG Thu Apr 2 21:56:37 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EC41106564A for ; Thu, 2 Apr 2009 21:56:37 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id D5EB58FC1A for ; Thu, 2 Apr 2009 21:56:36 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id B934278CD7; Thu, 2 Apr 2009 21:56:35 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n32Lua3O001644; Thu, 2 Apr 2009 21:56:36 GMT (envelope-from phk@critter.freebsd.dk) To: Marcel Moolenaar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 02 Apr 2009 10:31:44 MST." <17CC6EDA-E2F7-4BC3-B7EB-EAAA3F80A9C1@mac.com> Date: Thu, 02 Apr 2009 21:56:36 +0000 Message-ID: <1643.1238709396@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: FreeBSD Arch , Gordon Tetlow Subject: Re: On i18n [was: Re: On errno] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 21:56:37 -0000 In message <17CC6EDA-E2F7-4BC3-B7EB-EAAA3F80A9C1@mac.com>, Marcel Moolenaar wri tes: >> We write an OS for the people who can and will use an OS written by >> us. > >Doesn't this ipso facto mean that FreeBSD is bound to be >used by the same people who develop it? > >Isn't this a recipe for cliques? And isn't that more or less the case ? :-) It was a registration of fact, not a prescription to follow. >> Such an influx, should it happen, would most likely be rebuffed and >> resisted by the current developers of FreeBSD. > >Right. You block the thing you argue will not happen. I don't block anything, I merely record my non-belief in the viability of the concept, and advocate not unduly wasting our severely limited developer time on it. If people want to I18N the kernel, they are free to do so for all I care, as long as the source code is still readable. The thing I do try to block, is the "lets try to squeeze it into 15.72 bits and use the rest for flags" mentality, because it hurts us to no end. It is a 1970 mindset that should have no place in a general purpose kernel running on multiple megabyte RAM machines. I went a long way to push "state of the art" in this area with nmount and geom, both of which abandons the "struct+#define" model for much more flexible means. The "struct+#define" model, stems from times where disk deviced drivers allowed root to fondle their registers directly through ioctls, so magic operations like disk formatting could be done from userland without bloating the kernel. Today we tell kernels to perform complex operations, which gives complex diagnostics when they do not succeed, and therefore the solution is not a 64bit errno encoded in bitfields, but a text buffer, where a sensible diagnostic can be produced. If you don't belive me, look in netgraph, which has a nightmare facility for encoding stuff, pushing into the kernel, and decoding it again. The really funny thing here is, that if you measure the amount of code required to fold error conditions into struct+#define packing, and unfolding it again into text, you'll find that it bloats the system, relative to just writing the text in the first place. That is why I propose that programs register a buffer with the kernel, and we stick the error right there and then. That obviously raises the question of I18N and language in the kernel, and my position is: as long as dmesg(8) speaks english, the kernel speaks english. If somebody want to come up with a credible I18N model for the kernel, fine. Until such time, forget I18N in this context, because there are much bigger problems for I18N in the kernel, than this error text buffer. >Maybe we should ask ourselves this: if the current >developers rebuf and resist influx, isn't it time >for them to hand in their commit bits and find some >other project to contribute to? Marcel, if you have access to the core mail archives, you will find a lot of emails from me on the subject of retirement, retirement policies, and the lack thereof. Over history, we have had a lot of arm-chair generals cling to their commitbit, because in FreeBSD you don't even get a goldenish watch when you retire: you get nothing. Recently, a committer who have been in the project longer than me, and carried a particular important task through a decade, retired. I don't recall seeing as much as a "thanks for all the fish" from core. Personally, I hope to be able to give my reasoned advice and shrug my shoulders when it is not followed: I have always been a big believer in the principle, that committed code talks loudest. Poul-Henning FreeBSD General (3. Armchair, under the window) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Fri Apr 3 16:59:13 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDBD81065689 for ; Fri, 3 Apr 2009 16:59:13 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by mx1.freebsd.org (Postfix) with ESMTP id 2056C8FC25 for ; Fri, 3 Apr 2009 16:59:11 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: (qmail 20208 invoked from network); 3 Apr 2009 16:59:11 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 3 Apr 2009 16:59:11 -0000 Message-ID: <49D64082.9060202@telenix.org> Date: Fri, 03 Apr 2009 12:59:46 -0400 From: Chuck Robey User-Agent: Thunderbird 2.0.0.19 (X11/20090121) MIME-Version: 1.0 To: Alexander Leidinger References: <4915.1238655116@critter.freebsd.dk> <20090402114916.170547o692pg252c@webmail.leidinger.net> In-Reply-To: <20090402114916.170547o692pg252c@webmail.leidinger.net> X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: FreeBSD Arch , Poul-Henning Kamp , Marcel Moolenaar , Gordon Tetlow Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2009 16:59:30 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alexander Leidinger wrote: > Quoting Poul-Henning Kamp (from Thu, 02 Apr 2009 > 06:51:56 +0000): > >> In message <20090402084616.19846py8s75ogp44@webmail.leidinger.net>, >> Alexander Leidinger writes: >> >>> I agree with your general opinion about i18n and think that it is not >>> a matter of workforce, it's a matter of feasability. As soon as we >>> have the infrastructure, translations will show up "soonish". It's not >>> "if", it's "when". >> >> And once the novelty has worn off, we are left, as so many other >> operating systems, with at best 70% translation into each language. > > If I adapt your reasoning to our docs, we need to delete all our > translations and only keep the english one. Look at the subject: wasn't this (really clearly) a discussion of error strings, and not strings in general? Aren't there always error codes available in number form, so that any user could easily translate to their own language choice, even if it's unique, or even composed of bits and pieces of 5 different languages? Using numbers allows great flexibility, using strings just complicates things mightily. Some of the stuff I've read, about supplying error subcodes makes sense, but trying to extend this argument to *all* strings is outside the pale of the argument, isn't it? Besides, application translations is already being done pretty well, KDE is an example of that, and that's a long way from dealing with our kernel. > > If you are pissed off by the missing 30%, submit a patch or stick with > english. That's an adaption of what we tell to people when they complain > about missing stuff in unmaintained areas of src/ports. Alternatively we > can disconnect languages from the system if we think there's not enough > coverage. Above you also average the interest over all languages, an > generalization which doesn't hold, see below. > > You assume we need to ship with 100% coverage in all languages. For a > person which only uses 40% of one specific language, and this 40% are > covered by 100%, it does not matter. If those 40% are a major part to > allow to earn a person an income to feed childs and the relative other, > great. > > Note, people which set their LANG to something else already get only a > xx% translated system, e.g. KDE/GNOME are displaying a lot of stuff in > other languages, but stuff which is comming from FreeBSD itself is in > english, so we have the situation you describe already and users are > used to it (don't tell me this does not apply because we only program an > OS, it applies, as for an user it does not matter what we program, _he_ > is using a complete system consisting of an OS and other stuff, not only > the OS without anything else). They do their best, they enjoy their > native language where it is available and try to handle english when it > is not available. > > At some point I expect that we have some strong languages, and some not > so strong languages. Which ones are which and how many languages we > would have... I assume the trends regarding this for the handbook can > give a hint. > > Bye, > Alexander. > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknWQIIACgkQz62J6PPcoOnW3ACdFdiokRdZZX4386RM3X9wdsuY SowAoJtuh6EgBc3qP8ADfduFm+cP3fCV =0ocL -----END PGP SIGNATURE----- From owner-freebsd-arch@FreeBSD.ORG Fri Apr 3 18:02:05 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 686E41065690 for ; Fri, 3 Apr 2009 18:02:05 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from smtp8.server.rpi.edu (smtp8.server.rpi.edu [128.113.2.228]) by mx1.freebsd.org (Postfix) with ESMTP id 152768FC23 for ; Fri, 3 Apr 2009 18:02:04 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp8.server.rpi.edu (8.13.1/8.13.1) with ESMTP id n33GxtN3021552; Fri, 3 Apr 2009 12:59:57 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> Date: Fri, 3 Apr 2009 12:59:54 -0400 To: Marcel Moolenaar , FreeBSD Arch From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Bayes-Prob: 0.0001 (Score 0) X-RPI-SA-Score: 0.00 () [Hold at 20.00] 22490(-25) X-CanItPRO-Stream: outgoing X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.228 Cc: Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2009 18:02:06 -0000 At 9:13 AM -0700 4/1/09, Marcel Moolenaar wrote: >On Mar 30, 2009, at 10:31 AM, Marcel Moolenaar wrote: > >>This begs the question: what is stopping us from adding new >>error codes? > >>>kientzle@ wrote: >>>POSIX does specify the range of allowable error codes >>>for a lot of system calls, but not all. In my experience, >>>straying outside of that causes more problems than it's >>>worth. > >I agree that well-known system calls should not be changed >willy-nilly. But what about error codes returned from GEOM >or other FreeBSD-specific subsystems? I'll make the observation that I've seen a lot of code which calls some system routine, checks the result, and if there was an error it just returns to the caller. Thus, a new errno from GEOM may show up as coming from routines which are not FreeBSD-specific. Now, that might be a fine thing to do. I'm just saying that we can not be sure that any new errno's will *only* show up as coming from routines that are unique to FreeBSD. -- 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-arch@FreeBSD.ORG Fri Apr 3 18:18:52 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1C2A10656DB for ; Fri, 3 Apr 2009 18:18:52 +0000 (UTC) (envelope-from achyutkamlesh@yahoo.co.in) Received: from web7703.mail.in.yahoo.com (web7703.mail.in.yahoo.com [202.86.4.41]) by mx1.freebsd.org (Postfix) with SMTP id D010F8FC0A for ; Fri, 3 Apr 2009 18:18:51 +0000 (UTC) (envelope-from achyutkamlesh@yahoo.co.in) Received: (qmail 72181 invoked by uid 60001); 3 Apr 2009 17:52:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s1024; t=1238781129; bh=sCLZZ0yGBzJhpyxnk00aPI66aLOq/XNm4iIN9yGZDt4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=c7rzPqwvDPdf9fDGw+44n3xin7ZOSTUcxzX4cF0XsAC7OU4ZrZsqZeVS4VTD/yok3eTSCpYDFCbgQXM6/Tdmoto90i5MmXFof4CMCfJlfAhvVrdcokWT5j/bIlDwFwAmD2q8O56EGaZWDESKI0Ex9OXWZ1vvcirffncAkcMcBuA= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=0VxAcR4MxPlb0ZpjDYE9KEj0t9UeSJV47FY6bfnItadDm33CJV5I9Y5Xc7TDd3p/tzX9Qsqp+2B1ZQoL4N8XE44OxXBqnDTcz0wB29FnhgYtvVl1w2G5IjUu+gh2pLwntMJGRo/0UiRAgLzY/pyCBAuYWYRWDGG/s2VT1qLWLWc=; Message-ID: <821081.71230.qm@web7703.mail.in.yahoo.com> X-YMail-OSG: 9t7DTXkVM1mmkQU7.GJGfbce9ALrEpsGUw5au3WMrLcUH4IGTWyks7X8FWxiDgsZpKvFF2Lx7DtaS8lYv1QGaS9QE7MqPQCEUE07d3Hq2DUxHJJQlsneZ_cn_3ikSojj9Gq8cuYhiNoNo3.FktkZC9hbmPN76Pt7gLA2YT_xYcbs_5FBhmOqyUSKUQLQhA-- Received: from [67.166.135.199] by web7703.mail.in.yahoo.com via HTTP; Fri, 03 Apr 2009 23:22:09 IST X-Mailer: YahooMailClassic/5.2.15 YahooMailWebService/0.7.289.10 Date: Fri, 3 Apr 2009 23:22:09 +0530 (IST) From: Kamlesh Patel To: freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: GSoC 2009 Project proposal Review X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2009 18:18:56 -0000 Hi, =0A=0A=0A=0AI=0Aam applying for a FreeBSD Project =E2=80=9CNAND Flash drive= r support=E2=80=9D in GSoC 2009. I got this group id from M. Warner Losh. I have a schedule how i am planning to finish this project in summer. Could= anyone please tell me if the estimated time of the tasks or dependencies b= etween the tasks are not correct or need modification? =0A=0A=20 April 20-May 23:=C2=A0=C2=A0=C2=A0 Study FreeBSD driver APIs and NAND comma= nd sets May 23-June 6:=C2=A0=C2=A0=C2=A0=C2=A0 Write FreeBSD driver skeleton for GE= OM driver. June 7-June 13:=C2=A0=C2=A0=C2=A0 Implement probe and attach routines. Impl= ement GEOM ioctls suck that diskinfo will work on the device June 14-June 20:=C2=A0 Implement ECC routines June 21-July 4:=C2=A0=C2=A0=C2=A0=C2=A0 Implement and test read support July 5-July 11:=C2=A0=C2=A0=C2=A0 =C2=A0 Implement and test write support July 13:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 M= id term evaluation of progress July 12-July 25:=C2=A0=C2=A0 Implement bad block support July 26-Aug 15:=C2=A0=C2=A0 Get ufs working on the flash device, tune perfo= rmance. Aug 16-Aug 22:=C2=A0=C2=A0 Write man page for driver Aug 24th=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 Final evalution Thank you in advance Kamlesh MS CS CSUS =0A=0A=0A From owner-freebsd-arch@FreeBSD.ORG Fri Apr 3 19:01:40 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2DD106566C for ; Fri, 3 Apr 2009 19:01:40 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: from mail-qy0-f134.google.com (mail-qy0-f134.google.com [209.85.221.134]) by mx1.freebsd.org (Postfix) with ESMTP id 61AF88FC16 for ; Fri, 3 Apr 2009 19:01:40 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by qyk40 with SMTP id 40so2280117qyk.3 for ; Fri, 03 Apr 2009 12:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FnTyCnIz/UDok4eOagMloUIzhbhE4BnjmEvK6BNlpII=; b=RTiX+eqMpDFGltY5eFdvLJx+HgIBIsThqBAPbZAvMVf+QjFN7y7cbiyBBD6tF86eAC oLcyiHki3DbKHFnikg5XGwRMpLI9tcoSDgK1XFe7jjnbXXG7AEwaIe2ZsYeuoDiTqA6E DIx6BQUCXFog9XbOBojjKfw8w3qrZB9yGX1qo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=i9sIapxSOiEi8fEKZWpQue8EAA5jq3hbvWpKMzzeJuAEwjpBVsD6my3nrpnMqOOew+ 7aH9MeZc7iYiqLVY88w03i3fvlOVO/ajt8dAha4gOISHPGXjKdd8/IV686Nlike58GD/ kevFVhCGX+3yi/vtXTgPSnFH5DOlP7O62h0m4= MIME-Version: 1.0 In-Reply-To: <821081.71230.qm@web7703.mail.in.yahoo.com> References: <821081.71230.qm@web7703.mail.in.yahoo.com> Date: Fri, 3 Apr 2009 20:40:02 +0200 Received: by 10.231.20.2 with SMTP id d2mr380652ibb.37.1238784017476; Fri, 03 Apr 2009 11:40:17 -0700 (PDT) Message-ID: <164b4c9c0904031140n2ec05068q4406120907bdbae0@mail.gmail.com> From: Sylvestre Gallon To: Kamlesh Patel Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arch@freebsd.org Subject: Re: GSoC 2009 Project proposal Review X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2009 19:01:41 -0000 On Fri, Apr 3, 2009 at 7:52 PM, Kamlesh Patel w= rote: > Hi, > > I > am applying for a FreeBSD Project =93NAND Flash driver support=94 in GSoC= 2009. I got this group id from M. Warner Losh. > I have a schedule how i am planning to finish this project in summer. Cou= ld anyone please tell me if the estimated time of the tasks or dependencies= between the tasks are not correct or need modification? > > > > > April 20-May 23:=A0=A0=A0 Study FreeBSD driver APIs and NAND command sets > May 23-June 6:=A0=A0=A0=A0 Write FreeBSD driver skeleton for GEOM driver. > June 7-June 13:=A0=A0=A0 Implement probe and attach routines. Implement G= EOM ioctls suck that diskinfo will work on the device > > June 14-June 20:=A0 Implement ECC routines > June 21-July 4:=A0=A0=A0=A0 Implement and test read support > July 5-July 11:=A0=A0=A0 =A0 Implement and test write support > July 13:=A0=A0=A0 =A0=A0 =A0 =A0 =A0 =A0=A0 Mid term evaluation of progre= ss > July 12-July 25:=A0=A0 Implement bad block support > July 26-Aug 15:=A0=A0 Get ufs working on the flash device, tune performan= ce. > Aug 16-Aug 22:=A0=A0 Write man page for driver > Aug 24th=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0 Final evalution > > Thank you in advance > Kamlesh > MS CS CSUS > Hi, I am not a FreeBSD developer but I have got some interest in Nandflash and I've got some question for you. I found this topic interesting. How do you plan to implement this driver : do you want to develop only some flash layer or add row nand support just under geom. Have you take a look on some project like uffs (http://uffs.org/) to design the nandflash architecture ? In your timeline you do not talk about ware leveling, do you have take time to think about it ? Without wear leveling a nandflash with a common filesystem on is back will only work for one or two weeks... You don't talk about bad blocks too, how do you think you can handle them ? I hope that my question will help you :) Cheers, --=20 Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org) From owner-freebsd-arch@FreeBSD.ORG Sat Apr 4 15:29:06 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C070A106566B for ; Sat, 4 Apr 2009 15:29:06 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 70CD68FC16 for ; Sat, 4 Apr 2009 15:29:06 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Lq7nt-0005P6-G2 for freebsd-arch@freebsd.org; Sat, 04 Apr 2009 15:29:05 +0000 Received: from 93-138-75-146.adsl.net.t-com.hr ([93.138.75.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Apr 2009 15:29:05 +0000 Received: from ivoras by 93-138-75-146.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Apr 2009 15:29:05 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-arch@freebsd.org From: Ivan Voras Date: Sat, 04 Apr 2009 17:28:44 +0200 Lines: 46 Message-ID: References: <821081.71230.qm@web7703.mail.in.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig76C7E8B85F1A0758C740B71C" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 93-138-75-146.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <821081.71230.qm@web7703.mail.in.yahoo.com> X-Enigmail-Version: 0.95.7 Sender: news Subject: Re: GSoC 2009 Project proposal Review X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2009 15:29:07 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig76C7E8B85F1A0758C740B71C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Kamlesh Patel wrote: > Hi, >=20 >=20 >=20 >=20 >=20 > I > am applying for a FreeBSD Project =E2=80=9CNAND Flash driver support=E2= =80=9D in GSoC 2009. I got this group id from M. Warner Losh. Hi, Is this about the new JEDEC Flash standard, represented also by this product: http://www.sun.com/storage/flash/module.jsp ? (it might look like a silly question - but do you have the hardware? :) )= > July 26-Aug 15: Get ufs working on the flash device, tune performance= =2E Do you think UFS and other non-logging file systems can work optimally on flash devices (wrt flash blcok size, mostly)? --------------enig76C7E8B85F1A0758C740B71C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknXfKwACgkQldnAQVacBciNWwCeNHgA89nVPTy1G6TtgzKTbiy9 LkMAn0CY7iykGyNSzS4nk3LpmaIDyLZE =yI8M -----END PGP SIGNATURE----- --------------enig76C7E8B85F1A0758C740B71C--