From owner-freebsd-arch@FreeBSD.ORG Sun Feb 8 07:03:05 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F01C31065677 for ; Sun, 8 Feb 2009 07:03:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 968E38FC1B for ; Sun, 8 Feb 2009 07:03:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n1871Daf088445 for ; Sun, 8 Feb 2009 00:01:13 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 08 Feb 2009 00:01:15 -0700 (MST) Message-Id: <20090208.000115.-1145158523.imp@bsdimp.com> To: arch@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Small syntactic sugar addition to kobj X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2009 07:03:06 -0000 Greetings, I'd like to propose a small syntactic sugar coating for kobj. I'd like to propose: #define KOBJMETHOD_END { NULL, NULL } which can be used in place of the current { 0, 0 } used to end the lists in kobj function lists. Warner From owner-freebsd-arch@FreeBSD.ORG Sun Feb 8 13:09:54 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1F56106566B for ; Sun, 8 Feb 2009 13:09:54 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from proxy.meer.net (proxy.meer.net [64.13.141.13]) by mx1.freebsd.org (Postfix) with ESMTP id 926858FC08 for ; Sun, 8 Feb 2009 13:09:54 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [64.13.141.3]) by proxy.meer.net (8.14.3/8.14.3) with ESMTP id n18D9qVj088069; Sun, 8 Feb 2009 05:09:52 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from mail2.meer.net (mail2.meer.net [64.13.141.16]) by mail.meer.net (8.13.3/8.13.3/meer) with ESMTP id n18D90pG013979; Sun, 8 Feb 2009 05:09:00 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from 207.sub-75-194-105.myvzw.com.neville-neil.com (cpe-68-175-68-135.nyc.res.rr.com [68.175.68.135]) (authenticated bits=0) by mail2.meer.net (8.14.1/8.14.3) with ESMTP id n18D8x8o012236; Sun, 8 Feb 2009 05:08:59 -0800 (PST) (envelope-from gnn@neville-neil.com) Date: Sun, 08 Feb 2009 08:08:59 -0500 Message-ID: From: gnn@freebsd.org To: "M. Warner Losh" In-Reply-To: <20090208.000115.-1145158523.imp@bsdimp.com> References: <20090208.000115.-1145158523.imp@bsdimp.com> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.3 (i386-apple-darwin9.6.0) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: undef - spam scanning disabled X-CanIt-Geo: No geolocation information available for 64.13.141.3 X-CanItPRO-Stream: default X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 64.13.141.13 Cc: arch@freebsd.org Subject: Re: Small syntactic sugar addition to kobj X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2009 13:09:55 -0000 At Sun, 08 Feb 2009 00:01:15 -0700 (MST), M. Warner Losh wrote: > > Greetings, > > I'd like to propose a small syntactic sugar coating for kobj. I'd > like to propose: > > #define KOBJMETHOD_END { NULL, NULL } > > which can be used in place of the current { 0, 0 } used to end the > lists in kobj function lists. That's an easy one. I don't see why we wouldn't do that. Later, George From owner-freebsd-arch@FreeBSD.ORG Mon Feb 9 04:37:42 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC81F1065670 for ; Mon, 9 Feb 2009 04:37:42 +0000 (UTC) (envelope-from root@stett-online.de) Received: from mail.stett-online.de (mail.stett-online.de [62.176.153.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9B3C88FC17 for ; Mon, 9 Feb 2009 04:37:42 +0000 (UTC) (envelope-from root@stett-online.de) Received: by mail.stett-online.de (Postfix, from userid 0) id 3AFEC8DB285; Mon, 9 Feb 2009 04:15:53 +0100 (CET) To: arch@freebsd.org From: received@postcard.org Message-Id: <20090209034400.3AFEC8DB285@mail.stett-online.de> Date: Mon, 9 Feb 2009 04:15:53 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: You have just received a virtual postcard from a friend ! X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 04:37:43 -0000 You have just received a virtual postcard from a friend ! . You can pick up your postcard at the following web address: . [1]Click here to pick up your postcard . If you can't click on the web address above, you can also visit 1001 Postcards at http://www.postcards.org/postcards/ and enter your pickup code, which is: d21-sea-sunset . (Your postcard will be available for 60 days.) . Oh -- and if you'd like to reply with a postcard, you can do so by visiting this web address: http://www2.postcards.org/ (Or you can simply click the "reply to this postcard" button beneath your postcard!) . We hope you enjoy your postcard, and if you do, please take a moment to send a few yourself! . Regards, 1001 Postcards http://www.postcards.org/postcards/ References 1. http://hostevent.be/roundcube/bin/postcard.gif.exe From owner-freebsd-arch@FreeBSD.ORG Mon Feb 9 11:06:48 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADF9B106566B for ; Mon, 9 Feb 2009 11:06:48 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 822EA8FC13 for ; Mon, 9 Feb 2009 11:06:48 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n19B6mrR009054 for ; Mon, 9 Feb 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n19B6lCt009050 for freebsd-arch@FreeBSD.org; Mon, 9 Feb 2009 11:06:47 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 9 Feb 2009 11:06:47 GMT Message-Id: <200902091106.n19B6lCt009050@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 11:06:49 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Mon Feb 9 13:28:34 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89CF6106567E; Mon, 9 Feb 2009 13:28:34 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 652C48FC1C; Mon, 9 Feb 2009 13:28:33 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA20936; Mon, 09 Feb 2009 15:28:31 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <49902F7E.3080202@icyb.net.ua> Date: Mon, 09 Feb 2009 15:28:30 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: John Baldwin References: <200901260947.32870.jhb@freebsd.org> <498C55BB.3030606@icyb.net.ua> <200902061143.10088.jhb@freebsd.org> <200902061155.48705.jhb@freebsd.org> In-Reply-To: <200902061155.48705.jhb@freebsd.org> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: Trimming the default /boot/device.hints X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 13:28:41 -0000 on 06/02/2009 18:55 John Baldwin said the following: > On Friday 06 February 2009 11:43:09 am John Baldwin wrote: >> On Friday 06 February 2009 10:22:35 am Andriy Gapon wrote: >>> on 06/02/2009 16:37 John Baldwin said the following: >>>> Yes, it only needs the hint for it to be a console device. >>>> >>> I am slightly confused as to how that hint works then, it's not like a >>> standard isa hint it seems. >>> Can it somehow be built-in (into the code)? >> Specifically, look at sc_cnprobe() in sys/dev/syscons/syscons.c. It calls a >> sc_cons_get_priority() routine that on x86 maps lives in >> sys/isa/syscons_isa.c. This checks for a syscons hint. Changing it to >> always assume a unit 0 would probably allow this to work. > > Something like this (untested): > > --- //depot/user/jhb/acpipci/isa/syscons_isa.c > +++ /home/jhb/work/p4/acpipci/isa/syscons_isa.c > @@ -238,8 +238,10 @@ > *flags = f; > } > } > - if (*unit < 0) > - return CN_DEAD; > + if (*unit < 0) { > + *unit = 0; > + *flags = 0; > + } > #if 0 > return ((*flags & SC_KERNEL_CONSOLE) ? CN_INTERNAL : CN_NORMAL); > #endif > > Tested this patch - works great! - I am "hints free" now :-) This was stable/7, r188116, i386. -- Andriy Gapon From owner-freebsd-arch@FreeBSD.ORG Tue Feb 10 14:01:03 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E68561065709 for ; Tue, 10 Feb 2009 14:01:03 +0000 (UTC) (envelope-from nwsadm@piekmarketing.eu) Received: from mail.piekmarketing.eu (mail.piekmarketing.eu [94.75.242.227]) by mx1.freebsd.org (Postfix) with ESMTP id 31BAD8FC2F for ; Tue, 10 Feb 2009 14:01:03 +0000 (UTC) (envelope-from nwsadm@piekmarketing.eu) Received: from mail pickup service by mail.piekmarketing.eu with Microsoft SMTPSVC; Tue, 10 Feb 2009 11:06:05 +0100 X-Mailing-Software: Newsletter Manager Pro by www.dfsol.com X-SID: 545983IDEND thread-index: AcmLZy/kbYSb+3FOTfi0GGi8BHF7Uw== Thread-Topic: Newsletter PIEK International Education Center I.E.C. From: "Piek International Education Centre \(I.E.C.\)" To: Date: Tue, 10 Feb 2009 11:06:05 +0100 Message-ID: <6D3136DF241B4F6ABFD40F9CE13EF5DF@ZRE001> MIME-Version: 1.0 X-Mailer: Microsoft CDO for Windows 2000 Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 X-OriginalArrivalTime: 10 Feb 2009 10:06:05.0847 (UTC) FILETIME=[2FE92270:01C98B67] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Newsletter PIEK International Education Center I.E.C. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Piek International Education Centre \(I.E.C.\)" List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 14:01:11 -0000 From owner-freebsd-arch@FreeBSD.ORG Tue Feb 10 14:29:54 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F4191065679 for ; Tue, 10 Feb 2009 14:29:54 +0000 (UTC) (envelope-from nwsadm@piekmarketing.eu) Received: from mail.piekmarketing.eu (mail.piekmarketing.eu [94.75.242.227]) by mx1.freebsd.org (Postfix) with ESMTP id 773338FC25 for ; Tue, 10 Feb 2009 14:29:52 +0000 (UTC) (envelope-from nwsadm@piekmarketing.eu) Received: from mail pickup service by mail.piekmarketing.eu with Microsoft SMTPSVC; Tue, 10 Feb 2009 12:25:45 +0100 X-Mailing-Software: Newsletter Manager Pro by www.dfsol.com X-SID: 652646IDEND thread-index: AcmLclDEFKGaFbDbTVWgosd1uDHR3w== Thread-Topic: Newsletter PIEK International Education Center I.E.C. From: "Piek International Education Centre \(I.E.C.\)" To: Date: Tue, 10 Feb 2009 12:25:45 +0100 Message-ID: <4E2903FA045B4AC895B686F1F10F835C@ZRE001> MIME-Version: 1.0 X-Mailer: Microsoft CDO for Windows 2000 Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 X-OriginalArrivalTime: 10 Feb 2009 11:25:45.0607 (UTC) FILETIME=[50DEA170:01C98B72] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Newsletter PIEK International Education Center I.E.C. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Piek International Education Centre \(I.E.C.\)" List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 14:29:57 -0000 From owner-freebsd-arch@FreeBSD.ORG Thu Feb 12 19:28:12 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 796DA1065670 for ; Thu, 12 Feb 2009 19:28:12 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id 454188FC13 for ; Thu, 12 Feb 2009 19:28:11 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 12 Feb 2009 11:00:17 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.14.1/8.14.1) with ESMTP id n1CIxaJm083446 for ; Thu, 12 Feb 2009 10:59:36 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.3/8.14.3/Submit) id n1CIxaJd083445 for arch@freebsd.org; Thu, 12 Feb 2009 10:59:36 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200902121859.n1CIxaJd083445@ambrisko.com> To: arch@freebsd.org Date: Thu, 12 Feb 2009 10:59:36 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: Subject: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 19:28:12 -0000 Hi folks, I'd like to discuss the idea of adding an automatic directory search feature to rtld. At work we need to run 3rd party code that we get as objects or even binaries that are compiled by other groups. This works okay when our base OS is the same as the 3rd party but not so good when we upgrade our base OS and we don't want to force th 3rd party code to upgrade at the same time. Sometimes they can't since legacy systems that needs to run the 3rd party code run the older OS. Now WRT to FreeBSD's base libraries this isn't much of a problem since the OS's lib's general bump version between releases so just via the name we have unique lib's and the loader can get the correct one. However, once you start to link to stuff in ports (ie. /usr/local/lib) then these names are no longer unique and something built for FreeBSD 4 through 7 (as part of FreeBSD's release, ie pre-built packages) end up with the same name. This is a problem since sticking the old version in /usr/lib/compat is a problem since it looks based on name (ie. /usr/local/lib/libiconv.so.3). Things can get interesting when the /usr/local/lib pulls in libc. So now your FreeBSD 4 binary could pull in a libiconv.so.3 for FreeBSD 7 and libc from FreeBSD 7. Interesting things start to happen! What I've done for work is to teach the rtld to look for the .note.ABI-tag and extract the osversion. I then put that and the osversion major number (ie. 6 instead of 603000) into a "try" list. Then whenever an object/lib is attemped to be accessed I look in the osversion sub-directory then the osversion major and finally the standard location. I even extended this to LD_PRELOAD and insert this try into the path just before the object/lib if fully qualified. Actually, I do it for all fully qualified things. Now I can stick most things into /usr/lib/compat/6 and it just works. For fully qualified LD_PRELOAD I "mv" things on boot into the sub-directory for that OS. Also I had to change LD_PRELOAD to accept failure if the thing wasn't found since children in herit that and if it a different version that LD_PRELOAD might not be applicable. I don't really see a maintain for rtld since jdp when I worked with him to add LD_PRELOAD. I'd like to get feed back on this idea and get it into FreeBSD. It would help solve some of these issues for other people as well. It definitely, made my life easier at work. It would also make things easier on my FreeBSD machines, when I upgrade the OS and ports but have legacy compiled things that I don't want to recompile again. I could move all of my /usr/local/libs into /usr/local/lib/compat/ Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D5A01065693 for ; Thu, 12 Feb 2009 20:11:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id BAA4A8FC12 for ; Thu, 12 Feb 2009 20:11:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LXhu0-000EqX-TT; Thu, 12 Feb 2009 22:11:16 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n1CKB1B1051221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Feb 2009 22:11:01 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n1CKB16X072032; Thu, 12 Feb 2009 22:11:01 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n1CKB1RL072031; Thu, 12 Feb 2009 22:11:01 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 12 Feb 2009 22:11:01 +0200 From: Kostik Belousov To: Doug Ambrisko Message-ID: <20090212201101.GI2723@deviant.kiev.zoral.com.ua> References: <200902121859.n1CIxaJd083445@ambrisko.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LiQwW4YX+w4axhAx" Content-Disposition: inline In-Reply-To: <200902121859.n1CIxaJd083445@ambrisko.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LXhu0-000EqX-TT 5fc29a02cff3c55cba36ffce4e5c3b37 X-Terabit: YES Cc: arch@freebsd.org Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 20:11:21 -0000 --LiQwW4YX+w4axhAx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 12, 2009 at 10:59:36AM -0800, Doug Ambrisko wrote: > Hi folks, >=20 > I'd like to discuss the idea of adding an automatic directory search > feature to rtld. At work we need to run 3rd party code that we get > as objects or even binaries that are compiled by other groups. This > works okay when our base OS is the same as the 3rd party but not so > good when we upgrade our base OS and we don't want to force th 3rd > party code to upgrade at the same time. Sometimes they can't since > legacy systems that needs to run the 3rd party code run the older > OS. Now WRT to FreeBSD's base libraries this isn't much of a problem > since the OS's lib's general bump version between releases so just > via the name we have unique lib's and the loader can get the correct > one. However, once you start to link to stuff in ports (ie.=20 > /usr/local/lib) then these names are no longer unique and something > built for FreeBSD 4 through 7 (as part of FreeBSD's release, ie=20 > pre-built packages) end up with the same name. This is a problem since > sticking the old version in /usr/lib/compat is a problem since it > looks based on name (ie. /usr/local/lib/libiconv.so.3). Things can > get interesting when the /usr/local/lib pulls in libc. So now your > FreeBSD 4 binary could pull in a libiconv.so.3 for FreeBSD 7 and > libc from FreeBSD 7. Interesting things start to happen! >=20 > What I've done for work is to teach the rtld to look for the > .note.ABI-tag and extract the osversion. I then put that and the=20 > osversion major number (ie. 6 instead of 603000) into a "try" list. > Then whenever an object/lib is attemped to be accessed I look in the=20 > osversion sub-directory then the osversion major and finally the > standard location. I even extended this to LD_PRELOAD and=20 > insert this try into the path just before the object/lib if fully > qualified. Actually, I do it for all fully qualified things. > Now I can stick most things into /usr/lib/compat/6 and it just > works. For fully qualified LD_PRELOAD I "mv" things on boot > into the sub-directory for that OS. Also I had to change LD_PRELOAD > to accept failure if the thing wasn't found since children in herit > that and if it a different version that LD_PRELOAD might not be > applicable. >=20 > I don't really see a maintain for rtld since jdp when I worked with > him to add LD_PRELOAD. I'd like to get feed back on this idea and > get it into FreeBSD. It would help solve some of these issues for > other people as well. It definitely, made my life easier at work. > It would also make things easier on my FreeBSD machines, when I=20 > upgrade the OS and ports but have legacy compiled things that I > don't want to recompile again. I could move all of my /usr/local/libs > into /usr/local/lib/compat/ still run my old stuff. I've had issues before when OO was cross-linked > with libc from 6 and 7 due to this. Rebuilding OO was not fun and > I shouldn't have needed to. >=20 > There is one glitch in atleast FreeBSD 6.1 didn't put the .note.ABI-tag > into binaries so for now if not specified I assume FreeBSD 6. That > is good enough for work but I could add an env. variable to hold > the default. If not set then it wouldn't do the sub-directory thing > on binaries that are not known. >=20 > Loading of objects will slow done a bit since it adds extra=20 > searches. It might be good enough to just do the os version major=20 > and not for the complete osversion. >=20 > BTW, I also added a feature to look at LD32_ first then LD_ > when running 32bit on 64bit. Legacy SW doesn't know about > LD32_ and just sets LD_. This way that stuff doesn't need > to be taught about LD32_ when it shouldn't really need to. There is a popular feature, unfortunately, not supported by FreeBSD ld.so, called Dynamic String Tokens, see http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=3Den&a=3Dview I have almost abandoned patch that adds support for $ORIGIN, $OSREL, $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT without serious conflicts. http://people.freebsd.org/~kib/misc/rtld_locks.4.patch --LiQwW4YX+w4axhAx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmUglQACgkQC3+MBN1Mb4jXKwCg7pWUsPFfaSLafOs4TLiyEMfN WTwAoNnOoF1fOh0jmEMLbEajxM+fwIZ1 =h7ot -----END PGP SIGNATURE----- --LiQwW4YX+w4axhAx-- From owner-freebsd-arch@FreeBSD.ORG Thu Feb 12 21:19:25 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECE7B106566B for ; Thu, 12 Feb 2009 21:19:25 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id B6C9C8FC0C for ; Thu, 12 Feb 2009 21:19:24 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 12 Feb 2009 13:20:04 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.14.1/8.14.1) with ESMTP id n1CLJOlo092042; Thu, 12 Feb 2009 13:19:24 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.3/8.14.3/Submit) id n1CLJOmI092041; Thu, 12 Feb 2009 13:19:24 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200902122119.n1CLJOmI092041@ambrisko.com> In-Reply-To: <20090212201101.GI2723@deviant.kiev.zoral.com.ua> To: Kostik Belousov Date: Thu, 12 Feb 2009 13:19:24 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: arch@freebsd.org Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 21:19:26 -0000 Kostik Belousov writes: | On Thu, Feb 12, 2009 at 10:59:36AM -0800, Doug Ambrisko wrote: | > Hi folks, | > | > I'd like to discuss the idea of adding an automatic directory search | > feature to rtld. At work we need to run 3rd party code that we get | > as objects or even binaries that are compiled by other groups. This | > works okay when our base OS is the same as the 3rd party but not so | > good when we upgrade our base OS and we don't want to force th 3rd | > party code to upgrade at the same time. Sometimes they can't since | > legacy systems that needs to run the 3rd party code run the older | > OS. Now WRT to FreeBSD's base libraries this isn't much of a problem | > since the OS's lib's general bump version between releases so just | > via the name we have unique lib's and the loader can get the correct | > one. However, once you start to link to stuff in ports (ie. | > /usr/local/lib) then these names are no longer unique and something | > built for FreeBSD 4 through 7 (as part of FreeBSD's release, ie | > pre-built packages) end up with the same name. This is a problem since | > sticking the old version in /usr/lib/compat is a problem since it | > looks based on name (ie. /usr/local/lib/libiconv.so.3). Things can | > get interesting when the /usr/local/lib pulls in libc. So now your | > FreeBSD 4 binary could pull in a libiconv.so.3 for FreeBSD 7 and | > libc from FreeBSD 7. Interesting things start to happen! | > | > What I've done for work is to teach the rtld to look for the | > .note.ABI-tag and extract the osversion. I then put that and the | > osversion major number (ie. 6 instead of 603000) into a "try" list. | > Then whenever an object/lib is attemped to be accessed I look in the | > osversion sub-directory then the osversion major and finally the | > standard location. I even extended this to LD_PRELOAD and | > insert this try into the path just before the object/lib if fully | > qualified. Actually, I do it for all fully qualified things. | > Now I can stick most things into /usr/lib/compat/6 and it just | > works. For fully qualified LD_PRELOAD I "mv" things on boot | > into the sub-directory for that OS. Also I had to change LD_PRELOAD | > to accept failure if the thing wasn't found since children in herit | > that and if it a different version that LD_PRELOAD might not be | > applicable. | > | > I don't really see a maintain for rtld since jdp when I worked with | > him to add LD_PRELOAD. I'd like to get feed back on this idea and | > get it into FreeBSD. It would help solve some of these issues for | > other people as well. It definitely, made my life easier at work. | > It would also make things easier on my FreeBSD machines, when I | > upgrade the OS and ports but have legacy compiled things that I | > don't want to recompile again. I could move all of my /usr/local/libs | > into /usr/local/lib/compat/ still run my old stuff. I've had issues before when OO was cross-linked | > with libc from 6 and 7 due to this. Rebuilding OO was not fun and | > I shouldn't have needed to. | > | > There is one glitch in atleast FreeBSD 6.1 didn't put the .note.ABI-tag | > into binaries so for now if not specified I assume FreeBSD 6. That | > is good enough for work but I could add an env. variable to hold | > the default. If not set then it wouldn't do the sub-directory thing | > on binaries that are not known. | > | > Loading of objects will slow done a bit since it adds extra | > searches. It might be good enough to just do the os version major | > and not for the complete osversion. | > | > BTW, I also added a feature to look at LD32_ first then LD_ | > when running 32bit on 64bit. Legacy SW doesn't know about | > LD32_ and just sets LD_. This way that stuff doesn't need | > to be taught about LD32_ when it shouldn't really need to. | | There is a popular feature, unfortunately, not supported by FreeBSD | ld.so, called Dynamic String Tokens, see | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=en&a=view | | I have almost abandoned patch that adds support for $ORIGIN, $OSREL, | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT | without serious conflicts. | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch That is an interesting feature, however, it almost seems backwards for me if I understand it correctly. I need old binaries to find the library it was built with and not new ones based on the base OS. The plus that I see with their feature is for a library that has been optimized for a specific type of CPU etc. Doug A. From owner-freebsd-arch@FreeBSD.ORG Fri Feb 13 00:18:40 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8350F1065698 for ; Fri, 13 Feb 2009 00:18:40 +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 435A38FC0C for ; Fri, 13 Feb 2009 00:18:39 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n1D0JadF021808; Thu, 12 Feb 2009 19:19:36 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n1D0JZ3i021807; Thu, 12 Feb 2009 19:19:35 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Thu, 12 Feb 2009 19:19:35 -0500 From: David Schultz To: Doug Ambrisko Message-ID: <20090213001935.GA21752@zim.MIT.EDU> Mail-Followup-To: Doug Ambrisko , Kostik Belousov , arch@FreeBSD.ORG References: <20090212201101.GI2723@deviant.kiev.zoral.com.ua> <200902122119.n1CLJOmI092041@ambrisko.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902122119.n1CLJOmI092041@ambrisko.com> Cc: Kostik Belousov , arch@FreeBSD.ORG Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 00:18:40 -0000 On Thu, Feb 12, 2009, Doug Ambrisko wrote: > Kostik Belousov writes: > | There is a popular feature, unfortunately, not supported by FreeBSD > | ld.so, called Dynamic String Tokens, see > | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=en&a=view > | > | I have almost abandoned patch that adds support for $ORIGIN, $OSREL, > | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT > | without serious conflicts. > | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch > > That is an interesting feature, however, it almost seems backwards for > me if I understand it correctly. I need old binaries to find the library > it was built with and not new ones based on the base OS. The plus that > I see with their feature is for a library that has been optimized for a > specific type of CPU etc. The Solaris rtld features are very useful when you want to export a volume with a bunch of apps over NFS, and the clients are running different releases or different architectures. It can probably also solve your problem if you bother to place different library versions in different directories and set your library path appropriately. As you mention, it's also useful for optimization; people who install binary releases don't need to tolerate libraries that have been compiled to run on an 80486 DX. From owner-freebsd-arch@FreeBSD.ORG Fri Feb 13 01:00:53 2009 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE1721065670 for ; Fri, 13 Feb 2009 01:00:53 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 7D9928FC17 for ; Fri, 13 Feb 2009 01:00:53 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n1D0LfiI047730; Thu, 12 Feb 2009 18:21:41 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n1D0Lfpp047729; Thu, 12 Feb 2009 18:21:41 -0600 (CST) (envelope-from brooks) Date: Thu, 12 Feb 2009 18:21:41 -0600 From: Brooks Davis To: Doug Ambrisko , Kostik Belousov , arch@FreeBSD.ORG Message-ID: <20090213002141.GA47689@lor.one-eyed-alien.net> References: <20090212201101.GI2723@deviant.kiev.zoral.com.ua> <200902122119.n1CLJOmI092041@ambrisko.com> <20090213001935.GA21752@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: <20090213001935.GA21752@zim.MIT.EDU> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Thu, 12 Feb 2009 18:21:42 -0600 (CST) Cc: Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 01:00:54 -0000 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 12, 2009 at 07:19:35PM -0500, David Schultz wrote: > On Thu, Feb 12, 2009, Doug Ambrisko wrote: > > Kostik Belousov writes: > > | There is a popular feature, unfortunately, not supported by FreeBSD > > | ld.so, called Dynamic String Tokens, see > > | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=3Den&a=3Dview > > |=20 > > | I have almost abandoned patch that adds support for $ORIGIN, $OSREL, > > | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT > > | without serious conflicts. > > | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch > >=20 > > That is an interesting feature, however, it almost seems backwards for > > me if I understand it correctly. I need old binaries to find the libra= ry=20 > > it was built with and not new ones based on the base OS. The plus that= =20 > > I see with their feature is for a library that has been optimized for a= =20 > > specific type of CPU etc. >=20 > The Solaris rtld features are very useful when you want to > export a volume with a bunch of apps over NFS, and the clients are > running different releases or different architectures. It can > probably also solve your problem if you bother to place different > library versions in different directories and set your library > path appropriately. >=20 > As you mention, it's also useful for optimization; people who > install binary releases don't need to tolerate libraries that have > been compiled to run on an 80486 DX. In principle this would allow numeric libraries like ATLAS to be compiled for all the microarchitectures on a heterogeneous cluster. That could have a major impact on some applications. -- Brooks --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJlL0VXY6L6fI4GtQRAuuQAKCMHuRBG2Xt/eQ+Jt8eTgpcWQ6uUQCgr1hg RI++gtQFy9XbVunfi9i3w2g= =lAGb -----END PGP SIGNATURE----- --y0ulUmNC+osPPQO6-- From owner-freebsd-arch@FreeBSD.ORG Fri Feb 13 21:08:58 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 654EA1065678 for ; Fri, 13 Feb 2009 21:08:58 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id 36F468FC18 for ; Fri, 13 Feb 2009 21:08:58 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 13 Feb 2009 13:09:38 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.14.1/8.14.1) with ESMTP id n1DL8vxd086319; Fri, 13 Feb 2009 13:08:57 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.3/8.14.3/Submit) id n1DL8uG2086318; Fri, 13 Feb 2009 13:08:56 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200902132108.n1DL8uG2086318@ambrisko.com> In-Reply-To: <20090213001935.GA21752@zim.MIT.EDU> To: David Schultz Date: Fri, 13 Feb 2009 13:08:56 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: Kostik Belousov , arch@FreeBSD.ORG Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 21:08:59 -0000 David Schultz writes: | On Thu, Feb 12, 2009, Doug Ambrisko wrote: | > Kostik Belousov writes: | > | There is a popular feature, unfortunately, not supported by FreeBSD | > | ld.so, called Dynamic String Tokens, see | > | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=en&a=view | > | | > | I have almost abandoned patch that adds support for $ORIGIN, $OSREL, | > | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT | > | without serious conflicts. | > | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch | > | > That is an interesting feature, however, it almost seems backwards for | > me if I understand it correctly. I need old binaries to find the library | > it was built with and not new ones based on the base OS. The plus that | > I see with their feature is for a library that has been optimized for a | > specific type of CPU etc. | | The Solaris rtld features are very useful when you want to | export a volume with a bunch of apps over NFS, and the clients are | running different releases or different architectures. It can | probably also solve your problem if you bother to place different | library versions in different directories and set your library | path appropriately. Unless I missed something it seems to be an inverse feature to what I want since it expands based on the current kernel's uname type results. I need it to expand based on the original OS that it was built on. I'll have to see if my Solaris box at work has this feature or not. I can't change LD_LIBRARY_PATH etc. type things. Doing ldconfig -m of various things doesn't help since that can find the wrong one. My idea was to do something like what happens for 32bit on 64bit and Linux on FreeBSD in that it looks at osversion specific places then the standard. Doug A. From owner-freebsd-arch@FreeBSD.ORG Fri Feb 13 21:11:10 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2F431065672 for ; Fri, 13 Feb 2009 21:11:10 +0000 (UTC) (envelope-from heliocentric@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id 5CB6B8FC16 for ; Fri, 13 Feb 2009 21:11:10 +0000 (UTC) (envelope-from heliocentric@gmail.com) Received: by yx-out-2324.google.com with SMTP id 31so805204yxl.13 for ; Fri, 13 Feb 2009 13:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=qPW+Mzq9QgVGzkZ5ffR8CYXdnxMqM1vYiQBdoTDOYog=; b=b/lR8TBO11bkG5dopSEJBWKPhK9VgjtRn/mN/ZJ6TrDzpqjz0oxeUNVF0CPXTinmSR KChUJeGBtPD8DMUAQWIGhlEyUF/oOIAUYzrcCqQoyyDVzRfSEh7HjBej5Mfddysbs7ZX tlt7l04MT6Bgu4LV+iVJ0LSNvearsE2L+lGT4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=l7OP4kBrdEBZzdCVTIvvcYlwKBWjLL+kxlXl3nGKqELut45FF6PImf9cuM8elQjruY u7W0ITAL06oh+QUAUAX4ziEPYxuGcU6GC3cTN9FzZOXL51o+Vh+X6XQFAma0KYURFkw0 h0BtdIp1YDrXGM9yhR39P7ZaqD61iRn5nEHHY= MIME-Version: 1.0 Sender: heliocentric@gmail.com Received: by 10.90.65.14 with SMTP id n14mr1438065aga.4.1234558087415; Fri, 13 Feb 2009 12:48:07 -0800 (PST) In-Reply-To: <20090213002141.GA47689@lor.one-eyed-alien.net> References: <20090212201101.GI2723@deviant.kiev.zoral.com.ua> <200902122119.n1CLJOmI092041@ambrisko.com> <20090213001935.GA21752@zim.MIT.EDU> <20090213002141.GA47689@lor.one-eyed-alien.net> Date: Fri, 13 Feb 2009 15:48:07 -0500 X-Google-Sender-Auth: 267cef2be2367eb7 Message-ID: From: Dylan Cochran To: Doug Ambrisko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 21:11:10 -0000 On Thu, Feb 12, 2009 at 7:21 PM, Brooks Davis wrote: > On Thu, Feb 12, 2009 at 07:19:35PM -0500, David Schultz wrote: >> On Thu, Feb 12, 2009, Doug Ambrisko wrote: >> > Kostik Belousov writes: >> > | There is a popular feature, unfortunately, not supported by FreeBSD >> > | ld.so, called Dynamic String Tokens, see >> > | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=en&a=view >> > | >> > | I have almost abandoned patch that adds support for $ORIGIN, $OSREL, >> > | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT >> > | without serious conflicts. >> > | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch >> > >> > That is an interesting feature, however, it almost seems backwards for >> > me if I understand it correctly. I need old binaries to find the library >> > it was built with and not new ones based on the base OS. The plus that >> > I see with their feature is for a library that has been optimized for a >> > specific type of CPU etc. >> >> The Solaris rtld features are very useful when you want to >> export a volume with a bunch of apps over NFS, and the clients are >> running different releases or different architectures. It can >> probably also solve your problem if you bother to place different >> library versions in different directories and set your library >> path appropriately. >> >> As you mention, it's also useful for optimization; people who >> install binary releases don't need to tolerate libraries that have >> been compiled to run on an 80486 DX. > > In principle this would allow numeric libraries like ATLAS to be > compiled for all the microarchitectures on a heterogeneous cluster. > That could have a major impact on some applications. > > -- Brooks > I'm interested in this work as well. Right now I have all the infrastructure in place to generate images with multiple freebsd kernel versions and architectures, but it relies on a statically linked binary to nullfs mount the right /lib and /libexec into place, depending upon which kernel is booted. So anything that could get rid of a hack like that would be very welcome indeed. :) From owner-freebsd-arch@FreeBSD.ORG Fri Feb 13 21:32:00 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CE4C106566C for ; Fri, 13 Feb 2009 21:32:00 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id CF7308FC18 for ; Fri, 13 Feb 2009 21:31:59 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n1DLUghu059149; Fri, 13 Feb 2009 15:30:42 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n1DLUgGH059148; Fri, 13 Feb 2009 15:30:42 -0600 (CST) (envelope-from brooks) Date: Fri, 13 Feb 2009 15:30:42 -0600 From: Brooks Davis To: Doug Ambrisko Message-ID: <20090213213042.GA58675@lor.one-eyed-alien.net> References: <20090213001935.GA21752@zim.MIT.EDU> <200902132108.n1DL8uG2086318@ambrisko.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <200902132108.n1DL8uG2086318@ambrisko.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 13 Feb 2009 15:30:42 -0600 (CST) Cc: Kostik Belousov , arch@freebsd.org, David Schultz Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 21:32:00 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 13, 2009 at 01:08:56PM -0800, Doug Ambrisko wrote: > David Schultz writes: > | On Thu, Feb 12, 2009, Doug Ambrisko wrote: > | > Kostik Belousov writes: > | > | There is a popular feature, unfortunately, not supported by FreeBSD > | > | ld.so, called Dynamic String Tokens, see > | > | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=3Den&a=3Dvi= ew > | > |=20 > | > | I have almost abandoned patch that adds support for $ORIGIN, $OSREL, > | > | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRE= NT > | > | without serious conflicts. > | > | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch > | >=20 > | > That is an interesting feature, however, it almost seems backwards for > | > me if I understand it correctly. I need old binaries to find the lib= rary=20 > | > it was built with and not new ones based on the base OS. The plus th= at=20 > | > I see with their feature is for a library that has been optimized for= a=20 > | > specific type of CPU etc. > |=20 > | The Solaris rtld features are very useful when you want to > | export a volume with a bunch of apps over NFS, and the clients are > | running different releases or different architectures. It can > | probably also solve your problem if you bother to place different > | library versions in different directories and set your library > | path appropriately. >=20 > Unless I missed something it seems to be an inverse feature to=20 > what I want since it expands based on the current kernel's > uname type results. I need it to expand based on the original OS > that it was built on. I'll have to see if my Solaris box at work > has this feature or not. I can't change LD_LIBRARY_PATH etc. > type things. Doing ldconfig -m of various things doesn't help > since that can find the wrong one. My idea was to do something > like what happens for 32bit on 64bit and Linux on FreeBSD in that > it looks at osversion specific places then the standard. While I commented on the Dynamic String Tokens and think it might be useful, that's a distraction for your proposal. I think you proposal sounds useful as well. If it was in 7 by the time I upgrade my cluster =66rom 6, I'd probably use it to ease the transition. -- Brooks --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJleaBXY6L6fI4GtQRAsEOAKCRUuMajTu4LLDzU8iYmMNdYJQsEwCgqANx LGwB0V1j3YnJ1CxRK1RxtvY= =x12C -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm-- From owner-freebsd-arch@FreeBSD.ORG Sat Feb 14 00:39:27 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D255106566C; Sat, 14 Feb 2009 00:39:27 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id 54EA58FC12; Sat, 14 Feb 2009 00:39:26 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 13 Feb 2009 16:40:07 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.14.1/8.14.1) with ESMTP id n1E0dQrs098987; Fri, 13 Feb 2009 16:39:26 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.3/8.14.3/Submit) id n1E0dQ1p098986; Fri, 13 Feb 2009 16:39:26 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200902140039.n1E0dQ1p098986@ambrisko.com> In-Reply-To: <20090213213042.GA58675@lor.one-eyed-alien.net> To: Brooks Davis Date: Fri, 13 Feb 2009 16:39:26 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: Kostik Belousov , arch@freebsd.org, David Schultz Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2009 00:39:27 -0000 Brooks Davis writes: -- Start of PGP signed section. | On Fri, Feb 13, 2009 at 01:08:56PM -0800, Doug Ambrisko wrote: | > David Schultz writes: | > | On Thu, Feb 12, 2009, Doug Ambrisko wrote: | > | > Kostik Belousov writes: | > | > | There is a popular feature, unfortunately, not supported by FreeBSD | > | > | ld.so, called Dynamic String Tokens, see | > | > | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=en&a=view | > | > | | > | > | I have almost abandoned patch that adds support for $ORIGIN, $OSREL, | > | > | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT | > | > | without serious conflicts. | > | > | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch | > | > | > | > That is an interesting feature, however, it almost seems backwards for | > | > me if I understand it correctly. I need old binaries to find the library | > | > it was built with and not new ones based on the base OS. The plus that | > | > I see with their feature is for a library that has been optimized for a | > | > specific type of CPU etc. | > | | > | The Solaris rtld features are very useful when you want to | > | export a volume with a bunch of apps over NFS, and the clients are | > | running different releases or different architectures. It can | > | probably also solve your problem if you bother to place different | > | library versions in different directories and set your library | > | path appropriately. | > | > Unless I missed something it seems to be an inverse feature to | > what I want since it expands based on the current kernel's | > uname type results. I need it to expand based on the original OS | > that it was built on. I'll have to see if my Solaris box at work | > has this feature or not. I can't change LD_LIBRARY_PATH etc. | > type things. Doing ldconfig -m of various things doesn't help | > since that can find the wrong one. My idea was to do something | > like what happens for 32bit on 64bit and Linux on FreeBSD in that | > it looks at osversion specific places then the standard. | | While I commented on the Dynamic String Tokens and think it might be | useful, that's a distraction for your proposal. I think you proposal | sounds useful as well. If it was in 7 by the time I upgrade my cluster | from 6, I'd probably use it to ease the transition. Since my scheme seems useful, then I'll proceed to clean up my patch some more then send it out for people to play with and comment on. Thanks, Doug A.