From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 25 01:17:49 2006 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 4A6A816A4CB for ; Sun, 25 Jun 2006 01:17:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E75B843D45 for ; Sun, 25 Jun 2006 01:17:48 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k5P1Gv9h068790; Sat, 24 Jun 2006 19:16:58 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 24 Jun 2006 19:16:59 -0600 (MDT) Message-Id: <20060624.191659.1973602414.imp@bsdimp.com> To: zazubrik@mail.ru From: "M. Warner Losh" In-Reply-To: <922B6543-53D0-4877-9E97-B9ED1CDACFA8@mail.ru> References: <922B6543-53D0-4877-9E97-B9ED1CDACFA8@mail.ru> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Buses, devices and modules 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, 25 Jun 2006 01:17:49 -0000 In message: <922B6543-53D0-4877-9E97-B9ED1CDACFA8@mail.ru> Artem Ignatiev writes: : When I do 'echo mydev_load="YES" >>/boot/loader.conf', loader loads : both mydev.ko and mybus.ko, and mybus.ko attaches properly, but : mydev.ko don't attach to anything. : : I suppose this happens because mydev happens to probe for devices : before mybus creates them, and fails to find anything to attach to. : : I'm looking for way to trigger the mydev driver to re-probe after the : mybus driver actually creates the devices, or may be I'm missing : something simple (like priority of module probing)? re-probing is automatic for all instances of bus FOO when a driver that has a FOO attachment is loaded. If the FOO bus driver creates a child device, then they are responsible for calling device_probe_and_attach on it. Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 25 06:43:04 2006 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 C68AD16A49E for ; Sun, 25 Jun 2006 06:43:04 +0000 (UTC) (envelope-from lists-freebsd@silverwraith.com) Received: from pear.silverwraith.com (pear.silverwraith.com [69.12.167.160]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BB6143D68 for ; Sun, 25 Jun 2006 06:43:03 +0000 (GMT) (envelope-from lists-freebsd@silverwraith.com) Received: from avleen by pear.silverwraith.com with local (Exim 4.61 (FreeBSD)) (envelope-from ) id 1FuOKl-000LZB-Dh for freebsd-hackers@freebsd.org; Sat, 24 Jun 2006 23:43:03 -0700 Date: Sat, 24 Jun 2006 23:43:03 -0700 From: Avleen Vig To: freebsd-hackers@freebsd.org Message-ID: <20060625064303.GR19592@silverwraith.com> References: <449D8616.5040306@tamara-b.org> <17565.37706.966913.737964@bhuda.mired.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17565.37706.966913.737964@bhuda.mired.org> User-Agent: Mutt/1.5.11 Subject: Re: A New FreeBSD Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 06:43:04 -0000 On Sat, Jun 24, 2006 at 03:32:26PM -0400, Mike Meyer wrote: > Why not RAID your swap? The extra reliability might not be worth very > much, but the extra performance couldn't hurt - unless you don't plan > on swapping at all. This is enough of a win that the swap subsystem > will interleave swap usage across multiple drives, a facility that > predates RAID. If you just split your swap across multiple drives, you > get RAID0 behavior from swap. Really? I thought it was possible to interleave multiple swap devices. I'm probably wrong, but I thought I remembered seeing 'interleaved' somewhere. Maybe my definition of interleaved is differented from someone elses :-) From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 25 07:41:34 2006 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 94D0F16A4C8 for ; Sun, 25 Jun 2006 07:41:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2017F43D62 for ; Sun, 25 Jun 2006 07:41:29 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k5P7dAW4071884; Sun, 25 Jun 2006 01:39:10 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 25 Jun 2006 01:39:12 -0600 (MDT) Message-Id: <20060625.013912.-1648696833.imp@bsdimp.com> To: lists-freebsd@silverwraith.com From: "M. Warner Losh" In-Reply-To: <20060625064303.GR19592@silverwraith.com> References: <449D8616.5040306@tamara-b.org> <17565.37706.966913.737964@bhuda.mired.org> <20060625064303.GR19592@silverwraith.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: A New FreeBSD Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 07:41:34 -0000 In message: <20060625064303.GR19592@silverwraith.com> Avleen Vig writes: : On Sat, Jun 24, 2006 at 03:32:26PM -0400, Mike Meyer wrote: : > Why not RAID your swap? The extra reliability might not be worth very : > much, but the extra performance couldn't hurt - unless you don't plan : > on swapping at all. This is enough of a win that the swap subsystem : > will interleave swap usage across multiple drives, a facility that : > predates RAID. If you just split your swap across multiple drives, you : > get RAID0 behavior from swap. : : Really? I thought it was possible to interleave multiple swap devices. : I'm probably wrong, but I thought I remembered seeing 'interleaved' : somewhere. Maybe my definition of interleaved is differented from : someone elses :-) Swapping to multiple devices does tend, on the average, to spread the load. But on the average doesn't mean all the time. When swapping to a device that's on a RAID, then you get the interleave every single time. Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 25 10:24:10 2006 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 E413F16A402 for ; Sun, 25 Jun 2006 10:24:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78D5043D4C for ; Sun, 25 Jun 2006 10:24:10 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 20B4F46C6E; Sun, 25 Jun 2006 06:24:10 -0400 (EDT) Date: Sun, 25 Jun 2006 11:24:10 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Mike Meyer In-Reply-To: <17565.37706.966913.737964@bhuda.mired.org> Message-ID: <20060625111920.H8526@fledge.watson.org> References: <449D8616.5040306@tamara-b.org> <17565.37706.966913.737964@bhuda.mired.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, bob@tamara-b.org Subject: Re: A New FreeBSD Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 10:24:11 -0000 On Sat, 24 Jun 2006, Mike Meyer wrote: >> Swap drive, should probably be a piece of one of the 17GB drives (NO RAID) >> the Box has 500MB ram...... > > Why not RAID your swap? The extra reliability might not be worth very much, > but the extra performance couldn't hurt - unless you don't plan on swapping > at all. This is enough of a win that the swap subsystem will interleave swap > usage across multiple drives, a facility that predates RAID. If you just > split your swap across multiple drives, you get RAID0 behavior from swap. On my boxes, I always put swap on RAID, for two reasons: (1) When swapping, performance does matter, so having the extra throughput and reduced latency helps quite a bit under load. This is especially important if you use a swap-backed temporary file system for /tmp. (2) System reliability depends on swap reliability. Specifically, if your init process, or X server, etc loses its memory because your swap disk dies, that's really bad for reliability. Similar arguments apply to system boot disks, which are left out of RAIDs by some administrators. Data corruption in swap or system programs and data can result in overall system failures, and the possibility of data corruption due to misbehaving apps, etc. I always stick all swap and file systems on RAID for critical systems in order to avoid the cost and risks of recovering from a non-RAID failure. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 25 19:39:28 2006 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 5D14C16A403; Sun, 25 Jun 2006 19:39:28 +0000 (UTC) (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 861D343D79; Sun, 25 Jun 2006 19:39:20 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.185.140] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1FuaRw2yK6-0005A9; Sun, 25 Jun 2006 21:39:17 +0200 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sun, 25 Jun 2006 21:39:05 +0200 User-Agent: KMail/1.9.1 X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<%}*_BD U_or=\mOZf764&nYj=JYbR1PW0ud>|!~, , CPC.1-D$FG@0h3#'5"k{V]a~. X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-current@freebsd.org Subject: Call for Status Reports: 07/07 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: monthly@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 19:39:28 -0000 --nextPart1398267.Hxm7ZuClBA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline All, it's time for the Status Reports for the second quater of 2006. During the= =20 last three month a lot of progress has been made. FreeBSD 6.1 and 5.5 are= =20 released, a new round of Google's Summer of Code has been started, and a ve= ry=20 productive Developer Summit took place during BSDCan. On top of that, we a= re=20 now running on Sun's new architecture and a lot of progress has been made f= or=20 the arm platform, making FreeBSD more viable in the embedded market. We hope that all your projects made good progress as well and would like to= =20 hear about it. Please share your news and progress over the last three mon= th=20 with us. Submission are due by 7 July, 2006. Once again, submissions are not limited to FreeBSD developers. We will=20 happily include non-code projects of any kind as long as it is FreeBSD=20 related. =46or previous reports and submission details, please see: =20 http://www.freebsd.org/news/status/ =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 --nextPart1398267.Hxm7ZuClBA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQBEnuZjXyyEoT62BG0RAqCeAJ9YxkEXCfLDyisbur9XHKy/ynT/MQCdGAKe ZocfScHFyedG0M4angP46Lg= =0Iw1 -----END PGP SIGNATURE----- --nextPart1398267.Hxm7ZuClBA-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 07:06:27 2006 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 BCD4616A401 for ; Mon, 26 Jun 2006 07:06:27 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AF7A43D45 for ; Mon, 26 Jun 2006 07:06:27 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 8B8172083; Mon, 26 Jun 2006 09:06:23 +0200 (CEST) X-Spam-Tests: none X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 12BB32082; Mon, 26 Jun 2006 09:06:23 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id B234233C8D; Mon, 26 Jun 2006 09:06:22 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Stanislav Sedov References: <20060624010644.Y82000@atlantis.atlantis.dp.ua> <20060624040603.594c44bc.stas@310.ru> Date: Mon, 26 Jun 2006 09:06:22 +0200 In-Reply-To: <20060624040603.594c44bc.stas@310.ru> (Stanislav Sedov's message of "Sat, 24 Jun 2006 04:06:03 +0400") Message-ID: <86ac80cs5t.fsf@xps.des.no> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: mmap() vs. character special file 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, 26 Jun 2006 07:06:27 -0000 Stanislav Sedov writes: > You cannot mmap ata devices (as well as scsi ones), since mmap functions > was not implemented. This has nothing to do with ata or scsi; it's a GEOM issue. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 07:15:29 2006 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 44B6616A404 for ; Mon, 26 Jun 2006 07:15:29 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 979F843D90 for ; Mon, 26 Jun 2006 07:15:28 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.13.6/8.13.6) with ESMTP id k5Q7FQpb004457; Mon, 26 Jun 2006 11:15:27 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Mon, 26 Jun 2006 11:15:26 +0400 (MSD) From: Dmitry Morozovsky To: Mike Meyer In-Reply-To: <17565.37706.966913.737964@bhuda.mired.org> Message-ID: <20060626111208.P77513@woozle.rinet.ru> References: <449D8616.5040306@tamara-b.org> <17565.37706.966913.737964@bhuda.mired.org> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (woozle.rinet.ru [0.0.0.0]); Mon, 26 Jun 2006 11:15:27 +0400 (MSD) Cc: freebsd-hackers@freebsd.org, bob@tamara-b.org Subject: Re: A New FreeBSD Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 07:15:29 -0000 On Sat, 24 Jun 2006, Mike Meyer wrote: MM> The other constraint on swap is that if you want the system to save a MM> core dump if it panics, you need a device to dump on that's 64Kb MM> bigger than ram. That's one device, not all of swap. This is not quite true, as there always are some unused memory regions, hence you need not add 64k to RAM size. At least, I had no trouble using swap == RAM for last 5 years or so... Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 15:12:32 2006 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 8F08216A57E for ; Mon, 26 Jun 2006 15:12:32 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id EE0F044ADE for ; Mon, 26 Jun 2006 14:10:29 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 92572 invoked by uid 1001); 26 Jun 2006 14:10:29 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Mon, 26 Jun 2006 10:10:28 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17567.60116.599544.571163@bhuda.mired.org> Date: Mon, 26 Jun 2006 10:10:28 -0400 To: Dmitry Morozovsky In-Reply-To: <20060626111208.P77513@woozle.rinet.ru> References: <449D8616.5040306@tamara-b.org> <17565.37706.966913.737964@bhuda.mired.org> <20060626111208.P77513@woozle.rinet.ru> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer Cc: freebsd-hackers@freebsd.org, bob@tamara-b.org Subject: Re: A New FreeBSD Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 15:12:32 -0000 In <20060626111208.P77513@woozle.rinet.ru>, Dmitry Morozovsky typed: > On Sat, 24 Jun 2006, Mike Meyer wrote: > MM> The other constraint on swap is that if you want the system to save a > MM> core dump if it panics, you need a device to dump on that's 64Kb > MM> bigger than ram. That's one device, not all of swap. > This is not quite true, as there always are some unused memory regions, hence > you need not add 64k to RAM size. At least, I had no trouble using swap == RAM > for last 5 years or so... Or memory areas that aren't needed when doing the post mortem. The question is, how do you guarantee that those are what's not going to make it out to the dump device? http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 15:34:54 2006 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 4848F16A401; Mon, 26 Jun 2006 15:34:54 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 962134546F; Mon, 26 Jun 2006 15:34:53 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.13.6/8.13.6) with ESMTP id k5QFYpIV016176; Mon, 26 Jun 2006 19:34:51 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Mon, 26 Jun 2006 19:34:51 +0400 (MSD) From: Dmitry Morozovsky To: hackers@FreeBSD.org Message-ID: <20060626193005.U9063@woozle.rinet.ru> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (woozle.rinet.ru [0.0.0.0]); Mon, 26 Jun 2006 19:34:51 +0400 (MSD) Cc: Pawel Jakub Dawidek Subject: ENOMEM @ RELENG_6 graid3 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, 26 Jun 2006 15:34:54 -0000 Dear colleagues, turning on bootverbose reveals additional info to ad10: FAILURE - out of memory in start under load this machine (5 ata disks, most of their space allocated for 2 graid3's) many messages like ENOMEM 0xc6e834a4 on 0xc493c080(ad8) ENOMEM 0xc703fdec on 0xc4960480(ad10) ENOMEM 0xc6b49528 on 0xc4901400(ad0) ENOMEM 0xc6c378c4 on 0xc493ca80(ad4g) ENOMEM 0xc662b210 on 0xc4900b00(ad0f) ENOMEM 0xc6b33630 on 0xc493c380(ad4) ENOMEM 0xc7320d68 on 0xc4901400(ad0) ENOMEM 0xc6bd6948 on 0xc493c380(ad4) ENOMEM 0xc7299dec on 0xc493c200(ad6) ENOMEM 0xc6d91528 on 0xc495f700(ad6g) ENOMEM 0xc47b07bc on 0xc4960480(ad10) ENOMEM 0xc7c22bdc on 0xc493c080(ad8) Machine is rather stable; however, it panics two or three times on /ftp: bad dir ino 3454117 at offset 444: mangled entry panic: ufs_dirbad: bad dir Any hints to debug? Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 17:37:35 2006 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 6242916A401 for ; Mon, 26 Jun 2006 17:37:35 +0000 (UTC) (envelope-from ashok.shrestha@gmail.com) Received: from hu-out-0102.google.com (hu-out-0102.google.com [72.14.214.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0C534651F for ; Mon, 26 Jun 2006 17:37:31 +0000 (GMT) (envelope-from ashok.shrestha@gmail.com) Received: by hu-out-0102.google.com with SMTP id 28so981869hug for ; Mon, 26 Jun 2006 10:37:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=R4ZUgLaxlTY4YTYBs4+WZ8VOOZTNKbkyST/FRlC4lDWP01Ej7NCJ20Tat2CuafQkTTw/FM8QZ8ORVxKI4a09Z85mtHdikaQMxskfSbYged1BLj6aU9psgvgieXhwwmazAwlxdl64TdlGyK++RyHw+o+MmorMyNIdqnZ67BQYMV8= Received: by 10.66.220.17 with SMTP id s17mr4963413ugg; Mon, 26 Jun 2006 06:18:31 -0700 (PDT) Received: by 10.66.251.5 with HTTP; Mon, 26 Jun 2006 06:18:31 -0700 (PDT) Message-ID: <79e2026f0606260618n603184e0ucbcb655b928a008c@mail.gmail.com> Date: Mon, 26 Jun 2006 09:18:31 -0400 From: "Ashok Shrestha" To: freebsd-hackers@freebsd.org, "Ashok Shrestha" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: checking zip file corruption 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, 26 Jun 2006 17:37:35 -0000 Hi all, I am writing code to check if incoming zip files are corrupt and the client is not willing to send a digest (like md5) of the file. I need to check if a zip file is corrupt. A Perl API is preferable but anything you can suggest is cool. I was unable to find anything on google. Perhaps one of you have done this before. I apologize for posting this on a freebsd hackers mailing list but you guys tend to be extremely intelligent. Plus I am using a bsd server :) -- Ashok Shrestha From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 17:55:57 2006 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 8B8C016A758; Mon, 26 Jun 2006 17:55:57 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 439944646D; Mon, 26 Jun 2006 17:33:21 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k5QHXJdp074000; Mon, 26 Jun 2006 12:33:19 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44A01A6D.7030000@centtech.com> Date: Mon, 26 Jun 2006 12:33:33 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.4 (X11/20060612) MIME-Version: 1.0 To: Dmitry Morozovsky References: <20060626193005.U9063@woozle.rinet.ru> In-Reply-To: <20060626193005.U9063@woozle.rinet.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1564/Mon Jun 26 09:55:16 2006 on mh1.centtech.com X-Virus-Status: Clean Cc: hackers@freebsd.org, Pawel Jakub Dawidek Subject: Re: ENOMEM @ RELENG_6 graid3 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, 26 Jun 2006 17:55:57 -0000 Dmitry Morozovsky wrote: > Dear colleagues, > > turning on bootverbose reveals additional info to > > ad10: FAILURE - out of memory in start > > under load this machine (5 ata disks, most of their space allocated for 2 > graid3's) many messages like > > ENOMEM 0xc6e834a4 on 0xc493c080(ad8) > ENOMEM 0xc703fdec on 0xc4960480(ad10) > ENOMEM 0xc6b49528 on 0xc4901400(ad0) > ENOMEM 0xc6c378c4 on 0xc493ca80(ad4g) > ENOMEM 0xc662b210 on 0xc4900b00(ad0f) > ENOMEM 0xc6b33630 on 0xc493c380(ad4) > ENOMEM 0xc7320d68 on 0xc4901400(ad0) > ENOMEM 0xc6bd6948 on 0xc493c380(ad4) > ENOMEM 0xc7299dec on 0xc493c200(ad6) > ENOMEM 0xc6d91528 on 0xc495f700(ad6g) > ENOMEM 0xc47b07bc on 0xc4960480(ad10) > ENOMEM 0xc7c22bdc on 0xc493c080(ad8) > > Machine is rather stable; however, it panics two or three times on > /ftp: bad dir ino 3454117 at offset 444: mangled entry > panic: ufs_dirbad: bad dir > > Any hints to debug? Are you sure the filesystem is clean? Can you try unmounting it, and running an fsck_ffs on it? Also, I think this has been discussed before on freebsd-geom@, did you check the archives? Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 18:14:17 2006 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 62F8116A4CB for ; Mon, 26 Jun 2006 18:14:17 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from rwcrmhc15.comcast.net (rwcrmhc15.comcast.net [204.127.192.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6235D466A6 for ; Mon, 26 Jun 2006 18:12:53 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-71-233-168-2.hsd1.ma.comcast.net ([71.233.168.2]) by comcast.net (rwcrmhc15) with ESMTP id <20060626180808m15003j6nie>; Mon, 26 Jun 2006 18:08:08 +0000 Received: from c-71-233-168-2.hsd1.ma.comcast.net (localhost [127.0.0.1]) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1) with ESMTP id k5QI8H3E052542; Mon, 26 Jun 2006 14:08:17 -0400 (EDT) (envelope-from rodrigc@c-71-233-168-2.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1/Submit) id k5QI8HtG052541; Mon, 26 Jun 2006 14:08:17 -0400 (EDT) (envelope-from rodrigc) Date: Mon, 26 Jun 2006 14:08:17 -0400 From: Craig Rodrigues To: Ashok Shrestha Message-ID: <20060626180817.GA52520@crodrigues.org> References: <79e2026f0606260618n603184e0ucbcb655b928a008c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79e2026f0606260618n603184e0ucbcb655b928a008c@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: checking zip file corruption 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, 26 Jun 2006 18:14:17 -0000 On Mon, Jun 26, 2006 at 09:18:31AM -0400, Ashok Shrestha wrote: > Hi all, > > I am writing code to check if incoming zip files are corrupt and the > client is not willing to send a digest (like md5) of the file. Why don't you just use InfoZip's "unzip -t" flag which tests the integrity of a zip file? You can call "unzip -t" from Perl. InfoZip is in ports, archivers/unzip and archivers/zip. -- Craig Rodrigues rodrigc@crodrigues.org From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 18:14:17 2006 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 6453916A4CC for ; Mon, 26 Jun 2006 18:14:17 +0000 (UTC) (envelope-from emaste@phaedrus.sandvine.ca) Received: from gw.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67965466AB for ; Mon, 26 Jun 2006 18:12:55 +0000 (GMT) (envelope-from emaste@phaedrus.sandvine.ca) Received: from mailserver.sandvine.com ([192.168.1.10]) by gw.sandvine.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 26 Jun 2006 14:12:54 -0400 Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by mailserver.sandvine.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 26 Jun 2006 14:12:53 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id 7F63611643; Mon, 26 Jun 2006 14:12:53 -0400 (EDT) Date: Mon, 26 Jun 2006 14:12:53 -0400 From: Ed Maste To: Mike Meyer Message-ID: <20060626181253.GA59701@sandvine.com> References: <449D8616.5040306@tamara-b.org> <17565.37706.966913.737964@bhuda.mired.org> <20060626111208.P77513@woozle.rinet.ru> <17567.60116.599544.571163@bhuda.mired.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17567.60116.599544.571163@bhuda.mired.org> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 26 Jun 2006 18:12:53.0721 (UTC) FILETIME=[24990490:01C6994C] Cc: freebsd-hackers@freebsd.org, Dmitry Morozovsky , bob@tamara-b.org Subject: Re: A New FreeBSD Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 18:14:17 -0000 On Mon, Jun 26, 2006 at 10:10:28AM -0400, Mike Meyer wrote: > In <20060626111208.P77513@woozle.rinet.ru>, Dmitry Morozovsky typed: > > On Sat, 24 Jun 2006, Mike Meyer wrote: > > MM> The other constraint on swap is that if you want the system to save a > > MM> core dump if it panics, you need a device to dump on that's 64Kb > > MM> bigger than ram. That's one device, not all of swap. > > This is not quite true, as there always are some unused memory regions, hence > > you need not add 64k to RAM size. At least, I had no trouble using swap == RAM > > for last 5 years or so... > > Or memory areas that aren't needed when doing the post mortem. The > question is, how do you guarantee that those are what's not going to > make it out to the dump device? The core dump routine won't even attempt to write if the swap space is too small, so there's no ambiguity as to what makes it into the core file. FreeBSD 5.x and previous try to write all of memory out so the extra 64Kb or so is necessary. Also, -CURRENT uses "minidumps" on i386 and amd64, so only memory regions of use are written out and you can get by with swap smaller than RAM. -ed From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 18:37:19 2006 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 DD5AF16A401 for ; Mon, 26 Jun 2006 18:37:19 +0000 (UTC) (envelope-from hugo@barafranca.com) Received: from mail.barafranca.com (mail.barafranca.com [67.19.101.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 280FF465B5 for ; Mon, 26 Jun 2006 16:20:18 +0000 (GMT) (envelope-from hugo@barafranca.com) Received: from localhost (localhost [127.0.0.1]) by mail.barafranca.com (Postfix) with ESMTP id 76D01C389D for ; Mon, 26 Jun 2006 16:34:18 +0000 (UTC) Received: from mail.barafranca.com ([67.19.101.164]) by localhost (mail.barafranca.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 47460-09 for ; Mon, 26 Jun 2006 16:34:17 +0000 (UTC) Received: from [192.168.0.1] (unknown [81.84.174.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.barafranca.com (Postfix) with ESMTP id 2CFF3C38B2 for ; Mon, 26 Jun 2006 16:34:16 +0000 (UTC) Message-ID: <44A0094C.6060507@barafranca.com> Date: Mon, 26 Jun 2006 17:20:28 +0100 From: Hugo Silva User-Agent: Thunderbird 1.5.0.2 (X11/20060516) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at barafranca.com Subject: Database on 6.1/AMD64 ? 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, 26 Jun 2006 18:37:20 -0000 Hi list, I'm considering switching a database server to FreeBSD 6.1/AMD64. The Opteron processor I am interested in is a dual core. I would like to know about any stories using FreeBSD/AMD64, MySQL 5.0, and two dual core processors. Will I have stability/performance issues ? Will the two dual cores kick ass, or will they give me trouble ? Any insight into this matter would be most useful. Thanks! From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 18:37:20 2006 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 3639916A571 for ; Mon, 26 Jun 2006 18:37:20 +0000 (UTC) (envelope-from ashok.shrestha@gmail.com) Received: from hu-out-0102.google.com (hu-out-0102.google.com [72.14.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26C7446662 for ; Mon, 26 Jun 2006 16:23:00 +0000 (GMT) (envelope-from ashok.shrestha@gmail.com) Received: by hu-out-0102.google.com with SMTP id 28so961100hug for ; Mon, 26 Jun 2006 09:22:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nl1LJ0yJOV8NHPeX5Y/3XLhY0s+rnPo9l5vOaZ6RaL8oR6Y93dYlVAk78ZGEXZWrqJjMAZBeA2eAlEC81Gn2m2i8PVP5h9rsyHdeUf87uVYjKIg2wNmSKVokT1fDagfwh5/ri07vvs6ZUkbDSLMznCpMUVleoeFgdAayBL9jNps= Received: by 10.67.26.7 with SMTP id d7mr4983544ugj; Mon, 26 Jun 2006 06:38:13 -0700 (PDT) Received: by 10.66.251.5 with HTTP; Mon, 26 Jun 2006 06:38:12 -0700 (PDT) Message-ID: <79e2026f0606260638p2dd16970k5c46e210d94c7bcf@mail.gmail.com> Date: Mon, 26 Jun 2006 09:38:12 -0400 From: "Ashok Shrestha" To: freebsd-hackers@freebsd.org, "Ashok Shrestha" In-Reply-To: <79e2026f0606260618n603184e0ucbcb655b928a008c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <79e2026f0606260618n603184e0ucbcb655b928a008c@mail.gmail.com> Cc: Subject: Re: checking zip file corruption 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, 26 Jun 2006 18:37:20 -0000 I found it. zip -T file.zip Thanks anyways. On 6/26/06, Ashok Shrestha wrote: > Hi all, > > I am writing code to check if incoming zip files are corrupt and the > client is not willing to send a digest (like md5) of the file. > > I need to check if a zip file is corrupt. A Perl API is preferable but > anything you can suggest is cool. > > I was unable to find anything on google. Perhaps one of you have done > this before. > > I apologize for posting this on a freebsd hackers mailing list but you > guys tend to be extremely intelligent. Plus I am using a bsd server :) > > -- > Ashok Shrestha > -- Ashok Shrestha From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 20:13:50 2006 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 6CA4116A4A6 for ; Mon, 26 Jun 2006 20:13:50 +0000 (UTC) (envelope-from aag.lists@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DB5D44790 for ; Mon, 26 Jun 2006 13:54:23 +0000 (GMT) (envelope-from aag.lists@gmail.com) Received: by py-out-1112.google.com with SMTP id f25so1431487pyf for ; Mon, 26 Jun 2006 06:53:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=UdxwBTwmnJDgIeHjOsflrGEmr/mQ6q5OpYpTngeq4eNZ7VgLg95nkMsI5PoD9IN2bet5PLLOI5BA6HFfMrl1uNToQr0iM5GkbSSUsqnmwZXdDreo5LQIJllIjLmcsLAEzJbtB7Q3BV0WctAAkH9FWOwP6//EEQrjvqoSB1S61Zw= Received: by 10.35.82.15 with SMTP id j15mr5972019pyl; Mon, 26 Jun 2006 06:53:49 -0700 (PDT) Received: by 10.35.50.18 with HTTP; Mon, 26 Jun 2006 06:53:49 -0700 (PDT) Message-ID: <2f3a439f0606260653j602e083blf872bef5b94be5a@mail.gmail.com> Date: Mon, 26 Jun 2006 19:23:49 +0530 From: "Aditya Godbole" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: New architecture support 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, 26 Jun 2006 20:13:50 -0000 Hi, If I have to add support for a new architecture, how do I start? I guess I need to get the build system and 'config' utility in place? How do I go about it? -aditya From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 26 23:39:10 2006 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 E9F9A16A406 for ; Mon, 26 Jun 2006 23:39:09 +0000 (UTC) (envelope-from bob@tamara-b.org) Received: from olm.blythe-systems.com (olm.blythe-systems.com [69.94.64.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ACE94407C for ; Mon, 26 Jun 2006 23:18:21 +0000 (GMT) (envelope-from bob@tamara-b.org) Received: from tamara-b.org (uucp@localhost) by olm.blythe-systems.com (8.11.6/8.11.6) with UUCP id k5QNIGd21721 for freebsd-hackers@freebsd.org; Mon, 26 Jun 2006 19:18:16 -0400 Received: from [127.0.0.1] (voyager [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id k5QNGZEn008781 for ; Mon, 26 Jun 2006 19:16:37 -0400 Message-ID: <44A06AD3.4070208@tamara-b.org> Date: Mon, 26 Jun 2006 19:16:35 -0400 From: Bob Richards Organization: M/V Tamara B User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.6.0.104 MIME-Version: 1.0 CC: freebsd-hackers@freebsd.org References: <449D8616.5040306@tamara-b.org> <17565.37706.966913.737964@bhuda.mired.org> <20060625064303.GR19592@silverwraith.com> In-Reply-To: <20060625064303.GR19592@silverwraith.com> X-Enigmail-Version: 0.94.0.0 OpenPGP: id=F2DBFD9C; url=http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0xD652FFB3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: A New FreeBSD Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bob@tamara-b.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 23:39:10 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Wow! First I want to thank all of you who responded for the great information! As I read it all, I became more and more excited about my decision to switch to FreeBsd! And became more and more impatient with US Postal Mail! So! I went and downloaded the floppy Install Set from freebsd.org, and created the floppy install set. I set up the Dell server thus: 19GB Drives 1 through 4 in a RAID 1/0 IE 2 sets of Mirrors, in a striped array, making up the first (and bootable) container on the PERC 2 controller. The last 2 19GB Drives. I simply Mirrored into a second 19GB container. So, from the BIOS percpective I had a APROX 33GB Drive, and an additional 19GB drive available for the OS. Pretty much more than I need! (for now) So! I boot the box from boot disk, and boot is OK.... asked for Kernel 1 floppy, the Kernel 2 Floppy..... all A-OK! Install starts, and I proceed. I run through the FDISK portion of the install; Allocate the entire first "drive" to FreeBsd, and say "AUTO"..... it allocates what appears to be a reasonable slice to each mount-point, and I proceed, with a "full Install" Via FTP. FreeBsd, was intelligent enough to find/use the DHCP server, and connected to "freebsd.org", and downloaded a mess of stuff!..... OK; Install "successfully" completed, want to add APPS? Sure! Why not! So I picked out some editors and shells I use all the time, and PORTS went out to get them..... at this point, my DSL connecton went down! Damn! I reset the router, and back up..... BUT An IP change occurred and the download from the FTP site never continued! I could do nothing except "ABORT" the install! So fine! I aborted..... Since I had received the "Congratulations" on an Install message, I "ASSUMED" all I had to do was re-boot from HD and go to SYSINSTALL and complete the install. NOT! On Boot, the boot-loader complained bitterly "Can't find a Kernel to boot", and dropped me to an "OK" prompt. Damn says I! Murpheys law in effect! So I just booted from the floppies again, and started the install again.... NOT SO! Even after another FDISK, the system knew I had data on the drives, and simply went ahead and finished what it had not completed..... On end, I "exited" Install, the system re-booted, and again, it could not find a Kernel to boot! The slice/allocation was percerved, even after another "AUTO" Fdisk! Now I was upset! (BSD Damn well be more smart than LINUX!) The FDISK never wiped out all the old data..... Someone NEVER thought-out this particular scenario! What do I do? Re-Format the RAID Array? and for-sure wipe out the privious install attempt? Any sugestions as to where to start again? TIA Bob -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFEoGrTeoERI/Lb/ZwRAgZ8AJ9vbzhVf1Z0SmZy1AkR7XDV6+56+wCZARld SUEuIU9b9lQ1W5kswb1xCg4= =TqmE -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 07:02:02 2006 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 3DE7D16A400 for ; Tue, 27 Jun 2006 07:02:02 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DCF943D78 for ; Tue, 27 Jun 2006 07:01:57 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: by nf-out-0910.google.com with SMTP id c29so1015345nfb for ; Tue, 27 Jun 2006 00:01:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=Sf532AWCBayKrPBZdPL1kccUKZE21aO+1Ko6wNhjBrNcRSEgjbccadpwKX5Fro4DkybFFNLo7jJ4TY0zBZhz6BV+aieG9I69dqINYaD3+bakd3+QbBSLI0l7kzK6N56K+M2xAeR62lCdk/DNisjZnJrzzRL3c2h8jafwKwMkaS0= Received: by 10.48.43.11 with SMTP id q11mr5336561nfq; Tue, 27 Jun 2006 00:01:56 -0700 (PDT) Received: by 10.48.237.13 with HTTP; Tue, 27 Jun 2006 00:01:56 -0700 (PDT) Message-ID: Date: Tue, 27 Jun 2006 12:31:56 +0530 From: "Kamal R. Prasad" Sender: kamalpr@gmail.com To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Google-Sender-Auth: f12aebfc55be7b90 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: freebsd 6.1 on IBM thinkpad T 40 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, 27 Jun 2006 07:02:02 -0000 Hello, I am planning to install freebsd 6.1 on IBM thinkpad (now lenovo) T 40. Some people have reported issues for the same for freebsd 5.1 (related to the em driver and possibly atheros). Have these been checked into 6.1 code base and/or do I need to follow any procedure to get the same installed? thanks -kamal From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 07:36:13 2006 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 724EA16A54E; Tue, 27 Jun 2006 07:36:13 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id D325044574; Tue, 27 Jun 2006 07:17:10 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.13.6/8.13.6) with ESMTP id k5R7H5Xo041106; Tue, 27 Jun 2006 11:17:06 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Tue, 27 Jun 2006 11:17:05 +0400 (MSD) From: Dmitry Morozovsky To: Eric Anderson In-Reply-To: <44A01A6D.7030000@centtech.com> Message-ID: <20060627110802.X39639@woozle.rinet.ru> References: <20060626193005.U9063@woozle.rinet.ru> <44A01A6D.7030000@centtech.com> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (woozle.rinet.ru [0.0.0.0]); Tue, 27 Jun 2006 11:17:06 +0400 (MSD) Cc: hackers@freebsd.org, Pawel Jakub Dawidek Subject: Re: ENOMEM @ RELENG_6 graid3 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, 27 Jun 2006 07:36:13 -0000 On Mon, 26 Jun 2006, Eric Anderson wrote: EA> > turning on bootverbose reveals additional info to EA> > ad10: FAILURE - out of memory in start EA> > EA> > under load this machine (5 ata disks, most of their space allocated for 2 EA> > graid3's) many messages like EA> > EA> > ENOMEM 0xc6e834a4 on 0xc493c080(ad8) EA> > ENOMEM 0xc703fdec on 0xc4960480(ad10) EA> > ENOMEM 0xc6b49528 on 0xc4901400(ad0) EA> > ENOMEM 0xc6c378c4 on 0xc493ca80(ad4g) EA> > ENOMEM 0xc662b210 on 0xc4900b00(ad0f) EA> > ENOMEM 0xc6b33630 on 0xc493c380(ad4) EA> > ENOMEM 0xc7320d68 on 0xc4901400(ad0) EA> > ENOMEM 0xc6bd6948 on 0xc493c380(ad4) EA> > ENOMEM 0xc7299dec on 0xc493c200(ad6) EA> > ENOMEM 0xc6d91528 on 0xc495f700(ad6g) EA> > ENOMEM 0xc47b07bc on 0xc4960480(ad10) EA> > ENOMEM 0xc7c22bdc on 0xc493c080(ad8) EA> > EA> > Machine is rather stable; however, it panics two or three times on /ftp: EA> > bad dir ino 3454117 at offset 444: mangled entry EA> > panic: ufs_dirbad: bad dir EA> > EA> > Any hints to debug? EA> EA> Are you sure the filesystem is clean? Can you try unmounting it, and EA> running an fsck_ffs on it? Also, I think this has been discussed before on EA> freebsd-geom@, did you check the archives? Well, these two may not be linked together. (fsck does not report any errors though) As to ENOMEM/no memory in start, I'm fairly sure machine is not in generic memory-shortage; and, these errors are generated only on machine with graid3. Maybe volume size (slightly larged than 1T) is relevant as well: root@kucha:/pub/FreeBSD# graid3 list r0g Geom name: r0g State: COMPLETE Components: 5 Flags: ROUND-ROBIN GenID: 0 SyncID: 9 ID: 2611540979 Zone64kFailed: 35144 Zone64kRequested: 18641827 Zone16kFailed: 388 Zone16kRequested: 246907 Zone4kFailed: 19793 Zone4kRequested: 5651352 Providers: 1. Name: raid3/r0g Mediasize: 1118758531072 (1.0T) Sectorsize: 2048 Mode: r1w1e1 Consumers: 1. Name: ad0g Mediasize: 279689633280 (260G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Flags: DIRTY GenID: 0 SyncID: 9 Number: 4 Type: PARITY 2. Name: ad4g Mediasize: 279689633280 (260G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Flags: DIRTY GenID: 0 SyncID: 9 Number: 1 Type: DATA 3. Name: ad6g Mediasize: 279689633280 (260G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Flags: DIRTY GenID: 0 SyncID: 9 Number: 0 Type: DATA 4. Name: ad8g Mediasize: 279689633280 (260G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Flags: DIRTY GenID: 0 SyncID: 9 Number: 2 Type: DATA 5. Name: ad10g Mediasize: 279689633280 (260G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Flags: DIRTY GenID: 0 SyncID: 9 Number: 3 Type: DATA Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 09:00:41 2006 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 7F9FF16A4D0 for ; Tue, 27 Jun 2006 09:00:41 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6300F43D78 for ; Tue, 27 Jun 2006 09:00:36 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail28.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k5R90Xqo023141 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 27 Jun 2006 19:00:34 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k5R90WES001289; Tue, 27 Jun 2006 19:00:33 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k5R90VN2001288; Tue, 27 Jun 2006 19:00:32 +1000 (EST) (envelope-from peter) Date: Tue, 27 Jun 2006 19:00:31 +1000 From: Peter Jeremy To: Bob Richards Message-ID: <20060627090031.GE714@turion.vk2pj.dyndns.org> References: <449D8616.5040306@tamara-b.org> <17565.37706.966913.737964@bhuda.mired.org> <20060625064303.GR19592@silverwraith.com> <44A06AD3.4070208@tamara-b.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dFWYt1i2NyOo1oI9" Content-Disposition: inline In-Reply-To: <44A06AD3.4070208@tamara-b.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: A New FreeBSD Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2006 09:00:41 -0000 --dFWYt1i2NyOo1oI9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This belongs on -questions, not -hackers at this point. Please wrap your lines before 80 columns. On Mon, 2006-Jun-26 19:16:35 -0400, Bob Richards wrote: On Boot, the >boot-loader complained bitterly "Can't find a Kernel to boot", and >dropped me to an "OK" prompt. Damn says I! Murpheys law in effect! This deliberate: sysinstall doesn't install the kernel until everything else is complete so you can be sure that the install completed OK. =20 > The FDISK never wiped out all the old data..... fdisk/disklabel doesn't touch data on the disk. It just writes information about where the slices/partitions are. This means that if you accidently put the wrong slice/partition map on your disk, you > Someone NEVER thought-out this particular scenario! sysinstall realises that you have valid UFS filesystems and won't over-write them unless you explicitly tell it to. > What do I do? Redo from scratch. In the 'FreeBSD Disklabel Editor' window, scroll down to your partitions and either 'D'elete them all and re-create using 'A'uto or toggle the 'N'ewfs flag and set the 'M'ount point. --=20 Peter Jeremy --dFWYt1i2NyOo1oI9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEoPOt/opHv/APuIcRAs/hAJ9PTT6l0JjUA6DtFkQzY2VnwYeKSgCfUkxG Sf1e6iKmcDDSFM0sfKt+CIQ= =8890 -----END PGP SIGNATURE----- --dFWYt1i2NyOo1oI9-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 09:12:19 2006 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 7569B16A403 for ; Tue, 27 Jun 2006 09:12:19 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E17243D70 for ; Tue, 27 Jun 2006 09:12:14 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k5R9C7MB037785; Tue, 27 Jun 2006 13:12:08 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k5R9C6ZJ037784; Tue, 27 Jun 2006 13:12:06 +0400 (MSD) (envelope-from yar) Date: Tue, 27 Jun 2006 13:12:06 +0400 From: Yar Tikhiy To: mal content Message-ID: <20060627091206.GB36941@comp.chem.msu.su> References: <8e96a0b90606220747vf80e805k650518981bde754@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e96a0b90606220747vf80e805k650518981bde754@mail.gmail.com> User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: Real time privileges for non-root users 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, 27 Jun 2006 09:12:19 -0000 On Thu, Jun 22, 2006 at 03:47:44PM +0100, mal content wrote: > Hello. > > Is it possible to grant real-time privileges to ordinary > users (not root) under FreeBSD? I'm doing some audio > work and I'd like to give real time privileges to my user id. While I can't think of an existing user-friendly solution, you can use available tools and interfaces to satisfy your needs. The easiest, but not the smartest, way is to use rtprio(1). >From rtprio(2): Realtime and idle priority is inherited through fork() and exec(). That is, you can start a shell with higher real-time priority, and it will hand its priority down to its children: $ su # rtprio 1 su yourself A smarter way is to use login.conf(5). Idle or real-time priority can be set for a login class, but the feature doesn't seem to be documented anywhere except in the code itself. The respective block from src/lib/libutil/login_class.c is as follows: /* Set the process priority */ if (flags & LOGIN_SETPRIORITY) { p = login_getcapnum(lc, "priority", LOGIN_DEFPRI, LOGIN_DEFPRI); if(p > PRIO_MAX) { rtp.type = RTP_PRIO_IDLE; rtp.prio = p - PRIO_MAX - 1; p = (rtp.prio > RTP_PRIO_MAX) ? 31 : p; if(rtprio(RTP_SET, 0, &rtp)) syslog(LOG_WARNING, "rtprio '%s' (%s): %m", pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS); } else if(p < PRIO_MIN) { rtp.type = RTP_PRIO_REALTIME; rtp.prio = abs(p - PRIO_MIN + RTP_PRIO_MAX); p = (rtp.prio > RTP_PRIO_MAX) ? 1 : p; if(rtprio(RTP_SET, 0, &rtp)) syslog(LOG_WARNING, "rtprio '%s' (%s): %m", pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS); } else { if (setpriority(PRIO_PROCESS, 0, (int)p) != 0) syslog(LOG_WARNING, "setpriority '%s' (%s): %m", pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS); } } Can you grok it? ;-) -- Yar From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 09:22:29 2006 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 5C03F16A403 for ; Tue, 27 Jun 2006 09:22:29 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB50943D64 for ; Tue, 27 Jun 2006 09:22:25 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k5R9M7ZV037963; Tue, 27 Jun 2006 13:22:07 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k5R9M1aA037958; Tue, 27 Jun 2006 13:22:01 +0400 (MSD) (envelope-from yar) Date: Tue, 27 Jun 2006 13:22:01 +0400 From: Yar Tikhiy To: David Gilbert Message-ID: <20060627092201.GC36941@comp.chem.msu.su> References: <17560.50693.145833.875903@canoe.dclg.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17560.50693.145833.875903@canoe.dclg.ca> User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: curious 6.1 GRE behaviour. 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, 27 Jun 2006 09:22:29 -0000 On Wed, Jun 21, 2006 at 12:07:33AM -0400, David Gilbert wrote: > I was using some GRE tunnels on 6.1-RELEASE recently. The odd thing > I'm finding is that the initial creation of the tunnel using > cloned_interfaces and ifconfig_gre0="" results in the gre0 > interface being created without the "running" bit set. > > tcpdump on the interface or even "ifconfig gre0 up" starts it. > > This is also odd because the "UP" flag is set. Ie: > [1:2:301]root@pbx:~> ifconfig > [...] > gre0: flags=9011 mtu 1476 > tunnel inet x.x.x.x --> y.y.y.y > inet6 fe80::240:63ff:fee2:eae9%gre0 prefixlen 64 scopeid 0x5 > inet a.a.a.a --> b.b.b.b netmask 0xfffffffe > [1:2:302]root@pbx:~> ifconfig gre0 up > [1:3:303]root@pbx:~> ifconfig > [...] > gre0: flags=9051 mtu 1476 > tunnel inet x.x.x.x --> y.y.y.y > inet6 fe80::240:63ff:fee2:eae9%gre0 prefixlen 64 scopeid 0x5 > inet a.a.a.a --> b.b.b.b netmask 0xfffffffe FWIW, gre(4) in CURRENT doesn't seem to have this problem. However, it has a different one: the system will lose its default route upon the destruction of a gre interface albeit the default route is via a different interface. Aha, it appears to be due to the activity of /etc/pccard_ether, not gre(4) itself. Looks like a way of fast and easy foot-shooting unless one remembers to set removable_route_flush to NO. Are we drifting from the server/router market to the desktop/mobile market?.. -- Yar From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 09:42:45 2006 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 D67C516A407; Tue, 27 Jun 2006 09:42:45 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5DC643D69; Tue, 27 Jun 2006 09:42:44 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.183.95] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1FvA5i40T4-0003F1; Tue, 27 Jun 2006 11:42:43 +0200 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Tue, 27 Jun 2006 11:42:35 +0200 User-Agent: KMail/1.9.1 References: <200606252139.15862.max@love2party.net> In-Reply-To: <200606252139.15862.max@love2party.net> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart42660691.lkNVKz3v7n"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200606271142.42396.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-current@freebsd.org Subject: Re: Call for Status Reports: 07/07 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, 27 Jun 2006 09:42:46 -0000 --nextPart42660691.lkNVKz3v7n Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Seems I haven't been clear enough about how to submit reports. Please use = the=20 XML template or XML creator provided at:=20 http://www.freebsd.org/cgi/monthly.cgi=20 http://www.freebsd.org/news/status/report-sample.xml Thanks. On Sunday 25 June 2006 21:39, I wrote: > All, > > it's time for the Status Reports for the second quater of 2006. During t= he > last three month a lot of progress has been made. FreeBSD 6.1 and 5.5 are > released, a new round of Google's Summer of Code has been started, and a > very productive Developer Summit took place during BSDCan. On top of tha= t, > we are now running on Sun's new architecture and a lot of progress has be= en > made for the arm platform, making FreeBSD more viable in the embedded > market. > > We hope that all your projects made good progress as well and would like = to > hear about it. Please share your news and progress over the last three > month with us. Submission are due by 7 July, 2006. > > Once again, submissions are not limited to FreeBSD developers. We will > happily include non-code projects of any kind as long as it is FreeBSD > related. > > For previous reports and submission details, please see: > http://www.freebsd.org/news/status/ =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 --nextPart42660691.lkNVKz3v7n Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQBEoP2SXyyEoT62BG0RAvabAJsHgJVBHxm9Xs0df64LAWGiXxNu3QCfXbYj kFdbJqNgDVvW9AeaTOOB12g= =eDD3 -----END PGP SIGNATURE----- --nextPart42660691.lkNVKz3v7n-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 09:51:28 2006 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 7683C16A402 for ; Tue, 27 Jun 2006 09:51:28 +0000 (UTC) (envelope-from dom@helenmarks.co.uk) Received: from mail.goodforbusiness.co.uk (mail.goodforbusiness.co.uk [81.19.179.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AB6343D46 for ; Tue, 27 Jun 2006 09:51:19 +0000 (GMT) (envelope-from dom@helenmarks.co.uk) Received: from localhost (localhost [127.0.0.1]) by mail.goodforbusiness.co.uk (Postfix) with ESMTP id 7316A1146B; Tue, 27 Jun 2006 10:51:18 +0100 (BST) X-Virus-Scanned: mail.goodforbusiness.co.uk Received: from mail.goodforbusiness.co.uk ([127.0.0.1]) by localhost (mail.goodforbusiness.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1oH-+besZK0R; Tue, 27 Jun 2006 10:51:17 +0100 (BST) Received: from mail.helenmarks.co.uk (unknown [192.168.100.1]) by mail.goodforbusiness.co.uk (Postfix) with ESMTP id 6E0E61141E; Tue, 27 Jun 2006 10:51:17 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.helenmarks.co.uk (Postfix) with ESMTP id 092E51714A; Tue, 27 Jun 2006 10:51:16 +0100 (BST) X-Virus-Scanned: amavisd-new at helenmarks.co.uk Received: from mail.helenmarks.co.uk ([127.0.0.1]) by localhost (mail.helenmarks.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TNbleudgXo4G; Tue, 27 Jun 2006 10:50:57 +0100 (BST) Received: by mail.helenmarks.co.uk (Postfix, from userid 80) id CBF36170EB; Tue, 27 Jun 2006 10:50:56 +0100 (BST) Received: from mailhost.graphdata.co.uk ([195.12.22.194]) (SquirrelMail authenticated user dom) by mail.helenmarks.co.uk with HTTP; Tue, 27 Jun 2006 10:50:56 +0100 (BST) Message-ID: <1192.195.12.22.194.1151401856.squirrel@mail.helenmarks.co.uk> In-Reply-To: <44A0094C.6060507@barafranca.com> References: <44A0094C.6060507@barafranca.com> Date: Tue, 27 Jun 2006 10:50:56 +0100 (BST) From: "Dominic Marks" To: "Hugo Silva" User-Agent: SquirrelMail/1.4.6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-hackers@freebsd.org Subject: Re: Database on 6.1/AMD64 ? 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, 27 Jun 2006 09:51:28 -0000 Hugo Silva wrote: > Hi list, > > I'm considering switching a database server to FreeBSD 6.1/AMD64. The > Opteron processor I am interested in is a dual core. > > I would like to know about any stories using FreeBSD/AMD64, MySQL 5.0, > and two dual core processors. Will I have stability/performance issues > ? > Will the two dual cores kick ass, or will they give me trouble ? I might be out of date, but as far as I know MySQL performance on FreeBSD is still quite far behind Linux. So if you want to get the absolute best performance then you might want to run Linux. Search the mailing lists for MySQL performance and you should find lots of discussion and benchmarks on the topic. HTH, Dominic > Any insight into this matter would be most useful. Thanks! > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 13:27:15 2006 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 805BA16A400; Tue, 27 Jun 2006 13:27:15 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E75C743D72; Tue, 27 Jun 2006 13:27:13 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k5RDRCH9043472; Tue, 27 Jun 2006 08:27:13 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44A1323F.4050407@centtech.com> Date: Tue, 27 Jun 2006 08:27:27 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.4 (X11/20060612) MIME-Version: 1.0 To: Dmitry Morozovsky References: <20060626193005.U9063@woozle.rinet.ru> <44A01A6D.7030000@centtech.com> <20060627110802.X39639@woozle.rinet.ru> In-Reply-To: <20060627110802.X39639@woozle.rinet.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1564/Mon Jun 26 09:55:16 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: hackers@freebsd.org, Pawel Jakub Dawidek Subject: Re: ENOMEM @ RELENG_6 graid3 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, 27 Jun 2006 13:27:15 -0000 Dmitry Morozovsky wrote: > On Mon, 26 Jun 2006, Eric Anderson wrote: > > EA> > turning on bootverbose reveals additional info to > EA> > ad10: FAILURE - out of memory in start > EA> > > EA> > under load this machine (5 ata disks, most of their space allocated for 2 > EA> > graid3's) many messages like > EA> > > EA> > ENOMEM 0xc6e834a4 on 0xc493c080(ad8) > EA> > ENOMEM 0xc703fdec on 0xc4960480(ad10) > EA> > ENOMEM 0xc6b49528 on 0xc4901400(ad0) > EA> > ENOMEM 0xc6c378c4 on 0xc493ca80(ad4g) > EA> > ENOMEM 0xc662b210 on 0xc4900b00(ad0f) > EA> > ENOMEM 0xc6b33630 on 0xc493c380(ad4) > EA> > ENOMEM 0xc7320d68 on 0xc4901400(ad0) > EA> > ENOMEM 0xc6bd6948 on 0xc493c380(ad4) > EA> > ENOMEM 0xc7299dec on 0xc493c200(ad6) > EA> > ENOMEM 0xc6d91528 on 0xc495f700(ad6g) > EA> > ENOMEM 0xc47b07bc on 0xc4960480(ad10) > EA> > ENOMEM 0xc7c22bdc on 0xc493c080(ad8) > EA> > > EA> > Machine is rather stable; however, it panics two or three times on /ftp: > EA> > bad dir ino 3454117 at offset 444: mangled entry > EA> > panic: ufs_dirbad: bad dir > EA> > > EA> > Any hints to debug? > EA> > EA> Are you sure the filesystem is clean? Can you try unmounting it, and > EA> running an fsck_ffs on it? Also, I think this has been discussed before on > EA> freebsd-geom@, did you check the archives? > > Well, these two may not be linked together. (fsck does not report any errors > though) > > As to ENOMEM/no memory in start, I'm fairly sure machine is not in generic > memory-shortage; and, these errors are generated only on machine with graid3. What does your kernel config look like? Are you using (or did you ever use) extended attributes on this fs? Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 13:43:46 2006 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 06E2716A403; Tue, 27 Jun 2006 13:43:46 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 573C943D46; Tue, 27 Jun 2006 13:43:45 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.13.6/8.13.6) with ESMTP id k5RDhfpg049955; Tue, 27 Jun 2006 17:43:41 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Tue, 27 Jun 2006 17:43:41 +0400 (MSD) From: Dmitry Morozovsky To: Eric Anderson In-Reply-To: <44A1323F.4050407@centtech.com> Message-ID: <20060627174228.M47387@woozle.rinet.ru> References: <20060626193005.U9063@woozle.rinet.ru> <44A01A6D.7030000@centtech.com> <20060627110802.X39639@woozle.rinet.ru> <44A1323F.4050407@centtech.com> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (woozle.rinet.ru [0.0.0.0]); Tue, 27 Jun 2006 17:43:41 +0400 (MSD) Cc: hackers@freebsd.org, Pawel Jakub Dawidek Subject: Re: ENOMEM @ RELENG_6 graid3 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, 27 Jun 2006 13:43:46 -0000 On Tue, 27 Jun 2006, Eric Anderson wrote: EA> > As to ENOMEM/no memory in start, I'm fairly sure machine is not in generic EA> > memory-shortage; and, these errors are generated only on machine with EA> > graid3. EA> EA> What does your kernel config look like? Are you using (or did you ever use) EA> extended attributes on this fs? GENERIC stripped down to a minimum. geom classes loaded as modules. No extended attributes at all. nfsserver as module. Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 12:33:57 2006 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 124AE16A401 for ; Tue, 27 Jun 2006 12:33:57 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7506743D72 for ; Tue, 27 Jun 2006 12:33:50 +0000 (GMT) (envelope-from michel@lpthe.jussieu.fr) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.13.6/jtpda-5.4) with ESMTP id k5RCXn7B028960 for ; Tue, 27 Jun 2006 14:33:49 +0200 (CEST) X-Ids: 166 Received: from niobe.lpthe.jussieu.fr (niobe.lpthe.jussieu.fr [134.157.10.41]) by parthe.lpthe.jussieu.fr (Postfix) with ESMTP id 3852EA034D for ; Tue, 27 Jun 2006 14:33:48 +0200 (CEST) Received: by niobe.lpthe.jussieu.fr (Postfix, from userid 2005) id 3131234; Tue, 27 Jun 2006 14:33:48 +0200 (CEST) Date: Tue, 27 Jun 2006 14:33:48 +0200 From: Michel Talon To: freebsd-hackers@freebsd.org Message-ID: <20060627123348.GA20494@lpthe.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (shiva.jussieu.fr [134.157.0.166]); Tue, 27 Jun 2006 14:33:49 +0200 (CEST) X-Virus-Scanned: ClamAV 0.88.2/1564/Mon Jun 26 16:55:16 2006 on shiva.jussieu.fr X-Virus-Status: Clean X-Miltered: at shiva.jussieu.fr with ID 44A125AD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Mailman-Approved-At: Tue, 27 Jun 2006 14:25:33 +0000 Subject: Re: Database on 6.1/AMD64 ? 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, 27 Jun 2006 12:33:57 -0000 Read the blog http://www.mysqlperformanceblog.com/ written by a mysql expert, especially after "I'm not big expert in FreeBSD" and you will discover that in fact Linux and FreeBSD are roughly equivalent on the following box configuration params: Box: Dual Core Athlon 3800+, 1Gb of RAM, Motherboard ASUS A8N-E -- Michel TALON From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 14:47:18 2006 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 730FE16A506; Tue, 27 Jun 2006 14:47:18 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7575E43D69; Tue, 27 Jun 2006 14:47:17 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from [192.168.1.101] (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id 45D66244C44; Tue, 27 Jun 2006 23:47:16 +0900 (JST) Message-ID: <44A144F1.1090909@freebsd.org> Date: Tue, 27 Jun 2006 23:47:13 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5.0.4 (X11/20060612) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, freebsd-fs@freebsd.org, rodrigc@crodrigues.org Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Cc: daichi@freebsd.org, ozawa@ongs.co.jp Subject: [ANN] unionfs =?iso-2022-jp?b?cGF0Y2hzZXQtMRskQiM1GyhCIHJlbGVh?= =?iso-2022-jp?b?c2UsIGl0IGlzIHJlYWR5IGZvciB0aGUgbWVyZ2U=?= 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, 27 Jun 2006 14:47:18 -0000 Hi Guys! It is my pleasure and honor to announce the availability of the unionfs patchset-15. The p15 is an important milestone. It is ready for the merge. Patchset-15: For 7-current http://people.freebsd.org/~daichi/unionfs/unionfs-p15.diff For 6.x http://people.freebsd.org/~daichi/unionfs/unionfs6-p15.diff Changes in unionfs-p15.diff - deleted -r option in limbo and updated ount_unionfs.8 - changed source code style and naming rules for fitting to FreeBSD kernel src style The documents of those unionfs patches: http://people.freebsd.org/~daichi/unionfs/ (English) http://people.freebsd.org/~daichi/unionfs/index-ja.html (Japanese) We think that patchset-15 is ready for the merge to FreeBSD base system. It has extensive trials, good stability and source code quality enough to get the merge. I'll commit it to FreeBSD base system after my mentor's check. Thanks HEADS UP: to Mr. Rodrigues (rodrigc) Please check the unionfs patchset-15. After your mention, I'll do the commit work :) -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 27 18:43:20 2006 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 3543816A63E for ; Tue, 27 Jun 2006 18:43:20 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34B4443E2C for ; Tue, 27 Jun 2006 18:09:32 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id B716751859; Tue, 27 Jun 2006 20:09:31 +0200 (CEST) Received: from localhost (ana50.internetdsl.tpnet.pl [83.17.82.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id ADE6B5131F; Tue, 27 Jun 2006 20:09:23 +0200 (CEST) Date: Tue, 27 Jun 2006 20:06:36 +0200 From: Pawel Jakub Dawidek To: Dmitry Morozovsky Message-ID: <20060627180636.GA24054@garage.freebsd.pl> References: <20060626193005.U9063@woozle.rinet.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <20060626193005.U9063@woozle.rinet.ru> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=ALL_TRUSTED,BAYES_00, RCVD_IN_XBL autolearn=ham version=3.0.4 Cc: hackers@FreeBSD.org Subject: Re: ENOMEM @ RELENG_6 graid3 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, 27 Jun 2006 18:43:20 -0000 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 26, 2006 at 07:34:51PM +0400, Dmitry Morozovsky wrote: > Dear colleagues, >=20 > turning on bootverbose reveals additional info to=20 >=20 > ad10: FAILURE - out of memory in start >=20 > under load this machine (5 ata disks, most of their space allocated for 2= =20 > graid3's) many messages like >=20 > ENOMEM 0xc6e834a4 on 0xc493c080(ad8) > ENOMEM 0xc703fdec on 0xc4960480(ad10) > ENOMEM 0xc6b49528 on 0xc4901400(ad0) > ENOMEM 0xc6c378c4 on 0xc493ca80(ad4g) > ENOMEM 0xc662b210 on 0xc4900b00(ad0f) > ENOMEM 0xc6b33630 on 0xc493c380(ad4) > ENOMEM 0xc7320d68 on 0xc4901400(ad0) > ENOMEM 0xc6bd6948 on 0xc493c380(ad4) > ENOMEM 0xc7299dec on 0xc493c200(ad6) > ENOMEM 0xc6d91528 on 0xc495f700(ad6g) > ENOMEM 0xc47b07bc on 0xc4960480(ad10) > ENOMEM 0xc7c22bdc on 0xc493c080(ad8) >=20 > Machine is rather stable; however, it panics two or three times on=20 > /ftp: bad dir ino 3454117 at offset 444: mangled entry > panic: ufs_dirbad: bad dir >=20 > Any hints to debug? I hope ENOMEM errors are not related to your panic, because on ENOMEM GEOM should repeat the request a bit later. Will be good to know if you have simlar panics without graid3. For example on a plain disk, but with 2kB sector size (you can do it with gnop(8)). You can also try gstripe(8) your disks with small stripesize, eg. 512 bytes and use gnop(8) on top of it to change sector size, so all disks will be used, in case there is a problem with your controller. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEoXOsForvXbEpPzQRAjEkAKDeOLeoLCeoC2xWZFFHC0N13w8WPACgj82E uIzJo9KL5Rmr3cc5IFNloTU= =DPKP -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 00:00:43 2006 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 2D49816A4E6 for ; Wed, 28 Jun 2006 00:00:43 +0000 (UTC) (envelope-from nuno.antunes@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6064644D34 for ; Tue, 27 Jun 2006 19:13:10 +0000 (GMT) (envelope-from nuno.antunes@gmail.com) Received: by nz-out-0102.google.com with SMTP id i1so2359228nzh for ; Tue, 27 Jun 2006 12:13:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=leihlzAruNFKtIDTPW5jFL6C5vHRw3lLNpR0GMcNI2jfaDrAit/VX+w1tPzVvmyBmUOFEBkRyq1P+aDJJhSvexzTAYIki7HKYwznFFmyKk1mV9Nb3VX/qrGtnJi7lmOrVrcsTup5GZS83RD09U4HBJsU34iBX3ei+sNed+8Jhnk= Received: by 10.37.13.37 with SMTP id q37mr47287nzi; Tue, 27 Jun 2006 12:13:05 -0700 (PDT) Received: by 10.36.5.6 with HTTP; Tue, 27 Jun 2006 12:13:05 -0700 (PDT) Message-ID: <262949390606271213q6c253aadm11277d3cf6e9ba83@mail.gmail.com> Date: Tue, 27 Jun 2006 20:13:05 +0100 From: "Nuno Antunes" To: "Daichi GOTO" In-Reply-To: <44A144F1.1090909@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44A144F1.1090909@freebsd.org> Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, ozawa@ongs.co.jp, rodrigc@crodrigues.org Subject: =?iso-2022-jp?b?UmU6IFtBTk5dIHVuaW9uZnMgcGF0Y2hzZXQtMRskQiM1GyhC?= =?iso-2022-jp?b?IHJlbGVhc2UsIGl0IGlzIHJlYWR5IGZvciB0aGUgbWVyZ2U=?= 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, 28 Jun 2006 00:00:43 -0000 On 6/27/06, Daichi GOTO wrote: > Hi Guys! > > It is my pleasure and honor to announce the availability of > the unionfs patchset-15. The p15 is an important milestone. > It is ready for the merge. > > Patchset-15: > For 7-current > http://people.freebsd.org/~daichi/unionfs/unionfs-p15.diff > > For 6.x > http://people.freebsd.org/~daichi/unionfs/unionfs6-p15.diff > > Changes in unionfs-p15.diff > - deleted -r option in limbo and updated ount_unionfs.8 > - changed source code style and naming rules for fitting > to FreeBSD kernel src style > > The documents of those unionfs patches: > > http://people.freebsd.org/~daichi/unionfs/ (English) > http://people.freebsd.org/~daichi/unionfs/index-ja.html (Japanese) > > We think that patchset-15 is ready for the merge to FreeBSD base > system. It has extensive trials, good stability and source code > quality enough to get the merge. > > I'll commit it to FreeBSD base system after my mentor's check. > > Thanks > > > HEADS UP: to Mr. Rodrigues (rodrigc) > Please check the unionfs patchset-15. After your mention, I'll > do the commit work :) > > -- > Daichi GOTO, http://people.freebsd.org/~daichi > _______________________________________________ > 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" > Many thanks for the excelent work! Your patchsets made it possible to start and run jails with unionfs mounted userland :-) Can't wait to see it commited. Thanks, Nuno From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 10:55:46 2006 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 1651F16A407 for ; Wed, 28 Jun 2006 10:55:46 +0000 (UTC) (envelope-from adamsmithx@hotmail.com) Received: from hotmail.com (bay7-f2.bay7.hotmail.com [64.4.11.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5E7743D79 for ; Wed, 28 Jun 2006 10:55:45 +0000 (GMT) (envelope-from adamsmithx@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 28 Jun 2006 03:55:45 -0700 Message-ID: Received: from 66.93.45.209 by by7fd.bay7.hotmail.msn.com with HTTP; Wed, 28 Jun 2006 10:55:44 GMT X-Originating-IP: [66.93.45.209] X-Originating-Email: [adamsmithx@hotmail.com] X-Sender: adamsmithx@hotmail.com From: "Joseph Maxwell" To: freebsd-hackers@freebsd.org Date: Wed, 28 Jun 2006 03:55:44 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 28 Jun 2006 10:55:45.0744 (UTC) FILETIME=[6854D500:01C69AA1] Subject: nl_langinfo 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, 28 Jun 2006 10:55:46 -0000 It seems that I am addressing a FreeBSD problem after a Perl installation and a rebuild of the shared lib files Now some perl programs don't work and some apparently non-perl programs have suferred the same faith as well. Its a bit confusing and help is needed !! _______________________ Sys Specs: FreeBSD kooler.com 4.9-STABLE FreeBSD 4.9-STABLE #0: Wed Nov 12 17:41:01 PST 2003 root@wxyz.net:/usr/obj/usr/src/sys/STANDARD i386 _______________________ Under Perl 5.8.2 installed an API and rebuilt shared lib hint files ,/var/run/ld.so.hints /var/run/ld-elf.so.hints, w/ ldconfig -aout, ldconfig -elf, followed by ldconfig -m after experiencing difficulties sourcing some essential *.so files. After this persistent "nl_langinfo" problem created. Ex: launching Perl at the command line ==> /usr/libexec/ld-elf.so.1: /usr/local/lib/perl5/5.8.2/mach/CORE/libperl.so: Undefined symbol "nl_langinfo" Decided to rebuild & upgrade perl w/ V-5.8.8, but this is producing similar problems even at ./configure stage==> *** Error code 1 (ignored) ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm /usr/libexec/ld-elf.so.1: ./miniperl: Undefined symbol "nl_langinfo" *** Error code 1 Stop in /usr/home/koolsrc/perl/perl-5.8.8. ________________________________________ Running /etc/periodic/daily/430.status-rwho Local system status: /usr/libexec/ld-elf.so.1: uptime: Undefined symbol "nl_langinfo" ________________________________________ man -k ls /usr/libexec/ld-elf.so.1: man: Undefined symbol "nl_langinfo" ___________________________________ > _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 06:19:58 2006 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 D5A2216A408 for ; Wed, 28 Jun 2006 06:19:58 +0000 (UTC) (envelope-from lists@nabble.com) Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 987D244691 for ; Wed, 28 Jun 2006 06:19:58 +0000 (GMT) (envelope-from lists@nabble.com) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1FvTP3-0004Eo-UN for freebsd-hackers@freebsd.org; Tue, 27 Jun 2006 23:19:57 -0700 Message-ID: <5078824.post@talk.nabble.com> Date: Tue, 27 Jun 2006 22:55:29 -0700 (PDT) From: YTR To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: ramanjaneyulu.talla@citrix.com X-Nabble-From: YTR References: X-Mailman-Approved-At: Wed, 28 Jun 2006 11:52:56 +0000 Subject: Re: adm1026 support 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, 28 Jun 2006 06:19:58 -0000 Hi, Can you tell me on which Release of BSD (5.5 or pre 5.5) have the support for ADM1026 Driver? Thanks, YTR -- View this message in context: http://www.nabble.com/adm1026-support-tf1800838.html#a5078824 Sent from the freebsd-hackers forum at Nabble.com. From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 12:50:22 2006 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 74C5A16A4CA for ; Wed, 28 Jun 2006 12:50:22 +0000 (UTC) (envelope-from garyj@jennejohn.org) Received: from mail08b.verio.de (mail08b.verio.de [213.198.55.74]) by mx1.FreeBSD.org (Postfix) with SMTP id 3009B43DD7 for ; Wed, 28 Jun 2006 12:47:54 +0000 (GMT) (envelope-from garyj@jennejohn.org) Received: from mx40.stngva01.us.mxservers.net (204.202.242.12) by mail08b.verio.de (RS ver 1.0.95vs) with SMTP id 0-0169598865; Wed, 28 Jun 2006 14:47:52 +0200 (CEST) Received: from www.jennejohn.org [213.198.5.174] (EHLO peedub.jennejohn.org) by mx40.stngva01.us.mxservers.net (mxl_mta-1.3.8-10p4) with ESMTP id 17a72a44.3707.036.mx40.stngva01.us.mxservers.net; Wed, 28 Jun 2006 08:47:45 -0400 (EDT) Received: from jennejohn.org (localhost [127.0.0.1]) by peedub.jennejohn.org (8.13.7/8.11.6) with ESMTP id k5SCkud8003394; Wed, 28 Jun 2006 14:46:56 +0200 (CEST) (envelope-from garyj@jennejohn.org) Message-Id: <200606281246.k5SCkud8003394@peedub.jennejohn.org> X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.0.4 To: YTR In-Reply-To: Message from YTR of "Tue, 27 Jun 2006 22:55:29 PDT." <5078824.post@talk.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 28 Jun 2006 14:46:56 +0200 From: Gary Jennejohn X-Spam: [F=0.2684725648; heur=0.500(-3300); stat=0.268; spamtraq-heur=0.500(2006062108)] X-MAIL-FROM: X-SOURCE-IP: [213.198.5.174] X-Loop-Detect: 1 X-DistLoop-Detect: 1 Cc: freebsd-hackers@freebsd.org Subject: Re: adm1026 support 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, 28 Jun 2006 12:50:22 -0000 YTR writes: > Can you tell me on which Release of BSD (5.5 or pre 5.5) have the support > for ADM1026 Driver? > It isn't supported, but see this: http://lists.freebsd.org/pipermail/freebsd-hackers/2006-June/016886.html --- Gary Jennejohn / garyjATjennejohnDOTorg gjATfreebsdDOTorg garyjATdenxDOTde From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 12:57:37 2006 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 8867816A400 for ; Wed, 28 Jun 2006 12:57:37 +0000 (UTC) (envelope-from asgard@etersoft.ru) Received: from office.etersoft.ru (office.etersoft.ru [87.249.47.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A74B43D79 for ; Wed, 28 Jun 2006 12:57:36 +0000 (GMT) (envelope-from asgard@etersoft.ru) Received: from [192.168.0.22] (sempron.office.etersoft.ru [192.168.0.22]) by office.etersoft.ru (Postfix) with ESMTP id 0225244681 for ; Wed, 28 Jun 2006 16:57:35 +0400 (MSD) Message-ID: <44A27CBE.8060402@etersoft.ru> Date: Wed, 28 Jun 2006 16:57:34 +0400 From: asgard User-Agent: Thunderbird 1.5.0.2 (X11/20060502) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 28 Jun 2006 13:04:13 +0000 Cc: Subject: wine: mapping memory 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: Wed, 28 Jun 2006 12:57:37 -0000 hi, all. in wine project there are few problems on freebsd with windows 16-bits programs. when you'll run such program, wine will crashed with stack overflow. in fact, on freebsd wine doesn't map 1st megabyte of virtual memory, but it should. see ./libs/wine/mmap.c ./dlls/winedos/dosmem.c ./libs/wine/ldt.c in dosmem.c DOSMEM_system should has mapped address, but programs crashes on memset: static void DOSMEM_FillBiosSegments(void) { BYTE *pBiosSys = (BYTE*)DOSMEM_dosmem + 0xf0000; BYTE *pBiosROMTable = pBiosSys+0xe6f5; BIOSDATA *pBiosData = DOSVM_BiosData(); /* in this case *pBiosData = (BIOSDATA *)(DOSMEM_sysmem + 0x400);*/ static const char bios_date[] = "13/01/99"; /* Clear all unused values */ memset( pBiosData, 0, sizeof(*pBiosData) ); /* !!crashes here!! */ /* ... */ have you any suggestions how to resolve this problem? beforehand 10x for help. From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 14:01:00 2006 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 39F5416A4A6 for ; Wed, 28 Jun 2006 14:01:00 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD47F446BB for ; Wed, 28 Jun 2006 14:00:59 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp4-g19.free.fr (Postfix) with ESMTP id C484F54CDE; Wed, 28 Jun 2006 16:00:58 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id C3C5F9B766; Wed, 28 Jun 2006 14:01:28 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id B0B54408A; Wed, 28 Jun 2006 16:01:25 +0200 (CEST) Date: Wed, 28 Jun 2006 16:01:25 +0200 From: Jeremie Le Hen To: Eder Message-ID: <20060628140125.GU10272@obiwan.tataz.chchile.org> References: <2699850605221619u24b39e18kcff20b953ab2d93a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2699850605221619u24b39e18kcff20b953ab2d93a@mail.gmail.com> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: [fbsd] Source ScreenSaver 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, 28 Jun 2006 14:01:00 -0000 Hi, > It follows link of the code and the procedures > > http://200.193.29.195/saver/index.html I have just given a try to it and I must admit it is very, very good looking. I even prefer it to the non-OpenGL matrix module from xscreensaver. Is it possible to added it to the source tree, or are the syscons screensavers doomed to die soon (which would therefore prevent from adding a new screensaver) ? Thank you for your work. I am not sure it will help FreeBSD being better on the server market, but it surely makes it nicer. I think this feature stands beside the colored rc.conf(5) patch. Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 18:10:58 2006 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 6EEC716A416 for ; Wed, 28 Jun 2006 18:10:58 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id D583143F4E for ; Wed, 28 Jun 2006 18:10:48 +0000 (GMT) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.6/8.12.6) with ESMTP id k5SIAlJG030555 for ; Wed, 28 Jun 2006 20:10:47 +0200 Received: from ims.mchp.siemens.de (ims.mchp.siemens.de [139.25.31.39]) by mail1.siemens.de (8.12.6/8.12.6) with ESMTP id k5SIAkSk017219 for ; Wed, 28 Jun 2006 20:10:46 +0200 Received: from mail-ct.mchp.siemens.de (mail-ct.mchp.siemens.de [139.25.31.51]) by ims.mchp.siemens.de with ESMTP id k5SIAkJQ011935 for ; Wed, 28 Jun 2006 20:10:46 +0200 (MEST) Received: from curry.mchp.siemens.de (curry [139.25.40.130]) by mail-ct.mchp.siemens.de (8.12.11/8.12.11) with ESMTP id k5SIAkuH020665 for ; Wed, 28 Jun 2006 20:10:46 +0200 (MEST) Received: (from localhost) by curry.mchp.siemens.de (8.13.6/8.13.6) id k5SIAjn2050907; Date: Wed, 28 Jun 2006 20:10:45 +0200 From: Andre Albsmeier To: freebsd-hackers@freebsd.org Message-ID: <20060628181045.GA54915@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.11 Cc: Andre.Albsmeier@siemens.com Subject: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2006 18:10:58 -0000 There is a nice extension for firefox called prefbar. However, newer versions of prefbar (>=3.3) make firefox die with SIGSEGV, see http://bugzilla.mozdev.org/show_bug.cgi?id=13809 for details. The crash happens in libgklayout.so: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1 (LWP 100116)] 0x29a9599b in nsGlobalWindow::RunTimeout (this=0x8393500, aTimeout=0x8935000) at nsGlobalWindow.cpp:6378 6378 timeout->mArgv[timeout->mArgc] = Current language: auto; currently c++ (gdb) p timeout->mArgc $1 = 0 (gdb) p timeout->mArgv $2 = (jsval *) 0x800 (gdb) p timeout->mArgv[timeout->mArgc] Error accessing memory address 0x800: Bad address. The 0x800 are the result of an earlier malloc(0). When looking at the MALLOC(3) manpage, we can read (near the description of the flags): ... V Attempting to allocate zero bytes will return a NULL pointer instead of a valid pointer. (The default behavior is to make a minimal allocation and return a pointer to it.) This option is provided for System V compatibility. This option is incompatible with the ``X'' option. ... So I gave it a try by running MALLOC_OPTIONS=V firefox and firefox didn't crash anymore and prefbar was running :-). (Now malloc returns NULL and firefox doesn't interpret the result as a pointer to some allocated memory and therefore doesn't use it). The manpage makes me think that when malloc is called with 0 as argument (and no V-flag had been set) the pointer it returns can actually be used (as a pointer to the so-called "minimal allocation"). It seems, that firefox "thinks" the same way :-). However, it is calculated in malloc.c as a constant and is always 0x800 (on my architecture). Any access to this area results in a SIGSEV. I assume the behaviour is meant to show up programming errors: "If you use malloc(0) and are crazy enough to access the 'allocated' memory we give you a SIGSEV to show you how dumb you are :-)". In this case the manpage is wrong (or, at least, mis-leading) and should be fixed (I could give it a try if someone actually is willing to commit it). Apart from that, I suggest, we should run firefox (and maybe other mozilla apps) with MALLOC_OPTIONS=V. Another position could be that firefox is wrong because it NEVER may use ANY return value of a malloc(0), regardless of its content. Opinions, please... -Andre P.S.: If someone wants to know where the crash happens in firefox please see http://bugzilla.mozdev.org/show_bug.cgi?id=13809. From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 18:53:28 2006 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 2D80C16A4B3 for ; Wed, 28 Jun 2006 18:53:28 +0000 (UTC) (envelope-from adamsmithx@hotmail.com) Received: from hotmail.com (bay7-f5.bay7.hotmail.com [64.4.11.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 636EA43EC5 for ; Wed, 28 Jun 2006 16:25:03 +0000 (GMT) (envelope-from adamsmithx@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 28 Jun 2006 09:25:03 -0700 Message-ID: Received: from 66.93.45.209 by by7fd.bay7.hotmail.msn.com with HTTP; Wed, 28 Jun 2006 16:24:58 GMT X-Originating-IP: [66.93.45.209] X-Originating-Email: [adamsmithx@hotmail.com] X-Sender: adamsmithx@hotmail.com In-Reply-To: From: "Joseph Maxwell" To: adamsmithx@hotmail.com, freebsd-hackers@freebsd.org Date: Wed, 28 Jun 2006 09:24:58 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 28 Jun 2006 16:25:03.0322 (UTC) FILETIME=[68C3FBA0:01C69ACF] X-Mailman-Approved-At: Wed, 28 Jun 2006 19:17:46 +0000 Cc: Subject: RE: nl_langinfo 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, 28 Jun 2006 18:53:28 -0000 Problem Solved perl-freebsd, Anton Berezin _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 20:19:37 2006 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 A4A8516A403 for ; Wed, 28 Jun 2006 20:19:37 +0000 (UTC) (envelope-from lgusenet@be-well.ilk.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40CE14498F for ; Wed, 28 Jun 2006 20:19:37 +0000 (GMT) (envelope-from lgusenet@be-well.ilk.org) Received: (qmail 22194 invoked from network); 28 Jun 2006 20:19:36 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 28 Jun 2006 20:19:36 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 0D91128449; Wed, 28 Jun 2006 16:19:35 -0400 (EDT) To: Andre Albsmeier References: <20060628181045.GA54915@curry.mchp.siemens.de> From: Lowell Gilbert Date: Wed, 28 Jun 2006 16:19:35 -0400 In-Reply-To: <20060628181045.GA54915@curry.mchp.siemens.de> (Andre Albsmeier's message of "Wed, 28 Jun 2006 20:10:45 +0200") Message-ID: <44wtb12fu0.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Wed, 28 Jun 2006 21:38:12 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2006 20:19:37 -0000 Andre Albsmeier writes: > > The manpage makes me think that when malloc is called with 0 > as argument (and no V-flag had been set) the pointer it returns > can actually be used (as a pointer to the so-called "minimal > allocation"). It seems, that firefox "thinks" the same way :-). > However, it is calculated in malloc.c as a constant and is > always 0x800 (on my architecture). Any access to this area > results in a SIGSEV. The C standard explicitly allows both behaviours, and requires the implementation to choose one of them. If it returns a non-NULL pointer, though, that pointer can *only* be used for passing back to free(). It may *not* be dereferenced. So firefox is wrong, and actually broken. > I assume the behaviour is meant to show up programming errors: > > "If you use malloc(0) and are crazy enough to access the 'allocated' > memory we give you a SIGSEV to show you how dumb you are :-)". Yes. > In this case the manpage is wrong (or, at least, mis-leading) and > should be fixed (I could give it a try if someone actually is willing > to commit it). I don't see what you are claiming is wrong. Can you give a brief description of you're suggesting. > Apart from that, I suggest, we should run firefox (and maybe other > mozilla apps) with MALLOC_OPTIONS=V. That would be reasonable, particularly for the time being. However, the firefox bug really should be fixed in the upstream sources. Writing past the end of an allocated buffer (which is what the code does, if you think about it) is a serious error. > Another position could be that firefox is wrong because it NEVER > may use ANY return value of a malloc(0), regardless of its content. The C language standard agrees with this position... From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 21:57:14 2006 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 6E7A616A5E2 for ; Wed, 28 Jun 2006 21:57:14 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep19-int.chello.at (viefep14-int.chello.at [213.46.255.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DE44445AB for ; Wed, 28 Jun 2006 21:29:59 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep19-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20060628212958.OPNV22117.viefep19-int.chello.at@wombat.fafoe.narf.at>; Wed, 28 Jun 2006 23:29:58 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id ABC75BC7E; Wed, 28 Jun 2006 23:29:57 +0200 (CEST) Date: Wed, 28 Jun 2006 23:29:57 +0200 From: Stefan Farfeleder To: Andre Albsmeier Message-ID: <20060628212956.GI822@wombat.fafoe.narf.at> Mail-Followup-To: Andre Albsmeier , freebsd-hackers@freebsd.org References: <20060628181045.GA54915@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060628181045.GA54915@curry.mchp.siemens.de> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2006 21:57:15 -0000 On Wed, Jun 28, 2006 at 08:10:45PM +0200, Andre Albsmeier wrote: > There is a nice extension for firefox called prefbar. However, > newer versions of prefbar (>=3.3) make firefox die with SIGSEGV, > see http://bugzilla.mozdev.org/show_bug.cgi?id=13809 for details. > The crash happens in libgklayout.so: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 1 (LWP 100116)] > 0x29a9599b in nsGlobalWindow::RunTimeout (this=0x8393500, aTimeout=0x8935000) at > nsGlobalWindow.cpp:6378 > 6378 timeout->mArgv[timeout->mArgc] = > Current language: auto; currently c++ > (gdb) p timeout->mArgc > $1 = 0 > (gdb) p timeout->mArgv > $2 = (jsval *) 0x800 > (gdb) p timeout->mArgv[timeout->mArgc] > Error accessing memory address 0x800: Bad address. > > The 0x800 are the result of an earlier malloc(0). When looking > at the MALLOC(3) manpage, we can read (near the description of > the flags): > > ... > V Attempting to allocate zero bytes will return a NULL pointer > instead of a valid pointer. (The default behavior is to make a > minimal allocation and return a pointer to it.) This option is > provided for System V compatibility. This option is incompatible > with the ``X'' option. > ... > > > So I gave it a try by running > > MALLOC_OPTIONS=V firefox > > and firefox didn't crash anymore and prefbar was running :-). > (Now malloc returns NULL and firefox doesn't interpret the > result as a pointer to some allocated memory and therefore > doesn't use it). > > The manpage makes me think that when malloc is called with 0 > as argument (and no V-flag had been set) the pointer it returns > can actually be used (as a pointer to the so-called "minimal > allocation"). It seems, that firefox "thinks" the same way :-). > However, it is calculated in malloc.c as a constant and is > always 0x800 (on my architecture). Any access to this area > results in a SIGSEV. > > I assume the behaviour is meant to show up programming errors: > > "If you use malloc(0) and are crazy enough to access the 'allocated' > memory we give you a SIGSEV to show you how dumb you are :-)". > > In this case the manpage is wrong (or, at least, mis-leading) and > should be fixed (I could give it a try if someone actually is willing > to commit it). > Apart from that, I suggest, we should run firefox (and maybe other > mozilla apps) with MALLOC_OPTIONS=V. > > Another position could be that firefox is wrong because it NEVER > may use ANY return value of a malloc(0), regardless of its content. > > Opinions, please... The C Standard says the following about malloc(0): If the size of the space requested is zero, the behavior is implementation-defined: either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object. So our default behaviour to crash if a pointer returned by malloc(0) is dereferenced is legal and a good one because it catches errors like the above one. I agree that the wording in the man page should be improved. Probably it should say that malloc(0) returns a non-NULL pointer which must not be dereferenced without mentioning a "minimal allocation". Stefan From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 21:57:34 2006 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 6A1D916A858 for ; Wed, 28 Jun 2006 21:57:34 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4856843DF5 for ; Wed, 28 Jun 2006 21:56:32 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id B278B35707 for ; Wed, 28 Jun 2006 23:56:26 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1000) id 7FF986CB0B; Wed, 28 Jun 2006 23:56:21 +0200 (CEST) Date: Wed, 28 Jun 2006 23:56:21 +0200 From: joerg@britannica.bec.de To: freebsd-hackers@freebsd.org Message-ID: <20060628215621.GC18893@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20060628181045.GA54915@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060628181045.GA54915@curry.mchp.siemens.de> User-Agent: Mutt/1.5.11 Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2006 21:57:34 -0000 On Wed, Jun 28, 2006 at 08:10:45PM +0200, Andre Albsmeier wrote: > (Now malloc returns NULL and firefox doesn't interpret the > result as a pointer to some allocated memory and therefore > doesn't use it). Return NULL for malloc(0) is one of two possible implementations. The other behaviour is to generate a unique pointer for each call. Both behaviours are intentionally allowed by the standard and code making assumptions about either is broken. It should be added that returning NULL for malloc(0) is consistent with realloc, so it is actually nicer. Joerg From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 28 23:36:23 2006 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 C549716A551 for ; Wed, 28 Jun 2006 23:36:23 +0000 (UTC) (envelope-from rodrigo@bebik.net) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBE5A452E0 for ; Wed, 28 Jun 2006 23:14:21 +0000 (GMT) (envelope-from rodrigo@bebik.net) Received: from [192.168.0.19] (gam75-4-82-235-223-127.fbx.proxad.net [82.235.223.127]) by smtp6-g19.free.fr (Postfix) with ESMTP id E9ABF224DE for ; Thu, 29 Jun 2006 01:14:20 +0200 (CEST) Message-ID: <44A30BFC.4040501@bebik.net> Date: Thu, 29 Jun 2006 01:08:44 +0200 From: ros User-Agent: Thunderbird 1.5.0.2 (X11/20060613) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 28 Jun 2006 23:38:54 +0000 Subject: sysctl network stats 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, 28 Jun 2006 23:36:24 -0000 Hi, I'm doing a piece of software in perl to collect system stats. Now I'm working on network i/o stats, and I want to collect the per interface informations. I just looking for some informations about datas I can collect thought the sysctl call. regards - ros From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 01:40:52 2006 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 2307116A407 for ; Thu, 29 Jun 2006 01:40:52 +0000 (UTC) (envelope-from randyhyde@earthlink.net) Received: from elasmtp-spurfowl.atl.sa.earthlink.net (elasmtp-spurfowl.atl.sa.earthlink.net [209.86.89.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id B86A9448C1 for ; Thu, 29 Jun 2006 01:40:51 +0000 (GMT) (envelope-from randyhyde@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=aiRSMtsrGBmxQaQ4qXZzg4ISVAjgNAkzG3M1NzBky/gvWDLRJwZsu02B9OipbTOG; h=Received:Message-ID:From:To:References:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE:X-ELNK-Trace:X-Originating-IP; Received: from [24.180.58.59] (helo=pentiv) by elasmtp-spurfowl.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1FvlWV-0007LX-5K for freebsd-hackers@freebsd.org; Wed, 28 Jun 2006 21:40:51 -0400 Message-ID: <004301c69b1d$164b5370$6302a8c0@pentiv> From: "Randall Hyde" To: References: <20060628181045.GA54915@curry.mchp.siemens.de> <44wtb12fu0.fsf@be-well.ilk.org> Date: Wed, 28 Jun 2006 18:41:05 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-ELNK-Trace: eba5e0c9192a36dcd6dd28457998182d7e972de0d01da9403921984286b2e47f556126d3fe9f547e350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.180.58.59 Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 01:40:52 -0000 Hi All, I'm trying to port my compiler from Linux to freeBSD. It looked like a simple job up to the point I ran my flex code through FLEX on freeBSD. When GCC processes lex.yy.c I get a complaint about an illegal numeric constant in yy_get_next_buffer, which is all FLEX generated (or prewritten) code. The thing compiler just fine under Linux. Any ideas? Cheers, Randy Hyde From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 02:12:35 2006 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 3506416A403 for ; Thu, 29 Jun 2006 02:12:35 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFAC044DE7 for ; Thu, 29 Jun 2006 02:12:34 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.13.7/8.13.7) with ESMTP id k5T2Abqm031887; Wed, 28 Jun 2006 19:10:37 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.7/8.13.7/Submit) id k5T2AS04031886; Wed, 28 Jun 2006 19:10:28 -0700 (PDT) (envelope-from sgk) Date: Wed, 28 Jun 2006 19:10:28 -0700 From: Steve Kargl To: Randall Hyde Message-ID: <20060629021028.GA31866@troutmask.apl.washington.edu> References: <20060628181045.GA54915@curry.mchp.siemens.de> <44wtb12fu0.fsf@be-well.ilk.org> <004301c69b1d$164b5370$6302a8c0@pentiv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004301c69b1d$164b5370$6302a8c0@pentiv> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 02:12:35 -0000 On Wed, Jun 28, 2006 at 06:41:05PM -0700, Randall Hyde wrote: > Hi All, > I'm trying to port my compiler from Linux to freeBSD. It looked like a > simple job up to the point I ran my flex code through FLEX on freeBSD. When > GCC processes lex.yy.c I get a complaint about an illegal numeric constant > in yy_get_next_buffer, which is all FLEX generated (or prewritten) code. The > thing compiler just fine under Linux. Any ideas? > Cheers, > Randy Hyde > Without seeing the code or the actual error message, I'm guessing the answer is 42. Perhaps, some detail might be appropriate. -- Steve From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 05:08:37 2006 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 B373D16A417 for ; Thu, 29 Jun 2006 05:08:37 +0000 (UTC) (envelope-from matt@gsicomp.on.ca) Received: from gabby.gsicomp.on.ca (CPE00062566c7bb-CM0011e6ede298.cpe.net.cable.rogers.com [70.28.254.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F85D4496F for ; Thu, 29 Jun 2006 05:08:37 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from localhost (localhost [127.0.0.1]) by gabby.gsicomp.on.ca (Postfix) with ESMTP id 07EFC62AB; Thu, 29 Jun 2006 01:40:41 -0400 (EDT) Received: from unknown by localhost (amavisd-new, unix socket) id client-9QMkHqrZ; Thu, 29 Jun 2006 01:40:29 -0400 (EDT) Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (Postfix) with ESMTP id 2903A60F4; Thu, 29 Jun 2006 01:40:29 -0400 (EDT) Message-ID: <004e01c69b3a$4ba8cd00$1200a8c0@gsicomp.on.ca> From: "Matt Emmerton" To: "Steve Kargl" , "Randall Hyde" References: <20060628181045.GA54915@curry.mchp.siemens.de><44wtb12fu0.fsf@be-well.ilk.org><004301c69b1d$164b5370$6302a8c0@pentiv> <20060629021028.GA31866@troutmask.apl.washington.edu> Date: Thu, 29 Jun 2006 01:10:10 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Virus-Scanned: amavisd-new at gsicomp.on.ca Cc: freebsd-hackers@freebsd.org Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 05:08:37 -0000 ----- Original Message ----- From: "Steve Kargl" To: "Randall Hyde" Cc: Sent: Wednesday, June 28, 2006 10:10 PM Subject: Re: Return value of malloc(0) > On Wed, Jun 28, 2006 at 06:41:05PM -0700, Randall Hyde wrote: > > Hi All, > > I'm trying to port my compiler from Linux to freeBSD. It looked like a > > simple job up to the point I ran my flex code through FLEX on freeBSD. When > > GCC processes lex.yy.c I get a complaint about an illegal numeric constant > > in yy_get_next_buffer, which is all FLEX generated (or prewritten) code. The > > thing compiler just fine under Linux. Any ideas? > > Cheers, > > Randy Hyde > > > > Without seeing the code or the actual error message, I'm > guessing the answer is 42. Perhaps, some detail might > be appropriate. A new thread with a proper subject would be appropriate too :) -- Matt From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 05:40:32 2006 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 B7DBB16A4D2 for ; Thu, 29 Jun 2006 05:40:32 +0000 (UTC) (envelope-from randyhyde@earthlink.net) Received: from smtpauth04.mail.atl.earthlink.net (smtpauth04.mail.atl.earthlink.net [209.86.89.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 988BC43D8E for ; Thu, 29 Jun 2006 05:40:31 +0000 (GMT) (envelope-from randyhyde@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=CEBHw06E6NKnvUKeVxcmH6TRBX7Cz7udSRvucDcQeyScgnUQax+AvRlnc1ee2+B+; h=Received:Message-ID:From:To:References:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE:X-ELNK-Trace:X-Originating-IP; Received: from [24.180.58.59] (helo=pentiv) by smtpauth04.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1FvpGQ-0003vf-Sy for freebsd-hackers@freebsd.org; Thu, 29 Jun 2006 01:40:31 -0400 Message-ID: <004201c69b3e$915bada0$6302a8c0@pentiv> From: "Randall Hyde" To: References: <20060628181045.GA54915@curry.mchp.siemens.de> <44wtb12fu0.fsf@be-well.ilk.org> <004301c69b1d$164b5370$6302a8c0@pentiv> <20060629021028.GA31866@troutmask.apl.washington.edu> Date: Wed, 28 Jun 2006 22:40:45 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-ELNK-Trace: eba5e0c9192a36dcd6dd28457998182d7e972de0d01da9402ec6622fbbc387b0f81b70576779b111350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.180.58.59 Subject: FLEX, was Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 05:40:32 -0000 > > > > Without seeing the code or the actual error message, I'm > guessing the answer is 42. Perhaps, some detail might > be appropriate. I seriously doubt seeing the code will do much good. Here's the offending line: YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); This is from static int yy_get_next_buffer() Which is part of the canned code that comes with FLEX. Compiles just fine under Linux. Linux has a slightly newer version of GCC, but I've been compiling this code on Windows (Borland and VC++) as well as Linux for years without a problem (i.e., older versions of GCC). BTW, if anyone is intrested in the full FLEX source, it's part of the HLA (High Level Assembler) source package found here: http://webster.cs.ucr.edu/AsmTools/HLA/HLAv1.84/hlasrc.zip I compiled the FLEX code with the command line: flex -8 -i hla.flx This works fine, then I compile the GCC output with gcc -DfreeBSD -c -o lex.yy.o lex.yy.c and it stops with "syntax error before numeric constant". As this code is in part of the FLEX-supplied C code, I would think that this problem would be independent of my particular flex code. BTW, I've tried using both the FLEX I use on Linux under BSD as well as the BSD-supplied version. I've even taken the FLEX output from freeBSD and compiled it under Linux (it compiles successfully. I'm using GCC 3.3.5 under Linux, 3.4.4 under BSD. Any known problems with 3.4.4 that would cause this? cheers, Randy Hyde From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 05:41:28 2006 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 645BE16A403 for ; Thu, 29 Jun 2006 05:41:28 +0000 (UTC) (envelope-from hnazfoo@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2FC043D80 for ; Thu, 29 Jun 2006 05:41:27 +0000 (GMT) (envelope-from hnazfoo@googlemail.com) Received: by nf-out-0910.google.com with SMTP id c29so23223nfb for ; Wed, 28 Jun 2006 22:41:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.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=S+ZtzC2Fy2lTnrXEquBcBfjaPOf5VRu0CthakyCrgELHGGnooDdeCS/sjMUXyr7yXOEAMkL6H5VfYhVxvl/eo2/Finp9BQBffl5pkeMemIt/MtUz8Jybh4/txTfLLKOxd5SrTWJmeasuwS7Dbh1hamWE+afdhQjxsfqTK0mqwtc= Received: by 10.49.12.1 with SMTP id p1mr65546nfi; Wed, 28 Jun 2006 22:41:26 -0700 (PDT) Received: from localhost ( [217.65.22.188]) by mx.gmail.com with ESMTP id b1sm110602nfe.2006.06.28.22.41.21; Wed, 28 Jun 2006 22:41:25 -0700 (PDT) Date: Thu, 29 Jun 2006 07:42:22 +0200 From: Johannes Weiner To: freebsd-hackers@freebsd.org Message-ID: <20060629054222.GA92895@leiferikson.flosken.lan> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20060628181045.GA54915@curry.mchp.siemens.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060628181045.GA54915@curry.mchp.siemens.de> User-Agent: mutt-ng/devel-r804 (FreeBSD) Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 05:41:28 -0000 Hi, On Wed, Jun 28, 2006 at 08:10:45PM +0200, Andre Albsmeier wrote: > "If you use malloc(0) and are crazy enough to access the 'allocated' > memory we give you a SIGSEV to show you how dumb you are :-)". They should check the return value of malloc() in any case for successful allocation.. shouldn't they? -- Quits: JESUS (adam@rootdown.net): Ping timeout jesus died from my syn's From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 06:22:51 2006 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 9C24E16A403 for ; Thu, 29 Jun 2006 06:22:51 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49A7A447C6 for ; Thu, 29 Jun 2006 06:22:51 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.13.7/8.13.7) with ESMTP id k5T6KqEk034200; Wed, 28 Jun 2006 23:20:52 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.7/8.13.7/Submit) id k5T6KlC5034194; Wed, 28 Jun 2006 23:20:47 -0700 (PDT) (envelope-from sgk) Date: Wed, 28 Jun 2006 23:20:47 -0700 From: Steve Kargl To: Randall Hyde Message-ID: <20060629062047.GA34074@troutmask.apl.washington.edu> References: <20060628181045.GA54915@curry.mchp.siemens.de> <44wtb12fu0.fsf@be-well.ilk.org> <004301c69b1d$164b5370$6302a8c0@pentiv> <20060629021028.GA31866@troutmask.apl.washington.edu> <004201c69b3e$915bada0$6302a8c0@pentiv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004201c69b3e$915bada0$6302a8c0@pentiv> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: FLEX, was Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 06:22:51 -0000 On Wed, Jun 28, 2006 at 10:40:45PM -0700, Randall Hyde wrote: > > > > > > > Without seeing the code or the actual error message, I'm > > guessing the answer is 42. Perhaps, some detail might > > be appropriate. > > I seriously doubt seeing the code will do much good. > Here's the offending line: > > YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), > yy_n_chars, num_to_read ); Hopefully, people who use your product give better bug reports. I don't know whether I should laugh or cry. > gcc -DfreeBSD -c -o lex.yy.o lex.yy.c > > and it stops with "syntax error before numeric constant". Does your code include all the required header files? This looks like a namespace pollution problem. -- Steve From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 06:33:28 2006 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 1F90A16A5FD for ; Thu, 29 Jun 2006 06:33:28 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail24.syd.optusnet.com.au (mail24.syd.optusnet.com.au [211.29.133.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5C5444779 for ; Thu, 29 Jun 2006 06:04:30 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail24.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k5T64QFk015705 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 29 Jun 2006 16:04:26 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k5T64Qa0005042; Thu, 29 Jun 2006 16:04:26 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k5T64QRK005041; Thu, 29 Jun 2006 16:04:26 +1000 (EST) (envelope-from peter) Date: Thu, 29 Jun 2006 16:04:26 +1000 From: Peter Jeremy To: Randall Hyde Message-ID: <20060629060426.GC742@turion.vk2pj.dyndns.org> References: <20060628181045.GA54915@curry.mchp.siemens.de> <44wtb12fu0.fsf@be-well.ilk.org> <004301c69b1d$164b5370$6302a8c0@pentiv> <20060629021028.GA31866@troutmask.apl.washington.edu> <004201c69b3e$915bada0$6302a8c0@pentiv> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y5rl02BVI9TCfPar" Content-Disposition: inline In-Reply-To: <004201c69b3e$915bada0$6302a8c0@pentiv> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: FLEX, was Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 06:33:28 -0000 --Y5rl02BVI9TCfPar Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 2006-Jun-28 22:40:45 -0700, Randall Hyde wrote: >I seriously doubt seeing the code will do much good. >Here's the offending line: > > YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), > yy_n_chars, num_to_read ); How about feeding the C source through the preprocessor, stripping out the #line directives, compiling it and posting the exact gcc error and source context. It may be a gcc bug, it may be a HLA bug or it could be an interaction between the FreeBSD headers and HLA. --=20 Peter Jeremy --Y5rl02BVI9TCfPar Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEo21p/opHv/APuIcRAgp4AJ9H7jMN/oTX3dcRmbI9yexfPo/I/gCgs7L5 LJ1EQefjQWfiRMkEfzg/ZsQ= =4+Xy -----END PGP SIGNATURE----- --Y5rl02BVI9TCfPar-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 10:43:24 2006 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 563F916A403 for ; Thu, 29 Jun 2006 10:43:24 +0000 (UTC) (envelope-from rivers@dignus.com) Received: from dignus.com (client196-2.dsl.intrex.net [209.42.196.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E9A14461A for ; Thu, 29 Jun 2006 10:16:33 +0000 (GMT) (envelope-from rivers@dignus.com) Received: from lakes.dignus.com (lakes.dignus.com [10.1.0.3]) by dignus.com (8.13.1/8.12.9) with ESMTP id k5TAFZUS099071; Thu, 29 Jun 2006 06:15:35 -0400 (EDT) (envelope-from rivers@dignus.com) Received: (from rivers@localhost) by lakes.dignus.com (8.11.6/8.11.3) id k5TAH0c00416; Thu, 29 Jun 2006 06:17:00 -0400 (EDT) (envelope-from rivers) Date: Thu, 29 Jun 2006 06:17:00 -0400 (EDT) From: Thomas David Rivers Message-Id: <200606291017.k5TAH0c00416@lakes.dignus.com> To: freebsd-hackers@freebsd.org, randyhyde@earthlink.net In-Reply-To: <004201c69b3e$915bada0$6302a8c0@pentiv> X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on office.dignus.com Cc: Subject: Re: FLEX, was Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 10:43:24 -0000 "Randall Hyde" > > BTW, if anyone is intrested in the full FLEX source, it's part of the HLA > (High Level Assembler) source package found here: > > > http://webster.cs.ucr.edu/AsmTools/HLA/HLAv1.84/hlasrc.zip > Just wondering if those guys knew that IBM calls their mainframe assembler the "High Level Assembler", which they abbreviate HLASM. This isn't an x86 assembler like HLA - it's a z/Architecture (mainframe) assembler, very different beast indeed. But - they may want to pick a new name, lest they incur the wrath of IBM's lawyers. I think IBM took that name in the 80s. Also - it seems that 'webster.cs.ucr.edu' has gone missing from DNS somehow; so I wasn't able to look at the source, although I was able to look at the web pages thanks to Yahoo's cache. - Dave Rivers - -- rivers@dignus.com Work: (919) 676-0847 Get your mainframe programming tools at http://www.dignus.com From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 10:52:52 2006 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 8CE5716A40F for ; Thu, 29 Jun 2006 10:52:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25C0F43DA8 for ; Thu, 29 Jun 2006 10:52:44 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k5TAqgKF033860; Thu, 29 Jun 2006 06:52:42 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 27 Jun 2006 08:51:47 -0400 User-Agent: KMail/1.9.1 References: <2f3a439f0606260653j602e083blf872bef5b94be5a@mail.gmail.com> In-Reply-To: <2f3a439f0606260653j602e083blf872bef5b94be5a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606270851.47508.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Thu, 29 Jun 2006 06:52:43 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1575/Thu Jun 29 04:50:14 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Aditya Godbole Subject: Re: New architecture support 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, 29 Jun 2006 10:52:52 -0000 On Monday 26 June 2006 09:53, Aditya Godbole wrote: > Hi, > > If I have to add support for a new architecture, how do I start? I > guess I need to get the build system and 'config' utility in place? > How do I go about it? Well, you'll need a toolchain. :) Then you can start working on building a minimal kernel filling in missing bits in sys/ as you go. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 11:12:35 2006 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 1B57916A415 for ; Thu, 29 Jun 2006 11:12:35 +0000 (UTC) (envelope-from CZander@nvidia.com) Received: from HQEMGATE02.nvidia.com (hqemgate02.nvidia.com [216.228.112.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7913343D53 for ; Thu, 29 Jun 2006 11:12:34 +0000 (GMT) (envelope-from CZander@nvidia.com) Received: from hqemfe02.nvidia.com (Not Verified[172.16.227.92]) by HQEMGATE02.nvidia.com id ; Thu, 29 Jun 2006 04:15:08 -0700 Received: from nvidia.com ([172.16.228.84]) by hqemfe02.nvidia.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 29 Jun 2006 04:12:18 -0700 Date: Thu, 29 Jun 2006 13:12:31 +0200 From: Christian Zander To: freebsd-hackers@freebsd.org Message-ID: <20060629111231.GA692@wolf.nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-NVConfidentiality: public X-OriginalArrivalTime: 29 Jun 2006 11:12:18.0642 (UTC) FILETIME=[E28ECB20:01C69B6C] Subject: NVIDIA FreeBSD kernel feature requests X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Christian Zander List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 11:12:35 -0000 Hi all, NVIDIA has been looking at ways to improve its graphics driver for the FreeBSD i386 platform, as well as investigating the possibility of adding support for the FreeBSD amd64 platform, and identified a number of obstacles. Some progress has been made to resolve them, and NVIDIA would like to summarize the current status. We would also like to thank John Baldwin and Doug Rabson for their valuable help. This summary makes an attempt to describe the kernel interfaces needed by the NVIDIA FreeBSD i386 graphics driver to achieve feature parity with the Linux/Solaris graphics drivers, and/or required to make support for the FreeBSD amd64 platform feasible. It also describes some of the technical difficulties encountered by NVIDIA during the FreeBSD i386 graphics driver's development, how these problems have been worked around and what could be done to solve them better. While the following is focused on the NVIDIA FreeBSD graphics drivers, we believe the interfaces discussed below are generally applicable to any modern high performance graphics driver. The interfaces in question can be loosely categorized into the different classes reliability, compatibility and performance: Reliability: The NVIDIA graphics driver needs to be able to create uncached kernel and user mappings of I/O memory, such as NVIDIA GPU registers. The FreeBSD kernel does not currently provide the interfaces necessary to specify the memory type when creating such mappings, which makes it difficult for the NVIDIA graphics driver to guarantee that the correct memory type is selected. Kernel mappings of I/O memory can be created with the pmap_mapdev() interface, user mappings are created with mmap(2). On FreeBSD i386 and on FreeBSD amd64, the effective memory type of mappings created with either interface is determined by a given system's MTRR configuration by default, which will specify the correct UC memory type in most, but not in all cases. MTRR configurations with non-UC memory ranges overlapping I/O memory mapped via pmap_mapdev() or mmap(2) can result in the incorrect memory type being selected, which can impair reliability. To reduce the likelihood of problems, the FreeBSD i386 driver updates the mappings returned by pmap_mapdev() with the PCD/PWT flags to force use of the UC memory type. On FreeBSD amd64, the presence of a large static mapping using 2MB pages makes this approach unfeasible. In the case of user mappings, limited control over the memory type can be exerted with the help of MTRRs, but their lack of flexibility greatly reduces the feasibility of this approach. 1) The NVIDIA FreeBSD graphics driver is in need of new a interface that supports the creation of UC kernel mappings on FreeBSD i386 and on FreeBSD amd64. John Baldwin is working on a new interface, pmap_mapdev_attr(), which will allow the NVIDIA graphics driver to create UC kernel mappings on FreeBSD i386 and on FreeBSD amd64; the implementation on the latter platform will handle the direct mapping transparently. 2) As described above, user mappings of I/O memory are created via the mmap(2) interface and the FreeBSD device pager; unfortunately, drivers do not currently have control over the memory type used. The NVIDIA FreeBSD graphics driver needs to be able to specify the memory type used for user mappings created via mmap(2). This interface is also important for high performance graphics (see 'Performance' below). Compatibility: 1) The NVIDIA graphics driver needs to be able to set the memory type of the kernel mapping of memory allocated with malloc()/contigmalloc() to UC, which presents essentially the same problems as those outlined above for I/O memory mappings. The ability to change the memory type is necessary to avoid aliasing problems when the memory is mapped into the AGP aperture, which is accessed via WC user mappings. If the creation of UC/WC user mappings becomes possible for system memory in the future (see below), the ability to change the memory type of the associated kernel mappings to UC will be important for the same reason. Newer NVIDIA FreeBSD i386 graphics drivers manually update the memory type of the kernel mappings of malloc() allocated memory using the approach described for kernel mappings above. This is not feasible on FreeBSD amd64 due to the static direct mapping (see above). The NVIDIA FreeBSD graphics driver needs an interface that allows it to change the memory type of the kernel mapping(s) of system memory allocated with malloc()/contigmalloc(). The interface should flush CPU and TLB caches, when necessary. John Baldwin is working on pmap_change_attr() for FreeBSD i386 and for FreeBSD amd64, which will allow specifying the desired memory types for kernel mappings created with e.g. malloc()/contigmalloc(). 2) The NVIDIA graphics driver needs to map different types of memory into the address spaces of user clients, most commonly: a) NVIDIA graphics device registers b) NVIDIA graphics device frame buffer memory c) AGP memory allocations (mapped via the AGP aperture) d) DMA system memory allocations This is currently done via mmap(2) and the device pager, i.e. the user client performs a private ioctl(2) to allocate memory (this step is specific to the b) - d) memory types), then calls mmap(2) to obtain a user mapping of the memory. The NVIDIA graphics driver's d_mmap() callback is invoked first to check the logical mmap(2) offset(s), then again to return the associated page frame number(s) when the mapping is accessed for the first time. The device pager mechanism works well for a) - c), but not for d). The system memory allocations are frequently very large (several MB) and need to be allocated physically non-contiguous. This leads to problems with the d_mmap() interface: - d_mmap() is called per page with logical offsets computed based on the mmap(2) base offset provided by the client and the current page's position within the allocation, but no context information is provided to d_mmap(). The NVIDIA FreeBSD graphics driver can look up the associated system memory allocation and determine the page frame number(s) for a given logical offset only if a linear address range is associated with each system memory allocation, in which case the start address can serve as the mmap(2) offset used by the client and the logical offsets can be compared with each allocation's linear address range. Since the memory itself is not physically contiguous, the physical addresses of pages in the allocation can not be used as mmap(2) offsets, a different address range needs to be used. The FreeBSD i386 driver currently allocates its system memory with malloc() and derives the address range used with mmap(2) from the allocation's kernel virtual address range. This allocation of DMA system memory with malloc() is problematic on FreeBSD i386 PAE and FreeBSD amd64 systems with more than 4GB of RAM and older NVIDIA GPUs limited to 32-bit DMA, since malloc() doesn't currently allow drivers to specify allocation constraints, like contigmalloc() does, i.e. it may allocate physical memory that can not be addressed by such GPUs. Further, since the physical addresses of non-contiguous allocations can not be used as mmap(2) offsets for system memory, but need to be used for a) - c), the logical and physical addresses used as mmap(2) offsets can potentially be confused by d_mmap(). The NVIDIA graphics driver tries to minimize this risk, but can not avoid it completely without a significant performance penalty. - The device pager was designed for I/O memory regions and it assumes that d_mmap() will always return the same page frame number for a given logical offset. As a result, d_mmap() is invoked exactly once for any given logical offset by default. In case of system memory allocations, however, the physical page backing a given offset may change as the malloc()'d memory is freed/reallocated. The NVIDIA FreeBSD graphics driver needs to manually invalidate the translation cache to work around this problem. It does so with the msync() system call, which was extended for this purpose in FreeBSD 4.7 and again in FreeBSD 4.9 and 5.2.1. This leads to performance problems on some configurations. The NVIDIA FreeBSD graphics driver needs a different interface to make the mapping of system memory allocations via mmap(2) simpler. If the d_mmap() callback was extended to be called with the base offset in addition to the current offset, the first two of the problems detailed above would no longer be an issue; the NVIDIA graphics driver would then be able to use physical addresses as mmap(2) offsets for a) - d). The new interface may not require a FreeBSD specific ioctl(2), as this would break compatibility with the NVIDIA Linux OpenGL library used in the FreeBSD Linux ABI compatibility environment. 3) To be able to support FreeBSD i386 PAE and FreeBSD amd64 systems with more than 4GB of physical memory and NVIDIA GPUs that are limited to 32-bit DMA, the NVIDIA FreeBSD graphics driver will need to be updated to allocate memory from within the first 4GB of memory. Unfortunately, this is not feasible with the current interfaces. The malloc() interface does not allow the caller to specify allocation constraints and while contigmalloc() does, its usefulness is currently limited. This is because DMA memory can't realistically be allocated contiguously, except if the allocations are very small, and because a contiguous address range is needed for mmap(2), as described above, which would need to be maintained seperately for contigmalloc() memory allocations. The introduction of an malloc() variant that allows the specification of allocation constraints would solve the addressing problem, but due to the problems caused by using logical and physical addresses for mmap(2), a different solution would be preferred. By making it possible to use physical addresses exclusively as mmap(2) offsets, as described above, the NVIDIA FreeBSD graphics driver could use the contigmalloc() interface to allocate the invidiual pages in the larger non-contiguous allocations. If contigmalloc() were used, the NVIDIA FreeBSD graphics driver would need to be able to create contiguous virtual mappings spanning more than one page within larger virtually non-contiguous allocations; this functionality had best be implemented in the FreeBSD kernel. The 'vmap()' kernel interface does this on Linux. It takes an array of pages and maps them into a single contiguous address range. Performance: 1) For optimal PCI-E performance and improved compatibility with systems where MTRR memory ranges do not provide sufficient flexibility, the NVIDIA FreeBSD graphics driver needs to be able to specify the memory type used for user mappings created with mmap(2). John Baldwin is working on PAT support for FreeBSD, which will be used by the pmap_mapdev_attr() and pmap_change_attr() kernel interfaces referred to above. This support can provide the desired flexibility if the d_mmap() interface is extended or complemented with a new one, allowing drivers to take advantage of the PAT support. In order to provide optimal PCI-E performance, NVIDIA FreeBSD graphics drivers need to be able to create WC system memory mappings. 2) The device pager mechanism is page fault based, which incurs noticable overhead due to the large number of user/kernel context switches. This can result in significant performance penalties with very large or numerous kernel mappings. It also currently requires the use of the msync() workaround (see above), which incurs additional overhead. Performance with the NVIDIA FreeBSD graphics driver would benefit from an mmap(2) interface that is independent of the device pager and allows the mappings' page tables to be prebuilt. The Linux and Solaris operating systems support such interfaces. 3) On Linux and Solaris, the NVIDIA graphics driver can maintain per open instance data, i.e. data that is specific to the processes' file descriptors associated with NVIDIA character special files. This is useful primarily to achieve optimal results with the driver's internal notification mechanism, which is used to implement Sync-to-VBlank functionality, among other things. On these two operating systems, the NVIDIA graphics driver can selectively wake threads select(2)'ing the device files (/dev/nvidia0..N). The NVIDIA FreeBSD graphics driver can only maintain per device state at the moment. It wakes all processes waiting on /dev/nvidiaX, and needs to traverse a per device event list for each of these processes to check whether an event was delivered for each one of them, which incurs some overhead. The logic also can't currently guarantee correct delivery of events to different threads in the same process. Future versions of the NVIDIA FreeBSD graphics driver are likely to employ the notification mechanism more aggressively, to better support composited X desktop functionality. Summary of Tasks: # Task: implement pmap_mapdev_attr() on FreeBSD i386 and on FreeBSD amd64. Motivation: allows reliable creation of kernel mappings of I/O memory with specific cache attributes (with per-page granularity). Priority: gates FreeBSD amd64 support. Status: is being implemented for i386 and amd64 (work is being done to allow easily breaking down 2MB pages). # Task: design/implement better mmap(2) mechanism for mapping memory to user space (context information, cache attributes). Motivation: allows reliable creation of user mappings of DMA and I/O memory and support for systems with more than 4GB of RAM. Priority: gates improved FreeBSD i386 support (PCI-E performance, SLI support, improved reliability); gates FreeBSD amd64 support. Status: has not been started, pending. # Task: implement pmap_change_attr() on FreeBSD i386 and on FreeBSD amd64. Motivation: allows prevention of cache coherency problems. Priority: gates FreeBSD amd64 support. Status: is being implemented for i386 and amd64. # Task: implement vmap()-like kernel interface. Motivation: allows creation of contiguous kernel mappings of parts of or complete non-contiguous DMA/system memory allocations. Priority: gates support for systems with more than 4GB of RAM. Status: has not been started. # Task: implement mechanism to allow character drivers to maintain per-open instance data (e.g. like the Linux kernel's 'struct file *'). Motivation: allows per thread NVIDIA notification delivery; also reduces CPU overhead for notification delivery from the NVIDIA kernel module to the X driver and to OpenGL. Priority: should translate to improved X/OpenGL performance. Status: has not been started. Thanks, -- christian zander ch?zander@nvidia.com From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 12:21:13 2006 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 C682916A403 for ; Thu, 29 Jun 2006 12:21:13 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from thoth.sbs.de (thoth.sbs.de [192.35.17.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19AE543D46 for ; Thu, 29 Jun 2006 12:21:12 +0000 (GMT) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail2.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.6/8.12.6) with ESMTP id k5TCL8e1008260; Thu, 29 Jun 2006 14:21:08 +0200 Received: from ims.mchp.siemens.de (ims.mchp.siemens.de [139.25.31.39]) by mail2.siemens.de (8.12.6/8.12.6) with ESMTP id k5TCL7LM031746; Thu, 29 Jun 2006 14:21:08 +0200 Received: from mail-ct.mchp.siemens.de (mail-ct.mchp.siemens.de [139.25.31.51]) by ims.mchp.siemens.de with ESMTP id k5TCL7JQ014077; Thu, 29 Jun 2006 14:21:07 +0200 (MEST) Received: from curry.mchp.siemens.de (curry [139.25.40.130]) by mail-ct.mchp.siemens.de (8.12.11/8.12.11) with ESMTP id k5TCL7Ox006533; Thu, 29 Jun 2006 14:21:07 +0200 (MEST) Received: (from localhost) by curry.mchp.siemens.de (8.13.6/8.13.6) id k5TCL6hD054619; Date: Thu, 29 Jun 2006 14:21:06 +0200 From: Andre Albsmeier To: Lowell Gilbert Message-ID: <20060629122106.GA79420@curry.mchp.siemens.de> References: <20060628181045.GA54915@curry.mchp.siemens.de> <44wtb12fu0.fsf@be-well.ilk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44wtb12fu0.fsf@be-well.ilk.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org, Andre Albsmeier Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 12:21:14 -0000 On Wed, 28-Jun-2006 at 16:19:35 -0400, Lowell Gilbert wrote: > Andre Albsmeier writes: > > > > > The manpage makes me think that when malloc is called with 0 > > as argument (and no V-flag had been set) the pointer it returns > > can actually be used (as a pointer to the so-called "minimal > > allocation"). It seems, that firefox "thinks" the same way :-). > > However, it is calculated in malloc.c as a constant and is > > always 0x800 (on my architecture). Any access to this area > > results in a SIGSEV. > > The C standard explicitly allows both behaviours, and requires the > implementation to choose one of them. If it returns a non-NULL > pointer, though, that pointer can *only* be used for passing back to > free(). It may *not* be dereferenced. So firefox is wrong, and > actually broken. Very good. I am glad this is clearly defined. > > > I assume the behaviour is meant to show up programming errors: > > > > "If you use malloc(0) and are crazy enough to access the 'allocated' > > memory we give you a SIGSEV to show you how dumb you are :-)". > > Yes. > > > In this case the manpage is wrong (or, at least, mis-leading) and > > should be fixed (I could give it a try if someone actually is willing > > to commit it). > > I don't see what you are claiming is wrong. Can you give a brief It says: "The default behavior is to make a minimal allocation and return a pointer to it." This sounds as if it allocated some (!) bytes so the application can use it. Yes, I know that 0 would be minimal as well :-). And if you look into malloc.c you will see that, in fact, it doesn't allocate anything at all: } else if (!size) { if (ptr != NULL) ifree(ptr); r = ZEROSIZEPTR; r ist returned later and ZEROSIZEPTR is a constant. > description of you're suggesting. Hmm, let's see: The default behavior is to return a non-NULL pointer which may be passed to free() but does not point to any memory which can be used by the application. > > > Apart from that, I suggest, we should run firefox (and maybe other > > mozilla apps) with MALLOC_OPTIONS=V. > > That would be reasonable, particularly for the time being. However, > the firefox bug really should be fixed in the upstream sources. In this case, yes, of course. -Andre > Writing past the end of an allocated buffer (which is what the code > does, if you think about it) is a serious error. > > > Another position could be that firefox is wrong because it NEVER > > may use ANY return value of a malloc(0), regardless of its content. > > The C language standard agrees with this position... -- Micro$oft: When will your system crash today? From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 15:45:20 2006 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 7950116A50C for ; Thu, 29 Jun 2006 15:45:20 +0000 (UTC) (envelope-from patl+freebsd@volant.org) Received: from smtp.volant.org (gate.volant.org [207.111.218.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id E66E04446B for ; Thu, 29 Jun 2006 15:45:05 +0000 (GMT) (envelope-from patl+freebsd@volant.org) Received: from adsl-065-081-071-131.sip.gnv.bellsouth.net ([65.81.71.131] helo=[172.19.1.100]) by smtp.volant.org with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34 (FreeBSD)) id 1FvykY-000IS5-41; Thu, 29 Jun 2006 08:48:20 -0700 Date: Thu, 29 Jun 2006 11:44:23 -0400 From: Pat Lashley To: Stefan Farfeleder , Andre Albsmeier Message-ID: <805AA34B676EDF411B3CF548@Zelazny> In-Reply-To: <20060628212956.GI822@wombat.fafoe.narf.at> References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060628212956.GI822@wombat.fafoe.narf.at> X-Mailer: Mulberry/4.0.0 (Mac OS X) MIME-Version: 1.0 X-Scan-Signature: 5b3e55502f250088870cb65b3f8e767ec5409307 X-Spam-User: nobody X-Spam-Score: -4.7 (----) X-Spam-Score-Int: -46 X-Spam-Report: This mail has matched the spam-filter tests listed below. See http://spamassassin.org/tag/ for details about the specific tests reported. In general, the higher the number of total points, the more likely that it actually is spam. (The 'required' number of points listed below is the arbitrary number above which the message is normally considered spam.) Content analysis details: (-4.7 points total, 5.0 required) 0.1 HTML_MESSAGE BODY: HTML included in message 0.1 HTML_FONTCOLOR_RED BODY: HTML font color is red -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0002] X-Mailman-Approved-At: Thu, 29 Jun 2006 16:09:10 +0000 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 15:45:20 -0000 > The C Standard says the following about malloc(0): > > If the size of the space requested is zero, the behavior is > implementation-defined: either a null pointer is returned, or the > behavior is as if the size were some nonzero value, except that the > returned pointer shall not be used to access an object. > > So our default behaviour to crash if a pointer returned by malloc(0) is > dereferenced is legal and a good one because it catches errors like the > above one. No, our implementation is NOT legal. We always return the SAME value. To be legal, we should not return that value again unless it has been free()-ed. first = malloc(0) ; second = malloc(0) ; if ( first == second ) ERROR( "C standards violation" ) ; Firefox, or the extension, has a bug in the code. It should not be attempting to de-reference the result of a 'malloc(0)' call. They probably depend on having it return NULL, which is checked elsewhere. (The fix is for them to test for the size == zero case and just set the pointer to NULL instead of calling malloc(0). But that's their problem, not ours.) -Pat From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 16:09:46 2006 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 C0ABF16A40F for ; Thu, 29 Jun 2006 16:09:46 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id CAF1A43D8B for ; Thu, 29 Jun 2006 16:09:41 +0000 (GMT) (envelope-from matthias.andree@gmx.de) Received: (qmail invoked by alias); 29 Jun 2006 16:09:40 -0000 Received: from p50911D7D.dip0.t-ipconnect.de (EHLO m2a2.dyndns.org) [80.145.29.125] by mail.gmx.net (mp043) with SMTP; 29 Jun 2006 18:09:40 +0200 X-Authenticated: #428038 Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id BFCF6200F9A for ; Thu, 29 Jun 2006 18:09:38 +0200 (CEST) Received: from m2a2.dyndns.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25960-14 for ; Thu, 29 Jun 2006 18:09:37 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 3478B200F9D; Thu, 29 Jun 2006 18:09:37 +0200 (CEST) From: Matthias Andree To: freebsd-hackers@freebsd.org In-Reply-To: <20060629054222.GA92895@leiferikson.flosken.lan> (Johannes Weiner's message of "Thu, 29 Jun 2006 07:42:22 +0200") References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> X-PGP-Key: http://home.pages.de/~mandree/keys/GPGKEY.asc Date: Thu, 29 Jun 2006 18:09:37 +0200 Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at emma.line.org X-Y-GMX-Trusted: 0 Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 16:09:46 -0000 Johannes Weiner writes: > Hi, > > On Wed, Jun 28, 2006 at 08:10:45PM +0200, Andre Albsmeier wrote: >> "If you use malloc(0) and are crazy enough to access the 'allocated' >> memory we give you a SIGSEV to show you how dumb you are :-)". > > They should check the return value of malloc() in any case for > successful allocation.. shouldn't they? The value returned from malloc(0) must not be dereferenced whatever it was. It was 0x800, which doesn't count as "failure". -- Matthias Andree From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 16:19:36 2006 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 BA82F16A403 for ; Thu, 29 Jun 2006 16:19:36 +0000 (UTC) (envelope-from gonzo@pbxpress.com) Received: from mail.portaone.com (mail.portaone.com [65.61.200.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6482443D6D for ; Thu, 29 Jun 2006 16:19:36 +0000 (GMT) (envelope-from gonzo@pbxpress.com) Received: from dell.portaone.com (unknown [70.68.128.186]) by mail.portaone.com (Postfix) with ESMTP id DD847552C26; Thu, 29 Jun 2006 09:19:35 -0700 (PDT) Received: from leaf.pbxpress.com (www.pbxpress.com [142.179.71.212]) by dell.portaone.com (8.13.6/8.13.1) with ESMTP id k5TGJZ5s058941; Thu, 29 Jun 2006 09:19:35 -0700 (PDT) (envelope-from gonzo@pbxpress.com) Received: from [192.168.0.160] (k3-gw.portaone.com [193.28.87.193]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id k5TGKVQf070481 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Jun 2006 09:20:37 -0700 (PDT) (envelope-from gonzo@pbxpress.com) Message-ID: <44A3FD87.8000006@pbxpress.com> Date: Thu, 29 Jun 2006 19:19:19 +0300 From: Oleksandr Tymoshenko User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Christian Zander References: <20060629111231.GA692@wolf.nvidia.com> In-Reply-To: <20060629111231.GA692@wolf.nvidia.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on leaf.pbxpress.com Cc: freebsd-hackers@freebsd.org Subject: Re: NVIDIA FreeBSD kernel feature requests 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, 29 Jun 2006 16:19:36 -0000 Christian Zander wrote: > Hi all, > # Task: implement mechanism to allow character drivers to > maintain per-open instance data (e.g. like the Linux > kernel's 'struct file *'). > Motivation: allows per thread NVIDIA notification delivery; also > reduces CPU overhead for notification delivery > from the NVIDIA kernel module to the X driver and to > OpenGL. > Priority: should translate to improved X/OpenGL performance. > Status: has not been started. I've stumbled across this issue a while ago. Actually it can be partially solved using EVENTHANDLER_REGISTER of dev_clone event with keeping state structure in si_drv1 or si_drv2 fields. I'm not sure it's the best solution but it works for me though it smells like hack, and looks like hack :) Anyway, having legitimate per-open instance data structures of cdevs is a great assistance in porting linux drivers to FreeBSD. Just my $0.02. -- Sincerely, Oleksandr Tymoshenko PBXpress Communications, Inc. http://www.pbxpress.com Tel./Fax.: +1 866 SIP PBX1 Ext. 656 From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 16:22:23 2006 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 0199316A403 for ; Thu, 29 Jun 2006 16:22:23 +0000 (UTC) (envelope-from hnazfoo@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DB0D43D48 for ; Thu, 29 Jun 2006 16:22:21 +0000 (GMT) (envelope-from hnazfoo@googlemail.com) Received: by nf-out-0910.google.com with SMTP id x4so97135nfb for ; Thu, 29 Jun 2006 09:22:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.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=TjYZCi4vBbOGaJMA6s6FEOgl6rKH36JCVRavbwZZ2w2x4OwxAKES0c8SxPRfr2ZFAVKx0F1kZPryTPoosNC7y9y+9F1WSEjuTzKA2WrQ37809FmFIHuqxNAY3c7vMEIryrsXza0k2BEp7FKJgypITqyhY21qwD7TnuNxG/fT/wo= Received: by 10.49.41.10 with SMTP id t10mr508127nfj; Thu, 29 Jun 2006 09:22:20 -0700 (PDT) Received: from localhost ( [217.65.22.47]) by mx.gmail.com with ESMTP id x1sm705556nfb.2006.06.29.09.22.18; Thu, 29 Jun 2006 09:22:20 -0700 (PDT) Date: Thu, 29 Jun 2006 18:23:19 +0200 From: Johannes Weiner To: freebsd-hackers@freebsd.org Message-ID: <20060629162319.GA94921@leiferikson.flosken.lan> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: mutt-ng/devel-r804 (FreeBSD) Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 16:22:23 -0000 On Thu, Jun 29, 2006 at 06:09:37PM +0200, Matthias Andree wrote: > The value returned from malloc(0) must not be dereferenced whatever it > was. It was 0x800, which doesn't count as "failure". But this would be appropriate for catching the error: if ((foo = malloc(0)) == foo) /* make noise */ wouldn't it? Hannes -- If the telephone rang today, water it! From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 16:32:43 2006 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 E22DD16A403 for ; Thu, 29 Jun 2006 16:32:43 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAF2E43D45 for ; Thu, 29 Jun 2006 16:32:42 +0000 (GMT) (envelope-from kip.macy@gmail.com) Received: by py-out-1112.google.com with SMTP id t32so305908pyc for ; Thu, 29 Jun 2006 09:32:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HpIg4ucpvuNd3hhpAQSNsFkIZL4LWRtcJQFksd7bZf3LW/fKY0O8Fz6s78npdU5xNBEoMceR8zxrppBqAAdCuPjucn1SukYRe80aXBc4hpy2u70vaA8hs5dqcnsqOJvXGzE8NyqnWuQxg9cnlJ/nXXV1mtAfXx7wPYad+hhYZEY= Received: by 10.35.111.14 with SMTP id o14mr1486281pym; Thu, 29 Jun 2006 09:32:42 -0700 (PDT) Received: by 10.65.225.9 with HTTP; Thu, 29 Jun 2006 09:32:42 -0700 (PDT) Message-ID: Date: Thu, 29 Jun 2006 09:32:42 -0700 From: "Kip Macy" To: "Oleksandr Tymoshenko" In-Reply-To: <44A3FD87.8000006@pbxpress.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060629111231.GA692@wolf.nvidia.com> <44A3FD87.8000006@pbxpress.com> Cc: freebsd-hackers@freebsd.org, Christian Zander Subject: Re: NVIDIA FreeBSD kernel feature requests X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kmacy@fsmware.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 16:32:44 -0000 IIRC lack of per instance cdevs also limits Freebsd to one vmware instance. -Kip On 6/29/06, Oleksandr Tymoshenko wrote: > Christian Zander wrote: > > Hi all, > > # Task: implement mechanism to allow character drivers to > > maintain per-open instance data (e.g. like the Linux > > kernel's 'struct file *'). > > Motivation: allows per thread NVIDIA notification delivery; also > > reduces CPU overhead for notification delivery > > from the NVIDIA kernel module to the X driver and to > > OpenGL. > > Priority: should translate to improved X/OpenGL performance. > > Status: has not been started. > I've stumbled across this issue a while ago. Actually it can > be partially solved using EVENTHANDLER_REGISTER of dev_clone event with > keeping state structure in si_drv1 or si_drv2 fields. I'm not sure it's > the best solution but it works for me though it smells like hack, and > looks like hack :) Anyway, having legitimate per-open instance data > structures of cdevs is a great assistance in porting linux drivers to > FreeBSD. Just my $0.02. > > -- > Sincerely, > > Oleksandr Tymoshenko > PBXpress Communications, Inc. > http://www.pbxpress.com > Tel./Fax.: +1 866 SIP PBX1 Ext. 656 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 17:23:18 2006 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 3BF0F16A53C for ; Thu, 29 Jun 2006 17:23:18 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41AE744098 for ; Thu, 29 Jun 2006 16:53:36 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-3.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Thu, 29 Jun 2006 18:53:35 +0200 Date: Thu, 29 Jun 2006 18:53:34 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Johannes Weiner In-Reply-To: <20060629162319.GA94921@leiferikson.flosken.lan> Message-ID: <20060629185249.C55888@beagle.kn.op.dlr.de> References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> <20060629162319.GA94921@leiferikson.flosken.lan> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 29 Jun 2006 16:53:35.0051 (UTC) FILETIME=[8F72D9B0:01C69B9C] Cc: freebsd-hackers@freebsd.org Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 17:23:18 -0000 On Thu, 29 Jun 2006, Johannes Weiner wrote: JW>On Thu, Jun 29, 2006 at 06:09:37PM +0200, Matthias Andree wrote: JW> JW>> The value returned from malloc(0) must not be dereferenced whatever it JW>> was. It was 0x800, which doesn't count as "failure". JW> JW>But this would be appropriate for catching the error: JW> JW>if ((foo = malloc(0)) == foo) JW> /* make noise */ JW> JW>wouldn't it? Wouldn't it rather invoke undefined behaviour? harti From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 17:23:46 2006 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 514F116A55E for ; Thu, 29 Jun 2006 17:23:46 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4CA1440FE for ; Thu, 29 Jun 2006 16:56:37 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id 73F2535707 for ; Thu, 29 Jun 2006 18:56:34 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1000) id 827146D0AC; Thu, 29 Jun 2006 18:56:29 +0200 (CEST) Date: Thu, 29 Jun 2006 18:56:29 +0200 From: joerg@britannica.bec.de To: freebsd-hackers@freebsd.org Message-ID: <20060629165629.GA6875@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060628212956.GI822@wombat.fafoe.narf.at> <805AA34B676EDF411B3CF548@Zelazny> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <805AA34B676EDF411B3CF548@Zelazny> User-Agent: Mutt/1.5.11 Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 17:23:46 -0000 On Thu, Jun 29, 2006 at 11:44:23AM -0400, Pat Lashley wrote: > No, our implementation is NOT legal. We always return the SAME value. To > be legal, we should not return that value again unless it has been > free()-ed. It is legal due to brain damaged definition of implementation defined behaviour, but it violates the spirit of the standard :-) Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 17:29:21 2006 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 C1DAB16A403 for ; Thu, 29 Jun 2006 17:29:21 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id AC9BE43D62 for ; Thu, 29 Jun 2006 17:29:20 +0000 (GMT) (envelope-from matthias.andree@gmx.de) Received: (qmail invoked by alias); 29 Jun 2006 17:29:19 -0000 Received: from p50911D7D.dip0.t-ipconnect.de (EHLO m2a2.dyndns.org) [80.145.29.125] by mail.gmx.net (mp028) with SMTP; 29 Jun 2006 19:29:19 +0200 X-Authenticated: #428038 Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id 0CEE2200F1B for ; Thu, 29 Jun 2006 19:29:18 +0200 (CEST) Received: from m2a2.dyndns.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29125-08 for ; Thu, 29 Jun 2006 19:29:16 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 5733E200FB4; Thu, 29 Jun 2006 19:29:16 +0200 (CEST) From: Matthias Andree To: freebsd-hackers@freebsd.org In-Reply-To: <20060629162319.GA94921@leiferikson.flosken.lan> (Johannes Weiner's message of "Thu, 29 Jun 2006 18:23:19 +0200") References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> <20060629162319.GA94921@leiferikson.flosken.lan> X-PGP-Key: http://home.pages.de/~mandree/keys/GPGKEY.asc Date: Thu, 29 Jun 2006 19:29:16 +0200 Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at emma.line.org X-Y-GMX-Trusted: 0 Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 17:29:21 -0000 Johannes Weiner writes: > On Thu, Jun 29, 2006 at 06:09:37PM +0200, Matthias Andree wrote: > >> The value returned from malloc(0) must not be dereferenced whatever it >> was. It was 0x800, which doesn't count as "failure". > > But this would be appropriate for catching the error: > > if ((foo = malloc(0)) == foo) > /* make noise */ > > wouldn't it? No, sir. Operator precedence: assign first, and then compare, thus the comparison will always be true (else you'd be comparing to undefined values, which isn't any better). You might as well write: foo = malloc(0); /* make noise */ There is no way to see a 0x800 return from malloc(0) as "error". -- Matthias Andree From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 16:49:12 2006 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 8D5C616A416 for ; Thu, 29 Jun 2006 16:49:12 +0000 (UTC) (envelope-from kan@kan.dnsalias.net) Received: from kan.dnsalias.net (c-24-63-93-195.hsd1.ma.comcast.net [24.63.93.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC4AB43D5A for ; Thu, 29 Jun 2006 16:49:11 +0000 (GMT) (envelope-from kan@kan.dnsalias.net) Received: from kan.dnsalias.net (TheGuy@localhost [127.0.0.1]) by kan.dnsalias.net (8.13.7/8.13.7) with ESMTP id k5TGnB9K004279; Thu, 29 Jun 2006 12:49:11 -0400 (EDT) (envelope-from kan@kan.dnsalias.net) Received: (from kan@localhost) by kan.dnsalias.net (8.13.7/8.13.7/Submit) id k5TGnAGx004278; Thu, 29 Jun 2006 12:49:10 -0400 (EDT) (envelope-from kan) Date: Thu, 29 Jun 2006 12:49:10 -0400 From: Alexander Kabaev To: Oleksandr Tymoshenko Message-ID: <20060629164910.GA4242@kan.dnsalias.net> References: <20060629111231.GA692@wolf.nvidia.com> <44A3FD87.8000006@pbxpress.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 X-Mailman-Approved-At: Thu, 29 Jun 2006 17:30:13 +0000 Cc: freebsd-hackers@freebsd.org, Christian Zander Subject: Re: NVIDIA FreeBSD kernel feature requests 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, 29 Jun 2006 16:49:12 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 29, 2006 at 09:32:42AM -0700, Kip Macy wrote: > IIRC lack of per instance cdevs also limits Freebsd to one vmware instanc= e. >=20 > -Kip >=20 > On 6/29/06, Oleksandr Tymoshenko wrote: > >Christian Zander wrote: > >> Hi all, > >> # Task: implement mechanism to allow character drivers to > >> maintain per-open instance data (e.g. like the Linux > >> kernel's 'struct file *'). > >> Motivation: allows per thread NVIDIA notification delivery; also > >> reduces CPU overhead for notification delivery > >> from the NVIDIA kernel module to the X driver and to > >> OpenGL. > >> Priority: should translate to improved X/OpenGL performance. > >> Status: has not been started. > > I've stumbled across this issue a while ago. Actually it can > >be partially solved using EVENTHANDLER_REGISTER of dev_clone event with > >keeping state structure in si_drv1 or si_drv2 fields. I'm not sure it's > >the best solution but it works for me though it smells like hack, and > >looks like hack :) Anyway, having legitimate per-open instance data > >structures of cdevs is a great assistance in porting linux drivers to > >FreeBSD. Just my $0.02. > > WHY it smells like a hack? It was designed precisely to do that. I am using cloned devices in our product with great success. Every client opening 'magic' device gets its own exclusive cloned device instance and everything works like a charm. I am yet to hear any single coherent description of what Linux's approach has over device cloning in FreeBSD. I wouldn't mind being educated on this. --=20 Alexander Kabaev --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEpASGQ6z1jMm+XZYRAroVAJ0R6u7D90l6UcrZHWk5bztNimaGkgCaAl6V 4b+ONyfJQAez/yhMawR6yQ0= =cX3T -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 17:41:36 2006 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 F3C2F16A40F for ; Thu, 29 Jun 2006 17:41:35 +0000 (UTC) (envelope-from CZander@nvidia.com) Received: from HQEMGATE02.nvidia.com (hqemgate02.nvidia.com [216.228.112.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6314E43D72 for ; Thu, 29 Jun 2006 17:41:31 +0000 (GMT) (envelope-from CZander@nvidia.com) Received: from hqemfe02.nvidia.com (Not Verified[172.16.227.92]) by HQEMGATE02.nvidia.com id ; Thu, 29 Jun 2006 10:43:26 -0700 Received: from nvidia.com ([172.16.228.84]) by hqemfe02.nvidia.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 29 Jun 2006 10:40:45 -0700 Date: Thu, 29 Jun 2006 19:41:00 +0200 From: Christian Zander To: Alexander Kabaev Message-ID: <20060629174100.GW692@wolf.nvidia.com> References: <20060629111231.GA692@wolf.nvidia.com> <44A3FD87.8000006@pbxpress.com> <20060629164910.GA4242@kan.dnsalias.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060629164910.GA4242@kan.dnsalias.net> User-Agent: Mutt/1.4.2.1i X-NVConfidentiality: public X-OriginalArrivalTime: 29 Jun 2006 17:40:46.0383 (UTC) FILETIME=[270DD3F0:01C69BA3] Cc: freebsd-hackers@freebsd.org, Oleksandr Tymoshenko , Christian Zander Subject: Re: NVIDIA FreeBSD kernel feature requests X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Christian Zander List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 17:41:36 -0000 On Thu, Jun 29, 2006 at 12:49:10PM -0400, Alexander Kabaev wrote: > On Thu, Jun 29, 2006 at 09:32:42AM -0700, Kip Macy wrote: > > IIRC lack of per instance cdevs also limits Freebsd to one vmware instance. > > > > -Kip > > > > On 6/29/06, Oleksandr Tymoshenko wrote: > > >Christian Zander wrote: > > >> Hi all, > > >> # Task: implement mechanism to allow character drivers to > > >> maintain per-open instance data (e.g. like the Linux > > >> kernel's 'struct file *'). > > >> Motivation: allows per thread NVIDIA notification delivery; also > > >> reduces CPU overhead for notification delivery > > >> from the NVIDIA kernel module to the X driver and to > > >> OpenGL. > > >> Priority: should translate to improved X/OpenGL performance. > > >> Status: has not been started. > > > I've stumbled across this issue a while ago. Actually it can > > >be partially solved using EVENTHANDLER_REGISTER of dev_clone event with > > >keeping state structure in si_drv1 or si_drv2 fields. I'm not sure it's > > >the best solution but it works for me though it smells like hack, and > > >looks like hack :) Anyway, having legitimate per-open instance data > > >structures of cdevs is a great assistance in porting linux drivers to > > >FreeBSD. Just my $0.02. > > > > > WHY it smells like a hack? It was designed precisely to do that. I am > using cloned devices in our product with great success. Every client > opening 'magic' device gets its own exclusive cloned device instance > and everything works like a charm. I am yet to hear any single coherent > description of what Linux's approach has over device cloning in FreeBSD. > I wouldn't mind being educated on this. > Thanks for your feedback, I hadn't been aware of this interface, but it sounds promising. When was it first introduced? Are there any known problems with it and certain FreeBSD releases, or is it expected to work fine in FreeBSD >= 5.3? Thanks, > -- > Alexander Kabaev -- christian zander ch?zander@nvidia.com From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 17:45:49 2006 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 3372216A412 for ; Thu, 29 Jun 2006 17:45:49 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8575643D6E for ; Thu, 29 Jun 2006 17:45:42 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-3.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Thu, 29 Jun 2006 19:45:41 +0200 Date: Thu, 29 Jun 2006 19:45:40 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Matthias Andree In-Reply-To: Message-ID: <20060629194138.S55888@beagle.kn.op.dlr.de> References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> <20060629162319.GA94921@leiferikson.flosken.lan> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 29 Jun 2006 17:45:41.0189 (UTC) FILETIME=[D6C5A750:01C69BA3] Cc: freebsd-hackers@freebsd.org Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 17:45:49 -0000 On Thu, 29 Jun 2006, Matthias Andree wrote: MA>Johannes Weiner writes: MA> MA>> On Thu, Jun 29, 2006 at 06:09:37PM +0200, Matthias Andree wrote: MA>> MA>>> The value returned from malloc(0) must not be dereferenced whatever it MA>>> was. It was 0x800, which doesn't count as "failure". MA>> MA>> But this would be appropriate for catching the error: MA>> MA>> if ((foo = malloc(0)) == foo) MA>> /* make noise */ MA>> MA>> wouldn't it? MA> MA>No, sir. Operator precedence: assign first, and then compare, thus the MA>comparison will always be true (else you'd be comparing to undefined MA>values, which isn't any better). You might as well write: Operator precedence is just for parsing, not for evaluation. The compiler may well first evaluate the foo on the right side of the == (by fetching it) and then go an call malloc and assign foo. It is actually undefined behaviour, I think, so it may well make explode your near-by atom power plant. harti MA> MA> foo = malloc(0); MA> /* make noise */ MA> MA>There is no way to see a 0x800 return from malloc(0) as "error". MA> MA> From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 17:53:11 2006 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 A80A116A494 for ; Thu, 29 Jun 2006 17:53:11 +0000 (UTC) (envelope-from ashok.shrestha@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F53C43D58 for ; Thu, 29 Jun 2006 17:53:10 +0000 (GMT) (envelope-from ashok.shrestha@gmail.com) Received: by ug-out-1314.google.com with SMTP id m3so498952uge for ; Thu, 29 Jun 2006 10:53:09 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qMWhPbuny+TaS/l/qoDuhq9wcOPwNzQFIsPxRje7ZR0b2wQp3xVQoDmw5xIfR5tEprZ1NuMTVmDyN1Vr5SqP8cEFJHBW1+xgxFiE4XZMlfdkWmIu9jQVO4dTXpk6xbh/y6KiH1rqwW/uenTAfO4ItZ3/G1naEgBDiGVyv80n5tY= Received: by 10.67.93.7 with SMTP id v7mr2135445ugl; Thu, 29 Jun 2006 10:53:09 -0700 (PDT) Received: by 10.66.251.5 with HTTP; Thu, 29 Jun 2006 10:53:08 -0700 (PDT) Message-ID: <79e2026f0606291053v5779bbd0ra7707af6b5ee1472@mail.gmail.com> Date: Thu, 29 Jun 2006 13:53:08 -0400 From: "Ashok Shrestha" To: "Craig Rodrigues" In-Reply-To: <20060626180817.GA52520@crodrigues.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <79e2026f0606260618n603184e0ucbcb655b928a008c@mail.gmail.com> <20060626180817.GA52520@crodrigues.org> Cc: freebsd-hackers@freebsd.org Subject: Re: checking zip file corruption 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, 29 Jun 2006 17:53:11 -0000 Thank you for the suggestion. On 6/26/06, Craig Rodrigues wrote: > On Mon, Jun 26, 2006 at 09:18:31AM -0400, Ashok Shrestha wrote: > > Hi all, > > > > I am writing code to check if incoming zip files are corrupt and the > > client is not willing to send a digest (like md5) of the file. > > Why don't you just use InfoZip's "unzip -t" flag which tests > the integrity of a zip file? You can call "unzip -t" from Perl. > > InfoZip is in ports, archivers/unzip and archivers/zip. > > -- > Craig Rodrigues > rodrigc@crodrigues.org > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Ashok Shrestha From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 17:59:39 2006 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 069A716A509 for ; Thu, 29 Jun 2006 17:59:39 +0000 (UTC) (envelope-from gonzo@pbxpress.com) Received: from mail.portaone.com (mail.portaone.com [65.61.200.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42E9343D67 for ; Thu, 29 Jun 2006 17:59:36 +0000 (GMT) (envelope-from gonzo@pbxpress.com) Received: from dell.portaone.com (unknown [70.68.128.186]) by mail.portaone.com (Postfix) with ESMTP id D6C11552C26; Thu, 29 Jun 2006 10:59:35 -0700 (PDT) Received: from leaf.pbxpress.com (www.pbxpress.com [142.179.71.212]) by dell.portaone.com (8.13.6/8.13.1) with ESMTP id k5THxUj9071750; Thu, 29 Jun 2006 10:59:30 -0700 (PDT) (envelope-from gonzo@pbxpress.com) Received: from [192.168.0.160] (k3-gw.portaone.com [193.28.87.193]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id k5TI0RlU091690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Jun 2006 11:00:30 -0700 (PDT) (envelope-from gonzo@pbxpress.com) Message-ID: <44A414F9.9070102@pbxpress.com> Date: Thu, 29 Jun 2006 20:59:21 +0300 From: Oleksandr Tymoshenko User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Alexander Kabaev References: <20060629111231.GA692@wolf.nvidia.com> <44A3FD87.8000006@pbxpress.com> <20060629164910.GA4242@kan.dnsalias.net> In-Reply-To: <20060629164910.GA4242@kan.dnsalias.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on leaf.pbxpress.com Cc: freebsd-hackers@freebsd.org, Christian Zander Subject: Re: NVIDIA FreeBSD kernel feature requests 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, 29 Jun 2006 17:59:39 -0000 Alexander Kabaev wrote: > WHY it smells like a hack? It was designed precisely to do that. I am > using cloned devices in our product with great success. Every client > opening 'magic' device gets its own exclusive cloned device instance > and everything works like a charm. I am yet to hear any single coherent > description of what Linux's approach has over device cloning in FreeBSD. > I wouldn't mind being educated on this. OK, it's a lack of my knowledge. It seemed a bit unnatural to me to create device nodes instead of keeping a single pointer and I decided it was supposed to do something other then keeping per-open instance. It would be great to have this event/mechanism documented for I'd found it looking through source code in /usr/src/sys. Not the worst place to get information but man pages are better :) -- Sincerely, Oleksandr Tymoshenko PBXpress Communications, Inc. http://www.pbxpress.com Tel./Fax.: +1 866 SIP PBX1 Ext. 656 From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 19:27:29 2006 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 D413616A416 for ; Thu, 29 Jun 2006 19:27:29 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from pne-smtpout2-sn1.fre.skanova.net (pne-smtpout2-sn1.fre.skanova.net [81.228.11.159]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EF67447A8 for ; Thu, 29 Jun 2006 19:27:20 +0000 (GMT) (envelope-from erikt@midgard.homeip.net) Received: from falcon.midgard.homeip.net (83.253.29.241) by pne-smtpout2-sn1.fre.skanova.net (7.2.075) id 44A135F1000A482C for freebsd-hackers@freebsd.org; Thu, 29 Jun 2006 21:27:19 +0200 Received: (qmail 44403 invoked from network); 29 Jun 2006 21:27:18 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 29 Jun 2006 21:27:18 +0200 Received: (qmail 65723 invoked by uid 1001); 29 Jun 2006 21:27:18 +0200 Date: Thu, 29 Jun 2006 21:27:18 +0200 From: Erik Trulsson To: Pat Lashley Message-ID: <20060629192718.GA65675@owl.midgard.homeip.net> Mail-Followup-To: Pat Lashley , Stefan Farfeleder , Andre Albsmeier , freebsd-hackers@freebsd.org References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060628212956.GI822@wombat.fafoe.narf.at> <805AA34B676EDF411B3CF548@Zelazny> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <805AA34B676EDF411B3CF548@Zelazny> User-Agent: Mutt/1.5.11 Cc: Stefan Farfeleder , freebsd-hackers@freebsd.org, Andre Albsmeier Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 19:27:29 -0000 On Thu, Jun 29, 2006 at 11:44:23AM -0400, Pat Lashley wrote: > >The C Standard says the following about malloc(0): > > > > If the size of the space requested is zero, the behavior is > > implementation-defined: either a null pointer is returned, or the > > behavior is as if the size were some nonzero value, except that the > > returned pointer shall not be used to access an object. > > > >So our default behaviour to crash if a pointer returned by malloc(0) is > >dereferenced is legal and a good one because it catches errors like the > >above one. > > No, our implementation is NOT legal. We always return the SAME value. To > be legal, we should not return that value again unless it has been > free()-ed. > > first = malloc(0) ; > second = malloc(0) ; > > if ( first == second ) ERROR( "C standards violation" ) ; Almost. The test should be if ( first != NULL && first == second) ERROR( "C standards violation" ) ; It is after all legal for malloc(0) to return NULL. Otherwise you are correct. Having malloc(0) always returning the same (non-NULL) value is not legal according to the C standard. C99 says: 7.20.3 Memory management functions [...] Each such allocation shall yield a pointer to an object disjoint from any other object. [...] If the size of the space requested is zero, the behavior is implementation-defined: either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object. > > > Firefox, or the extension, has a bug in the code. It should not be > attempting to de-reference the result of a 'malloc(0)' call. They probably > depend on having it return NULL, which is checked elsewhere. (The fix is > for them to test for the size == zero case and just set the pointer to NULL > instead of calling malloc(0). But that's their problem, not ours.) > > > > -Pat > _______________________________________________ > 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" -- Erik Trulsson ertr1013@student.uu.se From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 19:33:49 2006 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 6DE1B16A403 for ; Thu, 29 Jun 2006 19:33:49 +0000 (UTC) (envelope-from patl+freebsd@volant.org) Received: from smtp.volant.org (gate.volant.org [207.111.218.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8445D447AD for ; Thu, 29 Jun 2006 19:33:40 +0000 (GMT) (envelope-from patl+freebsd@volant.org) Received: from adsl-065-081-071-131.sip.gnv.bellsouth.net ([65.81.71.131] helo=[172.19.1.100]) by smtp.volant.org with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34 (FreeBSD)) id 1Fw2Jt-000KmZ-LL; Thu, 29 Jun 2006 12:37:00 -0700 Date: Thu, 29 Jun 2006 15:33:08 -0400 From: Pat Lashley To: joerg@britannica.bec.de, freebsd-hackers@freebsd.org Message-ID: In-Reply-To: <20060629165629.GA6875@britannica.bec.de> References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060628212956.GI822@wombat.fafoe.narf.at> <805AA34B676EDF411B3CF548@Zelazny> <20060629165629.GA6875@britannica.bec.de> X-Mailer: Mulberry/4.0.0 (Mac OS X) MIME-Version: 1.0 X-Scan-Signature: d819d3e9d9cd1f7acf6a6a92c3cd95622ab58a63 X-Spam-User: nobody X-Spam-Score: -3.0 (---) X-Spam-Score-Int: -29 X-Spam-Report: This mail has matched the spam-filter tests listed below. See http://spamassassin.org/tag/ for details about the specific tests reported. In general, the higher the number of total points, the more likely that it actually is spam. (The 'required' number of points listed below is the arbitrary number above which the message is normally considered spam.) Content analysis details: (-3.0 points total, 5.0 required) -1.5 BAYES_01 BODY: Bayesian spam probability is 1 to 10% [score: 0.0168] 0.1 HTML_MESSAGE BODY: HTML included in message 0.1 HTML_FONTCOLOR_RED BODY: HTML font color is red -1.7 AWL AWL: Auto-whitelist adjustment X-Mailman-Approved-At: Thu, 29 Jun 2006 19:53:49 +0000 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 19:33:49 -0000 > On Thu, Jun 29, 2006 at 11:44:23AM -0400, Pat Lashley wrote: > > No, our implementation is NOT legal. We always return the SAME value. To > > be legal, we should not return that value again unless it has been > > free()-ed. > > It is legal due to brain damaged definition of implementation defined > behaviour, but it violates the spirit of the standard :-) Perhaps I'm misunderstanding the 'implementation defined behavior' choices in the standard. I thought that it could either 1) Return NULL; or 2) Behave as though it returned a 'minimum allocation' (which cannot be legally de-referenced). But if it did actually perform a 'minimum allocation'; wouldn't it have to return a different value every time to maintain the free() semantics? -Pat From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 20:31:36 2006 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 7D96A16A492 for ; Thu, 29 Jun 2006 20:31:36 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05E2444D38 for ; Thu, 29 Jun 2006 20:31:35 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k5TKVYVL020272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Jun 2006 13:31:35 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <44A438A6.40707@errno.com> Date: Thu, 29 Jun 2006 13:31:34 -0700 From: Sam Leffler User-Agent: Thunderbird 1.5.0.2 (X11/20060508) MIME-Version: 1.0 To: Christian Zander References: <20060629111231.GA692@wolf.nvidia.com> <44A3FD87.8000006@pbxpress.com> <20060629164910.GA4242@kan.dnsalias.net> <20060629174100.GW692@wolf.nvidia.com> In-Reply-To: <20060629174100.GW692@wolf.nvidia.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Alexander Kabaev , Oleksandr Tymoshenko Subject: Re: NVIDIA FreeBSD kernel feature requests 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, 29 Jun 2006 20:31:36 -0000 Christian Zander wrote: > On Thu, Jun 29, 2006 at 12:49:10PM -0400, Alexander Kabaev wrote: >> On Thu, Jun 29, 2006 at 09:32:42AM -0700, Kip Macy wrote: >>> IIRC lack of per instance cdevs also limits Freebsd to one vmware instance. >>> >>> -Kip >>> >>> On 6/29/06, Oleksandr Tymoshenko wrote: >>>> Christian Zander wrote: >>>>> Hi all, >>>>> # Task: implement mechanism to allow character drivers to >>>>> maintain per-open instance data (e.g. like the Linux >>>>> kernel's 'struct file *'). >>>>> Motivation: allows per thread NVIDIA notification delivery; also >>>>> reduces CPU overhead for notification delivery >>>>> from the NVIDIA kernel module to the X driver and to >>>>> OpenGL. >>>>> Priority: should translate to improved X/OpenGL performance. >>>>> Status: has not been started. >>>> I've stumbled across this issue a while ago. Actually it can >>>> be partially solved using EVENTHANDLER_REGISTER of dev_clone event with >>>> keeping state structure in si_drv1 or si_drv2 fields. I'm not sure it's >>>> the best solution but it works for me though it smells like hack, and >>>> looks like hack :) Anyway, having legitimate per-open instance data >>>> structures of cdevs is a great assistance in porting linux drivers to >>>> FreeBSD. Just my $0.02. >>>> >> WHY it smells like a hack? It was designed precisely to do that. I am >> using cloned devices in our product with great success. Every client >> opening 'magic' device gets its own exclusive cloned device instance >> and everything works like a charm. I am yet to hear any single coherent >> description of what Linux's approach has over device cloning in FreeBSD. >> I wouldn't mind being educated on this. >> > > Thanks for your feedback, I hadn't been aware of this interface, but > it sounds promising. When was it first introduced? Are there any > known problems with it and certain FreeBSD releases, or is it expected > to work fine in FreeBSD >= 5.3? It came in with devfs so it should be in all 5.x systems. Sam From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 20:57:07 2006 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 CD6F916A407 for ; Thu, 29 Jun 2006 20:57:07 +0000 (UTC) (envelope-from lgusenet@be-well.ilk.org) Received: from mail2.sea5.speakeasy.net (mail2.sea5.speakeasy.net [69.17.117.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6818643D5C for ; Thu, 29 Jun 2006 20:57:07 +0000 (GMT) (envelope-from lgusenet@be-well.ilk.org) Received: (qmail 20436 invoked from network); 29 Jun 2006 20:57:07 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail2.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Jun 2006 20:57:06 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 8F12B28449; Thu, 29 Jun 2006 16:57:05 -0400 (EDT) To: Pat Lashley To: freebsd-hackers@freeBSD.org References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060628212956.GI822@wombat.fafoe.narf.at> <805AA34B676EDF411B3CF548@Zelazny> <20060629165629.GA6875@britannica.bec.de> From: Lowell Gilbert Date: Thu, 29 Jun 2006 16:57:05 -0400 In-Reply-To: (Pat Lashley's message of "Thu, 29 Jun 2006 15:33:08 -0400") Message-ID: <44odwbu1cu.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Thu, 29 Jun 2006 21:33:46 +0000 Cc: Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 20:57:07 -0000 Pat Lashley writes: >> On Thu, Jun 29, 2006 at 11:44:23AM -0400, Pat Lashley wrote: >> > No, our implementation is NOT legal. We always return the SAME value. To >> > be legal, we should not return that value again unless it has been >> > free()-ed. >> >> It is legal due to brain damaged definition of implementation defined >> behaviour, but it violates the spirit of the standard :-) > > Perhaps I'm misunderstanding the 'implementation defined behavior' > choices in the standard. I thought that it could either 1) Return > NULL; or 2) Behave as though it returned a 'minimum allocation' (which > cannot be legally de-referenced). I went wandering through the C Working Group archives for the heck of it, and apparently a lot of people were confused over this, thinking either as you did or that "unique" meant it would a value unique to the usage of malloc(0). It's been clarified recently (and will be in the next revision of the standard) to the meaning you understood. Specifically: If the size of the space requested is zero, the behavior is implementation-defined: either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object. > But if it did actually perform a > minimum allocation'; wouldn't it have to return a different value > every time to maintain the free() semantics? I think that's another way of looking at the same confusion. If "minimum" is zero, then using a sentinel value (as in FreeBSD) works. Our malloc() could be easily fixed to be standards-compliant by removing the special handling for ZEROSIZEPTR in malloc.c; then allocations of 0 bytes will be rounded up to 16, just like all other alloations of less than 16 bytes. However, that would lose much of the bug-finding advantage of the current behaviour. This is wandering into -standards territory, though. In any case, the answer to thread's original question is "mozilla should fix its code to not assume malloc(0)==NULL". From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 22:09:24 2006 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 8A91816A403 for ; Thu, 29 Jun 2006 22:09:24 +0000 (UTC) (envelope-from randyhyde@earthlink.net) Received: from elasmtp-spurfowl.atl.sa.earthlink.net (elasmtp-spurfowl.atl.sa.earthlink.net [209.86.89.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 294DA457B8 for ; Thu, 29 Jun 2006 22:09:23 +0000 (GMT) (envelope-from randyhyde@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=Mnp+P0A89WMWq8KlrjRgYUCiGJAx261e9v3neuA+zkgSWlbVAvTwf7Ndw5VGbj/m; h=Message-ID:Date:From:Reply-To:To:Subject:Cc:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [209.86.224.32] (helo=elwamui-cypress.atl.sa.earthlink.net) by elasmtp-spurfowl.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1Fw4hP-0004Gy-Dm; Thu, 29 Jun 2006 18:09:23 -0400 Received: from 198.74.38.59 by webmail.pas.earthlink.net with HTTP; Thu, 29 Jun 2006 18:09:23 -0400 Message-ID: <16887068.1151618963387.JavaMail.root@elwamui-cypress.atl.sa.earthlink.net> Date: Thu, 29 Jun 2006 15:09:23 -0700 (GMT-07:00) From: Randall Hyde To: Peter Jeremy Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: EarthLink Zoo Mail 1.0 X-ELNK-Trace: eba5e0c9192a36dcd6dd28457998182d7e972de0d01da940c68c2f1f0a01cd11719cab51120b2171350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 209.86.224.32 Cc: freebsd-hackers@freebsd.org Subject: Re: FLEX, was Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Randall Hyde List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 22:09:24 -0000 -----Original Message----- > >How about feeding the C source through the preprocessor, stripping out >the #line directives, compiling it and posting the exact gcc error and >source context. Okay, I'll try that when I get home. But I was kind of under the impression that *GCC* runs the preprocessor on the input, during compilation :-). > >It may be a gcc bug, it may be a HLA bug or it could be an interaction >between the FreeBSD headers and HLA. None of the code listed has *anything* to do with the HLA.FLX source (and certainly nothing to do with the rest of the HLA source code). It is quite possible that some FreeBSD headers conflict with this section of the FLEX output (remember, this is *canned* output code from FLEX, this is not generated in response to any FLEX input code). That's why my original question was so generic and not specific -- this would appear to be a generic problem with using FLEX output under BSD and I thought a quick question would affirm/deny that thought. Cheers, Randy Hyde From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 22:22:17 2006 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 C182E16A403 for ; Thu, 29 Jun 2006 22:22:17 +0000 (UTC) (envelope-from randyhyde@earthlink.net) Received: from elasmtp-spurfowl.atl.sa.earthlink.net (elasmtp-spurfowl.atl.sa.earthlink.net [209.86.89.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 223E3457B8 for ; Thu, 29 Jun 2006 22:22:17 +0000 (GMT) (envelope-from randyhyde@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=LBBQjzXYMfk16n15rHuYTRu6vQ+MBbVb670iqG306AQ4QICPs8ilE4mtOYqY2mUg; h=Message-ID:Date:From:Reply-To:To:Subject:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [209.86.224.32] (helo=elwamui-cypress.atl.sa.earthlink.net) by elasmtp-spurfowl.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1Fw4ts-000165-MJ for freebsd-hackers@freebsd.org; Thu, 29 Jun 2006 18:22:16 -0400 Received: from 198.74.38.59 by webmail.pas.earthlink.net with HTTP; Thu, 29 Jun 2006 18:22:16 -0400 Message-ID: <13560403.1151619736637.JavaMail.root@elwamui-cypress.atl.sa.earthlink.net> Date: Thu, 29 Jun 2006 15:22:16 -0700 (GMT-07:00) From: Randall Hyde To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: EarthLink Zoo Mail 1.0 X-ELNK-Trace: eba5e0c9192a36dcd6dd28457998182d7e972de0d01da940bf6c19f6cb0f9335913243406ea90159350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 209.86.224.32 Subject: Re: FLEX, was Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Randall Hyde List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 22:22:17 -0000 -----Original Message----- >From: Thomas David Rivers >Sent: Jun 29, 2006 3:17 AM >To: freebsd-hackers@freebsd.org, randyhyde@earthlink.net >Subject: Re: FLEX, was Re: Return value of malloc(0) > >"Randall Hyde" >> >> BTW, if anyone is intrested in the full FLEX source, it's part of the HLA >> (High Level Assembler) source package found here: >> >> >> http://webster.cs.ucr.edu/AsmTools/HLA/HLAv1.84/hlasrc.zip >> > >Just wondering if those guys knew that IBM calls their mainframe assembler >the "High Level Assembler", which they abbreviate HLASM. These guys would be just me, and I'm quite aware of HLASM. Of course, the term "High Level Assembler" predated IBM's HLASM by many years (indeed, the phrase was used a bit in the late 1960s, see Salomon's book for details). > >This isn't an x86 assembler like HLA - it's a z/Architecture >(mainframe) assembler, very different beast indeed. Yes, their concept of "High Level" meant fancy macro facilities. Not back for a 1980's-era assembler. > >But - they may want to pick a new name, lest they incur the wrath >of IBM's lawyers. I think IBM took that name in the 80s. Again, the generic term High Level Assembler predated HLASM, and HLA and HLASM are two different things. Further, there was an HLA for the Amiga some time back. Again, it's not like this term is terribly original. And I seriously doubt if IBM really cares at this point. > >Also - it seems that 'webster.cs.ucr.edu' has gone missing >from DNS somehow; so I wasn't able to look at the source, although >I was able to look at the web pages thanks to Yahoo's cache. Hmmm... Webster is a relatively famous site, so that's unusual. Cheers, Randy Hyde From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 22:57:04 2006 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 0876C16A5D5 for ; Thu, 29 Jun 2006 22:57:04 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4A5845A0D for ; Thu, 29 Jun 2006 22:36:20 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (5i8iug2bzhqg26a0@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k5TMaJfa006211; Thu, 29 Jun 2006 15:36:19 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k5TMaIGb006210; Thu, 29 Jun 2006 15:36:18 -0700 (PDT) (envelope-from jmg) Date: Thu, 29 Jun 2006 15:36:18 -0700 From: John-Mark Gurney To: hongz@promisechina.com Message-ID: <20060629223618.GR82074@funkthat.com> Mail-Followup-To: hongz@promisechina.com, freebsd-hackers@freebsd.org References: <1150354522$36510$27619252@hongz@promisechina.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1150354522$36510$27619252@hongz@promisechina.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: Help:why bus resource shortage? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 22:57:04 -0000 hongz@promisechina.com wrote this message on Thu, Jun 15, 2006 at 14:55 +0800: > I failed to get the pci bus resource after the driver is loaded (sc->r_mem > is NULL after bus_alloc_resource_any is called). Is it because bus resources > have been consumed by other drivers? Or other something happened? Please > help me on this! Please provide a verbose boot (boot -v) output of the pci card... > rid = 0x10; You really should be using PCIR_BAR macro instead of hard coding it... > sc->r_mem = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, &rid, > RF_ACTIVE); > > if (!sc->r_mem) return ENOMEM; > > > > The pci resources on our cards: > > shasta0: port 0x2400-0x247f, > 0x2000-0x20ff mem 0xe9021000-0xe9021fff, 0xe9000000-0xe901ffff irq 17 at > device 5.0 on pci2 The resources could be in a different order than listed... Are you sure the memory resource is in the first bar possition? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 02:14:25 2006 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 D3E5616A407 for ; Fri, 30 Jun 2006 02:14:25 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id BCF7C43D48 for ; Fri, 30 Jun 2006 02:14:24 +0000 (GMT) (envelope-from matthias.andree@gmx.de) Received: (qmail invoked by alias); 30 Jun 2006 02:14:23 -0000 Received: from p50911D7D.dip0.t-ipconnect.de (EHLO m2a2.dyndns.org) [80.145.29.125] by mail.gmx.net (mp039) with SMTP; 30 Jun 2006 04:14:23 +0200 X-Authenticated: #428038 Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id B08F12004B2; Fri, 30 Jun 2006 04:14:21 +0200 (CEST) Received: from m2a2.dyndns.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10716-12; Fri, 30 Jun 2006 04:14:20 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 2E193200F1B; Fri, 30 Jun 2006 04:14:20 +0200 (CEST) Date: Fri, 30 Jun 2006 04:14:20 +0200 From: Matthias Andree To: Harti Brandt Message-ID: <20060630021420.GA11530@merlin.emma.line.org> References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> <20060629162319.GA94921@leiferikson.flosken.lan> <20060629194138.S55888@beagle.kn.op.dlr.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060629194138.S55888@beagle.kn.op.dlr.de> X-PGP-Key: http://home.pages.de/~mandree/keys/GPGKEY.asc User-Agent: Mutt/1.5.11-2006-06-08 X-Virus-Scanned: amavisd-new at emma.line.org X-Y-GMX-Trusted: 0 Cc: freebsd-hackers@freebsd.org Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 02:14:25 -0000 On Thu, 29 Jun 2006, Harti Brandt wrote: > Operator precedence is just for parsing, not for evaluation. The > compiler may well first evaluate the foo on the right side of the == (by > fetching it) and then go an call malloc and assign foo. Right, thanks for reminding me. I don't usually write code that depends on evaluation order... except with the short-circuiting stuff || or &&. splint 3.1.1 complains about this issue BTW, but neither GCC 4.1.0 nor ICC 8.1.028 on Linux nor FreeBSD lint complain. I used gcc -Wall which is specified to include -Wsequence-point... > It is actually undefined behaviour, I think, so it may well make explode > your near-by atom power plant. It had better not... -- Matthias Andree From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 04:58:40 2006 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 63A9216A407 for ; Fri, 30 Jun 2006 04:58:40 +0000 (UTC) (envelope-from hnazfoo@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC76B446EB for ; Fri, 30 Jun 2006 04:58:39 +0000 (GMT) (envelope-from hnazfoo@googlemail.com) Received: by nf-out-0910.google.com with SMTP id c29so199267nfb for ; Thu, 29 Jun 2006 21:58:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.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=BrX9KAmTFUDalSAZubOQR9iFS9acksNN9oNiGZa7wMINjivVr8uoOvjGRYjO+dElYQHYlpwsbHFmr8dHxrDpgwH/keuFa3vHYndrHUZ9Z9jhu9ssdrqJM/KiSSniK6k8OUkUpP/0h4fUpE8kuyybyGX4LyZIq6STGXwXBaCpMhM= Received: by 10.48.223.17 with SMTP id v17mr257518nfg; Thu, 29 Jun 2006 21:58:38 -0700 (PDT) Received: from localhost ( [217.65.22.47]) by mx.gmail.com with ESMTP id p72sm1115736nfc.2006.06.29.21.58.36; Thu, 29 Jun 2006 21:58:37 -0700 (PDT) Date: Fri, 30 Jun 2006 06:59:37 +0200 From: Johannes Weiner To: freebsd-hackers@freebsd.org Message-ID: <20060630045937.GB97868@leiferikson.flosken.lan> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> <20060629162319.GA94921@leiferikson.flosken.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: mutt-ng/devel-r804 (FreeBSD) Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 04:58:40 -0000 Hi, On Thu, Jun 29, 2006 at 07:29:16PM +0200, Matthias Andree wrote: > No, sir. Operator precedence: assign first, and then compare, thus the > comparison will always be true (else you'd be comparing to undefined > values, which isn't any better). You might as well write: > > foo = malloc(0); > /* make noise */ Ok, just for having it done: if (foo == (foo = some_val)) .. would be right to check if foo stayed the same. No? > There is no way to see a 0x800 return from malloc(0) as "error". So noone should actually use malloc(0) and check the size_t argument before passing it, I guess. Hannes -- One must still have chaos in oneself to be able to give a birth to a dancing star. From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 06:37:58 2006 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 169E316A415 for ; Fri, 30 Jun 2006 06:37:58 +0000 (UTC) (envelope-from aag.lists@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 791B643D45 for ; Fri, 30 Jun 2006 06:37:57 +0000 (GMT) (envelope-from aag.lists@gmail.com) Received: by py-out-1112.google.com with SMTP id b36so553267pyb for ; Thu, 29 Jun 2006 23:37:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ePXNk2ZP9YioGRWI7/XaVfRMsrP3wlD+TZ/PC82T3CQlzx4+kD0GCvHGezKDLyZp8Wt/8zDkJyJsIi6fAoR+bMrEKmayZlt0ZMxa5WWSFsiev7wk+9EyxNId4ZKOHlhC8ZiCXYSmKKRxA40qm+DQTShbatJsTh1Uft/BvVZiX8A= Received: by 10.35.34.18 with SMTP id m18mr289914pyj; Thu, 29 Jun 2006 23:37:56 -0700 (PDT) Received: by 10.35.50.18 with HTTP; Thu, 29 Jun 2006 23:37:56 -0700 (PDT) Message-ID: <2f3a439f0606292337y5640c795jc125fe530e3f666f@mail.gmail.com> Date: Fri, 30 Jun 2006 12:07:56 +0530 From: "Aditya Godbole" To: freebsd-hackers@freebsd.org In-Reply-To: <200606270851.47508.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2f3a439f0606260653j602e083blf872bef5b94be5a@mail.gmail.com> <200606270851.47508.jhb@freebsd.org> Subject: Re: New architecture support 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, 30 Jun 2006 06:37:58 -0000 On 6/27/06, John Baldwin wrote: > > If I have to add support for a new architecture, how do I start? > > Well, you'll need a toolchain. :) Then you can start working on building > a minimal kernel filling in missing bits in sys/ as you go. Is there any documentation regarding the interface between the machine independant and machine dependant parts of the kernel. Also what functionality does the machine independant part expect to be in place? -aditya From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 08:10:26 2006 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 B61C716A403 for ; Fri, 30 Jun 2006 08:10:26 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CFA943D55 for ; Fri, 30 Jun 2006 08:10:23 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail18.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k5U8AJEE004524 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 30 Jun 2006 18:10:19 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k5U8AJse000950; Fri, 30 Jun 2006 18:10:19 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k5U8AJZT000949; Fri, 30 Jun 2006 18:10:19 +1000 (EST) (envelope-from peter) Date: Fri, 30 Jun 2006 18:10:19 +1000 From: Peter Jeremy To: Randall Hyde Message-ID: <20060630081019.GB734@turion.vk2pj.dyndns.org> References: <16887068.1151618963387.JavaMail.root@elwamui-cypress.atl.sa.earthlink.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MW5yreqqjyrRcusr" Content-Disposition: inline In-Reply-To: <16887068.1151618963387.JavaMail.root@elwamui-cypress.atl.sa.earthlink.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: FLEX, was Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 08:10:26 -0000 --MW5yreqqjyrRcusr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 2006-Jun-29 15:09:23 -0700, Randall Hyde wrote: >>How about feeding the C source through the preprocessor, stripping out >>the #line directives, compiling it and posting the exact gcc error and >>source context. > >Okay, I'll try that when I get home. But I was kind of under the >impression that *GCC* runs the preprocessor on the input, during >compilation :-). It does but, as you pointed out, the input line you posted doesn't obviously correlate with the error report. Explicitly pre-processing the source and stripping out the #line directives means that you can then correlate the error message with the actual line that cc1 is compiling. > -- this would appear to be a generic problem with using FLEX >output under BSD and I thought a quick question would affirm/deny >that thought. Well, I just did a check of some flex code I have lying around and it did not report any syntax errors or unexpected warnings. And, since flex is used several times during a buildworld, any generic problems would show up very quickly. --=20 Peter Jeremy --MW5yreqqjyrRcusr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEpNxq/opHv/APuIcRAr34AJ0ZMGm9LKhY4VxKZq41V07hbayfvACfUECM +u98gyQ1mONoXiuI4Eg8xvg= =39hl -----END PGP SIGNATURE----- --MW5yreqqjyrRcusr-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 08:16:53 2006 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 7462216A415 for ; Fri, 30 Jun 2006 08:16:53 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FA0B4413E for ; Fri, 30 Jun 2006 08:16:48 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (68exmmpuajxxjbf8@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k5U8GlIN019164; Fri, 30 Jun 2006 01:16:47 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k5U8GlpH019163; Fri, 30 Jun 2006 01:16:47 -0700 (PDT) (envelope-from jmg) Date: Fri, 30 Jun 2006 01:16:46 -0700 From: John-Mark Gurney To: hongz@promisechina.com Message-ID: <20060630081646.GS82074@funkthat.com> Mail-Followup-To: hongz@promisechina.com, freebsd-hackers@freebsd.org References: <20060629223618.GR82074@funkthat.com> <1151648790$67280$13400385@hongz@promisechina.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1151648790$67280$13400385@hongz@promisechina.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: ????: Help:why bus resource shortage? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 08:16:53 -0000 hongz@promisechina.com wrote this message on Fri, Jun 30, 2006 at 14:26 +0800: > I found the problem! It was caused by an existed ata driver in FreeBSD. I > have mentioned before that the existed ata driver can take over the > management of our HBA card, leading to our driver can not probe our card! By > getting rid of the ID in ata-chipset.c,we can probe the HBA card, but we > still can not get the pci resources! Instead, I can get rid of the effects > of the existed ata driver by only getting rid of the ID in probe function of > ata-pci.c! This has now been fixed by making the built in driver return a negative value for the probe.. so your probe routine can return 0, and it will win the probe for the device... > In summon, the problems (probe failure and bus resource short) lie in the hmm. that seems wierd, are you trying to allocate the resource in the _probe function? You shouldn't need to unless you need to do special munging of the resources to properly identify the device.. and unless you return 0 from your _probe function, you will have to release the resrouce at the end of the _probe function... > ata driver in FreeBSD, which can recognize our HBA card because it records > the ID of this HBA. By getting rid of the switch case of this ID in probe > function of ata-pci.c, you can take over the HBA completely. > > Here, I would like to report my solution (not tested yet) on a previous > question about how to transfer physical address into kernel virtual address > in FreeBSD: That is what the bus_space api is for... The method you propose is a hack and not very useful for ensuring that your driver run on other platforms... > -----????????----- > ??????: John-Mark Gurney [mailto:gurney_j@resnet.uoregon.edu] > ????????: 2006??6??30?? 6:36 > ??????: hongz@promisechina.com > ????: freebsd-hackers@freebsd.org > ????: Re: Help:why bus resource shortage? > > hongz@promisechina.com wrote this message on Thu, Jun 15, 2006 at 14:55 > +0800: > > I failed to get the pci bus resource after the driver is loaded (sc->r_mem > > is NULL after bus_alloc_resource_any is called). Is it because bus > resources > > have been consumed by other drivers? Or other something happened? Please > > help me on this! > > Please provide a verbose boot (boot -v) output of the pci card... > > > rid = 0x10; > > You really should be using PCIR_BAR macro instead of hard coding it... > > > sc->r_mem = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, &rid, > > RF_ACTIVE); > > > > if (!sc->r_mem) return ENOMEM; > > > > > > > > The pci resources on our cards: > > > > shasta0: port 0x2400-0x247f, > > 0x2000-0x20ff mem 0xe9021000-0xe9021fff, 0xe9000000-0xe901ffff irq 17 at > > device 5.0 on pci2 > > The resources could be in a different order than listed... Are you > sure the memory resource is in the first bar possition? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 09:13:19 2006 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 F40CD16A525 for ; Fri, 30 Jun 2006 09:13:18 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CD2B4467C for ; Fri, 30 Jun 2006 08:49:24 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (bclj8f6c2vw3p307@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k5U8nNUr020031; Fri, 30 Jun 2006 01:49:23 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k5U8nJKU020030; Fri, 30 Jun 2006 01:49:19 -0700 (PDT) (envelope-from jmg) Date: Fri, 30 Jun 2006 01:49:19 -0700 From: John-Mark Gurney To: Gerald Heinig Message-ID: <20060630084919.GT82074@funkthat.com> Mail-Followup-To: Gerald Heinig , hongz@promisechina.com, freebsd-hackers@freebsd.org References: <20060629223618.GR82074@funkthat.com> <20060630081646.GS82074@funkthat.com> <1151656903.28501.5.camel@sk-dt-018.skd.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1151656903.28501.5.camel@sk-dt-018.skd.de> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org, hongz@promisechina.com Subject: Re: ????: Help:why bus resource shortage? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 09:13:19 -0000 Gerald Heinig wrote this message on Fri, Jun 30, 2006 at 10:41 +0200: > On Fri, 2006-06-30 at 01:16 -0700, John-Mark Gurney wrote: > > This has now been fixed by making the built in driver return a negative > > value for the probe.. so your probe routine can return 0, and it will > > win the probe for the device... > > Minor nitpick: it may perhaps be better to return a smaller negative > value (eg. -5) rather than 0. IIRC -10 is the default score used by > standard system drivers and 0 is the highest score available. If someone > wants to use an alternative driver to Hong's and the standard system's > it won't attach. The correct values to return are: #define BUS_PROBE_SPECIFIC 0 /* Only I can use this device */ #define BUS_PROBE_VENDOR (-10) /* Vendor supplied driver */ #define BUS_PROBE_DEFAULT (-20) /* Base OS default driver */ #define BUS_PROBE_LOW_PRIORITY (-40) /* Older, less desirable drivers */ #define BUS_PROBE_GENERIC (-100) /* generic driver for dev */ #define BUS_PROBE_HOOVER (-500) /* Generic dev for all devs on bus */ So, ata should be returning _GENERIC, and Hong's driver should use _VENDOR... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 09:13:21 2006 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 650B916A534 for ; Fri, 30 Jun 2006 09:13:21 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C6E444687 for ; Fri, 30 Jun 2006 08:49:38 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: by nz-out-0102.google.com with SMTP id n29so269776nzf for ; Fri, 30 Jun 2006 01:49:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=SAhCe82wjRaOGhcpKNsoTOzsG9omK+KgCMS6AEI1j4VsOSQbqYGTmyLVGAV9VQO5yP09+pr9F149gxwjdYEVcyWimXTJOuFgvhp338tf1uTfWuLsZ6LKKNlhaIU4QzCt7dlHB4jh5TgVwbip8u/ASKxf6T95J98U7A0w3B/xsbk= Received: by 10.36.74.5 with SMTP id w5mr490582nza; Fri, 30 Jun 2006 01:49:37 -0700 (PDT) Received: by 10.36.18.18 with HTTP; Fri, 30 Jun 2006 01:49:37 -0700 (PDT) Message-ID: Date: Fri, 30 Jun 2006 14:19:37 +0530 From: "Kamal R. Prasad" Sender: kamalpr@gmail.com To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Google-Sender-Auth: 8c536548c8f92736 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: freebsd port onto IBM/Lenovo T 40 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, 30 Jun 2006 09:13:21 -0000 Hello, I installed Freebsd 6.1 on an IBM(now lenovo) Thinkpad T40. The dmesg shows the following -which probably need some config changes. ------------ acpi0: on motherboard acpi_ec0: port 0x62, 0x66 on acpi0 acpi_bus_number: can't get _ADR < same message repeated a number of times> ... ugen0: STMicroelectronics Biometric Coprocessor, rev 1.00/0.01, addr 2 ... --------------- do I need to fix anything for acpi and is the driver for a fingerprint sensor present in the current distribution? Details of the fingerprint sensor are given at this link:- http://www.pc.ibm.com/us/security/fingerprintreader.html thanks -kamal From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 09:13:32 2006 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 63E0216A703 for ; Fri, 30 Jun 2006 09:13:32 +0000 (UTC) (envelope-from gheinig@marvell.com) Received: from maili.marvell.com (host2.marvell.com [65.219.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61FE743FCC for ; Fri, 30 Jun 2006 08:41:46 +0000 (GMT) (envelope-from gheinig@marvell.com) Received: from MSI-MTA.marvell.com (msi-mta.marvell.com [10.68.76.91]) by maili.marvell.com (Postfix) with ESMTP id E51A82596; Fri, 30 Jun 2006 01:41:45 -0700 (PDT) Received: from SKGExch01.marvell.com ([10.9.116.16]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 30 Jun 2006 01:41:45 -0700 Received: from 10.9.3.30 ([10.9.3.30]) by SKGExch01.marvell.com ([10.9.116.16]) with Microsoft Exchange Server HTTP-DAV ; Fri, 30 Jun 2006 08:41:43 +0000 Received: from sk-dt-018.skd.de by skgexch01; 30 Jun 2006 10:41:43 +0200 From: Gerald Heinig To: John-Mark Gurney In-Reply-To: <20060630081646.GS82074@funkthat.com> References: <20060629223618.GR82074@funkthat.com> <1151648790$67280$13400385@hongz@promisechina.com> <20060630081646.GS82074@funkthat.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: SysKonnect GmbH Date: Fri, 30 Jun 2006 10:41:42 +0200 Message-Id: <1151656903.28501.5.camel@sk-dt-018.skd.de> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-22) X-OriginalArrivalTime: 30 Jun 2006 08:41:45.0888 (UTC) FILETIME=[0507AA00:01C69C21] Cc: freebsd-hackers@freebsd.org, hongz@promisechina.com Subject: Re: ????: Help:why bus resource shortage? 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, 30 Jun 2006 09:13:32 -0000 Hi Guys, On Fri, 2006-06-30 at 01:16 -0700, John-Mark Gurney wrote: > hongz@promisechina.com wrote this message on Fri, Jun 30, 2006 at 14:26 +0800: > > I found the problem! It was caused by an existed ata driver in FreeBSD. I > > have mentioned before that the existed ata driver can take over the > > management of our HBA card, leading to our driver can not probe our card! By > > getting rid of the ID in ata-chipset.c,we can probe the HBA card, but we > > still can not get the pci resources! Instead, I can get rid of the effects > > of the existed ata driver by only getting rid of the ID in probe function of > > ata-pci.c! > > This has now been fixed by making the built in driver return a negative > value for the probe.. so your probe routine can return 0, and it will > win the probe for the device... Minor nitpick: it may perhaps be better to return a smaller negative value (eg. -5) rather than 0. IIRC -10 is the default score used by standard system drivers and 0 is the highest score available. If someone wants to use an alternative driver to Hong's and the standard system's it won't attach. > > > In summon, the problems (probe failure and bus resource short) lie in the > > hmm. that seems wierd, are you trying to allocate the resource in the > _probe function? You shouldn't need to unless you need to do special > munging of the resources to properly identify the device.. and unless > you return 0 from your _probe function, you will have to release the > resrouce at the end of the _probe function... > > > ata driver in FreeBSD, which can recognize our HBA card because it records > > the ID of this HBA. By getting rid of the switch case of this ID in probe > > function of ata-pci.c, you can take over the HBA completely. > > > > Here, I would like to report my solution (not tested yet) on a previous > > question about how to transfer physical address into kernel virtual address > > in FreeBSD: > > That is what the bus_space api is for... The method you propose is a > hack and not very useful for ensuring that your driver run on other > platforms... > > > -----????????----- > > ??????: John-Mark Gurney [mailto:gurney_j@resnet.uoregon.edu] > > ????????: 2006??6??30?? 6:36 > > ??????: hongz@promisechina.com > > ????: freebsd-hackers@freebsd.org > > ????: Re: Help:why bus resource shortage? > > > > hongz@promisechina.com wrote this message on Thu, Jun 15, 2006 at 14:55 > > +0800: > > > I failed to get the pci bus resource after the driver is loaded (sc->r_mem > > > is NULL after bus_alloc_resource_any is called). Is it because bus > > resources > > > have been consumed by other drivers? Or other something happened? Please > > > help me on this! > > > > Please provide a verbose boot (boot -v) output of the pci card... > > > > > rid = 0x10; > > > > You really should be using PCIR_BAR macro instead of hard coding it... > > > > > sc->r_mem = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, &rid, > > > RF_ACTIVE); > > > > > > if (!sc->r_mem) return ENOMEM; > > > > > > > > > > > > The pci resources on our cards: > > > > > > shasta0: port 0x2400-0x247f, > > > 0x2000-0x20ff mem 0xe9021000-0xe9021fff, 0xe9000000-0xe901ffff irq 17 at > > > device 5.0 on pci2 > > > > The resources could be in a different order than listed... Are you > > sure the memory resource is in the first bar possition? > From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 09:30:17 2006 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 1243516A4A0 for ; Fri, 30 Jun 2006 09:30:17 +0000 (UTC) (envelope-from sos@freebsd.org) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id C757B43D86 for ; Fri, 30 Jun 2006 09:30:12 +0000 (GMT) (envelope-from sos@freebsd.org) Received: from [194.192.25.130] (sos.deepcore.dk [194.192.25.130]) by spider.deepcore.dk (8.13.6/8.13.4) with ESMTP id k5U9UBZg011416; Fri, 30 Jun 2006 11:30:11 +0200 (CEST) (envelope-from sos@freebsd.org) Message-ID: <44A4EF23.5010909@freebsd.org> Date: Fri, 30 Jun 2006 11:30:11 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Thunderbird 1.5.0.2 (X11/20060531) To: Gerald Heinig , hongz@promisechina.com, freebsd-hackers@freebsd.org References: <20060629223618.GR82074@funkthat.com> <20060630081646.GS82074@funkthat.com> <1151656903.28501.5.camel@sk-dt-018.skd.de> <20060630084919.GT82074@funkthat.com> In-Reply-To: <20060630084919.GT82074@funkthat.com> Content-Transfer-Encoding: 7bit X-mail-scanned: by DeepCore Virus & Spam killer v1.16 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: ????: Help:why bus resource shortage? 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, 30 Jun 2006 09:30:17 -0000 John-Mark Gurney wrote: Gerald Heinig wrote this message on Fri, Jun 30, 2006 at 10:41 +0200: On Fri, 2006-06-30 at 01:16 -0700, John-Mark Gurney wrote: This has now been fixed by making the built in driver return a negative value for the probe.. so your probe routine can return 0, and it will win the probe for the device... Minor nitpick: it may perhaps be better to return a smaller negative value (eg. -5) rather than 0. IIRC -10 is the default score used by standard system drivers and 0 is the highest score available. If someone wants to use an alternative driver to Hong's and the standard system's it won't attach. The correct values to return are: #define BUS_PROBE_SPECIFIC 0 /* Only I can use this device */ #define BUS_PROBE_VENDOR (-10) /* Vendor supplied driver */ #define BUS_PROBE_DEFAULT (-20) /* Base OS default driver */ #define BUS_PROBE_LOW_PRIORITY (-40) /* Older, less desirable drivers */ #define BUS_PROBE_GENERIC (-100) /* generic driver for dev */ #define BUS_PROBE_HOOVER (-500) /* Generic dev for all devs on bus */ So, ata should be returning _GENERIC, and Hong's driver should use _VENDOR... Actually I have a local patch that makes ATA return BUS_PROBE_DEFAULT in case it has a "real" driver for the chip, and BUS_PROBE_GENERIC in case it takes it as a generic (legacy) ATA chip. That way I can do modules for new support without having to touch ATA... -Søren From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 16:13:03 2006 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 811AA16A415 for ; Fri, 30 Jun 2006 16:13:03 +0000 (UTC) (envelope-from mistry.7@osu.edu) Received: from mail.united-ware.com (am-productions.biz [69.61.164.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBDF044525 for ; Fri, 30 Jun 2006 16:13:02 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.100] (am-productions.biz [69.61.164.22]) (authenticated bits=0) by mail.united-ware.com (8.13.6/8.13.6) with ESMTP id k5UGIQqh002172 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Jun 2006 12:18:32 -0400 (EDT) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: freebsd-hackers@freebsd.org Date: Fri, 30 Jun 2006 12:13:29 -0400 User-Agent: KMail/1.9.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2770971.jjmrBfEZcM"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200606301213.39115.mistry.7@osu.edu> X-Spam-Status: No, score=-4.9 required=5.0 tests=ALL_TRUSTED,BAYES_50, J_CHICKENPOX_33,MYFREEBSD2 autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on mail.united-ware.com X-Virus-Scanned: ClamAV 0.88.2/1578/Fri Jun 30 05:34:32 2006 on mail.united-ware.com X-Virus-Status: Clean Cc: "Kamal R. Prasad" Subject: Re: freebsd port onto IBM/Lenovo T 40 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, 30 Jun 2006 16:13:03 -0000 --nextPart2770971.jjmrBfEZcM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 30 June 2006 04:49, Kamal R. Prasad wrote: > Hello, > > I installed Freebsd 6.1 on an IBM(now lenovo) Thinkpad T40. The > dmesg shows the following -which probably need some config changes. > ------------ > acpi0: on motherboard > acpi_ec0: port 0x62, 0x66 on > acpi0 acpi_bus_number: can't get _ADR > < same message repeated a number of times> > ... > ugen0: STMicroelectronics Biometric Coprocessor, rev 1.00/0.01, > addr 2 ... > --------------- > > do I need to fix anything for acpi and is the driver for a > fingerprint sensor present in the current distribution? > Details of the fingerprint sensor are given at this link:- > http://www.pc.ibm.com/us/security/fingerprintreader.html http://shapeshifter.se/articles/upek_touchchip_freebsd/ =2D-=20 Anish Mistry --nextPart2770971.jjmrBfEZcM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEpU2zxqA5ziudZT0RAjydAKC42S2Hrxwv4D+Gy6EeiCEt8udyMwCgx01X wka0Ym9ZJ4aUEOfh60INEVk= =JMD9 -----END PGP SIGNATURE----- --nextPart2770971.jjmrBfEZcM-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 16:18:49 2006 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 EC99516A407 for ; Fri, 30 Jun 2006 16:18:49 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AE5A44525 for ; Fri, 30 Jun 2006 16:18:48 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id k5UGIkVO099877 for ; Fri, 30 Jun 2006 18:18:46 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id k5UGIf2A003395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 30 Jun 2006 18:18:42 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id k5UGIfxe020883 for ; Fri, 30 Jun 2006 18:18:41 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id k5UGIfxv020882 for freebsd-hackers@freebsd.org; Fri, 30 Jun 2006 18:18:41 +0200 (CEST) (envelope-from ticso) Date: Fri, 30 Jun 2006 18:18:41 +0200 From: Bernd Walter To: freebsd-hackers@freebsd.org Message-ID: <20060630161840.GU16775@cicely12.cicely.de> References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> <20060629162319.GA94921@leiferikson.flosken.lan> <20060630045937.GB97868@leiferikson.flosken.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060630045937.GB97868@leiferikson.flosken.lan> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 autolearn=ham version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on cicely12.cicely.de Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 16:18:50 -0000 On Fri, Jun 30, 2006 at 06:59:37AM +0200, Johannes Weiner wrote: > Hi, > > On Thu, Jun 29, 2006 at 07:29:16PM +0200, Matthias Andree wrote: > > No, sir. Operator precedence: assign first, and then compare, thus the > > comparison will always be true (else you'd be comparing to undefined > > values, which isn't any better). You might as well write: > > > > foo = malloc(0); > > /* make noise */ > > Ok, just for having it done: > > if (foo == (foo = some_val)) > > .. would be right to check if foo stayed the same. No? > > > There is no way to see a 0x800 return from malloc(0) as "error". > > So noone should actually use malloc(0) and check the size_t argument before > passing it, I guess. But noone should dereference something beyound malloc'ed size. The following code is broken no matter if x is 0 or anything else, you always end up accessing data beyond allocated range: foo = malloc(x); foo[x] = bar; It might be Ok not to check x when calling malloc, but is always required to check if you access something outside the malloc'ed range unless you can trust your size - in which case you wouldn't had malloc'ed zero bytes anyway. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 16:15:53 2006 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 5132816A403 for ; Fri, 30 Jun 2006 16:15:53 +0000 (UTC) (envelope-from patl+freebsd@volant.org) Received: from smtp.volant.org (gate.volant.org [207.111.218.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA0F144529 for ; Fri, 30 Jun 2006 16:15:52 +0000 (GMT) (envelope-from patl+freebsd@volant.org) Received: from adsl-065-081-071-131.sip.gnv.bellsouth.net ([65.81.71.131] helo=[172.19.1.100]) by smtp.volant.org with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34 (FreeBSD)) id 1FwLi2-0007GY-3A for freebsd-hackers@freeBSD.org; Fri, 30 Jun 2006 09:19:13 -0700 Date: Fri, 30 Jun 2006 12:15:21 -0400 From: Pat Lashley To: freebsd-hackers@freeBSD.org Message-ID: <2FCF78FADC5CAB74EF6D9405@Zelazny> In-Reply-To: <44odwbu1cu.fsf@be-well.ilk.org> References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060628212956.GI822@wombat.fafoe.narf.at> <805AA34B676EDF411B3CF548@Zelazny> <20060629165629.GA6875@britannica.bec.de> <44odwbu1cu.fsf@be-well.ilk.org> X-Mailer: Mulberry/4.0.0 (Mac OS X) MIME-Version: 1.0 X-Scan-Signature: 5c473f650f45eac5f4dc7c2a2dc1afe01d8c87bb X-Spam-User: nobody X-Spam-Score: -3.9 (---) X-Spam-Score-Int: -38 X-Spam-Report: This mail has matched the spam-filter tests listed below. See http://spamassassin.org/tag/ for details about the specific tests reported. In general, the higher the number of total points, the more likely that it actually is spam. (The 'required' number of points listed below is the arbitrary number above which the message is normally considered spam.) Content analysis details: (-3.9 points total, 5.0 required) 0.1 HTML_MESSAGE BODY: HTML included in message 0.1 HTML_FONTCOLOR_RED BODY: HTML font color is red -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.8 AWL AWL: Auto-whitelist adjustment X-Mailman-Approved-At: Fri, 30 Jun 2006 16:35:00 +0000 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 16:15:53 -0000 > I went wandering through the C Working Group archives for the heck of > it, and apparently a lot of people were confused over this, thinking > either as you did or that "unique" meant it would a value unique to > the usage of malloc(0). It's been clarified recently (and will be in > the next revision of the standard) to the meaning you understood. > > Specifically: > > If the size of the space requested is zero, the behavior is > implementation-defined: either a null pointer is returned, or the > behavior is as if the size were some nonzero value, except that > the returned pointer shall not be used to access an object. > > > But if it did actually perform a > > minimum allocation'; wouldn't it have to return a different value > > every time to maintain the free() semantics? > > I think that's another way of looking at the same confusion. If > "minimum" is zero, then using a sentinel value (as in FreeBSD) works. But the standard, as you quoted above, says 'as if the size were some NONZERO value'; so using a sentinel value is NOT standards-compliant. > Our malloc() could be easily fixed to be standards-compliant by > removing the special handling for ZEROSIZEPTR in malloc.c; then > allocations of 0 bytes will be rounded up to 16, just like all other > alloations of less than 16 bytes. However, that would lose much of > the bug-finding advantage of the current behaviour. But how often does this particular type of bug occur? If often enough, how hard would it be to make zero-sized allocations come from some special chunk of address space that is reserved to always generate a fault on access (from user space)? (And, of course, fix realloc() to recognize pointers in that range and do the right thing.) Also, under what circumstances could a zero-sized allocation fail (using our current scheme)? Is it really useful to maintain the distinction between 'failed' and 'successfully allocated no space'? Would it be better to just take the simple route of returning NULL for zero-sized allocations? > This is wandering into -standards territory, though. In any case, the > answer to thread's original question is "mozilla should fix its code > to not assume malloc(0)==NULL". Agreed. (With the usual observation that they, too, are a mainly volunteer-based project; and would probably appreciate the inclusion of a patch with the bug report. And, of course, that the original poster of this thread should file a bug report with the Mozilla project.) -Pat From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 16:31:02 2006 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 9113216A534 for ; Fri, 30 Jun 2006 16:31:02 +0000 (UTC) (envelope-from patl+freebsd@volant.org) Received: from smtp.volant.org (gate.volant.org [207.111.218.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A91543D95 for ; Fri, 30 Jun 2006 16:30:43 +0000 (GMT) (envelope-from patl+freebsd@volant.org) Received: from adsl-065-081-071-131.sip.gnv.bellsouth.net ([65.81.71.131] helo=[172.19.1.100]) by smtp.volant.org with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34 (FreeBSD)) id 1FwLwP-0007QL-Pl; Fri, 30 Jun 2006 09:34:03 -0700 Date: Fri, 30 Jun 2006 12:30:13 -0400 From: Pat Lashley To: Johannes Weiner , freebsd-hackers@freebsd.org Message-ID: <417C9B11412FF8C17A1AD483@Zelazny> In-Reply-To: <20060630045937.GB97868@leiferikson.flosken.lan> References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> <20060629162319.GA94921@leiferikson.flosken.lan> <20060630045937.GB97868@leiferikson.flosken.lan> X-Mailer: Mulberry/4.0.0 (Mac OS X) MIME-Version: 1.0 X-Scan-Signature: 976632dbfefb5aa7849fdff075a724fbc0b8d439 X-Spam-User: nobody X-Spam-Score: -4.1 (----) X-Spam-Score-Int: -40 X-Spam-Report: This mail has matched the spam-filter tests listed below. See http://spamassassin.org/tag/ for details about the specific tests reported. In general, the higher the number of total points, the more likely that it actually is spam. (The 'required' number of points listed below is the arbitrary number above which the message is normally considered spam.) Content analysis details: (-4.1 points total, 5.0 required) 0.1 HTML_MESSAGE BODY: HTML included in message 0.1 HTML_FONTCOLOR_RED BODY: HTML font color is red -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.6 AWL AWL: Auto-whitelist adjustment X-Mailman-Approved-At: Fri, 30 Jun 2006 16:35:11 +0000 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 16:31:02 -0000 > > No, sir. Operator precedence: assign first, and then compare, thus the > > comparison will always be true (else you'd be comparing to undefined > > values, which isn't any better). You might as well write: > > > > foo = malloc(0); > > /* make noise */ > > Ok, just for having it done: > > if (foo == (foo = some_val)) > > .. would be right to check if foo stayed the same. No? No. As far as I know, there is no requirement in the standard that the left side of an inequality be evaluated before the right side; or that there is any need for consistency in order of evaluation. (And even if I'm wrong and the C standard does specify evaluation order, other languages may not; so depending on it would be a bad habit to form.) > > There is no way to see a 0x800 return from malloc(0) as "error". The point is that that value is NOT an error indicator at all. (As discussed elsewhere, it isn't quite standards-compliant; since we always return the same value for malloc(0); but the malloc -did- succeed.) > So noone should actually use malloc(0) and check the size_t argument before > passing it, I guess. The error was later when they attempted to de-reference the pointer returned from the 'malloc(0)'; not in the allocation itself. BUT, that said, the safest and most portable coding practice would be: // The C standard does not require malloc(0) to return NULL; // but whatever it returns MUST NOT be dereferenced. ptr = ( size == 0 ) ? NULL : malloc( size ) ; -Pat From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 18:29:24 2006 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 5434D16A407 for ; Fri, 30 Jun 2006 18:29:24 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.swip.net [212.247.155.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDB1F43D48 for ; Fri, 30 Jun 2006 18:29:23 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from mp-217-137-172.daxnet.no ([193.217.137.172] verified) by mailfe11.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 56434127 for freebsd-hackers@freebsd.org; Fri, 30 Jun 2006 20:29:21 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Fri, 30 Jun 2006 20:29:28 +0200 User-Agent: KMail/1.7 References: <200605271102.19799.hselasky@c2i.net> <200606021556.00231.hselasky@c2i.net> <200606131939.23799.hselasky@c2i.net> In-Reply-To: <200606131939.23799.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606302029.28563.hselasky@c2i.net> Subject: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 18:29:24 -0000 Hi, I sometimes see that the USB driver is unable to allocate contiguous memory for itself. For example I noticed that FreeBSD was unable to allocate 350kbytes of contiguous memory after that I had run "konqueror", the KDE web browser and various other memory consuming applications for a while. I am thinking about pre-allocating some memory for USB, but isn't that the job of bus-dma, which the USB system uses for memory allocation? The machine in question is running FreeBSD 7-current from April. Any comments? Thanks, --HPS From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 18:29:25 2006 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 02D5B16A40F for ; Fri, 30 Jun 2006 18:29:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id C22CA43D48 for ; Fri, 30 Jun 2006 18:29:24 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.17.220]) ([10.251.17.220]) by a50.ironport.com with ESMTP; 30 Jun 2006 11:29:24 -0700 Message-ID: <44A56D84.5040401@elischer.org> Date: Fri, 30 Jun 2006 11:29:24 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anish Mistry References: <200606301213.39115.mistry.7@osu.edu> In-Reply-To: <200606301213.39115.mistry.7@osu.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, "Kamal R. Prasad" Subject: Re: freebsd port onto IBM/Lenovo T 40 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, 30 Jun 2006 18:29:25 -0000 Anish Mistry wrote: >On Friday 30 June 2006 04:49, Kamal R. Prasad wrote: > > >>Hello, >> >> >> [...] >http://shapeshifter.se/articles/upek_touchchip_freebsd/ > > > I'm impressed From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 19:13:29 2006 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 5B05D16A55F for ; Fri, 30 Jun 2006 19:13:29 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACF23443C6 for ; Fri, 30 Jun 2006 18:56:00 +0000 (GMT) (envelope-from kip.macy@gmail.com) Received: by nz-out-0102.google.com with SMTP id x3so71629nzd for ; Fri, 30 Jun 2006 11:56: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:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TMgILmt2Jns/cEcxkZWVqEgvN4fomUVHZgrnd4ixE4IVHiT90sJ4aFKLdo/5P+AAcClwpGFxkltF1m6VmWosARacvuWSRfKPxTaNje1dHovpL4ODHXfLtotC4VCqExrYkioDNNQknoTuY6g5YduY3Rgg3n+IZyjWUv37Ov9LmLw= Received: by 10.65.177.8 with SMTP id e8mr1374408qbp; Fri, 30 Jun 2006 11:56:00 -0700 (PDT) Received: by 10.65.225.9 with HTTP; Fri, 30 Jun 2006 11:56:00 -0700 (PDT) Message-ID: Date: Fri, 30 Jun 2006 11:56:00 -0700 From: "Kip Macy" To: "Hans Petter Selasky" In-Reply-To: <200606302029.28563.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200605271102.19799.hselasky@c2i.net> <200606021556.00231.hselasky@c2i.net> <200606131939.23799.hselasky@c2i.net> <200606302029.28563.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kmacy@fsmware.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 19:13:30 -0000 FreeBSD's strategy for doing page coloring makes contiguous memory allocation much past boot quite difficult. This will change when generalized superpage support is brought in (I hope in the near future). -Kip On 6/30/06, Hans Petter Selasky wrote: > Hi, > > I sometimes see that the USB driver is unable to allocate contiguous memory > for itself. For example I noticed that FreeBSD was unable to allocate > 350kbytes of contiguous memory after that I had run "konqueror", the KDE web > browser and various other memory consuming applications for a while. > > I am thinking about pre-allocating some memory for USB, but isn't that the job > of bus-dma, which the USB system uses for memory allocation? > > The machine in question is running FreeBSD 7-current from April. > > Any comments? > > Thanks, > --HPS > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 20:32:35 2006 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 7DE6E16A49E for ; Fri, 30 Jun 2006 20:32:35 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail29.syd.optusnet.com.au (mail29.syd.optusnet.com.au [211.29.132.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 929E944314 for ; Fri, 30 Jun 2006 20:32:34 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail29.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k5UKWRjv017470 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 1 Jul 2006 06:32:27 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k5UKWQhZ008393; Sat, 1 Jul 2006 06:32:26 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k5UKWQjl008392; Sat, 1 Jul 2006 06:32:26 +1000 (EST) (envelope-from peter) Date: Sat, 1 Jul 2006 06:32:26 +1000 From: Peter Jeremy To: Hans Petter Selasky Message-ID: <20060630203226.GG734@turion.vk2pj.dyndns.org> References: <200605271102.19799.hselasky@c2i.net> <200606021556.00231.hselasky@c2i.net> <200606131939.23799.hselasky@c2i.net> <200606302029.28563.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Yia77v5a8fyVHJSl" Content-Disposition: inline In-Reply-To: <200606302029.28563.hselasky@c2i.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 20:32:35 -0000 --Yia77v5a8fyVHJSl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, 2006-Jun-30 20:29:28 +0200, Hans Petter Selasky wrote: >I sometimes see that the USB driver is unable to allocate contiguous memor= y=20 >for itself. For example I noticed that FreeBSD was unable to allocate=20 >350kbytes of contiguous memory after that I had run "konqueror", the KDE w= eb=20 >browser and various other memory consuming applications for a while. I reported this about 18 months ago and I'm fairly certain you even contributed to the thread at the time. >Any comments? The latest concensus seems to be that the USB system should make use of the scatter-gather facilities in the hardware to avoid the need to allocate large contiguous memory chunks. iedowse@ had mostly finished implementing this in mid May. --=20 Peter Jeremy --Yia77v5a8fyVHJSl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEpYpZ/opHv/APuIcRAjxVAKCTqQ0w/BhWCkGJ2Xg5fZE/MyALswCcDxw2 9FmvK4D82NGvlcZj1JE9+ng= =DFrr -----END PGP SIGNATURE----- --Yia77v5a8fyVHJSl-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 20:41:33 2006 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 0D9D416A573 for ; Fri, 30 Jun 2006 20:41:33 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FC7743EC7 for ; Fri, 30 Jun 2006 20:40:45 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by mail.ambrisko.com with ESMTP; 30 Jun 2006 13:39:11 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.13.1/8.12.11) with ESMTP id k5UKejIO037167; Fri, 30 Jun 2006 13:40:45 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.13.1/8.13.1/Submit) id k5UKei1D037166; Fri, 30 Jun 2006 13:40:44 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200606302040.k5UKei1D037166@ambrisko.com> In-Reply-To: To: kmacy@fsmware.com Date: Fri, 30 Jun 2006 13:40:44 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: freebsd-hackers@freebsd.org, Oleksandr Tymoshenko , Christian Zander Subject: Re: NVIDIA FreeBSD kernel feature requests 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, 30 Jun 2006 20:41:33 -0000 Kip Macy writes: | IIRC lack of per instance cdevs also limits Freebsd to one vmware instance. Really? Don't tell my vmware multiple instances! I used to run 10 on one FreeBSD host. Doug A. From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 00:47:14 2006 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 7A0E916A4DF for ; Sat, 1 Jul 2006 00:47:14 +0000 (UTC) (envelope-from jml@oksidizer.com) Received: from smtp2.net2000.ch (smtp2.net2000.ch [80.83.47.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01A7644241 for ; Sat, 1 Jul 2006 00:26:38 +0000 (GMT) (envelope-from jml@oksidizer.com) Received: from s2003 (client83-68-195-84.abo.net2000.ch [83.68.195.84]) by smtp2.net2000.ch (Postfix) with ESMTP id C365167267 for ; Sat, 1 Jul 2006 02:26:34 +0200 (CEST) From: "Jean-Marc Lienher" To: Date: Sat, 1 Jul 2006 02:26:35 +0200 Message-ID: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2663 thread-index: AcacpQK3mvwpThFLTNOV3BtDjE9UYQ== Subject: Alternative compiler toolchain ? 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, 01 Jul 2006 00:47:14 -0000 Hi all, I'm new to FreeBSD, I was using Linux since 1997. But I decided to switch to the Daemon and leave the Penguin on his Iceberg. (Yes, for those who are reading the hidden e-mail headers, I'm also using MS-Windows :-) After a (too?) quick look at the FreeBSD source code, I've seen that the GNU compiler toolchain was used to compile the kernel and other part of the OS. I would like to know if there is another compiler toolchain (C compiler, assembler and linker) which is able to build the i386 FreeBSD and which is released under the BSD, MIT or any other non-viral license ? I've found some other compilers on the web: http://fabrice.bellard.free.fr/tcc/ (LGPL) http://www.cs.princeton.edu/software/lcc/ (Free for personal use) http://tack.sourceforge.net/ (BSD) The last one, ACK (the Minix compiler), is released under a good license. Does somebody have ever tried to compile FreeBSD with it ? Thanks, Jean-Marc Lienher +---------------------------------+ + | oKsiDiZer Software & Electronic | | http://www.oksidizer.com | +---------------------------------+ + From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 01:16:40 2006 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 EC37716A403 for ; Sat, 1 Jul 2006 01:16:40 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75EB543D53 for ; Sat, 1 Jul 2006 01:16:40 +0000 (GMT) (envelope-from kip.macy@gmail.com) Received: by wr-out-0506.google.com with SMTP id 55so133905wri for ; Fri, 30 Jun 2006 18:16:39 -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=INmI78rP6nWdq56ykNcgla2ugNEyK8BvJp946GVYpFnqZwnx7e7LBPg9k+R1dkWV87Fx4gWppsRn65xp827YWryzDGDs2zrHPNzLHw5g4y1UYi9YhpURg/sarRxnPYOAWBg53/CogkT46c1wIMMEjdpbBBsa7cIWYsyoJvOdKYU= Received: by 10.65.95.9 with SMTP id x9mr1688540qbl; Fri, 30 Jun 2006 18:16:39 -0700 (PDT) Received: by 10.65.225.9 with HTTP; Fri, 30 Jun 2006 18:16:39 -0700 (PDT) Message-ID: Date: Fri, 30 Jun 2006 18:16:39 -0700 From: "Kip Macy" To: "Doug Ambrisko" In-Reply-To: <200606302040.k5UKei1D037166@ambrisko.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200606302040.k5UKei1D037166@ambrisko.com> Cc: freebsd-hackers@freebsd.org, Oleksandr Tymoshenko , Christian Zander Subject: Re: NVIDIA FreeBSD kernel feature requests X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kmacy@fsmware.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 01:16:41 -0000 WOW THATS GREAT DOUG! \0/ - it didn't work for me. -Kip On 6/30/06, Doug Ambrisko wrote: > Kip Macy writes: > | IIRC lack of per instance cdevs also limits Freebsd to one vmware instance. > > Really? Don't tell my vmware multiple instances! I used to run 10 on > one FreeBSD host. > > Doug A. > From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 01:57:32 2006 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 082DF16A494 for ; Sat, 1 Jul 2006 01:57:32 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80AC343D45 for ; Sat, 1 Jul 2006 01:57:31 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.13.7/8.13.7) with ESMTP id k611vKlB005857; Fri, 30 Jun 2006 18:57:20 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.7/8.13.7/Submit) id k611vJ6Y005856; Fri, 30 Jun 2006 18:57:19 -0700 (PDT) (envelope-from sgk) Date: Fri, 30 Jun 2006 18:57:19 -0700 From: Steve Kargl To: Jean-Marc Lienher Message-ID: <20060701015719.GA5842@troutmask.apl.washington.edu> References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 01:57:32 -0000 On Sat, Jul 01, 2006 at 02:26:35AM +0200, Jean-Marc Lienher wrote: > > After a (too?) quick look at the FreeBSD source code, I've seen that > the GNU compiler toolchain was used to compile the kernel and other > part of the OS. > > I would like to know if there is another compiler toolchain > (C compiler, assembler and linker) which is able to build the i386 > FreeBSD and which is released under the BSD, MIT or any other > non-viral license ? The only thing that might come close to your criteria is ten15. -- Steve From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 02:10:06 2006 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 BC3FA16A4D4 for ; Sat, 1 Jul 2006 02:10:06 +0000 (UTC) (envelope-from agh@tpg.com.au) Received: from mail6.tpgi.com.au (mail6.tpgi.com.au [203.12.160.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2795F44354 for ; Sat, 1 Jul 2006 01:45:13 +0000 (GMT) (envelope-from agh@tpg.com.au) X-TPG-Antivirus: Passed Received: from localhost.madcat (220-244-72-6.static.tpgi.com.au [220.244.72.6]) by mail6.tpgi.com.au (envelope-from agh@tpg.com.au) (8.13.6/8.13.6) with ESMTP id k611itlF022783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Jul 2006 11:45:10 +1000 From: "Alastair G. Hogge" To: freebsd-hackers@freebsd.org Date: Sat, 1 Jul 2006 11:46:41 +1000 User-Agent: KMail/1.9.3 References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> In-Reply-To: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607011146.41418.agh@tpg.com.au> Cc: Jean-Marc Lienher Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 02:10:06 -0000 On Saturday 01 July 2006 10:26, Jean-Marc Lienher wrote: > Hi all, G'Day, > I'm new to FreeBSD, I was using Linux since 1997. > But I decided to switch to the Daemon and leave the Penguin on > his Iceberg. > (Yes, for those who are reading the hidden e-mail headers, > I'm also using MS-Windows :-) Welcome aboard then. (Yes, for those who are reading the hidden e-mail headers, I'm also using Krappy^H^H^H^H^H Kmail :-) > After a (too?) quick look at the FreeBSD source code, I've seen that > the GNU compiler toolchain was used to compile the kernel and other > part of the OS. As I understand it, GCC provided very good optimization code for an open-source project plus it is supported a $%@ load of platforms. > I would like to know if there is another compiler toolchain > (C compiler, assembler and linker) which is able to build the i386 > FreeBSD and which is released under the BSD, MIT or any other > non-viral license ? Well there's TenDRA[1]. I think someone was once working on getting it to build the base system..... [1]ten15.org or tendra.org. They are both forks of the original TenDRA project. Chatting to some friendlies in #TenDRA[2] on freenode suggests that there work is still to young to even build ELF binaries on FreeBSD. So it might have been ten15.org [2]TenDRA as in tendra.org and not ten15.org. Yes it's all !&$#*^# confusing. -Alastair From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 02:16:45 2006 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 1A59516A40F for ; Sat, 1 Jul 2006 02:16:45 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8318243D70 for ; Sat, 1 Jul 2006 02:16:44 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by mail.ambrisko.com with ESMTP; 30 Jun 2006 19:15:09 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.13.1/8.12.11) with ESMTP id k612Ghfx054705; Fri, 30 Jun 2006 19:16:43 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.13.1/8.13.1/Submit) id k612Ghah054704; Fri, 30 Jun 2006 19:16:43 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200607010216.k612Ghah054704@ambrisko.com> In-Reply-To: To: kmacy@fsmware.com Date: Fri, 30 Jun 2006 19:16:43 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: freebsd-hackers@freebsd.org, Oleksandr Tymoshenko , Christian Zander Subject: Re: NVIDIA FreeBSD kernel feature requests 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, 01 Jul 2006 02:16:45 -0000 Kip Macy writes: | WOW THATS GREAT DOUG! \0/ - it didn't work for me. This was with the last patched driver for vmware 2. I'm not sure if it every made it into the port. http://www.mindspring.com/~vsilyaev/vmware/files/changes 28 Jan 01 Version 0.99-1-0.22 Support for multiple vmware sessions Thnx to Luigi Rizzo Support for bridged and host-only networking Some fixes for -STABLE and -CURRENT Looking at the port I don't see that it's been update to 99 yet. Doug A. From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 03:50:19 2006 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 B619316A539 for ; Sat, 1 Jul 2006 03:50:19 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 371F044572 for ; Sat, 1 Jul 2006 03:21:41 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.4) id k613Ldrt078071; Fri, 30 Jun 2006 22:21:39 -0500 (CDT) (envelope-from dan) Date: Fri, 30 Jun 2006 22:21:39 -0500 From: Dan Nelson To: Jean-Marc Lienher Message-ID: <20060701032139.GB4915@dan.emsphone.com> References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> X-OS: FreeBSD 5.5-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 03:50:19 -0000 In the last episode (Jul 01), Jean-Marc Lienher said: > After a (too?) quick look at the FreeBSD source code, I've seen that > the GNU compiler toolchain was used to compile the kernel and other > part of the OS. > > I would like to know if there is another compiler toolchain (C > compiler, assembler and linker) which is able to build the i386 > FreeBSD and which is released under the BSD, MIT or any other > non-viral license ? Luckily gcc's license doesn't apply to the executables it generates :) > I've found some other compilers on the web: > http://fabrice.bellard.free.fr/tcc/ (LGPL) tcc is very fast, probably has the most modern C parser of the lot, and might even be able to build world except that the shared binaries it generates aren't able to be loaded by our rtld. It looks like tcc only emits the bare minimum to get Linux to run the executable, and I don't know enough about the ELF format to fill in the blanks. > http://www.cs.princeton.edu/software/lcc/ (Free for personal use) > http://tack.sourceforge.net/ (BSD) > > The last one, ACK (the Minix compiler), is released under a > good license. Does somebody have ever tried to compile FreeBSD > with it ? ACK can't generate executables for any modern system except Solaris, so it would have to have a lot of work done on it to be useful. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 05:15:45 2006 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 EF74216C6AD for ; Sat, 1 Jul 2006 05:14:43 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 665F643D62 for ; Sat, 1 Jul 2006 05:14:41 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: by nz-out-0102.google.com with SMTP id x7so266004nzc for ; Fri, 30 Jun 2006 22:14:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=mnU45zuuOTDN064TIGS5Q5fY/8CFBND2VH7OfPAN9Ex3I8hnb10Mnovs7AFpCpMaplTmpxPw0vSnAja6bB4sCwbrIMzwM47dV5XaBaHxYudNKqMYiYMTCgBM5tfdpnsNULDrl7pkZxFHEuXKe6n/B0VPlc8blemAcql4SFl1p6c= Received: by 10.36.18.3 with SMTP id 3mr1547743nzr; Fri, 30 Jun 2006 22:14:40 -0700 (PDT) Received: by 10.36.18.18 with HTTP; Fri, 30 Jun 2006 22:14:40 -0700 (PDT) Message-ID: Date: Sat, 1 Jul 2006 10:44:40 +0530 From: "Kamal R. Prasad" Sender: kamalpr@gmail.com To: freebsd-hackers@freebsd.org In-Reply-To: <44A56D84.5040401@elischer.org> MIME-Version: 1.0 References: <200606301213.39115.mistry.7@osu.edu> <44A56D84.5040401@elischer.org> X-Google-Sender-Auth: 5479d1e9056317d0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: freebsd port onto IBM/Lenovo T 40 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, 01 Jul 2006 05:15:46 -0000 The link points to a commercial s/w. Is there interest in getting a free driver for this? Any T40 sensor enabled laptop users run freebsd? thanks -kamal On 6/30/06, Julian Elischer wrote: > > Anish Mistry wrote: > > >On Friday 30 June 2006 04:49, Kamal R. Prasad wrote: > > > > > >>Hello, > >> > >> > >> > [...] > > >http://shapeshifter.se/articles/upek_touchchip_freebsd/ > > > > > > > I'm impressed > From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 08:05:26 2006 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 811FC16A412 for ; Sat, 1 Jul 2006 08:05:26 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D80F843D45 for ; Sat, 1 Jul 2006 08:05:24 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k6185BQL080010 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 1 Jul 2006 10:05:11 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k6185B38080009; Sat, 1 Jul 2006 10:05:11 +0200 (CEST) Date: Sat, 1 Jul 2006 10:05:11 +0200 From: Divacky Roman To: Dan Nelson Message-ID: <20060701080511.GA79946@stud.fit.vutbr.cz> References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060701032139.GB4915@dan.emsphone.com> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: freebsd-hackers@freebsd.org, Jean-Marc Lienher Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 08:05:26 -0000 On Fri, Jun 30, 2006 at 10:21:39PM -0500, Dan Nelson wrote: > In the last episode (Jul 01), Jean-Marc Lienher said: > > After a (too?) quick look at the FreeBSD source code, I've seen that > > the GNU compiler toolchain was used to compile the kernel and other > > part of the OS. > > > > I would like to know if there is another compiler toolchain (C > > compiler, assembler and linker) which is able to build the i386 > > FreeBSD and which is released under the BSD, MIT or any other > > non-viral license ? > > Luckily gcc's license doesn't apply to the executables it generates :) > > > I've found some other compilers on the web: > > http://fabrice.bellard.free.fr/tcc/ (LGPL) > > tcc is very fast, probably has the most modern C parser of the lot, and > might even be able to build world except that the shared binaries it > generates aren't able to be loaded by our rtld. It looks like tcc only > emits the bare minimum to get Linux to run the executable, and I don't > know enough about the ELF format to fill in the blanks. afaik tendra doesnt support gnu C extensions and our srcs are full of it so the only possible compilers ATM are gcc and icc From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 09:07:08 2006 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 61AEA16A55A for ; Sat, 1 Jul 2006 09:07:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AE1244087 for ; Sat, 1 Jul 2006 08:44:50 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from mp-217-38-131.daxnet.no ([193.217.38.131] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 232122932; Sat, 01 Jul 2006 10:44:48 +0200 From: Hans Petter Selasky To: Peter Jeremy Date: Sat, 1 Jul 2006 10:44:54 +0200 User-Agent: KMail/1.7 References: <200605271102.19799.hselasky@c2i.net> <200606302029.28563.hselasky@c2i.net> <20060630203226.GG734@turion.vk2pj.dyndns.org> In-Reply-To: <20060630203226.GG734@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607011044.54872.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 09:07:08 -0000 On Friday 30 June 2006 22:32, Peter Jeremy wrote: > On Fri, 2006-Jun-30 20:29:28 +0200, Hans Petter Selasky wrote: > >I sometimes see that the USB driver is unable to allocate contiguous > > memory for itself. For example I noticed that FreeBSD was unable to > > allocate 350kbytes of contiguous memory after that I had run "konqueror", > > the KDE web browser and various other memory consuming applications for a > > while. > > I reported this about 18 months ago and I'm fairly certain you even > contributed to the thread at the time. > > >Any comments? > > The latest concensus seems to be that the USB system should make use of > the scatter-gather facilities in the hardware to avoid the need to > allocate large contiguous memory chunks. iedowse@ had mostly finished > implementing this in mid May. Yes, but scatter and gather will add extra complexity to the driver, and maybe an extra memory copy in most cases. The idea is to allocate less than or equal to a page of memory, and then avoid the problem? The most important thing is to keep memory allocations of constant size. For example under my USB system, all memory is allocated at attach. There is no longer allocation and freeing of memory during usage, with a few exceptions. I was thinking I could pre-allocate 2-4MB for the USB system, then make a list of freed memory blocks, and then search this list first, before allocating new memory. Depending on how many different kinds of equipment one plugs, this should work fine. What do you think? --HPS From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 09:07:10 2006 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 CABF916A557 for ; Sat, 1 Jul 2006 09:07:10 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id F251A43E85 for ; Sat, 1 Jul 2006 08:35:51 +0000 (GMT) (envelope-from matthias.andree@gmx.de) Received: (qmail invoked by alias); 01 Jul 2006 08:35:50 -0000 Received: from p509146DC.dip0.t-ipconnect.de (EHLO m2a2.dyndns.org) [80.145.70.220] by mail.gmx.net (mp030) with SMTP; 01 Jul 2006 10:35:50 +0200 X-Authenticated: #428038 Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id C2ACD2006C2; Sat, 1 Jul 2006 10:35:48 +0200 (CEST) Received: from m2a2.dyndns.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12406-09; Sat, 1 Jul 2006 10:35:47 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 0EA46200719; Sat, 1 Jul 2006 10:35:47 +0200 (CEST) From: Matthias Andree To: Pat Lashley In-Reply-To: <417C9B11412FF8C17A1AD483@Zelazny> (Pat Lashley's message of "Fri, 30 Jun 2006 12:30:13 -0400") References: <20060628181045.GA54915@curry.mchp.siemens.de> <20060629054222.GA92895@leiferikson.flosken.lan> <20060629162319.GA94921@leiferikson.flosken.lan> <20060630045937.GB97868@leiferikson.flosken.lan> <417C9B11412FF8C17A1AD483@Zelazny> X-PGP-Key: http://home.pages.de/~mandree/keys/GPGKEY.asc Date: Sat, 01 Jul 2006 10:35:47 +0200 Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at emma.line.org X-Y-GMX-Trusted: 0 Cc: freebsd-hackers@freebsd.org, Johannes Weiner Subject: Re: Return value of malloc(0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 09:07:11 -0000 Pat Lashley writes: > BUT, that said, the safest and most portable coding practice would be: > > // The C standard does not require malloc(0) to return NULL; > // but whatever it returns MUST NOT be dereferenced. > ptr = ( size == 0 ) ? NULL : malloc( size ) ; Safest (avoiding null derefence) would instead be: ptr = malloc(size ? size : 1); BTW: // is not a valid C89 comment, but a GCC-ism. -- Matthias Andree From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 12:00:32 2006 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 29A9A16A506 for ; Sat, 1 Jul 2006 12:00:32 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3611343EA3 for ; Sat, 1 Jul 2006 12:00:06 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5DBEF.dip.t-dialin.net [84.165.219.239]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k61BqtkV038760 for ; Sat, 1 Jul 2006 13:52:56 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k61C068p066405 for ; Sat, 1 Jul 2006 14:00:06 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 1 Jul 2006 14:01:01 +0200 From: Alexander Leidinger To: freebsd-hackers@freebsd.org Message-ID: <20060701140101.1bc17686@Magellan.Leidinger.net> In-Reply-To: <20060701080511.GA79946@stud.fit.vutbr.cz> References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> <20060701080511.GA79946@stud.fit.vutbr.cz> X-Mailer: Sylpheed-Claws 2.3.1 (GTK+ 2.8.19; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Mailman-Approved-At: Sat, 01 Jul 2006 12:50:54 +0000 Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 12:00:32 -0000 Quoting Divacky Roman (Sat, 1 Jul 2006 10:05:11 +0200): > afaik tendra doesnt support gnu C extensions and our srcs are full of it > so the only possible compilers ATM are gcc and icc No version of icc successfully build the world. Some versions were able to build the kernel, but there was some regression since then. Aside from this, nobody invested time so far to port the recent icc version. Bye, Alexander. -- BOFH excuse #16: somebody was calculating pi on the server http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 13:17:06 2006 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 D2FF316A551 for ; Sat, 1 Jul 2006 13:17:06 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11CCC44780 for ; Sat, 1 Jul 2006 12:54:19 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by ug-out-1314.google.com with SMTP id e2so475523ugf for ; Sat, 01 Jul 2006 05:54:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qpQ+TEnqusBhyYpnQGhF0WZpbCm4EDXEbPpCPW6P8Zr3D2sJ2PWAtnXfVnfDz5UFWnCjjk47mSz/NnKTtx2ReJtriQrcsrr7BUo/JiCKEZYNJb96oOGB13eXrtV2RdL86oiEVefOcXlBVyeRX52uMZ01HvnMqyyUF/4ZmHJ5H5I= Received: by 10.78.160.2 with SMTP id i2mr417813hue; Sat, 01 Jul 2006 05:54:18 -0700 (PDT) Received: by 10.78.50.15 with HTTP; Sat, 1 Jul 2006 05:54:18 -0700 (PDT) Message-ID: <84dead720607010554w3ecc8618xb8ede50ac3fba29d@mail.gmail.com> Date: Sat, 1 Jul 2006 18:24:18 +0530 From: "Joseph Koshy" To: "Dan Nelson" In-Reply-To: <20060701032139.GB4915@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> Cc: freebsd-hackers@freebsd.org, Jean-Marc Lienher Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 13:17:06 -0000 jml> I've found some other compilers on the web: jml> http://fabrice.bellard.free.fr/tcc/ (LGPL) dn> tcc is very fast, probably has the most modern C parser of dn> the lot, and might even be able to build world except that dn> the shared binaries it generates aren't able to be loaded dn> by our rtld. It looks like tcc only emits the bare dn> minimum to get Linux to run the executable, and I don't dn> know enough about the ELF format to fill in the blanks. Other bugs with tcc on FreeBSD: - tcc generated executables are missing an entry in their ELF program-header table and so do not execute directly. You can work around this by using the base system ld for the final link step. - Someone reported that a few of our headers don't compile with tcc. I haven't tracked down whether this is on account of an unsupported Gcc'ism in the header or whether this is a bug in tcc. -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 13:31:09 2006 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 57BC716A40F for ; Sat, 1 Jul 2006 13:31:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swip.net [212.247.155.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B76843D64 for ; Sat, 1 Jul 2006 13:31:06 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from mp-217-132-211.daxnet.no ([193.217.132.211] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 56717174; Sat, 01 Jul 2006 15:31:04 +0200 From: Hans Petter Selasky To: Peter Jeremy Date: Sat, 1 Jul 2006 15:31:10 +0200 User-Agent: KMail/1.7 References: <200605271102.19799.hselasky@c2i.net> <200607011044.54872.hselasky@c2i.net> <20060701123444.GD8447@turion.vk2pj.dyndns.org> In-Reply-To: <20060701123444.GD8447@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607011531.11061.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 13:31:09 -0000 On Saturday 01 July 2006 14:34, Peter Jeremy wrote: > On Sat, 2006-Jul-01 10:44:54 +0200, Hans Petter Selasky wrote: > >Yes, but scatter and gather will add extra complexity to the driver, and > > maybe an extra memory copy in most cases. The idea is to allocate less > > than or equal to a page of memory, and then avoid the problem? > > The idea is to allocate multiple disjoint pages of physical memory. > The USB hardware is capable of supporting this and page translation > hides the lack of contiguousness from userland. I don't see why > additional memory copies would be required. Because most USB device drivers depend on a contigous buffer. In your case one would have to implement something similar to "uiomove()" for copying, that will do the scatter and gathering ? > >The most important thing is to keep memory allocations of constant size. > > For example under my USB system, all memory is allocated at attach. There > > is no longer allocation and freeing of memory during usage, with a few > > exceptions. > > Are you talking about USB device attach - which could happen at any > time whilst the system is running - or USB bus attach? I am talking about the USB device attach. > > >I was thinking I could pre-allocate 2-4MB for the USB system, then make a > >list of freed memory blocks, and then search this list first, before > >allocating new memory. > > That strikes me as wasteful. Currently, umass needs something like > 64K (or maybe 128K) and ulpt needs a few KB (they are the only USB > devices I normally use). I would be surprised if the peak USB RAM > requirement was more than 256K for most people. Yes, but don't forget high-speed USB transfers. They require larger buffers. For example 1024 bytes for ULPT is too little. The interrupt rate will be so high, that it is unrealistic to transfer 20MB/s using 1024 byte interrupts. My rewritten ULPT now uses "2*(1<<17)" buffers. > "vmstat -m" on my > systems shows that the current biggest consumer is devbuf - with > 3-4MB. Most other consumers are orders of magnitude smaller than this > (though my video capture card grabs about 4MB RAM when it's in use). --HPS From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 13:33:50 2006 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 1D48116A47E for ; Sat, 1 Jul 2006 13:33:50 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id B88F044B70 for ; Sat, 1 Jul 2006 13:02:21 +0000 (GMT) (envelope-from matthias.andree@gmx.de) Received: (qmail invoked by alias); 01 Jul 2006 13:02:20 -0000 Received: from p509146DC.dip0.t-ipconnect.de (EHLO m2a2.dyndns.org) [80.145.70.220] by mail.gmx.net (mp032) with SMTP; 01 Jul 2006 15:02:20 +0200 X-Authenticated: #428038 Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id 8FDB6200701; Sat, 1 Jul 2006 15:02:18 +0200 (CEST) Received: from m2a2.dyndns.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25510-03; Sat, 1 Jul 2006 15:02:16 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id B57FB200950; Sat, 1 Jul 2006 15:02:16 +0200 (CEST) From: Matthias Andree To: Dan Nelson In-Reply-To: <20060701032139.GB4915@dan.emsphone.com> (Dan Nelson's message of "Fri, 30 Jun 2006 22:21:39 -0500") References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> X-PGP-Key: http://home.pages.de/~mandree/keys/GPGKEY.asc Date: Sat, 01 Jul 2006 15:02:16 +0200 Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at emma.line.org X-Y-GMX-Trusted: 0 Cc: freebsd-hackers@freebsd.org, Jean-Marc Lienher Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 13:33:50 -0000 Dan Nelson writes: > In the last episode (Jul 01), Jean-Marc Lienher said: > >> I've found some other compilers on the web: >> http://fabrice.bellard.free.fr/tcc/ (LGPL) > > tcc is very fast, probably has the most modern C parser of the lot, and > might even be able to build world except that the shared binaries it > generates aren't able to be loaded by our rtld. It looks like tcc only > emits the bare minimum to get Linux to run the executable, and I don't > know enough about the ELF format to fill in the blanks. I never managed to get tcc compiled stuff (GNU libc or dietlibc) to run under Linux, but haven't pursued the issue beyond that point. -- Matthias Andree From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 13:36:05 2006 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 787D916A4D2 for ; Sat, 1 Jul 2006 13:36:05 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail32.syd.optusnet.com.au (mail32.syd.optusnet.com.au [211.29.132.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7F0844369 for ; Sat, 1 Jul 2006 12:34:57 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail32.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k61CYj30019904 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 1 Jul 2006 22:34:45 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k61CYj4v011069; Sat, 1 Jul 2006 22:34:45 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k61CYio1011068; Sat, 1 Jul 2006 22:34:44 +1000 (EST) (envelope-from peter) Date: Sat, 1 Jul 2006 22:34:44 +1000 From: Peter Jeremy To: Hans Petter Selasky Message-ID: <20060701123444.GD8447@turion.vk2pj.dyndns.org> References: <200605271102.19799.hselasky@c2i.net> <200606302029.28563.hselasky@c2i.net> <20060630203226.GG734@turion.vk2pj.dyndns.org> <200607011044.54872.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uxuisgdDHaNETlh8" Content-Disposition: inline In-Reply-To: <200607011044.54872.hselasky@c2i.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 13:36:05 -0000 --uxuisgdDHaNETlh8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, 2006-Jul-01 10:44:54 +0200, Hans Petter Selasky wrote: >Yes, but scatter and gather will add extra complexity to the driver, and m= aybe >an extra memory copy in most cases. The idea is to allocate less than or= =20 >equal to a page of memory, and then avoid the problem? The idea is to allocate multiple disjoint pages of physical memory. The USB hardware is capable of supporting this and page translation hides the lack of contiguousness from userland. I don't see why additional memory copies would be required. >The most important thing is to keep memory allocations of constant size. F= or=20 >example under my USB system, all memory is allocated at attach. There is n= o=20 >longer allocation and freeing of memory during usage, with a few exception= s.=20 Are you talking about USB device attach - which could happen at any time whilst the system is running - or USB bus attach? >I was thinking I could pre-allocate 2-4MB for the USB system, then make a= =20 >list of freed memory blocks, and then search this list first, before=20 >allocating new memory. That strikes me as wasteful. Currently, umass needs something like 64K (or maybe 128K) and ulpt needs a few KB (they are the only USB devices I normally use). I would be surprised if the peak USB RAM requirement was more than 256K for most people. "vmstat -m" on my systems shows that the current biggest consumer is devbuf - with 3-4MB. Most other consumers are orders of magnitude smaller than this (though my video capture card grabs about 4MB RAM when it's in use). --=20 Peter Jeremy --uxuisgdDHaNETlh8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEpmvj/opHv/APuIcRAryCAJ9Y/Xk3IMRd1KWxs1/hJivW5Cv54wCgn79C vGZ0NLw5uDP+8ZLkBaNWZ5k= =0mb4 -----END PGP SIGNATURE----- --uxuisgdDHaNETlh8-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 14:24:29 2006 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 CA9FD16A416 for ; Sat, 1 Jul 2006 14:24:29 +0000 (UTC) (envelope-from thierry@herbelot.com) Received: from smtp2-g19.free.fr (smtp2-g19.free.fr [212.27.42.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A17443D53 for ; Sat, 1 Jul 2006 14:24:28 +0000 (GMT) (envelope-from thierry@herbelot.com) Received: from herbelot.dyndns.org (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp2-g19.free.fr (Postfix) with ESMTP id 4CA3A75831 for ; Sat, 1 Jul 2006 16:24:27 +0200 (CEST) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by herbelot.dyndns.org (8.13.3/8.13.3) with ESMTP id k61EOFs6016308; Sat, 1 Jul 2006 16:24:16 +0200 (CEST) From: Thierry Herbelot To: freebsd-hackers@freebsd.org Date: Sat, 1 Jul 2006 16:24:07 +0200 User-Agent: KMail/1.9.3 References: <200605271102.19799.hselasky@c2i.net> <20060701123444.GD8447@turion.vk2pj.dyndns.org> <200607011531.11061.hselasky@c2i.net> In-Reply-To: <200607011531.11061.hselasky@c2i.net> X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200607011624.08249.thierry@herbelot.com> X-Mailman-Approved-At: Sat, 01 Jul 2006 14:42:28 +0000 Cc: Hans Petter Selasky Subject: High-speed transfers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: thierry@herbelot.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 14:24:29 -0000 Le Saturday 1 July 2006 15:31, Hans Petter Selasky a écrit : > > Yes, but don't forget high-speed USB transfers. They require larger > buffers. For example 1024 bytes for ULPT is too little. The interrupt rate > will be so high, that it is unrealistic to transfer 20MB/s using 1024 byte > interrupts. My rewritten ULPT now uses "2*(1<<17)" buffers. > Hello, I wonder what kind of speed you are getting : I would like to see improvements for reads (and writes) on standard endpoints, without having to resort to writing specific drivers (using ugen on the standard FreeBSD USB stack). One goal would be to achieve something like 25 to 30 Mbytes/s, sustained, (finally getting to some interesting fraction of the peak USB2 data rate). TfH PS : from experience, 300Mbps can be sustained on a decent PC, using for example Suse 10.1 (but don't try with an ATI southbridge : they suck) From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 15:31:03 2006 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 EFCE216A407 for ; Sat, 1 Jul 2006 15:31:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swip.net [212.247.155.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA99344245 for ; Sat, 1 Jul 2006 15:07:12 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from mp-216-87-87.daxnet.no ([193.216.87.87] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 56686289; Sat, 01 Jul 2006 17:07:10 +0200 From: Hans Petter Selasky To: thierry@herbelot.com Date: Sat, 1 Jul 2006 17:07:16 +0200 User-Agent: KMail/1.7 References: <200605271102.19799.hselasky@c2i.net> <200607011531.11061.hselasky@c2i.net> <200607011624.08249.thierry@herbelot.com> In-Reply-To: <200607011624.08249.thierry@herbelot.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200607011707.17055.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: High-speed transfers 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, 01 Jul 2006 15:31:04 -0000 On Saturday 01 July 2006 16:24, Thierry Herbelot wrote: > Le Saturday 1 July 2006 15:31, Hans Petter Selasky a =E9crit : > > Yes, but don't forget high-speed USB transfers. They require larger > > buffers. For example 1024 bytes for ULPT is too little. The interrupt > > rate will be so high, that it is unrealistic to transfer 20MB/s using > > 1024 byte interrupts. My rewritten ULPT now uses "2*(1<<17)" buffers. > > Hello, > > I wonder what kind of speed you are getting=20 It depends much on the equipment you are using. For example I have a Brothe= r=20 USB 2.0, Laser Printer, postscript compatible, and if I were to guess, it=20 eats something like 1MB/s. On the other hand I tested with an external USB= =20 2.0, 2.5" IDE adapter, and it transfers around 20MB/s. > : I would like to see improvements for reads (and writes) on=20 > standard endpoints, without having to resort to writing specific=20 > drivers (using ugen on the standard FreeBSD USB stack). > > One goal would be to achieve something like 25 to 30 Mbytes/s, sustained, > (finally getting to some interesting fraction of the peak USB2 data rate). I don't think that will be a problem, as long as you use large enough buffe= rs.=20 A buffer of 1/50 th of the transfer rate should suffice, from my experience. =2D-HPS From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 17:50:11 2006 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 40AF816A40F for ; Sat, 1 Jul 2006 17:50:11 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB20743D5C for ; Sat, 1 Jul 2006 17:50:10 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: by wx-out-0102.google.com with SMTP id h30so361920wxd for ; Sat, 01 Jul 2006 10:50:09 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Yf3ZNGgCV+cuIKLikGv+bHAHMkqW+1OnFTEDyaYeOUhuQpRFdnmYUXwnAwfQel1IIy5m7r45JncYOiKRRo73RoBNscds9+1oaNiuM/D5EXrmMOZSWB6B5kv+hXfIQjALvB/L9px+2Iqmeme7A/An2lErcjtmqtgFDkIrR+uicc0= Received: by 10.70.53.3 with SMTP id b3mr2753780wxa; Sat, 01 Jul 2006 10:50:09 -0700 (PDT) Received: by 10.70.73.12 with HTTP; Sat, 1 Jul 2006 10:50:08 -0700 (PDT) Message-ID: <319cceca0607011050j46e184d9w427d8ef8a8ac7373@mail.gmail.com> Date: Sat, 1 Jul 2006 20:50:08 +0300 From: Maslan To: "Matthias Andree" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> Cc: freebsd-hackers@freebsd.org, Jean-Marc Lienher , Dan Nelson Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 17:50:11 -0000 There is also NwCC under BSDL but it still not as mature as gcc http://nwcc.sf.net -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 18:01:52 2006 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 3864016A403 for ; Sat, 1 Jul 2006 18:01:52 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD84743D67 for ; Sat, 1 Jul 2006 18:01:51 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id i26so384607wxd for ; Sat, 01 Jul 2006 11:01:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=oOyPCKZWItzDPs/WyAoe7TDfRVw1vMtf7kkDk9wV8+Ruc3yWylDPgonXGjhga4B2UMz1B05Oc4FhP6lki0ZkVSv8D0ELzJhsT/uZ1db4MarRnrNgiESDQUseZHuG/Vu4GufbQi/5ZfRV1OH+WwnrWdYIreqtdrTqpu6mP5qO+mo= Received: by 10.70.26.17 with SMTP id 17mr2767409wxz; Sat, 01 Jul 2006 11:01:50 -0700 (PDT) Received: by 10.70.11.15 with HTTP; Sat, 1 Jul 2006 11:01:50 -0700 (PDT) Message-ID: <3bbf2fe10607011101wc3f5b73i1b7f598517ba3a12@mail.gmail.com> Date: Sat, 1 Jul 2006 20:01:50 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Divacky Roman" In-Reply-To: <20060701080511.GA79946@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> <20060701080511.GA79946@stud.fit.vutbr.cz> X-Google-Sender-Auth: b59cef7a079b0f64 Cc: freebsd-hackers@freebsd.org Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 18:01:52 -0000 2006/7/1, Divacky Roman : > > afaik tendra doesnt support gnu C extensions and our srcs are full of it > so the only possible compilers ATM are gcc and icc That's not completely true. A lot of GCC stubs are masked through macros, so, with a little work on it, you can successful optimize the code, if your compiler has the same (or partial) supports. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 19:16:42 2006 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 5F0FD16A407; Sat, 1 Jul 2006 19:16:42 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5CC343D45; Sat, 1 Jul 2006 19:16:41 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.183.208] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1FwkxM1WCj-0003JA; Sat, 01 Jul 2006 21:16:40 +0200 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sat, 1 Jul 2006 21:16:09 +0200 User-Agent: KMail/1.9.1 References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701080511.GA79946@stud.fit.vutbr.cz> <3bbf2fe10607011101wc3f5b73i1b7f598517ba3a12@mail.gmail.com> In-Reply-To: <3bbf2fe10607011101wc3f5b73i1b7f598517ba3a12@mail.gmail.com> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8944734.ZhXnMDZBo0"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200607012116.34451.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Attilio Rao , Divacky Roman Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 19:16:42 -0000 --nextPart8944734.ZhXnMDZBo0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 01 July 2006 20:01, Attilio Rao wrote: > 2006/7/1, Divacky Roman : > > afaik tendra doesnt support gnu C extensions and our srcs are full of it > > so the only possible compilers ATM are gcc and icc > > That's not completely true. > A lot of GCC stubs are masked through macros, so, with a little work > on it, you can successful optimize the code, if your compiler has the > same (or partial) supports. afaik __asm is the most interesting feature that is missing from ten15's=20 tendra which keeps us from using it for kernel compiling. As I understand= =20 this is mostly due to tendra's way of constructing objects: It translates t= o=20 a machine independent intermediate language where it does all the=20 optimisations and only thereafter "installs" - in tendra speak - to the=20 target architecture. This is quite nice for cross builds as you can do the= =20 expensive first pass on fast hardware and do the "installation" on the=20 target. It has the downside for __asm and the like. I might be all wrong, though. =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 --nextPart8944734.ZhXnMDZBo0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQBEpsoSXyyEoT62BG0RAuGQAJ9gjmDQCa6a5IpGB3eT6vs/cY5cPgCfbowy EmCiRPhMwkIPxS/b7IOYv+Y= =EKna -----END PGP SIGNATURE----- --nextPart8944734.ZhXnMDZBo0-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 22:38:30 2006 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 82A0616A412 for ; Sat, 1 Jul 2006 22:38:30 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA93F43DC5 for ; Sat, 1 Jul 2006 22:38:21 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.13.7/8.13.7) with ESMTP id k61Mc0MI010894; Sat, 1 Jul 2006 15:38:00 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.7/8.13.7/Submit) id k61MbtoR010893; Sat, 1 Jul 2006 15:37:55 -0700 (PDT) (envelope-from sgk) Date: Sat, 1 Jul 2006 15:37:55 -0700 From: Steve Kargl To: Maslan Message-ID: <20060701223755.GA10881@troutmask.apl.washington.edu> References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> <319cceca0607011050j46e184d9w427d8ef8a8ac7373@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <319cceca0607011050j46e184d9w427d8ef8a8ac7373@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org, Matthias Andree , Dan Nelson , Jean-Marc Lienher Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 22:38:30 -0000 On Sat, Jul 01, 2006 at 08:50:08PM +0300, Maslan wrote: > There is also NwCC under BSDL but it still not as mature as gcc > http://nwcc.sf.net > "not as mature as gcc" is an amazing understatement. nwcc has no floating point support. -- Steve From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 22:43:39 2006 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 37A1216A412 for ; Sat, 1 Jul 2006 22:43:39 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id C572A43D45 for ; Sat, 1 Jul 2006 22:43:38 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id 0629D35707 for ; Sun, 2 Jul 2006 00:43:33 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1000) id C4A616CA3B; Sun, 2 Jul 2006 00:43:24 +0200 (CEST) Date: Sun, 2 Jul 2006 00:43:24 +0200 From: joerg@britannica.bec.de To: freebsd-hackers@freebsd.org Message-ID: <20060701224324.GA17057@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> <319cceca0607011050j46e184d9w427d8ef8a8ac7373@mail.gmail.com> <20060701223755.GA10881@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060701223755.GA10881@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.11 Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 22:43:39 -0000 On Sat, Jul 01, 2006 at 03:37:55PM -0700, Steve Kargl wrote: > On Sat, Jul 01, 2006 at 08:50:08PM +0300, Maslan wrote: > > There is also NwCC under BSDL but it still not as mature as gcc > > http://nwcc.sf.net > > > > "not as mature as gcc" is an amazing understatement. nwcc has > no floating point support. Makes it ideal for the kernel, I'd say :-) Joerg From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 23:17:04 2006 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 58E9716A509 for ; Sat, 1 Jul 2006 23:17:04 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id B18EE456D8 for ; Sat, 1 Jul 2006 22:59:46 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.13.7/8.13.7) with ESMTP id k61MxRhk011006 for ; Sat, 1 Jul 2006 15:59:27 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.7/8.13.7/Submit) id k61MxRjl011005 for freebsd-hackers@freebsd.org; Sat, 1 Jul 2006 15:59:27 -0700 (PDT) (envelope-from sgk) Date: Sat, 1 Jul 2006 15:59:27 -0700 From: Steve Kargl To: freebsd-hackers@freebsd.org Message-ID: <20060701225927.GA10964@troutmask.apl.washington.edu> References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> <319cceca0607011050j46e184d9w427d8ef8a8ac7373@mail.gmail.com> <20060701223755.GA10881@troutmask.apl.washington.edu> <20060701224324.GA17057@britannica.bec.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060701224324.GA17057@britannica.bec.de> User-Agent: Mutt/1.4.2.1i Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 23:17:04 -0000 On Sun, Jul 02, 2006 at 12:43:24AM +0200, joerg@britannica.bec.de wrote: > On Sat, Jul 01, 2006 at 03:37:55PM -0700, Steve Kargl wrote: > > On Sat, Jul 01, 2006 at 08:50:08PM +0300, Maslan wrote: > > > There is also NwCC under BSDL but it still not as mature as gcc > > > http://nwcc.sf.net > > > > > > > "not as mature as gcc" is an amazing understatement. nwcc has > > no floating point support. > > Makes it ideal for the kernel, I'd say :-) > It depends. If nwcc has no knowledge of floating point registers, then the optimized npx bzero and copyin/copyout operations aren't available. Nothing like a slow kernel. It is also noted on the nwcc webpage that it does not support bitfields. Are bitfields absent from the kernel. Additionally, the OP wants a toolchain to replace gcc. FreeBSD is more than a kernel. -- Steve From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 1 23:50:23 2006 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 A121216A529 for ; Sat, 1 Jul 2006 23:50:23 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 165764579E for ; Sat, 1 Jul 2006 23:29:03 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id h30so380156wxd for ; Sat, 01 Jul 2006 16:29:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Fr4bsEySdMto5y5deD7wYDRYPiACMTnWJA0U9QPESKqzTmQnoSq2Or4fR9RlBLgooSsbSb/sVqbo7FlLAn3nvomqBjMHcCG+J1ibSh4dS0COS5Be/CWlm48JumfB/BUtLoboXlh8nCVhD1iIm6nl/M4RhhXdXoO3tAULYcJ205U= Received: by 10.70.116.11 with SMTP id o11mr3125008wxc; Sat, 01 Jul 2006 16:29:02 -0700 (PDT) Received: by 10.70.11.15 with HTTP; Sat, 1 Jul 2006 16:29:02 -0700 (PDT) Message-ID: <3bbf2fe10607011629y4ef82123y744a681a1d03b722@mail.gmail.com> Date: Sun, 2 Jul 2006 01:29:02 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Steve Kargl" In-Reply-To: <20060701225927.GA10964@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <000f01c69ca5$02fa8ff0$6400a8c0@s2003> <20060701032139.GB4915@dan.emsphone.com> <319cceca0607011050j46e184d9w427d8ef8a8ac7373@mail.gmail.com> <20060701223755.GA10881@troutmask.apl.washington.edu> <20060701224324.GA17057@britannica.bec.de> <20060701225927.GA10964@troutmask.apl.washington.edu> X-Google-Sender-Auth: b2495f7b62da62da Cc: freebsd-hackers@freebsd.org Subject: Re: Alternative compiler toolchain ? 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, 01 Jul 2006 23:50:23 -0000 2006/7/2, Steve Kargl : > > It depends. If nwcc has no knowledge of floating point > registers, then the optimized npx bzero and copyin/copyout > operations aren't available. Nothing like a slow kernel. Thanks for the trust... http://www.freebsd.org/projects/ideas/#p-memcpy Attilio -- Peace can only be achieved by understanding - A. Einstein