From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 00:28:27 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C10D616A420; Sun, 3 Jul 2005 00:28:27 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1339943D90; Sun, 3 Jul 2005 00:17:49 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id AEE4061360; Sat, 2 Jul 2005 17:16:59 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id BC2F45C985; Tue, 4 Jan 2005 01:07:29 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A0B2155AA5; Tue, 4 Jan 2005 09:07:11 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id D620716A4FB; Tue, 4 Jan 2005 09:07:07 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12FDA16A4CE; Tue, 4 Jan 2005 09:07:04 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 394F743D5E; Tue, 4 Jan 2005 09:07:03 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id j0499bV2011934; Tue, 4 Jan 2005 02:09:37 -0700 (MST) (envelope-from scottl@freebsd.org) Message-ID: <41DA5C4D.1060606@freebsd.org> From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040929 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org, "current@freebsd.org" X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: Subject: Call for FreeBSD status reports X-BeenThere: freebsd-hackers@freebsd.org Reply-To: monthly@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:28:28 -0000 X-Original-Date: Tue, 04 Jan 2005 02:05:17 -0700 X-List-Received-Date: Sun, 03 Jul 2005 00:28:28 -0000 All, It's time again for the bi-monthly status reports. The July-Oct 2004 status reports were preempted by the 5.3 release, so this one is open for anything that has happened since June. As always, submissions having to do with FreeBSD development, documentation, organized events, etc, are welcome and highly encouraged. Submissions are due by Jan 15 to monthly@freebsd.org There are also a couple of changes to announce. First is that Tom Rhodes and Max Laier have volunteered to help run the status reports and keep them more timely. Many thanks to Tom and Max for offering to help. Second is that a couple of new attributes have been added to the XML thanks to Max. The first is a project category attribute that will enable us to group the submissions into categories and render the full report with these categories for easier viewing. You can choose to use whatever category tag fits your report best, or omit it entirely and let us take care of it. The category mapping is listed below. Feel free to suggest additional categories. proj - Projects (non-specific) docs - Documentation kern - Kernel arch - Architectures ports - Ports vendor - Vendor / 3rd party software misc - Miscellaneous The second new attribute lets you lists tasks for your project that others can help with. An example is provided in the template under the and tags. The template is available at http://www.freebsd.org/news/status/report-sample.xml. I've just committed the updated version with the new tags, so it might take a few hours for it to reach the website for downloading. Submissions are due on Jan 15. Thanks a lot, and we are looking for a big turn-out. Scott _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 00:29:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0796A16A42D; Sun, 3 Jul 2005 00:29:35 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4896343DFF; Sun, 3 Jul 2005 00:18:12 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 6AEAB613D1; Sat, 2 Jul 2005 17:17:04 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id C1E185C773; Thu, 6 Jan 2005 05:05:40 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 14CD355D43; Thu, 6 Jan 2005 13:05:33 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 8DFE216A501; Thu, 6 Jan 2005 13:05:18 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC78116A4CE; Thu, 6 Jan 2005 13:05:13 +0000 (GMT) Received: from hq.sectorb.msk.ru (petaflop.b.gz.ru [217.67.124.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25C6643D1D; Thu, 6 Jan 2005 13:05:12 +0000 (GMT) (envelope-from chinhngt@sectorb.msk.ru) Received: from it.hackers (it.hackers [172.16.37.1]) by hq.sectorb.msk.ru (Postfix) with ESMTP id ABD4466F2; Thu, 6 Jan 2005 16:05:09 +0300 (MSK) From: Nguyen Tam Chinh X-X-Sender: chinhngt@unix.local To: "Martin P. Hellwig" In-Reply-To: <41DD32C0.40608@xs4all.nl> Message-ID: <20050106155714.X1348@unix.local> References: <20050106115726.52478.qmail@web26608.mail.ukl.yahoo.com> <41DD32C0.40608@xs4all.nl> X-Operating-System: FreeBSD 5.3-STABLE Keywords: 216091683 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, Robert Ryan Subject: Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3 X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:29:36 -0000 X-Original-Date: Thu, 6 Jan 2005 16:05:35 +0300 (MSK) X-List-Received-Date: Sun, 03 Jul 2005 00:29:36 -0000 Please don't treat this seriously. Benchmarks are just benchmarks. But the benchmarks and comparison, widespreaded through sites like slashdot or osnews, sometimes affect the interest and view point of some new and potential users. May be we should do some full benchmarks as an answer and to review the true status of our 5.x, 4.x and others? On Thu, 6 Jan 2005, Martin P. Hellwig wrote: > > >> PS: if I've offended anyone (yeah, I singled a few >> out) >> , prove me wrong, but spare me your insultedness. It's become a pathetic >> hobby in -core. >> >> > Benchmark are made to be put into perspective, although everybody has a right > to say what he wants to say, this doesn't mean that you have to say it. > It seems to me that FreeBSD is focusing it performance onto MP 64bit > processors. As we can see in the benchmark it has in comparison to other > projects a negative impact on UP system. > > But just put it in the perspective of processor developments, AMD (followed > by Intel) is heading towards a multi-core 64 bit systems, what probably > becomes mainstream at the end of next year. > With this technology the FreeBSD model could have winner on there hands. > > Doing the same job but not having the same philosophy on it, is always > inefficient, but in the real world it leads to the Darwin effect. > What means that the best solution gets there chance of survival against the > test of time. > Luckily these are all BSD's, good solution will spread, just take a look at > PF. > OpenBSD has a good user base but not compatible to the sum of user base of > the other BSD's. Still PF has spread there wings beyond the user base of > OpenBSD. > > FreeBSD is just a name for an OS, if any other OS can give me more "bang for > the buck" and provides a full solution, I will use it. > Be it DragonFly/Free/Open/Net, MacOsX, GNU+Linux, Windows or any of the other > hundreds of OS'es out there. > I like the BSD license so I will tend to stick to "gratis" BSD OS'es. > > All of the disagreements in development is a healthy process to make sure the > sort "BSD" an not the specie *BSD will survive. > Sure I have my disappointments about some decision, but hey so is live, this > ain't a fan club for next biggest boy band (he he BSD-Boyz), where using an > OS to provide solution for our technologic problems, you favor your solution > but don't blind yourself. > > And when you don't blind yourself you re-evaluate your situation and move > forward with the best solution for your problem. > Sure it is a pain to migrate my boxes to another OS (well that is the fun > part) and do some massive rewriting of my documentation, but thats my job and > I tend to like it. Just standing still and not progress has its > attractiveness when you had a very rough ride, but it gets dull very soon and > then you find yourself back on the dirty tracks. > > But these are my opinion only, however I like to share them ;-) > > Martin P. Hellwig > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > ----- With best regards, | The Power to Serve Nguyen Tam Chinh | http://www.FreeBSD.org Loc: sp.cs.msu.ru | _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 01:02:24 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1A5416B303; Sun, 3 Jul 2005 01:02:05 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9681A453AE; Sun, 3 Jul 2005 00:52:29 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 06BB35D947; Sat, 2 Jul 2005 17:07:15 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 37D685C838 for ; Tue, 21 Sep 2004 10:21:43 -0700 (PDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 1F35E56925; Tue, 21 Sep 2004 17:20:47 +0000 (GMT) (envelope-from owner-freebsd-arch@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id F3B5C16A534; Tue, 21 Sep 2004 17:20:39 +0000 (GMT) Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE7CD16A4CE; Tue, 21 Sep 2004 17:13:24 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BCDF43D31; Tue, 21 Sep 2004 17:13:24 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8LHFdOe031312; Tue, 21 Sep 2004 10:15:39 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8LHFd0h031311; Tue, 21 Sep 2004 10:15:39 -0700 From: Brooks Davis To: Hajimu UMEMOTO Message-ID: <20040921171539.GA30996@odin.ac.hmc.edu> References: <200409200250.49518.max@love2party.net> <20040921100220.GC842@empiric.icir.org> <20040921161420.GA17290@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-arch@freebsd.org Errors-To: owner-freebsd-arch@freebsd.org X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on elvis.mu.org X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.64 X-Spam-Level: Cc: freebsd-net@FreeBSD.org, freebsd-hackers@FreeBSD.org, freebsd-standards@FreeBSD.org, Max Laier , freebsd-arch@FreeBSD.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:02:24 -0000 X-Original-Date: Tue, 21 Sep 2004 10:15:39 -0700 X-List-Received-Date: Sun, 03 Jul 2005 01:02:24 -0000 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 22, 2004 at 02:09:11AM +0900, Hajimu UMEMOTO wrote: > Hi, >=20 > >>>>> On Tue, 21 Sep 2004 09:14:20 -0700 > >>>>> Brooks Davis said: >=20 > brooks> The real problem may be that KAME mistakenly gave sockaddr_union a > brooks> general name when it isn't and such a type would be hell to actua= lly > brooks> work with. A custom union that does exactly what pf needs may be= the > brooks> best approach. >=20 > I believe KAME doesn't use non standard struct such as sock_union. Oops, you are correct, it's part of fastipsec, not KAME. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBUGG7XY6L6fI4GtQRAmuhAJ9RmMTuSRuAs9YIhRNJ55xq0k1KgwCfY/y3 zqiSVO6mzuxWu2C7MB4GKi8= =lDSM -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 01:04:06 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2C8416B354; Sun, 3 Jul 2005 01:03:26 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 970484557D; Sun, 3 Jul 2005 00:56:33 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 1AB6661D4C; Sat, 2 Jul 2005 17:18:52 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id E864C5C8EF; Tue, 8 Feb 2005 07:22:29 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A9A8B56E18; Tue, 8 Feb 2005 15:22:15 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id DBF9116A4F9; Tue, 8 Feb 2005 15:22:11 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D326016A4CE; Tue, 8 Feb 2005 15:22:06 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4765B43D31; Tue, 8 Feb 2005 15:22:06 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id j18FJ6Ti006911; Tue, 8 Feb 2005 08:19:06 -0700 (MST) (envelope-from imp@bsdimp.com) Message-Id: <20050208.082104.00724757.imp@bsdimp.com> To: aleine@austrosearch.net From: "M. Warner Losh" In-Reply-To: <200502071402.j17E21Jb056209@marlena.vvi.at> References: <200502071402.j17E21Jb056209@marlena.vvi.at> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: freebsd-hackers@freebsd.org, kris@obsecurity.org, k-sasaki@ist.osaka-u.ac.jp, rwatson@freebsd.org, freebsd-current@freebsd.org Subject: Re: Call for comments: CoxR, a CVS/mail-lists/BTS X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:04:06 -0000 X-Original-Date: Tue, 08 Feb 2005 08:21:04 -0700 (MST) X-List-Received-Date: Sun, 03 Jul 2005 01:04:06 -0000 In message: <200502071402.j17E21Jb056209@marlena.vvi.at> "ALeine" writes: : kris@obsecurity.org wrote: : : > Consider not insulting the intelligence of the FreeBSD developers : > if you want them to ever help you again with your kernel newbie : > questions. That kind of trash-talking may be cool in other : > projects, but around here it's not going to win you friends. : : Consider not mischaracterizing, belittling and alienating people for : voicing their opinions. I had no intention of insulting anyone, my : point was exactly the opposite of what you seem to believe - I claim : that if such seasoned, highly intelligent and skilled developers do : not feel comfortable making changes to certain subsystems then that : is an indication that the complexity has gone too far. : : Let me reiterate, I believe the Core team members to be highly : intelligent, skilled and friendly people and I have a lot of : respect for them and their work. I have utmost respect for Mr. : Watson because I believe he better than anyone else embodies : the spirit of the Project, he is always very informative, : thorough, helpful, friendly, polite, willing to share his : vast knowledge and experience and offer his insight, unlike : certain former Security Officers. If I were to reply in kind to your message, it would be something like: Listen you worthless hunk of flesh. I'm not trying to insult you, since I have the utmost respect for the miserable life you no doubt must lead. Nothing could be farther from the intentions I had when I set out ot write this, but you clearly could use a personality transplant. The secret to effective communication is making sure that you communicate the message that you intend to communicate. By saying in one paragraph that you have the utmost respect for people (and by the way misunderstanding how the core team works and its relationship to the project, but I digress), and then insulting them in the next paragraph, you're clearly showing your contempt or disrespect. Please, learn some manners. Warner _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 08:27:57 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3B0016A41C for ; Sun, 3 Jul 2005 08:27:57 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AC7643D48 for ; Sun, 3 Jul 2005 08:27:57 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix4-1.free.fr (Postfix) with ESMTP id 712D9317F31 for ; Sun, 3 Jul 2005 10:27:56 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 67E7F405B; Sun, 3 Jul 2005 10:28:02 +0200 (CEST) Date: Sun, 3 Jul 2005 10:28:02 +0200 From: Jeremie Le Hen To: freebsd-hackers@FreeBSD.org Message-ID: <20050703082802.GF73907@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: Subject: buildworld sequence X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 08:27:57 -0000 Hi hackers, I looking for an explanation of the buildworld sequence : legacy bootstrap tools build tools cross tools ... In fact, I read Makefile.inc1, so I have a basic idea of what each step does, but I don't really understand * what is the legacy step, * why strfile(1), gperf(1) and so on are required to be built before mostly everything else (bootstrap tools) * why utilities in the build-tools target are built before gcc. I didn't asked all the questions I have in mind, but I would be glad if someone could give me the general idea behind this or, even better, point me some documentation. I checked developpers-handbook, there is nothing about it, unfortunately. I was trying to understand this because I need to use a gcc(1) option in CFLAGS for these tools for my integration of the ProPolice patch in the build system. Thank you. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 09:05:37 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1662016A41C for ; Sun, 3 Jul 2005 09:05:37 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from haven.freebsd.dk (haven.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB01B43D49 for ; Sun, 3 Jul 2005 09:05:36 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (unknown [192.168.48.2]) by haven.freebsd.dk (Postfix) with ESMTP id 9BD69BC7F for ; Sun, 3 Jul 2005 09:05:34 +0000 (UTC) To: hackers@freebsd.org From: Poul-Henning Kamp Date: Sun, 03 Jul 2005 11:05:32 +0200 Message-ID: <27361.1120381532@phk.freebsd.dk> Sender: phk@phk.freebsd.dk Cc: Subject: Ancient FreeBSD releases online X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 09:05:37 -0000 ftp://phk.freebsd.dk ./386BSD/cd1.iso ./BSD4.4-LITE/cover.pnm ./BSD4.4-LITE/cd1.iso ./BSD4.4-LITE/cd2.iso ./BSD4.4-LITE/cd3.iso ./FreeBSD-1.0-RELEASE/cover.pnm ./FreeBSD-1.0-RELEASE/cd1.iso ./FreeBSD-1.1-RELEASE/cd1.iso ./FreeBSD-1.1.5.1/cd1.iso ./FreeBSD-2.0-RELEASE/cd1.iso ./FreeBSD-2.0-RELEASE/cover_black.pnm ./FreeBSD-2.0-RELEASE/cover_green.pnm ./FreeBSD-2.0.5-RELEASE/cover.pnm ./FreeBSD-2.0.5-RELEASE/cd1.iso ./FreeBSD-2.0.5-RELEASE/cd2.iso ./FreeBSD-2.1-RELEASE/cd1.iso Still in upload queue: ./FreeBSD-2.1-RELEASE/cd2.iso ./FreeBSD-2.1.5-RELEASE/cd1.iso ./FreeBSD-2.1.5-RELEASE/cd2.iso ./FreeBSD-2.1.6-RELEASE/cd1.iso ./FreeBSD-2.1.6-RELEASE/cd2.iso ./FreeBSD-2.1.7-RELEASE/cd1.iso ./FreeBSD-2.1.7-RELEASE/cd2.iso ./FreeBSD-2.2-960501-SNAP/cd1.iso ./FreeBSD-2.2-960801-SNAP/cd1.iso ./FreeBSD-2.2-961014-SNAP/cd1.iso ./FreeBSD-2.2.1-RELEASE/cd1.iso ./FreeBSD-2.2.1-RELEASE/cd2.iso ./FreeBSD-2.2.2-RELEASE/cd1.iso ./FreeBSD-2.2.2-RELEASE/cd2.iso ./FreeBSD-2.2.5-RELEASE/cd1.iso ./FreeBSD-2.2.5-RELEASE/cd2.iso ./FreeBSD-2.2.5-RELEASE/cd3.iso ./FreeBSD-2.2.5-RELEASE/cd4.iso The server is a Soekris NET4801 and it's primary task is my email, so if this gets abused it'll disappear again. Mirrors welcome. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 09:52:28 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CDFF16A41C for ; Sun, 3 Jul 2005 09:52:28 +0000 (GMT) (envelope-from maxim@FreeBSD.org) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE04543D49 for ; Sun, 3 Jul 2005 09:52:27 +0000 (GMT) (envelope-from maxim@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.13.3/8.13.3) with ESMTP id j639qPKu038206; Sun, 3 Jul 2005 13:52:26 +0400 (MSD) (envelope-from maxim@FreeBSD.org) Date: Sun, 3 Jul 2005 13:52:25 +0400 (MSD) From: Maxim Konovalov To: Poul-Henning Kamp In-Reply-To: <27361.1120381532@phk.freebsd.dk> Message-ID: <20050703135018.D38002@mp2.macomnet.net> References: <27361.1120381532@phk.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: hackers@FreeBSD.org Subject: Re: Ancient FreeBSD releases online X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 09:52:28 -0000 On Sun, 3 Jul 2005, 11:05+0200, Poul-Henning Kamp wrote: > > ftp://phk.freebsd.dk > > ./386BSD/cd1.iso [...] > > The server is a Soekris NET4801 and it's primary task is my > email, so if this gets abused it'll disappear again. > > Mirrors welcome. We have some here: http|ftp|rsync://ftp.mtu.ru/pub/FreeBSD-Archive/i386/ And I steal missed bits from you. Thanks! -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 10:10:51 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2879616A41C for ; Sun, 3 Jul 2005 10:10:51 +0000 (GMT) (envelope-from kensmith@cse.Buffalo.EDU) Received: from opus.cse.buffalo.edu (opus.cse.Buffalo.EDU [128.205.32.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9CBE43D46 for ; Sun, 3 Jul 2005 10:10:50 +0000 (GMT) (envelope-from kensmith@cse.Buffalo.EDU) Received: from opus.cse.buffalo.edu (localhost.cse.buffalo.edu [127.0.0.1]) by opus.cse.buffalo.edu (8.13.3/8.12.10) with ESMTP id j63AAohB002076; Sun, 3 Jul 2005 06:10:50 -0400 (EDT) Received: (from kensmith@localhost) by opus.cse.buffalo.edu (8.13.3/8.13.1/Submit) id j63AAn8w002075; Sun, 3 Jul 2005 06:10:49 -0400 (EDT) (envelope-from kensmith) Date: Sun, 3 Jul 2005 06:10:49 -0400 From: Ken Smith To: Poul-Henning Kamp Message-ID: <20050703101049.GA2057@opus.cse.buffalo.edu> References: <27361.1120381532@phk.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27361.1120381532@phk.freebsd.dk> User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org Subject: Re: Ancient FreeBSD releases online X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 10:10:51 -0000 On Sun, Jul 03, 2005 at 11:05:32AM +0200, Poul-Henning Kamp wrote: > The server is a Soekris NET4801 and it's primary task is my > email, so if this gets abused it'll disappear again. > > Mirrors welcome. We'll add the ones we didn't already have to the primary old release archive site. As many of the old release bits as we could find have been put at ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/ which includes the full-blown FTP install tree and package set for quite a few of the older releases. There is a sub-directory for each of the architectures with the FTP trees we could find, and each architecture has an ISO-IMAGES sub-directory with the ISO images we could find. -- Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel | From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 12:14:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F369716A41C for ; Sun, 3 Jul 2005 12:14:55 +0000 (GMT) (envelope-from Thomas.Sparrevohn@btinternet.com) Received: from smtp801.mail.ukl.yahoo.com (smtp801.mail.ukl.yahoo.com [217.12.12.138]) by mx1.FreeBSD.org (Postfix) with SMTP id 5E37243D48 for ; Sun, 3 Jul 2005 12:14:54 +0000 (GMT) (envelope-from Thomas.Sparrevohn@btinternet.com) Received: (qmail 93842 invoked from network); 3 Jul 2005 12:14:53 -0000 Received: from unknown (HELO w2fzz0vc01.aah-go-on.com) (thomas.sparrevohn@hg1.btinternet.com@86.133.213.18 with plain) by smtp801.mail.ukl.yahoo.com with SMTP; 3 Jul 2005 12:14:53 -0000 From: Thomas Sparrevohn To: freebsd-hackers@freebsd.org Date: Sun, 3 Jul 2005 13:14:52 +0100 User-Agent: KMail/1.8 References: <27361.1120381532@phk.freebsd.dk> In-Reply-To: <27361.1120381532@phk.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507031314.52530.Thomas.Sparrevohn@btinternet.com> Subject: Re: Ancient FreeBSD releases online X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Thomas.Sparrevohn@btinternet.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 12:14:56 -0000 On Sunday 03 July 2005 10:05, Poul-Henning Kamp wrote: Fedt - Jeg tror at jeg stadigvaek har nogle of de originale CD'er - > ftp://phk.freebsd.dk > > ./386BSD/cd1.iso > ./BSD4.4-LITE/cover.pnm > ./BSD4.4-LITE/cd1.iso > ./BSD4.4-LITE/cd2.iso > ./BSD4.4-LITE/cd3.iso > ./FreeBSD-1.0-RELEASE/cover.pnm > ./FreeBSD-1.0-RELEASE/cd1.iso > ./FreeBSD-1.1-RELEASE/cd1.iso > ./FreeBSD-1.1.5.1/cd1.iso > ./FreeBSD-2.0-RELEASE/cd1.iso > ./FreeBSD-2.0-RELEASE/cover_black.pnm > ./FreeBSD-2.0-RELEASE/cover_green.pnm > ./FreeBSD-2.0.5-RELEASE/cover.pnm > ./FreeBSD-2.0.5-RELEASE/cd1.iso > ./FreeBSD-2.0.5-RELEASE/cd2.iso > ./FreeBSD-2.1-RELEASE/cd1.iso > > Still in upload queue: > > ./FreeBSD-2.1-RELEASE/cd2.iso > ./FreeBSD-2.1.5-RELEASE/cd1.iso > ./FreeBSD-2.1.5-RELEASE/cd2.iso > ./FreeBSD-2.1.6-RELEASE/cd1.iso > ./FreeBSD-2.1.6-RELEASE/cd2.iso > ./FreeBSD-2.1.7-RELEASE/cd1.iso > ./FreeBSD-2.1.7-RELEASE/cd2.iso > ./FreeBSD-2.2-960501-SNAP/cd1.iso > ./FreeBSD-2.2-960801-SNAP/cd1.iso > ./FreeBSD-2.2-961014-SNAP/cd1.iso > ./FreeBSD-2.2.1-RELEASE/cd1.iso > ./FreeBSD-2.2.1-RELEASE/cd2.iso > ./FreeBSD-2.2.2-RELEASE/cd1.iso > ./FreeBSD-2.2.2-RELEASE/cd2.iso > ./FreeBSD-2.2.5-RELEASE/cd1.iso > ./FreeBSD-2.2.5-RELEASE/cd2.iso > ./FreeBSD-2.2.5-RELEASE/cd3.iso > ./FreeBSD-2.2.5-RELEASE/cd4.iso > > The server is a Soekris NET4801 and it's primary task is my > email, so if this gets abused it'll disappear again. > > Mirrors welcome. From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 20:56:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 650C216A41C; Sun, 3 Jul 2005 20:56:42 +0000 (GMT) (envelope-from cedric@virtual-globe.net) Received: from dd2030.kasserver.com (dd2030.kasserver.com [81.209.148.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE1C443D48; Sun, 3 Jul 2005 20:56:41 +0000 (GMT) (envelope-from cedric@virtual-globe.net) Received: from ganymed.decemplex.loc (83-134-162-133.Liege.GoPlus.FastDSL.tiscali.be [83.134.162.133]) by dd2030.kasserver.com (Postfix) with ESMTP id 69401F29F3; Sun, 3 Jul 2005 22:56:39 +0200 (CEST) Date: Sun, 3 Jul 2005 22:56:33 +0200 From: =?ISO-8859-1?Q?C=E9dric?= Jonas To: freebsd-stable@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20050703225633.077566f4@ganymed.decemplex.loc> X-Mailer: Sylpheed-Claws 1.9.11 (GTK+ 2.6.8; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Panic in bus_dmamap_load_mbuf (pmap.h:201) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 20:56:42 -0000 Hello, Since 1 or 2 months, I experienced panics when I use the ath interface of o= ur server (configured as hostap). Also, the system hangs often (without pan= ic) during the boot process at the "Setting hostname: icarus." level. Becau= se I had absolutely no time, I couldn't learn to use the kernel debugger be= fore.=20 icarus# uname -a FreeBSD icarus 5.4-STABLE FreeBSD 5.4-STABLE #0: Sun Jul 3 15:14:13 CEST = 2005 cedric@icarus:/usr/obj/usr/src/sys/ICARUS i386 Sources are from July, 1 debug.mpsafenet: 1 After compiling the kernel with debug options, I get the following during t= he boot process: Setting hostname: icarus. lock order reversal 1st 0xc2cd4c6c ath0 (network driver) @ /usr/src/sys/dev/ath/if_ath.c:893 2nd 0xc30583c8 user map (user map) @ /usr/src/sys/vm/vm_map.c:2998 I suppose this explains the occasional hangups during the boot process? The following was obtained after a panic (which occured only when I use the= ath interface): icarus# kgdb kernel.debug /var/crash/vmcore.86 [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so= : Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you a= re welcome to change it and/or distribute copies of it under certain conditio= ns. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd". #0 doadump () at pcpu.h:160 160 __asm __volatile("movl %%fs:0,%0" : "=3Dr" (td)); (kgdb) list *0xc0695dfd 0xc0695dfd is in bus_dmamap_load_mbuf (pmap.h:201). 196 197 if ((pa =3D PTD[va >> PDRSHIFT]) & PG_PS) { 198 pa =3D (pa & ~(NBPDR - 1)) | (va & (NBPDR - 1)); 199 } else { 200 pa =3D *vtopte(va); 201 pa =3D (pa & PG_FRAME) | (va & PAGE_MASK); 202 } 203 return pa; 204 } 205 (kgdb) backtrace #0 doadump () at pcpu.h:160 #1 0xc05241dc in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:= 410 #2 0xc05244f1 in panic (fmt=3D0xc06f0b1f "%s") at /usr/src/sys/kern/kern_= shutdown.c:566 #3 0xc06a96ec in trap_fatal (frame=3D0xe5ba3b80, eva=3D3221110944) at /us= r/src/sys/i386/i386/trap.c:817 #4 0xc06a941f in trap_pfault (frame=3D0xe5ba3b80, usermode=3D0, eva=3D322= 1110944) at /usr/src/sys/i386/i386/trap.c:735 #5 0xc06a9085 in trap (frame=3D {tf_fs =3D -440795112, tf_es =3D -1068433392, tf_ds =3D -1027473392, = tf_edi =3D -1026674344, tf_esi =3D -1026496768, tf_ebp =3D -440779748, tf_i= sp =3D -440779860, tf_ebx =3D 0, tf_edx =3D 0, tf_ecx =3D -117273402, tf_ea= x =3D 1019944, tf_trapno =3D 12, tf_err =3D 0, tf_eip =3D -1066836483, tf_c= s =3D 8, tf_eflags =3D 66055, tf_esp =3D -440779804, tf_ss =3D -1068382496}= ) at /usr/src/sys/i386/i386/trap.c:425 #6 0xc069796a in calltrap () at /usr/src/sys/i386/i386/exception.s:140 #7 0xe5ba0018 in ?? () #8 0xc0510010 in exit1 (td=3D0xc2cba680, rv=3D-440779764) at /usr/src/sys= /kern/kern_exit.c:394 #9 0xc0494122 in ath_rxbuf_init (sc=3D0xc2cd4000, bf=3D0xc2ce3158) at /us= r/src/sys/dev/ath/if_ath.c:1601 #10 0xc0494560 in ath_rx_proc (arg=3D0xc2cd4000, npending=3D1) at /usr/src= /sys/dev/ath/if_ath.c:1818 #11 0xc0540c57 in taskqueue_run (queue=3D0xc2c94dc0) at /usr/src/sys/kern/= subr_taskqueue.c:191 #12 0xc0540cbe in taskqueue_swi_run (dummy=3D0x0) at /usr/src/sys/kern/sub= r_taskqueue.c:213 #13 0xc0512ad8 in ithread_loop (arg=3D0xc2c28300) at /usr/src/sys/kern/ker= n_intr.c:547 #14 0xc0511ed4 in fork_exit (callout=3D0xc05129b4 , arg=3D0x= c2c28300, frame=3D0xe5ba3d38) at /usr/src/sys/kern/kern_fork.c:791 #15 0xc06979cc in fork_trampoline () at /usr/src/sys/i386/i386/exception.s= :209 (kgdb)=20 My kernel config: machine i386 cpu I686_CPU ident ICARUS =09 # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. =09 makeoptions DEBUG=3D-g # Build kernel with gdb(1) debug symbols =09 options KDB # Enable kernel debugger support. options GDB # Support remote GDB. options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, r= equired by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed =09 options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client options NFSSERVER # Network Filesystem Server options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_GPT # GUID Partition Tables. options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options SCSI_DELAY=3D15000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. options ADAPTIVE_GIANT # Giant mutex is adaptive. =09 device apic # I/O APIC =09 # Bus support. Do not remove isa, even if you have no isa slots device isa device pci =09 # Floppy drives device fdc =09 # ATA and ATAPI devices device ata device atadisk # ATA disk drives device ataraid # ATA RAID drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives device atapist # ATAPI tape drives options ATA_STATIC_ID # Static device numbering =09 # SCSI peripherals device scbus # SCSI bus (required for SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD device pass # Passthrough device (direct SCSI access) device ses # SCSI Environmental Services (and SAF-TE) =09 # SCSI controller device sym =09 # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse =09 device vga # VGA video card driver =09 device splash device green_saver =09 # syscons is the default console driver, resembling an SCO console device sc =09 device agp # support several AGP chipsets =09 # Floating point support - do not disable. device npx =09 # Power management support (see NOTES for more options) device apm # Add suspend/resume support for the i8254. device pmtimer =09 # Serial (COM) ports #device sio # 8250, 16[45]50 based serial ports =09 # Parallel port device ppc device ppbus # Parallel port bus (required) device lpt # Printer device plip # TCP/IP over parallel device ppi # Parallel port interface device device vpo # Requires scbus and da =09 # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NIC= s! device miibus # MII bus support device fxp # Intel EtherExpress PRO/100B (82557, 82558) device rl # RealTek 8129/8139 =09 # 'device ed' requires 'device miibus' device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards =09 # Wireless NIC cards device wlan # 802.11 support device ath device ath_hal # Atheros HAL (includes binary component) =09 # Pseudo devices. device loop # Network loopback device mem # Memory and kernel memory devices device io # I/O device device random # Entropy device device ether # Ethernet support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) =09 # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! device bpf # Berkeley packet filter =09 # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) device udbp # USB Double Bulk Pipe devices device ugen # Generic device uhid # "Human Interface Devices" device ukbd # Keyboard device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse device urio # Diamond Rio 500 MP3 player device uscanner # Scanners =09 # PF device pf #PF OpenBSD packet-filter firewall device pflog #logging support interface for PF device pfsync #synchronization interface for PF options ALTQ options ALTQ_PRIQ # Priority Queueing options ALTQ_NOPCC # Required for SMP build =09 # PPPoE DSL options NETGRAPH options NETGRAPH_SOCKET options NETGRAPH_PPPOE options NETGRAPH_ETHER =09 # SMP options SMP # Symmetric MultiProcessor Kernel options MPTABLE_FORCE_HTT # Enable HTT CPUs with the MP Table options PREEMPTION =09 options CPU_ENABLE_TCC options CPU_FASTER_5X86_FPU options CPU_SUSP_HLT =09 # Save kernel config in binary's options INCLUDE_CONFIG_FILE =09 # Disks options QUOTA #enable disk quotas =09 # Posix 1003.1b options P1003_1B_SEMAPHORES =09 # Sound # device sound # device snd_ich # device speaker #Play IBM BASIC-style noises out your speaker =09 # SMBus device smbus # Bus support, required for smb below. device ichsmb device smb =09 # Reboot after panic options PANIC_REBOOT_WAIT_TIME=3D60 =09 # Emulation options COMPAT_LINUX options COMPAT_AOUT options LINPROCFS =09 # Filesystems options NULLFS #NULL filesystem Another important detail could be that I use a dual Xeon box, which HT enab= led, which results in 4 logical CPU's and explain why anybody reported this= problem before?! I hope somebody could help, if you need additional informations, let me kno= w. Thank you. --=20 Best regards,=20 C=E9dric Jonas From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 4 01:09:21 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1D7416A41C for ; Mon, 4 Jul 2005 01:09:21 +0000 (GMT) (envelope-from ntarmos@All-Evil.ceid.upatras.gr) Received: from hermes.ceid.upatras.gr (hermes.ceid.upatras.gr [150.140.141.168]) by mx1.FreeBSD.org (Postfix) with SMTP id 1E43743D46 for ; Mon, 4 Jul 2005 01:09:20 +0000 (GMT) (envelope-from ntarmos@All-Evil.ceid.upatras.gr) Received: (qmail 21627 invoked by uid 1004); 4 Jul 2005 01:09:17 -0000 Received: from ntarmos@All-Evil.ceid.upatras.gr by hermes by uid 1001 with qmail-scanner-1.21st (clamscan: 0.70-rc. spamassassin: 2.63. Clear:RC:1(150.140.141.181):. Processed in 0.015546 secs); 04 Jul 2005 01:09:17 -0000 X-Qmail-Scanner-Mail-From: ntarmos@All-Evil.ceid.upatras.gr via hermes X-Qmail-Scanner: 1.21st (Clear:RC:1(150.140.141.181):. Processed in 0.015546 secs) Received: from diogenis.ceid.upatras.gr (150.140.141.181) by hermes.ceid.upatras.gr with SMTP; 4 Jul 2005 01:09:17 -0000 Received: (qmail 20273 invoked from network); 4 Jul 2005 01:09:15 -0000 Received: from all-evil.ceid.upatras.gr (150.140.143.230) by diogenis.ceid.upatras.gr with SMTP; 4 Jul 2005 01:09:15 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by All-Evil.ceid.upatras.gr (Postfix) with ESMTP id CCFF033C2C; Mon, 4 Jul 2005 04:09:15 +0300 (EEST) Received: from All-Evil.ceid.upatras.gr ([127.0.0.1]) by localhost (All-Evil [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11937-01; Mon, 4 Jul 2005 04:09:08 +0300 (EEST) Received: by All-Evil.ceid.upatras.gr (Postfix, from userid 1000) id 8FEB333B38; Mon, 4 Jul 2005 04:09:08 +0300 (EEST) Date: Mon, 4 Jul 2005 04:09:08 +0300 From: Nikos Ntarmos To: Andriy Tkachuk Message-ID: <20050704010908.GA17696@diogenis.ceid.upatras.gr> References: <000d01c57cf7$b9b6f9f0$29931bd9@ertpc> <20050630163126.GA7365@diogenis.ceid.upatras.gr> <001401c57ef0$dd489720$34bf5450@ertpc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline In-Reply-To: <001401c57ef0$dd489720$34bf5450@ertpc> Organization: NetCInS Lab., C.E.I.D., U. of Patras, Greece WWW-Homepage: http://noth.ceid.upatras.gr/ X-PGP-Fingerprint: 9680 60A7 DE60 0298 B1F0 9B22 9BA2 7569 CF95 160A Office-Phone: +30-2610-996919 Office-Fax: +30-2610-969011 GPS-Info: 38.2594N, 21.7428E User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at example.com Cc: hackers@freebsd.org Subject: Re: hot path optimizations in uma_zalloc() & uma_zfree() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Jul 2005 01:09:22 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there. On Sat, Jul 02, 2005 at 01:27:00PM +0300, Andriy Tkachuk wrote: > here even more refereces to memory in your variant. Ummm... What compiler version are you use? The pointer variant produces faster code for me on both NetBSD/alpha (gcc 3.3.3) and Linux/x86 (gcc 3.3.5), using both -O0 and -O2 (other compiler flags also tested with similar results). Perhaps something specific to FreeBSD then? I guess I'll have to set up a FBSD box and have a look at it, when I catch up with some of the other stuff in my todo list... Anyway, the proposed optimization even makes sense if you think about it in a logical pen-and-paper way: array variant: 1. load address of element 0 of array to register A 2. load counter to register B 3. decrease register B 4. store back new decreased B 5. load (dereference) A[B] This last operation may either translate to a leal-type instruction, or to an add+load-type sequence of instructions. pointer variant: 1. load address of pointer to register A 2. decrease register A 3. store back new decreased A 4. load (dereference) A \n\n -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Nikos "Nikolai" Ntarmos iD8DBQFCyIw0m6J1ac+VFgoRAonNAJ0Zs4Ohl+VWyv0FzgBfGV17Kt+uswCgkkRc +u9Ly5w59makY/R2noNI3nM= =ScoK -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 4 07:25:41 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86ABE16A41C for ; Mon, 4 Jul 2005 07:25:41 +0000 (GMT) (envelope-from corecode@fs.ei.tum.de) Received: from stella.fs.ei.tum.de (stella.fs.ei.tum.de [129.187.54.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FE5043D49 for ; Mon, 4 Jul 2005 07:25:40 +0000 (GMT) (envelope-from corecode@fs.ei.tum.de) Received: from localhost (localhost [127.0.0.1]) by localhost.fs.ei.tum.de (Postfix) with ESMTP id 62A2F8DA9B; Mon, 4 Jul 2005 09:25:36 +0200 (CEST) Received: from stella.fs.ei.tum.de ([127.0.0.1]) by localhost (stella [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16314-05-3; Mon, 4 Jul 2005 09:25:32 +0200 (CEST) Received: from sweatshorts.fs.ei.tum.de (unknown [IPv6:2001:4ca0:0:fe00:0:5efe:a96:b4b4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by stella.fs.ei.tum.de (Postfix) with ESMTP id C84D88D780; Mon, 4 Jul 2005 09:25:32 +0200 (CEST) Date: Mon, 4 Jul 2005 09:25:27 +0200 From: Simon 'corecode' Schubert To: Nikos Ntarmos Message-Id: <20050704092527.694c3057.corecode@fs.ei.tum.de> In-Reply-To: <20050704010908.GA17696@diogenis.ceid.upatras.gr> References: <000d01c57cf7$b9b6f9f0$29931bd9@ertpc> <20050630163126.GA7365@diogenis.ceid.upatras.gr> <001401c57ef0$dd489720$34bf5450@ertpc> <20050704010908.GA17696@diogenis.ceid.upatras.gr> X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-dragonfly1) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Mon__4_Jul_2005_09_25_27_+0200_9=zCeoo/_5gB51gV" X-Virus-Scanned: by amavisd-new at fs.ei.tum.de Cc: hackers@freebsd.org, andrit@ukr.net Subject: Re: hot path optimizations in uma_zalloc() & uma_zfree() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Jul 2005 07:25:41 -0000 --Signature=_Mon__4_Jul_2005_09_25_27_+0200_9=zCeoo/_5gB51gV Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Lately Nikos Ntarmos said: > Ummm... What compiler version are you use? The pointer variant produces > faster code for me on both NetBSD/alpha (gcc 3.3.3) and Linux/x86 (gcc > 3.3.5), using both -O0 and -O2 (other compiler flags also tested with > similar results). Perhaps something specific to FreeBSD then? I guess > I'll have to set up a FBSD box and have a look at it, when I catch up > with some of the other stuff in my todo list... This is micro-optimization at its best. I doubt it has any influence in real world scenarios. And if it does, something else is extremely broken. You don't want to takt the route and implement it in assembler? Besides, I guess it's totally CPU dependant, how stuff can be pipelined, all memory locations ought to be in the cache anyways. cheers simon --=20 Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low $$$ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \ --Signature=_Mon__4_Jul_2005_09_25_27_+0200_9=zCeoo/_5gB51gV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (DragonFly) iD8DBQFCyORsr5S+dk6z85oRAj0WAJ9AHFKz3lccxKIvZczxtCh3GMVIJwCg11iT WTkjSYfDvzorUtlYglOob7w= =3Vev -----END PGP SIGNATURE----- --Signature=_Mon__4_Jul_2005_09_25_27_+0200_9=zCeoo/_5gB51gV-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 3 16:01:12 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 601EE16A41C for ; Sun, 3 Jul 2005 16:01:12 +0000 (GMT) (envelope-from ardelean@ww.uni-erlangen.de) Received: from servww6.ww.uni-erlangen.de (servww6.ww.uni-erlangen.de [131.188.238.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBE4A43D49 for ; Sun, 3 Jul 2005 16:01:10 +0000 (GMT) (envelope-from ardelean@ww.uni-erlangen.de) Received: from localhost (ardelean@localhost) by servww6.ww.uni-erlangen.de (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id j63G17818532 for ; Sun, 3 Jul 2005 18:01:07 +0200 Date: Sun, 3 Jul 2005 18:01:07 +0200 (CEST) From: Gheorghe Ardelean To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Mon, 04 Jul 2005 13:20:15 +0000 Subject: AT-1500FT PnP card, FreeBSD-5.4R-p1 and lnc(4) problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 16:01:12 -0000 Hi, I am trying to make a network card work with lnc(4) device. The card is an AT-1500 PnP Ethernet Adapter based on PCnet(TM)-ISA II chip from AMD (AM79C961AKC) which is supposed to be supported under lnc(4) driver. The card has both a 10BaseFL(ST) and 10BaseT port. After adding the card's pnp id to the lnc_pnp_ids[] structure I am getting the card recognized and attached but the chip and MAC address are wrongly detected. Both the Ethernet Address and ic type are wrongly detected! Any help will be appreciated! #uname -a FreeBSD test 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #4: Sun Jun 5 00:18:56 CEST 2005 root@test:/usr/src/sys/i386/compile/TEST i386 #dmesg ... lnc1: at port 0x220-0x237 irq 9 drq 3 on isa0 lnc1: Attaching ATI AT-1500 Ethernet Network Adapter lnc1: Ethernet address: cf:bf:ff:ef:00:ff <--wrong (tested against DOS setup program) lnc1: if_start running deferred for Giant lnc1: Unknown <- (chip id 0!) ... A diff to if_lnc_isa: ================= --- sys/dev/lnc/if_lnc_isa.c.orig Sun Jan 30 01:59:53 2005 +++ sys/dev/lnc/if_lnc_isa.c Sun Jun 5 00:16:19 2005 @@ -54,6 +54,8 @@ #include static struct isa_pnp_id lnc_pnp_ids[] = { + {0x00158b06, NULL}, /* ATK1500 - ATI AT-1500 Ethernet Network Adapter */ + {0x8c82d041, "AMD PCNet Family Cards"}, /* PNP828C */ {0, NULL} }; ================= the information added to if_lnc_isa.c was obtained with pnpinfo(8). Regards, G. Ardelean From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 4 14:01:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FC7316A41C for ; Mon, 4 Jul 2005 14:01:13 +0000 (GMT) (envelope-from cedric@virtual-globe.net) Received: from dd2030.kasserver.com (dd2030.kasserver.com [81.209.148.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3A7843D45 for ; Mon, 4 Jul 2005 14:01:12 +0000 (GMT) (envelope-from cedric@virtual-globe.net) Received: from ganymed.decemplex.loc (83-134-161-27.Liege.GoPlus.FastDSL.tiscali.be [83.134.161.27]) by dd2030.kasserver.com (Postfix) with ESMTP id CEEDFF2B6E for ; Mon, 4 Jul 2005 16:01:11 +0200 (CEST) Date: Mon, 4 Jul 2005 16:01:08 +0200 From: =?ISO-8859-1?Q?C=E9dric?= Jonas To: freebsd-hackers@freebsd.org Message-ID: <20050704160108.2f80d39c@ganymed.decemplex.loc> In-Reply-To: <20050703225633.077566f4@ganymed.decemplex.loc> References: <20050703225633.077566f4@ganymed.decemplex.loc> X-Mailer: Sylpheed-Claws 1.9.11 (GTK+ 2.6.8; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: Panic in bus_dmamap_load_mbuf (pmap.h:201) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Jul 2005 14:01:13 -0000 On Sun, 3 Jul 2005 22:56:33 +0200 C=E9dric Jonas wrote: > Hello, >=20 > Since 1 or 2 months, I experienced panics when I use the ath interface of= our server (configured as hostap). Also, the system hangs often (without p= anic) during the boot process at the "Setting hostname: icarus." level. Bec= ause I had absolutely no time, I couldn't learn to use the kernel debugger = before.=20 >=20 >=20 >=20 > icarus# uname -a > FreeBSD icarus 5.4-STABLE FreeBSD 5.4-STABLE #0: Sun Jul 3 15:14:13 CES= T 2005 cedric@icarus:/usr/obj/usr/src/sys/ICARUS i386 >=20 > Sources are from July, 1 >=20 >=20 > debug.mpsafenet: 1 >=20 >=20 >=20 > After compiling the kernel with debug options, I get the following during= the boot process: >=20 > Setting hostname: icarus. > lock order reversal > 1st 0xc2cd4c6c ath0 (network driver) @ /usr/src/sys/dev/ath/if_ath.c:893 > 2nd 0xc30583c8 user map (user map) @ /usr/src/sys/vm/vm_map.c:2998 >=20 > > Another important detail could be that I use a dual Xeon box, which HT en= abled, which results in 4 logical CPU's and explain why anybody reported th= is problem before?! >=20 > I hope somebody could help, if you need additional informations, let me k= now. > Thank you. >=20 > --=20 > Best regards,=20 > C=E9dric Jonas > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >=20 If it can help: I tried to disable PREEMPTION, the hyperthreading functiona= lity (=3D> 2 logical CPU), and I set debug.mpsafenet to 0, but the LOR (+ P= anic when ath0 is used) continue to occure... I tried also to downgrade to 5.3-RELEASE, where the problems do _not_ occur= ... but that's not a solution. --=20 Best regards,=20 C=E9dric Jonas From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 4 16:26:27 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E699016A41C for ; Mon, 4 Jul 2005 16:26:27 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id A968443D48 for ; Mon, 4 Jul 2005 16:26:27 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix3-1.free.fr (Postfix) with ESMTP id 1D66D1734AC for ; Mon, 4 Jul 2005 18:26:25 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id A33AE405B; Mon, 4 Jul 2005 18:26:32 +0200 (CEST) Date: Mon, 4 Jul 2005 18:26:32 +0200 From: Jeremie Le Hen To: freebsd-hackers@FreeBSD.org Message-ID: <20050704162631.GN73907@obiwan.tataz.chchile.org> References: <20050703082802.GF73907@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050703082802.GF73907@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.9i Cc: Subject: Re: buildworld sequence X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Jul 2005 16:26:28 -0000 Hi, > I looking for an explanation of the buildworld sequence : > legacy > bootstrap tools > build tools > cross tools > ... > > In fact, I read Makefile.inc1, so I have a basic idea of what each step > does, but I don't really understand > * what is the legacy step, > * why strfile(1), gperf(1) and so on are required to be built before > mostly everything else (bootstrap tools) > * why utilities in the build-tools target are built before gcc. > > I didn't asked all the questions I have in mind, but I would be glad if > someone could give me the general idea behind this or, even better, > point me some documentation. I checked developpers-handbook, there is > nothing about it, unfortunately. I overlook the description of each stage at the beginning of the file, I'll whip myself for this. > I was trying to understand this because I need to use a gcc(1) option > in CFLAGS for these tools for my integration of the ProPolice patch > in the build system. I tried to set CFLAGS as an environnement variable in BMAKEENV from Makefile.inc1, but the compilation line still doesn't't contain the flag I want. Any idea why this doesn't work ? Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 10:45:51 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9C1B16A41C for ; Tue, 5 Jul 2005 10:45:51 +0000 (GMT) (envelope-from dipjyoti.saikia@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8103A43D5C for ; Tue, 5 Jul 2005 10:45:51 +0000 (GMT) (envelope-from dipjyoti.saikia@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so433064nzo for ; Tue, 05 Jul 2005 03:45:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=lSEVWbPNjkJ7Nw/tIah1xwLrbMGrF70b47Be+wWRdBkZaXWwy8O7Rq6YwX1Zu1jmZpeijPH4CabOcJDguuoZs7vTMlSF5FgSlqQtlKSANNMOrjIEIx7xazTQgcEoI+PXrl0DKRRHm5OykyZNW9nnpJaNwZiIg/u2TNnB3MOgv18= Received: by 10.36.8.16 with SMTP id 16mr1572099nzh; Tue, 05 Jul 2005 03:45:50 -0700 (PDT) Received: by 10.36.77.20 with HTTP; Tue, 5 Jul 2005 03:45:50 -0700 (PDT) Message-ID: Date: Tue, 5 Jul 2005 16:15:50 +0530 From: Dipjyoti Saikia To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: thread-safe popen X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dipjyoti Saikia List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2005 10:45:51 -0000 Hi, I am working on an OS derived for BSD 4.1 . I am trying to backport a thread-safe version of popen() from BSD 4.10 . My plan is to create a file in libc_r/uhtread as uthread_popen.c which will contain the thread safe version of the code . The problem I am facing while building the libraries is that it gives error of multiple declarations of popen since libc_r is sharing the popen with libc . If I remove popen code from libc and put popen.o in HIDDEN_SYSCALLS in Makefile of libc_r still I am getting errors while building applications not linking with libc_r . Is there something I am missing ?? Kindly help me with the proper way of doing it . Dip From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 14:15:41 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DD5116A41C for ; Tue, 5 Jul 2005 14:15:41 +0000 (GMT) (envelope-from molter@tin.it) Received: from vsmtp14.tin.it (vsmtp14.tin.it [212.216.176.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF04143D55 for ; Tue, 5 Jul 2005 14:15:40 +0000 (GMT) (envelope-from molter@tin.it) Received: from gattaccio.codalunga (82.122.120.144) by vsmtp14.tin.it (7.0.027) (authenticated as molter@tin.it) id 42B03DDF008E125F for freebsd-hackers@freebsd.org; Tue, 5 Jul 2005 16:15:39 +0200 Received: by gattaccio.codalunga (Postfix, from userid 1001) id 9E2DDC2FF; Tue, 5 Jul 2005 16:14:45 +0200 (CEST) Date: Tue, 5 Jul 2005 16:14:45 +0200 From: Marco Molteni To: freebsd-hackers@freebsd.org Message-Id: <20050705161445.1d47440c.molter@tin.it> X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: building something from CVS with GNU autotools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Jul 2005 14:15:41 -0000 I pulled all my hair and lost my sanity. I searched mailing lists ang google, found a lot of people with my same problem but never a definitive solution. Problem is when trying to build on fbsd no matter which program out of CVS (ie: not a release) which uses GNU autotools. After patching ./autogen.sh to use the versioned autotools, I get the standard error (standard because google is full of it): ./ltconfig: ./ltconfig: No such file or directory configure: error: libtool configure failed I tried also building a directory full of symlinks and putting it at the beginning of my PATH, to be sure to catch any invocation of the autotools stuff: molter@gattaccio[~]$ ls autodamage aclocal@ -> /usr/local/bin/aclocal15 autoconf@ -> /usr/local/bin/autoconf259 autoheader@ -> /usr/local/bin/autoheader259 and so on, but I still hit the wall. In my case I am trying to compile the CVS version of silky (http://silky.sourceforge.net/), but as I said silky is a program like another. I also saw there is a /usr/ports/Mk/bsd.autotools.mk makefile with some comments in it, but it is not clear to me how to reuse that stuff outside of a port. Is there a way to solve my problems, without requiring any fbsd user to become a master of the weird and (censured comments) autotools ? thanks marco From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 14:38:25 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D67B916A41C for ; Tue, 5 Jul 2005 14:38:25 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3365F43D46 for ; Tue, 5 Jul 2005 14:38:22 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j65EcFhY053173; Tue, 5 Jul 2005 09:38:15 -0500 (CDT) (envelope-from dan) Date: Tue, 5 Jul 2005 09:38:15 -0500 From: Dan Nelson To: Dipjyoti Saikia Message-ID: <20050705143814.GA38925@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: thread-safe popen X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Jul 2005 14:38:26 -0000 In the last episode (Jul 05), Dipjyoti Saikia said: > I am working on an OS derived for BSD 4.1 . I am trying to backport > a thread-safe version of popen() from BSD 4.10 . popen should be threadsafe as of rev 1.17 (2003-01-03) of /usr/src/lib/libc/gen/popen.c . It was merged into the 4.* branch in rev 1.14.2.1 (2004/12/15). The PR is bin/50770 . Do you have a testcase that causes it to fail? -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 14:38:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3382A16A41C for ; Tue, 5 Jul 2005 14:38:56 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FEA543D5C for ; Tue, 5 Jul 2005 14:38:55 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from beatrix.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j65Ecrfh010676; Tue, 5 Jul 2005 17:38:54 +0300 Received: from beatrix.daedalusnetworks.priv (localhost [127.0.0.1]) by beatrix.daedalusnetworks.priv (8.13.3+Sun/8.13.3) with ESMTP id j65EcrBw002589; Tue, 5 Jul 2005 17:38:53 +0300 (EEST) Received: (from keramida@localhost) by beatrix.daedalusnetworks.priv (8.13.3+Sun/8.13.3/Submit) id j65EcrA7002588; Tue, 5 Jul 2005 17:38:53 +0300 (EEST) X-Authentication-Warning: beatrix.daedalusnetworks.priv: keramida set sender to keramida@freebsd.org using -f Date: Tue, 5 Jul 2005 17:38:53 +0300 From: Giorgos Keramidas To: Marco Molteni Message-ID: <20050705143853.GB2522@beatrix.daedalusnetworks.priv> References: <20050705161445.1d47440c.molter@tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050705161445.1d47440c.molter@tin.it> Cc: freebsd-hackers@freebsd.org Subject: Re: building something from CVS with GNU autotools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Jul 2005 14:38:56 -0000 On 2005-07-05 16:14, Marco Molteni wrote: > I pulled all my hair and lost my sanity. I searched mailing lists ang > google, found a lot of people with my same problem but never a > definitive solution. > > Problem is when trying to build on fbsd no matter which program out of > CVS (ie: not a release) which uses GNU autotools. > > After patching ./autogen.sh to use the versioned autotools, I get the > standard error (standard because google is full of it): > > ./ltconfig: ./ltconfig: No such file or directory > configure: error: libtool configure failed > > I tried also building a directory full of symlinks and putting it at > the beginning of my PATH, to be sure to catch any invocation of the > autotools stuff: > > molter@gattaccio[~]$ ls autodamage > aclocal@ -> /usr/local/bin/aclocal15 > autoconf@ -> /usr/local/bin/autoconf259 > autoheader@ -> /usr/local/bin/autoheader259 > > and so on, but I still hit the wall. > > In my case I am trying to compile the CVS version of silky > (http://silky.sourceforge.net/), but as I said silky is a program like > another. > > I also saw there is a /usr/ports/Mk/bsd.autotools.mk makefile with > some comments in it, but it is not clear to me how to reuse that stuff > outside of a port. > > Is there a way to solve my problems, without requiring any fbsd user > to become a master of the weird and (censured comments) autotools ? Yes. This question comes up very frequently and has been answered several times. My preferred solution to the autotools "problem", which works admirably well on all systems I've tried it so far (FreeBSD, Solaris and Linux) is to install a local version of the latest autotools in /opt/autotools and prepend /opt/autotools/bin to my PATH. A simpler solution, if you don't really want to go into the trouble of downloading the source tarballs for autoconf, automake and libtool, compiling everything yourself and installing in /opt/autotools, is to use the devel/gnu-* ports that install autoconf, automake and libtool in /usr/local/gnu-autotools and prepend that to your PATH. - Giorgos From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 14:54:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5A4716A41C for ; Tue, 5 Jul 2005 14:54:46 +0000 (GMT) (envelope-from alecsk@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9401743D45 for ; Tue, 5 Jul 2005 14:54:46 +0000 (GMT) (envelope-from alecsk@gmail.com) Received: by rproxy.gmail.com with SMTP id i8so881823rne for ; Tue, 05 Jul 2005 07:54:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=NALRqB7LrivTnJS5EtMCY/rEKA59476GZtQUNhHX/m0sz39SvzJPGVYcCyD9RYTIy4EWyQAWDsU1rE0Yn2XWG2Gljz8HA7PvjKjjvFiDI54S/2zZ2UUxp2dd6PtI260xPBVbEufhadnwe1OzWEW9PCYBalQdiaqgAFiA/YQukDg= Received: by 10.39.2.56 with SMTP id e56mr3058199rni; Tue, 05 Jul 2005 07:54:45 -0700 (PDT) Received: from localhost ([210.77.2.151]) by mx.gmail.com with ESMTP id k6sm2913170rnd.2005.07.05.07.54.44; Tue, 05 Jul 2005 07:54:45 -0700 (PDT) Date: Tue, 5 Jul 2005 22:54:45 +0800 From: Alecs King To: freebsd-hackers@freebsd.org Message-ID: <20050705145445.GA1353@loalhost.H.qngy.gscas> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050705161445.1d47440c.molter@tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050705161445.1d47440c.molter@tin.it> User-Agent: Mutt/1.5.9i Subject: Re: building something from CVS with GNU autotools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Jul 2005 14:54:46 -0000 On Tue, Jul 05, 2005 at 04:14:45PM +0200, Marco Molteni wrote: > I pulled all my hair and lost my sanity. > I searched mailing lists ang google, found a lot of people with my > same problem but never a definitive solution. > > Problem is when trying to build on fbsd no matter which program out of > CVS (ie: not a release) which uses GNU autotools. > [snip] Use gnu-autoconf, gnu-automake, gnu-libtool under /usr/ports/devel/. -- Alecs King From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 15:39:28 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 660D816A41C for ; Tue, 5 Jul 2005 15:39:28 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A17143D46 for ; Tue, 5 Jul 2005 15:39:27 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix3-1.free.fr (Postfix) with ESMTP id 31510173506 for ; Tue, 5 Jul 2005 17:39:26 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 3C19A405B; Tue, 5 Jul 2005 17:39:33 +0200 (CEST) Date: Tue, 5 Jul 2005 17:39:33 +0200 From: Jeremie Le Hen To: freebsd-hackers@FreeBSD.org Message-ID: <20050705153933.GP73907@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: Subject: ProPolice symbols in libc or libssp ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Jul 2005 15:39:28 -0000 Hi hackers, I'm still working on integrating the ProPolice patch in FreeBSD CURRENT. A small reminder : The ProPolice patch prevents from stack-based buffer overflows but setting a canary between character arrays and the return address stored in the stack. In addition, automatic variables are reordered so that pointers stands before buffers. ProPolice (aka Stack Smashing Protector / SSP) needs two symbols to work correctly ("__guard" which is the canary initialized before main() is started, and "__stack_smash_handler" which is the function called when a buffer overflow is detected ; furthermore, a private contructor is provided to fill __guard). The original patch stores them in libgcc but since FreeBSD only provides a static libgcc, this will lead to have those compiled into all binaries, which is not something acceptable, IMO. Numerous patches porting ProPolice to newer versions of FreeBSD store these symbols in libc, so they are dynamically linked. That's what I did too and it worked quite well. However, Victor Balada Diaz tested the patch for me and reported that it breaks Opera compiled for RELENG_4 because the latter is linked against libc (compat one) and libz. The problem is that the libz version against which Opera is dynamically linked is not residing in compat/ and _needs_ ProPolice symbols which are obviously not in the compat libc. Another solution taht exists, the one used by the Hardened Debian project, is to have a libssp containing these two symbols. How would you, hackers, overcome this problem ? Suggestion are welcome. Thanks. Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 21:55:27 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 030F416A41C for ; Tue, 5 Jul 2005 21:55:27 +0000 (GMT) (envelope-from tom.schutter@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4E8A43D45 for ; Tue, 5 Jul 2005 21:55:26 +0000 (GMT) (envelope-from tom.schutter@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so492123nzo for ; Tue, 05 Jul 2005 14:55:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=RUhDK79AO3vvCAY6ms+A/RsglJAy1YJSj1nhpDiyEkAfQgwTu5mV8R/1Pgpp0bphMzBLyyjCXGIIGLFVcEpkm0fGrCjOC3wVOVTm8jo5b6XbfciR7/Cf3Au9ScSE5UfX637CXbJ8iEAPVZTKXC7Cpcj9OFbhpbKkN1wOTshVRto= Received: by 10.36.8.17 with SMTP id 17mr1679645nzh; Tue, 05 Jul 2005 14:55:26 -0700 (PDT) Received: by 10.36.25.14 with HTTP; Tue, 5 Jul 2005 14:55:26 -0700 (PDT) Message-ID: Date: Tue, 5 Jul 2005 15:55:26 -0600 From: Tom Schutter To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: linking libjava.so RPATH problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tom Schutter List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2005 21:55:27 -0000 I am having problems linking in the Java JVM libraries (libjava.so, libverify.so, libjvm.so) into my executable. With these options added to my gcc command: -L/usr/local/jdk1.4.2/jre/lib/i386 -ljava -lverify -L/usr/local/jdk1.4.2/jre/lib/i386/server -ljvm It links ok, but when I try to run it I get: $ ./testme /libexec/ld-elf.so.1: Shared object "libjava.so" not found, required by "testme" At this point ldd tells me: $ ldd testme testme: libm.so.3 =3D3D> /lib/libm.so.3 (0x2807c000) libjava.so =3D3D> not found (0x0) libverify.so =3D3D> not found (0x0) libjvm.so =3D3D> not found (0x0) libpthread.so.1 =3D3D> /usr/lib/libpthread.so.1 (0x28097000) libc.so.5 =3D3D> /lib/libc.so.5 (0x280bb000) Using -Xlinker -rpath -Xlinker PATH_TO_JRE_DIR, I can tell my executable to look in the JRE dir for libjvm.so. I have verified that RPATH has been set in the executable using objdump: $ objdump -x testme | grep RPATH RPATH /usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.2/jre/lib/i= 386/server But when I run the executable, it cannot find libjvm.so: $ ./testme /libexec/ld-elf.so.1: Shared object "libjvm.so" not found, required by "libjava.so" At this point ldd tells me: $ ldd ./testme ./testme: libm.so.3 =3D3D> /lib/libm.so.3 (0x2807c000) libjava.so =3D3D> /usr/local/jdk1.4.2/jre/lib/i386/libjava.so (0x280= 97000) libverify.so =3D3D> /usr/local/jdk1.4.2/jre/lib/i386/libverify.so (0x280b5000) libjvm.so =3D3D> /usr/local/jdk1.4.2/jre/lib/i386/server/libjvm.so (0x280ca000) libpthread.so.1 =3D3D> /usr/lib/libpthread.so.1 (0x28702000) libc.so.5 =3D3D> /lib/libc.so.5 (0x28726000) libjvm.so =3D3D> not found (0x0) libverify.so =3D3D> not found (0x0) libjvm.so =3D3D> not found (0x0) libstdc++.so.4 =3D3D> /usr/lib/libstdc++.so.4 (0x28800000) Note that at this point on Linux, testme runs ok. If I set LD_LIBRARY_PATH, the libraries are found (no output is correct): $ LD_LIBRARY_PATH=3D3D/usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.2/= jre/lib/i386/server ./testme $ My questions are: 1) Why is the RPATH in the executable being ignored? 2) When I add the -rpath, I get two copies of a libjvm.so reference in test= me, one that resolves correctly, and one that doesn't. Why? 3) What is the correct way of linking in libjvm.so? Thanks, --=20 Tom Schutter From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 02:27:53 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4574416A41C for ; Wed, 6 Jul 2005 02:27:53 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C62643D48 for ; Wed, 6 Jul 2005 02:27:52 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j662RoWq077190; Wed, 6 Jul 2005 11:57:51 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org, Tom Schutter Date: Wed, 6 Jul 2005 11:57:46 +0930 User-Agent: KMail/1.8 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2215759.r7xFxdE9dY"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200507061157.46921.doconnor@gsoft.com.au> X-Spam-Score: -2.4 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: Subject: Re: linking libjava.so RPATH problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 02:27:53 -0000 --nextPart2215759.r7xFxdE9dY Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wed, 6 Jul 2005 07:25, Tom Schutter wrote: > 1) Why is the RPATH in the executable being ignored? I think this is a feature, not a bug.. I forget the exact reason though - I= am=20 pretty sure this has been discussed on the lists when ELF came in though. > 2) When I add the -rpath, I get two copies of a libjvm.so reference in > testme, one that resolves correctly, and one that doesn't. Why? No idea :( > 3) What is the correct way of linking in libjvm.so? I would say you need to either add LD_LIBRARY_PATH to your env, or pass som= e=20 flags to ldconfig to add the path to the JVM libraries. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart2215759.r7xFxdE9dY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBCy0Gi5ZPcIHs/zowRApHGAJ4kb4NVd+sKeid1ddpA1qY697B1mQCeJ2Ov 6wjv5XB4ONo7d49fScNyQWE= =xSLB -----END PGP SIGNATURE----- --nextPart2215759.r7xFxdE9dY-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 05:47:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B65416A41C for ; Wed, 6 Jul 2005 05:47:56 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C239043D48 for ; Wed, 6 Jul 2005 05:47:55 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from sinanica.bg.datamax (sinanica.bg.datamax [192.168.10.1]) by jengal.datamax.bg (Postfix) with QMQP id AE7A787CA; Wed, 6 Jul 2005 08:47:53 +0300 (EEST) Received: (nullmailer pid 19676 invoked by uid 1004); Wed, 06 Jul 2005 05:47:53 -0000 Date: Wed, 6 Jul 2005 08:47:53 +0300 From: Vasil Dimov To: Tom Schutter Message-ID: <20050706054753.GA69973@sinanica.bg.datamax> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: linking libjava.so RPATH problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 05:47:56 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 05, 2005 at 03:55:26PM -0600, Tom Schutter wrote: > I am having problems linking in the Java JVM libraries (libjava.so, > libverify.so, libjvm.so) into my executable. >=20 > With these options added to my gcc command: > -L/usr/local/jdk1.4.2/jre/lib/i386 -ljava -lverify > -L/usr/local/jdk1.4.2/jre/lib/i386/server -ljvm >=20 > It links ok, but when I try to run it I get: > $ ./testme > /libexec/ld-elf.so.1: Shared object "libjava.so" not found, required by > "testme" >=20 > At this point ldd tells me: > $ ldd testme > testme: > libm.so.3 =3D3D> /lib/libm.so.3 (0x2807c000) > libjava.so =3D3D> not found (0x0) > libverify.so =3D3D> not found (0x0) > libjvm.so =3D3D> not found (0x0) > libpthread.so.1 =3D3D> /usr/lib/libpthread.so.1 (0x28097000) > libc.so.5 =3D3D> /lib/libc.so.5 (0x280bb000) >=20 > Using -Xlinker -rpath -Xlinker PATH_TO_JRE_DIR, I can tell my executable = to > look in the JRE dir for libjvm.so. I have verified that RPATH has been s= et > in the executable using objdump: > $ objdump -x testme | grep RPATH > RPATH /usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.2/jre/lib= /i386/server >=20 > But when I run the executable, it cannot find libjvm.so: > $ ./testme > /libexec/ld-elf.so.1: Shared object "libjvm.so" not found, required by > "libjava.so" >=20 > At this point ldd tells me: > $ ldd ./testme > ./testme: > libm.so.3 =3D3D> /lib/libm.so.3 (0x2807c000) > libjava.so =3D3D> /usr/local/jdk1.4.2/jre/lib/i386/libjava.so (0x2= 8097000) > libverify.so =3D3D> /usr/local/jdk1.4.2/jre/lib/i386/libverify.so > (0x280b5000) > libjvm.so =3D3D> > /usr/local/jdk1.4.2/jre/lib/i386/server/libjvm.so (0x280ca000) > libpthread.so.1 =3D3D> /usr/lib/libpthread.so.1 (0x28702000) > libc.so.5 =3D3D> /lib/libc.so.5 (0x28726000) > libjvm.so =3D3D> not found (0x0) > libverify.so =3D3D> not found (0x0) > libjvm.so =3D3D> not found (0x0) > libstdc++.so.4 =3D3D> /usr/lib/libstdc++.so.4 (0x28800000) >=20 > Note that at this point on Linux, testme runs ok. >=20 > If I set LD_LIBRARY_PATH, the libraries are found (no output is correct): > $ LD_LIBRARY_PATH=3D3D/usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.= 2/jre/lib/i386/server > ./testme > $ >=20 > My questions are: >=20 > 1) Why is the RPATH in the executable being ignored? Here are my suggestions: It is not being ignored, as you see: libjava.so, libverify.so and libjvm.so were found in /usr/local/jdk1.4.2/jre/lib/i386/ > 2) When I add the -rpath, I get two copies of a libjvm.so reference in te= stme, > one that resolves correctly, and one that doesn't. Why? What happens is that libjava.so "depends" on libjvm.so and libverify.so itself: % ldd /usr/local/jdk1.4.2/jre/lib/i386/libjava.so /usr/local/jdk1.4.2/jre/lib/i386/libjava.so: libjvm.so =3D> not found (0x0) libverify.so =3D> not found (0x0) and libverify.so "depends" on libjvm.so itself: % ldd /usr/local/jdk1.4.2/jre/lib/i386/libverify.so /usr/local/jdk1.4.2/jre/lib/i386/libverify.so: libjvm.so =3D> not found (0x0) So, after finding libjava.so, libverify.so and libjvm.so, required by "testme" executable (thanks to its RPATH) the linker sees that libjava.so itself depends on libjvm.so and libverify.so and: 1. does not notice that they are already found/loaded 2. does not use the rpath in "testme" 3. starts looking for them in the standard path and does not find them > 3) What is the correct way of linking in libjvm.so? In my point of view the libjava.so and libverify.so shared objects are incorrect in the way that they depend on some shared objects, that are not located in the standard path *AND* libjava.so and libverify.so do not have RPATH in themselves. 1. Recompile libjava.so and libverify.so without -L... -l..., it is not needed anyway. OR 2. Recompile libjava.so and libverify.so with -L... -l..., but also add -rpath OR 3. Use ldconfig -m (see ldconfig_paths in rc.conf(5)) OR 4. Use LD_LIBRARY_PATH > Thanks, > --=20 > Tom Schutter --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFCy3CJFw6SP/bBpCARAtyGAJ9K6OFpelWLTpuK0NMC2bu23k7vXwCfb/lK K+gwOShoPSA0Mh61KH37lx8= =OEYJ -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 20:57:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32D0616A41C for ; Tue, 5 Jul 2005 20:57:36 +0000 (GMT) (envelope-from non_secure@yahoo.com) Received: from web53305.mail.yahoo.com (web53305.mail.yahoo.com [206.190.39.234]) by mx1.FreeBSD.org (Postfix) with SMTP id B5C9943D48 for ; Tue, 5 Jul 2005 20:57:35 +0000 (GMT) (envelope-from non_secure@yahoo.com) Received: (qmail 7149 invoked by uid 60001); 5 Jul 2005 20:57:31 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=tdCjLvT2jNMq0jHv16g/vnwBopI+OrkOaa7uRReEwruMc5JuhoPghNA0qY1Ra4gGB7vzLRMa27BLjXmGc+mbTiWcr3kish/uiBXyH1/3qgkLDi6oRzwWfrRgGOn/R/l0NNKOPGzQccaHNV4w9KrpOGx3691Th1YUU+e178SYTwM= ; Message-ID: <20050705205731.7147.qmail@web53305.mail.yahoo.com> Received: from [208.186.91.245] by web53305.mail.yahoo.com via HTTP; Tue, 05 Jul 2005 13:57:31 PDT Date: Tue, 5 Jul 2005 13:57:31 -0700 (PDT) From: Joe Schmoe To: freebsd-hackers@freebsd.org In-Reply-To: <7042066405052710237034cdde@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 06 Jul 2005 12:08:19 +0000 Subject: Re: Using a logitech mx700 with scrollwheel _and_ thumb buttons X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Jul 2005 20:57:36 -0000 Andre, --- André-Philippe Paquet wrote: > My MX500 is working just fine. Here what I do: > > - Install imwheel (/usr/ports/x11/imwheel) > > > - Add this to ~/.imwheelrc > > ".*" > None, Up, Alt_L|Left,1 > None, Down, Alt_L|Right,1 > > "(null)" > None, Up, Alt_L|Left,1 > None, Down, Alt_L|Right,1 > > > - In my x.org file.. For the > InputDevice section: > > Option "Buttons" "7" > Option "ZAxisMapping" "6 7" > > - Finaly, I run these two commands on Xwindows > start: > > imwheel -b "67" & > xmodmap -e "pointer = 1 2 3 6 7 4 5" Nope. I reproduced these same settings _exactly_, and they produce the same results. With your settings above, the scroll wheel works fine, and the two thumb buttons each cause the web page to scroll very slightly downward. This is the same thing they did with all the other different configurations I tried. Why is using mouse thumb buttons under FreeBSD _rocket science_ ? Why is this a _hard problem_ ? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 01:06:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0803916A420 for ; Wed, 6 Jul 2005 01:06:21 +0000 (GMT) (envelope-from non_secure@yahoo.com) Received: from web53302.mail.yahoo.com (web53302.mail.yahoo.com [206.190.39.231]) by mx1.FreeBSD.org (Postfix) with SMTP id 6CBD643D45 for ; Wed, 6 Jul 2005 01:06:20 +0000 (GMT) (envelope-from non_secure@yahoo.com) Received: (qmail 84219 invoked by uid 60001); 6 Jul 2005 01:06:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=GG61LgwOaMne8VE65s0YWZQfj3s8SpyMccCdoXKdQ+h0uQxh7ZQSzfqtCzEck9ThDkoNWQsXyioZtsQEKdAI2OR8ticYqyIKux56576T4rirMqOXT7vRspbJZyI3uxT6ALGCqHZB0atW8ANmVAbzuQIzOqhfDbO6ikAQPjYgKFU= ; Message-ID: <20050706010619.84217.qmail@web53302.mail.yahoo.com> Received: from [208.186.91.245] by web53302.mail.yahoo.com via HTTP; Tue, 05 Jul 2005 18:06:19 PDT Date: Tue, 5 Jul 2005 18:06:19 -0700 (PDT) From: Joe Schmoe To: freebsd-hardware@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 06 Jul 2005 12:08:19 +0000 Cc: freebsd-hackers@freebsd.org Subject: logitech mx700 mouse button disfunction under FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 01:06:21 -0000 The logitech mx700 is a cordless 10-button mouse (3 buttons, two thumb buttons, scroll wheel up and down, two paging buttons, and one "app" button). While the mx500 mouse, that seems to be very closely related to the mx700, has been reported to work (scroll wheel and both thumb buttons function) under FreeBSD, and while the mx700 is working in the same fashion under linux, the mx700 _does not_ function under FreeBSD. Details: Using this configuration in your X/Xorg configuration file: Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/sysmouse" Option "Buttons" "7" Option "ZAxisMapping" "6 7" EndSection along with these startup options for X/Xorg: /usr/X11R6/bin/xmodmap -e "pointer = 1 2 3 6 7 4 5" /usr/X11R6/bin/imwheel -b "67" & and these settings in ~/.imwheelrc : ".*" None, Up, Alt_L|Left,1 None, Down, Alt_L|Right,1 "(null)" None, Up, Alt_L|Left,1 None, Down, Alt_L|Right,1 You will end up with the three standard buttons functioning, and the scrollwheel functioning (as buttons events 4 and 5). Further, the page up and down buttons will simply send double-4 and double-5 button events. However, the other three buttons (thumbs and app button) will _all send button event 5_. I have tried every conceivable combination of Zaxismapping, xmodmap settings, and with and without imwheel ... no matter what, the three final buttons (two thumbs and one app button) always produce the same button event. Even if you configure 9 or 10 buttons in your X config. Those three buttons will ALWAYS send the same button event. So what is the reason for this ? Why does the mx500 function and the mx700 does not ? More importantly, what is a strategy for getting to the bottom of this and fixing it ? If you look at the mailing list archives, there are many, many examples of people going through this same hell and just giving up. Comments ? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 12:22:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05B0716A41C for ; Wed, 6 Jul 2005 12:22:01 +0000 (GMT) (envelope-from appaquet@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84FEC43D46 for ; Wed, 6 Jul 2005 12:22:00 +0000 (GMT) (envelope-from appaquet@gmail.com) Received: by wproxy.gmail.com with SMTP id 36so1111265wra for ; Wed, 06 Jul 2005 05:22:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=beQ1V/vIQbUGzIHwDcytlwMvEzc4udwae2fvd3hQv12wdMfHXWrf4q6b5T/criKmb6CI5oObWzcpiSYjvZ/I1kYJHXKeCZGsuppEZ9lj5GjQyVGMsLICg0ZhlYmZnKlzmJ3PZitjS5/SQUeBx8MQBpy0Lis4Yn/lfBQumITghEA= Received: by 10.54.160.2 with SMTP id i2mr359055wre; Wed, 06 Jul 2005 05:14:53 -0700 (PDT) Received: by 10.54.138.6 with HTTP; Wed, 6 Jul 2005 05:14:53 -0700 (PDT) Message-ID: <7042066405070605141aa19ec3@mail.gmail.com> Date: Wed, 6 Jul 2005 08:14:53 -0400 From: =?ISO-8859-1?Q?Andr=E9-Philippe_Paquet?= To: freebsd-hackers@freebsd.org In-Reply-To: <20050705205731.7147.qmail@web53305.mail.yahoo.com> Mime-Version: 1.0 References: <7042066405052710237034cdde@mail.gmail.com> <20050705205731.7147.qmail@web53305.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Using a logitech mx700 with scrollwheel _and_ thumb buttons X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?ISO-8859-1?Q?Andr=E9-Philippe_Paquet?= List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 12:22:01 -0000 Sorry, I didn't see your last message! Start xwindows with your favorite wm= =20 and in a terminal, run: imwheel -b "67" & xmodmap -e "pointer =3D 1 2 3 6 7 4 5" If it doesn't work, it may be something else. I just redid the whole=20 process I told and it works here. Andre-Philippe On 7/5/05, Joe Schmoe wrote: >=20 >=20 > Andre, >=20 > --- Andr=E9-Philippe Paquet wrote: >=20 > > My MX500 is working just fine. Here what I do: > > > > - Install imwheel (/usr/ports/x11/imwheel) > > > > > > - Add this to ~/.imwheelrc > > > > ".*" > > None, Up, Alt_L|Left,1 > > None, Down, Alt_L|Right,1 > > > > "(null)" > > None, Up, Alt_L|Left,1 > > None, Down, Alt_L|Right,1 > > > > > > - In my x.org file.. For the > > InputDevice section: > > > > Option "Buttons" "7" > > Option "ZAxisMapping" "6 7" > > > > - Finaly, I run these two commands on Xwindows > > start: > > > > imwheel -b "67" & > > xmodmap -e "pointer =3D 1 2 3 6 7 4 5" >=20 >=20 > Nope. I reproduced these same settings _exactly_, and > they produce the same results. >=20 > With your settings above, the scroll wheel works fine, > and the two thumb buttons each cause the web page to > scroll very slightly downward. This is the same thing > they did with all the other different configurations I > tried. >=20 > Why is using mouse thumb buttons under FreeBSD _rocket > science_ ? Why is this a _hard problem_ ? >=20 > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 14:24:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 004DC16A41C; Wed, 6 Jul 2005 14:24:12 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71BF243D5C; Wed, 6 Jul 2005 14:24:12 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3D5A9.dip.t-dialin.net [84.163.213.169] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML25U-1DqAot19C9-0004dx; Wed, 06 Jul 2005 16:24:11 +0200 From: Max Laier To: freebsd-hackers@freebsd.org Date: Wed, 6 Jul 2005 16:24:01 +0200 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3408122.ssWZRlAURO"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200507061624.09477.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-current@freebsd.org Subject: Call for FreeBSD status reports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 14:24:13 -0000 --nextPart3408122.ssWZRlAURO Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline All, Three month of fruitful development have passed since the last round of=20 =46reeBSD status reports, and the release of FreeBSD 6.0 is on the=20 doorstep. =A0We hope that you made good progress on your projects and have= =20 interesting news to share. =A0Please do so by sending a status report to=20 monthly@freebsd.org Submissions are due by July 15, 2005. Reports should cover activities during May to June, but may of course cover= =20 earlier work as well. =A0In addition we encourage you to use the "Open Task= s"=20 section to recruit help for your project and point out future direction. Submissions are *not* limited to FreeBSD developers with commit rights! =A0= It is=20 open to everybody who is doing FreeBSD related work and wants to share=20 progress with the community. =A0The status reports are also a good vehicle = to=20 gather interested people for you WIP. We have introduced a new category called "soc" to pool reports related to=20 Google Summer of Code. =A0We hope for interesting news from that corner! To help you with fileing your report you will find a webform or xml-templat= e=20 linked from http://www.freebsd.org/news/status/ (as soon as the www build=20 completes). Submissions are due on July 15. =A0Thanks a lot, and we are hoping for a bi= g=20 turn-out. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart3408122.ssWZRlAURO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBCy+mJXyyEoT62BG0RAl/3AJ4sIEHVgP98bEOMBm7i08e60P6shQCfW+qI nTwbi+AAgH7vHMaqbcqE4F4= =/p5Q -----END PGP SIGNATURE----- --nextPart3408122.ssWZRlAURO-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 17:31:18 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33C8A16A41C for ; Wed, 6 Jul 2005 17:31:18 +0000 (GMT) (envelope-from tom.schutter@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id A34CD43D45 for ; Wed, 6 Jul 2005 17:31:17 +0000 (GMT) (envelope-from tom.schutter@gmail.com) Received: by zproxy.gmail.com with SMTP id p8so286nzb for ; Wed, 06 Jul 2005 10:31:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pzVm6bh7NWoXjngd9AnMK4FNM0rSzf/I0L8kv2eN4DVQc6PgvmuNdW5PlZo8TMDvSKA9tH3GouF2QOf4IUGrdeD6VnY4cWIs4VEUGK0AKaWsP/RO4/NEa3fY6X2mC17iahbEKzpUhoh1dUwoLTgsc7iwaygMmISDH5gqT+tEKZY= Received: by 10.36.222.64 with SMTP id u64mr44818nzg; Wed, 06 Jul 2005 09:29:21 -0700 (PDT) Received: by 10.36.25.14 with HTTP; Wed, 6 Jul 2005 09:29:20 -0700 (PDT) Message-ID: Date: Wed, 6 Jul 2005 10:29:20 -0600 From: Tom Schutter To: vd@datamax.bg, phantom@FreeBSD.org In-Reply-To: <20050706054753.GA69973@sinanica.bg.datamax> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050706054753.GA69973@sinanica.bg.datamax> Cc: freebsd-hackers@freebsd.org Subject: Re: linking libjava.so RPATH problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tom Schutter List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 17:31:18 -0000 On 7/5/05, Vasil Dimov wrote: > On Tue, Jul 05, 2005 at 03:55:26PM -0600, Tom Schutter wrote: > > I am having problems linking in the Java JVM libraries (libjava.so, > > libverify.so, libjvm.so) into my executable. > > > > With these options added to my gcc command: > > -L/usr/local/jdk1.4.2/jre/lib/i386 -ljava -lverify > > -L/usr/local/jdk1.4.2/jre/lib/i386/server -ljvm > > > > It links ok, but when I try to run it I get: > > $ ./testme > > /libexec/ld-elf.so.1: Shared object "libjava.so" not found, required by > > "testme" > > > > At this point ldd tells me: > > $ ldd testme > > testme: > > libm.so.3 =3D3D> /lib/libm.so.3 (0x2807c000) > > libjava.so =3D3D> not found (0x0) > > libverify.so =3D3D> not found (0x0) > > libjvm.so =3D3D> not found (0x0) > > libpthread.so.1 =3D3D> /usr/lib/libpthread.so.1 (0x28097000) > > libc.so.5 =3D3D> /lib/libc.so.5 (0x280bb000) > > > > Using -Xlinker -rpath -Xlinker PATH_TO_JRE_DIR, I can tell my executabl= e to > > look in the JRE dir for libjvm.so. I have verified that RPATH has been= set > > in the executable using objdump: > > $ objdump -x testme | grep RPATH > > RPATH /usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.2/jre/l= ib/i386/server > > > > But when I run the executable, it cannot find libjvm.so: > > $ ./testme > > /libexec/ld-elf.so.1: Shared object "libjvm.so" not found, required by > > "libjava.so" > > > > At this point ldd tells me: > > $ ldd ./testme > > ./testme: > > libm.so.3 =3D3D> /lib/libm.so.3 (0x2807c000) > > libjava.so =3D3D> /usr/local/jdk1.4.2/jre/lib/i386/libjava.so (0= x28097000) > > libverify.so =3D3D> /usr/local/jdk1.4.2/jre/lib/i386/libverify.s= o > > (0x280b5000) > > libjvm.so =3D3D> > > /usr/local/jdk1.4.2/jre/lib/i386/server/libjvm.so (0x280ca000) > > libpthread.so.1 =3D3D> /usr/lib/libpthread.so.1 (0x28702000) > > libc.so.5 =3D3D> /lib/libc.so.5 (0x28726000) > > libjvm.so =3D3D> not found (0x0) > > libverify.so =3D3D> not found (0x0) > > libjvm.so =3D3D> not found (0x0) > > libstdc++.so.4 =3D3D> /usr/lib/libstdc++.so.4 (0x28800000) > > > > Note that at this point on Linux, testme runs ok. > > > > If I set LD_LIBRARY_PATH, the libraries are found (no output is correct= ): > > $ LD_LIBRARY_PATH=3D3D/usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.= 4.2/jre/lib/i386/server > > ./testme > > $ > > > > My questions are: > > > > 1) Why is the RPATH in the executable being ignored? >=20 > Here are my suggestions: >=20 > It is not being ignored, as you see: libjava.so, libverify.so and > libjvm.so were found in /usr/local/jdk1.4.2/jre/lib/i386/ >=20 > > 2) When I add the -rpath, I get two copies of a libjvm.so reference in = testme, > > one that resolves correctly, and one that doesn't. Why? >=20 > What happens is that libjava.so "depends" on libjvm.so and libverify.so > itself: > % ldd /usr/local/jdk1.4.2/jre/lib/i386/libjava.so > /usr/local/jdk1.4.2/jre/lib/i386/libjava.so: > libjvm.so =3D> not found (0x0) > libverify.so =3D> not found (0x0) >=20 > and libverify.so "depends" on libjvm.so itself: > % ldd /usr/local/jdk1.4.2/jre/lib/i386/libverify.so > /usr/local/jdk1.4.2/jre/lib/i386/libverify.so: > libjvm.so =3D> not found (0x0) >=20 > So, after finding libjava.so, libverify.so and libjvm.so, required by > "testme" executable (thanks to its RPATH) the linker sees that > libjava.so itself depends on libjvm.so and libverify.so and: > 1. does not notice that they are already found/loaded > 2. does not use the rpath in "testme" > 3. starts looking for them in the standard path and does not find them >=20 > > 3) What is the correct way of linking in libjvm.so? >=20 > In my point of view the libjava.so and libverify.so shared objects are > incorrect in the way that they depend on some shared objects, that are > not located in the standard path *AND* libjava.so and libverify.so do > not have RPATH in themselves. >=20 > 1. Recompile libjava.so and libverify.so without -L... -l..., it is not > needed anyway. > OR > 2. Recompile libjava.so and libverify.so with -L... -l..., but also add > -rpath > OR > 3. Use ldconfig -m (see ldconfig_paths in rc.conf(5)) > OR > 4. Use LD_LIBRARY_PATH >=20 > > Thanks, > > -- > > Tom Schutter This is making more sense now. 1) Does the fact that the linker does not realize that the libraries have already been found indicate a bug in the linker? If so, how do I best report it? 2) Because libjava.so and libverify.so were compiled by the java/jdk14 port, your suggestions on recompiling those libraries should be done within that framework. (This part is for you Alexey). 3) For now, I will try using ldconfig, but I think that the better solution is to fix the creation of the shared libraries. --=20 Tom Schutter From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 18:55:41 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61E1916A41C for ; Wed, 6 Jul 2005 18:55:41 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id D774343D45 for ; Wed, 6 Jul 2005 18:55:40 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) X-Envelope-From: stsp@stsp.in-berlin.de X-Envelope-To: Received: from dice.seeling33.de (e178167200.adsl.alicedsl.de [85.178.167.200]) (authenticated bits=0) by einhorn.in-berlin.de (8.12.10/8.12.10/Debian-4) with ESMTP id j66ItaNK027584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 6 Jul 2005 20:55:38 +0200 Received: by dice.seeling33.de (Postfix, from userid 1001) id BD94B33C38; Wed, 6 Jul 2005 20:55:36 +0200 (CEST) Date: Wed, 6 Jul 2005 20:55:36 +0200 From: Stefan Sperling To: freebsd-hackers@freebsd.org Message-ID: <20050706185536.GA4700@dice.seeling33.de> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Spam-Score: (-1.602) AWL,BAYES_00,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Jul 2005 18:55:41 -0000 Hello hackers, I am getting a bus error in my application when I call strsep and it matches a character. It doesn't matter whether I call the strsep from my libc or a freshly compiled one, the error stays the same. This is my test case: $ cat strsep.c #define NULL ((void*)0) /* copied verbatim from /usr/src/lib/libc/string/strsep.c, * except for the name change */ char * mystrsep(stringp, delim) char **stringp; const char *delim; { char *s; const char *spanp; int c, sc; char *tok; if ((s = *stringp) == NULL) return (NULL); for (tok = s;;) { c = *s++; spanp = delim; do { if ((sc = *spanp++) == c) { if (c == 0) s = NULL; else s[-1] = 0; *stringp = s; return (tok); } } while (sc != 0); } /* NOTREACHED */ } int main(int argc, char* argv[]) { char *c = "whats:your:name:buddy?"; (void*)mystrsep(&c, ":"); } $ gcc -g -o strsep strsep.c $ gdb strsep (gdb) run Starting program: /home/stsp/test/strsep Program received signal SIGBUS, Bus error. 0x080484f2 in mystrsep (stringp=0xbfbfea34, delim=0x80485e6 ":") at strsep.c:26 26 s[-1] = 0; (gdb) print s[-1] $1 = 58 ':' (gdb) When I single step through mystrsep the program works fine. I am running FreeBSD-current from 17th June 2005 on an Athlon-XP, no SMP involved. I can reproduce the error on a dual Celeron box running FreeBSD-5.4-RELEASE with SMP. And I also get the same error with similar code using strtok. Can anyone else reproduce this? thanks a lot, -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0 From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 19:09:17 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC5BC16A41C for ; Wed, 6 Jul 2005 19:09:17 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 830C743D49 for ; Wed, 6 Jul 2005 19:09:17 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id BF99D3BEC2; Wed, 6 Jul 2005 14:09:16 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17166-01-89; Wed, 6 Jul 2005 14:09:16 -0500 (CDT) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45]) by mailgate1b.savvis.net (Postfix) with ESMTP id 957163BE9A; Wed, 6 Jul 2005 14:09:16 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Jul 2005 14:09:09 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Jul 2005 14:08:37 -0500 Message-ID: <42CC2C36.7090003@savvis.net> Date: Wed, 06 Jul 2005 12:08:38 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stefan Sperling References: <20050706185536.GA4700@dice.seeling33.de> In-Reply-To: <20050706185536.GA4700@dice.seeling33.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Jul 2005 19:08:38.0100 (UTC) FILETIME=[1D5B8140:01C5825E] X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-hackers@freebsd.org Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Jul 2005 19:09:17 -0000 Stefan, > int main(int argc, char* argv[]) > { > char *c = "whats:your:name:buddy?"; ^^^^^^^^^^^^^^^^ that is not read only copy. you can not write into it. replace it with char *c = strdup("whats:your:name:buddy?"); > (void*)mystrsep(&c, ":"); > } > and it should work. thanks, max From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 19:10:40 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51C5616A41C for ; Wed, 6 Jul 2005 19:10:40 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDDC943D4C for ; Wed, 6 Jul 2005 19:10:39 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id 8E6B43BEC2; Wed, 6 Jul 2005 14:10:39 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10271-01-83; Wed, 6 Jul 2005 14:10:39 -0500 (CDT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (Postfix) with ESMTP id 66BF13BE98; Wed, 6 Jul 2005 14:10:39 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Jul 2005 14:10:58 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Jul 2005 14:10:19 -0500 Message-ID: <42CC2C9F.5000301@savvis.net> Date: Wed, 06 Jul 2005 12:10:23 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stefan Sperling References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> In-Reply-To: <42CC2C36.7090003@savvis.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Jul 2005 19:10:20.0057 (UTC) FILETIME=[5A20E890:01C5825E] X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-hackers@freebsd.org Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Jul 2005 19:10:40 -0000 Maksim Yevmenkin wrote: > Stefan, > >> int main(int argc, char* argv[]) >> { >> char *c = "whats:your:name:buddy?"; > > ^^^^^^^^^^^^^^^^ that is not read only copy. you can not write into it. replace it with made type. that should read "that is read only copy" :) > > char *c = strdup("whats:your:name:buddy?"); > >> (void*)mystrsep(&c, ":"); >> } >> > > and it should work. > > thanks, > max > From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 19:41:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 597C016A41C for ; Wed, 6 Jul 2005 19:41:09 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD45E43D49 for ; Wed, 6 Jul 2005 19:41:08 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) X-Envelope-From: stsp@stsp.in-berlin.de X-Envelope-To: Received: from dice.seeling33.de (e178167200.adsl.alicedsl.de [85.178.167.200]) (authenticated bits=0) by einhorn.in-berlin.de (8.12.10/8.12.10/Debian-4) with ESMTP id j66Jf2NK031954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 6 Jul 2005 21:41:06 +0200 Received: by dice.seeling33.de (Postfix, from userid 1001) id 3FC5033C38; Wed, 6 Jul 2005 21:41:01 +0200 (CEST) Date: Wed, 6 Jul 2005 21:41:00 +0200 From: Stefan Sperling To: freebsd-hackers@freebsd.org Message-ID: <20050706194100.GA5170@dice.seeling33.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> <42CC2C9F.5000301@savvis.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42CC2C9F.5000301@savvis.net> User-Agent: Mutt/1.4.2.1i X-Spam-Score: (-1.595) AWL,BAYES_00,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Jul 2005 19:41:09 -0000 On Wed, Jul 06, 2005 at 12:10:23PM -0700, Maksim Yevmenkin wrote: > Maksim Yevmenkin wrote: > >> char *c = "whats:your:name:buddy?"; > > > > ^^^^^^^^^^^^^^^^ that is not read only copy. you can not write > > into it. replace it with > > made type. that should read "that is read only copy" :) Dark corners of C... So it's my own fault, as usual :) thanks a lot :) -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0 From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 19:56:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95EAC16A421 for ; Wed, 6 Jul 2005 19:56:09 +0000 (GMT) (envelope-from dimitry@andric.com) Received: from tensor.xs4all.nl (tensor.xs4all.nl [194.109.160.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAC1A43D49 for ; Wed, 6 Jul 2005 19:56:08 +0000 (GMT) (envelope-from dimitry@andric.com) Received: from kilgore.dim (kilgore.dim [192.168.0.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.xs4all.nl (Postfix) with ESMTP id 833C7B80B; Wed, 6 Jul 2005 21:56:06 +0200 (CEST) Date: Wed, 6 Jul 2005 21:56:00 +0200 From: Dimitry Andric X-Mailer: The Bat! (v3.51) Professional X-Priority: 3 (Normal) Message-ID: <732507769.20050706215600@andric.com> To: Stefan Sperling In-Reply-To: <20050706194100.GA5170@dice.seeling33.de> References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> <42CC2C9F.5000301@savvis.net> <20050706194100.GA5170@dice.seeling33.de> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="----------6914A7B38FCAC75" Cc: freebsd-hackers@freebsd.org Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dimitry Andric List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 19:56:09 -0000 ------------6914A7B38FCAC75 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On 2005-07-06 at 21:41:00 Stefan Sperling wrote: >> >> char *c = "whats:your:name:buddy?"; >> made type. that should read "that is read only copy" :) > Dark corners of C... So it's my own fault, as usual :) Actually, this dark corner was enlightened not so long ago. String constants used to be writable for years, until someone decided that it was better not to. :) Anyway, you can get the old (deprecated!) behaviour by using the -fwritable-strings option to gcc. ------------6914A7B38FCAC75 Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: GnuPG v1.4.1 (MingW32) iD8DBQFCzDdQsF6jCi4glqMRArGXAKDZYPhNPj8YIVJARdYxO3yV6I3gCQCfU8nq og92sKnFlhnMPKJu5aNjvdQ= =aZAb -----END PGP MESSAGE----- ------------6914A7B38FCAC75-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 20:01:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEE9716A41C for ; Wed, 6 Jul 2005 20:01:20 +0000 (GMT) (envelope-from julian@elischer.org) Received: from postoffice.vicor-nb.com (www.vicor.com [12.155.182.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F6CA43D45 for ; Wed, 6 Jul 2005 20:01:20 +0000 (GMT) (envelope-from julian@elischer.org) Received: from localhost (localhost [127.0.0.1]) by postoffice.vicor-nb.com (Postfix) with ESMTP id 165E64CE95A; Wed, 6 Jul 2005 13:01:20 -0700 (PDT) Received: from postoffice.vicor-nb.com ([127.0.0.1]) by localhost (postoffice.vicor-nb.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 66395-10; Wed, 6 Jul 2005 13:01:19 -0700 (PDT) Received: from bigwoop.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by postoffice.vicor-nb.com (Postfix) with ESMTP id 1C8F04CE959; Wed, 6 Jul 2005 13:01:19 -0700 (PDT) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by bigwoop.vicor-nb.com (Postfix) with ESMTP id 0C29E7A439; Wed, 6 Jul 2005 13:01:19 -0700 (PDT) Message-ID: <42CC388E.3000906@elischer.org> Date: Wed, 06 Jul 2005 13:01:18 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050629 X-Accept-Language: en, hu MIME-Version: 1.0 To: Joe Schmoe References: <20050705205731.7147.qmail@web53305.mail.yahoo.com> In-Reply-To: <20050705205731.7147.qmail@web53305.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postoffice.vicor.com Cc: freebsd-hackers@freebsd.org Subject: Re: Using a logitech mx700 with scrollwheel _and_ thumb buttons X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Jul 2005 20:01:21 -0000 Joe Schmoe wrote: >Andre, > >--- André-Philippe Paquet wrote: > > > >>My MX500 is working just fine. Here what I do: >> >> - Install imwheel (/usr/ports/x11/imwheel) >> >> >> - Add this to ~/.imwheelrc >> >>".*" >>None, Up, Alt_L|Left,1 >>None, Down, Alt_L|Right,1 >> >>"(null)" >>None, Up, Alt_L|Left,1 >>None, Down, Alt_L|Right,1 >> >> >> - In my x.org file.. For the >>InputDevice section: >> >>Option "Buttons" "7" >>Option "ZAxisMapping" "6 7" >> >> - Finaly, I run these two commands on Xwindows >>start: >> >>imwheel -b "67" & >>xmodmap -e "pointer = 1 2 3 6 7 4 5" >> >> > > >Nope. I reproduced these same settings _exactly_, and >they produce the same results. > >With your settings above, the scroll wheel works fine, >and the two thumb buttons each cause the web page to >scroll very slightly downward. This is the same thing >they did with all the other different configurations I >tried. > >Why is using mouse thumb buttons under FreeBSD _rocket >science_ ? Why is this a _hard problem_ ? > > because no-one who has the interest in fixing it has the time to do so and visa versa. >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 20:39:31 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14AB916A41C for ; Wed, 6 Jul 2005 20:39:31 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 620F543D4C for ; Wed, 6 Jul 2005 20:39:30 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-a073.otenet.gr [212.205.215.73]) by rosebud.otenet.gr (8.13.4/8.13.4/Debian-1) with ESMTP id j66KdR0E028175; Wed, 6 Jul 2005 23:39:28 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.4/8.13.4) with ESMTP id j66KdODE006319; Wed, 6 Jul 2005 23:39:24 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.4/8.13.4/Submit) id j66KdODL006318; Wed, 6 Jul 2005 23:39:24 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Wed, 6 Jul 2005 23:39:24 +0300 From: Giorgos Keramidas To: Maksim Yevmenkin Message-ID: <20050706203924.GB6160@gothmog.gr> References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42CC2C36.7090003@savvis.net> Cc: freebsd-hackers@freebsd.org, Stefan Sperling Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Jul 2005 20:39:31 -0000 On 2005-07-06 12:08, Maksim Yevmenkin wrote: > Stefan, > > >int main(int argc, char* argv[]) > >{ > > char *c = "whats:your:name:buddy?"; > ^^^^^^^^^^^^^^^^ that is not read only copy. you can not write > into it. replace it with > > char *c = strdup("whats:your:name:buddy?"); Or the following: char c[] = "whats:your:name:buddy?"; which doesn't require a free() operation when you're done with c[]. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 20:46:48 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49E6B16A41C; Wed, 6 Jul 2005 20:46:48 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2E2B43D46; Wed, 6 Jul 2005 20:46:47 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id 330883BEF1; Wed, 6 Jul 2005 15:46:47 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22519-02-32; Wed, 6 Jul 2005 15:46:47 -0500 (CDT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (Postfix) with ESMTP id 071223BE2A; Wed, 6 Jul 2005 15:46:47 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Jul 2005 15:46:44 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Jul 2005 15:46:42 -0500 Message-ID: <42CC4331.7080703@savvis.net> Date: Wed, 06 Jul 2005 13:46:41 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Giorgos Keramidas References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> <20050706203924.GB6160@gothmog.gr> In-Reply-To: <20050706203924.GB6160@gothmog.gr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Jul 2005 20:46:42.0937 (UTC) FILETIME=[D0FE5E90:01C5826B] X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-hackers@freebsd.org, Stefan Sperling Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Jul 2005 20:46:48 -0000 >>>int main(int argc, char* argv[]) >>>{ >>> char *c = "whats:your:name:buddy?"; >> >> ^^^^^^^^^^^^^^^^ that is not read only copy. you can not write >>into it. replace it with >> >> char *c = strdup("whats:your:name:buddy?"); > > Or the following: > > char c[] = "whats:your:name:buddy?"; > > which doesn't require a free() operation when you're done with c[]. actually it still will crash :) beetle% cat 5.c #include int main(int argc, char* argv[]) { char c[] = "whats:your:name:buddy?"; strsep((char **) &c, ":"); return (0); } beetle% gcc -Wall -ggdb 5.c beetle% ./a.out Segmentation fault (core dumped) so something like this #include int main(int argc, char* argv[]) { char c[] = "whats:your:name:buddy?", *s = c; strsep((char **) &s, ":"); return (0); } will work too. max From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 05:44:26 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 936B116A433 for ; Thu, 7 Jul 2005 05:44:26 +0000 (GMT) (envelope-from dipjyoti.saikia@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A56E43D45 for ; Thu, 7 Jul 2005 05:44:25 +0000 (GMT) (envelope-from dipjyoti.saikia@gmail.com) Received: by zproxy.gmail.com with SMTP id s18so53772nze for ; Wed, 06 Jul 2005 22:44:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gDRmuKIO397dRJx2WMOVuIyukkViTb3EUm6jhvkSvOvIOvRP/rnD8cWhLjpC+XyhZdSZF9sU555Glw6zYkhbmT0Wx/lLJAGXbn8VdalOuhVbcgX2Z/UNGynovr9qNRq2XanLcAfip32sdb/NRtr3YQ4hLFwO1M4N8cZTRL2H0yI= Received: by 10.36.222.4 with SMTP id u4mr170622nzg; Wed, 06 Jul 2005 22:44:25 -0700 (PDT) Received: by 10.36.77.20 with HTTP; Wed, 6 Jul 2005 22:44:25 -0700 (PDT) Message-ID: Date: Thu, 7 Jul 2005 11:14:25 +0530 From: Dipjyoti Saikia To: Dan Nelson In-Reply-To: <20050705143814.GA38925@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050705143814.GA38925@dan.emsphone.com> Cc: freebsd-hackers@freebsd.org Subject: Re: thread-safe popen X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dipjyoti Saikia List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2005 05:44:26 -0000 Hi , Please find the code snippet of popen() from the source code that I have (We are working on an OS that is derived from FreeBSD 4.1) . I don't think I have the thread safe version . ------------------------- FILE * popen(command, type) const char *command, *type; { struct pid *cur; FILE *iop; int pdes[2], pid, twoway; char *argv[4]; struct pid *p; /* * Lite2 introduced two-way popen() pipes using socketpair(). * FreeBSD's pipe() is bidirectional, so we use that. */ if (strchr(type, '+')) { twoway =3D 1; type =3D "r+"; } else { twoway =3D 0; if ((*type !=3D 'r' && *type !=3D 'w') || type[1]) return (NULL); } if (pipe(pdes) < 0) return (NULL); if ((cur =3D malloc(sizeof(struct pid))) =3D=3D NULL) { (void)_close(pdes[0]); (void)_close(pdes[1]); return (NULL); } argv[0] =3D "sh"; argv[1] =3D "-c"; argv[2] =3D (char *)command; argv[3] =3D NULL; switch (pid =3D vfork()) { case -1: /* Error. */ (void)_close(pdes[0]); (void)_close(pdes[1]); free(cur); return (NULL); /* NOTREACHED */ case 0: /* Child. */ if (*type =3D=3D 'r') { /* * The dup2() to STDIN_FILENO is repeated to avoid * writing to pdes[1], which might corrupt the * parent's copy. This isn't good enough in * general, since the _exit() is no return, so * the compiler is free to corrupt all the local * variables. */ (void)_close(pdes[0]); if (pdes[1] !=3D STDOUT_FILENO) { (void)dup2(pdes[1], STDOUT_FILENO); (void)_close(pdes[1]); if (twoway) (void)dup2(STDOUT_FILENO, STDIN_FIL= ENO); } else if (twoway && (pdes[1] !=3D STDIN_FILENO)) (void)dup2(pdes[1], STDIN_FILENO); } else { if (pdes[0] !=3D STDIN_FILENO) { (void)dup2(pdes[0], STDIN_FILENO); (void)_close(pdes[0]); } (void)_close(pdes[1]); } for (p =3D pidlist; p; p =3D p->next) { (void)_close(fileno(p->fp)); } execve(_PATH_BSHELL, argv, environ); _exit(127); /* NOTREACHED */ } --- ---- } -------------------------------------------------- We had cases where our RAID applications (multi-threaded ) failed=20 with invocations of popen() . Initially we handpicked the popen() calls and replaced it with actual code of the functions but it was simply too much work and little gain . So we decided to backport a thread-safe version . (If the above code is not thread-safe then we will have a bigger problem at hand .) --Dip On 7/5/05, Dan Nelson wrote: > In the last episode (Jul 05), Dipjyoti Saikia said: > > I am working on an OS derived for BSD 4.1 . I am trying to backport > > a thread-safe version of popen() from BSD 4.10 . >=20 > popen should be threadsafe as of rev 1.17 (2003-01-03) of > /usr/src/lib/libc/gen/popen.c . It was merged into the 4.* branch in > rev 1.14.2.1 (2004/12/15). The PR is bin/50770 . Do you have a > testcase that causes it to fail? >=20 > -- > Dan Nelson > dnelson@allantgroup.com > From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 06:09:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C185B16A41C; Thu, 7 Jul 2005 06:09:16 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D2CA43D46; Thu, 7 Jul 2005 06:09:15 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from sinanica.bg.datamax (sinanica.bg.datamax [192.168.10.1]) by jengal.datamax.bg (Postfix) with QMQP id 7E9FF87CA; Thu, 7 Jul 2005 09:09:14 +0300 (EEST) Received: (nullmailer pid 3517 invoked by uid 1004); Thu, 07 Jul 2005 06:09:14 -0000 Date: Thu, 7 Jul 2005 09:09:14 +0300 From: Vasil Dimov To: Tom Schutter Message-ID: <20050707060914.GA3480@sinanica.bg.datamax> References: <20050706054753.GA69973@sinanica.bg.datamax> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org, phantom@FreeBSD.org Subject: Re: linking libjava.so RPATH problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2005 06:09:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Jul 06, 2005 at 10:29:20AM -0600, Tom Schutter wrote: > On 7/5/05, Vasil Dimov wrote: > > On Tue, Jul 05, 2005 at 03:55:26PM -0600, Tom Schutter wrote: > > > I am having problems linking in the Java JVM libraries (libjava.so, > > > libverify.so, libjvm.so) into my executable. > > > > > > With these options added to my gcc command: > > > -L/usr/local/jdk1.4.2/jre/lib/i386 -ljava -lverify > > > -L/usr/local/jdk1.4.2/jre/lib/i386/server -ljvm > > > > > > It links ok, but when I try to run it I get: > > > $ ./testme > > > /libexec/ld-elf.so.1: Shared object "libjava.so" not found, required by > > > "testme" > > > > > > At this point ldd tells me: > > > $ ldd testme > > > testme: > > > libm.so.3 =3D> /lib/libm.so.3 (0x2807c000) > > > libjava.so =3D> not found (0x0) > > > libverify.so =3D> not found (0x0) > > > libjvm.so =3D> not found (0x0) > > > libpthread.so.1 =3D> /usr/lib/libpthread.so.1 (0x28097000) > > > libc.so.5 =3D> /lib/libc.so.5 (0x280bb000) > > > > > > Using -Xlinker -rpath -Xlinker PATH_TO_JRE_DIR, I can tell my executable to > > > look in the JRE dir for libjvm.so. I have verified that RPATH has been set > > > in the executable using objdump: > > > $ objdump -x testme | grep RPATH > > > RPATH /usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.2/jre/lib/i386/server > > > > > > But when I run the executable, it cannot find libjvm.so: > > > $ ./testme > > > /libexec/ld-elf.so.1: Shared object "libjvm.so" not found, required by > > > "libjava.so" > > > > > > At this point ldd tells me: > > > $ ldd ./testme > > > ./testme: > > > libm.so.3 =3D> /lib/libm.so.3 (0x2807c000) > > > libjava.so =3D> /usr/local/jdk1.4.2/jre/lib/i386/libjava.so (0x28097000) > > > libverify.so =3D> /usr/local/jdk1.4.2/jre/lib/i386/libverify.so > > > (0x280b5000) > > > libjvm.so =3D> > > > /usr/local/jdk1.4.2/jre/lib/i386/server/libjvm.so (0x280ca000) > > > libpthread.so.1 =3D> /usr/lib/libpthread.so.1 (0x28702000) > > > libc.so.5 =3D> /lib/libc.so.5 (0x28726000) > > > libjvm.so =3D> not found (0x0) > > > libverify.so =3D> not found (0x0) > > > libjvm.so =3D> not found (0x0) > > > libstdc++.so.4 =3D> /usr/lib/libstdc++.so.4 (0x28800000) > > > > > > Note that at this point on Linux, testme runs ok. > > > > > > If I set LD_LIBRARY_PATH, the libraries are found (no output is correct): > > > $ LD_LIBRARY_PATH=3D/usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.2/jre/lib/i386/server > > > ./testme > > > $ > > > > > > My questions are: > > > > > > 1) Why is the RPATH in the executable being ignored? > > > > Here are my suggestions: > > > > It is not being ignored, as you see: libjava.so, libverify.so and > > libjvm.so were found in /usr/local/jdk1.4.2/jre/lib/i386/ > > > > > 2) When I add the -rpath, I get two copies of a libjvm.so reference in testme, > > > one that resolves correctly, and one that doesn't. Why? > > > > What happens is that libjava.so "depends" on libjvm.so and libverify.so > > itself: > > % ldd /usr/local/jdk1.4.2/jre/lib/i386/libjava.so > > /usr/local/jdk1.4.2/jre/lib/i386/libjava.so: > > libjvm.so => not found (0x0) > > libverify.so => not found (0x0) > > > > and libverify.so "depends" on libjvm.so itself: > > % ldd /usr/local/jdk1.4.2/jre/lib/i386/libverify.so > > /usr/local/jdk1.4.2/jre/lib/i386/libverify.so: > > libjvm.so => not found (0x0) > > > > So, after finding libjava.so, libverify.so and libjvm.so, required by > > "testme" executable (thanks to its RPATH) the linker sees that > > libjava.so itself depends on libjvm.so and libverify.so and: > > 1. does not notice that they are already found/loaded > > 2. does not use the rpath in "testme" > > 3. starts looking for them in the standard path and does not find them > > > > > 3) What is the correct way of linking in libjvm.so? > > > > In my point of view the libjava.so and libverify.so shared objects are > > incorrect in the way that they depend on some shared objects, that are > > not located in the standard path *AND* libjava.so and libverify.so do > > not have RPATH in themselves. > > > > 1. Recompile libjava.so and libverify.so without -L... -l..., it is not > > needed anyway. > > OR > > 2. Recompile libjava.so and libverify.so with -L... -l..., but also add > > -rpath > > OR > > 3. Use ldconfig -m (see ldconfig_paths in rc.conf(5)) > > OR > > 4. Use LD_LIBRARY_PATH > > > > > Thanks, > > > -- > > > Tom Schutter > > This is making more sense now. > > 1) Does the fact that the linker does not realize that the libraries > have already been found indicate a bug in the linker? If so, how do I > best report it? I cannot think of any sensible reason for this behavior, so I guess it would be good if it can be "fixed" without breaking something else :) You best report it by creating a patch and using send-pr(1) to submit it. > 2) Because libjava.so and libverify.so were compiled by the java/jdk14 > port, your suggestions on recompiling those libraries should be done > within that framework. (This part is for you Alexey). Yes, I meant that you hack the port's Makefile and if something good comes out publish your changes with send-pr(1) :) > 3) For now, I will try using ldconfig, but I think that the better > solution is to fix the creation of the shared libraries. > > -- > Tom Schutter -----BEGIN PGP SIGNATURE----- iD8DBQFCzMcKFw6SP/bBpCARAviQAJ9SXLAegyH8o10+ikSJD1Pg1KbYwgCgr+LY raZMoJREpiETsKG8VEJGdVk= =hKrK -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 07:13:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B0E416A41C for ; Thu, 7 Jul 2005 07:13:44 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23D2443D48 for ; Thu, 7 Jul 2005 07:13:43 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j677DhH4090470; Thu, 7 Jul 2005 02:13:43 -0500 (CDT) (envelope-from dan) Date: Thu, 7 Jul 2005 02:13:43 -0500 From: Dan Nelson To: Dipjyoti Saikia Message-ID: <20050707071343.GD38925@dan.emsphone.com> References: <20050705143814.GA38925@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: thread-safe popen X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 07 Jul 2005 07:13:44 -0000 In the last episode (Jul 07), Dipjyoti Saikia said: > On 7/5/05, Dan Nelson wrote: > > In the last episode (Jul 05), Dipjyoti Saikia said: > > > I am working on an OS derived for BSD 4.1 . I am trying to > > > backport a thread-safe version of popen() from BSD 4.10 . > > > > popen should be threadsafe as of rev 1.17 (2003-01-03) of > > /usr/src/lib/libc/gen/popen.c . It was merged into the 4.* branch in > > rev 1.14.2.1 (2004/12/15). The PR is bin/50770 . Do you have a > > testcase that causes it to fail? > Please find the code snippet of popen() from the source code that I > have (We are working on an OS that is derived from FreeBSD 4.1) . I > don't think I have the thread safe version . Correct; you need to look at the 4.11 source. 4.10's popen wasn't thread-safe. This link will get you the diffs between 4.1 and 4.11 which will make popen thread-safe: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/popen.c.diff?r1=RELENG_4_1_0_RELEASE&r2=RELENG_4_11_0_RELEASE -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 08:39:52 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F09DE16A41C; Thu, 7 Jul 2005 08:39:52 +0000 (GMT) (envelope-from corecode@fs.ei.tum.de) Received: from stella.fs.ei.tum.de (stella.fs.ei.tum.de [129.187.54.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E84B43D45; Thu, 7 Jul 2005 08:39:49 +0000 (GMT) (envelope-from corecode@fs.ei.tum.de) Received: from localhost (localhost [127.0.0.1]) by localhost.fs.ei.tum.de (Postfix) with ESMTP id AAB4E8DA93; Thu, 7 Jul 2005 10:39:45 +0200 (CEST) Received: from stella.fs.ei.tum.de ([127.0.0.1]) by localhost (stella [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15381-07; Thu, 7 Jul 2005 10:39:43 +0200 (CEST) Received: from sweatshorts.fs.ei.tum.de (unknown [IPv6:2001:4ca0:0:fe00:0:5efe:a96:b4b4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by stella.fs.ei.tum.de (Postfix) with ESMTP id 4B5608D767; Thu, 7 Jul 2005 10:39:43 +0200 (CEST) Date: Thu, 7 Jul 2005 10:39:42 +0200 From: Simon 'corecode' Schubert To: vd@datamax.bg Message-Id: <20050707103942.0f3adf42.corecode@fs.ei.tum.de> In-Reply-To: <20050707060914.GA3480@sinanica.bg.datamax> References: <20050706054753.GA69973@sinanica.bg.datamax> <20050707060914.GA3480@sinanica.bg.datamax> X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-dragonfly1) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Thu__7_Jul_2005_10_39_42_+0200_RJQ1zGlgTaGKxaQw" X-Virus-Scanned: by amavisd-new at fs.ei.tum.de Cc: tom.schutter@gmail.com, phantom@FreeBSD.org, freebsd-hackers@freebsd.org Subject: Re: linking libjava.so RPATH problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2005 08:39:53 -0000 --Signature=_Thu__7_Jul_2005_10_39_42_+0200_RJQ1zGlgTaGKxaQw Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Lately Vasil Dimov said: > > 1) Does the fact that the linker does not realize that the libraries > > have already been found indicate a bug in the linker? If so, how do I > > best report it? > I cannot think of any sensible reason for this behavior, so I guess it > would be good if it can be "fixed" without breaking something else :) > You best report it by creating a patch and using send-pr(1) to submit > it. I don't think this is breakage: same soname doesn't account for same binary, especially if rpath is used. Rpath explicitly states "i (the elf object) want the libs from this path first", not "for me and descendants, search this path first". At least that's what I expect it to do. cheers simon --=20 Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low $$$ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \ --Signature=_Thu__7_Jul_2005_10_39_42_+0200_RJQ1zGlgTaGKxaQw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (DragonFly) iD8DBQFCzOpOr5S+dk6z85oRAu7IAJ9eLEyUahW8FdURwGk2EFP27H2RrwCg1ar+ wO+GtK6/LTrLTsPdByHZm6s= =LC5O -----END PGP SIGNATURE----- --Signature=_Thu__7_Jul_2005_10_39_42_+0200_RJQ1zGlgTaGKxaQw-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 09:18:26 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D82D16A41C for ; Thu, 7 Jul 2005 09:18:26 +0000 (GMT) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id F233343D48 for ; Thu, 7 Jul 2005 09:18:25 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id DB9AD5CA82; Thu, 7 Jul 2005 02:18:25 -0700 (PDT) Date: Thu, 7 Jul 2005 11:18:25 +0200 From: Maxime Henrion To: freebsd-hackers@freebsd.org Message-ID: <20050707091825.GC14567@elvis.mu.org> References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> <42CC2C9F.5000301@savvis.net> <20050706194100.GA5170@dice.seeling33.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050706194100.GA5170@dice.seeling33.de> User-Agent: Mutt/1.4.2.1i Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 07 Jul 2005 09:18:26 -0000 Stefan Sperling wrote: > On Wed, Jul 06, 2005 at 12:10:23PM -0700, Maksim Yevmenkin wrote: > > Maksim Yevmenkin wrote: > > >> char *c = "whats:your:name:buddy?"; > > > > > > ^^^^^^^^^^^^^^^^ that is not read only copy. you can not write > > > into it. replace it with > > > > made type. that should read "that is read only copy" :) > > Dark corners of C... So it's my own fault, as usual :) > thanks a lot :) Or you can be a bad guy and compile with GCC and -fwritable-strings so that it puts the const string into a read-write section :-). This is an absolutely evil hack, of course. Maxime From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 09:22:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5913D16A41C; Thu, 7 Jul 2005 09:22:16 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC3DD43D48; Thu, 7 Jul 2005 09:22:15 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from sinanica.bg.datamax (sinanica.bg.datamax [192.168.10.1]) by jengal.datamax.bg (Postfix) with QMQP id 93BF587CA; Thu, 7 Jul 2005 12:22:14 +0300 (EEST) Received: (nullmailer pid 4150 invoked by uid 1004); Thu, 07 Jul 2005 09:22:14 -0000 Date: Thu, 7 Jul 2005 12:22:14 +0300 From: Vasil Dimov To: Simon 'corecode' Schubert Message-ID: <20050707092214.GA4093@sinanica.bg.datamax> References: <20050706054753.GA69973@sinanica.bg.datamax> <20050707060914.GA3480@sinanica.bg.datamax> <20050707103942.0f3adf42.corecode@fs.ei.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline In-Reply-To: <20050707103942.0f3adf42.corecode@fs.ei.tum.de> X-OS: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i Cc: tom.schutter@gmail.com, phantom@FreeBSD.org, freebsd-hackers@freebsd.org Subject: Re: linking libjava.so RPATH problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2005 09:22:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Jul 07, 2005 at 10:39:42AM +0200, Simon 'corecode' Schubert wrote: > Lately Vasil Dimov said: > > > 1) Does the fact that the linker does not realize that the libraries > > > have already been found indicate a bug in the linker? If so, how do I > > > best report it? > > I cannot think of any sensible reason for this behavior, so I guess it > > would be good if it can be "fixed" without breaking something else :) > > You best report it by creating a patch and using send-pr(1) to submit > > it. > > I don't think this is breakage: same soname doesn't account for same > binary, especially if rpath is used. Rpath explicitly states "i (the > elf object) want the libs from this path first", not "for me and > descendants, search this path first". At least that's what I expect it > to do. > I agree. -----BEGIN PGP SIGNATURE----- iD8DBQFCzPRGFw6SP/bBpCARAkvuAJ0bJKk898ToHSZ6HE4pYgjJ6DpYdQCfR4AM W55S6H2A8GQTthdajgEeX+I= =A4QT -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 18:17:12 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A342416A41C for ; Wed, 6 Jul 2005 18:17:12 +0000 (GMT) (envelope-from mickey@lucifier.net) Received: from ns.lucifier.net (ns.lucifier.net [66.114.66.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19C3643D46 for ; Wed, 6 Jul 2005 18:17:11 +0000 (GMT) (envelope-from mickey@lucifier.net) Received: from mail.lucifier.net (versalo.lucifier.net [66.114.79.48]) by ns.lucifier.net (8.13.1/8.13.1) with ESMTP id j66IH6if025135 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL); Wed, 6 Jul 2005 14:17:08 -0400 (EDT) Received: from lucifier.net (IDENT:mickey@localhost [127.0.0.1]) by mail.lucifier.net (8.13.4/8.12.10) with ESMTP id j66HuPYo023775 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Jul 2005 13:56:25 -0400 (EDT) Received: (from mickey@localhost) by lucifier.net (8.13.4/8.12.10/Submit) id j66HuKNJ018494; Wed, 6 Jul 2005 13:56:20 -0400 (EDT) From: Michael Shalayeff Message-Id: <200507061756.j66HuKNJ018494@lucifier.net> In-Reply-To: <1120667769.8695.10.camel@localhost.localdomain> from "Juan J. [Mart_nez]" at "Jul 6, 2005 06:36:09 pm" To: "Juan J. [Mart_nez]" Date: Wed, 6 Jul 2005 13:56:20 -0400 (EDT) X-Operating-System: BSD 2.11 X-Flames-To: /dev/null X-Elm-Rules: righton X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 07 Jul 2005 12:09:13 +0000 Cc: freebsd-hackers@FreeBSD.ORG, misc@openbsd.org, Matt Subject: Re: C programming 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, 06 Jul 2005 18:17:12 -0000 Making, drinking tea and reading an opus magnum from Juan J. [Mart_nez]: [Charset ISO-8859-1 unsupported, filtering to ASCII...] > El lun, 04-04-2005 a las 11:43 -0700, Matt escribis: > > [...] > > Can someone break down these declarations (if that's what they are)? Is > > this a form of typecasting? Thanks for your help. > > Those are declarations of pointers to functions. > > /* real function */ > void dumb(int a) { return a; } warning: `return' with a value, in function returning void > ... > > /* here follows a declaration of func pointer */ > int (*func_ptr)(int); > int a; > > /* assign it */ > func_ptr=dumb; warning: assignment from incompatible pointer type > /* use it */ > a=func_ptr(123); > > Any good book about C should cover this. Look for OOP in C also, it's > frequent use pointers to functions + structs to add classes to C. perhaps you should read that book first (: cu -- paranoic mickey (my employers have changed but, the name has remained) From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 18:42:04 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E8E016A41C for ; Wed, 6 Jul 2005 18:42:04 +0000 (GMT) (envelope-from chaton@skreel.org) Received: from smtp.skreel.org (elbarto.org [82.237.196.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B5EA43D46 for ; Wed, 6 Jul 2005 18:42:03 +0000 (GMT) (envelope-from chaton@skreel.org) Received: from gunter.skreel.org (localhost [127.0.0.1]) by smtp.skreel.org (Postfix) with SMTP id 64E08315EDA; Wed, 6 Jul 2005 20:42:02 +0200 (CEST) Date: Wed, 6 Jul 2005 20:42:02 +0200 From: chaton To: Matt Message-Id: <20050706204202.4e70b036.chaton@skreel.org> In-Reply-To: <42518AC9.5070208@comcast.net> References: <42518AC9.5070208@comcast.net> Organization: skreel X-Mailer: Sylpheed version 1.0.3 (GTK+ 1.2.10; i386-unknown-openbsd3.7) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 07 Jul 2005 12:09:13 +0000 Cc: freebsd-hackers@FreeBSD.ORG, misc@openbsd.org Subject: Re: C programming 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, 06 Jul 2005 18:42:04 -0000 On Mon, 04 Apr 2005 11:43:21 -0700 Matt wrote: > I need some help understanding some C code. > > int (*if_ioctl) > (struct ifnet *, int, caddr_t); > > int (*if_watchdog) > (int); > > Can someone break down these declarations (if that's what they are)? Is > this a form of typecasting? Thanks for your help. > > You already posted the *exact* same question a while ago and many people, including me, have answered it already. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 20:42:25 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99EC516A41C for ; Wed, 6 Jul 2005 20:42:25 +0000 (GMT) (envelope-from mwm-dated-1121544956.8d9612@mired.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B31243D4C for ; Wed, 6 Jul 2005 20:42:25 +0000 (GMT) (envelope-from mwm-dated-1121544956.8d9612@mired.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 0C9241F874B for ; Wed, 6 Jul 2005 13:42:25 -0700 (PDT) Received: from mired.org (mwm@idiom [216.240.32.1]) by idiom.com (8.12.11/8.12.11) with SMTP id j66KgNnk025159 for ; Wed, 6 Jul 2005 13:42:24 -0700 (PDT) (envelope-from mwm-dated-1121544956.8d9612@mired.org) Received: (qmail 47985 invoked by uid 1001); 6 Jul 2005 20:15:56 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Wed, 06 Jul 2005 16:15:56 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17100.15356.509506.986644@bhuda.mired.org> Date: Wed, 6 Jul 2005 16:15:56 -0400 To: Dimitry Andric In-Reply-To: <732507769.20050706215600@andric.com> References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> <42CC2C9F.5000301@savvis.net> <20050706194100.GA5170@dice.seeling33.de> <732507769.20050706215600@andric.com> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer X-Mailman-Approved-At: Thu, 07 Jul 2005 12:09:13 +0000 Cc: freebsd-hackers@freebsd.org, Stefan Sperling Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Jul 2005 20:42:25 -0000 In <732507769.20050706215600@andric.com>, Dimitry Andric typed: > On 2005-07-06 at 21:41:00 Stefan Sperling wrote: > > >> >> char *c = "whats:your:name:buddy?"; > >> made type. that should read "that is read only copy" :) > > Dark corners of C... So it's my own fault, as usual :) > > Actually, this dark corner was enlightened not so long ago. String > constants used to be writable for years, until someone decided that it > was better not to. :) I think it used to be implementation-dependent. IIRC, the VMS C compiler didn't have writable string constants. I know there was something like that that bit attempts to port Unix programs to VMS. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 6 16:36:21 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3030B16A41C for ; Wed, 6 Jul 2005 16:36:20 +0000 (GMT) (envelope-from reidrac@usebox.net) Received: from blackshell.usebox.net (84-120-176-87.onocable.ono.com [84.120.176.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5780543D45 for ; Wed, 6 Jul 2005 16:36:19 +0000 (GMT) (envelope-from reidrac@usebox.net) Received: from [192.168.0.1] (fixed-1-lan.blackshell.usebox.net [192.168.0.1]) by blackshell.usebox.net (8.13.0/8.13.0) with ESMTP id j66GaAxX018950; Wed, 6 Jul 2005 18:36:10 +0200 (CEST) From: "Juan J." =?ISO-8859-1?Q?Mart=EDnez?= To: Matt In-Reply-To: <42518AC9.5070208@comcast.net> References: <42518AC9.5070208@comcast.net> Content-Type: text/plain; charset=ISO-8859-1 Date: Wed, 06 Jul 2005 18:36:09 +0200 Message-Id: <1120667769.8695.10.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 07 Jul 2005 12:11:06 +0000 Cc: freebsd-hackers@FreeBSD.ORG, misc@openbsd.org Subject: Re: C programming 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, 06 Jul 2005 16:36:21 -0000 El lun, 04-04-2005 a las 11:43 -0700, Matt escribió: > [...] > Can someone break down these declarations (if that's what they are)? Is > this a form of typecasting? Thanks for your help. Those are declarations of pointers to functions. /* real function */ void dumb(int a) { return a; } ... /* here follows a declaration of func pointer */ int (*func_ptr)(int); int a; /* assign it */ func_ptr=dumb; /* use it */ a=func_ptr(123); Any good book about C should cover this. Look for OOP in C also, it's frequent use pointers to functions + structs to add classes to C. regards, Juanjo -- Desarrollo y sistemas: http://www.usebox.net/ Página Personal: http://www.usebox.net/jjm/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 07:01:51 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8AD6116A41C for ; Thu, 7 Jul 2005 07:01:51 +0000 (GMT) (envelope-from reidrac@usebox.net) Received: from blackshell.usebox.net (84-120-176-87.onocable.ono.com [84.120.176.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 065A043D48 for ; Thu, 7 Jul 2005 07:01:49 +0000 (GMT) (envelope-from reidrac@usebox.net) Received: from [192.168.0.1] (fixed-1-lan.blackshell.usebox.net [192.168.0.1]) by blackshell.usebox.net (8.13.0/8.13.0) with ESMTP id j6771YL0010234; Thu, 7 Jul 2005 09:01:34 +0200 (CEST) From: "Juan J." =?ISO-8859-1?Q?Mart=EDnez?= To: Michael Shalayeff In-Reply-To: <200507061756.j66HuKNJ018494@lucifier.net> References: <200507061756.j66HuKNJ018494@lucifier.net> Content-Type: text/plain; charset=ISO-8859-1 Date: Thu, 07 Jul 2005 09:01:34 +0200 Message-Id: <1120719694.8677.1.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 07 Jul 2005 12:11:06 +0000 Cc: freebsd-hackers@FreeBSD.ORG, misc@openbsd.org, Matt Subject: Re: C programming 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, 07 Jul 2005 07:01:51 -0000 El mié, 06-07-2005 a las 13:56 -0400, Michael Shalayeff escribió: > [...] > > Those are declarations of pointers to functions. > > > > /* real function */ > > void dumb(int a) { return a; } > > warning: `return' with a value, in function returning void Obviously dumb must return int, not void. > [...] > > Any good book about C should cover this. Look for OOP in C also, it's > > frequent use pointers to functions + structs to add classes to C. > > perhaps you should read that book first (: I'd say I must shut up before answer a mail totally off-topic. regards, Juanjo -- Desarrollo y sistemas: http://www.usebox.net/ Página Personal: http://www.usebox.net/jjm/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 13:33:11 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87DC916A423 for ; Thu, 7 Jul 2005 13:33:11 +0000 (GMT) (envelope-from mwm-dated-1121607200.bf46e4@mired.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5331A43D46 for ; Thu, 7 Jul 2005 13:33:11 +0000 (GMT) (envelope-from mwm-dated-1121607200.bf46e4@mired.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id DB9971F7EDE for ; Thu, 7 Jul 2005 06:33:10 -0700 (PDT) Received: from mired.org (mwm@idiom [216.240.32.1]) by idiom.com (8.12.11/8.12.11) with SMTP id j67DX9Vp025301 for ; Thu, 7 Jul 2005 06:33:10 -0700 (PDT) (envelope-from mwm-dated-1121607200.bf46e4@mired.org) Received: (qmail 69073 invoked by uid 1001); 7 Jul 2005 13:33:20 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Thu, 07 Jul 2005 09:33:19 -0400 (EDT) Message-ID: <17101.12063.601308.675940@bhuda.mired.org> Date: Thu, 7 Jul 2005 09:33:19 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: chaton In-Reply-To: <20050706204202.4e70b036.chaton@skreel.org> References: <42518AC9.5070208@comcast.net> <20050706204202.4e70b036.chaton@skreel.org> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer X-Mailman-Approved-At: Fri, 08 Jul 2005 12:25:53 +0000 Cc: freebsd-hackers@freebsd.org, misc@openbsd.org, Matt Subject: Re: C programming 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, 07 Jul 2005 13:33:11 -0000 On Mon, 04 Apr 2005 11:43:21 -0700 Matt wrote: > I need some help understanding some C code. cdecl (devel/cdecl) is your friend. > int (*if_ioctl) > (struct ifnet *, int, caddr_t); explain int (*if_ioctl)(struct ifnet *, int, caddr_t) declare if_ioctl as pointer to function (pointer to struct ifnet, int, caddr_t) returning int > int (*if_watchdog) > (int); explain int (*if_watchdog)(int) declare if_watchdog as pointer to function (int) returning int The formatting on this one is strange. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 8 15:35:05 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91F9B16A41C for ; Fri, 8 Jul 2005 15:35:05 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4133E43D45 for ; Fri, 8 Jul 2005 15:35:05 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix3-1.free.fr (Postfix) with ESMTP id B95C11734A0 for ; Fri, 8 Jul 2005 17:35:03 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id C0B34405B; Fri, 8 Jul 2005 17:35:06 +0200 (CEST) Date: Fri, 8 Jul 2005 17:35:06 +0200 From: Jeremie Le Hen To: freebsd-hackers@FreeBSD.org Message-ID: <20050708153506.GM39292@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: Subject: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Jul 2005 15:35:05 -0000 Hello hackers, I'm going to disturb you once again with ProPolice. The original ProPolice patch, as well as most of FreeBSD variants and Linux one, uses /dev/urandom to fill the "canary" with random data (the canary is what is going to be put between buffer and return address in the stack). OTOH, OpenBSD uses kern.arnd sysctl to achieve this (this is a sysctl front-end to the arc4random() function). I don't really see the pros and cons between the two methods, so I'd like taste your opinions. Note that the first method (opening /dev/urandom) requires to patch open(2) wrapper from libpthread and libthr (cognet@ did this for me), in order to initialize _thr_initial, because the SSP constructor is called quite early. The second method requires to introduce the kern.arnd sysctl (KERN_ARND). FYI, note that NetBSD has kern.urandom (KERN_URND) and they define KERN_ARND to be an alias to this. Your comments will be welcome. Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 8 23:04:11 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3089516A41C for ; Fri, 8 Jul 2005 23:04:11 +0000 (GMT) (envelope-from root@Neo-Vortex.net) Received: from Neo-Vortex.net (203-206-17-78.dyn.iinet.net.au [203.206.17.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 732AB43D45 for ; Fri, 8 Jul 2005 23:04:09 +0000 (GMT) (envelope-from root@Neo-Vortex.net) Received: from localhost.Neo-Vortex.net (Neo-Vortex@localhost.Neo-Vortex.net [127.0.0.1]) by Neo-Vortex.net (8.13.1/8.12.10) with ESMTP id j68N47A3010160; Sat, 9 Jul 2005 09:04:07 +1000 (EST) (envelope-from root@Neo-Vortex.net) Date: Sat, 9 Jul 2005 09:04:07 +1000 (EST) From: Neo-Vortex To: Jeremie Le Hen In-Reply-To: <20050708153506.GM39292@obiwan.tataz.chchile.org> Message-ID: <20050709090103.C9307@Neo-Vortex.net> References: <20050708153506.GM39292@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-hackers@freebsd.org Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Jul 2005 23:04:11 -0000 On Fri, 8 Jul 2005, Jeremie Le Hen wrote: > Hello hackers, > > I'm going to disturb you once again with ProPolice. The original > ProPolice patch, as well as most of FreeBSD variants and Linux one, > uses /dev/urandom to fill the "canary" with random data (the canary > is what is going to be put between buffer and return address in the > stack). OTOH, OpenBSD uses kern.arnd sysctl to achieve this (this > is a sysctl front-end to the arc4random() function). Just one question, why does the canary have to be filled with random data? Why not just zero it? sure you get a single random value to find out how many zero's to use, but why waste that much good-quality random data (and of course if there isn't enough in urandom, you would have to make it loop till there is enough unless you make it just leave the rest as-is) IMHO there is no advantages (well, that i can see) of having it random data rather than just NULL... Feel free to correct me if i'm wrong... ~NVX From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 8 23:55:48 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13EC016A41C for ; Fri, 8 Jul 2005 23:55:48 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2D4843D45 for ; Fri, 8 Jul 2005 23:55:47 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j68FE25m062031; Fri, 8 Jul 2005 08:14:04 -0700 (PDT) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j68FDrkh062029; Fri, 8 Jul 2005 08:13:53 -0700 (PDT) (envelope-from www) Date: Fri, 8 Jul 2005 08:13:53 -0700 (PDT) Message-Id: <200507081513.j68FDrkh062029@marlena.vvi.at> To: root@Neo-Vortex.net From: "ALeine" Cc: freebsd-hackers@freebsd.org, jeremie@le-hen.org Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Jul 2005 23:55:48 -0000 root@Neo-Vortex.net wrote: > On Fri, 8 Jul 2005, Jeremie Le Hen wrote: > > > Hello hackers, > > > > I'm going to disturb you once again with ProPolice. The > > original ProPolice patch, as well as most of FreeBSD variants > > and Linux one, uses /dev/urandom to fill the "canary" with > > random data (the canary is what is going to be put between > > buffer and return address in the stack). OTOH, OpenBSD uses > > kern.arnd sysctl to achieve this (this is a sysctl front-end > > to the arc4random() function). > > Just one question, why does the canary have to be filled with > random data? Why not just zero it? sure you get a single random > value to find out how many zero's to use, but why waste that much > good-quality random data (and of course if there isn't enough in > urandom, you would have to make it loop till there is enough unless > you make it just leave the rest as-is) > > IMHO there is no advantages (well, that i can see) of having it > random data rather than just NULL... > > Feel free to correct me if i'm wrong... You're wrong, when the canary value is fixed and known (such as in terminator canaries), there are cases where an attacker could manage to reset the canary to the expected value and circumvent the protection mechanism. That chance doesn't exist with random canaries. AFAIK, ProPolice supports both terminator and random canaries. As for the original topic, I would prefer the sysctl front-end, IMO it's more consistent with other BSDs and more clean and direct while extending open(2) would only appear transparent at the expense of needlessly increasing the complexity of open(2). ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 8 23:59:12 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB43116A41C for ; Fri, 8 Jul 2005 23:59:11 +0000 (GMT) (envelope-from root@Neo-Vortex.net) Received: from Neo-Vortex.net (203-206-17-78.dyn.iinet.net.au [203.206.17.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19C5443D46 for ; Fri, 8 Jul 2005 23:59:10 +0000 (GMT) (envelope-from root@Neo-Vortex.net) Received: from localhost.Neo-Vortex.net (Neo-Vortex@localhost.Neo-Vortex.net [127.0.0.1]) by Neo-Vortex.net (8.13.1/8.12.10) with ESMTP id j68Nx4Zh018064; Sat, 9 Jul 2005 09:59:04 +1000 (EST) (envelope-from root@Neo-Vortex.net) Date: Sat, 9 Jul 2005 09:59:04 +1000 (EST) From: Neo-Vortex To: ALeine In-Reply-To: <200507081513.j68FDrkh062029@marlena.vvi.at> Message-ID: <20050709095826.T18020@Neo-Vortex.net> References: <200507081513.j68FDrkh062029@marlena.vvi.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-hackers@freebsd.org, jeremie@le-hen.org Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Jul 2005 23:59:12 -0000 On Fri, 8 Jul 2005, ALeine wrote: > root@Neo-Vortex.net wrote: > > > On Fri, 8 Jul 2005, Jeremie Le Hen wrote: > > > > > Hello hackers, > > > > > > I'm going to disturb you once again with ProPolice. The > > > original ProPolice patch, as well as most of FreeBSD variants > > > and Linux one, uses /dev/urandom to fill the "canary" with > > > random data (the canary is what is going to be put between > > > buffer and return address in the stack). OTOH, OpenBSD uses > > > kern.arnd sysctl to achieve this (this is a sysctl front-end > > > to the arc4random() function). > > > > Just one question, why does the canary have to be filled with > > random data? Why not just zero it? sure you get a single random > > value to find out how many zero's to use, but why waste that much > > good-quality random data (and of course if there isn't enough in > > urandom, you would have to make it loop till there is enough unless > > you make it just leave the rest as-is) > > > > IMHO there is no advantages (well, that i can see) of having it > > random data rather than just NULL... > > > > Feel free to correct me if i'm wrong... > > You're wrong, when the canary value is fixed and known (such as in > terminator canaries), there are cases where an attacker could manage > to reset the canary to the expected value and circumvent the protection > mechanism. That chance doesn't exist with random canaries. AFAIK, > ProPolice supports both terminator and random canaries. > > As for the original topic, I would prefer the sysctl front-end, IMO it's > more consistent with other BSDs and more clean and direct while extending > open(2) would only appear transparent at the expense of needlessly > increasing the complexity of open(2). I was meaning random length fixed value... and unless the attacker wants to set the return address to 0x0... ~NVX From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 9 00:15:59 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8660C16A41C for ; Sat, 9 Jul 2005 00:15:59 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1D6743D45 for ; Sat, 9 Jul 2005 00:15:58 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j68FYA5m062320; Fri, 8 Jul 2005 08:34:13 -0700 (PDT) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j68FY0om062318; Fri, 8 Jul 2005 08:34:00 -0700 (PDT) (envelope-from www) Date: Fri, 8 Jul 2005 08:34:00 -0700 (PDT) Message-Id: <200507081534.j68FY0om062318@marlena.vvi.at> To: root@Neo-Vortex.net From: "ALeine" Cc: freebsd-hackers@freebsd.org, jeremie@le-hen.org Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Jul 2005 00:15:59 -0000 root@Neo-Vortex.net wrote: > I was meaning random length fixed value... That may be what you meant, but that's definitely not what you said. > and unless the attacker wants to set the return address to 0x0... You may want to read the paper "Four different tricks to bypass StackShield and StackGuard protection" before making more comments. http://www.coresecurity.com/files/files/11/StackguardPaper.pdf ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 9 00:22:38 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B17F16A41C for ; Sat, 9 Jul 2005 00:22:38 +0000 (GMT) (envelope-from silby@silby.com) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) by mx1.FreeBSD.org (Postfix) with SMTP id D82F143D48 for ; Sat, 9 Jul 2005 00:22:36 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 1479 invoked from network); 9 Jul 2005 00:22:33 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 9 Jul 2005 00:22:33 -0000 X-pair-Authenticated: 209.68.2.70 Date: Fri, 8 Jul 2005 19:22:13 -0500 (CDT) From: Mike Silbersack To: Jeremie Le Hen In-Reply-To: <20050708153506.GM39292@obiwan.tataz.chchile.org> Message-ID: <20050708192104.Q26713@odysseus.silby.com> References: <20050708153506.GM39292@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@FreeBSD.org Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Jul 2005 00:22:38 -0000 On Fri, 8 Jul 2005, Jeremie Le Hen wrote: > The second method requires to introduce the kern.arnd sysctl > (KERN_ARND). FYI, note that NetBSD has kern.urandom (KERN_URND) and > they define KERN_ARND to be an alias to this. > > Your comments will be welcome. > > Best regards, > -- > Jeremie Le Hen I don't see any problem with introducing such a sysctl, if it would make the propolice patch simpler. Mike "Silby" Silbersack From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 9 08:15:52 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23ED316A41C for ; Sat, 9 Jul 2005 08:15:52 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix3-2.free.fr (postfix3-2.free.fr [213.228.0.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0DBF43D45 for ; Sat, 9 Jul 2005 08:15:51 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix3-2.free.fr (Postfix) with ESMTP id 0FED9C068; Sat, 9 Jul 2005 10:15:49 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 9A8A8405C; Sat, 9 Jul 2005 10:15:51 +0200 (CEST) Date: Sat, 9 Jul 2005 10:15:50 +0200 From: Jeremie Le Hen To: Mike Silbersack Message-ID: <20050709081550.GR39292@obiwan.tataz.chchile.org> References: <20050708153506.GM39292@obiwan.tataz.chchile.org> <20050708192104.Q26713@odysseus.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050708192104.Q26713@odysseus.silby.com> User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@FreeBSD.org, Jeremie Le Hen Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Jul 2005 08:15:52 -0000 Hi Mike, On Fri, Jul 08, 2005 at 07:22:13PM -0500, Mike Silbersack wrote: > On Fri, 8 Jul 2005, Jeremie Le Hen wrote: > >The second method requires to introduce the kern.arnd sysctl > >(KERN_ARND). FYI, note that NetBSD has kern.urandom (KERN_URND) and > >they define KERN_ARND to be an alias to this. > > I don't see any problem with introducing such a sysctl, if it would make > the propolice patch simpler. Thanks for you answer. In that case, which sysctl should we use ? * OpenBSD's kern.arnd (KERN_ARND) which is a front-end to the arc4random() function ? * NetBSD's kern.urandom (KERN_URND) which is using the rnd(4) pseudo-device. They also have KERN_ARND in sysctl.h, which is no more than a #define of KERN_URND, for compatibility with OpenBSD. Usually, I noticed that FreeBSD used to be as close as possible with NetBSD. But I would like to hear the voice of a more experienced hacker about this. Thanks. Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 9 08:36:32 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5ADC16A41C for ; Sat, 9 Jul 2005 08:36:32 +0000 (GMT) (envelope-from silby@silby.com) Received: from relay.pair.com (relay00.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 4D2CB43D53 for ; Sat, 9 Jul 2005 08:36:32 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 29344 invoked from network); 9 Jul 2005 08:36:30 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 9 Jul 2005 08:36:30 -0000 X-pair-Authenticated: 209.68.2.70 Date: Sat, 9 Jul 2005 03:36:04 -0500 (CDT) From: Mike Silbersack To: Jeremie Le Hen In-Reply-To: <20050709081550.GR39292@obiwan.tataz.chchile.org> Message-ID: <20050709032937.N26713@odysseus.silby.com> References: <20050708153506.GM39292@obiwan.tataz.chchile.org> <20050708192104.Q26713@odysseus.silby.com> <20050709081550.GR39292@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@FreeBSD.org Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Jul 2005 08:36:33 -0000 On Sat, 9 Jul 2005, Jeremie Le Hen wrote: > Thanks for you answer. In that case, which sysctl should we use ? > > * OpenBSD's kern.arnd (KERN_ARND) which is a front-end to > the arc4random() function ? > > * NetBSD's kern.urandom (KERN_URND) which is using the rnd(4) > pseudo-device. They also have KERN_ARND in sysctl.h, which > is no more than a #define of KERN_URND, for compatibility > with OpenBSD. > > Usually, I noticed that FreeBSD used to be as close as possible with > NetBSD. But I would like to hear the voice of a more experienced > hacker about this. > > Thanks. > Best regards, > -- > Jeremie Le Hen I wouldn't say that we favor code from any one project over another, every situation is different. In this case, I'm personally rather indifferent - both RNGs should supply good entropy. Arc4 may be a bit faster (I don't know if anyone has benchmarked by how much), so for this purpose it would seem to be the one to use. I can commit any patches you have after the 6.0 code freeze ends, which should be in the next few weeks. (It can be MFC'd to 6.0 and 5.4 after that as well.) Mike "Silby" Silbersack From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 9 17:15:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8F4F16A41C for ; Sat, 9 Jul 2005 17:15:01 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D5C743D48 for ; Sat, 9 Jul 2005 17:15:01 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.94] ([66.127.85.94]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j69HExms064179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Jul 2005 10:15:00 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <42D0062F.3020303@errno.com> Date: Sat, 09 Jul 2005 10:15:27 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeremie Le Hen References: <20050708153506.GM39292@obiwan.tataz.chchile.org> <20050708192104.Q26713@odysseus.silby.com> <20050709081550.GR39292@obiwan.tataz.chchile.org> In-Reply-To: <20050709081550.GR39292@obiwan.tataz.chchile.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Jul 2005 17:15:01 -0000 Jeremie Le Hen wrote: > Hi Mike, > > On Fri, Jul 08, 2005 at 07:22:13PM -0500, Mike Silbersack wrote: > >>On Fri, 8 Jul 2005, Jeremie Le Hen wrote: >> >>>The second method requires to introduce the kern.arnd sysctl >>>(KERN_ARND). FYI, note that NetBSD has kern.urandom (KERN_URND) and >>>they define KERN_ARND to be an alias to this. >> >>I don't see any problem with introducing such a sysctl, if it would make >>the propolice patch simpler. > > > Thanks for you answer. In that case, which sysctl should we use ? > > * OpenBSD's kern.arnd (KERN_ARND) which is a front-end to > the arc4random() function ? > > * NetBSD's kern.urandom (KERN_URND) which is using the rnd(4) > pseudo-device. They also have KERN_ARND in sysctl.h, which > is no more than a #define of KERN_URND, for compatibility > with OpenBSD. > > Usually, I noticed that FreeBSD used to be as close as possible with > NetBSD. But I would like to hear the voice of a more experienced > hacker about this. > I asked a certain person to add the obsd sysctl long ago but it never happened. Sam From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 9 18:06:19 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9008D16A41C for ; Sat, 9 Jul 2005 18:06:19 +0000 (GMT) (envelope-from mark@grondar.org) Received: from storm.uk.FreeBSD.org (storm.uk.FreeBSD.org [194.242.157.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09CD443D45 for ; Sat, 9 Jul 2005 18:06:18 +0000 (GMT) (envelope-from mark@grondar.org) Received: from storm.uk.FreeBSD.org (uucp@localhost [127.0.0.1]) by storm.uk.FreeBSD.org (8.13.3/8.13.3) with ESMTP id j69I5giE026498; Sat, 9 Jul 2005 19:05:42 +0100 (BST) (envelope-from mark@grondar.org) Received: (from uucp@localhost) by storm.uk.FreeBSD.org (8.13.3/8.12.11/Submit) with UUCP id j69I5fjs026497; Sat, 9 Jul 2005 19:05:41 +0100 (BST) (envelope-from mark@grondar.org) Received: from grunt.grondar.org (localhost [127.0.0.1]) by grunt.grondar.org (8.13.4/8.13.4) with ESMTP id j69I0hgE014833; Sat, 9 Jul 2005 19:00:43 +0100 (BST) (envelope-from mark@grunt.grondar.org) Message-Id: <200507091800.j69I0hgE014833@grunt.grondar.org> X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.0.4 To: Sam Leffler In-Reply-To: Message from Sam Leffler of "Sat, 09 Jul 2005 10:15:27 PDT." <42D0062F.3020303@errno.com> From: Mark Murray Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 09 Jul 2005 19:00:43 +0100 Sender: mark@grondar.org Cc: freebsd-hackers@FreeBSD.ORG, Jeremie Le Hen Subject: Re: ProPolice: best way to fill canary X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Jul 2005 18:06:19 -0000 Sam Leffler writes: >I asked a certain person to add the obsd sysctl long ago but it never >happened. That would be me. And it wouldn't be the first time a ball got dropped. I'll get to it. :-] M -- Mark R V Murray What is the most interesting question you have asked? What, if any, was the answer?