From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 01:57:36 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8D40106564A for ; Mon, 5 May 2008 01:57:36 +0000 (UTC) (envelope-from fgleiser@cactus.fi.uba.ar) Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108]) by mx1.freebsd.org (Postfix) with ESMTP id 034868FC13 for ; Mon, 5 May 2008 01:57:35 +0000 (UTC) (envelope-from fgleiser@cactus.fi.uba.ar) Received: from [192.168.150.25] (104-146-235-201.fibertel.com.ar [201.235.146.104]) (authenticated bits=0) by cactus.fi.uba.ar (8.14.2/8.14.2) with ESMTP id m451vXAD060299 for ; Sun, 4 May 2008 22:57:34 -0300 (ART) (envelope-from fgleiser@cactus.fi.uba.ar) Message-ID: <481E6988.10200@cactus.fi.uba.ar> Date: Sun, 04 May 2008 22:57:28 -0300 From: Fer Gleiser User-Agent: Thunderbird 1.5.0.12 (X11/20070719) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.63 on 157.92.49.108 Cc: Subject: problems with CTF on -STABLE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 01:57:36 -0000 We're facing some problems with CTF on -STABLE. We need that so we can have DTrace runing on FreeBSD 7 The tools and the libs build fine, but I can't ctfconvert anything. In some cases get the following error: ctfconvert -L VERSION -g tdfx_linux.o ERROR: ctfconvert: die 37: base type without name and in some others ctfconvert just dies and dumps core. I all cases, xstrdup is the culprit: (gdb) where #0 0x281bbfa9 in strlen () from /lib/libc.so.7 #1 0x28147187 in strdup (str=0x0) at /usr/src/lib/libc/string/strdup.c:47 #2 0x08050f22 in xstrdup () #3 0x0804dfde in die_through_create () #4 0x0804d712 in die_create_one () #5 0x0804d769 in die_create () #6 0x0804ecb4 in dw_read () #7 0x0804c12b in main () now, if I copy both the .o and the ctfconvert executable to a -CURRENT box, it runs fine. From the error (base type without name) it seems that some info that ctfconvert needs is not available on -STABLE, or maybe it's on a different place or in a format ctfconvert doesn't understand. Maybe libdwarf is built on a different way, but so far I couln't find what the problem is. Any pointers/help would be greatly apreciated Fer From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 02:16:29 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ED17106566B for ; Mon, 5 May 2008 02:16:29 +0000 (UTC) (envelope-from fgleiser@cactus.fi.uba.ar) Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108]) by mx1.freebsd.org (Postfix) with ESMTP id 3662C8FC28 for ; Mon, 5 May 2008 02:16:27 +0000 (UTC) (envelope-from fgleiser@cactus.fi.uba.ar) Received: from [192.168.150.25] (104-146-235-201.fibertel.com.ar [201.235.146.104]) (authenticated bits=0) by cactus.fi.uba.ar (8.14.2/8.14.2) with ESMTP id m451f8fe059787; Sun, 4 May 2008 22:41:14 -0300 (ART) (envelope-from fgleiser@cactus.fi.uba.ar) Message-ID: <481E65AF.7020009@cactus.fi.uba.ar> Date: Sun, 04 May 2008 22:41:03 -0300 From: Fer Gleiser User-Agent: Thunderbird 1.5.0.12 (X11/20070719) MIME-Version: 1.0 To: LiQun Li References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.63 on 157.92.49.108 Cc: hackers@freebsd.org Subject: Re: soc2008 DTrace toolkit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 02:16:29 -0000 LiQun Li wrote: > Hi, all, > My name is LiQun Li, originally from China, now study in University of > Iowa. I am a graduate student, majored in Computer Science. > I have used Open Source Software for a while, most time under Linux, a > little bit under FreeBSD. > DTrace is a really cool feature for Solaris, it will be great if OSS > has this one too. > This sumer, Google sponsors this SOC, and FreeBSD has this project. I > am going to have a try. > Since my courses will end after the middle of May, I would not spend > too much time on this project before that. > I'm also working on porting some DTrace providers to FreeBSD (a subset of sched, vminfo and sysinfo). John Birrel is leading the main effort an we're basing our work on his latest sources. What parts of DTrace are you planing to do? Fer From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 13:05:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD89B106564A for ; Mon, 5 May 2008 13:05:23 +0000 (UTC) (envelope-from carl.shapiro@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.228]) by mx1.freebsd.org (Postfix) with ESMTP id 764348FC1A for ; Mon, 5 May 2008 13:05:23 +0000 (UTC) (envelope-from carl.shapiro@gmail.com) Received: by wr-out-0506.google.com with SMTP id 50so1098521wra.13 for ; Mon, 05 May 2008 06:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=Aq4KohFIkIkOkKQi9qLBfg5dA6yfcfOl5cfw2AtqJD8=; b=qHwrkknOibLQ+WFREx/lwbhh6Ow00SO+ofLnypQvXPhKWxfXkTMoIpRhbko+Cm8NBYfRC+tYhAefapPupRvl7r4enzcEqnP2W8qgRkBC0Cw3DqJguc3Fb1TCzsl91fM3jpOz1SKv0rkOlVDe63HytCDAWE1mIbsHFqt0pVRuZbc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Xb5761RxDI0wqZMM4tgvC3btPTHtcH637JeLf6RCpmkzC/TMzczjRqeWal9sFByfA7PG3polBC3SKrncLSKeTMxwWI7JLor53RDkbsaI/IL+I5tB6r195vAFJTuVzdnTSMXdFk0131Q8DitbHs6YbtIUJ5D/yXJLnUS41aLSRw0= Received: by 10.142.158.17 with SMTP id g17mr2498155wfe.127.1209991225171; Mon, 05 May 2008 05:40:25 -0700 (PDT) Received: by 10.142.162.12 with HTTP; Mon, 5 May 2008 05:40:25 -0700 (PDT) Message-ID: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> Date: Mon, 5 May 2008 05:40:25 -0700 From: "Carl Shapiro" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 13:05:23 -0000 FreeBSD Hackers, I have a general question about the compatibility of FreeBSD binaries within major releases. If I build a binary for a given release of FreeBSD can I make a reasonable guarantee that the binary will run on both previous and subsequent minor releases of the same major release? In other words, if I build on FreeBSD 6.3 and do not rely on anything unique to 6.3 (such as the presence of specific version strings) how certain can I be that the code will or will not run on 6.2, 6.1 etc.? Also, is this documented anywhere on the FreeBSD web site? The closest thing I could find is the following guidance for driver vendors which falls just short of answering my question: http://wiki.freebsd.org/VendorInformation (Too bad the fancy illustration is missing.) Regards, Carl From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 13:37:58 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EED31065673 for ; Mon, 5 May 2008 13:37:58 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 63BA58FC0A; Mon, 5 May 2008 13:37:57 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <481F0DB3.9070505@FreeBSD.org> Date: Mon, 05 May 2008 15:37:55 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Carl Shapiro References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> In-Reply-To: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 13:37:58 -0000 Carl Shapiro wrote: > FreeBSD Hackers, > > I have a general question about the compatibility of FreeBSD binaries > within major releases. If I build a binary for a given release of > FreeBSD can I make a reasonable guarantee that the binary will run on > both previous and subsequent minor releases of the same major release? > In other words, if I build on FreeBSD 6.3 and do not rely on anything > unique to 6.3 (such as the presence of specific version strings) how > certain can I be that the code will or will not run on 6.2, 6.1 etc.? > > Also, is this documented anywhere on the FreeBSD web site? The > closest thing I could find is the following guidance for driver > vendors which falls just short of answering my question: > > http://wiki.freebsd.org/VendorInformation > > (Too bad the fancy illustration is missing.) Binaries compiled on a certain version of FreeBSD will continue to run on later versions, but are not guaranteed to run on earlier versions (and in fact *will* not run depending on the binary). This is because over time the system libraries and kernel grow new features which may be used by applications, so they will therefore fail to run if executed on old systems that do not provide these features. If your goal is to provide an application that runs on a range of FreeBSD versions, then either build it for the oldest of these versions, or provide multiple versions if there is a reason to do so (e.g. if there have been major improvements in the OS that are relevant to your application). Kris From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 14:26:21 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE6BE106567B; Mon, 5 May 2008 14:26:21 +0000 (UTC) (envelope-from eischen@vigrid.com) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6655E8FC16; Mon, 5 May 2008 14:26:21 +0000 (UTC) (envelope-from eischen@vigrid.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m45Dw8qA010893; Mon, 5 May 2008 09:58:08 -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, 05 May 2008 09:58:08 -0400 (EDT) Date: Mon, 5 May 2008 09:58:08 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kris Kennaway In-Reply-To: <481F0DB3.9070505@FreeBSD.org> Message-ID: References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Carl Shapiro Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 14:26:21 -0000 On Mon, 5 May 2008, Kris Kennaway wrote: > Carl Shapiro wrote: >> FreeBSD Hackers, >> >> I have a general question about the compatibility of FreeBSD binaries >> within major releases. If I build a binary for a given release of >> FreeBSD can I make a reasonable guarantee that the binary will run on >> both previous and subsequent minor releases of the same major release? >> In other words, if I build on FreeBSD 6.3 and do not rely on anything >> unique to 6.3 (such as the presence of specific version strings) how >> certain can I be that the code will or will not run on 6.2, 6.1 etc.? >> >> Also, is this documented anywhere on the FreeBSD web site? The >> closest thing I could find is the following guidance for driver >> vendors which falls just short of answering my question: >> >> http://wiki.freebsd.org/VendorInformation >> >> (Too bad the fancy illustration is missing.) > > Binaries compiled on a certain version of FreeBSD will continue to run on > later versions, but are not guaranteed to run on earlier versions (and in > fact *will* not run depending on the binary). This is because over time the > system libraries and kernel grow new features which may be used by > applications, so they will therefore fail to run if executed on old systems > that do not provide these features. For 7.0 and onwards, we will hopefully have a tool that you can run on your application to do abi checking. One of the things it should be able to do is tell under what releases it will run, including previous releases. For 6.x, you may be able to manually check the symbols your application uses against the libraries from 6.0, 6.1, etc. This should give a good idea as to whether your application will run on those releases. I think checking symbols is good enough for releases within a branch since we don't change ABIs. -- DE From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 14:39:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A48851065674 for ; Mon, 5 May 2008 14:39:35 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9BF8FC17; Mon, 5 May 2008 14:39:34 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <481F1C24.3030405@FreeBSD.org> Date: Mon, 05 May 2008 16:39:32 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Daniel Eischen References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Carl Shapiro Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 14:39:35 -0000 Daniel Eischen wrote: >> Binaries compiled on a certain version of FreeBSD will continue to run >> on later versions, but are not guaranteed to run on earlier versions >> (and in fact *will* not run depending on the binary). This is because >> over time the system libraries and kernel grow new features which may >> be used by applications, so they will therefore fail to run if >> executed on old systems that do not provide these features. > > For 7.0 and onwards, we will hopefully have a tool that you can > run on your application to do abi checking. One of the things > it should be able to do is tell under what releases it will run, > including previous releases. That sounds like a good idea! > For 6.x, you may be able to manually check the symbols your > application uses against the libraries from 6.0, 6.1, etc. > This should give a good idea as to whether your application > will run on those releases. I think checking symbols is > good enough for releases within a branch since we don't > change ABIs. Yeah, this should be enough for almost all cases. There are some aspects of the ABI that are not covered by library symbols though, such as file formats, the sysctl MIB, device ioctls, probably others. Kris From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 16:44:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997E01065671 for ; Sat, 3 May 2008 16:44:01 +0000 (UTC) (envelope-from nayak_purushotham@yahoo.com) Received: from web56102.mail.re3.yahoo.com (web56102.mail.re3.yahoo.com [216.252.110.196]) by mx1.freebsd.org (Postfix) with SMTP id 283F28FC21 for ; Sat, 3 May 2008 16:44:01 +0000 (UTC) (envelope-from nayak_purushotham@yahoo.com) Received: (qmail 63911 invoked by uid 60001); 3 May 2008 16:17:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=EBhPTIbOjffjGB25l7nxTRzlclG15gjibgAxx4RJhpjEhJv7Qlq6fNUDrsMJ9aiqPyjV6475qeADnIRAc6e4eva/S1CLzDDDOCmqrbaPry/mDXOshIITwuBRs+AmBtqpb0SErykTn8sygOseElOPlRvllRLR1lJ29ywVzHS0gfY=; X-YMail-OSG: TyxnRI0VM1kdpHlKAqdy.BrsoxYHRT59ZeX4EL379_AWL5_nnpvzP_zEbefDcbtTke.Yb4E8zSXY.Bqz08sFHpdvBxJ5dhAQa7XSopt4bH91c4WwD53oglDFVHs- Received: from [68.48.62.61] by web56102.mail.re3.yahoo.com via HTTP; Sat, 03 May 2008 09:17:19 PDT X-Mailer: YahooMailWebService/0.7.185 Date: Sat, 3 May 2008 09:17:19 -0700 (PDT) From: Purushotham Nayak To: freebsd-hackers@freebsd.org Message-ID: <689122.62781.qm@web56102.mail.re3.yahoo.com> X-Mailman-Approved-At: Mon, 05 May 2008 16:22:04 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Gprof C++ support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nayak_purushotham@yahoo.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 16:44:01 -0000 Hi All, I've been trying to use gprof on some C++ code and appears it doesn't demangle C++ function names. I was wondering if anyone is working on it? I would like to contribute/help in adding this. Purushotham _________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. [1]Try it now. References 1. http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 17:50:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25BA11065675 for ; Mon, 5 May 2008 17:50:38 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outK.internet-mail-service.net (outk.internet-mail-service.net [216.240.47.234]) by mx1.freebsd.org (Postfix) with ESMTP id 0DCCB8FC22 for ; Mon, 5 May 2008 17:50:37 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 05 May 2008 18:52:15 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 2F5D12D6013; Mon, 5 May 2008 10:50:37 -0700 (PDT) Message-ID: <481F48EE.3050806@elischer.org> Date: Mon, 05 May 2008 10:50:38 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Kris Kennaway References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> In-Reply-To: <481F0DB3.9070505@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Carl Shapiro Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 17:50:38 -0000 Kris Kennaway wrote: > Carl Shapiro wrote: >> FreeBSD Hackers, >> >> I have a general question about the compatibility of FreeBSD binaries >> within major releases. If I build a binary for a given release of >> FreeBSD can I make a reasonable guarantee that the binary will run on >> both previous and subsequent minor releases of the same major release? >> In other words, if I build on FreeBSD 6.3 and do not rely on anything >> unique to 6.3 (such as the presence of specific version strings) how >> certain can I be that the code will or will not run on 6.2, 6.1 etc.? >> >> Also, is this documented anywhere on the FreeBSD web site? The >> closest thing I could find is the following guidance for driver >> vendors which falls just short of answering my question: >> >> http://wiki.freebsd.org/VendorInformation >> >> (Too bad the fancy illustration is missing.) > > Binaries compiled on a certain version of FreeBSD will continue to run > on later versions, but are not guaranteed to run on earlier versions > (and in fact *will* not run depending on the binary). This is because > over time the system libraries and kernel grow new features which may be > used by applications, so they will therefore fail to run if executed on > old systems that do not provide these features. > > If your goal is to provide an application that runs on a range of > FreeBSD versions, then either build it for the oldest of these versions, > or provide multiple versions if there is a reason to do so (e.g. if > there have been major improvements in the OS that are relevant to your > application). I agree in general, however we do make an attempt to keep ABI compatibility within a release line, so that there is a high probability that a binary compiled on a later one will run on an earlier one as long as it does not rely on new features. It's not guaranteed, but if you test it on the oldest of the line it should work on all intermmediate releases too. > > Kris > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 18:16:15 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA4081065678 for ; Mon, 5 May 2008 18:16:15 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F296C8FC17; Mon, 5 May 2008 18:16:14 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <481F4EED.2030300@FreeBSD.org> Date: Mon, 05 May 2008 20:16:13 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Julian Elischer References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> In-Reply-To: <481F48EE.3050806@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Carl Shapiro Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 18:16:15 -0000 Julian Elischer wrote: > Kris Kennaway wrote: >> Carl Shapiro wrote: >>> FreeBSD Hackers, >>> >>> I have a general question about the compatibility of FreeBSD binaries >>> within major releases. If I build a binary for a given release of >>> FreeBSD can I make a reasonable guarantee that the binary will run on >>> both previous and subsequent minor releases of the same major release? >>> In other words, if I build on FreeBSD 6.3 and do not rely on anything >>> unique to 6.3 (such as the presence of specific version strings) how >>> certain can I be that the code will or will not run on 6.2, 6.1 etc.? >>> >>> Also, is this documented anywhere on the FreeBSD web site? The >>> closest thing I could find is the following guidance for driver >>> vendors which falls just short of answering my question: >>> >>> http://wiki.freebsd.org/VendorInformation >>> >>> (Too bad the fancy illustration is missing.) >> >> Binaries compiled on a certain version of FreeBSD will continue to run >> on later versions, but are not guaranteed to run on earlier versions >> (and in fact *will* not run depending on the binary). This is because >> over time the system libraries and kernel grow new features which may >> be used by applications, so they will therefore fail to run if >> executed on old systems that do not provide these features. >> >> If your goal is to provide an application that runs on a range of >> FreeBSD versions, then either build it for the oldest of these >> versions, or provide multiple versions if there is a reason to do so >> (e.g. if there have been major improvements in the OS that are >> relevant to your application). > > I agree in general, however we do make an attempt to keep ABI > compatibility within a release line, so that there is a high > probability that a binary compiled on a later one will run on > an earlier one as long as it does not rely on new features. Actually we don't attempt to keep this form of ABI compatibility (running 6.3 binaries on 6.0, for example), because it basically precludes ever adding new functions to libc within a branch, or new syscalls to the kernel. You are correct that often binaries will not notice these accumulated changes though, or can be carefully constructed to avoid them. Kris From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 18:24:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EC80106566B for ; Mon, 5 May 2008 18:24:33 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outS.internet-mail-service.net (outs.internet-mail-service.net [216.240.47.242]) by mx1.freebsd.org (Postfix) with ESMTP id 45CB08FC20 for ; Mon, 5 May 2008 18:24:33 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 05 May 2008 19:26:17 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 3B94C2D601A; Mon, 5 May 2008 11:24:32 -0700 (PDT) Message-ID: <481F50E1.3010902@elischer.org> Date: Mon, 05 May 2008 11:24:33 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Kris Kennaway References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <481F4EED.2030300@FreeBSD.org> In-Reply-To: <481F4EED.2030300@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Carl Shapiro Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 18:24:33 -0000 Kris Kennaway wrote: > Julian Elischer wrote: >> Kris Kennaway wrote: >>> Carl Shapiro wrote: >>>> FreeBSD Hackers, >>>> >>>> I have a general question about the compatibility of FreeBSD binaries >>>> within major releases. If I build a binary for a given release of >>>> FreeBSD can I make a reasonable guarantee that the binary will run on >>>> both previous and subsequent minor releases of the same major release? >>>> In other words, if I build on FreeBSD 6.3 and do not rely on anything >>>> unique to 6.3 (such as the presence of specific version strings) how >>>> certain can I be that the code will or will not run on 6.2, 6.1 etc.? >>>> >>>> Also, is this documented anywhere on the FreeBSD web site? The >>>> closest thing I could find is the following guidance for driver >>>> vendors which falls just short of answering my question: >>>> >>>> http://wiki.freebsd.org/VendorInformation >>>> >>>> (Too bad the fancy illustration is missing.) >>> >>> Binaries compiled on a certain version of FreeBSD will continue to >>> run on later versions, but are not guaranteed to run on earlier >>> versions (and in fact *will* not run depending on the binary). This >>> is because over time the system libraries and kernel grow new >>> features which may be used by applications, so they will therefore >>> fail to run if executed on old systems that do not provide these >>> features. >>> >>> If your goal is to provide an application that runs on a range of >>> FreeBSD versions, then either build it for the oldest of these >>> versions, or provide multiple versions if there is a reason to do so >>> (e.g. if there have been major improvements in the OS that are >>> relevant to your application). >> >> I agree in general, however we do make an attempt to keep ABI >> compatibility within a release line, so that there is a high >> probability that a binary compiled on a later one will run on >> an earlier one as long as it does not rely on new features. > > Actually we don't attempt to keep this form of ABI compatibility > (running 6.3 binaries on 6.0, for example), because it basically > precludes ever adding new functions to libc within a branch, or new > syscalls to the kernel. You are correct that often binaries will not > notice these accumulated changes though, or can be carefully constructed > to avoid them. that's all that I said.. I said that because we keep a stable ABI there is a HIGH PROBABLILITY of stuff working, but not a guarantee. > > Kris > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 18:32:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F05C21065672 for ; Mon, 5 May 2008 18:32:29 +0000 (UTC) (envelope-from carl.shapiro@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id 811718FC25 for ; Mon, 5 May 2008 18:32:29 +0000 (UTC) (envelope-from carl.shapiro@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1922966fgb.35 for ; Mon, 05 May 2008 11:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=bCL383adrzKOSqCBJTzCuvuOsxP/i4OkSkO6zsSYqRs=; b=lG7aRDv7SdWVjlTETv/syCy1FuC9mGSoZO/X63dWMSvR6cIUmupfRxhQveQwv2T5XU0qlDsM//BcVDnwiXYkd/XR+S/V7cyRAFtq+4NWgzsqq1W6H/aOiorOlKPlipvi5b7cHEIKNg4X3CJAyMkso9YcZT4ZqkmmTZnuhTAkbTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gJgGt/577DHhrjdg6u2goJ6xgdJr+ToElZxt71IPfFYBLaC9/8icDRuH17GFet8O8eSwbmCsDV9ZS0bYVndlPd4l1Ay7XoBfRI/dbuQQIVS3Eym2bKN0a4Y77YggMITgqHi148jZ5QVWxZm1iH2EM5Remcn/LKVUvssFBJbU6hM= Received: by 10.86.99.9 with SMTP id w9mr8419544fgb.6.1210012349180; Mon, 05 May 2008 11:32:29 -0700 (PDT) Received: by 10.86.63.12 with HTTP; Mon, 5 May 2008 11:32:29 -0700 (PDT) Message-ID: <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> Date: Mon, 5 May 2008 11:32:29 -0700 From: "Carl Shapiro" To: "Kris Kennaway" In-Reply-To: <481F4EED.2030300@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <481F4EED.2030300@FreeBSD.org> Cc: freebsd-hackers@freebsd.org, Julian Elischer Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 18:32:30 -0000 Kris & Julian Thank you for clarifiying the compatibility situation. This information was exactly what I was looking for. I have a follow-up question based on this remark... On 5/5/08, Kris Kennaway wrote: > Actually we don't attempt to keep this form of ABI compatibility (running > 6.3 binaries on 6.0, for example), because it basically precludes ever > adding new functions to libc within a branch, or new syscalls to the kernel. > You are correct that often binaries will not notice these accumulated > changes though, or can be carefully constructed to avoid them. If my binary only executes system calls indirectly through libc interfaces, as far as libc and libm are concerned, are new symbols the only thing I need to worry about? Carl From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 19:18:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78E70106567B for ; Mon, 5 May 2008 19:18:19 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 960138FC13; Mon, 5 May 2008 19:18:18 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <481F5D79.4030203@FreeBSD.org> Date: Mon, 05 May 2008 21:18:17 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Carl Shapiro References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <481F4EED.2030300@FreeBSD.org> <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> In-Reply-To: <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Julian Elischer Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 19:18:19 -0000 Carl Shapiro wrote: > If my binary only executes system calls indirectly through libc > interfaces, as far as libc and libm are concerned, are new symbols the > only thing I need to worry about? I think so, yes. Kris From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 19:48:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3964106567A; Mon, 5 May 2008 19:48:11 +0000 (UTC) (envelope-from ghelmer@palisadesys.com) Received: from cetus.palisadesys.com (cetus.palisadesys.com [205.237.115.21]) by mx1.freebsd.org (Postfix) with ESMTP id 60BE28FC19; Mon, 5 May 2008 19:48:11 +0000 (UTC) (envelope-from ghelmer@palisadesys.com) Received: from magellan.palisadesys.com (serverwatch [172.16.1.98]) by cetus.palisadesys.com (8.14.1/8.14.1) with ESMTP id m45JGRC9021554; Mon, 5 May 2008 14:16:27 -0500 (CDT) (envelope-from ghelmer@palisadesys.com) Received: from [127.0.0.1] (cetus.palisadesys.com [205.237.115.21]) (authenticated bits=0) by magellan.palisadesys.com (8.14.1/8.14.1) with ESMTP id m45JGONi052073; Mon, 5 May 2008 14:16:25 -0500 (CDT) (envelope-from ghelmer@palisadesys.com) Message-ID: <481F5D1D.6050703@palisadesys.com> Date: Mon, 05 May 2008 14:16:45 -0500 From: Guy Helmer User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Carl Shapiro References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <481F4EED.2030300@FreeBSD.org> <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> In-Reply-To: <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (magellan.palisadesys.com [205.237.115.20]); Mon, 05 May 2008 14:16:25 -0500 (CDT) X-Palisade-MailScanner-Information: Please contact the ISP for more information X-Palisade-MailScanner: Found to be clean X-Palisade-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-4.398, required 6, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60, HTML_MESSAGE 0.00) X-Palisade-MailScanner-From: ghelmer@palisadesys.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, Julian Elischer Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 19:48:12 -0000 Carl Shapiro wrote: > Kris & Julian > > Thank you for clarifiying the compatibility situation. This > information was exactly what I was looking for. > > I have a follow-up question based on this remark... > > On 5/5/08, Kris Kennaway wrote: > >> Actually we don't attempt to keep this form of ABI compatibility (running >> 6.3 binaries on 6.0, for example), because it basically precludes ever >> adding new functions to libc within a branch, or new syscalls to the kernel. >> You are correct that often binaries will not notice these accumulated >> changes though, or can be carefully constructed to avoid them. >> > > If my binary only executes system calls indirectly through libc > interfaces, as far as libc and libm are concerned, are new symbols the > only thing I need to worry about? > Not necessarily. For example, the DNS resolver library was updated between FreeBSD 6.1 and 6.2 to bind 9's resolver library, resulting in the disappearance of the _res symbol in 6.2. As long as you depend only on public interfaces, though, you should be fine. Guy -- Guy Helmer, Ph.D. Chief System Architect Palisade Systems, Inc. From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 20:09:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC11E1065673 for ; Mon, 5 May 2008 20:09:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outJ.internet-mail-service.net (outj.internet-mail-service.net [216.240.47.233]) by mx1.freebsd.org (Postfix) with ESMTP id D62698FC20 for ; Mon, 5 May 2008 20:09:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 05 May 2008 21:11:51 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 2E7732D6004; Mon, 5 May 2008 13:09:51 -0700 (PDT) Message-ID: <481F6990.9010007@elischer.org> Date: Mon, 05 May 2008 13:09:52 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Carl Shapiro References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <481F4EED.2030300@FreeBSD.org> <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> In-Reply-To: <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 20:09:52 -0000 Carl Shapiro wrote: > Kris & Julian > > Thank you for clarifiying the compatibility situation. This > information was exactly what I was looking for. > > I have a follow-up question based on this remark... > > On 5/5/08, Kris Kennaway wrote: >> Actually we don't attempt to keep this form of ABI compatibility (running >> 6.3 binaries on 6.0, for example), because it basically precludes ever >> adding new functions to libc within a branch, or new syscalls to the kernel. >> You are correct that often binaries will not notice these accumulated >> changes though, or can be carefully constructed to avoid them. > > If my binary only executes system calls indirectly through libc > interfaces, as far as libc and libm are concerned, are new symbols the > only thing I need to worry about? > > Carl basically if you rely only on the standard posix interfaces and don't do anything exotic then you will "probably" be safe. the really safe way of course it to make a 6.0 chroot on your machine and compile your app there. From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 20:44:23 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C995D1065672 for ; Mon, 5 May 2008 20:44:23 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 890338FC17 for ; Mon, 5 May 2008 20:44:22 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 94E8167E345 for ; Mon, 5 May 2008 22:43:51 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fy9SWxs6lU6m for ; Mon, 5 May 2008 22:43:50 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id A43F2673CE1 for ; Mon, 5 May 2008 22:43:50 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m45KhoPq045880 for hackers@freebsd.org; Mon, 5 May 2008 22:43:50 +0200 (CEST) (envelope-from rdivacky) Date: Mon, 5 May 2008 22:43:50 +0200 From: Roman Divacky To: hackers@freebsd.org Message-ID: <20080505204350.GA45321@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: hashinit versus phashinit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 20:44:23 -0000 hi when we want to use a hash table in kernel we call "hashinit" which initializes a hash table with power-of-2 size. There's also "phashinit" that creates hash table of size that is a prime number. This was added in 1995 by davidg@ but it is not used anywhere in the kernel. phk@ commited rev. 1.30 of vfs_cache.c replacing phashinit with hashinit stating that it's better because it replaces a division with logical and. is this reason still valid today? (the commit was done almost 11 years ago) is there still any reason why not use the phashinit instead of hashinit? I believe using prime-sized hash table might have positive performance impact... do you have comments? roman From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 21:46:42 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8252D1065675 for ; Mon, 5 May 2008 21:46:42 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 3E3978FC1C for ; Mon, 5 May 2008 21:46:42 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so564512ywe.13 for ; Mon, 05 May 2008 14:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=Ol83XsaxtCOenfBdd6bAF1RotGkgGHZ21XREgt53r6s=; b=rTNbQqs9S8EpCypC5GaF2NIq3m2CtJl4oWLSouteAThNvcHZq/lW/IfQsLHejlyNp9RA6BVksxm3bS0J+9qZPu/mb4ORxATzNPYnt+GvtIkjl0/sOKNZgk10luk28lZeCjWOCPwXMsytRWSosWl7oSkhOUbEpTcwM20Ok0cTwJE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=qOX17M1iA3zzMDZbV6uGBUq9agSIzCBjZIhwat/95CewdV6GisPJyBbic4BZjkh6YTwD+bW2iDsDVzbsSiEEa6XoAXz6/OHaBUKUTRvFUDmBfaV8XsUByMykYqEleDugKSdfCOA/tQBSqz/WegXdkoo5+8NCBmuaAF7SSidLCh8= Received: by 10.150.84.17 with SMTP id h17mr6545624ybb.206.1210020740103; Mon, 05 May 2008 13:52:20 -0700 (PDT) Received: by 10.150.53.13 with HTTP; Mon, 5 May 2008 13:52:20 -0700 (PDT) Message-ID: <5f67a8c40805051352x6c7ed348v4c6648e708dfdba5@mail.gmail.com> Date: Mon, 5 May 2008 16:52:20 -0400 From: "Zaphod Beeblebrox" To: hackers@freebsd.org In-Reply-To: <5f67a8c40805051351i19930db7le0a1bcce7c6276b8@mail.gmail.com> MIME-Version: 1.0 References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <5f67a8c40805051351i19930db7le0a1bcce7c6276b8@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 21:46:42 -0000 FreeBSD Hackers, > > > > > > I have a general question about the compatibility of FreeBSD binaries > > > within major releases. If I build a binary for a given release of > > > FreeBSD can I make a reasonable guarantee that the binary will run on > > > > As a datapoint, I have been using cistron-radiusd for some time. Recently, I got a new system to run it and compiled the port on it. The compiled port didn't work on amd64 (or my configuration didn't jive with the new version of the daemon). So I grabbed the i386 binary that was built likely around 4.6 to 4.8 FreeBSD (I don't even remember --- it was so long ago). and dropped it on the amd64 7.0-RELEASE system. The binary is dynamically linked (albeit not depending on other packaged libraries) and I had the compat4, compat5 and compat6 ports installed on the new machine. It runs (and is still running) just fine. That's pretty good for compatibility. From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 07:02:19 2008 Return-Path: Delivered-To: hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CD221065671; Tue, 6 May 2008 07:02: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 07CD08FC28; Tue, 6 May 2008 07:02:18 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.2/8.14.2) with ESMTP id m466Pu2o068340; Tue, 6 May 2008 02:25:56 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.2/8.14.2/Submit) id m466Puxj068339; Tue, 6 May 2008 02:25:56 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 6 May 2008 02:25:56 -0400 From: David Schultz To: Roman Divacky Message-ID: <20080506062556.GA68171@zim.MIT.EDU> Mail-Followup-To: Roman Divacky , hackers@FreeBSD.ORG References: <20080505204350.GA45321@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080505204350.GA45321@freebsd.org> Cc: hackers@FreeBSD.ORG Subject: Re: hashinit versus phashinit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 07:02:19 -0000 On Mon, May 05, 2008, Roman Divacky wrote: > hi > > when we want to use a hash table in kernel we call "hashinit" which > initializes a hash table with power-of-2 size. There's also "phashinit" > that creates hash table of size that is a prime number. This was > added in 1995 by davidg@ but it is not used anywhere in the kernel. > > phk@ commited rev. 1.30 of vfs_cache.c replacing phashinit with hashinit > stating that it's better because it replaces a division with logical and. > is this reason still valid today? (the commit was done almost 11 years ago) > > is there still any reason why not use the phashinit instead of hashinit? > I believe using prime-sized hash table might have positive performance > impact... There's a tradeoff. The argument for using powers of 2 is that division takes many times longer than a logical AND. The argument for using primes is that if your hash function isn't as good as you thought it was, or if the data has some regularity you weren't expecting, you can get screwed a lot more easily with a power of 2 hash table. With a prime-sized hash table, you only get screwed if lots of your data is congruent modulo the prime, which is very rare. Most general-purpose hash implementations I've used (e.g., GNU libstdc++, Sun JDK, Microsoft .NET) use prime table sizes, probably to make it less likely that programmers will shoot themselves in the foot with pathological data or bad hash functions. From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 07:49:03 2008 Return-Path: Delivered-To: hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5485A1065679 for ; Tue, 6 May 2008 07:49:03 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 132448FC24 for ; Tue, 6 May 2008 07:49:02 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id E15F467E447 for ; Tue, 6 May 2008 09:48:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vWnTQ88GujFn for ; Tue, 6 May 2008 09:48:30 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 66FE567E446 for ; Tue, 6 May 2008 09:48:30 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m467mUHW070988 for hackers@FreeBSD.ORG; Tue, 6 May 2008 09:48:30 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 6 May 2008 09:48:30 +0200 From: Roman Divacky To: hackers@FreeBSD.ORG Message-ID: <20080506074830.GA70848@freebsd.org> References: <20080505204350.GA45321@freebsd.org> <20080506062556.GA68171@zim.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080506062556.GA68171@zim.MIT.EDU> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: hashinit versus phashinit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 07:49:03 -0000 On Tue, May 06, 2008 at 02:25:56AM -0400, David Schultz wrote: > On Mon, May 05, 2008, Roman Divacky wrote: > > hi > > > > when we want to use a hash table in kernel we call "hashinit" which > > initializes a hash table with power-of-2 size. There's also "phashinit" > > that creates hash table of size that is a prime number. This was > > added in 1995 by davidg@ but it is not used anywhere in the kernel. > > > > phk@ commited rev. 1.30 of vfs_cache.c replacing phashinit with hashinit > > stating that it's better because it replaces a division with logical and. > > is this reason still valid today? (the commit was done almost 11 years ago) > > > > is there still any reason why not use the phashinit instead of hashinit? > > I believe using prime-sized hash table might have positive performance > > impact... > > There's a tradeoff. > > The argument for using powers of 2 is that division takes many > times longer than a logical AND. > > The argument for using primes is that if your hash function isn't > as good as you thought it was, or if the data has some regularity > you weren't expecting, you can get screwed a lot more easily with > a power of 2 hash table. With a prime-sized hash table, you only > get screwed if lots of your data is congruent modulo the prime, > which is very rare. > > Most general-purpose hash implementations I've used (e.g., GNU > libstdc++, Sun JDK, Microsoft .NET) use prime table sizes, > probably to make it less likely that programmers will shoot > themselves in the foot with pathological data or bad hash functions. yes... a division takes roughly 40 cycles on modern i386 hw, while and is just 1, but does it matter compared to the access times of memory these days? the ratio between cpu-speed/mem-speed has changed a lot. I am not arguing if it's still true that avoiding the division helps the performance these days... From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 12:35:02 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90C071065676 for ; Tue, 6 May 2008 12:35:02 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 691728FC29 for ; Tue, 6 May 2008 12:35:02 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so571057rvf.43 for ; Tue, 06 May 2008 05:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=aB2+AbWRhUTlOJDFNcHno97MFQ//hByY5o5uw5rBwu8=; b=DDgMYLakHdyNZQ5ZXDxTVS+zD7OgrkGIUTRLanVUxavTKb5uWoGATyHkXiCWSYIiBLuwasbn5qd1ASu/akGLeRnF3PF6mbTRi1A68oAsEALHNvB2YMBGJ8/KtmFJJ1UvSW3LOMrdUr62Rfpv4LLfU2XBJtZHEhZ49TWc12OTqxE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Zs/uPQi/ZtURd/c9dCAq0l5dn14iOp1ttImaH8VrJpshXFYYWUjOO1AzuJzp0td3kaNf4H+XrKBYSu+N6MqxMLXyg/4CVYD7vgQ4bwTCAORTp4olBFwFPYlBQmdJG8dRIFx0/462F8Rvf8tfjL5Z8glIlxcShYVKQdxCIdQD54Y= Received: by 10.141.35.21 with SMTP id n21mr308544rvj.115.1210075706115; Tue, 06 May 2008 05:08:26 -0700 (PDT) Received: by 10.140.143.14 with HTTP; Tue, 6 May 2008 05:08:26 -0700 (PDT) Message-ID: Date: Tue, 6 May 2008 20:08:26 +0800 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Roman Divacky" In-Reply-To: <20080506074830.GA70848@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080505204350.GA45321@freebsd.org> <20080506062556.GA68171@zim.MIT.EDU> <20080506074830.GA70848@freebsd.org> X-Google-Sender-Auth: d5bb803b53c6ad68 Cc: hackers@freebsd.org Subject: Re: hashinit versus phashinit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 12:35:02 -0000 2008/5/6 Roman Divacky : > > Most general-purpose hash implementations I've used (e.g., GNU > > libstdc++, Sun JDK, Microsoft .NET) use prime table sizes, > > probably to make it less likely that programmers will shoot > > themselves in the foot with pathological data or bad hash functions. > > yes... a division takes roughly 40 cycles on modern i386 hw, while > and is just 1, but does it matter compared to the access times of > memory these days? > > the ratio between cpu-speed/mem-speed has changed a lot. I am not > arguing if it's still true that avoiding the division helps the performance > these days... My 2c - I'd poke the assembler, a book or two on current architectures, and combine it with some benchmarking followed by logical reasoning. Modern microprocessors don't execute instructions like they used to before I was born; "divide versus logical shift/operator" speed may be secondary to pipeline and IU effects, memory access (as mentioned before), etc. (I know its not much - but I'm a firm believer in "Science!", and this is one of those questions which can be understood with a little bit of it..) Adrian -- Adrian Chadd - adrian@freebsd.org From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 13:05:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65568106564A for ; Tue, 6 May 2008 13:05:04 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.179]) by mx1.freebsd.org (Postfix) with ESMTP id 060788FC21 for ; Tue, 6 May 2008 13:05:03 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-064-180-001.pools.arcor-ip.net [88.64.180.1]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis) id 0ML29c-1JtMqp30M0-0004vB; Tue, 06 May 2008 15:05:03 +0200 Received: (qmail 57580 invoked from network); 6 May 2008 13:03:30 -0000 Received: from myhost.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 6 May 2008 13:03:30 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Tue, 6 May 2008 15:00:33 +0200 User-Agent: KMail/1.9.9 References: <20080505204350.GA45321@freebsd.org> <20080506062556.GA68171@zim.MIT.EDU> <20080506074830.GA70848@freebsd.org> In-Reply-To: <20080506074830.GA70848@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805061500.33538.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19shv+QfHaHLfQr8R6EIVIGb5WYve/mk179qQZ a3rx0AzmV2Rz/gAaFHmWhjUIDapZWcWXIE6bnAUBkfCDVGNK0/ 3PWkS0JcYOOMsJEUgardg== Cc: Roman Divacky Subject: Re: hashinit versus phashinit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 13:05:04 -0000 On Tuesday 06 May 2008 09:48:30 Roman Divacky wrote: > On Tue, May 06, 2008 at 02:25:56AM -0400, David Schultz wrote: > > On Mon, May 05, 2008, Roman Divacky wrote: > > > hi > > > > > > when we want to use a hash table in kernel we call "hashinit" which > > > initializes a hash table with power-of-2 size. There's also > > > "phashinit" that creates hash table of size that is a prime number. > > > This was added in 1995 by davidg@ but it is not used anywhere in > > > the kernel. > > > > > > phk@ commited rev. 1.30 of vfs_cache.c replacing phashinit with > > > hashinit stating that it's better because it replaces a division > > > with logical and. is this reason still valid today? (the commit was > > > done almost 11 years ago) > > > > > > is there still any reason why not use the phashinit instead of > > > hashinit? I believe using prime-sized hash table might have > > > positive performance impact... > > > > There's a tradeoff. > > > > The argument for using powers of 2 is that division takes many > > times longer than a logical AND. > > > > The argument for using primes is that if your hash function isn't > > as good as you thought it was, or if the data has some regularity > > you weren't expecting, you can get screwed a lot more easily with > > a power of 2 hash table. With a prime-sized hash table, you only > > get screwed if lots of your data is congruent modulo the prime, > > which is very rare. > > > > Most general-purpose hash implementations I've used (e.g., GNU > > libstdc++, Sun JDK, Microsoft .NET) use prime table sizes, > > probably to make it less likely that programmers will shoot > > themselves in the foot with pathological data or bad hash functions. > > yes... a division takes roughly 40 cycles on modern i386 hw, while > and is just 1, but does it matter compared to the access times of > memory these days? > > the ratio between cpu-speed/mem-speed has changed a lot. I am not > arguing if it's still true that avoiding the division helps the > performance these days... requests/s * div_overhead - [avoided_]collisions/s * collision_overhead ~= -([avoided_]collisions/requests * collision_overhead) assuming the collision_overhead (requiring memory operations) greatly dominates the div_overhead. So if there is a high collision rate and you can reasonably assert that you will lower that significantly by using a prime sized hash table, the div_overhead doesn't matter. At least that's what I've come up with off the top of my head now. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 13:11:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F6CA1065673 for ; Tue, 6 May 2008 13:11:36 +0000 (UTC) (envelope-from sigtrm@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 7BF758FC17 for ; Tue, 6 May 2008 13:11:36 +0000 (UTC) (envelope-from sigtrm@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so589659rvf.43 for ; Tue, 06 May 2008 06:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=WB2ivR6sqqyCEIA9PtT2DXVGuhTuxtfkIIi3YnaclxY=; b=G8PMHz7K7bDECTrU98P9R9c3XhphaxstT3FT6vbYUNLfmZTX3a4KZKXMg1/X40KuhIDP/5jUnEJ4bFjxab/j4ujRQEazT66kifViC4iex/s2o9xLHDbkP7w0nyjEmJhe7MBN3/qW9AERzryjyT8Lb4HvosDDNaNUXsZYP9mmhLk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=cVOETYwcleyk7uGe9m4ZRCrNerKprfUJVtk6OY8d1fFxzV5xSbT94EMPABJmU6En4OUMtNeM5VhK4wI5b79T1fZJqmGVkg7GtHRjLPTWBmrxBYI8+0JIkd9Gh9Ezx0rYSWa0NVV+xLZx8/dkjAAjMj4wzBGCuNwlHEJ7DBpGEmQ= Received: by 10.140.250.14 with SMTP id x14mr341477rvh.79.1210079495708; Tue, 06 May 2008 06:11:35 -0700 (PDT) Received: by 10.141.42.6 with HTTP; Tue, 6 May 2008 06:11:35 -0700 (PDT) Message-ID: Date: Tue, 6 May 2008 15:11:35 +0200 From: "Lukasz Jaroszewski" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: utmp.h: UT_HOSTSIZE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 13:11:36 -0000 Hi, just by curiosity, why #define UT_HOSTSIZE is 16, not 256, like in OtherBSDs and some unix-like-like OSes? :) Regards LVJ From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 13:30:37 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E37681065671 for ; Tue, 6 May 2008 13:30:37 +0000 (UTC) (envelope-from jbucht@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.225]) by mx1.freebsd.org (Postfix) with ESMTP id BC8A58FC20 for ; Tue, 6 May 2008 13:30:37 +0000 (UTC) (envelope-from jbucht@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so599855rvf.43 for ; Tue, 06 May 2008 06:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=46KO+xadqiHDZQ2iAFQXRTd0uZx6yODPIMXCZGzRRDI=; b=rBiMXGpAR8oL9FVEm7RGWIwP4RUZFF53bV/c16WwnPudybL7GH0ug4NkfQeZRPmTPB4g3D6Y++rY2in1O8FOn5hCc0AW3EVt3x1dc6nB0T1voskMfbJL64KCXJpnkDo6n961Mvpv0RzRpnIfIVcILySooy7uf/utaJfkGosyrxc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Kg/JTPZydoPqeCq9gYrlb/zi8kv+zhXhxyzDWH1Gk3kkabZ+GrdHFPkJ/WEVZ4Te5UWpM50mKZLmTzKQEjNRXN72aBAYl7+yxg6V9lbrsxFPAY6wiUP94BmjJQjPJGeH5Na2p4DhW7bFIrwBSUZ1TxoAwkGOIOuE0oPy8sgB2QE= Received: by 10.140.164.6 with SMTP id m6mr328773rve.210.1210079195583; Tue, 06 May 2008 06:06:35 -0700 (PDT) Received: by 10.140.166.16 with HTTP; Tue, 6 May 2008 06:06:35 -0700 (PDT) Message-ID: <947010c30805060606l1a92d56ayfc7e08e179baf5cc@mail.gmail.com> Date: Tue, 6 May 2008 06:06:35 -0700 From: "Johan Bucht" To: hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080505204350.GA45321@freebsd.org> <20080506062556.GA68171@zim.MIT.EDU> <20080506074830.GA70848@freebsd.org> Cc: Adrian Chadd , Roman Divacky Subject: Re: hashinit versus phashinit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 13:30:38 -0000 On Tue, May 6, 2008 at 5:08 AM, Adrian Chadd wrote: > 2008/5/6 Roman Divacky : > > > > > > Most general-purpose hash implementations I've used (e.g., GNU > > > libstdc++, Sun JDK, Microsoft .NET) use prime table sizes, > > > probably to make it less likely that programmers will shoot > > > themselves in the foot with pathological data or bad hash functions. > > > > yes... a division takes roughly 40 cycles on modern i386 hw, while > > and is just 1, but does it matter compared to the access times of > > memory these days? > > > > the ratio between cpu-speed/mem-speed has changed a lot. I am not > > arguing if it's still true that avoiding the division helps the performance > > these days... > > My 2c - I'd poke the assembler, a book or two on current > architectures, and combine it with some benchmarking followed by > logical reasoning. > > Modern microprocessors don't execute instructions like they used to > before I was born; "divide versus logical shift/operator" speed may be > secondary to pipeline and IU effects, memory access (as mentioned > before), etc. > > (I know its not much - but I'm a firm believer in "Science!", and this > is one of those questions which can be understood with a little bit of > it..) > > If a hash algorithm relies on prime sized tables to produce uniform results it's a bad hash algorithm. =) http://burtleburtle.net/bob/hash/index.html is a recommended read, especially the article for Dr Dobb's. /Johan From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 14:51:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E037106567C for ; Tue, 6 May 2008 14:51:33 +0000 (UTC) (envelope-from z@zlo.nu) Received: from mzh.zlo.nu (ns0.zlo.nu [85.17.141.90]) by mx1.freebsd.org (Postfix) with ESMTP id 0F3AA8FC18 for ; Tue, 6 May 2008 14:51:32 +0000 (UTC) (envelope-from z@zlo.nu) Received: by mzh.zlo.nu (Postfix, from userid 1000) id A931A143D7; Tue, 6 May 2008 16:51:31 +0200 (CEST) Date: Tue, 6 May 2008 16:51:31 +0200 From: Marc Olzheim To: Lukasz Jaroszewski Message-ID: <20080506145131.GA24882@zlo.nu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: utmp.h: UT_HOSTSIZE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 14:51:33 -0000 On Tue, May 06, 2008 at 03:11:35PM +0200, Lukasz Jaroszewski wrote: > just by curiosity, why #define UT_HOSTSIZE is 16, not 256, like in > OtherBSDs and some unix-like-like OSes? :) Probably historical reasons. It's very much possible to change it though. We've defined it to 64 since FreeBSD 2.05 and never really had any trouble. Marc From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 00:40:22 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14CF81065671 for ; Tue, 6 May 2008 00:40:22 +0000 (UTC) (envelope-from mark@crosscutmedia.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by mx1.freebsd.org (Postfix) with ESMTP id DC1228FC0C for ; Tue, 6 May 2008 00:40:21 +0000 (UTC) (envelope-from mark@crosscutmedia.com) Received: by an-out-0708.google.com with SMTP id b33so633428ana.13 for ; Mon, 05 May 2008 17:40:21 -0700 (PDT) Received: by 10.100.251.18 with SMTP id y18mr152069anh.2.1210032781120; Mon, 05 May 2008 17:13:01 -0700 (PDT) Received: by 10.101.69.14 with HTTP; Mon, 5 May 2008 17:13:01 -0700 (PDT) Message-ID: Date: Mon, 5 May 2008 20:13:01 -0400 From: "Mark Bucciarelli" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mailman-Approved-At: Tue, 06 May 2008 15:58:42 +0000 Subject: posix semaphores X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 00:40:22 -0000 How reliable is the Posix semaphore support in FreeBSD 7 for interprocess synchronization? Is it not on by default because no one uses it, or because the code isn't trustworthy, or some other reason? Is this what you would recommend for synchronizing access to a shared resource between processes on FreeBSD? Thanks, m From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 16:18:58 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06D6B106566C for ; Tue, 6 May 2008 16:18:58 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id C0A988FC27 for ; Tue, 6 May 2008 16:18:57 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C6ED21CD33; Tue, 6 May 2008 18:18:56 +0200 (CEST) Date: Tue, 6 May 2008 18:18:56 +0200 From: Ed Schouten To: Marc Olzheim Message-ID: <20080506161856.GJ1181@hoeg.nl> References: <20080506145131.GA24882@zlo.nu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="L+vyn3np+Um+N09T" Content-Disposition: inline In-Reply-To: <20080506145131.GA24882@zlo.nu> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD Hackers , Lukasz Jaroszewski Subject: Re: utmp.h: UT_HOSTSIZE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 16:18:58 -0000 --L+vyn3np+Um+N09T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Marc Olzheim wrote: > Probably historical reasons. It's very much possible to change it > though. We've defined it to 64 since FreeBSD 2.05 and never really had > any trouble. When increasing it, we shouldn't forget to increase UT_LINESIZE to 16 as well. Using the UNIX 98 PTY naming, we can't go beyond pts/999, because it is eight bytes, including the null byte. --=20 Ed Schouten WWW: http://80386.nl/ --L+vyn3np+Um+N09T Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkgghPAACgkQ52SDGA2eCwUC2ACdFAAyEo2Kx3wJtMvQpkmZyFQD krsAnRSwn62fNQpxepsvxmucZs63f5BO =E+E1 -----END PGP SIGNATURE----- --L+vyn3np+Um+N09T-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 16:21:46 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B56E2106564A for ; Tue, 6 May 2008 16:21:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 82FF78FC18 for ; Tue, 6 May 2008 16:21:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id EDD2146B65; Tue, 6 May 2008 12:21:45 -0400 (EDT) Date: Tue, 6 May 2008 17:21:45 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: =?ISO-8859-15?Q?Martin_Sch=FCtte?= In-Reply-To: <481B7ED4.3020208@mschuette.name> Message-ID: <20080506171525.O52391@fledge.watson.org> References: <481B7ED4.3020208@mschuette.name> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="621616949-965363614-1210090905=:52391" Cc: hackers@freebsd.org Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 16:21:46 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --621616949-965363614-1210090905=:52391 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 2 May 2008, Martin Sch=FCtte wrote: > I am taking part in this year's Google Summer of Code for NetBSD and want= to=20 > implement the upcoming IETF Syslog standards for BSD's syslogd(8). The mo= st=20 > important improvements will be an extended message format, TLS network=20 > transport, and digital signatures. > > I hope these new functions will later be ported to benefit all BSD varian= ts=20 > (as their syslogds are similar). So everyone interested is invited to tak= e a=20 > look at the project pages now and then. Naturally any feedback is welcome= =2E > > The official project's homepage is at=20 > http://netbsd-soc.sourceforge.net/projects/syslogd/ and for developing I= =20 > maintain a Trac at http://barney.cs.uni-potsdam.de/trac/syslogd/ Dear Martin, This sounds like an exciting project -- while I recognize the concerns othe= r=20 have expressed about complexity, I think that complexity can be managed if= =20 done carefully. I'm not sure if you've looked at Apple's extended syslog,= =20 which among other things, includes a binary log file format making it more= =20 mechanically searched and managed, do take a look if you haven't. thanks, Robert N M Watson Computer Laboratory University of Cambridge --621616949-965363614-1210090905=:52391-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 16:41:25 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9DE01065676 for ; Tue, 6 May 2008 16:41:25 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.188]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3AD8FC28 for ; Tue, 6 May 2008 16:41:24 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so746052tid.3 for ; Tue, 06 May 2008 09:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=SvPXgEhP+ox7gxKsYSiNgcbHgO8t0SeRh4PyWjcdtvU=; b=BOsJZ9Ttgqjo1Relq7hiiM+gAykeE6gNUjb7KChTYgf6+p1jP1Y842mlJbHMS6TBDdxHmGhnRU6D8jwr/EfqdxvqYc+cZvz135F14eX5EUYZFO7scAVGc1ix26HfcXfpuWhE9yaw6k2G1tsxPtOSVgfWpoKEB0DrH53bjMDjhos= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=LfPHqxbb0gQF9WOQMDqQh0/1K9kCxDI1DOGGQlSnNJBm0o0WrgAHoOP3mCmZetsxFl557OoQ8tMwY2pE6+l8HzPHFjY9HfjV+ePFJ5la60shjhUplob9+u4gaHIvV/jNZQi9n2Wxx9DqlSkYRWW7WPFZXrqYLUyUgkYNEieqz8Y= Received: by 10.150.79.42 with SMTP id c42mr923335ybb.163.1210092082320; Tue, 06 May 2008 09:41:22 -0700 (PDT) Received: by 10.150.53.13 with HTTP; Tue, 6 May 2008 09:41:22 -0700 (PDT) Message-ID: <5f67a8c40805060941n7d2882aayea7d72d0a76cd89d@mail.gmail.com> Date: Tue, 6 May 2008 12:41:22 -0400 From: "Zaphod Beeblebrox" To: "Robert Watson" In-Reply-To: <20080506171525.O52391@fledge.watson.org> MIME-Version: 1.0 References: <481B7ED4.3020208@mschuette.name> <20080506171525.O52391@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org, =?ISO-8859-1?Q?Martin_Sch=FCtte?= Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 16:41:25 -0000 On Tue, May 6, 2008 at 12:21 PM, Robert Watson wrote: > > This sounds like an exciting project -- while I recognize the concerns > other have expressed about complexity, I think that complexity can be > managed if done carefully. I'm not sure if you've looked at Apple's > extended syslog, which among other things, includes a binary log file format > making it more mechanically searched and managed, do take a look if you > haven't. ... and I'm not just saying this to be ornery, but what about test log file formats is not mechanically searchable? Note that I'm not playing the XML card here (I'm not an XML fan) but the only real draw of a binary format (to me) is a small amount of innate compression (numbers and dates in binary form) and the ability to have field separators that are not part of the printable character set. UN*X has a strong tradition of text files that work around these two limitations in a variety of ways --- and UN*X tools are built with these assumptions. There's a strong set of reasons to consider retaining text formats and continuing to improve our tools around them. One way to strengthen the syslog format is to have syslog enforce a format _and_ enforce that whatever field separator is chosen cannot be written within a field. From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 17:22:41 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 208641065672; Tue, 6 May 2008 17:22:41 +0000 (UTC) (envelope-from rnoland@2hip.net) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id C2A7F8FC24; Tue, 6 May 2008 17:22:40 +0000 (UTC) (envelope-from rnoland@2hip.net) Received: from [192.168.166.46] ([70.168.41.2]) (authenticated bits=0) by gizmo.2hip.net (8.13.8/8.13.8) with ESMTP id m46GlS38085261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 May 2008 12:47:29 -0400 (EDT) (envelope-from rnoland@2hip.net) From: Robert Noland To: Zaphod Beeblebrox In-Reply-To: <5f67a8c40805060941n7d2882aayea7d72d0a76cd89d@mail.gmail.com> References: <481B7ED4.3020208@mschuette.name> <20080506171525.O52391@fledge.watson.org> <5f67a8c40805060941n7d2882aayea7d72d0a76cd89d@mail.gmail.com> Content-Type: text/plain Organization: 2Hip Networks Date: Tue, 06 May 2008 12:47:05 -0400 Message-Id: <1210092425.40346.2.camel@squirrel.corp.cox.com.cox.net> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on gizmo.2hip.net Cc: hackers@freebsd.org, Robert Watson , Martin =?ISO-8859-1?Q?Sch=FCtte?= Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 17:22:41 -0000 On Tue, 2008-05-06 at 12:41 -0400, Zaphod Beeblebrox wrote: > On Tue, May 6, 2008 at 12:21 PM, Robert Watson wrote: > > > > > This sounds like an exciting project -- while I recognize the concerns > > other have expressed about complexity, I think that complexity can be > > managed if done carefully. I'm not sure if you've looked at Apple's > > extended syslog, which among other things, includes a binary log file format > > making it more mechanically searched and managed, do take a look if you > > haven't. > > > ... and I'm not just saying this to be ornery, but what about test log file > formats is not mechanically searchable? Note that I'm not playing the XML > card here (I'm not an XML fan) but the only real draw of a binary format (to > me) is a small amount of innate compression (numbers and dates in binary > form) and the ability to have field separators that are not part of the > printable character set. UN*X has a strong tradition of text files that > work around these two limitations in a variety of ways --- and UN*X tools > are built with these assumptions. There's a strong set of reasons to > consider retaining text formats and continuing to improve our tools around > them. I don't think anyone has suggested replacing text with a binary format. Just providing an alternative for those who choose to use it. robert. > One way to strengthen the syslog format is to have syslog enforce a format > _and_ enforce that whatever field separator is chosen cannot be written > within a field. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue May 6 22:31:53 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82A6C106566B for ; Tue, 6 May 2008 22:31:53 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from mail.asta.uni-potsdam.de (mail.asta.uni-potsdam.de [141.89.58.198]) by mx1.freebsd.org (Postfix) with ESMTP id 3AD068FC19 for ; Tue, 6 May 2008 22:31:53 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from localhost (mail.asta.uni-potsdam.de [141.89.58.198]) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id B596E7AF84 for ; Wed, 7 May 2008 00:31:51 +0200 (CEST) X-Virus-Scanned: on mail at asta.uni-potsdam.de Received: from mail.asta.uni-potsdam.de ([141.89.58.198]) by localhost (mail.asta.uni-potsdam.de [141.89.58.198]) (amavisd-new, port 10024) with ESMTP id 6HF9weCee9at for ; Wed, 7 May 2008 00:31:42 +0200 (CEST) Received: from [192.168.178.21] (BAE8123.bae.pppool.de [77.132.129.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Martin Schuette", Issuer "AStA-CA" (verified OK)) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id AF59D7AD98 for ; Wed, 7 May 2008 00:31:42 +0200 (CEST) Message-ID: <4820DC52.9070901@mschuette.name> Date: Wed, 07 May 2008 00:31:46 +0200 From: =?ISO-8859-1?Q?Martin_Sch=FCtte?= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: hackers@freebsd.org References: <481B7ED4.3020208@mschuette.name> <20080506171525.O52391@fledge.watson.org> In-Reply-To: <20080506171525.O52391@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 22:31:53 -0000 Robert Watson schrieb: > managed if done carefully. I'm not sure if you've looked at Apple's > extended syslog, which among other things, includes a binary log file > format making it more mechanically searched and managed, do take a look > if you haven't. I read the asl man pages (http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man3/asl.3.html) because I am looking for an API to support the new fields in syslog-protocol. I liked the approach of adding different attributes to a message object, I think that would work well for structured data parametern. But the asl functions would have to be extended for syslog-protocol because they do not use namespaces for the key=value pairs. The log storage and filter mechanisms are interesting, but IMHO out of scope for a basic syslogd. If desired one could probably write a small tool to use an indexed BDB for storage and attach it with a pipe to syslogd. -- Martin From owner-freebsd-hackers@FreeBSD.ORG Wed May 7 15:59:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5096F1065674 for ; Wed, 7 May 2008 15:59:20 +0000 (UTC) (envelope-from rmgls@free.fr) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id DD24F8FC0C for ; Wed, 7 May 2008 15:59:19 +0000 (UTC) (envelope-from rmgls@free.fr) Received: from smtp7-g19.free.fr (smtp7-g19.free.fr [212.27.42.64]) by postfix2-g20.free.fr (Postfix) with ESMTP id 9E31825F415D for ; Wed, 7 May 2008 15:38:39 +0200 (CEST) Received: from smtp7-g19.free.fr (localhost [127.0.0.1]) by smtp7-g19.free.fr (Postfix) with ESMTP id 5FA2A32285B for ; Wed, 7 May 2008 17:39:03 +0200 (CEST) Received: from free.fr (evr27-1-88-172-40-194.fbx.proxad.net [88.172.40.194]) by smtp7-g19.free.fr (Postfix) with ESMTP id 41F6C322858 for ; Wed, 7 May 2008 17:39:03 +0200 (CEST) From: rmgls@free.fr To: freebsd-hackers@freebsd.org Date: Wed, 07 May 2008 17:39:00 +0200 Sender: rmgls@free.fr Message-Id: <20080507153903.41F6C322858@smtp7-g19.free.fr> Subject: general i/o question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 15:59:20 -0000 Hi all, Sorry if its a FAQ but i don't find any answer for this topic. i need to test (NOWAIT), the presence of keypressed/depressed on a terminal and then read the scan code, like for a piano pc keyboard. my questions are as follows: 1. is it a general C function which may scan a terminal without waiting? 2. how to get the scancodes? of course i can poll tje (0x64) keyboard port on a i386 architecture, but this is not a general method, and it is suited for a distant terminal for instance. Any hint would be appreciated. thanks in advance. rmgls From owner-freebsd-hackers@FreeBSD.ORG Wed May 7 18:14:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85EB3106566C for ; Wed, 7 May 2008 18:14:02 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by mx1.freebsd.org (Postfix) with ESMTP id 5D9848FC1D for ; Wed, 7 May 2008 18:14:02 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so645511rvf.43 for ; Wed, 07 May 2008 11:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=fHWeTDENj50JOEJ1e3YnwgmzfP/FMdKF26WrNPbbtYQ=; b=RY5YPM0uT3VC7RCcjWJas4lSuuLBLv7jhvJroVhf5LnwPsy6czyq2OhyJ6Oi9UHifKf344q9XfMqAyIAX5fQRrfbnkClu8Nbg10mLJnIo4nO+YZVoGZYF5jmWXiPVTuYgPwnoLnwj57yZ4ztxvndmdwJ/KFjzVQ8EKsiuAnKCew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=qL50BhG9OoWh29cWUluox7uTbpjND7adYXsup4P6XDu6/s8r2yRTJ7p6ELLO+/cGsrAmfuRQkGKtR9PcN/r+rU33YXv4S9JgyhWaG4hay6RognTtyXs4oog0rK7oNTrOvSinR7WrhvCi+17bTfV2N18usS4VBkWx+zfTh94+cvw= Received: by 10.141.203.7 with SMTP id f7mr1095240rvq.7.1210182497960; Wed, 07 May 2008 10:48:17 -0700 (PDT) Received: from ?192.168.10.42? ( [99.155.199.64]) by mx.google.com with ESMTPS id g22sm2999928rvb.7.2008.05.07.10.48.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 May 2008 10:48:16 -0700 (PDT) Message-Id: From: Garrett Cooper To: rmgls@free.fr In-Reply-To: <20080507153903.41F6C322858@smtp7-g19.free.fr> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Wed, 7 May 2008 10:49:17 -0700 References: <20080507153903.41F6C322858@smtp7-g19.free.fr> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-hackers@freebsd.org Subject: Re: general i/o question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 18:14:02 -0000 On May 7, 2008, at 8:39 AM, rmgls@free.fr wrote: > > Hi all, > > Sorry if its a FAQ but i don't find any answer for this topic. > > i need to test (NOWAIT), the presence of keypressed/depressed on a > terminal > and then read the scan code, like for a piano pc keyboard. > > my questions are as follows: > > 1. is it a general C function which may scan a terminal without > waiting? > > 2. how to get the scancodes? > > of course i can poll tje (0x64) keyboard port on a i386 architecture, > but this is not a general method, and it is suited for a distant > terminal > for instance. > > Any hint would be appreciated. > > thanks in advance. > > rmgls getc(3), or were you looking for something a bit more specific? -Garret From owner-freebsd-hackers@FreeBSD.ORG Wed May 7 19:06:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CD9B106566C for ; Wed, 7 May 2008 19:06:34 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with SMTP id E8C858FC0A for ; Wed, 7 May 2008 19:06:32 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 7 May 2008 20:06:31 +0100 (BST) Date: Wed, 7 May 2008 20:06:31 +0100 From: David Malone To: rmgls@free.fr Message-ID: <20080507190631.GA90936@walton.maths.tcd.ie> References: <20080507153903.41F6C322858@smtp7-g19.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080507153903.41F6C322858@smtp7-g19.free.fr> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: freebsd-hackers@freebsd.org Subject: Re: general i/o question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 19:06:34 -0000 On Wed, May 07, 2008 at 05:39:00PM +0200, rmgls@free.fr wrote: > i need to test (NOWAIT), the presence of keypressed/depressed on a terminal > and then read the scan code, like for a piano pc keyboard. > > my questions are as follows: > > 1. is it a general C function which may scan a terminal without waiting? There isn't a general way of doing this, as even if there is a terminal attached, the terminal may actaully be an ssh session, and which does not transmit key up/down events. If you look at the Unix TTY stuff, you can get the stream of keys pressed, but this may not be enough for a piano type application. If you're only targeting the FreeBSD console there may be other options, but it will be more specific that TTY calls. If you are trageting X11, then it does support key up/down events and a book or tutorial on X programming should help. David. From owner-freebsd-hackers@FreeBSD.ORG Wed May 7 21:40:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E03F51065674 for ; Wed, 7 May 2008 21:40:57 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id D0F398FC12 for ; Wed, 7 May 2008 21:40:57 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id B4BF81CC05B; Wed, 7 May 2008 14:40:57 -0700 (PDT) Date: Wed, 7 May 2008 14:40:57 -0700 From: Jeremy Chadwick To: rmgls@free.fr Message-ID: <20080507214057.GA74435@eos.sc1.parodius.com> References: <20080507153903.41F6C322858@smtp7-g19.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080507153903.41F6C322858@smtp7-g19.free.fr> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org Subject: Re: general i/o question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 21:40:58 -0000 On Wed, May 07, 2008 at 05:39:00PM +0200, rmgls@free.fr wrote: > i need to test (NOWAIT), the presence of keypressed/depressed on a terminal > and then read the scan code, like for a piano pc keyboard. > > my questions are as follows: > > 1. is it a general C function which may scan a terminal without waiting? > > 2. how to get the scancodes? It depends on if you're wanting the actual hard-wired keyboard (on the console), or if you're taking input from a tty/pty. You won't get a true scancode from a tty/pty, but you will get a character (0x00 to 0xFF). Regarding I/O without waiting: there is not a general libc function for this. Garrett mentioned getc(), which blocks (waits). You might want to consider seeing if the kqueue/kevent stuff on the BSDs will work with pty/tty input. You can use that to set up an event in the kernel which tells the kernel "run function XYZ when I/O is seen on this fh/fd". It's like select() in that respect, but is faster. > of course i can poll tje (0x64) keyboard port on a i386 architecture, > but this is not a general method, and it is suited for a distant terminal > for instance. I agree. This method is also very old, and I'd be surprised if it would work with USB keyboards. I would assume it would also interfere with any existing keyboard I/O handler the OS has, but I'm not sure. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Wed May 7 22:31:26 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 755C31065678 for ; Wed, 7 May 2008 22:31:26 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (five.mired.org [66.92.153.75]) by mx1.freebsd.org (Postfix) with ESMTP id 1B7268FC14 for ; Wed, 7 May 2008 22:31:25 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 12503 invoked by uid 1001); 7 May 2008 18:05:09 -0400 Received: from bhuda.mired.org (bhuda [192.168.195.1]) by bhuda (tmda-ofmipd) with ESMTP; Wed, 07 May 2008 18:05:08 -0400 Date: Wed, 7 May 2008 18:04:41 -0400 To: Jeremy Chadwick Message-ID: <20080507180441.008acfe9@bhuda.mired.org> In-Reply-To: <20080507214057.GA74435@eos.sc1.parodius.com> References: <20080507153903.41F6C322858@smtp7-g19.free.fr> <20080507214057.GA74435@eos.sc1.parodius.com> Organization: Meyer Consulting X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Mike Meyer Cc: rmgls@free.fr, freebsd-hackers@freebsd.org Subject: Re: general i/o question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 22:31:26 -0000 On Wed, 7 May 2008 14:40:57 -0700 Jeremy Chadwick wrote: > On Wed, May 07, 2008 at 05:39:00PM +0200, rmgls@free.fr wrote: > > i need to test (NOWAIT), the presence of keypressed/depressed on a terminal > > and then read the scan code, like for a piano pc keyboard. > > > > my questions are as follows: > > > > 1. is it a general C function which may scan a terminal without waiting? > Regarding I/O without waiting: there is not a general libc function for > this. Garrett mentioned getc(), which blocks (waits). getc won't tell you whether a key is pressed or not in any case, just that a key *has been* pressed when it returns. This question is normally tied back to some DOS getc-like call that didn't block, but returned null if a key hadn't been pressed. The standard way to do that is select() (now poll). The problem with both of those is that - again - they won't tell you whether or not a key *is* pressed, but only whether one *has been* pressed. > You might want to consider seeing if the kqueue/kevent stuff on the BSDs > will work with pty/tty input. You can use that to set up an event in > the kernel which tells the kernel "run function XYZ when I/O is seen on > this fh/fd". It's like select() in that respect, but is faster. Yes, they'll work with it. The question is - can you get the information about whether or not a key is currently pressed that way? Since X gets the information, its' there - but it's not clear how close to the hardware X has to get to get it. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 06:06:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 702F61065677 for ; Thu, 8 May 2008 06:06:57 +0000 (UTC) (envelope-from rmgls@free.fr) Received: from smtp7-g19.free.fr (smtp7-g19.free.fr [212.27.42.64]) by mx1.freebsd.org (Postfix) with ESMTP id 364998FC14 for ; Thu, 8 May 2008 06:06:56 +0000 (UTC) (envelope-from rmgls@free.fr) Received: from smtp7-g19.free.fr (localhost [127.0.0.1]) by smtp7-g19.free.fr (Postfix) with ESMTP id C29DF322827; Thu, 8 May 2008 08:06:55 +0200 (CEST) Received: from free.fr (evr27-1-88-172-40-194.fbx.proxad.net [88.172.40.194]) by smtp7-g19.free.fr (Postfix) with ESMTP id 9C4BC3227F6; Thu, 8 May 2008 08:06:55 +0200 (CEST) To: Jeremy Chadwick From: rmgls@free.fr Date: Thu, 08 May 2008 08:06:52 +0200 Sender: rmgls@free.fr Message-Id: <20080508060655.9C4BC3227F6@smtp7-g19.free.fr> Cc: freebsd-hackers@freebsd.org Subject: Re: general i/o question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 06:06:57 -0000 On Wed, 7 May 2008 14:40:57 Jeremy Chadwick wrote: > On Wed, May 07, 2008 at 05:39:00PM +0200, rmgls@free.fr wrote: > > i need to test (NOWAIT), the presence of keypressed/depressed on a terminal > > and then read the scan code, like for a piano pc keyboard. > > > > my questions are as follows: > > > > 1. is it a general C function which may scan a terminal without waiting? > > > > 2. how to get the scancodes? > > It depends on if you're wanting the actual hard-wired keyboard (on the > console), or if you're taking input from a tty/pty. You won't get a > true scancode from a tty/pty, but you will get a character (0x00 to > 0xFF). Hi Jeremy, after all, i don't need the scancode, i can work with characters, this avoid the nls translation, which is already done! > Regarding I/O without waiting: there is not a general libc function for > this. Garrett mentioned getc(), which blocks (waits). Attilio Rao pointed me tje termios struct, and looking to the doc i found the O_NONBLOCK open(2) flag... which means: NOWAIT i was not aware of it! and in this case getc() works fine as expected. > You might want to consider seeing if the kqueue/kevent stuff on the BSDs > will work with pty/tty input. You can use that to set up an event in > the kernel which tells the kernel "run function XYZ when I/O is seen on > this fh/fd". It's like select() in that respect, but is faster. Thanks for this point i will investigate now. BUT don't you think it would be a desirable behaviour addition to the read() libc function??? > > of course i can poll tje (0x64) keyboard port on a i386 architecture, > > but this is not a general method, and it is suited for a distant terminal > > for instance. > > I agree. This method is also very old, and I'd be surprised if it would > work with USB keyboards. I would assume it would also interfere with > any existing keyboard I/O handler the OS has, but I'm not sure. Yes, i agree it would be a bad idea, kqueue/kevent is better. i will see that. Best regards raoul rmgls@free.fr From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 14:23:52 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AF7B106566B for ; Thu, 8 May 2008 14:23:52 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.185]) by mx1.freebsd.org (Postfix) with ESMTP id EF1FA8FC12 for ; Thu, 8 May 2008 14:23:51 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so946687fkk.11 for ; Thu, 08 May 2008 07:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=T/IG9VApuE4pqzRplxMfESpbDq0az6ijoJYn6uOQJac=; b=J/ysaGHuKbOa13ZS6DhadP4sPQuo1fI68eFAQ3Dzibd98MBinA3a+OnhrohkjA3ThaK1KXuCWgTLvT5h+T2JA09+J1kVwdWe2mz4Fr+p2vh2Ji3qzfWUzmxeXW8xGIopey8PIDIbcV4nl83S3dbEjR4DkQCyzIH+ePWSd4I+dm8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=aSwtfoYOh1+fVTSyei+66E1oleXUHFnwpzziI9Kzs4flFllbNmXaAAxTfiKSSUaXdWFPjxqe6YvuJoTyidk+Qv+llNW5ZRaS3AqsSc259RJPeNYq8ErLJWuC1Y7wjxrc3DoQR30oONH6pBg66uGj2+6+08imFqx5Cd9U7xzIm5c= Received: by 10.82.150.15 with SMTP id x15mr409927bud.23.1210255190239; Thu, 08 May 2008 06:59:50 -0700 (PDT) Received: by 10.82.177.7 with HTTP; Thu, 8 May 2008 06:59:50 -0700 (PDT) Message-ID: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> Date: Thu, 8 May 2008 15:59:50 +0200 From: "Mathieu Prevot" To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: binary file within a shell script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 14:23:52 -0000 Hi there, I would like to use one exec file from a shellscript but I would like it to be incorporated in the same file, like Nvidia do for its FreeBSD drivers. How can I do this in a convenient way ? Mathieu From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 14:39:14 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 735E3106566B for ; Thu, 8 May 2008 14:39:14 +0000 (UTC) (envelope-from viaprog@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by mx1.freebsd.org (Postfix) with ESMTP id 49C868FC1C for ; Thu, 8 May 2008 14:39:14 +0000 (UTC) (envelope-from viaprog@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1339481rvf.43 for ; Thu, 08 May 2008 07:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=D6Di//LGyWrw0wsDoBqQu1MAMK25dt6DB7p06VILVSo=; b=JYACz+G9IX8bx/djI+WrlcJOXYRxgkH4sjfjjMKRZi+Y/wm3voSDb31eOU0pK3V/Ggnv0q8OTFWMmoOOs+QW/+RWnd3coRdrIl3ChMPsIWvwtCC+TmZbFiFTklPxD3kLdPXWuC2b6i5B4UIjSdlxlKGnzKMFNY+SjLYn+3ncHHY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=H0rwmsR2UwJ0mJGZBWTNUmXEPnkEjuL9UDqxV/UKS276zjb922eR7TB+bJgcZa8U9Vo0QCQublK83O684hq0dpR4/9Ta6R9xIn64U/DElDO87ccAIsRSsXDEbApdlzrnnMSTyR9ZkSA22IZc2KL57D+fpXkJtt1QFah/COuK180= Received: by 10.141.71.14 with SMTP id y14mr1533933rvk.253.1210255853152; Thu, 08 May 2008 07:10:53 -0700 (PDT) Received: by 10.140.187.7 with HTTP; Thu, 8 May 2008 07:10:52 -0700 (PDT) Message-ID: Date: Thu, 8 May 2008 18:10:53 +0400 From: "Igor A. Valcov" To: freebsd-pf@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: do not work nested unnamed anchor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 14:39:14 -0000 Hello. For example: ==== pf.conf ==== ext_if="xl0" ip_world="nn.nn.nn.nn" # Filter rules block log all anchor in on $ext_if { pass quick proto tcp to $ip_world port 22 keep state # SSH pass quick proto tcp to $ip_world port 25 keep state # SMTP pass quick proto tcp to $ip_world port 110 keep state # POP3 anchor { pass quick proto tcp to $ip_world port 995 keep state # POP3S } } ============ nmap results: PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 4.5p1 (FreeBSD 20061110; protocol 2.0) 25/tcp open smtp? 110/tcp open pop3 Openwall popa3d I can not understand what the problem... FreeBSD-7.0-RELEASE-p1 i386 -- Igor A. Valcov From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 15:21:08 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4F611065672 for ; Thu, 8 May 2008 15:21:07 +0000 (UTC) (envelope-from jille@quis.cx) Received: from mulgore.hexon-is.nl (mulgore.hexon-is.nl [82.94.237.14]) by mx1.freebsd.org (Postfix) with ESMTP id 521FF8FC18 for ; Thu, 8 May 2008 15:21:06 +0000 (UTC) (envelope-from jille@quis.cx) Received: from [10.0.0.72] ([10.15.16.6]) (authenticated bits=0) by mulgore.hexon-is.nl (8.14.1/8.13.8) with ESMTP id m48F4oxu015777; Thu, 8 May 2008 17:04:50 +0200 Message-ID: <48231693.10805@quis.cx> Date: Thu, 08 May 2008 17:04:51 +0200 From: Jille User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Mathieu Prevot References: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> In-Reply-To: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Hexon-MailScanner-Information: Please contact the ISP for more information X-Hexon-MailScanner: Found to be clean X-Hexon-MailScanner-From: jille@quis.cx Cc: hackers@freebsd.org Subject: Re: binary file within a shell script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 15:21:08 -0000 It's not exactly what you are looking for: But you could take a look at shar(1). I don't even know for sure whether it can archive binaries. shar gives you a shellscript, to which you could prefix your own script, and when you run it, it'll extract the incorporated file, and you can exec it :) -- Jille (Resend from right email-adres) Mathieu Prevot wrote: > Hi there, > > I would like to use one exec file from a shellscript but I would like > it to be incorporated in the same file, like Nvidia do for its FreeBSD > drivers. How can I do this in a convenient way ? > > Mathieu > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 15:35:15 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 907FC1065674 for ; Thu, 8 May 2008 15:35:15 +0000 (UTC) (envelope-from teemu@rinta-aho.org) Received: from smtp.piuha.net (p130.piuha.net [IPv6:2001:14b8:400::130]) by mx1.freebsd.org (Postfix) with ESMTP id 4F15B8FC0A for ; Thu, 8 May 2008 15:35:15 +0000 (UTC) (envelope-from teemu@rinta-aho.org) Received: from smtp.piuha.net (localhost [127.0.0.1]) by smtp.piuha.net (Postfix) with ESMTP id 6532B19877E for ; Thu, 8 May 2008 18:35:14 +0300 (EEST) Received: from [127.0.0.1] (unknown [IPv6:2001:14b8:400::130]) by smtp.piuha.net (Postfix) with ESMTP id 2EBEA1987F3 for ; Thu, 8 May 2008 18:35:14 +0300 (EEST) Message-ID: <48231DB8.1020705@rinta-aho.org> Date: Thu, 08 May 2008 18:35:20 +0300 From: Teemu Rinta-aho User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: vm_map_insert fails, vm_map->max_offset==0? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 15:35:15 -0000 Hi, is it possible to insert a new map entry to a process vm_map from a kernel module? I've tried to use vm_map_insert, vm_map_fixed, vm_map_findspace, but they all fail as the vm_map->max_offset is zero (0). I have looked at vm_mmap etc. but I don't get a clue what I'm doing wrong... BR, Teemu From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 16:22:53 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73F721065670 for ; Thu, 8 May 2008 16:22:53 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 3B89A8FC2A for ; Thu, 8 May 2008 16:22:53 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.2) with ESMTP id m48GCkuI050087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 May 2008 11:12:47 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.2/Submit) id m48GCkcq050085; Thu, 8 May 2008 11:12:46 -0500 (CDT) (envelope-from dan) Date: Thu, 8 May 2008 11:12:46 -0500 From: Dan Nelson To: Mathieu Prevot Message-ID: <20080508161246.GA2922@dan.emsphone.com> References: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org Subject: Re: binary file within a shell script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 16:22:53 -0000 In the last episode (May 08), Mathieu Prevot said: > Hi there, > > I would like to use one exec file from a shellscript but I would like > it to be incorporated in the same file, like Nvidia do for its FreeBSD > drivers. How can I do this in a convenient way ? Take a look at the file generated by /usr/bin/gzexe; that's one way to do it (basically, determine the number of lines in your shell script, append your binary file to the end of the script, and use tail to extract only the binary file to a tempfile). -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 15:28:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4E64106566C for ; Thu, 8 May 2008 15:28:59 +0000 (UTC) (envelope-from teemu@rinta-aho.org) Received: from smtp.piuha.net (p130.piuha.net [IPv6:2001:14b8:400::130]) by mx1.freebsd.org (Postfix) with ESMTP id A456E8FC17 for ; Thu, 8 May 2008 15:28:59 +0000 (UTC) (envelope-from teemu@rinta-aho.org) Received: from smtp.piuha.net (localhost [127.0.0.1]) by smtp.piuha.net (Postfix) with ESMTP id B63F3198784 for ; Thu, 8 May 2008 18:28:57 +0300 (EEST) Received: from [127.0.0.1] (unknown [IPv6:2001:14b8:400::130]) by smtp.piuha.net (Postfix) with ESMTP id 841B9198665 for ; Thu, 8 May 2008 18:28:57 +0300 (EEST) Message-ID: <48231C3F.3080906@rinta-aho.org> Date: Thu, 08 May 2008 18:29:03 +0300 From: Teemu Rinta-aho User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Thu, 08 May 2008 17:25:57 +0000 Subject: vm_map_insert fails, vm_map->max_offset==0? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 15:29:00 -0000 Hi, is it possible to insert a new map entry to a process vm_map from a kernel module? I've tried to use vm_map_insert, vm_map_fixed, vm_map_findspace, but they all fail as the vm_map->max_offset is zero (0). I have looked at vm_mmap etc. but I don't get a clue what I'm doing wrong... BR, Teemu From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 18:08:23 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A92DA1065684 for ; Thu, 8 May 2008 18:08:23 +0000 (UTC) (envelope-from edelkind-freebsd-hackers@episec.com) Received: from episec.com (episec.com [69.55.237.141]) by mx1.freebsd.org (Postfix) with SMTP id 8978C8FC1B for ; Thu, 8 May 2008 18:08:23 +0000 (UTC) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 66137 invoked by uid 1024); 8 May 2008 17:41:42 -0000 Date: Thu, 8 May 2008 13:41:42 -0400 From: ari edelkind To: hackers@freebsd.org Message-ID: <20080508174142.GZ79355@episec.com> Mail-Followup-To: ari edelkind , hackers@freebsd.org References: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> Cc: Subject: Re: binary file within a shell script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 18:08:23 -0000 mathieu.prevot@gmail.com wrote: > I would like to use one exec file from a shellscript but I would like > it to be incorporated in the same file, like Nvidia do for its FreeBSD > drivers. How can I do this in a convenient way ? I haven't looked at nvidia's driver packaging, but you can embed binaries into shell scripts using uuencode or base64. Example: ------------------------ % cat >test.sh #!/bin/ksh echo "*** generating ls..." file=`mktemp /tmp/ls.XXXXXX` [[ $? -eq 0 ]] || exit 1 uudecode -o $lsfile <<'__EOM__' ^D % uuencode ls >test.sh % cat >>test.sh __EOM__ chmod +x $lsfile echo "*** running $lsfile ..." $lsfile echo "*** cleaning up" rm -f $lsfile ^D ------------------------ Note that i used single quotes in the here-document initialization, so there won't be any shell expansion of the uuencoded data. A few commonly-installed programs that may suit your needs: - uuencode / uudecode - base64 - b64 - openssl base64 If relying on one of the above is infeasible: You can't portably use inline binary data in a shell script without preprocessing it (as with one of the above programs), since most shells can't handle binary zeros; shar(1) fails in this case. You could, theoretically, write a small, clever wrapper function to account for the issue. You'd also have to ensure that regexp("^__EOM__$") (in the above example) doesn't exist within the file contents, and note that excessively long lines may not be handled efficiently by the shell. You'll need to account for files that do or don't end in a newline, possibly by always appending an extra newline, then stripping it upon extraction. Lastly, you'll need to consider whether you must account for CR/LF conversion in file transfers or while editing your script. You probably won't want to deal with all of this, and would be better off leaving it for out-of-band extraction, such as with dan's gzexe suggestion. You'll still need to determine whether CR/LF conversion may be an issue for you. ari From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 20:33:22 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3049F106566B for ; Thu, 8 May 2008 20:33:22 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx1.freebsd.org (Postfix) with ESMTP id 11D558FC15 for ; Thu, 8 May 2008 20:33:21 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 08 May 2008 13:31:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.27,456,1204531200"; d="scan'208,217";a="562415524" Received: from orsmsx335.amr.corp.intel.com (HELO orsmsx335.jf.intel.com) ([10.22.226.40]) by fmsmga001.fm.intel.com with ESMTP; 08 May 2008 13:34:09 -0700 Received: from orsmsx416.amr.corp.intel.com ([10.22.226.46]) by orsmsx335.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 May 2008 13:33:21 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Thu, 8 May 2008 13:33:20 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: SW_PREEMPT and cpu runq Thread-Index: AcixSsFIu3sSWsbiTX+53zD0DO1PEg== From: "Murty, Ravi" To: X-OriginalArrivalTime: 08 May 2008 20:33:21.0280 (UTC) FILETIME=[C189F800:01C8B14A] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: SW_PREEMPT and cpu runq X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 20:33:22 -0000 Hi, =20 When a thread is being switched out and it is being preempted (e.g. time quantum expires), why does sched_switch hold it on the current cpu? i.e. why does the code see that it was preempted and put it back on the same queue? In other cases it looks to see if it can be migrated and the thread goes back some place else. If a thread is being kicked out and there is a perfectly idle CPU some where on the system, wouldn't it make sense to migrate the thread? =20 Thanks Ravi =20 From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 20:55:25 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 093D01065684 for ; Thu, 8 May 2008 20:55:25 +0000 (UTC) (envelope-from edelkind-freebsd-hackers@episec.com) Received: from episec.com (episec.com [69.55.237.141]) by mx1.freebsd.org (Postfix) with SMTP id D12258FC16 for ; Thu, 8 May 2008 20:55:24 +0000 (UTC) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 38725 invoked by uid 1024); 8 May 2008 20:55:24 -0000 Date: Thu, 8 May 2008 16:55:24 -0400 From: ari edelkind To: hackers@freebsd.org Message-ID: <20080508205524.GA79355@episec.com> Mail-Followup-To: ari edelkind , hackers@freebsd.org References: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> <20080508174142.GZ79355@episec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080508174142.GZ79355@episec.com> Cc: Subject: Re: binary file within a shell script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 20:55:25 -0000 edelkind-freebsd-hackers@episec.com wrote: > echo "*** generating ls..." > file=`mktemp /tmp/ls.XXXXXX` > [[ $? -eq 0 ]] || exit 1 Er, s/^file/lsfile/, obviously. ari From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 22:27:45 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE46D10656BE for ; Thu, 8 May 2008 22:27:45 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outD.internet-mail-service.net (outd.internet-mail-service.net [216.240.47.227]) by mx1.freebsd.org (Postfix) with ESMTP id A2F9F8FC0C for ; Thu, 8 May 2008 22:27:45 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Fri, 09 May 2008 02:11:33 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id F3B6D2D600D; Thu, 8 May 2008 15:27:44 -0700 (PDT) Message-ID: <48237E60.9040007@elischer.org> Date: Thu, 08 May 2008 15:27:44 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: "Murty, Ravi" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: SW_PREEMPT and cpu runq X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 22:27:45 -0000 Murty, Ravi wrote: > Hi, > > > > When a thread is being switched out and it is being preempted (e.g. time > quantum expires), why does sched_switch hold it on the current cpu? i.e. > why does the code see that it was preempted and put it back on the same > queue? > > In other cases it looks to see if it can be migrated and the thread goes > back some place else. If a thread is being kicked out and there is a > perfectly idle CPU some where on the system, wouldn't it make sense to > migrate the thread? it shouldn't be held.. why do you think it is? (and is this in 6.x still?) > > > > Thanks > Ravi > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 22:48:14 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C4441065670 for ; Thu, 8 May 2008 22:48:14 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by mx1.freebsd.org (Postfix) with ESMTP id 0FB988FC1D for ; Thu, 8 May 2008 22:48:13 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 08 May 2008 15:48:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.27,456,1204531200"; d="scan'208";a="244118636" Received: from orsmsx335.amr.corp.intel.com (HELO orsmsx335.jf.intel.com) ([10.22.226.40]) by azsmga001.ch.intel.com with ESMTP; 08 May 2008 15:48:13 -0700 Received: from orsmsx416.amr.corp.intel.com ([10.22.226.46]) by orsmsx335.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 May 2008 15:48:13 -0700 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: Thu, 8 May 2008 15:48:12 -0700 Message-ID: In-Reply-To: <48237E60.9040007@elischer.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: SW_PREEMPT and cpu runq Thread-Index: AcixWr2ketz2s5fHQtWGSFUSi3EgKgAAqI4w References: <48237E60.9040007@elischer.org> From: "Murty, Ravi" To: "Julian Elischer" X-OriginalArrivalTime: 08 May 2008 22:48:13.0099 (UTC) FILETIME=[98A38FB0:01C8B15D] Cc: freebsd-hackers@freebsd.org Subject: RE: SW_PREEMPT and cpu runq X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 22:48:14 -0000 I guess two places. 1. maybe_preempt() - I've decided to preempt a thread on a cpu and the outgoing thread is held (SW_PREEMPT) on the same cpu. 2. timer expires and thread is out of its slice (ULE), in this case I remove the load and re-add it back to the same (current) cpu. Sorry Julian, yes this is 6.2 Thanks much, Ravi -----Original Message----- From: Julian Elischer [mailto:julian@elischer.org]=20 Sent: Thursday, May 08, 2008 3:28 PM To: Murty, Ravi Cc: freebsd-hackers@freebsd.org Subject: Re: SW_PREEMPT and cpu runq Murty, Ravi wrote: > Hi, >=20 > =20 >=20 > When a thread is being switched out and it is being preempted (e.g. time > quantum expires), why does sched_switch hold it on the current cpu? i.e. > why does the code see that it was preempted and put it back on the same > queue? >=20 > In other cases it looks to see if it can be migrated and the thread goes > back some place else. If a thread is being kicked out and there is a > perfectly idle CPU some where on the system, wouldn't it make sense to > migrate the thread? it shouldn't be held.. why do you think it is? (and is this in 6.x still?) >=20 > =20 >=20 > Thanks > Ravi >=20 > =20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 23:02:08 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0DE91065675 for ; Thu, 8 May 2008 23:02:08 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by mx1.freebsd.org (Postfix) with ESMTP id 865658FC16 for ; Thu, 8 May 2008 23:02:08 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 08 May 2008 16:02:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.27,456,1204531200"; d="scan'208";a="244124155" Received: from orsmsx335.amr.corp.intel.com (HELO orsmsx335.jf.intel.com) ([10.22.226.40]) by azsmga001.ch.intel.com with ESMTP; 08 May 2008 16:02:07 -0700 Received: from orsmsx416.amr.corp.intel.com ([10.22.226.46]) by orsmsx335.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 May 2008 16:01:56 -0700 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: Thu, 8 May 2008 16:01:54 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: SW_PREEMPT and cpu runq Thread-Index: AcixWr2ketz2s5fHQtWGSFUSi3EgKgAAqI4wAACDEvA= References: <48237E60.9040007@elischer.org> From: "Murty, Ravi" To: "Murty, Ravi" , "Julian Elischer" X-OriginalArrivalTime: 08 May 2008 23:01:56.0370 (UTC) FILETIME=[8358BF20:01C8B15F] Cc: freebsd-hackers@freebsd.org Subject: RE: SW_PREEMPT and cpu runq X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 23:02:08 -0000 Oh, I find this happens only in ULE -- during sched_switch(), it sets KEF_HOLD and then calls setrunqueue(). This ensures that the thread does not migrate on preemptions. Ravi -----Original Message----- From: Murty, Ravi=20 Sent: Thursday, May 08, 2008 3:48 PM To: 'Julian Elischer' Cc: freebsd-hackers@freebsd.org Subject: RE: SW_PREEMPT and cpu runq I guess two places. 1. maybe_preempt() - I've decided to preempt a thread on a cpu and the outgoing thread is held (SW_PREEMPT) on the same cpu. 2. timer expires and thread is out of its slice (ULE), in this case I remove the load and re-add it back to the same (current) cpu. Sorry Julian, yes this is 6.2 Thanks much, Ravi -----Original Message----- From: Julian Elischer [mailto:julian@elischer.org]=20 Sent: Thursday, May 08, 2008 3:28 PM To: Murty, Ravi Cc: freebsd-hackers@freebsd.org Subject: Re: SW_PREEMPT and cpu runq Murty, Ravi wrote: > Hi, >=20 > =20 >=20 > When a thread is being switched out and it is being preempted (e.g. time > quantum expires), why does sched_switch hold it on the current cpu? i.e. > why does the code see that it was preempted and put it back on the same > queue? >=20 > In other cases it looks to see if it can be migrated and the thread goes > back some place else. If a thread is being kicked out and there is a > perfectly idle CPU some where on the system, wouldn't it make sense to > migrate the thread? it shouldn't be held.. why do you think it is? (and is this in 6.x still?) >=20 > =20 >=20 > Thanks > Ravi >=20 > =20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 11:54:06 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 711761065677 for ; Fri, 9 May 2008 11:54:06 +0000 (UTC) (envelope-from andenore@start.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.freebsd.org (Postfix) with ESMTP id 2C0A08FC17 for ; Fri, 9 May 2008 11:54:05 +0000 (UTC) (envelope-from andenore@start.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; format=flowed; delsp=yes; charset=us-ascii Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0K0L00MOLNQ05J60@osl1smout1.broadpark.no> for freebsd-hackers@freebsd.org; Fri, 09 May 2008 13:54:00 +0200 (CEST) Received: from duckjen.nextgentel.no ([84.48.194.205]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0K0L001ZWNPZMEK1@osl1sminn1.broadpark.no> for freebsd-hackers@freebsd.org; Fri, 09 May 2008 13:54:00 +0200 (CEST) Date: Fri, 09 May 2008 13:52:46 +0200 To: freebsd-hackers@freebsd.org From: Anders Nore Message-id: User-Agent: Opera Mail/9.27 (FreeBSD) Subject: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 11:54:06 -0000 Hi, I'm working on adding .db support to the pkg_tools( i.e. pkg_add, pkg_info, etc. ) as part of SoC 2008. The database api used is BerkeleyDB that comes with the base system (/usr/src/include/db.h). BerkeleyDB is not you're typical relational db, and can only save key/value pairs. The way I'm thinking of storing information to the .db is to name the keys as the directory names in /var/db/pkg. And save the +* files in the directories to the value element in the db, separated with a special character or similar. One problem lies with the +* files which is scripts (e.g., +INSTALL, +DEINSTALL). I've gotten some input that it's bad to save scripts in the db, but if it's not going to be saved there, then where? Isn't it possible to execute a script without saving a file to disk? Like using "sh -c 'string'". In my personal opinion it should not be a hybrid solution where you save the script files in an old fashion way, for example /var/db/pkg/someport-1.2_1/+INSTALL, and the rest of the information lies in the .db file. Because then you have redundancy and that could lead to inconsistencies. Let me hear your opinions =) - Anders Nore From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 12:43:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 643E91065674 for ; Fri, 9 May 2008 12:43:07 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 179358FC1A for ; Fri, 9 May 2008 12:43:07 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id C5DFAE506AA for ; Fri, 9 May 2008 12:43:05 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 4400316FC2; Fri, 9 May 2008 14:43:09 +0200 (CEST) Date: Fri, 9 May 2008 14:43:08 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20080509124308.GA596@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 12:43:07 -0000 On Fri, May 09, 2008 at 01:52:46PM +0200, Anders Nore wrote: > I'm working on adding .db support to the pkg_tools( i.e. pkg_add, pkg_info, > etc. ) as part of SoC 2008. The database api used is BerkeleyDB that comes > with the base system (/usr/src/include/db.h). BerkeleyDB is not you're > typical relational db, and can only save key/value pairs. The way I'm > thinking of storing information to the .db is to name the keys as the > directory names in /var/db/pkg. And save the +* files in the directories to > the value element in the db, separated with a special character or similar. As one of the persons hacking on pkg_install in pkgsrc/NetBSD, I would *strongly* advisy you against storing the files only in a bdb file. The change of major and complete corruption with bdb185 is high, consider pulling the plug in the middle of a long update. Secondly, I would also advisy against just storing all meta data in a single key/value pair. For example, +CONTENTS can be extremely large. Check texmf for a good example. Joerg From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 12:55:24 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 731AF1065671 for ; Fri, 9 May 2008 12:55:24 +0000 (UTC) (envelope-from viaprog@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 4880A8FC0A for ; Fri, 9 May 2008 12:55:24 +0000 (UTC) (envelope-from viaprog@gmail.com) Received: by wa-out-1112.google.com with SMTP id j4so1556681wah.3 for ; Fri, 09 May 2008 05:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=D6Di//LGyWrw0wsDoBqQu1MAMK25dt6DB7p06VILVSo=; b=A+eFbeA+ITki67qHkKkpx6gJnqztOvdE/WaHfwpLDuR9WEcoQG986k43bVDWhqz63bWwrh4JGRUFosmKNa1dRJbajdXV+Wgca7cGfZmJtzr1tatlV6z9TtA+lqXgblYoVeCREIGO/s1sWqIZR9lyWiudhTDSeGDih1Nd+XV/Os0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Vwj2nU53G4eR0Y1FBEya5RXQYHVr7fCf5OVXggWz5zLo2Thd4dztkCfpZl3n5d4X1pMZHDDeSe0luhfmTvj9yWnlpbnwgpOZ/Y7LpQ2QkRwDXxPdKLG8ACk0xxOAGPOn42vk/GakeLnmiaZW54yOeZNlp7ZAEY16AlT0QvX5Qzc= Received: by 10.114.182.1 with SMTP id e1mr4163974waf.154.1210337724057; Fri, 09 May 2008 05:55:24 -0700 (PDT) Received: by 10.114.170.15 with HTTP; Fri, 9 May 2008 05:55:23 -0700 (PDT) Message-ID: Date: Fri, 9 May 2008 16:55:23 +0400 From: "Igor A. Valcov" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: do not work nested unnamed anchor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 12:55:24 -0000 Hello. For example: ==== pf.conf ==== ext_if="xl0" ip_world="nn.nn.nn.nn" # Filter rules block log all anchor in on $ext_if { pass quick proto tcp to $ip_world port 22 keep state # SSH pass quick proto tcp to $ip_world port 25 keep state # SMTP pass quick proto tcp to $ip_world port 110 keep state # POP3 anchor { pass quick proto tcp to $ip_world port 995 keep state # POP3S } } ============ nmap results: PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 4.5p1 (FreeBSD 20061110; protocol 2.0) 25/tcp open smtp? 110/tcp open pop3 Openwall popa3d I can not understand what the problem... FreeBSD-7.0-RELEASE-p1 i386 -- Igor A. Valcov From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 12:56:53 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83D40106567D for ; Fri, 9 May 2008 12:56:53 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 543408FC12 for ; Fri, 9 May 2008 12:56:53 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id DF1121CD4A; Fri, 9 May 2008 04:40:37 -0800 (AKDT) From: Mel To: freebsd-hackers@freebsd.org Date: Fri, 9 May 2008 14:40:35 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805091440.36202.fbsd.hackers@rachie.is-a-geek.net> Cc: Anders Nore Subject: Re: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 12:56:53 -0000 On Friday 09 May 2008 13:52:46 Anders Nore wrote: > I'm working on adding .db support to the pkg_tools( i.e. pkg_add, > pkg_info, etc. ) as part of SoC 2008. Is this gonna be optional? > One problem lies with the +* files which is scripts (e.g., +INSTALL, > +DEINSTALL). I've gotten some input that it's bad to save scripts in the > db, but if it's not going to be saved there, then where? Isn't it possible > to execute a script without saving a file to disk? Like using "sh -c > 'string'". In my personal opinion it should not be a hybrid solution where > you save the script files in an old fashion way, for example > /var/db/pkg/someport-1.2_1/+INSTALL, and the rest of the information lies > in the .db file. Because then you have redundancy and that could lead to > inconsistencies. Don't know what the reasons are for people to say it's bad to save scripts in the db, but for me it would be that I can't inspect and/or modify them, though if there were support in the ports for PKG(DE)INSTALL_LOCAL, I suppose I could do without the modification part. -- Mel From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 12:51:21 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A90D106566B for ; Fri, 9 May 2008 12:51:21 +0000 (UTC) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (ei.bzerk.org [82.95.223.12]) by mx1.freebsd.org (Postfix) with ESMTP id D1C658FC15 for ; Fri, 9 May 2008 12:51:20 +0000 (UTC) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.14.2/8.13.8) with ESMTP id m49CMTpH012805 for ; Fri, 9 May 2008 14:22:30 +0200 (CEST) (envelope-from mail25@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.14.2/8.13.8/Submit) id m49CMTNm012804 for hackers@freebsd.org; Fri, 9 May 2008 14:22:29 +0200 (CEST) (envelope-from mail25@bzerk.org) Date: Fri, 9 May 2008 14:22:29 +0200 From: Ruben de Groot To: hackers@freebsd.org Message-ID: <20080509122229.GA11892@ei.bzerk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on ei.bzerk.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (ei.bzerk.org [127.0.0.1]); Fri, 09 May 2008 14:22:32 +0200 (CEST) X-Mailman-Approved-At: Fri, 09 May 2008 14:14:45 +0000 Cc: Subject: Panics in kern_timeout.c (RELENG_7) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 12:51:21 -0000 Hi, After upgrading to 7-stable with sources of about 2 weeks ago I'm seeing panics about once every 2 days, see below. I've posted to stable@ two days ago, but got no reactions. Nobody else seems to have this issue according to google. Any ideas? Ruben Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x736e77 fault code = supervisor read, page not present instruction pointer = 0x20:0xc05f095f stack pointer = 0x28:0xd4ceec80 frame pointer = 0x28:0xd4ceecbc code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 13 (swi4: clock sio) trap number = 12 panic: page fault cpuid = 0 Uptime: 1d15h8m59s Physical memory: 503 MB Dumping 78 MB: 63 47 31 15 #0 doadump () at pcpu.h:195 195 pcpu.h: No such file or directory. in pcpu.h (kgdb) list *0xc05f095f 0xc05f095f is in softclock (/usr/src/sys/kern/kern_timeout.c:203). 198 curticks = softticks; 199 bucket = &callwheel[curticks & callwheelmask]; 200 c = TAILQ_FIRST(bucket); 201 while (c) { 202 depth++; 203 if (c->c_time != curticks) { 204 c = TAILQ_NEXT(c, c_links.tqe); 205 ++steps; 206 if (steps >= MAX_SOFTCLOCK_STEPS) { 207 nextsoftcheck = c; (kgdb) bt #0 doadump () at pcpu.h:195 #1 0xc05de987 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc05dec49 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:572 #3 0xc08961cc in trap_fatal (frame=0xd4ceec40, eva=7564919) at /usr/src/sys/i386/i386/trap.c:899 #4 0xc0896b4f in trap (frame=0xd4ceec40) at /usr/src/sys/i386/i386/trap.c:280 #5 0xc087cb8b in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #6 0xc05f095f in softclock (dummy=0x0) at /usr/src/sys/kern/kern_timeout.c:202 #7 0xc05bf55b in ithread_loop (arg=0xc2997280) at /usr/src/sys/kern/kern_intr.c:1036 #8 0xc05bc339 in fork_exit (callout=0xc05bf3b0 , arg=0xc2997280, frame=0xd4ceed38) at /usr/src/sys/kern/kern_fork.c:783 #9 0xc087cc00 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:205 From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 14:35:14 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 698FF106564A; Fri, 9 May 2008 14:35:14 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.freebsd.org (Postfix) with ESMTP id 251B68FC17; Fri, 9 May 2008 14:35:13 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 2F1EE17B57E; Fri, 9 May 2008 16:35:13 +0200 (CEST) Received: from marvin.blogreen.org (marvin.blogreen.org [82.247.213.140]) by smtp3-g19.free.fr (Postfix) with ESMTP id 146B517B55B; Fri, 9 May 2008 16:35:13 +0200 (CEST) Received: by marvin.blogreen.org (Postfix, from userid 1001) id DB29D5C070; Fri, 9 May 2008 16:35:12 +0200 (CEST) Date: Fri, 9 May 2008 16:35:12 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: hackers@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20080509143512.GA69792@marvin.blogreen.org> Mail-Followup-To: hackers@freebsd.org, freebsd-hackers@freebsd.org, Romuald Conty References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> <8763txlaj6.fsf@kobe.laptop> <481A959C.5000704@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <481A959C.5000704@freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key: http://romain.blogreen.org/pubkey.asc Cc: Romuald Conty Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 14:35:14 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 01, 2008 at 09:16:28PM -0700, Tim Kientzle wrote: > In all of these cases, though, adding a space between the '0' and > the 'b' changes the meaning, so is wrong. Indent can > change/insert whitespace, but should never do so in a way that > changes the meaning of the program. In all of these cases, > having indent recognize "0b..." as a single token is the > correct behavior. >=20 > So I don't see any point in having this recognition be > tunable. indent already has too many switches. I oppened PR bin/123553 concerning this: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D123553 Regards --=20 Romain Tarti=E8re http://romain.blogreen.org/ pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkgkYSAACgkQ2OmjP/9W/0M6yACfZAg1lu6NgZcjrVewK1DflZqK ww4An3k2jAZuf5g6iE0JR8L4ZJ+kRnMU =66rh -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 14:35:14 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 698FF106564A; Fri, 9 May 2008 14:35:14 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.freebsd.org (Postfix) with ESMTP id 251B68FC17; Fri, 9 May 2008 14:35:13 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 2F1EE17B57E; Fri, 9 May 2008 16:35:13 +0200 (CEST) Received: from marvin.blogreen.org (marvin.blogreen.org [82.247.213.140]) by smtp3-g19.free.fr (Postfix) with ESMTP id 146B517B55B; Fri, 9 May 2008 16:35:13 +0200 (CEST) Received: by marvin.blogreen.org (Postfix, from userid 1001) id DB29D5C070; Fri, 9 May 2008 16:35:12 +0200 (CEST) Date: Fri, 9 May 2008 16:35:12 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: hackers@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20080509143512.GA69792@marvin.blogreen.org> Mail-Followup-To: hackers@freebsd.org, freebsd-hackers@freebsd.org, Romuald Conty References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> <8763txlaj6.fsf@kobe.laptop> <481A959C.5000704@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <481A959C.5000704@freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key: http://romain.blogreen.org/pubkey.asc Cc: Romuald Conty Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 14:35:14 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 01, 2008 at 09:16:28PM -0700, Tim Kientzle wrote: > In all of these cases, though, adding a space between the '0' and > the 'b' changes the meaning, so is wrong. Indent can > change/insert whitespace, but should never do so in a way that > changes the meaning of the program. In all of these cases, > having indent recognize "0b..." as a single token is the > correct behavior. >=20 > So I don't see any point in having this recognition be > tunable. indent already has too many switches. I oppened PR bin/123553 concerning this: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D123553 Regards --=20 Romain Tarti=E8re http://romain.blogreen.org/ pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkgkYSAACgkQ2OmjP/9W/0M6yACfZAg1lu6NgZcjrVewK1DflZqK ww4An3k2jAZuf5g6iE0JR8L4ZJ+kRnMU =66rh -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 16:51:25 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E86F106568F for ; Fri, 9 May 2008 16:51:25 +0000 (UTC) (envelope-from andenore@start.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.freebsd.org (Postfix) with ESMTP id 271C38FC1B for ; Fri, 9 May 2008 16:51:24 +0000 (UTC) (envelope-from andenore@start.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; format=flowed; delsp=yes; charset=us-ascii Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0K0M001VX1HN1750@osl1smout1.broadpark.no> for freebsd-hackers@freebsd.org; Fri, 09 May 2008 18:51:23 +0200 (CEST) Received: from duckjen.nextgentel.no ([84.48.194.205]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0K0M0056S1HMT722@osl1sminn1.broadpark.no> for freebsd-hackers@freebsd.org; Fri, 09 May 2008 18:51:23 +0200 (CEST) Date: Fri, 09 May 2008 18:50:10 +0200 To: "freebsd-hackers@freebsd.org" From: Anders Nore References: <20080509124308.GA596@britannica.bec.de> Message-id: In-reply-to: <20080509124308.GA596@britannica.bec.de> User-Agent: Opera Mail/9.27 (FreeBSD) Cc: Joerg Sonnenberger Subject: Re: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 16:51:25 -0000 On Fri, 09 May 2008 14:43:08 +0200, Joerg Sonnenberger wrote: > On Fri, May 09, 2008 at 01:52:46PM +0200, Anders Nore wrote: >> I'm working on adding .db support to the pkg_tools( i.e. pkg_add, >> pkg_info, >> etc. ) as part of SoC 2008. The database api used is BerkeleyDB that >> comes >> with the base system (/usr/src/include/db.h). BerkeleyDB is not you're >> typical relational db, and can only save key/value pairs. The way I'm >> thinking of storing information to the .db is to name the keys as the >> directory names in /var/db/pkg. And save the +* files in the >> directories to >> the value element in the db, separated with a special character or >> similar. > > As one of the persons hacking on pkg_install in pkgsrc/NetBSD, I would > *strongly* advisy you against storing the files only in a bdb file. > The change of major and complete corruption with bdb185 is high, > consider pulling the plug in the middle of a long update. Yes that would probably be bad for the database, but I'm sure one can manage to get around this problem by copying it before changing the db and delete the copy if it doesn't fail. At the next time executed it will check for a copy, use that and assume that the last run was unsuccessful. Note that this is not a replacement for the existing tools, although it might be in the future. It's a standalone replica of the old tools with bdb support and other smaller improvements. And for compatibility reasons the tools will use a hybrid method (saving to both .db and flat db), but reading and querying will only be done on the .db file. > Secondly, I would also advisy against just storing all meta data in a > single key/value pair. For example, +CONTENTS can be extremely large. > Check texmf for a good example. When it comes to storing large values in a key/value pair, I think that's what bdb was designed for, handling large amounts of data (in the orders of gigabytes even in key's) fast. -Anders From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 17:06:32 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 411DE106566C for ; Fri, 9 May 2008 17:06:32 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id F04F88FC15 for ; Fri, 9 May 2008 17:06:31 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 146E2E506B3 for ; Fri, 9 May 2008 17:06:30 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id B8E6B16FC2; Fri, 9 May 2008 19:06:33 +0200 (CEST) Date: Fri, 9 May 2008 19:06:33 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20080509170633.GB3571@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20080509124308.GA596@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 17:06:32 -0000 On Fri, May 09, 2008 at 06:50:10PM +0200, Anders Nore wrote: > Yes that would probably be bad for the database, but I'm sure one can > manage to get around this problem by copying it before changing the db and > delete the copy if it doesn't fail. At the next time executed it will check > for a copy, use that and assume that the last run was unsuccessful. /var/db/pkg contains 10MB for the various packages installed on my laptop and 10MB for the cache of +CONTENTS. You don't want to copy that around all the time. >> Secondly, I would also advisy against just storing all meta data in a >> single key/value pair. For example, +CONTENTS can be extremely large. >> Check texmf for a good example. > > When it comes to storing large values in a key/value pair, I think that's > what bdb was designed for, handling large amounts of data (in the orders of > gigabytes even in key's) fast. No, actually that is exactly what it was *not* designed for. Having billions of keys is fine, but data that exceeds the size of a database page is going to slow down. While it might not be a problem of you are copying the data to a new file anyway, it also means that fragmentation in the database will be more problematic. My main point is that for the interesting operations you want to actually look up with fine grained keys and that's what is not possible if you store the meta data as blob. In fact, storing the meta data as blob is not faster than just using the filesystem. Joerg From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 17:35:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C1831065671 for ; Fri, 9 May 2008 17:35:10 +0000 (UTC) (envelope-from roberto@keltia.freenix.fr) Received: from keltia.freenix.fr (keltia.freenix.org [IPv6:2001:660:330f:f820:213:72ff:fe15:f44]) by mx1.freebsd.org (Postfix) with ESMTP id E4FB98FC1D for ; Fri, 9 May 2008 17:35:09 +0000 (UTC) (envelope-from roberto@keltia.freenix.fr) Received: from localhost (localhost [127.0.0.1]) by keltia.freenix.fr (Postfix/TLS) with ESMTP id 8FCAB39C66 for ; Fri, 9 May 2008 19:35:08 +0200 (CEST) X-Virus-Scanned: amavisd-new at keltia.freenix.fr Received: from keltia.freenix.fr ([127.0.0.1]) by localhost (keltia.freenix.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UAZp2dMfQ1rh for ; Fri, 9 May 2008 19:35:08 +0200 (CEST) Received: by keltia.freenix.fr (Postfix/TLS, from userid 101) id 0793739C88; Fri, 9 May 2008 19:35:07 +0200 (CEST) Date: Fri, 9 May 2008 19:35:07 +0200 From: Ollivier Robert To: freebsd-hackers@freebsd.org Message-ID: <20080509173507.GB35511@keltia.freenix.fr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: MacOS X / Macbook Pro - FreeBSD 6.2 / Dell D820 SMP User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 17:35:10 -0000 According to Anders Nore: > with the base system (/usr/src/include/db.h). BerkeleyDB is not you're > typical relational db, and can only save key/value pairs. The way I'm > thinking of storing information to the .db is to name the keys as the > directory names in /var/db/pkg. And save the +* files in the directories to > the value element in the db, separated with a special character or similar. Please make it compatible with the existing infrastructure in /var/db/pkg maintained by portinstall/portupgrade. If it can be improved as a side-effect, that would be even better. -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr Darwin sidhe.keltia.net Version 9.2.0: Tue Feb 5 16:13:22 PST 2008; i386 From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 17:36:28 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0073F106567A; Fri, 9 May 2008 17:36:28 +0000 (UTC) (envelope-from roberto@keltia.freenix.fr) Received: from keltia.freenix.fr (keltia.freenix.org [IPv6:2001:660:330f:f820:213:72ff:fe15:f44]) by mx1.freebsd.org (Postfix) with ESMTP id 9B4B68FC12; Fri, 9 May 2008 17:36:27 +0000 (UTC) (envelope-from roberto@keltia.freenix.fr) Received: from localhost (localhost [127.0.0.1]) by keltia.freenix.fr (Postfix/TLS) with ESMTP id A0E4839C88; Fri, 9 May 2008 19:36:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at keltia.freenix.fr Received: from keltia.freenix.fr ([127.0.0.1]) by localhost (keltia.freenix.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aU5yNrS4TILU; Fri, 9 May 2008 19:36:26 +0200 (CEST) Received: by keltia.freenix.fr (Postfix/TLS, from userid 101) id 3EE4B39C66; Fri, 9 May 2008 19:36:26 +0200 (CEST) Date: Fri, 9 May 2008 19:36:26 +0200 From: Ollivier Robert To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20080509173626.GC35511@keltia.freenix.fr> References: <4818F72C.90300@cran.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4818F72C.90300@cran.org.uk> X-Operating-System: MacOS X / Macbook Pro - FreeBSD 6.2 / Dell D820 SMP User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Subject: Re: sshd patch to avoid DNS lookups when using 'UseDNS no' or -u0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 17:36:28 -0000 According to Bruce Cran: > I've attached a patch which implements this (the change to loginrec.c > reverts it back to the default OpenSSH code) and was wondering if someone > could take a look at it. If you have not already done so, please use send-pr to record it in GNATS, that will help not forgetting about it, thanks! -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr Darwin sidhe.keltia.net Version 9.2.0: Tue Feb 5 16:13:22 PST 2008; i386 From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 17:36:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0073F106567A; Fri, 9 May 2008 17:36:28 +0000 (UTC) (envelope-from roberto@keltia.freenix.fr) Received: from keltia.freenix.fr (keltia.freenix.org [IPv6:2001:660:330f:f820:213:72ff:fe15:f44]) by mx1.freebsd.org (Postfix) with ESMTP id 9B4B68FC12; Fri, 9 May 2008 17:36:27 +0000 (UTC) (envelope-from roberto@keltia.freenix.fr) Received: from localhost (localhost [127.0.0.1]) by keltia.freenix.fr (Postfix/TLS) with ESMTP id A0E4839C88; Fri, 9 May 2008 19:36:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at keltia.freenix.fr Received: from keltia.freenix.fr ([127.0.0.1]) by localhost (keltia.freenix.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aU5yNrS4TILU; Fri, 9 May 2008 19:36:26 +0200 (CEST) Received: by keltia.freenix.fr (Postfix/TLS, from userid 101) id 3EE4B39C66; Fri, 9 May 2008 19:36:26 +0200 (CEST) Date: Fri, 9 May 2008 19:36:26 +0200 From: Ollivier Robert To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20080509173626.GC35511@keltia.freenix.fr> References: <4818F72C.90300@cran.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4818F72C.90300@cran.org.uk> X-Operating-System: MacOS X / Macbook Pro - FreeBSD 6.2 / Dell D820 SMP User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Subject: Re: sshd patch to avoid DNS lookups when using 'UseDNS no' or -u0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 17:36:28 -0000 According to Bruce Cran: > I've attached a patch which implements this (the change to loginrec.c > reverts it back to the default OpenSSH code) and was wondering if someone > could take a look at it. If you have not already done so, please use send-pr to record it in GNATS, that will help not forgetting about it, thanks! -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr Darwin sidhe.keltia.net Version 9.2.0: Tue Feb 5 16:13:22 PST 2008; i386 From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 17:55:55 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4B55106564A for ; Fri, 9 May 2008 17:55:55 +0000 (UTC) (envelope-from andenore@start.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.freebsd.org (Postfix) with ESMTP id 7C99A8FC31 for ; Fri, 9 May 2008 17:55:55 +0000 (UTC) (envelope-from andenore@start.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; format=flowed; delsp=yes; charset=us-ascii Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0K0M001EK4H6F040@osl1smout1.broadpark.no> for freebsd-hackers@freebsd.org; Fri, 09 May 2008 19:55:54 +0200 (CEST) Received: from duckjen.nextgentel.no ([84.48.194.205]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0K0M0050V4H4TB92@osl1sminn1.broadpark.no> for freebsd-hackers@freebsd.org; Fri, 09 May 2008 19:55:54 +0200 (CEST) Date: Fri, 09 May 2008 19:54:40 +0200 To: "freebsd-hackers@freebsd.org" From: Anders Nore References: <20080509124308.GA596@britannica.bec.de> <20080509170633.GB3571@britannica.bec.de> Message-id: In-reply-to: <20080509170633.GB3571@britannica.bec.de> User-Agent: Opera Mail/9.27 (FreeBSD) Cc: Joerg Sonnenberger Subject: Re: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 17:55:55 -0000 On Fri, 09 May 2008 19:06:33 +0200, Joerg Sonnenberger wrote: > On Fri, May 09, 2008 at 06:50:10PM +0200, Anders Nore wrote: >> Yes that would probably be bad for the database, but I'm sure one can >> manage to get around this problem by copying it before changing the db >> and >> delete the copy if it doesn't fail. At the next time executed it will >> check >> for a copy, use that and assume that the last run was unsuccessful. > > /var/db/pkg contains 10MB for the various packages installed on my > laptop and 10MB for the cache of +CONTENTS. You don't want to copy that > around all the time. > >>> Secondly, I would also advisy against just storing all meta data in a >>> single key/value pair. For example, +CONTENTS can be extremely large. >>> Check texmf for a good example. >> >> When it comes to storing large values in a key/value pair, I think >> that's >> what bdb was designed for, handling large amounts of data (in the >> orders of >> gigabytes even in key's) fast. > > No, actually that is exactly what it was *not* designed for. Having > billions of keys is fine, but data that exceeds the size of a database > page is going to slow down. While it might not be a problem of you are > copying the data to a new file anyway, it also means that fragmentation > in the database will be more problematic. > > My main point is that for the interesting operations you want to > actually look up with fine grained keys and that's what is not possible > if you store the meta data as blob. In fact, storing the meta data as > blob is not faster than just using the filesystem. > You are probably right, but how would you store the key's? Is storing the key as e.g., 'portname-1.2_3+CONTENT' a good solution? From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 18:17:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41A9C106564A for ; Fri, 9 May 2008 18:17:29 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id EE9CD8FC12 for ; Fri, 9 May 2008 18:17:28 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by an-out-0708.google.com with SMTP id b33so328829ana.13 for ; Fri, 09 May 2008 11:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=8rHG0bMg+n8taySfHuop8yIAR2kdmieDuFxBUgr/NSE=; b=kzRhOs1aEoaRsLWAZ8Br8fv31NoyvEid4n1Sr8nCt1nrXH2ZLoVcrzU9QvSO/JdELQhx0alUuKxATgDZRN3T8cGe9RmIN87nsdZXEn3ECGl8hI/uC+wOVygvjks0tUwZ+a27NmYpzxcjjteeFRfzPIXK+yN2ESowlfehkxbOt9E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=VoesEU6Azd2WhuKkmzsnz1t3ldpApxkEu1mT3dErKJNZhCK+U6C5fIU5ex3hWGflKB1MdBTvZF27X/70mSZSLRFsPRQRGWpXHfDk9Pbs7nXUQdCzgrLsSDVCDk5W81OC29tWDMUMkQND8SYCjkezeEZ9j2K7JZYNxWPPihhX/fQ= Received: by 10.100.41.8 with SMTP id o8mr6195116ano.82.1210357047345; Fri, 09 May 2008 11:17:27 -0700 (PDT) Received: by 10.100.239.17 with HTTP; Fri, 9 May 2008 11:17:27 -0700 (PDT) Message-ID: <539c60b90805091117l57ed9966h99d6ae5f45925cdf@mail.gmail.com> Date: Fri, 9 May 2008 11:17:27 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: freebsd-hackers MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 12198b4e04df3e05 Subject: CLOCK_REALTIME undefined on my system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 18:17:29 -0000 The manpage (http://www.freebsd.org/cgi/man.cgi?query=clock_gettime&sektion=2&apropos=0&manpath=FreeBSD+7.0-RELEASE) for clock_gettime() specifies the correct header as , which I am using, and I don't see any errors on clock_gettime(), but the param I need, listed in the manpage, CLOCK_REALTIME is undefined. Any ideas how this could be? I've recently cvsup'd standard-supfile, so you'd think I'm up to date... I'm also getting an implicit declaration of isnormal(), and math.h is clearly included... Steve /* * fclock.c * * Copyright (C) 2005 Hein Roehrig * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * */ #define _ISOC99_SOURCE #define _POSIX_C_SOURCE 199309L #include #include #include #include #ifndef __MINGW32__ #include #endif #include #include /* ------------------------------------------------------------------ */ #ifdef __APPLE__ #include #include #include long double frealtime() { long double result; static uint64_t start_mat; static long double start_time; static double multiplier; mach_timebase_info_data_t mtid; struct timeval tv; if(!mtid.denom == 0) { mach_timebase_info(&mtid); multiplier = (double)mtid.numer / (double)mtid.denom; gettimeofday(&tv, NULL); start_time = (long double)tv.tv_sec + (long double)tv.tv_usec * 1000.0; start_mat = mach_absolute_time(); } result = start_time + (mach_absolute_time() - start_mat) * multiplier; assert(isnormal(result)); assert(result > 0); return result; } #else /* def __APPLE__ */ /* ------------------------------------------------------------------ */ #ifdef _POSIX_TIMERS long double frealtime() { long double result; struct timespec t; if (clock_gettime(CLOCK_REALTIME, &t)==-1) { perror("frealtime (clock_gettime)"); exit(EXIT_FAILURE); } result = (long double)t.tv_sec + (long double)t.tv_nsec*(long double)1e-9; assert(isnormal(result)); assert(result > 0); return result; } #else /* def _POSIX_TIMERS */ /* ------------------------------------------------------------------ */ #ifdef __MINGW32__ #include long double frealtime() { long double result; struct timeb t; ftime(&t); result = (long double)t.time + (long double)t.millitm * (long double)1e-3; assert(isnormal(result)); assert(result > 0); return result; } #else /* def __MINGW32__ */ /* ------------------------------------------------------------------ */ #ifndef CLK_TCK static clock_t CLK_TCK = 0; static void set_clk_tck(void) __attribute__ ((constructor)); static void set_clk_tck(void) { long v = sysconf(_SC_CLK_TCK); if (v == -1) { perror("sysconf(_SC_CLK_TCK)"); exit(EXIT_FAILURE); } CLK_TCK = v; } #endif long double frealtime() { long double result; struct tms t; clock_t c=times(&t); if (c==(clock_t)-1) { perror("frealtime (times)"); exit(EXIT_FAILURE); } result = (long double)c/CLK_TCK; assert(isnormal(result)); assert(result > 0); return result; } #endif #endif #endif From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 18:22:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEEC9106567B for ; Fri, 9 May 2008 18:22:37 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 899878FC0C for ; Fri, 9 May 2008 18:22:37 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 750ACE506AA for ; Fri, 9 May 2008 18:22:33 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 6363116FC2; Fri, 9 May 2008 20:21:47 +0200 (CEST) Date: Fri, 9 May 2008 20:21:47 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20080509182147.GA998@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20080509124308.GA596@britannica.bec.de> <20080509170633.GB3571@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Adding .db support to pkg_tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 18:22:37 -0000 On Fri, May 09, 2008 at 07:54:40PM +0200, Anders Nore wrote: > You are probably right, but how would you store the key's? Is storing the > key as e.g., 'portname-1.2_3+CONTENT' a good solution? I'd just use a different db file. I am not sure how much the following applies to FreeBSD as pkg_install has diverted a lot. The most expensive operations during pkg_add and pkg_info are scans for conflicts (explicit via @pkgcfl or implicit due to overlapping file lists) as they need to compare the to-be-installed package with all existing ones. After that come directory scans to resolve dependencies. Everything else is really just "open this small file and extract some data from it", where small usually means less than one block. Putting that into a database can help or not, but I don't think it is relevant. So the most important operations to support a btree of all files (implemented in NetBSD/pkgsrc) and a btree of all @pkgcfl/@pkgdb (not implemented yet). Joerg From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 18:32:32 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7A6A106566B for ; Fri, 9 May 2008 18:32:32 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.freebsd.org (Postfix) with ESMTP id 9B5038FC17 for ; Fri, 9 May 2008 18:32:32 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by wx-out-0506.google.com with SMTP id h27so1037370wxd.7 for ; Fri, 09 May 2008 11:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=CgbEQ4vNIv9FnqBUTqTb9HuYBCNzyBAnzxsVkrFyja8=; b=YFNo8AfsXe0Rt/FPFWKGhL+DuGXW3oMOrB9AvEDAF5DUpFlOcAvuPeUnQmLN+g2RZzlnN14F8/DJHxfwnDWv/nxGll6nVBG4cmS3VvPaWZliIE/x+Pr2JYx8uEw6/OBJdDhDn1to6wBmPesEKPjuBRRP+ij4FlZ3YMvK2Na2G50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=YWyxviS1r4NNfbJxgZzs1VMtHuqtGxlqDkWwnvfVcZj197HzqeEOMTy6bRRo0xZRI39h+z2GycnvrJ/c41YvhI3PFoW/pRQXoPB7MutoRn2jcmZKG7yEjbUGyAOqYAn5ApJSMWFMt1tBJlIInGVjYz+zpywCdS2MLCZBw+VF42E= Received: by 10.100.110.15 with SMTP id i15mr6169874anc.97.1210356217028; Fri, 09 May 2008 11:03:37 -0700 (PDT) Received: by 10.100.239.17 with HTTP; Fri, 9 May 2008 11:03:37 -0700 (PDT) Message-ID: <539c60b90805091103u2c8907a6q83cdca69fb45888e@mail.gmail.com> Date: Fri, 9 May 2008 11:03:37 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 1644e6acef5ef943 Subject: correct #define in source to specify FBSD vs. linux? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 18:32:33 -0000 Seems there is a more appropriate list for my earlier question to freebsd-questions: On and on I charge porting linux engineering tools. Major pita. I see a bunch of #ifdef __APPLE__ lines to pull in alternate headers; what's the equiv for FreeBSD? Thanks, Steve From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 18:33:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBD13106564A for ; Fri, 9 May 2008 18:33:31 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 811718FC18 for ; Fri, 9 May 2008 18:33:31 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [202.108.54.204]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 9F1142844E for ; Sat, 10 May 2008 02:33:30 +0800 (CST) Received: from localhost (tarsier.geekcn.org [202.108.54.204]) by tarsier.geekcn.org (Postfix) with ESMTP id 38DB6EBB3F8; Sat, 10 May 2008 02:33:30 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([202.108.54.204]) by localhost (mail.geekcn.org [202.108.54.204]) (amavisd-new, port 10024) with ESMTP id mItZ1g9RAiRg; Sat, 10 May 2008 02:33:25 +0800 (CST) Received: from charlie.delphij.net (71.5.7.139.ptr.us.xo.net [71.5.7.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id CBA37EC47CA; Sat, 10 May 2008 02:33:24 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=rXj0ZnM4op0rQFX/wZWOtDG7m2XosuR5EKM6jp40NB7ReTPes070lUNEach/e4zdg YYWV+nGiQRsCQ9NVWKBqg== Message-ID: <482498F2.8010201@delphij.net> Date: Fri, 09 May 2008 11:33:22 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: stevefranks@ieee.org References: <539c60b90805091117l57ed9966h99d6ae5f45925cdf@mail.gmail.com> In-Reply-To: <539c60b90805091117l57ed9966h99d6ae5f45925cdf@mail.gmail.com> X-Enigmail-Version: 0.95.6 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers Subject: Re: CLOCK_REALTIME undefined on my system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 18:33:31 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steve Franks wrote: | The manpage (http://www.freebsd.org/cgi/man.cgi?query=clock_gettime&sektion=2&apropos=0&manpath=FreeBSD+7.0-RELEASE) | for clock_gettime() specifies the correct header as , which I | am using, and I don't see any errors on clock_gettime(), but the param | I need, listed in the manpage, CLOCK_REALTIME is undefined. Any ideas | how this could be? I've recently cvsup'd standard-supfile, so you'd | think I'm up to date... | | I'm also getting an implicit declaration of isnormal(), and math.h is | clearly included... I think with #define _POSIX_C_SOURCE 199309L These will be masked... Could you please try if changing it to 200112 would work? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkgkmPIACgkQi+vbBBjt66D/bgCfd4jBteEBrPdQT272TcxY0bLF LwIAoIkcfwxlCBog7+1tyJr84Uns6jbJ =AS7o -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 18:36:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5750E1065672 for ; Fri, 9 May 2008 18:36:36 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id F0E778FC0A for ; Fri, 9 May 2008 18:36:35 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [202.108.54.204]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id EAB4228448 for ; Sat, 10 May 2008 02:36:34 +0800 (CST) Received: from localhost (tarsier.geekcn.org [202.108.54.204]) by tarsier.geekcn.org (Postfix) with ESMTP id AE26FEBBD04; Sat, 10 May 2008 02:36:34 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([202.108.54.204]) by localhost (mail.geekcn.org [202.108.54.204]) (amavisd-new, port 10024) with ESMTP id YbNYVjhNnbXt; Sat, 10 May 2008 02:36:30 +0800 (CST) Received: from charlie.delphij.net (71.5.7.139.ptr.us.xo.net [71.5.7.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 3EA68EB09B2; Sat, 10 May 2008 02:36:28 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=dfDZw0HtZ5yy6edUEd6lcfbGfOgH7HbMmu2n7q5dwE7YnjadCRywd4/dUOmQMOM8d XF7Bk9nk35vPCUtE9meBQ== Message-ID: <482499AB.5000609@delphij.net> Date: Fri, 09 May 2008 11:36:27 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: stevefranks@ieee.org References: <539c60b90805091103u2c8907a6q83cdca69fb45888e@mail.gmail.com> In-Reply-To: <539c60b90805091103u2c8907a6q83cdca69fb45888e@mail.gmail.com> X-Enigmail-Version: 0.95.6 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: correct #define in source to specify FBSD vs. linux? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 18:36:36 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steve Franks wrote: | Seems there is a more appropriate list for my earlier question to | freebsd-questions: | | On and on I charge porting linux engineering tools. Major pita. I | see a bunch of #ifdef __APPLE__ lines to pull in alternate headers; | what's the equiv for FreeBSD? #ifdef __FreeBSD__? - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkgkmaoACgkQi+vbBBjt66C30ACeIbw6P7CuwErAIvzcUjX4d4Gk 7G0An3+S2hM9YctAkKsWDVzkEoZIMhOH =AzxS -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri May 9 18:44:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C2331065679 for ; Fri, 9 May 2008 18:44:04 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outX.internet-mail-service.net (outx.internet-mail-service.net [216.240.47.247]) by mx1.freebsd.org (Postfix) with ESMTP id 064BE8FC2F for ; Fri, 9 May 2008 18:44:03 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Fri, 09 May 2008 22:30:24 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id EBB602D6004; Fri, 9 May 2008 11:44:02 -0700 (PDT) Message-ID: <48249B71.3050804@elischer.org> Date: Fri, 09 May 2008 11:44:01 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: stevefranks@ieee.org References: <539c60b90805091103u2c8907a6q83cdca69fb45888e@mail.gmail.com> In-Reply-To: <539c60b90805091103u2c8907a6q83cdca69fb45888e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: correct #define in source to specify FBSD vs. linux? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 18:44:04 -0000 Steve Franks wrote: > Seems there is a more appropriate list for my earlier question to > freebsd-questions: > > On and on I charge porting linux engineering tools. Major pita. I > see a bunch of #ifdef __APPLE__ lines to pull in alternate headers; > what's the equiv for FreeBSD? __FreeBSD__ but it is more fine grained than that.. http://www.freebsd.org/doc/en/books/porters-handbook/porting-versions.html (and the next page) maybe you should read the entire porter's handbook :-) > > Thanks, > Steve > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sat May 10 13:08:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C73A1065671 for ; Sat, 10 May 2008 13:08:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 019AB8FC19 for ; Sat, 10 May 2008 13:08:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 4BC0046B45; Sat, 10 May 2008 08:50:48 -0400 (EDT) Date: Sat, 10 May 2008 13:50:48 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <481F6990.9010007@elischer.org> Message-ID: <20080510134833.J63808@fledge.watson.org> References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <481F4EED.2030300@FreeBSD.org> <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> <481F6990.9010007@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Carl Shapiro Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2008 13:08:36 -0000 On Mon, 5 May 2008, Julian Elischer wrote: > basically if you rely only on the standard posix interfaces and don't do > anything exotic then you will "probably" be safe. > > the really safe way of course it to make a 6.0 chroot on your machine and > compile your app there. For "raw" UNIX applications, this rule of thumb works well, but not for applications that depend on third-party libraries, languages, or daemons. For example, Java binaries built against 6.0 using packages shipped with 6.0 can't run on 6.1 due to incompatible changes in third-party libraries it depends on. While we try to be pretty careful with the base system, we have no control over third party applications, and as far as I know, we perform no testing (nor even have policies) for addressing that sort of incompatibility. The safety of depending on those third-party libraries pretty much corresponds to the carefulness of the thirdy-party library authors and their attention to those same sorts of details. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Sat May 10 18:17:38 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01235106564A for ; Sat, 10 May 2008 18:17:38 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from viefep16-int.chello.at (viefep18-int.chello.at [213.46.255.22]) by mx1.freebsd.org (Postfix) with ESMTP id 44CEE8FC18 for ; Sat, 10 May 2008 18:17:36 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from [86.101.217.227] by viefep32-int.chello.at (InterMail vM.7.08.02.02 201-2186-121-104-20070414) with ESMTP id <20080510180108.BXJH21794.viefep32-int.chello.at@[86.101.217.227]> for ; Sat, 10 May 2008 20:01:08 +0200 Message-ID: <4825E2E2.2030605@FreeBSD.org> Date: Sat, 10 May 2008 20:01:06 +0200 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: hackers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: My SoC2008 project: Porting BSD-licensed Text-Processing Tools from OpenBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2008 18:17:38 -0000 Hello, I've been actively working on FreeBSD as a ports and doc committer since December 2006 and has participated 2 times in the Summer of Code program, but my current project is from a different area thus I would like to summarize my goals and introduce myself for those who don't know me yet. I'm a Hungarian student of 20 years studying Computer Engineering at the Technical University of Budapest. So far I've been involved with the Ports Collection and with my two last SoC project I've written some enhancements for the Ports Collection infrastructure. I've been also working on the documentation set. I've started the Hungarian Documentation Project in which I've translated the webpages and some articles and have coordinated the volunteer efforts of other translators. One of them, pgj@ has translated the Handbook and he is my mentee now. We are reviewing the translation at the moment so we will commit it in the near future. With my current project I want to get some experience in new areas, I intend to deepen my knowledges of C programming and study some POSIX API. My project aims to port the text-processing tools from OpenBSD: grep, sort, diff. You can read my proposal here: http://kovesdan.org/doc/en_US.ISO8859-1/soc2008/soc2008.pdf The current progress can be seen on my wiki page: http://wiki.freebsd.org/G%C3%A1borSoC2008 And the actual changes made by me can be tracked in my Perforce branch: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/soc2008/gabor%5ftextproc&HIDEDEL=NO Comments are welcome! Regards, -- Gabor Kovesdan EMAIL: gabor@FreeBSD.org WWW: http://www.kovesdan.org From owner-freebsd-hackers@FreeBSD.ORG Sat May 10 19:26:53 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7361E106564A for ; Sat, 10 May 2008 19:26:53 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (five.mired.org [66.92.153.75]) by mx1.freebsd.org (Postfix) with ESMTP id ED8B78FC17 for ; Sat, 10 May 2008 19:26:52 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 39337 invoked by uid 1001); 10 May 2008 15:27:19 -0400 Received: from bhuda.mired.org (bhuda [192.168.195.1]) by bhuda (tmda-ofmipd) with ESMTP; Sat, 10 May 2008 15:27:19 -0400 Date: Sat, 10 May 2008 15:27:18 -0400 To: Robert Watson Message-ID: <20080510152718.788d638f@bhuda.mired.org> In-Reply-To: <20080510134833.J63808@fledge.watson.org> References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <481F4EED.2030300@FreeBSD.org> <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> <481F6990.9010007@elischer.org> <20080510134833.J63808@fledge.watson.org> Organization: Meyer Consulting X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Mike Meyer Cc: freebsd-hackers@freebsd.org, Carl Shapiro , Julian Elischer Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2008 19:26:53 -0000 On Sat, 10 May 2008 13:50:48 +0100 (BST) Robert Watson wrote: > On Mon, 5 May 2008, Julian Elischer wrote: > > basically if you rely only on the standard posix interfaces and don't do > > anything exotic then you will "probably" be safe. > For "raw" UNIX applications, this rule of thumb works well, but not for > applications that depend on third-party libraries, languages, or daemons. You can lose the dependency on third party libraries by compiling your application to a static binary. That will also help with the few breakages that occur with the system libraries, and with compatibility across major releases using the backwards compatX packages. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Sat May 10 20:35:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46B94106564A for ; Sat, 10 May 2008 20:35:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 194578FC14 for ; Sat, 10 May 2008 20:35:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 96D4746B45; Sat, 10 May 2008 16:35:30 -0400 (EDT) Date: Sat, 10 May 2008 21:35:30 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Mike Meyer In-Reply-To: <20080510152718.788d638f@bhuda.mired.org> Message-ID: <20080510213323.E35578@fledge.watson.org> References: <4dcb5abd0805050540m292b319aw52aa2cb8ba018e12@mail.gmail.com> <481F0DB3.9070505@FreeBSD.org> <481F48EE.3050806@elischer.org> <481F4EED.2030300@FreeBSD.org> <4dcb5abd0805051132o77d68e36u3f0ad38630a02afd@mail.gmail.com> <481F6990.9010007@elischer.org> <20080510134833.J63808@fledge.watson.org> <20080510152718.788d638f@bhuda.mired.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Carl Shapiro , Julian Elischer Subject: Re: binary compatibility query X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2008 20:35:31 -0000 On Sat, 10 May 2008, Mike Meyer wrote: > On Sat, 10 May 2008 13:50:48 +0100 (BST) > Robert Watson wrote: >> On Mon, 5 May 2008, Julian Elischer wrote: >>> basically if you rely only on the standard posix interfaces and don't do >>> anything exotic then you will "probably" be safe. >> For "raw" UNIX applications, this rule of thumb works well, but not for >> applications that depend on third-party libraries, languages, or daemons. > > You can lose the dependency on third party libraries by compiling your > application to a static binary. That will also help with the few breakages > that occur with the system libraries, and with compatibility across major > releases using the backwards compatX packages. However, if you do that, we'll probably shoot you in the foot by removing kernel support for the thread library you are linking against. Since the removal of KSE, it appears our ABI compatibility promise is at the libc or libpthread layer, and not at the system call layer. We haven't done the necessary compat work to let 6.x binaries using libkse work on an 8.x system yet, but will presumably do that with a backport of libthr to a 6.x userspace (i.e., 6.x library version). On almost all (serious) OS's I'm aware of, static linking for applications is essentially forbidden for that reason -- vendors promise library compatibility, not system call compatibility, and rely on being able to change the implementations of system calls. Robert N M Watson Computer Laboratory University of Cambridge