From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 19 23:38:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6844516A41C for ; Sun, 19 Jun 2005 23:38:13 +0000 (GMT) (envelope-from ellard@eecs.harvard.edu) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CAAC43D1F for ; Sun, 19 Jun 2005 23:38:12 +0000 (GMT) (envelope-from ellard@eecs.harvard.edu) Received: from localhost (localhost.eecs.harvard.edu [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id F116C35373 for ; Sun, 19 Jun 2005 19:38:11 -0400 (EDT) Received: from mail.eecs.harvard.edu ([127.0.0.1]) by localhost (bowser.eecs.harvard.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 46966-03 for ; Sun, 19 Jun 2005 19:38:11 -0400 (EDT) Received: by mail.eecs.harvard.edu (Postfix, from userid 465) id C997535371; Sun, 19 Jun 2005 19:38:11 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id C6CDD35359 for ; Sun, 19 Jun 2005 19:38:11 -0400 (EDT) Date: Sun, 19 Jun 2005 19:38:11 -0400 (EDT) From: Daniel Ellard To: freebsd-hackers@freebsd.org In-Reply-To: <20050619120014.2ABA416A41C@hub.freebsd.org> Message-ID: <20050619193445.W46132@bowser.eecs.harvard.edu> References: <20050619120014.2ABA416A41C@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at eecs.harvard.edu Subject: Re: Long uptime 5.2.1 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, 19 Jun 2005 23:38:13 -0000 > We've got a FreeBSD 5.2.1-RELEASE-p1 server that's been up for 460 > days now, with pretty heavy use the whole time (70GB+ per day http > traffic, 140 hits/sec, etc). > > Before we give it a reboot to upgrade, does anyone want to see any > counters or stats or anything? I ask because it's sometimes handy to > see if your "shouldn't ever happen, but might given enough tries" > corner cases ever got used. My hat is off to you for thinking (and doing) of offering this info to the community. As a former grad student who had to beg and plead for this kind of info, I wish more people would share this kind of info. -Dan From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 02:49:04 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64F6516A41C for ; Mon, 20 Jun 2005 02:49:04 +0000 (GMT) (envelope-from french.linuxian@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B73C43D4C for ; Mon, 20 Jun 2005 02:49:03 +0000 (GMT) (envelope-from french.linuxian@gmail.com) Received: by zproxy.gmail.com with SMTP id 12so367923nzp for ; Sun, 19 Jun 2005 19:49:03 -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=q74k7bYonRDL/FZwGblm1Foc/Fi6GtWuh/OWwMfiDn8nf7sjGiXEb0RiMahYQRlCN0lQQRHDpt50s7Fp3e4y5jtPtstlJ94BMaLCIVcESTEG9LlCK82YSlALCt11M74ejd1GwgAnesC5BCqQ4SaUuaUAWKdsz4igT9v2RekrDRg= Received: by 10.36.158.4 with SMTP id g4mr96296nze; Sun, 19 Jun 2005 19:49:03 -0700 (PDT) Received: by 10.36.57.3 with HTTP; Sun, 19 Jun 2005 19:49:03 -0700 (PDT) Message-ID: <3727392705061919494ea7e0ad@mail.gmail.com> Date: Sun, 19 Jun 2005 22:49:03 -0400 From: Aziz Kezzou To: Andrey Simonenko In-Reply-To: <20050614120706.GA539@pm514-9.comsys.ntu-kpi.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <37273927050614012154fdb80b@mail.gmail.com> <20050614120706.GA539@pm514-9.comsys.ntu-kpi.kiev.ua> Cc: freebsd-hackers Subject: Re: FreeBSD Memory Management questions ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Aziz Kezzou List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2005 02:49:04 -0000 > On Tue, Jun 14, 2005 at 04:21:41AM -0400, Aziz Kezzou wrote: > > > > 1 - Right now to access the memory address space of a user process > > from kernel mode, I only have to set, on x86 systems, the register CR3 > > to the right value. How can I do that on other architectures ? is > > there an architecture-independant way of doing that ? >=20 > Addition to the previous answer. It is also possible to temporally > map several pages of user memory into the kernel address space. > Check pmap_qenter(9) and see physio -> vmapbuf, for example, how to > use it. Another method, it is possible to COW a single user page and > then use it in the kernel, but with this method an user process will > not see any modification in this page made by the kernel and vice > versa. Check socow_setup -> vm_page_cowsetup, for example, how to > use it. Very interesting ! Right now I am using the fact that the kernel address space is maped on i386 machines into the user address space. So when I am executing a system call I can access kernel memory. I am wondering if there is an architecture-independant way of doing that ? (Notice that I need not only read kernel memory but also free it. e.g, mbufs ) or at least could you tell me if that's possible on other architectures ? Thanks for your help, -aziz From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 04:37:09 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B2B716A41F for ; Mon, 20 Jun 2005 04:37:09 +0000 (GMT) (envelope-from bryan.maynard@reallm.com) Received: from hosting.sourcit.net (mail3.eitsolutions.net [68.23.20.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FFD143D49 for ; Mon, 20 Jun 2005 04:37:09 +0000 (GMT) (envelope-from bryan.maynard@reallm.com) Received: (qmail 1631 invoked from network); 19 Jun 2005 23:10:27 -0500 Received: from localhost (127.0.0.1) by localhost with SMTP; 19 Jun 2005 23:10:27 -0500 Received: from AL1-24.207.169.154.charter-stl.com (AL1-24.207.169.154.charter-stl.com [24.207.169.154]) by webmail.reallm.com (Horde MIME library) with HTTP for ; Sun, 19 Jun 2005 23:10:27 -0500 Message-ID: <20050619231027.speqcyk8l6w4w0sc@webmail.reallm.com> Date: Sun, 19 Jun 2005 23:10:27 -0500 From: Bryan Maynard To: freebsd-mobile@freebsd.org References: <20050612204852.qi31u2ddngg08gk8@webmail.reallm.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) Cc: hackers@freebsd.org, current@freebsd.org Subject: NDISulator 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: Mon, 20 Jun 2005 04:37:09 -0000 I followed the steps listed here and got this message when compiling the ndis code (step 2): Warning: Object directory not changed from original /usr/src/sys/modules/ndis Everything seems to compile and install fine except for that error. I complete the rest of the steps and try to kldload ndis and if_ndis. However, once I load ndis I get this: kldload: can't load if_ndis:File exists Also, I can't ifconfig the ndis0 device because I get an error telling me it doesn't exist. Once ndis is loaded via kldload, I cannot unload it. I get a "Device busy" error. I get this error whether the card is plugged in or not. After loading ndis if I plug my WPC11 card in I get: cardbus1: at device 0.0 (no driver attached) I am running 5.4 with the GENERIC kernel. I am completely stumped. Any help would be greatly appreciated. Thanks! Bryan -- Open Source: by the people, for the people. Quoting Chris Buechler : > On 6/12/05, Bryan Maynard wrote: >> Hey, I have a Linksys WPC11 ver.4 and haven't been able to get it to >> work. I've >> checked out the FreeBSD compatibility website under laptops. It looks like >> people have getten ver. 3 to work. >> >> I am wondering if there is a way to get this card to work with my >> system. I have >> 5.4. >> > > WPC11 versions prior to ver.4 were a different chipset that is > natively supported. But, I have been able to use the NDISulator to > use the ver.4 card in my 5.4 laptop. It's worked great for me for > several months. I documented how to configure it here: > http://buechler.blogspot.com/2005/04/freebsd-ndisulator.html > > Regards, > -Chris From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 05:51:41 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F16CB16A41C; Mon, 20 Jun 2005 05:51:40 +0000 (GMT) (envelope-from evantd@washington.edu) Received: from innosense.washington.edu (c-24-19-1-105.hsd1.wa.comcast.net [24.19.1.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEA0843D48; Mon, 20 Jun 2005 05:51:40 +0000 (GMT) (envelope-from evantd@washington.edu) Received: by innosense.washington.edu (Postfix, from userid 1001) id DFC68BC95; Sun, 19 Jun 2005 22:50:49 -0700 (PDT) Date: Sun, 19 Jun 2005 22:50:49 -0700 From: Evan Dower To: Bryan Maynard Message-ID: <20050620055049.GB54283@innosense.washington.edu> References: <20050612204852.qi31u2ddngg08gk8@webmail.reallm.com> <20050619231027.speqcyk8l6w4w0sc@webmail.reallm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050619231027.speqcyk8l6w4w0sc@webmail.reallm.com> User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org, current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: NDISulator 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: Mon, 20 Jun 2005 05:51:41 -0000 I am reminded of Sun, Jun 19, 2005 at 11:10:27PM -0500 when Bryan Maynard said: > I followed the steps listed href="http://www.xl0.org/FreeBSD/ndis.txt">here and got this message > when > compiling the ndis code (step 2): > > Warning: Object directory not changed from original > /usr/src/sys/modules/ndis > > Everything seems to compile and install fine except for that error. I > complete > the rest of the steps and try to kldload ndis and if_ndis. However, > once I load > ndis I get this: > > kldload: can't load if_ndis:File exists > > Also, I can't ifconfig the ndis0 device because I get an error telling me it > doesn't exist. Once ndis is loaded via kldload, I cannot unload it. I get a > "Device busy" error. I get this error whether the card is plugged in or not. > > After loading ndis if I plug my WPC11 card in I get: > > cardbus1: at device 0.0 (no driver attached) > > I am running 5.4 with the GENERIC kernel. > > I am completely stumped. Any help would be greatly appreciated. > > Thanks! > > Bryan This seems related to a post I made to the -stable list earlier today. You might want to watch that thread ("ndis no longer detects netgear wg311v2") as well, since an answer to that question would probably be useful to your situation too. I belive my card is based on the TI ACX110 (or something like that), and I suspect yours is too, but you might want to check that out, since it could be helpful in diagnosing the problem. Good luck, -- Evan Dower Software Development Engineer Amazon.com, Inc. Public key: http://students.washington.edu/evantd/pgp-pub-key.txt Key fingerprint = D321 FA24 4BDA F82D 53A9 5B27 7D15 5A4F 033F 887D From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 10:34:12 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2834516A41C for ; Mon, 20 Jun 2005 10:34:12 +0000 (GMT) (envelope-from cole@opteqint.net) Received: from kalypso.opteqint.net (kalypso.opteqint.net [160.124.112.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3AAB43D48 for ; Mon, 20 Jun 2005 10:34:11 +0000 (GMT) (envelope-from cole@opteqint.net) Received: from 196-47-3-224.access.uunet.co.za ([196.47.3.224] helo=deadmind) by kalypso.opteqint.net with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.43 (FreeBSD)) id 1DkJbN-000NH6-2k for hackers@freebsd.org; Mon, 20 Jun 2005 12:34:10 +0200 Message-ID: <000b01c57583$fa036820$4206000a@deadmind> From: "Cole" To: Date: Mon, 20 Jun 2005 12:36:33 +0200 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 5.50.4922.1500 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4939.300 X-Spam-Score: -100.0 (---------------------------------------------------) X-Spam-Report: Spam detection software, running on the system "kalypso.opteqint.net", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Ive been looking at nbtscan, the 1.5.1 version, and it seems to core, with a segmentation fault. I traced the problem down to a FD_ZERO(fdsr). I was wondering is there any like checking that can be done before issuing that command. Its part of a while loop, inside the program, where it runs fine, till the last loop, im guessing maybe its maybe doing an extra loop where it shouldnt, but the while loop is while( (select(sock+1, fdsr, fdsw, NULL, &select_timeout) ) > 0 ) { [...] Content analysis details: (-100.0 points, 4.2 required) pts rule name description ---- ---------------------- -------------------------------------------------- -100 USER_IN_WHITELIST From: address is in the user's white-list Cc: Subject: FD_ZERO problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cole List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2005 10:34:12 -0000 Hi Ive been looking at nbtscan, the 1.5.1 version, and it seems to core, with a segmentation fault. I traced the problem down to a FD_ZERO(fdsr). I was wondering is there any like checking that can be done before issuing that command. Its part of a while loop, inside the program, where it runs fine, till the last loop, im guessing maybe its maybe doing an extra loop where it shouldnt, but the while loop is while( (select(sock+1, fdsr, fdsw, NULL, &select_timeout) ) > 0 ) { So I dont think the while is giving a false positive, but this isnt my code, I havent had time to check it all out, but I was just wondering if there are any checks that can be done to the fd_set * fdsr pointer before issuing a FD_ZERO? Regards /Cole From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 11:30:39 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC72B16A41C for ; Mon, 20 Jun 2005 11:30:39 +0000 (GMT) (envelope-from cole@opteqint.net) Received: from kalypso.opteqint.net (kalypso.opteqint.net [160.124.112.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F8C643D4C for ; Mon, 20 Jun 2005 11:30:37 +0000 (GMT) (envelope-from cole@opteqint.net) Received: from 196-47-3-224.access.uunet.co.za ([196.47.3.224] helo=deadmind) by kalypso.opteqint.net with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.43 (FreeBSD)) id 1DkKTu-000Pto-BY for hackers@freebsd.org; Mon, 20 Jun 2005 13:30:34 +0200 Message-ID: <000701c5758b$d9784910$4206000a@deadmind> From: "Cole" To: References: <000b01c57583$fa036820$4206000a@deadmind> Date: Mon, 20 Jun 2005 13:32:54 +0200 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 5.50.4922.1500 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4939.300 X-Spam-Score: -100.0 (---------------------------------------------------) X-Spam-Report: Spam detection software, running on the system "kalypso.opteqint.net", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Infact, ignore this, im not thinking today :) Sorry for totally stupid post /Cole ----- Original Message ----- From: "Cole" To: Sent: Monday, June 20, 2005 12:36 PM Subject: FD_ZERO problem [...] Content analysis details: (-100.0 points, 4.2 required) pts rule name description ---- ---------------------- -------------------------------------------------- -100 USER_IN_WHITELIST From: address is in the user's white-list Cc: Subject: Re: FD_ZERO problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cole List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2005 11:30:39 -0000 Infact, ignore this, im not thinking today :) Sorry for totally stupid post /Cole ----- Original Message ----- From: "Cole" To: Sent: Monday, June 20, 2005 12:36 PM Subject: FD_ZERO problem > Hi > > Ive been looking at nbtscan, the 1.5.1 version, and it seems to core, with a segmentation fault. > I traced the problem down to a FD_ZERO(fdsr). > > I was wondering is there any like checking that can be done before issuing that command. Its part of a while loop, inside the > program, where it runs fine, till the last loop, im guessing maybe its maybe doing an extra loop where it shouldnt, but the while > loop is > while( (select(sock+1, fdsr, fdsw, NULL, &select_timeout) ) > 0 ) { > > So I dont think the while is giving a false positive, but this isnt my code, I havent had time to check it all out, but I was just > wondering if there are any checks that can be done to the fd_set * fdsr pointer before issuing a FD_ZERO? > > Regards > /Cole > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 15:26:50 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CA2D16A41C for ; Mon, 20 Jun 2005 15:26:50 +0000 (GMT) (envelope-from jilles@stack.nl) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F44F43D49 for ; Mon, 20 Jun 2005 15:26:50 +0000 (GMT) (envelope-from jilles@stack.nl) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mailhost.stack.nl (Postfix) with ESMTP id B1ABF1F099 for ; Mon, 20 Jun 2005 17:26:49 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 92B871CDE3; Mon, 20 Jun 2005 17:26:49 +0200 (CEST) Date: Mon, 20 Jun 2005 17:26:49 +0200 From: Jilles Tjoelker To: freebsd-hackers@freebsd.org Message-ID: <20050620152649.GA1201@stack.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline X-Operating-System: FreeBSD 5.4-RELEASE i386 User-Agent: Mutt/1.5.6i Subject: what(1) on kernel binary 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, 20 Jun 2005 15:26:50 -0000 --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On FreeBSD 4.x, one could easily determine the version and compilation date of a kernel binary like this: jilles@toad /home/jilles% what /kernel /kernel: FreeBSD 4.11-STABLE #20: Mon May 9 18:43:52 CEST 2005 On FreeBSD 5.x/6.x with GCC 3.x, this doesn't work anymore. The cause is that these two arrays (in /sys/conf/newvers.sh) are now both aligned to a 32-byte boundary, so there are 28 null bytes between @(#) and the version number: char sccspad[32 - 4 /* sizeof(sccs) */] = { '\\0' }; char sccs[4] = { '@', '(', '#', ')' }; A possible solution is to change the two arrays to a single one containing 28 null bytes and @(#). char sccs[32] = { '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '@', '(', '#', ')' }; The symbols sccs and sccspad are not otherwise used in the RELENG_5 kernel. what(1) still shows some garbage from the em(4) driver: $RCSfile: if_em_hw.h,v $$Revision: 1.41 $$Date: 2004/05/17 15:18:53 $ $RCSfile: if_em_hw.h,v $$Revision: 1.41 $$Date: 2004/05/17 15:18:53 $ -- Jilles Tjoelker --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="newvers.sh.patch" --- src/sys/conf/newvers.sh.orig Thu Nov 4 23:02:55 2004 +++ src/sys/conf/newvers.sh Wed Jun 15 18:15:55 2005 @@ -85,8 +85,7 @@ i=`${MAKE:-make} -V KERN_IDENT` cat << EOF > vers.c $COPYRIGHT -char sccspad[32 - 4 /* sizeof(sccs) */] = { '\\0' }; -char sccs[4] = { '@', '(', '#', ')' }; +char sccs[32] = { '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '\\0', '@', '(', '#', ')' }; char version[] = "${VERSION} #${v}: ${t}\\n ${u}@${h}:${d}\\n"; char ostype[] = "${TYPE}"; char osrelease[] = "${RELEASE}"; --n8g4imXOkfNTN/H1-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 17:51:11 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11A5916A41C for ; Mon, 20 Jun 2005 17:51:11 +0000 (GMT) (envelope-from gizmen@blurp.one.pl) Received: from blurp.one.pl (blurp.t2.ds.pwr.wroc.pl [156.17.224.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id B266343D1F for ; Mon, 20 Jun 2005 17:51:10 +0000 (GMT) (envelope-from gizmen@blurp.one.pl) Received: by blurp.one.pl (Postfix, from userid 1001) id BE519862; Mon, 20 Jun 2005 19:50:32 +0200 (CEST) Date: Mon, 20 Jun 2005 19:50:31 +0200 From: GiZmen To: hackers@freebsd.org Message-ID: <20050620175031.GA50395@procent.t2.ds.pwr.wroc.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: Subject: instability with mount_nullfs and jails 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, 20 Jun 2005 17:51:11 -0000 hi, I have problem with mount_nullfs and jails. My system FreeBSD 5.4-STABLE when have two jails and each of this jails has couple mount_nullfs freeze without kernel panic. It freezes out in random times. Sometimes it can run for couple days sometimes it freezes after couple hours. I have mount points like below: root@procent:~# mount /dev/ad0s1a on / (ufs, local) devfs on /dev (devfs, local, multilabel) /dev/ad0s1e on /tmp (ufs, local, nodev, nosuid, nosymfollow, soft-updates, multilabel, acls) /dev/ad0s1f on /usr (ufs, local, nodev, soft-updates, multilabel, acls) /dev/ad0s1d on /var (ufs, local, nodev, nosuid, soft-updates, multilabel, acls) /usr/local/bandwidthd/htdocs on /usr/jails/httpd/www/traf (nullfs, local, nodev, noexec, nosuid, read-only) /usr/local/share/pear on /usr/jails/httpd/lib/php/pear (nullfs, local, nodev, noexec, nosuid, read-only) /usr/local/share/smarty on /usr/jails/httpd/lib/php/smarty (nullfs, local, nodev, noexec, nosuid, read-only) /usr/local/lib/php/20020429 on /usr/jails/httpd/lib/php/20020429 (nullfs, local, nodev, noexec, nosuid, read-only) /usr/local/libexec/apache on /usr/jails/httpd/libexec/apache (nullfs, local, nodev, noexec, nosuid, read-only) /usr/local/etc/php on /usr/jails/httpd/etc/php (nullfs, local, nodev, noexec, nosuid, read-only) /usr/local/bin on /usr/jails/httpd/bin (nullfs, local, nodev, nosuid, read-only) devfs on /usr/jails/httpd/dev (devfs, local, multilabel) /dev/ad0s1g.bde on /crypto (ufs, local, noatime, nodev, nosuid, synchronous, soft-updates, multilabel, acls) /dev/ad2s1a.bde on /crypto2 (ufs, local, noatime, nodev, nosuid, synchronous, soft-updates, multilabel, acls) /crypto/home on /usr/jails/users/home (nullfs, local, nodev) /crypto/home on /usr/jails/httpd/home (nullfs, local, nodev, noexec, nosuid) from fstab.sshd: /bin /usr/jails/users/bin nullfs ro,nosuid,nodev 0 0 /sbin /usr/jails/users/sbin nullfs ro,nodev 0 0 /usr/ports /usr/jails/users/usr/ports nullfs rw,nosuid,nodev 0 0 /usr/include /usr/jails/users/usr/include nullfs ro,nosuid,noexec,nodev 0 0 /usr/share /usr/jails/users/usr/share nullfs ro,nosuid,nodev,noexec 0 0 /usr/lib /usr/jails/users/usr/lib nullfs ro,nosuid,nodev 0 0 #/lib /usr/jails/users/lib nullfs ro,nosuid,nodev,noexec 0 0 #/libexec /usr/jails/users/libexec nullfs ro,nosuid,nodev 0 0 /usr/bin /usr/jails/users/usr/bin nullfs ro,nodev 0 0 /usr/sbin /usr/jails/users/usr/sbin nullfs ro,nodev 0 0 /usr/libexec /usr/jails/users/usr/libexec nullfs ro,nodev 0 0 When i start sshd jail with mount_nulls like above i will have crash after random period of time. Without this jail i have never had any freeze. home dir in users jail is mount_nulled from /crypto partition.Earlier my users jails didnt have mount_nulls, i have had copy of each dir. I could have uptime like 80 days. I dont know why it is so instabile? Could any one point me somehow ? Maybe i do someting wrong or someting? THX -- Best Regards: GiZmen UNIX is user-friendly; it's just picky about its friends UNIX is simple; it just takes a genius to understand its simplicity From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 18:23:39 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72B7116A41C for ; Mon, 20 Jun 2005 18:23:39 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18F3C43D48 for ; Mon, 20 Jun 2005 18:23:39 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.41.231] (Not Verified[216.133.140.1]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Mon, 20 Jun 2005 14:37:04 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org, Aziz Kezzou Date: Mon, 20 Jun 2005 10:37:42 -0400 User-Agent: KMail/1.8 References: <37273927050614012154fdb80b@mail.gmail.com> <20050614120706.GA539@pm514-9.comsys.ntu-kpi.kiev.ua> <3727392705061919494ea7e0ad@mail.gmail.com> In-Reply-To: <3727392705061919494ea7e0ad@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506201037.43599.jhb@FreeBSD.org> Cc: Andrey Simonenko Subject: Re: FreeBSD Memory Management questions ? 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, 20 Jun 2005 18:23:39 -0000 On Sunday 19 June 2005 10:49 pm, Aziz Kezzou wrote: > > On Tue, Jun 14, 2005 at 04:21:41AM -0400, Aziz Kezzou wrote: > > > 1 - Right now to access the memory address space of a user process > > > from kernel mode, I only have to set, on x86 systems, the register CR3 > > > to the right value. How can I do that on other architectures ? is > > > there an architecture-independant way of doing that ? > > > > Addition to the previous answer. It is also possible to temporally > > map several pages of user memory into the kernel address space. > > Check pmap_qenter(9) and see physio -> vmapbuf, for example, how to > > use it. Another method, it is possible to COW a single user page and > > then use it in the kernel, but with this method an user process will > > not see any modification in this page made by the kernel and vice > > versa. Check socow_setup -> vm_page_cowsetup, for example, how to > > use it. > > Very interesting ! > > Right now I am using the fact that the kernel address space is maped > on i386 machines into the user address space. So when I am executing a > system call I can access kernel memory. > I am wondering if there is an architecture-independant way of doing > that ? (Notice that I need not only read kernel memory but also free > it. e.g, mbufs ) or at least could you tell me if that's possible on > other architectures ? Are you modifying kernel memory from userland or are you trying to access user memory from kernel code? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 19:38:45 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CE8716A41C for ; Mon, 20 Jun 2005 19:38:45 +0000 (GMT) (envelope-from french.linuxian@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD36643D1F for ; Mon, 20 Jun 2005 19:38:44 +0000 (GMT) (envelope-from french.linuxian@gmail.com) Received: by zproxy.gmail.com with SMTP id 12so672626nzp for ; Mon, 20 Jun 2005 12:38:44 -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=ZAC9PkY8FlXYM7TKn42rS2WAsuSjZadIl4txeBMLQObYSMCTB5+Xyd0wqLNRfIlTeQgbW6ketG9O3OXtJbAMIhsPdubKoBv0LOYJ8VMPeviv7bOYOm9SyaWxnp9sV9BiR9aeSckVZpehT/XnPKn6Gk870PqepD9/gLWgJYiqd98= Received: by 10.36.80.15 with SMTP id d15mr3415267nzb; Mon, 20 Jun 2005 12:38:43 -0700 (PDT) Received: by 10.36.57.3 with HTTP; Mon, 20 Jun 2005 12:38:43 -0700 (PDT) Message-ID: <3727392705062012385d75d5c0@mail.gmail.com> Date: Mon, 20 Jun 2005 15:38:43 -0400 From: Aziz Kezzou To: John Baldwin In-Reply-To: <200506201037.43599.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <37273927050614012154fdb80b@mail.gmail.com> <20050614120706.GA539@pm514-9.comsys.ntu-kpi.kiev.ua> <3727392705061919494ea7e0ad@mail.gmail.com> <200506201037.43599.jhb@FreeBSD.org> Cc: freebsd-hackers@freebsd.org, Andrey Simonenko Subject: Re: FreeBSD Memory Management questions ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Aziz Kezzou List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2005 19:38:45 -0000 On 6/20/05, John Baldwin wrote: > On Sunday 19 June 2005 10:49 pm, Aziz Kezzou wrote: > > > On Tue, Jun 14, 2005 at 04:21:41AM -0400, Aziz Kezzou wrote: > > > > 1 - Right now to access the memory address space of a user process > > > > from kernel mode, I only have to set, on x86 systems, the register = CR3 > > > > to the right value. How can I do that on other architectures ? is > > > > there an architecture-independant way of doing that ? > > > > > > Addition to the previous answer. It is also possible to temporally > > > map several pages of user memory into the kernel address space. > > > Check pmap_qenter(9) and see physio -> vmapbuf, for example, how to > > > use it. Another method, it is possible to COW a single user page and > > > then use it in the kernel, but with this method an user process will > > > not see any modification in this page made by the kernel and vice > > > versa. Check socow_setup -> vm_page_cowsetup, for example, how to > > > use it. > > > > Very interesting ! > > > > Right now I am using the fact that the kernel address space is maped > > on i386 machines into the user address space. So when I am executing a > > system call I can access kernel memory. > > I am wondering if there is an architecture-independant way of doing > > that ? (Notice that I need not only read kernel memory but also free > > it. e.g, mbufs ) or at least could you tell me if that's possible on > > other architectures ? >=20 > Are you modifying kernel memory from userland or are you trying to access= user > memory from kernel code? >=20 I want to be able to modify BOTH user and kernel memory in kernel mode. Typically, a user process invoques a system call. While executing the system call I need to have r/w access to the calling process's memory (which is normally OK) and also r/w access to kernel's memory. Note : the user pages that are access from kernel mode are wired to avoid a page-fault inside the kernel, is that necessary ? Also is there a way of sharing part of the user memory space with the kernel. In a way that both have access to it and both see each others work (i.e, no copy-on-write ) ? Thanks, -aziz From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 20 20:56:43 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBEF216A41C for ; Mon, 20 Jun 2005 20:56:43 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: from angryfist.fasttrackmonkey.com (angryfist.fasttrackmonkey.com [216.223.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78E6243D1D for ; Mon, 20 Jun 2005 20:56:39 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: (qmail 91651 invoked by uid 2003); 20 Jun 2005 20:55:18 -0000 Received: from spork@fasttrackmonkey.com by angryfist.fasttrackmonkey.com by uid 1001 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(216.220.116.154):. Processed in 0.068536 secs); 20 Jun 2005 20:55:18 -0000 Received: from unknown (HELO gee5.nat.fasttrackmonkey.com) (216.220.116.154) by 0 with (DHE-RSA-AES256-SHA encrypted) SMTP; 20 Jun 2005 20:55:18 -0000 Date: Mon, 20 Jun 2005 16:56:36 -0400 (EDT) From: Charles Sprickman X-X-Sender: spork@gee5.nat.fasttrackmonkey.com To: hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Nagios and threads 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, 20 Jun 2005 20:56:44 -0000 Hello, Just curious if there's any regulars here who would like to help Ethan out: http://nagios.sourceforge.net/docs/2_0/whatsnew.html "Known Issues There are a few known issues with the Nagios 2.0 code at the moment. Hopefully some of these will be fixed before 2.0 is released as stable... 1. FreeBSD and threads. On FreeBSD there's a native user-level implementation of threads called 'pthread' and there's also an optional ports collection 'linuxthreads' that uses kernel hooks. Some folks from Yahoo! have reported that using the pthread library causes Nagios to pause under heavy I/O load, causing some service check results to be lost. Switching to linuxthreads seems to help this problem, but not fix it. The lock happens in liblthread's __pthread_acquire() - it can't ever acquire the spinlock. It happens when the main thread forks to execute an active check. On the second fork to create the grandchild, the grandchild is created by fork, but never returns from liblthread's fork wrapper, because it's stuck in __pthread_acquire(). Maybe some FreeBSD users can help out with this problem." Thanks, Charles From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 11:37:11 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9498816A41C for ; Tue, 21 Jun 2005 11:37:11 +0000 (GMT) (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 52E0B43D66 for ; Tue, 21 Jun 2005 11:37:11 +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 261AF60F7; Tue, 21 Jun 2005 13:37:06 +0200 (CEST) Received: from xps.des.no (des.no [80.203.228.37]) by tim.des.no (Postfix) with ESMTP id 1596C60ED; Tue, 21 Jun 2005 13:37:06 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id F13A233C2B; Tue, 21 Jun 2005 13:37:05 +0200 (CEST) To: Charles Sprickman References: From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 21 Jun 2005 13:37:05 +0200 In-Reply-To: (Charles Sprickman's message of "Mon, 20 Jun 2005 16:56:36 -0400 (EDT)") Message-ID: <86slzcos9q.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Learn: ham X-Spam-Score: -5.2/5.0 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on tim.des.no Cc: hackers@freebsd.org Subject: Re: Nagios and threads 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, 21 Jun 2005 11:37:11 -0000 Charles Sprickman writes: > 1. FreeBSD and threads. On FreeBSD there's a native user-level > implementation of threads called 'pthread' and there's also an > optional ports collection 'linuxthreads' that uses kernel hooks. This is only the case for FreeBSD 4. FreeBSD 5 has native threads. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 13:26:45 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C16016A41F for ; Tue, 21 Jun 2005 13:26:45 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from ss.eunet.cz (ss.eunet.cz [193.85.228.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12B4643D55 for ; Tue, 21 Jun 2005 13:26:44 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from localhost.i.cz (ss.eunet.cz [193.85.228.13]) by ss.eunet.cz (8.13.1/8.13.1) with ESMTP id j5LDQcuB061608; Tue, 21 Jun 2005 15:26:38 +0200 (CEST) (envelope-from mime@traveller.cz) From: Michal Mertl To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= In-Reply-To: <86slzcos9q.fsf@xps.des.no> References: <86slzcos9q.fsf@xps.des.no> Content-Type: text/plain; charset=ISO-8859-1 Date: Tue, 21 Jun 2005 15:26:36 +0200 Message-Id: <1119360396.781.17.camel@genius1.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: Charles Sprickman , hackers@freebsd.org Subject: Re: Nagios and threads 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, 21 Jun 2005 13:26:45 -0000 Dag-Erling Smørgrav wrote: > Charles Sprickman writes: > > 1. FreeBSD and threads. On FreeBSD there's a native user-level > > implementation of threads called 'pthread' and there's also an > > optional ports collection 'linuxthreads' that uses kernel hooks. > > This is only the case for FreeBSD 4. FreeBSD 5 has native threads. Yes, the description on Nagios page is not precise but unfortunately Nagios still has some problems even on 5.4. I wasn't able to find out what was wrong and the problem dissappeared when I had to replace the computer with single-processor one. The symptoms I observed were that every several days one Nagios process was consuming all the CPU doing hundreds of thousands of syscalls per second. It got always stuck around the time when the the daily cron job run. I did a ktrace on the stuck process and tried to abort it to have the core but I've lost the ktrace output and it never saved the core :-(. I'll install it on another machine and try to diagnose the problem some more. Michal From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 13:44:36 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 170FC16A41C for ; Tue, 21 Jun 2005 13:44:36 +0000 (GMT) (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 C954D43D48 for ; Tue, 21 Jun 2005 13:44:35 +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 6AE3F60FC; Tue, 21 Jun 2005 15:44:30 +0200 (CEST) Received: from xps.des.no (des.no [80.203.228.37]) by tim.des.no (Postfix) with ESMTP id 590B260FB; Tue, 21 Jun 2005 15:44:30 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id 3B2AC33C29; Tue, 21 Jun 2005 15:44:30 +0200 (CEST) To: Michal Mertl References: <86slzcos9q.fsf@xps.des.no> <1119360396.781.17.camel@genius1.i.cz> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 21 Jun 2005 15:44:30 +0200 In-Reply-To: <1119360396.781.17.camel@genius1.i.cz> (Michal Mertl's message of "Tue, 21 Jun 2005 15:26:36 +0200") Message-ID: <86zmtjn7sx.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Learn: ham X-Spam-Score: -5.2/5.0 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on tim.des.no Cc: Charles Sprickman , hackers@freebsd.org Subject: Re: Nagios and threads 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, 21 Jun 2005 13:44:36 -0000 Michal Mertl writes: > Yes, the description on Nagios page is not precise but unfortunately > Nagios still has some problems even on 5.4. I wasn't able to find out > what was wrong and the problem dissappeared when I had to replace the > computer with single-processor one. The symptoms I observed were that > every several days one Nagios process was consuming all the CPU doing > hundreds of thousands of syscalls per second. hundreds of thousands of *which* syscalls? DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 13:59:37 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0500316A41C; Tue, 21 Jun 2005 13:59:37 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [195.245.194.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C0A043D1D; Tue, 21 Jun 2005 13:59:28 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from pm514-9.comsys.ntu-kpi.kiev.ua (pm514-9.comsys.ntu-kpi.kiev.ua [10.18.54.109]) (authenticated bits=0) by comsys.ntu-kpi.kiev.ua (8.12.10/8.12.10) with ESMTP id j5LE5NFl040129 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Jun 2005 17:05:23 +0300 (EEST) Received: by pm514-9.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1000) id CEFC7329; Tue, 21 Jun 2005 16:57:53 +0300 (EEST) Date: Tue, 21 Jun 2005 16:57:53 +0300 From: Andrey Simonenko To: Aziz Kezzou Message-ID: <20050621135753.GA367@pm514-9.comsys.ntu-kpi.kiev.ua> References: <37273927050614012154fdb80b@mail.gmail.com> <20050614120706.GA539@pm514-9.comsys.ntu-kpi.kiev.ua> <3727392705061919494ea7e0ad@mail.gmail.com> <200506201037.43599.jhb@FreeBSD.org> <3727392705062012385d75d5c0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3727392705062012385d75d5c0@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-Spam-Status: No, score=-4.5 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on comsys.ntu-kpi.kiev.ua X-Virus-Scanned: ClamAV 0.82/940/Wed Jun 15 09:58:59 2005 on comsys.ntu-kpi.kiev.ua X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD Memory Management questions ? 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, 21 Jun 2005 13:59:37 -0000 On Mon, Jun 20, 2005 at 03:38:43PM -0400, Aziz Kezzou wrote: > On 6/20/05, John Baldwin wrote: [skipped] > > > > Are you modifying kernel memory from userland or are you trying to access user > > memory from kernel code? > > > > I want to be able to modify BOTH user and kernel memory in kernel mode. > > Typically, a user process invoques a system call. While executing the > system call I need to have r/w access to the calling process's memory > (which is normally OK) and also r/w access to kernel's memory. Note : Having entered to the kernel a process begins to run with higher privilege and of course it should have access to the kernel address space. Can it access own user space address space directly, I think, depends on MD code, which is responsible for memory manipulation (pmap). According to my understanding, on i386 process's PDE has entries for the kernel memory (1G), which is represented with 4M pages, process uses 4K pages for its memory (3G). When a process runs in userland it uses segments selectors and corresponding segments have limits which do not allow from userspace access kernel memory. When a process runs in the kernel in case of syscall invocation, it uses another segment selectors and another corresponding segments with another limits. All this allows not to reload %cr3. Really you don't have true r/w access to the calling process's memory, since you need to honor COW mappings (such as shadow objects or private mappings of vnode's object), COW pages (used for I/O). To honor all these you need to use copyin(9) and friends, which will call vm_fault() (BTW check that copyin checks VM_MAXUSER_ADDRESS, so user process cannot specify va outside its address space). Please (somebody) correct me, if I understood something wrong. > the user pages that are access from kernel mode are wired to avoid a > page-fault inside the kernel, is that necessary ? > It depends from which parts of the kernel you will access these pages. Also sometimes needed pages in the kernel are wired, sometimes pages are hold, currently I don't completely understand difference; even more, sometimes pages are hold, but comments in functions says that these pages are wired! > Also is there a way of sharing part of the user memory space with the > kernel. In a way that both have access to it and both see each others > work (i.e, no copy-on-write ) ? Please check functions names I gave in my first letter. Also you can create anon vm_object and share it between a process and the kernel or other process (like sysv_mem). Hope this can help. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 14:43:58 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F335916A41C for ; Tue, 21 Jun 2005 14:43:57 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6DDC43D48 for ; Tue, 21 Jun 2005 14:43:57 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j5LEhn8F016140; Tue, 21 Jun 2005 10:43:49 -0400 (EDT) Date: Tue, 21 Jun 2005 10:43:49 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Michal Mertl In-Reply-To: <1119360396.781.17.camel@genius1.i.cz> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , hackers@freebsd.org, Charles Sprickman Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2005 14:43:58 -0000 On Tue, 21 Jun 2005, Michal Mertl wrote: > Dag-Erling Sm=F8rgrav wrote: > > Charles Sprickman writes: > > > 1. FreeBSD and threads. On FreeBSD there's a native user-level > > > implementation of threads called 'pthread' and there's also an > > > optional ports collection 'linuxthreads' that uses kernel hooks. > > > > This is only the case for FreeBSD 4. FreeBSD 5 has native threads. > > Yes, the description on Nagios page is not precise but unfortunately > Nagios still has some problems even on 5.4. I wasn't able to find out > what was wrong and the problem dissappeared when I had to replace the > computer with single-processor one. The symptoms I observed were that > every several days one Nagios process was consuming all the CPU doing > hundreds of thousands of syscalls per second. It got always stuck around > the time when the the daily cron job run. > > I did a ktrace on the stuck process and tried to abort it to have the > core but I've lost the ktrace output and it never saved the core :-(. > > I'll install it on another machine and try to diagnose the problem some > more. You gotta try it on -stable. --=20 DE From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 15:15:58 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12CEC16A420 for ; Tue, 21 Jun 2005 15:15:58 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id B63FE43D5C for ; Tue, 21 Jun 2005 15:15:57 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.41.231] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Tue, 21 Jun 2005 11:29:29 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 21 Jun 2005 11:16:31 -0400 User-Agent: KMail/1.8 References: <42887FEE.3000705@kepa.fi> <20050516125109.GF33622@wombat.fafoe.narf.at> In-Reply-To: <20050516125109.GF33622@wombat.fafoe.narf.at> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200506211116.32625.jhb@FreeBSD.org> Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Cc: Stefan Farfeleder , Juho Vuori Subject: Re: Bug in devinfo or something wrong with me? 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, 21 Jun 2005 15:15:58 -0000 On Monday 16 May 2005 08:51 am, Stefan Farfeleder wrote: > On Mon, May 16, 2005 at 02:11:42PM +0300, Juho Vuori wrote: > > The below included simple program reliably printfs "error 4\n" on > > 5.4-RELEASE. Am I understanding something wrong or is this a bug in > > libdevinfo? > > There is indeed a bug in libdevinfo. > > > To continue on this however, if you put say sleep(5) between > > devinfo_free() and the second devinfo_init() and manage to change the > > device configuration during the sleep (tested with pluggin in/out a USB > > memory), the program terminates with no errors. I've run into other > > oddities with devinfo as well, but in much more complex situations so > > they might just as well be variations of this simple example. > > > > if (devinfo_init()) { > > devinfo_init() initialises the devinfo_dev tailq, devinfo_generation and > sets devinfo_initted to 1. > > > devinfo_free(); > > devinfo_free() clears devinfo_dev and sets devinfo_initted to 0 but > devinfo_generation keeps its value. > > > if (devinfo_init()) { > > Now devinfo_dev doesn't get filled because ubus.ub_generation == > devinfo_generation. > > Here is a patch that resets devinfo_generation to 0 in devinfo_free(). > The whole file can probably be simplified a bit due to this bug. > > Stefan I think the intent is actually so that you can call devinfo_init() periodically without calling devinfo_free() to make sure the tree is up to date. However, the generation should still be cleared when free() is called. IOW, if you wanted to have a program that would poll the kernel each second to get the current tree, it would call devinfo_init() in a loop and only call devinfo_free() at program exit. This would let devinfo_init() cache data if the device tree doesn't change. I'll try to get the patch into the tree. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 17:08:52 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3944116A41C for ; Tue, 21 Jun 2005 17:08:52 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1CFD43D49 for ; Tue, 21 Jun 2005 17:08:51 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.41.231] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Tue, 21 Jun 2005 13:22:22 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org, Aziz Kezzou Date: Tue, 21 Jun 2005 11:24:38 -0400 User-Agent: KMail/1.8 References: <37273927050614012154fdb80b@mail.gmail.com> <200506201037.43599.jhb@FreeBSD.org> <3727392705062012385d75d5c0@mail.gmail.com> In-Reply-To: <3727392705062012385d75d5c0@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506211124.39587.jhb@FreeBSD.org> Cc: Andrey Simonenko Subject: Re: FreeBSD Memory Management questions ? 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, 21 Jun 2005 17:08:52 -0000 On Monday 20 June 2005 03:38 pm, Aziz Kezzou wrote: > On 6/20/05, John Baldwin wrote: > > On Sunday 19 June 2005 10:49 pm, Aziz Kezzou wrote: > > > > On Tue, Jun 14, 2005 at 04:21:41AM -0400, Aziz Kezzou wrote: > > > > > 1 - Right now to access the memory address space of a user process > > > > > from kernel mode, I only have to set, on x86 systems, the register > > > > > CR3 to the right value. How can I do that on other architectures ? > > > > > is there an architecture-independant way of doing that ? > > > > > > > > Addition to the previous answer. It is also possible to temporally > > > > map several pages of user memory into the kernel address space. > > > > Check pmap_qenter(9) and see physio -> vmapbuf, for example, how to > > > > use it. Another method, it is possible to COW a single user page and > > > > then use it in the kernel, but with this method an user process will > > > > not see any modification in this page made by the kernel and vice > > > > versa. Check socow_setup -> vm_page_cowsetup, for example, how to > > > > use it. > > > > > > Very interesting ! > > > > > > Right now I am using the fact that the kernel address space is maped > > > on i386 machines into the user address space. So when I am executing a > > > system call I can access kernel memory. > > > I am wondering if there is an architecture-independant way of doing > > > that ? (Notice that I need not only read kernel memory but also free > > > it. e.g, mbufs ) or at least could you tell me if that's possible on > > > other architectures ? > > > > Are you modifying kernel memory from userland or are you trying to access > > user memory from kernel code? > > I want to be able to modify BOTH user and kernel memory in kernel mode. > > Typically, a user process invoques a system call. While executing the > system call I need to have r/w access to the calling process's memory > (which is normally OK) and also r/w access to kernel's memory. Note : > the user pages that are access from kernel mode are wired to avoid a > page-fault inside the kernel, is that necessary ? No, it does not have to be wired though you might have a performance reason for doing so. You can access user memory from the kernel using the copyin() and copyout() functions which copy from from user memory to kernel memory and vice versa, respectively. > Also is there a way of sharing part of the user memory space with the > kernel. In a way that both have access to it and both see each others > work (i.e, no copy-on-write ) ? Yes. One way to do this is to create a pseudo-device that creates an entry in /dev and have it malloc() some memory and then allow the user to map that memory via mmap on the device in /dev. This might only work well on platforms that have vtophys() however. On platforms with an IOMMU like sparc64 I'm not sure if we have a good way of getting the processor PA in your mmap() routine of the memory you've allocated. There might be some other tricks you can do by speaking to the VM directly and having a system call or device ioctl() method that malloc's some memory and then uses the VM directly to map it into the address space of the current process. You'd have to look at how the vm_mmap() routine works to figure this out I think. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 19:52:04 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C58FE16A41C; Tue, 21 Jun 2005 19:52:04 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E98E43D1F; Tue, 21 Jun 2005 19:52:04 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.1/8.12.9) with ESMTP id j5LJq2d3099441; Tue, 21 Jun 2005 21:52:02 +0200 (CEST) (envelope-from cracauer@schlepper.zs64.net) Received: (from cracauer@localhost) by schlepper.zs64.net (8.13.1/8.12.9/Submit) id j5LJq2uY099440; Tue, 21 Jun 2005 15:52:02 -0400 (EDT) (envelope-from cracauer) Date: Tue, 21 Jun 2005 15:52:02 -0400 From: Martin Cracauer To: bugbusters@FreeBSD.org Message-ID: <20050621155202.A99219@cons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Cc: freebsd-hackers@FreeBSD.org Subject: Serious braindamage in the send-pr web interface 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, 21 Jun 2005 19:52:04 -0000 The security code of the web interface seems to really screw people over (the image displaying a text that you have to enter). It goes like this: - open web page - enter PR - enter security code but get anything wrong (case is sufficient) You get an error complaing about the security code. Press back. Your carefully edited PR is still there. Good. However, it displays the same image and the same security code as before, although send-pr seems to have generated a new one internally. The new code is not displayed, however, since there is no expire header on the old one and you just hit the "back" button. So it displays the old code to the user while it already expects a new one. So it rejects everything that comes out of the sequence "back button" and resubmitting, so matter how often you do it. It never displays its currently expected code in an image in the user's browser, it reuses the first image every time. If you figure that this is the problem you press reload - and your PR is gone :-/ I think this might be fixable as easy as setting an expire header on the image. Also, it shouldn't be all-uppercase and case sensitive, that is pointless. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ No warranty. This email is probably produced by one of my cats stepping on the keys. No, I don't have an infinite number of cats. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 22:13:54 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7841E16A41C; Tue, 21 Jun 2005 22:13:54 +0000 (GMT) (envelope-from setantae@submonkey.net) Received: from shrike.submonkey.net (cpc4-cdif3-6-1-cust116.cdif.cable.ntl.com [82.23.41.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26E1C43D1F; Tue, 21 Jun 2005 22:13:54 +0000 (GMT) (envelope-from setantae@submonkey.net) Received: from setantae by shrike.submonkey.net with local (Exim 4.51 (FreeBSD)) id 1Dkr0D-000Dr8-0I; Tue, 21 Jun 2005 23:13:53 +0100 Date: Tue, 21 Jun 2005 23:13:52 +0100 From: Ceri Davies To: Martin Cracauer Message-ID: <20050621221352.GE14221@submonkey.net> Mail-Followup-To: Ceri Davies , Martin Cracauer , bugbusters@FreeBSD.org, freebsd-hackers@FreeBSD.org References: <20050621155202.A99219@cons.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XEBwi9kjQ2E8i8dT" Content-Disposition: inline In-Reply-To: <20050621155202.A99219@cons.org> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.9i Sender: Ceri Davies Cc: freebsd-hackers@FreeBSD.org, bugbusters@FreeBSD.org Subject: Re: Serious braindamage in the send-pr web interface 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, 21 Jun 2005 22:13:54 -0000 --XEBwi9kjQ2E8i8dT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 21, 2005 at 03:52:02PM -0400, Martin Cracauer wrote: > The security code of the web interface seems to really screw people > over (the image displaying a text that you have to enter). >=20 > It goes like this: > - open web page > - enter PR > - enter security code but get anything wrong (case is sufficient) >=20 > You get an error complaing about the security code. >=20 > Press back. Your carefully edited PR is still there. Good. >=20 > However, it displays the same image and the same security code as > before, although send-pr seems to have generated a new one internally. > The new code is not displayed, however, since there is no expire > header on the old one and you just hit the "back" button. >=20 > So it displays the old code to the user while it already expects a new > one. >=20 > So it rejects everything that comes out of the sequence "back button" > and resubmitting, so matter how often you do it. It never displays > its currently expected code in an image in the user's browser, it > reuses the first image every time. >=20 > If you figure that this is the problem you press reload - and your PR > is gone :-/ >=20 > I think this might be fixable as easy as setting an expire header on > the image. It has Pragma: no-cache and a dummy '?' in the URL. What does an "expire header" that expires immediatelylook like? > Also, it shouldn't be all-uppercase and case sensitive, that is > pointless.=20 Point taken; I actually remember committing lowercase letters. Interesting that it never really happened... Ceri PS www issues go to www@, not hackers@. --=20 Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -- Einstein (attrib.) --XEBwi9kjQ2E8i8dT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCuJEgocfcwTS3JF8RAtKdAJ98TXO6VzfGpevtuu7gmrbHDCdxEQCfczTc eBqc10O+zpm5XLl/Js3RxpM= =jCGD -----END PGP SIGNATURE----- --XEBwi9kjQ2E8i8dT-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 14:50:30 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87D6416A41C for ; Tue, 21 Jun 2005 14:50:30 +0000 (GMT) (envelope-from peadar.edwards@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3144543D1F for ; Tue, 21 Jun 2005 14:50:30 +0000 (GMT) (envelope-from peadar.edwards@gmail.com) Received: by zproxy.gmail.com with SMTP id 12so1005260nzp for ; Tue, 21 Jun 2005 07:50:29 -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=q5RNsbXVeRu1Dy78k9sGjJaQwuQcTsoyyIirUi1AEEjIEjIr+/CgmWkjfnKMhP0vVvPDej2XRw4EqsPOhYo5iFKb/S5WcbTz9K8ftKyIuBAVPZBIKMcgSgCUsU9YO6yEk/9zJ1t+hWAM7PK9L/99uLd7NNHoa/hlvKh1OndZAHc= Received: by 10.36.59.12 with SMTP id h12mr1924246nza; Tue, 21 Jun 2005 07:50:29 -0700 (PDT) Received: by 10.36.68.15 with HTTP; Tue, 21 Jun 2005 07:50:29 -0700 (PDT) Message-ID: <34cb7c840506210750f7458cf@mail.gmail.com> Date: Tue, 21 Jun 2005 15:50:29 +0100 From: Peter Edwards To: Charles Sprickman In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Mailman-Approved-At: Wed, 22 Jun 2005 11:46:38 +0000 Cc: hackers@freebsd.org Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Peter Edwards List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2005 14:50:30 -0000 On 6/20/05, Charles Sprickman wrote: > Hello, >=20 > Just curious if there's any regulars here who would like to help Ethan > out: >=20 [snip] >=20 > ... It happens when the main thread forks to execute an active > check. On the second fork to create the grandchild, the grandchild is > created by fork, but never returns from liblthread's fork wrapper, becaus= e > it's stuck in __pthread_acquire(). Maybe some FreeBSD users can help out > with this problem." >=20 IIRC, doing any significant work in a forked child of a multithreaded process is somewhat ill defined. From SusV3's description of "fork()" > ... Consequently, to avoid errors, the child process may only execute=20 > async-signal-safe operations until such time as one of the exec > functions is called. (This behaviour would extend to a grandchild.) A comment in libpthread/thr_kern.c refers to this, so I think there's at least some assumptions that the child won't be doing much before execing or exiting. (But Im sure one of the implementors will pipe up if I'm wrong :-)) From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 12:36:34 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 127EF16A41C for ; Wed, 22 Jun 2005 12:36:34 +0000 (GMT) (envelope-from stefan@aeschbacher.ch) Received: from mx.nts.ch (mail.nts.ch [212.103.67.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 4D29543D1F for ; Wed, 22 Jun 2005 12:36:32 +0000 (GMT) (envelope-from stefan@aeschbacher.ch) Received: (qmail 13051 invoked by uid 7650); 22 Jun 2005 12:40:13 -0000 Received: from stefan@aeschbacher.ch by bernoulli by uid 64011 with qmail-scanner-1.21 (f-prot: 4.4.1/3.14.11. spamassassin: 2.63. Clear:RC:1(212.103.64.3):. Processed in 0.021869 secs); 22 Jun 2005 12:40:13 -0000 Received: from localhost ([212.103.64.3]) by mx.nts.ch ([192.168.123.34]) with ESMTP via TCP; 22 Jun 2005 12:40:13 -0000 Received: from ftp.nts.ch (ftp.nts.ch [212.103.67.6]) by horde.nts.ch (IMP) with HTTP for ; Wed, 22 Jun 2005 14:36:51 +0200 Message-ID: <1119443811.42b95b63d6299@horde.nts.ch> Date: Wed, 22 Jun 2005 14:36:51 +0200 From: stefan@aeschbacher.ch To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.3-cvs X-Originating-IP: 212.103.67.6 Cc: Subject: (no subject) 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, 22 Jun 2005 12:36:34 -0000 Hi list I have an Intel Motherboard with a SRCS16 raid controller. According to amr(4), this controller should be supported. Unfortunately the 5.4 Install CD does not recognize the raid controller. Loading amr before booting does not help (results in the error message seen in the dmesg below). When booting normally, the amr module is not loaded. Now I have the following questions: Is this version of the Intel Controller not supported? If this is the case, is there a simple solution to get it recognized? (a quick glance at the amr code was not enough to enlighten me) Is there an easy way to setup gmirror with the install CD in case the controller does not work? (even when loaded the geom_mirror module, the gmirror tool does not know about the 'label' command) thanks Stefan dmesg: Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.4-RELEASE #0: Sun May 8 10:21:06 UTC 2005 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC module_register: module amr/amrd already exists! Module amr/amrd failed to register: 17 module_register: module pci/amr already exists! Module pci/amr failed to register: 17 ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Xeon(TM) CPU 3.00GHz (2992.52-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf41 Stepping = 1 Features=0xbfebfbff real memory = 1073610752 (1023 MB) avail memory = 1036853248 (988 MB) ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard ioapic2 irqs 48-71 on motherboard npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 0.1 (no driver attached) pci0: at device 1.0 (no driver attached) pcib1: irq 16 at device 2.0 on pci0 pci1: on pcib1 pcib2: at device 0.0 on pci1 pci2: on pcib2 em0: port 0xc880-0xc8bf mem 0xfce00000-0xfce3ffff,0xfcec0000-0xfcedffff irq 24 at device 3.0 on pci2 em0: Ethernet address: 00:04:23:b7:6c:4c em0: Speed:N/A Duplex:N/A em1: port 0xcc00-0xcc3f mem 0xfce80000-0xfcebffff,0xfcee0000-0xfcefffff irq 27 at device 3.1 on pci2 em1: Ethernet address: 00:04:23:b7:6c:4d em1: Speed:N/A Duplex:N/A pci1: at device 0.1 (no driver attached) pcib3: at device 0.2 on pci1 pci3: on pcib3 em2: port 0xd880-0xd8bf mem 0xfcfa0000-0xfcfbffff irq 54 at device 4.0 on pci3 em2: Ethernet address: 00:0e:0c:4e:2f:d0 em2: Speed:N/A Duplex:N/A em3: port 0xdc00-0xdc3f mem 0xfcfe0000-0xfcffffff irq 55 at device 4.1 on pci3 em3: Ethernet address: 00:0e:0c:4e:2f:d1 em3: Speed:N/A Duplex:N/A pci1: at device 0.3 (no driver attached) uhci0: port 0xb800-0xb81f irq 16 at device 29.0 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xb880-0xb89f irq 19 at device 29.1 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xbc00-0xbc1f irq 18 at device 29.2 on pci0 usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered pci0: at device 29.7 (no driver attached) pcib4: at device 30.0 on pci0 pci4: on pcib4 pci4: at device 12.0 (no driver attached) isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xfc00-0xfc0f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 atapci1: port 0xac00-0xac0f,0xb000-0xb003,0xb080-0xb087,0xb400-0xb403,0xb480-0xb487 irq 18 at device 31.2 on pci0 ata2: channel #0 on atapci1 ata3: channel #1 on atapci1 pci0: at device 31.3 (no driver attached) acpi_button0: on acpi0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 psm0: irq 12 on atkbdc0 psm0: model IntelliMouse Explorer, device ID 4 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 orm0: at iomem 0xd1000-0xd1fff,0xd0000-0xd0fff,0xcf000-0xcffff,0xce000-0xcefff,0xca800-0xcdfff,0xc0000-0xca7ff on isa0 pmtimer0 on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2992518045 Hz quality 800 Timecounters tick every 10.000 msec md0: Preloaded image 4423680 bytes at 0xc09dde24 acd0: CDRW at ata0-master PIO4 ad4: 239372MB [486344/16/63] at ata2-master SATA150 ad6: 239372MB [486344/16/63] at ata3-master SATA150 Mounting root from ufs:/dev/md0 em2: Link is up 100 Mbps Full Duplex Output of pciconf -l -v: hostb0@pci0:0:0: class=0x060000 card=0x10798086 chip=0x35908086 rev=0x0a hdr=0x00 class = bridge subclass = HOST-PCI none0@pci0:0:1: class=0xff0000 card=0x10798086 chip=0x35918086 rev=0x0a hdr=0x00 none1@pci0:1:0: class=0x088000 card=0x10798086 chip=0x35948086 rev=0x0a hdr=0x00 class = base peripheral pcib1@pci0:2:0: class=0x060400 card=0x00000050 chip=0x35958086 rev=0x0a hdr=0x01 class = bridge subclass = PCI-PCI uhci0@pci0:29:0: class=0x0c0300 card=0x10798086 chip=0x24d28086 rev=0x02 hdr=0x00 class = serial bus subclass = USB uhci1@pci0:29:1: class=0x0c0300 card=0x10798086 chip=0x24d48086 rev=0x02 hdr=0x00 class = serial bus subclass = USB uhci2@pci0:29:2: class=0x0c0300 card=0x10798086 chip=0x24d78086 rev=0x02 hdr=0x00 class = serial bus subclass = USB none2@pci0:29:7: class=0x0c0320 card=0x10798086 chip=0x24dd8086 rev=0x02 hdr=0x00 class = serial bus subclass = USB pcib4@pci0:30:0: class=0x060400 card=0x00000000 chip=0x244e8086 rev=0xc2 hdr=0x01 class = bridge subclass = PCI-PCI isab0@pci0:31:0: class=0x060100 card=0x00000000 chip=0x24d08086 rev=0x02 hdr=0x00 class = bridge subclass = PCI-ISA atapci0@pci0:31:1: class=0x01018a card=0x10798086 chip=0x24db8086 rev=0x02 hdr=0x00 class = mass storage subclass = ATA atapci1@pci0:31:2: class=0x01048f card=0x34388086 chip=0x24df8086 rev=0x02 hdr=0x00 class = mass storage subclass = RAID none3@pci0:31:3: class=0x0c0500 card=0x10798086 chip=0x24d38086 rev=0x02 hdr=0x00 class = serial bus subclass = SMBus pcib2@pci1:0:0: class=0x060400 card=0x00000044 chip=0x03298086 rev=0x09 hdr=0x01 class = bridge subclass = PCI-PCI none4@pci1:0:1: class=0x080020 card=0x10798086 chip=0x03268086 rev=0x09 hdr=0x00 class = base peripheral subclass = interrupt controller pcib3@pci1:0:2: class=0x060400 card=0x00000044 chip=0x032a8086 rev=0x09 hdr=0x01 class = bridge subclass = PCI-PCI none5@pci1:0:3: class=0x080020 card=0x10798086 chip=0x03278086 rev=0x09 hdr=0x00 class = base peripheral subclass = interrupt controller em0@pci2:3:0: class=0x020000 card=0x11798086 chip=0x10798086 rev=0x03 hdr=0x00 class = network subclass = ethernet em1@pci2:3:1: class=0x020000 card=0x11798086 chip=0x10798086 rev=0x03 hdr=0x00 class = network subclass = ethernet em2@pci3:4:0: class=0x020000 card=0x10798086 chip=0x10798086 rev=0x03 hdr=0x00 class = network subclass = ethernet em3@pci3:4:1: class=0x020000 card=0x10798086 chip=0x10798086 rev=0x03 hdr=0x00 class = network subclass = ethernet none6@pci4:12:0: class=0x030000 card=0x10798086 chip=0x47521002 rev=0x27 hdr=0x00 class = display subclass = VGA From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 12:40:08 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7C3E16A41C for ; Wed, 22 Jun 2005 12:40:08 +0000 (GMT) (envelope-from kamalpr@yahoo.com) Received: from web52702.mail.yahoo.com (web52702.mail.yahoo.com [206.190.39.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 645BC43D1D for ; Wed, 22 Jun 2005 12:40:07 +0000 (GMT) (envelope-from kamalpr@yahoo.com) Received: (qmail 75762 invoked by uid 60001); 22 Jun 2005 12:40:07 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=z+B/qY6TRGM2NEhRmoPpFDrZVqxgOROhgEzl++m4Zs/vdTDcPU0N+xYc5Zg4zWomoC3bd0Ar5ajuV1oWqKVZOGcUCARia1P0h4cTroWXaYv66cHqqYNcuXrMnhDIV2MXXRrZsaMEWKQE9T/T59dA6jkoctGGpMC3Vo9T4axUjK0= ; Message-ID: <20050622124007.75760.qmail@web52702.mail.yahoo.com> Received: from [210.18.86.20] by web52702.mail.yahoo.com via HTTP; Wed, 22 Jun 2005 05:40:06 PDT Date: Wed, 22 Jun 2005 05:40:06 -0700 (PDT) From: "Kamal R. Prasad" To: Peter Edwards , Charles Sprickman In-Reply-To: <34cb7c840506210750f7458cf@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: hackers@freebsd.org Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kamalp@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 12:40:08 -0000 [snip] > at least some assumptions that the child won't be > doing much before > execing or exiting. (But Im sure one of the The child process should be able to call any system calls it likes -without assuming that pthreads from the parent process have been copied over to the child process. I spose most implementations support that. regards -kamal ------------------------------------------------------------ Kamal R. Prasad UNIX systems consultant http://members.fortunecity.com/kamalp kamalp@acm.org In theory, there is no difference between theory and practice. In practice, there is. ------------------------------------------------------------ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 12:40:43 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BADB16A41C for ; Wed, 22 Jun 2005 12:40:43 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBD0E43D55 for ; Wed, 22 Jun 2005 12:40:42 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id 9F0E186E2B; Wed, 22 Jun 2005 14:40:39 +0200 (CEST) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09460-09; Wed, 22 Jun 2005 14:40:35 +0200 (CEST) Received: from firewall.demig (p50839530.dip0.t-ipconnect.de [80.131.149.48]) by server.absolute-media.de (Postfix) with ESMTP id D66B186BEA; Wed, 22 Jun 2005 14:40:34 +0200 (CEST) Received: from ws-ew-3 (ws-ew-3.w2kdemig [192.168.1.72]) by firewall.demig (8.13.4/8.13.1) with SMTP id j5MCcIv5039915; Wed, 22 Jun 2005 14:38:18 +0200 (CEST) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: "Maksim Yevmenkin" Date: Wed, 22 Jun 2005 14:38:17 +0200 Message-ID: <000001c57727$43c5e600$4801a8c0@ws-ew-3.W2KDEMIG> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal In-Reply-To: <42ADB4F8.5040701@savvis.net> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Cc: "Freebsd-Hackers@Freebsd.Org" Subject: RE: using vkbd device 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, 22 Jun 2005 12:40:43 -0000 Hello, I did some more testing with kbdmux. 1. I wait for the screen saver becoming active. 2. I press the control key. 3. All keys, I press after that, come as control keys, e.g. I press 'j' or 'J' and see a linefeed, I press 'I' and see a tab. 4. I wait a second time for the screen saver. 5. I press control. 6. The keys are ok now. Does syscons eat up the key but sets the state in kbdmux? Norbert From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 12:46:09 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0F3416A41F for ; Wed, 22 Jun 2005 12:46:09 +0000 (GMT) (envelope-from stefan@aeschbacher.ch) Received: from mx.nts.ch (mail.nts.ch [212.103.67.20]) by mx1.FreeBSD.org (Postfix) with SMTP id D896E43D55 for ; Wed, 22 Jun 2005 12:46:08 +0000 (GMT) (envelope-from stefan@aeschbacher.ch) Received: (qmail 20106 invoked by uid 7650); 22 Jun 2005 12:49:51 -0000 Received: from stefan@aeschbacher.ch by bernoulli by uid 64011 with qmail-scanner-1.21 (f-prot: 4.4.1/3.14.11. spamassassin: 2.63. Clear:RC:1(212.103.64.3):. Processed in 0.021133 secs); 22 Jun 2005 12:49:51 -0000 Received: from localhost ([212.103.64.3]) by mx.nts.ch ([192.168.123.34]) with ESMTP via TCP; 22 Jun 2005 12:49:51 -0000 Received: from ftp.nts.ch (ftp.nts.ch [212.103.67.6]) by horde.nts.ch (IMP) with HTTP for ; Wed, 22 Jun 2005 14:46:29 +0200 Message-ID: <1119444389.42b95da5b3b1d@horde.nts.ch> Date: Wed, 22 Jun 2005 14:46:29 +0200 From: stefan@aeschbacher.ch To: hackers@freebsd.org References: <1119443811.42b95b63d6299@horde.nts.ch> In-Reply-To: <1119443811.42b95b63d6299@horde.nts.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.3-cvs X-Originating-IP: 212.103.67.6 Cc: Subject: Re: Intel SRCS16 Was: (no subject) 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, 22 Jun 2005 12:46:09 -0000 apologies for the ommited subject Stefan Zitat von stefan@aeschbacher.ch: > Hi list > > I have an Intel Motherboard with a SRCS16 raid controller. According to > amr(4), this controller should be supported. Unfortunately the 5.4 > Install > CD does not recognize the raid controller. Loading amr before booting > does > not help (results in the error message seen in the dmesg below). When > booting normally, the amr module is not loaded. > > Now I have the following questions: > > Is this version of the Intel Controller not supported? If this is the > case, > is there a simple solution to get it recognized? (a quick glance at the > amr > code was not enough to enlighten me) > > Is there an easy way to setup gmirror with the install CD in case the > controller does not work? (even when loaded the geom_mirror module, the > gmirror tool does not know about the 'label' command) > > > thanks > > Stefan > > > dmesg: > Copyright (c) 1992-2005 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights > reserved. > FreeBSD 5.4-RELEASE #0: Sun May 8 10:21:06 UTC 2005 > root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > module_register: module amr/amrd already exists! > Module amr/amrd failed to register: 17 > module_register: module pci/amr already exists! > Module pci/amr failed to register: 17 > ACPI APIC Table: > Timecounter "i8254" frequency 1193182 Hz quality 0 > CPU: Intel(R) Xeon(TM) CPU 3.00GHz (2992.52-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0xf41 Stepping = 1 > > Features=0xbfebfbff > real memory = 1073610752 (1023 MB) > avail memory = 1036853248 (988 MB) > ioapic0 irqs 0-23 on motherboard > ioapic1 irqs 24-47 on motherboard > ioapic2 irqs 48-71 on motherboard > npx0: on motherboard > npx0: INT 16 interface > acpi0: on motherboard > acpi0: Power Button (fixed) > Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 > cpu0: on acpi0 > acpi_throttle0: on cpu0 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > pci0: at device 0.1 (no driver attached) > pci0: at device 1.0 (no driver attached) > pcib1: irq 16 at device 2.0 on pci0 > pci1: on pcib1 > pcib2: at device 0.0 on pci1 > pci2: on pcib2 > > em0: 1.7.35> > port 0xc880-0xc8bf mem 0xfce00000-0xfce3ffff,0xfcec0000-0xfcedffff irq > 24 > at device 3.0 on pci2 > em0: Ethernet address: 00:04:23:b7:6c:4c > em0: Speed:N/A Duplex:N/A > > em1: 1.7.35> > port 0xcc00-0xcc3f mem 0xfce80000-0xfcebffff,0xfcee0000-0xfcefffff irq > 27 > at device 3.1 on pci2 > em1: Ethernet address: 00:04:23:b7:6c:4d > em1: Speed:N/A Duplex:N/A > pci1: at device 0.1 (no driver > attached) > pcib3: at device 0.2 on pci1 > pci3: on pcib3 > > em2: 1.7.35> > port 0xd880-0xd8bf mem 0xfcfa0000-0xfcfbffff irq 54 at device 4.0 on > pci3 > em2: Ethernet address: 00:0e:0c:4e:2f:d0 > em2: Speed:N/A Duplex:N/A > > em3: 1.7.35> > port 0xdc00-0xdc3f mem 0xfcfe0000-0xfcffffff irq 55 at device 4.1 on > pci3 > em3: Ethernet address: 00:0e:0c:4e:2f:d1 > em3: Speed:N/A Duplex:N/A > pci1: at device 0.3 (no driver > attached) uhci0: > port > 0xb800-0xb81f irq 16 at device 29.0 on pci0 > usb0: on uhci0 > usb0: USB revision 1.0 > uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > uhub0: 2 ports with 2 removable, self powered > > uhci1: port > 0xb880-0xb89f irq 19 at device 29.1 on pci0 > usb1: on uhci1 > usb1: USB revision 1.0 > uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > > uhub1: 2 ports with 2 removable, self powered > uhci2: port 0xbc00-0xbc1f irq > 18 > at device 29.2 on pci0 > usb2: on uhci2 > usb2: USB revision 1.0 > uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > uhub2: 2 ports with 2 removable, self powered > pci0: at device 29.7 (no driver attached) > pcib4: at device 30.0 on pci0 > pci4: on pcib4 > pci4: at device 12.0 (no driver attached) > isab0: at device 31.0 on pci0 > > isa0: on isab0 > atapci0: port > 0xfc00-0xfc0f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 > ata0: channel #0 on atapci0 > > ata1: channel #1 on atapci0 > atapci1: port > 0xac00-0xac0f,0xb000-0xb003,0xb080-0xb087,0xb400-0xb403,0xb480-0xb487 > irq > 18 at device 31.2 on pci0 > ata2: channel #0 on atapci1 > ata3: channel #1 on atapci1 > pci0: at device 31.3 (no driver attached) > acpi_button0: on acpi0 > atkbdc0: port 0x64,0x60 irq 1 on acpi0 > atkbd0: irq 1 on atkbdc0 > kbd0 at atkbd0 > psm0: irq 12 on atkbdc0 > psm0: model IntelliMouse Explorer, device ID 4 > sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on > acpi0 > sio0: type 16550A > sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 > sio1: type 16550A > > fdc0: port > 0x3f7,0x3f0-0x3f5 > irq 6 drq 2 on acpi0 > orm0: at iomem > 0xd1000-0xd1fff,0xd0000-0xd0fff,0xcf000-0xcffff,0xce000-0xcefff,0xca800-0xcdfff,0xc0000-0xca7ff > on isa0 > pmtimer0 on isa0 > ppc0: parallel port not found. > sc0: at flags 0x100 on isa0 > sc0: VGA <16 virtual consoles, flags=0x300> > vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on > isa0 > Timecounter "TSC" frequency 2992518045 Hz quality 800 > Timecounters tick every 10.000 msec > md0: Preloaded image 4423680 bytes at 0xc09dde24 > acd0: CDRW at ata0-master PIO4 > ad4: 239372MB [486344/16/63] at ata2-master > SATA150 > ad6: 239372MB [486344/16/63] at ata3-master > SATA150 > Mounting root from ufs:/dev/md0 > em2: Link is up 100 Mbps Full Duplex > > Output of pciconf -l -v: > hostb0@pci0:0:0: class=0x060000 card=0x10798086 chip=0x35908086 > rev=0x0a hdr=0x00 > class = bridge > subclass = HOST-PCI > none0@pci0:0:1: class=0xff0000 card=0x10798086 chip=0x35918086 rev=0x0a > hdr=0x00 > none1@pci0:1:0: class=0x088000 card=0x10798086 chip=0x35948086 rev=0x0a > hdr=0x00 > class = base peripheral > pcib1@pci0:2:0: class=0x060400 card=0x00000050 chip=0x35958086 rev=0x0a > hdr=0x01 > class = bridge > subclass = PCI-PCI > uhci0@pci0:29:0: class=0x0c0300 card=0x10798086 chip=0x24d28086 > rev=0x02 hdr=0x00 > class = serial bus > subclass = USB > uhci1@pci0:29:1: class=0x0c0300 card=0x10798086 chip=0x24d48086 > rev=0x02 hdr=0x00 > class = serial bus > subclass = USB > uhci2@pci0:29:2: class=0x0c0300 card=0x10798086 chip=0x24d78086 > rev=0x02 hdr=0x00 > class = serial bus > subclass = USB > none2@pci0:29:7: class=0x0c0320 card=0x10798086 chip=0x24dd8086 > rev=0x02 hdr=0x00 > class = serial bus > subclass = USB > pcib4@pci0:30:0: class=0x060400 card=0x00000000 chip=0x244e8086 > rev=0xc2 hdr=0x01 > class = bridge > subclass = PCI-PCI > isab0@pci0:31:0: class=0x060100 card=0x00000000 chip=0x24d08086 > rev=0x02 hdr=0x00 > class = bridge > subclass = PCI-ISA > atapci0@pci0:31:1: class=0x01018a card=0x10798086 chip=0x24db8086 > rev=0x02 hdr=0x00 > class = mass storage > subclass = ATA > atapci1@pci0:31:2: class=0x01048f card=0x34388086 chip=0x24df8086 > rev=0x02 hdr=0x00 > class = mass storage > subclass = RAID > none3@pci0:31:3: class=0x0c0500 card=0x10798086 chip=0x24d38086 > rev=0x02 hdr=0x00 > class = serial bus > subclass = SMBus > pcib2@pci1:0:0: class=0x060400 card=0x00000044 chip=0x03298086 rev=0x09 > hdr=0x01 > class = bridge > subclass = PCI-PCI > none4@pci1:0:1: class=0x080020 card=0x10798086 chip=0x03268086 rev=0x09 > hdr=0x00 > class = base peripheral > subclass = interrupt controller > pcib3@pci1:0:2: class=0x060400 card=0x00000044 chip=0x032a8086 rev=0x09 > hdr=0x01 > class = bridge > subclass = PCI-PCI > none5@pci1:0:3: class=0x080020 card=0x10798086 chip=0x03278086 rev=0x09 > hdr=0x00 > class = base peripheral > subclass = interrupt controller > em0@pci2:3:0: class=0x020000 card=0x11798086 chip=0x10798086 rev=0x03 > hdr=0x00 > class = network > subclass = ethernet > em1@pci2:3:1: class=0x020000 card=0x11798086 chip=0x10798086 rev=0x03 > hdr=0x00 > class = network > subclass = ethernet > em2@pci3:4:0: class=0x020000 card=0x10798086 chip=0x10798086 rev=0x03 > hdr=0x00 > class = network > subclass = ethernet > em3@pci3:4:1: class=0x020000 card=0x10798086 chip=0x10798086 rev=0x03 > hdr=0x00 > class = network > subclass = ethernet > none6@pci4:12:0: class=0x030000 card=0x10798086 chip=0x47521002 > rev=0x27 hdr=0x00 > class = display > subclass = VGA > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 13:00:41 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD7F216A41C for ; Wed, 22 Jun 2005 13:00:41 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98B8043D48 for ; Wed, 22 Jun 2005 13:00:41 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id B890D86DCA; Wed, 22 Jun 2005 15:00:39 +0200 (CEST) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10433-10; Wed, 22 Jun 2005 15:00:35 +0200 (CEST) Received: from firewall.demig (p50839530.dip0.t-ipconnect.de [80.131.149.48]) by server.absolute-media.de (Postfix) with ESMTP id E46C086E4B; Wed, 22 Jun 2005 15:00:34 +0200 (CEST) Received: from ws-ew-3 (ws-ew-3.w2kdemig [192.168.1.72]) by firewall.demig (8.13.4/8.13.1) with SMTP id j5MCwrqa040964; Wed, 22 Jun 2005 14:58:53 +0200 (CEST) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: , "Peter Edwards" , "Charles Sprickman" Date: Wed, 22 Jun 2005 14:58:52 +0200 Message-ID: <000801c5772a$23dac9c0$4801a8c0@ws-ew-3.W2KDEMIG> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: <20050622124007.75760.qmail@web52702.mail.yahoo.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Cc: hackers@freebsd.org Subject: RE: Nagios and threads 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, 22 Jun 2005 13:00:42 -0000 > [snip] > > at least some assumptions that the child won't be > > doing much before > > execing or exiting. (But Im sure one of the > > The child process should be able to call any system > calls it likes -without assuming that pthreads from > the parent process have been copied over to the child > process. I spose most implementations support that. > > regards > -kamal >From "Programming with POSIX Threads" [David R. Butenhof]: p.197-198: ... Avoid using fork in a threaded program (if you can) unless you intend to exec a new program immediately ... Pthreads does not "terminate" the other threads in a forked process. ... They simple cease to exist. ... The state of mutexes is not affected by a fork. If it was locked in the parent it is locked in the child! Norbert From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 14:24:11 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2762316A41C for ; Wed, 22 Jun 2005 14:24:11 +0000 (GMT) (envelope-from peadar.edwards@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E53F343D53 for ; Wed, 22 Jun 2005 14:24:10 +0000 (GMT) (envelope-from peadar.edwards@gmail.com) Received: by zproxy.gmail.com with SMTP id 13so284364nzp for ; Wed, 22 Jun 2005 07:24:07 -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=SnEYcgUciwbKLsvEsSqXY6Y20zjYVQwE0/TQ+4eUcTOuoAfW7BSi/N+rPlt7irW26TwdmV0XOQLguwAT6YaByymu+CQW3QyuaCF8JoitUkEiDNaq0bMR7q98tKuwXoLUNPOFxKsHN3Yb6P25a0rHCGOhYFvghvdCI2PawHyfmz0= Received: by 10.36.222.2 with SMTP id u2mr588615nzg; Wed, 22 Jun 2005 07:24:07 -0700 (PDT) Received: by 10.36.68.15 with HTTP; Wed, 22 Jun 2005 07:24:07 -0700 (PDT) Message-ID: <34cb7c8405062207246b582eaf@mail.gmail.com> Date: Wed, 22 Jun 2005 15:24:07 +0100 From: Peter Edwards To: kamalp@acm.org In-Reply-To: <20050622124007.75760.qmail@web52702.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <34cb7c840506210750f7458cf@mail.gmail.com> <20050622124007.75760.qmail@web52702.mail.yahoo.com> Cc: Charles Sprickman , hackers@freebsd.org Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Peter Edwards List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 14:24:11 -0000 On 6/22/05, Kamal R. Prasad wrote: > [snip] > > at least some assumptions that the child won't be > > doing much before > > execing or exiting. (But Im sure one of the >=20 > The child process should be able to call any system > calls it likes -without assuming that pthreads from > the parent process have been copied over to the child > process. I spose most implementations support that. >=20 There's more to it than system calls, though (most (all?) of which will be async-signal-safe anyway). Simple example: any lock that the libc implementation needs to provide its functionality may be arbitrarily locked by some other thread: eg, one thread calls malloc() as another calls fork(): the original thread ceases to exist in the child while holding a lock in malloc, leaving malloc() unusable in the process. It may be that FreeBSD is less tolerant of this than other OSes, and the failure may occur more frequently, but I'm not sure that there's anything wrong with it per se. From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 14:25:29 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DEF416A41C for ; Wed, 22 Jun 2005 14:25:29 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C591D43D55 for ; Wed, 22 Jun 2005 14:25:26 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j5MEPJHq029069; Wed, 22 Jun 2005 10:25:19 -0400 (EDT) Date: Wed, 22 Jun 2005 10:25:19 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Norbert Koch In-Reply-To: <000801c5772a$23dac9c0$4801a8c0@ws-ew-3.W2KDEMIG> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: Charles Sprickman , hackers@freebsd.org, kamalp@acm.org, Peter Edwards Subject: RE: Nagios and threads 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, 22 Jun 2005 14:25:29 -0000 On Wed, 22 Jun 2005, Norbert Koch wrote: > > [snip] > > > at least some assumptions that the child won't be > > > doing much before > > > execing or exiting. (But Im sure one of the > > > > The child process should be able to call any system > > calls it likes -without assuming that pthreads from > > the parent process have been copied over to the child > > process. I spose most implementations support that. > > > > regards > > -kamal > > >From "Programming with POSIX Threads" [David R. Butenhof]: > > p.197-198: > ... Avoid using fork in a threaded program (if you can) > unless you intend to exec a new program immediately > ... Pthreads does not "terminate" the other threads > in a forked process. ... They simple cease to exist. > ... The state of mutexes is not affected by a fork. If > it was locked in the parent it is locked in the child! Yes, and realize that both libc and libpthread are consumers themselves of mutexes (and CVs). Also, some system calls are wrapped by libpthread to provide cancellation points. Unless you exec after the fork, you may be relying on inconsistent mutex state. -- DE From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 14:31:46 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF8A916A427 for ; Wed, 22 Jun 2005 14:31:45 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2BBC43D1D for ; Wed, 22 Jun 2005 14:31:45 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j5MEVfWS006455; Wed, 22 Jun 2005 10:31:41 -0400 (EDT) Date: Wed, 22 Jun 2005 10:31:41 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Peter Edwards In-Reply-To: <34cb7c8405062207246b582eaf@mail.gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: Charles Sprickman , hackers@freebsd.org, kamalp@acm.org Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 14:31:46 -0000 On Wed, 22 Jun 2005, Peter Edwards wrote: > On 6/22/05, Kamal R. Prasad wrote: > > > > The child process should be able to call any system > > calls it likes -without assuming that pthreads from > > the parent process have been copied over to the child > > process. I spose most implementations support that. > > > > There's more to it than system calls, though (most (all?) of which > will be async-signal-safe anyway). Simple example: any lock that the > libc implementation needs to provide its functionality may be > arbitrarily locked by some other thread: eg, one thread calls malloc() > as another calls fork(): the original thread ceases to exist in the > child while holding a lock in malloc, leaving malloc() unusable in the > process. We do protect the malloc lock across a fork(), but that's it. -- DE From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 14:43:29 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E502016A41C for ; Wed, 22 Jun 2005 14:43:29 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7B8043D55 for ; Wed, 22 Jun 2005 14:43:29 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j5MEh9Rn092821; Wed, 22 Jun 2005 07:43:09 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j5MEh6cg092820; Wed, 22 Jun 2005 07:43:06 -0700 (PDT) (envelope-from rizzo) Date: Wed, 22 Jun 2005 07:43:06 -0700 From: Luigi Rizzo To: Charles Sprickman Message-ID: <20050622074306.C92493@xorpc.icir.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from spork@fasttrackmonkey.com on Mon, Jun 20, 2005 at 04:56:36PM -0400 Cc: hackers@freebsd.org Subject: Re: Nagios and threads 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, 22 Jun 2005 14:43:30 -0000 --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline reading also the continuation of this mail thread, I wonder if there is any relationship with this issue i found a few days ago debugging asterisk. It happens when linking the code with libc_r, but maybe some of the bugs in libc_r were also imported in other thread libraries. cheers luigi -------------------- Probably a known issue, but I thought it worthwhile reporting it, if nothing else for archival purposes. I think our userland thread library (libc_r) has some bugs in handling descriptors. I can reproduce the behaviour on -current and 4.x, and I believe it applies to 5.x too. Following is a description of the problem and some code to replicate it The code includes a workaround but it is not particularly nice. Any better ideas ? I am not sure on what to do, but perhaps the only sensible thing to do is to add a note with this workaround (or better ones, if available) to our pthreads manpage --- PROBLEM DESCRIPTION --- Basically, our libc_r keeps two views of i/o descriptors, one (external) is for threads and reflects the modes requested by the threads (blocking or not, etc.); the "internal" view instead is how descriptors are actually set in the kernel -- and there they should always be set as O_NONBLOCK to avoid blocking on a syscall. The bug occurs when a process does a fork(), and then either a close() or an exec() -- a similar thing also occurs with popen(). The relevant source code is in /usr/src/lib/libc_r/uthread/uthread_execve.c /usr/src/lib/libc_r/uthread/uthread_close.c Right before the exec(), the internal descriptors are put into blocking mode if the external one are blocking, and they are only reset to O_NONBLOCK after termination of the child (upon SIGCHLD). The same occurs for close(). Note that close() has hacks to leave pipes alone, but the same code is not present in the execve() case where instead I believe it would be necessary. Another thing to note is that there is some kind of 'fate sharing' among the stdio descriptors (0, 1, 2) which is not totally clear to me, but seems to require setting O_NONBLOCK on all 3 to make sure that they are not changed to blocking mode. Because descriptors are shared between parent and child, for the lifetime of the child descriptors in the parent will be blocking and the scheduling of threads will be completely broken. The only fix i have found is to act as follows: pipe(fd); /* create a pipe with the child */ p = fork(); if (p == 0) { /* child */ /* call fcntl() _before_ close() to avoid resetting * O_NONBLOCK on the internal descriptors. After that, * close the descriptors not needed in the child. */ for (i=0; i < getdtablesize(); i++) { long fl = fcntl(i, F_GETFL); if (fl != -1 && i != fd[0]) { /* open and must be closed in the child */ fcntl(i, F_SETFL, O_NONBLOCK | fl); close(i); } } /* standard stuff (dup2, exec*()... */ dup2(fd[0], STDOUT_FILENO); /* as an example */ execl(....); } else { /* parent */ close(fd[0]); /* close child end. */ ... } but of course this is rather unintuitive. On the other hand, I have no idea of a better way to address the problem, and being fairly new to threads programming maybe others know better. I am attaching two minimal programs to demonstrate the bug. simple.c is a simple program (linked against the regular C library) cc -o simple simple.c that only plays with blocking mode on the descriptors. thre.c is meant to be linked with libc_r. cc -o thre thre.c -lc_r It does a fork and exec of the other program. If you call it without arguments, it does not implement the above workaround, and you see how the 'internal' descriptor change to blocking mode. If you call it with an argument, it implements the workaround. enjoy luigi On Mon, Jun 20, 2005 at 04:56:36PM -0400, Charles Sprickman wrote: > Hello, > > Just curious if there's any regulars here who would like to help Ethan > out: > > http://nagios.sourceforge.net/docs/2_0/whatsnew.html > > "Known Issues > > There are a few known issues with the Nagios 2.0 code at the moment. > Hopefully some of these will be fixed before 2.0 is released as stable... > > 1. FreeBSD and threads. On FreeBSD there's a native user-level > implementation of threads called 'pthread' and there's also an optional > ports collection 'linuxthreads' that uses kernel hooks. Some folks from > Yahoo! have reported that using the pthread library causes Nagios to pause > under heavy I/O load, causing some service check results to be lost. > Switching to linuxthreads seems to help this problem, but not fix it. The > lock happens in liblthread's __pthread_acquire() - it can't ever acquire > the spinlock. It happens when the main thread forks to execute an active > check. On the second fork to create the grandchild, the grandchild is > created by fork, but never returns from liblthread's fork wrapper, because > it's stuck in __pthread_acquire(). Maybe some FreeBSD users can help out > with this problem." > > Thanks, > > Charles > _______________________________________________ > 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" --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="thre.c" /* * test descriptor issues on threads. * * compile with cc -o thre -lc_r thre.c */ #include #include #include #include int dump_desc(char *s, int w) { int i; fprintf(stderr, "-- [pid %d thr %p] %s --\n", getpid(), pthread_self(), s); for (i=0; i<8; i++) { fprintf(stderr, "fd %d flags 0x%lx (system 0x%lx)\n", i, _thread_fd_getflags(i), __sys_fcntl(i, F_GETFL)); } sleep(w); return 0; } int main(int argc, char *argv[]) { pid_t p; int i, fd[2]; pipe(fd); fprintf(stderr, "child-end %d parent end %d max %d\n", fd[0], fd[1], getdtablesize()); dump_desc("start main", 0); p = fork(); if (p == 0) { /* child */ /* * close parent's end. It's a pipe so O_NONBLOCK remains. * You can also do it in the loop below. */ close(fd[1]); /* * First tell libc_r to leave O_NONBLOCK on the descriptors * even after a close() or exec(), * _After_ that, close() all descriptors you don't need * in the child, because they are shared and the child * could change their mode in unexpected way causing us * trouble. * You can limit the loop (getdtablesize() is often large) * but at least make sure to act on the descriptor you are * using on the parent threads in blocking mode. */ if (argc > 1) for (i=0; i < getdtablesize(); i++) { long fl = fcntl(i, F_GETFL); if (fl != -1 && i != fd[0]) { /* open and must be closed in the child */ fcntl(i, F_SETFL, O_NONBLOCK | fl); close(i); } } dup2(fd[0], STDOUT_FILENO); sleep(2); /* * now we can finally exec a process without risking * trouble. The process will only play with its own * side of the pipes, which is not shared by the parent * and so any action on it does not change the status * on the parent side. * The example process below does some weird things * with the descriptors, and we use it to show that it * does not harm us. */ execl("./simple", "simple", "2", NULL); } else { /* parent */ close(fd[0]); /* close child end of the pipe */ sleep(1); dump_desc("parent", 2); dump_desc("parent after exec done", 2); dump_desc("parent after child fcntl", 2); dump_desc("parent after child dead", 0); } return 0; } --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="simple.c" /* * test descriptor issues on threads. * * compile with cc -o simple simple.c */ #include #include #include int main(int argc, char *argv[]) { pid_t p; int fd[2]; FILE *f; pipe(fd); sleep(atoi(argv[1])); dup2(fd[0], STDOUT_FILENO); fcntl(0, F_SETFL, ~O_NONBLOCK & fcntl(0, F_GETFL)); fcntl(1, F_SETFL, ~O_NONBLOCK & fcntl(1, F_GETFL)); fcntl(2, F_SETFL, ~O_NONBLOCK & fcntl(2, F_GETFL)); sleep(atoi(argv[1])); return 0; } --EVF5PPMfhYS0aIcm-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 15:24:19 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43C4516A4E9 for ; Wed, 22 Jun 2005 15:24:17 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [69.194.102.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 707D743D48 for ; Wed, 22 Jun 2005 15:24:17 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 68DD951226; Wed, 22 Jun 2005 11:24:16 -0400 (EDT) Date: Wed, 22 Jun 2005 11:24:16 -0400 From: Kris Kennaway To: GiZmen Message-ID: <20050622152416.GA18990@xor.obsecurity.org> References: <20050620175031.GA50395@procent.t2.ds.pwr.wroc.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <20050620175031.GA50395@procent.t2.ds.pwr.wroc.pl> User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org Subject: Re: instability with mount_nullfs and jails 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, 22 Jun 2005 15:24:19 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 20, 2005 at 07:50:31PM +0200, GiZmen wrote: > hi, >=20 > I have problem with mount_nullfs and jails. My system FreeBSD 5.4-STABLE > when have two jails and each of this jails has couple mount_nullfs freeze > without kernel panic. It freezes out in random times. Sometimes it can run > for couple days sometimes it freezes after couple hours. >=20 > I have mount points like below: >=20 > root@procent:~# mount > /dev/ad0s1a on / (ufs, local) > devfs on /dev (devfs, local, multilabel) > /dev/ad0s1e on /tmp (ufs, local, nodev, nosuid, nosymfollow, soft-updates= , multilabel, acls) > /dev/ad0s1f on /usr (ufs, local, nodev, soft-updates, multilabel, acls) > /dev/ad0s1d on /var (ufs, local, nodev, nosuid, soft-updates, multilabel,= acls) > /usr/local/bandwidthd/htdocs on /usr/jails/httpd/www/traf (nullfs, local,= nodev, noexec, nosuid, read-only) > /usr/local/share/pear on /usr/jails/httpd/lib/php/pear (nullfs, local, no= dev, noexec, nosuid, read-only) > /usr/local/share/smarty on /usr/jails/httpd/lib/php/smarty (nullfs, local= , nodev, noexec, nosuid, read-only) > /usr/local/lib/php/20020429 on /usr/jails/httpd/lib/php/20020429 (nullfs,= local, nodev, noexec, nosuid, read-only) > /usr/local/libexec/apache on /usr/jails/httpd/libexec/apache (nullfs, loc= al, nodev, noexec, nosuid, read-only) > /usr/local/etc/php on /usr/jails/httpd/etc/php (nullfs, local, nodev, noe= xec, nosuid, read-only) > /usr/local/bin on /usr/jails/httpd/bin (nullfs, local, nodev, nosuid, rea= d-only) > devfs on /usr/jails/httpd/dev (devfs, local, multilabel) > /dev/ad0s1g.bde on /crypto (ufs, local, noatime, nodev, nosuid, synchrono= us, soft-updates, multilabel, acls) > /dev/ad2s1a.bde on /crypto2 (ufs, local, noatime, nodev, nosuid, synchron= ous, soft-updates, multilabel, acls) > /crypto/home on /usr/jails/users/home (nullfs, local, nodev) > /crypto/home on /usr/jails/httpd/home (nullfs, local, nodev, noexec, nosu= id) >=20 > from fstab.sshd: >=20 > /bin /usr/jails/users/bin nullfs ro,nosuid,nodev = 0 0 > /sbin /usr/jails/users/sbin nullfs ro,nodev 0 = 0 > /usr/ports /usr/jails/users/usr/ports nullfs rw,nosuid,nodev 0= 0 > /usr/include /usr/jails/users/usr/include nullfs ro,nosuid,noexec,= nodev 0 0 > /usr/share /usr/jails/users/usr/share nullfs ro,nosuid,nodev,noexe= c 0 0 > /usr/lib /usr/jails/users/usr/lib nullfs ro,nosuid,nodev = 0 0 > #/lib /usr/jails/users/lib nullfs ro,nosuid,nodev,noex= ec 0 0 > #/libexec /usr/jails/users/libexec nullfs ro,nosuid,nodev = 0 0 > /usr/bin /usr/jails/users/usr/bin nullfs ro,nodev 0 = 0 > /usr/sbin /usr/jails/users/usr/sbin nullfs ro,nodev 0 = 0 > /usr/libexec /usr/jails/users/usr/libexec nullfs ro,nodev = 0 0 >=20 >=20 > When i start sshd jail with mount_nulls like above i will have crash afte= r random period of time. > Without this jail i have never had any freeze. home dir in users jail is = mount_nulled from /crypto > partition.Earlier my users jails didnt have mount_nulls, i have had copy = of each dir. I could have > uptime like 80 days. I dont know why it is so instabile? > Could any one point me somehow ? Maybe i do someting wrong or someting? Be specific about your crash. See the Developers' Handbook chapter on kernel debugging for the minimum information needed to proceed further with this. Kris --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCuYKfWry0BWjoQKURAnIMAKD5DUzZV3sAJoli+K3ktWSE4sWo0QCg3kiL CL/wxPL2/zS1H50RNsCeGP8= =0PyI -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 15:24:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AF3016A423 for ; Wed, 22 Jun 2005 15:24:21 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3274143D1D for ; Wed, 22 Jun 2005 15:24:21 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.41.231] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 22 Jun 2005 11:37:51 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 22 Jun 2005 11:21:18 -0400 User-Agent: KMail/1.8 References: <42887FEE.3000705@kepa.fi> <20050516125109.GF33622@wombat.fafoe.narf.at> <200506211116.32625.jhb@FreeBSD.org> In-Reply-To: <200506211116.32625.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506221121.19848.jhb@FreeBSD.org> Cc: Stefan Farfeleder , Juho Vuori Subject: Re: Bug in devinfo or something wrong with me? 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, 22 Jun 2005 15:24:22 -0000 On Tuesday 21 June 2005 11:16 am, John Baldwin wrote: > On Monday 16 May 2005 08:51 am, Stefan Farfeleder wrote: > > On Mon, May 16, 2005 at 02:11:42PM +0300, Juho Vuori wrote: > > > The below included simple program reliably printfs "error 4\n" on > > > 5.4-RELEASE. Am I understanding something wrong or is this a bug in > > > libdevinfo? > > > > There is indeed a bug in libdevinfo. > > > > > To continue on this however, if you put say sleep(5) between > > > devinfo_free() and the second devinfo_init() and manage to change the > > > device configuration during the sleep (tested with pluggin in/out a USB > > > memory), the program terminates with no errors. I've run into other > > > oddities with devinfo as well, but in much more complex situations so > > > they might just as well be variations of this simple example. > > > > > > if (devinfo_init()) { > > > > devinfo_init() initialises the devinfo_dev tailq, devinfo_generation and > > sets devinfo_initted to 1. > > > > > devinfo_free(); > > > > devinfo_free() clears devinfo_dev and sets devinfo_initted to 0 but > > devinfo_generation keeps its value. > > > > > if (devinfo_init()) { > > > > Now devinfo_dev doesn't get filled because ubus.ub_generation == > > devinfo_generation. > > > > Here is a patch that resets devinfo_generation to 0 in devinfo_free(). > > The whole file can probably be simplified a bit due to this bug. > > > > Stefan > > I think the intent is actually so that you can call devinfo_init() > periodically without calling devinfo_free() to make sure the tree is up to > date. However, the generation should still be cleared when free() is > called. IOW, if you wanted to have a program that would poll the kernel > each second to get the current tree, it would call devinfo_init() in a loop > and only call devinfo_free() at program exit. This would let > devinfo_init() cache data if the device tree doesn't change. I'll try to > get the patch into the tree. I just committed it to HEAD and will MFC in a week or so. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 15:46:11 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E64D16A41C; Wed, 22 Jun 2005 15:46:11 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from ss.eunet.cz (ss.eunet.cz [193.85.228.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23F8B43D49; Wed, 22 Jun 2005 15:46:10 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from localhost.i.cz (ss.eunet.cz [193.85.228.13]) by ss.eunet.cz (8.13.1/8.13.1) with ESMTP id j5MFjwSu012450; Wed, 22 Jun 2005 17:45:59 +0200 (CEST) (envelope-from mime@traveller.cz) From: Michal Mertl To: Daniel Eischen In-Reply-To: References: Content-Type: text/plain Date: Wed, 22 Jun 2005 17:45:57 +0200 Message-Id: <1119455157.1401.9.camel@genius1.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , hackers@freebsd.org, Charles Sprickman Subject: Re: Nagios and threads 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, 22 Jun 2005 15:46:11 -0000 Daniel Eischen wrote: > On Tue, 21 Jun 2005, Michal Mertl wrote: > > > Dag-Erling Smrgrav wrote: > > > Charles Sprickman writes: > > > > 1. FreeBSD and threads. On FreeBSD there's a native user-level > > > > implementation of threads called 'pthread' and there's also an > > > > optional ports collection 'linuxthreads' that uses kernel hooks. > > > > > > This is only the case for FreeBSD 4. FreeBSD 5 has native threads. > > > > Yes, the description on Nagios page is not precise but unfortunately > > Nagios still has some problems even on 5.4. I wasn't able to find out > > what was wrong and the problem dissappeared when I had to replace the > > computer with single-processor one. The symptoms I observed were that > > every several days one Nagios process was consuming all the CPU doing > > hundreds of thousands of syscalls per second. It got always stuck around > > the time when the the daily cron job run. > > > > I did a ktrace on the stuck process and tried to abort it to have the > > core but I've lost the ktrace output and it never saved the core :-(. > > > > I'll install it on another machine and try to diagnose the problem some > > more. > > You gotta try it on -stable. OK. I installed Nagios on a SMP computer with fresh -stable. I tried to stress the disk but until now Nagios hasn't hung. Michal From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 15:57:22 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA83716A41C for ; Wed, 22 Jun 2005 15:57:22 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFBD543D1F for ; Wed, 22 Jun 2005 15:57:17 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j5MFvBBD012505; Wed, 22 Jun 2005 11:57:11 -0400 (EDT) Date: Wed, 22 Jun 2005 11:57:11 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Luigi Rizzo In-Reply-To: <20050622074306.C92493@xorpc.icir.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Content-Disposition: INLINE X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: Charles Sprickman , hackers@freebsd.org Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 15:57:22 -0000 On Wed, 22 Jun 2005, Luigi Rizzo wrote: > reading also the continuation of this mail thread, I wonder if there > is any relationship with this issue i found a few days ago debugging > asterisk. It happens when linking the code with libc_r, but maybe > some of the bugs in libc_r were also imported in other thread > libraries. No, libpthread and libthr don't have to jump through hoops to avoid blocking on I/O. -- DE From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 16:33:59 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63A6A16A41F; Wed, 22 Jun 2005 16:33:59 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (unknown [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DCA643D1F; Wed, 22 Jun 2005 16:33:57 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.3) with ESMTP id j5MEpXX1053144; Wed, 22 Jun 2005 08:51:33 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 22 Jun 2005 08:53:00 -0600 (MDT) Message-Id: <20050622.085300.82192668.imp@bsdimp.com> To: deischen@freebsd.org From: "M. Warner Losh" In-Reply-To: References: <34cb7c8405062207246b582eaf@mail.gmail.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: spork@fasttrackmonkey.com, hackers@freebsd.org, kamalp@acm.org, peadar.edwards@gmail.com Subject: Re: Nagios and threads 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, 22 Jun 2005 16:33:59 -0000 In message: Daniel Eischen writes: : We do protect the malloc lock across a fork(), but that's it. With 4.x libc_r, you could easily get hangs accross a fork() if you did anything before the exec (like setup fd's for stdin/out). This was due to internal libc_r state being inconsistant. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 17:21:30 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CD6716A41C for ; Wed, 22 Jun 2005 17:21:30 +0000 (GMT) (envelope-from mauser@poczta.fm) Received: from smtp.poczta.interia.pl (smtp2.poczta.interia.pl [213.25.80.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id E99F043D48 for ; Wed, 22 Jun 2005 17:21:29 +0000 (GMT) (envelope-from mauser@poczta.fm) Received: by smtp.poczta.interia.pl (INTERIA.PL, from userid 502) id 0A5733720D5; Wed, 22 Jun 2005 19:21:29 +0200 (CEST) Received: from poczta.interia.pl (mi04.poczta.interia.pl [10.217.12.4]) by smtp.poczta.interia.pl (INTERIA.PL) with ESMTP id 95854372086 for ; Wed, 22 Jun 2005 19:21:28 +0200 (CEST) Received: by poczta.interia.pl (INTERIA.PL, from userid 502) id 5CDE2142B7F; Wed, 22 Jun 2005 19:21:28 +0200 (CEST) Received: from acer.local (pj162.katowice.sdi.tpnet.pl [217.96.213.162]) by www.poczta.fm (INTERIA.PL) with ESMTP id 05DA1142B76 for ; Wed, 22 Jun 2005 19:21:27 +0200 (CEST) Date: Wed, 22 Jun 2005 19:21:27 +0200 From: Mauser To: freebsd-hackers@freebsd.org Message-Id: <20050622192127.05bff1b8.mauser@poczta.fm> X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EMID: 861fe138 Subject: kld 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, 22 Jun 2005 17:21:30 -0000 Unloading syscall kernel module can cause a system crash. It occurs when we unload the module while a process is executing our syscall. Example: $ cat kldtest.c #include #include #include #include #include #include #include #include #include static int test_nw; static int test_syscall(struct thread *td, void *arg) { struct timeval tv; tv.tv_sec = 15; tv.tv_usec = 0; tsleep(&test_nw,PWAIT,"test",tvtohz(&tv)); return 0; } static int test_offset = NO_SYSCALL; static struct sysent test_sysent = { 0, test_syscall }; static int test_load(struct module *mod, int cmd, void *arg) { if(cmd != MOD_LOAD && cmd != MOD_UNLOAD) return EOPNOTSUPP; return 0; } SYSCALL_MODULE(test,&test_offset,&test_sysent,test_load,NULL); $ cat calltest.c #include #include #include #include int main() { struct module_stat stat; stat.version = sizeof(stat); modstat(modfind("test"),&stat); return syscall(stat.data.intval); } We load the module, execute calltest, and within 15 seconds unload the module. We get a kernel panic, because we removed the memory where our test_syscall was located. Currently I don't have any idea how to fix it, but it would be nice to inform about this issue in manual. Maciek ------------------------------------------------------------------ Kwiaty dla Taty.. Wyslij bukiet na Dzien Ojca.. >> http://link.interia.pl/f1897 << From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 20:58:23 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67F5116A41C for ; Wed, 22 Jun 2005 20:58:23 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1685843D49 for ; Wed, 22 Jun 2005 20:58:22 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: by wproxy.gmail.com with SMTP id 57so504578wri for ; Wed, 22 Jun 2005 13:58:22 -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=q5S++blN8BzZ6nSlvVqEq7eiAl3T44KoO6QjYyBYXmd+DoDLifj8lWZLA3d8nydw0gt2aGGQUTc/fSjzvrHckb0hDS+6vvKOdjtmv0ZdqUVUrjg+jQ4CiyPNWbQLOTYwkiSh1W1NzCRFu+08KTMSi1MQLjHWf8b+GowG2WLd/7A= Received: by 10.54.76.6 with SMTP id y6mr697624wra; Wed, 22 Jun 2005 13:58:22 -0700 (PDT) Received: by 10.54.102.4 with HTTP; Wed, 22 Jun 2005 13:58:21 -0700 (PDT) Message-ID: <319cceca05062213587952cd42@mail.gmail.com> Date: Wed, 22 Jun 2005 23:58:22 +0300 From: Maslan To: Mauser In-Reply-To: <20050622192127.05bff1b8.mauser@poczta.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050622192127.05bff1b8.mauser@poczta.fm> Cc: freebsd-hackers@freebsd.org Subject: Re: kld problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maslan List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 20:58:23 -0000 i don't know if kld should check if the module is used or not before unloading it. but i should. On 6/22/05, Mauser wrote: > Unloading syscall kernel module can cause a system crash. It occurs when = we > unload the module while a process is executing our syscall. Example: >=20 > $ cat kldtest.c >=20 > #include > #include > #include > #include > #include > #include > #include > #include > #include >=20 > static int test_nw; >=20 > static int test_syscall(struct thread *td, void *arg) { > struct timeval tv; > tv.tv_sec =3D 15; > tv.tv_usec =3D 0; > tsleep(&test_nw,PWAIT,"test",tvtohz(&tv)); > return 0; > } >=20 > static int test_offset =3D NO_SYSCALL; >=20 > static struct sysent test_sysent =3D { > 0, test_syscall > }; >=20 > static int test_load(struct module *mod, int cmd, void *arg) { > if(cmd !=3D MOD_LOAD && cmd !=3D MOD_UNLOAD) > return EOPNOTSUPP; > return 0; > } >=20 > SYSCALL_MODULE(test,&test_offset,&test_sysent,test_load,NULL); >=20 > $ cat calltest.c >=20 > #include > #include > #include > #include >=20 > int main() { > struct module_stat stat; > stat.version =3D sizeof(stat); > modstat(modfind("test"),&stat); > return syscall(stat.data.intval); > } >=20 > We load the module, execute calltest, and within 15 seconds unload the > module. We get a kernel panic, because we removed the memory where our > test_syscall was located. >=20 > Currently I don't have any idea how to fix it, but it would be nice to > inform about this issue in manual. >=20 > Maciek >=20 > ------------------------------------------------------------------ > Kwiaty dla Taty.. > Wyslij bukiet na Dzien Ojca.. >> http://link.interia.pl/f1897 << >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " >=20 --=20 I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 21:47:37 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8030A16A41C for ; Wed, 22 Jun 2005 21:47:37 +0000 (GMT) (envelope-from aanton@spintech.ro) Received: from smtpx.spintech.ro (smtpx.spintech.ro [81.180.92.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id D47B943D49 for ; Wed, 22 Jun 2005 21:47:36 +0000 (GMT) (envelope-from aanton@spintech.ro) Received: from smtpx.spintech.ro (antivirus [15.0.0.1]) by smtpx.spintech.ro (Postfix) with ESMTP id 0CAF73A4A5 for ; Wed, 22 Jun 2005 19:41:48 +0000 (UTC) Received: from [10.0.0.2] (beastie [10.0.0.2]) by smtpx.spintech.ro (Postfix) with ESMTP id CD7753A497 for ; Wed, 22 Jun 2005 19:41:47 +0000 (UTC) Message-ID: <42B9DC80.9070207@spintech.ro> Date: Thu, 23 Jun 2005 00:47:44 +0300 From: Alin-Adrian Anton User-Agent: Mozilla Thunderbird 1.0 (X11/20041229) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Open-Source: www.opensource.org Subject: ipfw2 filtering on bridge 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, 22 Jun 2005 21:47:37 -0000 Hi there, I've been running into some problems with what is supposed to be a filtering bridge with IPFW, on FreeBSD 5.4-REL0. IPFW has been compiled into kernel: options BRIDGE options IPFIREWALL options IPFIREWALL_DEFAULT_TO_ACCEPT options IPDIVERT along with the bridging capability. No other firewalling mechanisms are enabled. The bridge is configured and working: net.link.ether.bridge.enable=1 net.link.ether.bridge.config=fxp0,vr0 net.link.ether.bridge_ipfw=1 fxp0 is Internet vr0 is a server with an external IP, called EXT_IP I tried blocking with trivial ruleset: 00100 0 0 deny icmp from any to any 65535 8518 584248 allow ip from any to any However, pinging through the bridge, from the Internet, works without fear: 64 bytes from EXT_IP: icmp_seq=0 ttl=233 time=85.994 ms 64 bytes from EXT_IP: icmp_seq=1 ttl=233 time=96.220 ms If anyone could help me a bit, I'd be really thankfull. Thanks for the time. Yours Sincerely, -- Alin-Adrian Anton GPG keyID 0x183087BA (B129 E8F4 7B34 15A9 0785 2F7C 5823 ABA0 1830 87BA) gpg --keyserver pgp.mit.edu --recv-keys 0x183087BA "It is dangerous to be right when the government is wrong." - Voltaire From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 21:52:59 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E92BD16A41C for ; Wed, 22 Jun 2005 21:52:59 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id B62D143D55 for ; Wed, 22 Jun 2005 21:52:59 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j5MLqwko049698; Wed, 22 Jun 2005 16:52:58 -0500 (CDT) (envelope-from dan) Date: Wed, 22 Jun 2005 16:52:58 -0500 From: Dan Nelson To: Mauser Message-ID: <20050622215258.GE49171@dan.emsphone.com> References: <20050622192127.05bff1b8.mauser@poczta.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050622192127.05bff1b8.mauser@poczta.fm> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: kld 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, 22 Jun 2005 21:53:00 -0000 In the last episode (Jun 22), Mauser said: > Unloading syscall kernel module can cause a system crash. It occurs when we > unload the module while a process is executing our syscall. Example: > > $ cat kldtest.c ... > static int test_syscall(struct thread *td, void *arg) { > struct timeval tv; > tv.tv_sec = 15; > tv.tv_usec = 0; > tsleep(&test_nw,PWAIT,"test",tvtohz(&tv)); > return 0; > } ... > static int test_load(struct module *mod, int cmd, void *arg) { > if(cmd != MOD_LOAD && cmd != MOD_UNLOAD) > return EOPNOTSUPP; > return 0; > } In test_load, you can return a nonzero value on MOD_UNLOAD to abort an unload request. See the module(9) manpage for more details. You may need to increment a counter or hold a mutex while in the syscall to make it easy for test_load to determine whether it's safe to unload or not. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 22:53:39 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 964BE16A41C for ; Wed, 22 Jun 2005 22:53:39 +0000 (GMT) (envelope-from mauser@poczta.fm) Received: from smtp.poczta.interia.pl (smtp2.poczta.interia.pl [213.25.80.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FAA943D4C for ; Wed, 22 Jun 2005 22:53:39 +0000 (GMT) (envelope-from mauser@poczta.fm) Received: by smtp.poczta.interia.pl (INTERIA.PL, from userid 502) id B7D84D1D0B; Thu, 23 Jun 2005 00:53:37 +0200 (CEST) Received: from poczta.interia.pl (mi04.poczta.interia.pl [10.217.12.4]) by smtp.poczta.interia.pl (INTERIA.PL) with ESMTP id 0C870D1BBB; Thu, 23 Jun 2005 00:53:37 +0200 (CEST) Received: by poczta.interia.pl (INTERIA.PL, from userid 502) id 0305E142B21; Thu, 23 Jun 2005 00:53:36 +0200 (CEST) Received: from acer.local (pj162.katowice.sdi.tpnet.pl [217.96.213.162]) by www.poczta.fm (INTERIA.PL) with ESMTP id 68491142B1F; Thu, 23 Jun 2005 00:53:35 +0200 (CEST) Date: Thu, 23 Jun 2005 00:53:37 +0200 From: Mauser To: Dan Nelson Message-Id: <20050623005337.6fccc5e7.mauser@poczta.fm> In-Reply-To: <20050622215258.GE49171@dan.emsphone.com> References: <20050622192127.05bff1b8.mauser@poczta.fm> <20050622215258.GE49171@dan.emsphone.com> X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EMID: 4875e138 Cc: freebsd-hackers@freebsd.org Subject: Re: kld 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, 22 Jun 2005 22:53:39 -0000 On Wed, 22 Jun 2005 16:52:58 -0500 Dan Nelson wrote: > In the last episode (Jun 22), Mauser said: > > Unloading syscall kernel module can cause a system crash. It occurs > > when we unload the module while a process is executing our syscall. > > Example: > > > > $ cat kldtest.c > ... > > static int test_syscall(struct thread *td, void *arg) { > > struct timeval tv; > > tv.tv_sec = 15; > > tv.tv_usec = 0; > > tsleep(&test_nw,PWAIT,"test",tvtohz(&tv)); > > return 0; > > } > ... > > static int test_load(struct module *mod, int cmd, void *arg) { > > if(cmd != MOD_LOAD && cmd != MOD_UNLOAD) > > return EOPNOTSUPP; > > return 0; > > > > In test_load, you can return a nonzero value on MOD_UNLOAD to abort an > unload request. See the module(9) manpage for more details. You may > need to increment a counter or hold a mutex while in the syscall to > make it easy for test_load to determine whether it's safe to unload or > not. > Yes, I know, I rtfm ;) This issue occured to me while writing own security-related kld which modify some syscalls and perform authorization (something like rexec,cerb). I think that holding a mutex on each of syscalls would be a bit inefficient. Furthermore I'll need to unset MP_SAFE flags in modified syscalls to be 100% certain that nobody unload the module while executing syscall (mutex _after_ calling syscall won't be enough if i'm not mistaken). Maciek ---------------------------------------------------------------------- OMNIXMAIL! Jesli masz telefon w sieci Era i dostep do WAP, to mozesz na komorce odbierac poczte ze wszystkich swoich kont poczty e-mail! OMNIXMAIL jest w Era Omnix: http://link.interia.pl/f1896 From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 00:26:45 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9634716A41C for ; Thu, 23 Jun 2005 00:26:45 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69EFC43D49 for ; Thu, 23 Jun 2005 00:26:45 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id CEF823C045; Wed, 22 Jun 2005 19:26:44 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10739-02-28; Wed, 22 Jun 2005 19:26:44 -0500 (CDT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (Postfix) with ESMTP id A547F3BE62; Wed, 22 Jun 2005 19:26:44 -0500 (CDT) Received: from s228130hz1ew031.apptix-01.savvis.net ([10.146.4.28]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 22 Jun 2005 19:26:39 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew031.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 22 Jun 2005 19:26:30 -0500 Message-ID: <42BA01AC.3030806@savvis.net> Date: Wed, 22 Jun 2005 17:26:20 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Norbert Koch References: <000001c57727$43c5e600$4801a8c0@ws-ew-3.W2KDEMIG> In-Reply-To: <000001c57727$43c5e600$4801a8c0@ws-ew-3.W2KDEMIG> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Jun 2005 00:26:30.0634 (UTC) FILETIME=[33B0BCA0:01C5778A] X-Virus-Scanned: amavisd-new at savvis.net Cc: "Freebsd-Hackers@Freebsd.Org" Subject: Re: using vkbd device 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, 23 Jun 2005 00:26:45 -0000 Hello Norbert, > I did some more testing with kbdmux. > > 1. I wait for the screen saver becoming active. > 2. I press the control key. > 3. All keys, I press after that, > come as control keys, e.g. > I press 'j' or 'J' and see a > linefeed, I press 'I' and see a tab. > 4. I wait a second time for the screen saver. > 5. I press control. > 6. The keys are ok now. > > Does syscons eat up the key but > sets the state in kbdmux? hmmm... i can not reproduce it here (on -current). could you please try the latest code. i have included some of your patches and did a compile only test on 4.x system (freefall.freebsd.org). http://www.geocities.com/m_evmenkin/kbdmux-3.tar.gz it also fixes (hopefully) issues with state synchronization (lights, etc.). thanks, max From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 01:48:29 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7147416A41C for ; Thu, 23 Jun 2005 01:48:29 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EC6443D55 for ; Thu, 23 Jun 2005 01:48:29 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j5N1mDUb007642; Wed, 22 Jun 2005 21:48:13 -0400 (EDT) Date: Wed, 22 Jun 2005 21:48:13 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: "M. Warner Losh" In-Reply-To: <20050622.085300.82192668.imp@bsdimp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: spork@fasttrackmonkey.com, hackers@freebsd.org, kamalp@acm.org, peadar.edwards@gmail.com Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2005 01:48:29 -0000 On Wed, 22 Jun 2005, M. Warner Losh wrote: > In message: > Daniel Eischen writes: > : We do protect the malloc lock across a fork(), but that's it. > > With 4.x libc_r, you could easily get hangs accross a fork() if you > did anything before the exec (like setup fd's for stdin/out). This > was due to internal libc_r state being inconsistant. I was only referring to libpthread in the above... I don't think libc_r is as robust in that regard. -- DE From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 09:25:47 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DE1016A41C for ; Thu, 23 Jun 2005 09:25:47 +0000 (GMT) (envelope-from kamalpr@yahoo.com) Received: from web52705.mail.yahoo.com (web52705.mail.yahoo.com [206.190.39.156]) by mx1.FreeBSD.org (Postfix) with SMTP id 9E4D843D4C for ; Thu, 23 Jun 2005 09:25:46 +0000 (GMT) (envelope-from kamalpr@yahoo.com) Received: (qmail 81997 invoked by uid 60001); 23 Jun 2005 09:25:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=f3Tf/9N5Ng9A4VQZPMvqbnOp1zdfWJStqWlQ36QqsMAMzl/bAjOQvxyxnoXnDF3pPS2r9E5zPbOgv1tl8KVa++2p7Kt7wvznVj/TGiOwrQbjqf7qg7fsPvi9hB7OXHJHFHpgIkvUHB0fqoaQ3rKWmzsh/QhKq6Hemm3T7OTfhU0= ; Message-ID: <20050623092545.81995.qmail@web52705.mail.yahoo.com> Received: from [210.18.86.20] by web52705.mail.yahoo.com via HTTP; Thu, 23 Jun 2005 02:25:45 PDT Date: Thu, 23 Jun 2005 02:25:45 -0700 (PDT) From: "Kamal R. Prasad" To: Daniel Eischen , Peter Edwards In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Charles Sprickman , hackers@freebsd.org, kamalp@acm.org Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kamalp@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2005 09:25:47 -0000 --- Daniel Eischen wrote: > On Wed, 22 Jun 2005, Peter Edwards wrote: > > > On 6/22/05, Kamal R. Prasad > wrote: > > > > > > The child process should be able to call any > system > > > calls it likes -without assuming that pthreads > from > > > the parent process have been copied over to the > child > > > process. I spose most implementations support > that. > > > > > > > There's more to it than system calls, though (most > (all?) of which > > will be async-signal-safe anyway). Simple example: > any lock that the > > libc implementation needs to provide its > functionality may be > > arbitrarily locked by some other thread: eg, one > thread calls malloc() > > as another calls fork(): the original thread > ceases to exist in the > > child while holding a lock in malloc, leaving > malloc() unusable in the > > process. > How about doing some cleanup in a pthread_atfork() routine? It can be done by the user or a libc/X stub that gets called implicitly. > We do protect the malloc lock across a fork(), but > that's it. > Isn't it possible that an application may genuinely want to fork() out a child and not exec() another process.? regards -kamal > -- > DE > > ------------------------------------------------------------ Kamal R. Prasad UNIX systems consultant http://members.fortunecity.com/kamalp kamalp@acm.org In theory, there is no difference between theory and practice. In practice, there is. ------------------------------------------------------------ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 09:41:50 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51C7616A41C for ; Thu, 23 Jun 2005 09:41:50 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [195.245.194.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4781B43D48 for ; Thu, 23 Jun 2005 09:41:25 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from pm514-9.comsys.ntu-kpi.kiev.ua (pm514-9.comsys.ntu-kpi.kiev.ua [10.18.54.109]) (authenticated bits=0) by comsys.ntu-kpi.kiev.ua (8.12.10/8.12.10) with ESMTP id j5N9lDFl050916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Jun 2005 12:47:16 +0300 (EEST) Received: by pm514-9.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1000) id EC3C083; Thu, 23 Jun 2005 12:39:40 +0300 (EEST) Date: Thu, 23 Jun 2005 12:39:40 +0300 From: Andrey Simonenko To: freebsd-hackers@freebsd.org Message-ID: <20050623093940.GA338@pm514-9.comsys.ntu-kpi.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Spam-Status: No, score=-4.5 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on comsys.ntu-kpi.kiev.ua X-Virus-Scanned: ClamAV 0.82/950/Wed Jun 22 03:48:34 2005 on comsys.ntu-kpi.kiev.ua X-Virus-Status: Clean Subject: Question about synchronization in socow_setup() 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, 23 Jun 2005 09:41:50 -0000 Hello, Can somebody explain how socow_setup() synchronizes access to the page it wants to COW: 99 s = splvm(); 100 /* 101 * verify page is mapped & not already wired for i/o 102 */ 103 socow_stats.attempted++; 104 pa=pmap_extract(map->pmap, uva); 105 if(!pa) { 106 socow_stats.fail_not_mapped++; 107 splx(s); 108 return(0); 109 } 110 pp = PHYS_TO_VM_PAGE(pa); 111 /* 112 * set up COW 113 */ 114 vm_page_lock_queues(); 115 vm_page_cowsetup(pp); How socow_setup() is sure, that pp is valid after pmap_extract() (line 104) and before vm_page_lock_queues() (line 114) ? Another question, why socow_setup() uses vm_page_wire() instead of pmap_extract_and_hold() ? When a page should be held and when it should be wired? According the comment for vm_page_hold(), a page should be held only for "*very* temporary holding", so when one decides what to use (vm_page_hold() or vm_page_wire()), he should decide what will be more effective: simply increment m->hold_count or increment m->wire_count and remove m from the page queue (so this page will be invisible for vm_pageout_scan()). Am I right? From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 13:58:45 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FBBE16A41C for ; Thu, 23 Jun 2005 13:58:45 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D51943D4C for ; Thu, 23 Jun 2005 13:58:42 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j5NDwYlu017697; Thu, 23 Jun 2005 09:58:34 -0400 (EDT) Date: Thu, 23 Jun 2005 09:58:34 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: kamalp@acm.org In-Reply-To: <20050623092545.81995.qmail@web52705.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: Charles Sprickman , hackers@freebsd.org, Peter Edwards Subject: Re: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2005 13:58:45 -0000 On Thu, 23 Jun 2005, Kamal R. Prasad wrote: > > --- Daniel Eischen wrote: > > > (all?) of which > > > will be async-signal-safe anyway). Simple example: > > any lock that the > > > libc implementation needs to provide its > > functionality may be > > > arbitrarily locked by some other thread: eg, one > > thread calls malloc() > > > as another calls fork(): the original thread > > ceases to exist in the > > > child while holding a lock in malloc, leaving > > malloc() unusable in the > > > process. > > > How about doing some cleanup in a pthread_atfork() > routine? It can be done by the user or a libc/X stub > that gets called implicitly. That may or may not be done in the future, but don't rely on it. In fact, it'd be nice to make it fail spectacularly :-) > > We do protect the malloc lock across a fork(), but > > that's it. > > > Isn't it possible that an application may genuinely > want to fork() out a child and not exec() another > process.? I don't care what it does, as long as it's allowed by POSIX. If you're going to fork() and not exec(), you might as well use pthread_create() instead of fork(). -- DE From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 13:59:54 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A421F16A41C for ; Thu, 23 Jun 2005 13:59:54 +0000 (GMT) (envelope-from bsdcrank@squbes.com) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8859143D48 for ; Thu, 23 Jun 2005 13:59:54 +0000 (GMT) (envelope-from bsdcrank@squbes.com) Received: from [192.168.177.29] ([151.205.168.18]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IIJ00IVVIVS7AN7@vms040.mailsrvcs.net> for freebsd-hackers@freebsd.org; Thu, 23 Jun 2005 08:59:53 -0500 (CDT) Date: Thu, 23 Jun 2005 09:59:52 -0400 From: Gregg Cooper To: freebsd-hackers@freebsd.org Message-id: <42BAC058.3040603@squbes.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050524) Subject: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso 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, 23 Jun 2005 13:59:54 -0000 While trying to make a simple customization to the latest distribution cd (add console="comconsole" to boot/loader.conf), the following four sets of cross-linked files were found (pruned output from "ls -ilR /cdrom"; isoinfo(8) from sysutils/cdrtools produces similar): 15005 -r--r--r-- 2 root wheel 0 May 8 03:05 dumpdates 15005 -r--r--r-- 2 root wheel 142 May 8 03:05 fbtab 83266 -r--r--r-- 2 root wheel 0 May 8 03:01 locale 83266 -r--r--r-- 2 root wheel 31 May 8 03:01 mm.tmac 83269 -r--r--r-- 2 root wheel 0 May 8 03:01 se_locale 83269 -r--r--r-- 2 root wheel 97 May 8 03:01 se_ms.cov 99056 -r--r--r-- 2 root wheel 0 May 8 03:05 utmp 99056 -r--r--r-- 2 root wheel 18425 May 8 03:04 Makefile.dist After tar'ing the cd contents over to disk, and "diff -r" uncovering the discrepancies in the copy (the second file of each set was now 0 bytes), had to manually delete and re-copy the four truncated files before making the desired change, and mkisofs(8) and burncd(8). Maybe this is a one-off, or perhaps a simple change could be made to the release cd mastering process to avoid this in the future. Gregg From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 14:06:08 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 216CB16A41C for ; Thu, 23 Jun 2005 14:06:08 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id D09F143D1D for ; Thu, 23 Jun 2005 14:06:07 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.3/8.13.3) with ESMTP id j5NEEp9e010838; Thu, 23 Jun 2005 08:14:51 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <42BAC1CB.30402@samsco.org> Date: Thu, 23 Jun 2005 08:06:03 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gregg Cooper References: <42BAC058.3040603@squbes.com> In-Reply-To: <42BAC058.3040603@squbes.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org Subject: Re: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso 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, 23 Jun 2005 14:06:08 -0000 Gregg Cooper wrote: > While trying to make a simple customization to the latest distribution > cd (add console="comconsole" to boot/loader.conf), the following four > sets of cross-linked files were found (pruned output from "ls -ilR > /cdrom"; isoinfo(8) from sysutils/cdrtools produces similar): > > 15005 -r--r--r-- 2 root wheel 0 May 8 03:05 dumpdates > 15005 -r--r--r-- 2 root wheel 142 May 8 03:05 fbtab > 83266 -r--r--r-- 2 root wheel 0 May 8 03:01 locale > 83266 -r--r--r-- 2 root wheel 31 May 8 03:01 mm.tmac > 83269 -r--r--r-- 2 root wheel 0 May 8 03:01 se_locale > 83269 -r--r--r-- 2 root wheel 97 May 8 03:01 se_ms.cov > 99056 -r--r--r-- 2 root wheel 0 May 8 03:05 utmp > 99056 -r--r--r-- 2 root wheel 18425 May 8 03:04 Makefile.dist > > After tar'ing the cd contents over to disk, and "diff -r" uncovering the > discrepancies in the copy (the second file of each set was now 0 bytes), > had to manually delete and re-copy the four truncated files before > making the desired change, and mkisofs(8) and burncd(8). > > Maybe this is a one-off, or perhaps a simple change could be made to the > release cd mastering process to avoid this in the future. > > Gregg We don't do anything special in the mastering process: The exact command that is used by the release Makefile: bootable="-b boot/cdboot -no-emul-boot" mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* Maybe it's a bug in mkisofs? Scott From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 14:34:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D83DA16A41C; Thu, 23 Jun 2005 14:34:36 +0000 (GMT) (envelope-from aanton@spintech.ro) Received: from smtpx.spintech.ro (smtpx.spintech.ro [81.180.92.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9186343D55; Thu, 23 Jun 2005 14:34:36 +0000 (GMT) (envelope-from aanton@spintech.ro) Received: from smtpx.spintech.ro (antivirus [15.0.0.1]) by smtpx.spintech.ro (Postfix) with ESMTP id B410B3A49D; Thu, 23 Jun 2005 12:28:48 +0000 (UTC) Received: from [10.0.0.2] (beastie [10.0.0.2]) by smtpx.spintech.ro (Postfix) with ESMTP id 82B7E3A491; Thu, 23 Jun 2005 12:28:48 +0000 (UTC) Message-ID: <42BAC885.3030901@spintech.ro> Date: Thu, 23 Jun 2005 17:34:45 +0300 From: Alin-Adrian Anton User-Agent: Mozilla Thunderbird 1.0 (X11/20041229) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben References: <42B9E62C.7000204@spintech.ro> <42BA0DE9.4040809@thegeekzone.com> In-Reply-To: <42BA0DE9.4040809@thegeekzone.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Open-Source: www.opensource.org Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: ipfw2 filtering on bridge 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, 23 Jun 2005 14:34:37 -0000 Ben wrote: > I'm sorry, I can't send this to the list because my messages to the list > bounce because reverse DNS isn't set up. > No worries, thanks a lot for answering. > This is funny, I just set this up for the first time yesterday except I > set everything up to have no IP addresses so that the firewall would be > invisible to anyone. I think I see what is wrong with your setup... > > You've got to change net.link.ether.bridge_ipfw=1 to > net.link.ether.bridge.ipfw=1 in /etc/sysctl.conf. The handbook > (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bridging.html) > says that net.link.ether.bridge_ipfw=1 was updated in 5.2-RELEASE. > net.link.ether.bridge.enable=1 net.link.ether.bridge.config=fxp0,fxp1 net.link.ether.bridge_ipfw=1 # sysctl net.link.ether.bridge.ipfw=1 net.link.ether.bridge.ipfw: 1 -> 1 # # ipfw add deny icmp from any to any 00100 deny icmp from any to any # # ipfw show 00100 0 0 deny icmp from any to any 65535 931748 651891769 allow ip from any to any # PING EXT_IP_BEHIND_BRIDGE: 56 data bytes 64 bytes from EXT_IP_BEHIND_BRIDGE: icmp_seq=0 ttl=233 time=74.399 ms 64 bytes from EXT_IP_BEHIND_BRIDGE: icmp_seq=1 ttl=233 time=106.194 ms Seems not to be working :( Yours, -- Alin-Adrian Anton GPG keyID 0x183087BA (B129 E8F4 7B34 15A9 0785 2F7C 5823 ABA0 1830 87BA) gpg --keyserver pgp.mit.edu --recv-keys 0x183087BA "It is dangerous to be right when the government is wrong." - Voltaire From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 15:45:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2028916A41F for ; Thu, 23 Jun 2005 15:45:44 +0000 (GMT) (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 C7B7743D1F for ; Thu, 23 Jun 2005 15:45:43 +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 5B5D760FB; Thu, 23 Jun 2005 17:45:33 +0200 (CEST) Received: from xps.des.no (des.no [80.203.228.37]) by tim.des.no (Postfix) with ESMTP id 4541F60ED; Thu, 23 Jun 2005 17:45:33 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id 2122533D13; Thu, 23 Jun 2005 17:45:33 +0200 (CEST) To: Scott Long References: <42BAC058.3040603@squbes.com> <42BAC1CB.30402@samsco.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 23 Jun 2005 17:45:32 +0200 In-Reply-To: <42BAC1CB.30402@samsco.org> (Scott Long's message of "Thu, 23 Jun 2005 08:06:03 -0600") Message-ID: <86mzphcc0z.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Tests: ALL_TRUSTED,AWL,BAYES_00 X-Spam-Learn: ham X-Spam-Score: -5.2/5.0 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on tim.des.no Cc: freebsd-hackers@freebsd.org, Gregg Cooper Subject: Re: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso 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, 23 Jun 2005 15:45:44 -0000 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Scott Long writes: > Gregg Cooper wrote: > > 15005 -r--r--r-- 2 root wheel 0 May 8 03:05 dumpdates > > 15005 -r--r--r-- 2 root wheel 142 May 8 03:05 fbtab > > 83266 -r--r--r-- 2 root wheel 0 May 8 03:01 locale > > 83266 -r--r--r-- 2 root wheel 31 May 8 03:01 mm.tmac > > 83269 -r--r--r-- 2 root wheel 0 May 8 03:01 se_locale > > 83269 -r--r--r-- 2 root wheel 97 May 8 03:01 se_ms.cov > > 99056 -r--r--r-- 2 root wheel 0 May 8 03:05 utmp > > 99056 -r--r--r-- 2 root wheel 18425 May 8 03:04 Makefile.dist > Maybe it's a bug in mkisofs? ISO 9660 filesystems donn't have inode numbers. The cd9660 code fakes them based on the location of each file's contents. This model breaks down for empty files, which have no contents and thus no meaningful location. Apparently, mkisofs simply keeps track of the last extent written and uses that for the location of the next file regardless of whether it actually has any contents, so empty files get the same inode number as the previous non-empty file. The attached patch will make mkisofs assign the lowest valid non-zero address to all empty files. They will therefore appear to be hard links to eachother, but not to random non-empty files. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=mkisofs.diff --- mkisofs/write.c.orig Thu Jun 23 17:16:26 2005 +++ mkisofs/write.c Thu Jun 23 17:19:13 2005 @@ -1238,7 +1238,8 @@ } dwpnt->next = NULL; dwpnt->size = s_entry->size; - dwpnt->extent = last_extent; + dwpnt->extent = dwpnt->size ? + last_extent : ISO_BLOCKS(1); set_733((char *) s_entry->isorec.extent, last_extent); s_entry->starting_block = last_extent; --=-=-=-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 16:58:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CA8616A41C; Thu, 23 Jun 2005 16:58:13 +0000 (GMT) (envelope-from bsdcrank@squbes.com) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0902243D53; Thu, 23 Jun 2005 16:58:13 +0000 (GMT) (envelope-from bsdcrank@squbes.com) Received: from [192.168.177.29] ([151.205.168.18]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IIJ00DUXR4ZAUA0@vms040.mailsrvcs.net>; Thu, 23 Jun 2005 11:58:12 -0500 (CDT) Date: Thu, 23 Jun 2005 12:58:11 -0400 From: Gregg Cooper In-reply-to: <86mzphcc0z.fsf@xps.des.no> To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= Message-id: <42BAEA23.70802@squbes.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8BIT X-Accept-Language: en-us, en References: <42BAC058.3040603@squbes.com> <42BAC1CB.30402@samsco.org> <86mzphcc0z.fsf@xps.des.no> User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050524) Cc: freebsd-hackers@freebsd.org, Scott Long , marius@freebsd.org Subject: Re: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso 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, 23 Jun 2005 16:58:13 -0000 Dag-Erling Smørgrav wrote: >Scott Long writes: > > >>Gregg Cooper wrote: >> >> >>>15005 -r--r--r-- 2 root wheel 0 May 8 03:05 dumpdates >>>15005 -r--r--r-- 2 root wheel 142 May 8 03:05 fbtab >>>83266 -r--r--r-- 2 root wheel 0 May 8 03:01 locale >>>83266 -r--r--r-- 2 root wheel 31 May 8 03:01 mm.tmac >>>83269 -r--r--r-- 2 root wheel 0 May 8 03:01 se_locale >>>83269 -r--r--r-- 2 root wheel 97 May 8 03:01 se_ms.cov >>>99056 -r--r--r-- 2 root wheel 0 May 8 03:05 utmp >>>99056 -r--r--r-- 2 root wheel 18425 May 8 03:04 Makefile.dist >>> >>> >>Maybe it's a bug in mkisofs? >> >> > >ISO 9660 filesystems donn't have inode numbers. The cd9660 code fakes >them based on the location of each file's contents. This model breaks >down for empty files, which have no contents and thus no meaningful >location. Apparently, mkisofs simply keeps track of the last extent >written and uses that for the location of the next file regardless of >whether it actually has any contents, so empty files get the same >inode number as the previous non-empty file. > >The attached patch will make mkisofs assign the lowest valid non-zero >address to all empty files. They will therefore appear to be hard >links to eachother, but not to random non-empty files. > >DES > > Scott: Thanks for the Makefile snippet. DES: So fast - thanks! You provided a solution in less time than I spent scratching my head ... marius: As port maintainer, can you shepherd this change into the cdrtools project? Gregg From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 18:45:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67CC116A41C for ; Thu, 23 Jun 2005 18:45:36 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from vsmtp3.tin.it (vsmtp3alice.tin.it [212.216.176.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24C7F43D49 for ; Thu, 23 Jun 2005 18:45:35 +0000 (GMT) (envelope-from gerarra@tin.it) Received: from ims3a.cp.tin.it (192.168.70.103) by vsmtp3.tin.it (7.0.027) id 42B29BA1002D4441 for freebsd-hackers@freebsd.org; Thu, 23 Jun 2005 20:45:34 +0200 Received: from [192.168.70.228] by ims3a.cp.tin.it with HTTP; Thu, 23 Jun 2005 20:45:32 +0200 Date: Thu, 23 Jun 2005 20:45:32 +0200 Message-ID: <429C8E8F0002C33D@ims3a.cp.tin.it> In-Reply-To: <20050622192127.05bff1b8.mauser@poczta.fm> From: gerarra@tin.it To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable X-Originating-IP: 82.51.165.187 Subject: RE: kld problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2005 18:45:36 -0000 >Unloading syscall kernel module can cause a system crash. It occurs when= >we >unload the module while a process is executing our syscall. Example: MOD_QUIESCE (sys/module.h) would be helping you in situations like that. You can use a flag to rule that. greetings, rookie From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 18:53:59 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A292C16A420 for ; Thu, 23 Jun 2005 18:53:59 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31C8A43D49 for ; Thu, 23 Jun 2005 18:53:58 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.41.231] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 23 Jun 2005 15:07:32 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 23 Jun 2005 13:37:25 -0400 User-Agent: KMail/1.8 References: <42BAC058.3040603@squbes.com> <42BAC1CB.30402@samsco.org> <86mzphcc0z.fsf@xps.des.no> In-Reply-To: <86mzphcc0z.fsf@xps.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200506231337.27239.jhb@FreeBSD.org> Cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= , Scott Long , Gregg Cooper Subject: Re: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso 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, 23 Jun 2005 18:53:59 -0000 On Thursday 23 June 2005 11:45 am, Dag-Erling Sm=F8rgrav wrote: > Scott Long writes: > > Gregg Cooper wrote: > > > 15005 -r--r--r-- 2 root wheel 0 May 8 03:05 dumpdates > > > 15005 -r--r--r-- 2 root wheel 142 May 8 03:05 fbtab > > > 83266 -r--r--r-- 2 root wheel 0 May 8 03:01 locale > > > 83266 -r--r--r-- 2 root wheel 31 May 8 03:01 mm.tmac > > > 83269 -r--r--r-- 2 root wheel 0 May 8 03:01 se_locale > > > 83269 -r--r--r-- 2 root wheel 97 May 8 03:01 se_ms.cov > > > 99056 -r--r--r-- 2 root wheel 0 May 8 03:05 utmp > > > 99056 -r--r--r-- 2 root wheel 18425 May 8 03:04 Makefile.dist > > > > Maybe it's a bug in mkisofs? > > ISO 9660 filesystems donn't have inode numbers. The cd9660 code fakes > them based on the location of each file's contents. This model breaks > down for empty files, which have no contents and thus no meaningful > location. Apparently, mkisofs simply keeps track of the last extent > written and uses that for the location of the next file regardless of > whether it actually has any contents, so empty files get the same > inode number as the previous non-empty file. > > The attached patch will make mkisofs assign the lowest valid non-zero > address to all empty files. They will therefore appear to be hard > links to eachother, but not to random non-empty files. Even if mkisofs is patched this change isn't a bug in mkisofs. It's really= a=20 bug in our iso9660 filesystem. :( =2D-=20 John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 19:32:29 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 328AE16A41C; Thu, 23 Jun 2005 19:32:29 +0000 (GMT) (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 CD4C743D53; Thu, 23 Jun 2005 19:32:28 +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 4540060FA; Thu, 23 Jun 2005 21:32:23 +0200 (CEST) Received: from xps.des.no (des.no [80.203.228.37]) by tim.des.no (Postfix) with ESMTP id 101E160F7; Thu, 23 Jun 2005 21:32:23 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id 8D29133D39; Thu, 23 Jun 2005 21:32:22 +0200 (CEST) To: John Baldwin References: <42BAC058.3040603@squbes.com> <42BAC1CB.30402@samsco.org> <86mzphcc0z.fsf@xps.des.no> <200506231337.27239.jhb@FreeBSD.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 23 Jun 2005 21:32:22 +0200 In-Reply-To: <200506231337.27239.jhb@FreeBSD.org> (John Baldwin's message of "Thu, 23 Jun 2005 13:37:25 -0400") Message-ID: <86zmtglvi1.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Tests: ALL_TRUSTED,AWL,BAYES_00 X-Spam-Learn: ham X-Spam-Score: -5.2/5.0 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on tim.des.no Cc: freebsd-hackers@freebsd.org, Scott Long , Gregg Cooper Subject: Re: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso 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, 23 Jun 2005 19:32:29 -0000 John Baldwin writes: > Even if mkisofs is patched this change isn't a bug in mkisofs. It's > really a bug in our iso9660 filesystem. :( Yes, but it's a lot harder to fix there than in mkisofs :) Actually, -CURRENT doesn't have this bug, but it has another: it bases the inode number on the position of the directory entry, so hard links are lost. It doesn't make a big difference, because mkisofs seems unable to generate ISO 9660 file systems with hard links. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 21:03:28 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA6C916A41C for ; Thu, 23 Jun 2005 21:03:28 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 399BB43D4C for ; Thu, 23 Jun 2005 21:03:28 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j5NL3NAX029538; Thu, 23 Jun 2005 23:03:24 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j5NL3D9R029537; Thu, 23 Jun 2005 23:03:13 +0200 (CEST) (envelope-from marius) Date: Thu, 23 Jun 2005 23:03:13 +0200 From: Marius Strobl To: Gregg Cooper Message-ID: <20050623230313.D80563@newtrinity.zeist.de> References: <42BAC058.3040603@squbes.com> <42BAC1CB.30402@samsco.org> <86mzphcc0z.fsf@xps.des.no> <42BAEA23.70802@squbes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <42BAEA23.70802@squbes.com>; from bsdcrank@squbes.com on Thu, Jun 23, 2005 at 12:58:11PM -0400 X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-4; AVE: 6.31.0.7; VDF: 6.31.0.96; host: newtrinity.zeist.de) Cc: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , Scott Long , freebsd-hackers@freebsd.org Subject: Re: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso 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, 23 Jun 2005 21:03:28 -0000 On Thu, Jun 23, 2005 at 12:58:11PM -0400, Gregg Cooper wrote: > Dag-Erling Smørgrav wrote: > > >Scott Long writes: > > > > > >>Gregg Cooper wrote: > >> > >> > >>>15005 -r--r--r-- 2 root wheel 0 May 8 03:05 dumpdates > >>>15005 -r--r--r-- 2 root wheel 142 May 8 03:05 fbtab > >>>83266 -r--r--r-- 2 root wheel 0 May 8 03:01 locale > >>>83266 -r--r--r-- 2 root wheel 31 May 8 03:01 mm.tmac > >>>83269 -r--r--r-- 2 root wheel 0 May 8 03:01 se_locale > >>>83269 -r--r--r-- 2 root wheel 97 May 8 03:01 se_ms.cov > >>>99056 -r--r--r-- 2 root wheel 0 May 8 03:05 utmp > >>>99056 -r--r--r-- 2 root wheel 18425 May 8 03:04 Makefile.dist > >>> > >>> > >>Maybe it's a bug in mkisofs? > >> > >> > > > >ISO 9660 filesystems donn't have inode numbers. The cd9660 code fakes > >them based on the location of each file's contents. This model breaks > >down for empty files, which have no contents and thus no meaningful > >location. Apparently, mkisofs simply keeps track of the last extent > >written and uses that for the location of the next file regardless of > >whether it actually has any contents, so empty files get the same > >inode number as the previous non-empty file. > > > >The attached patch will make mkisofs assign the lowest valid non-zero > >address to all empty files. They will therefore appear to be hard > >links to eachother, but not to random non-empty files. > > > >DES > > > > > Scott: Thanks for the Makefile snippet. > > DES: So fast - thanks! You provided a solution in less time than I spent > scratching my head ... > > marius: As port maintainer, can you shepherd this change into the > cdrtools project? > Please run it through the author of cdrtools first (Joerg Schilling ). If he thinks it's the right thing to do I'm happy to add it to the port. Marius From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 23 21:34:12 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39E5016A41C for ; Thu, 23 Jun 2005 21:34:12 +0000 (GMT) (envelope-from bsdcrank@squbes.com) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19A6743D1F for ; Thu, 23 Jun 2005 21:34:12 +0000 (GMT) (envelope-from bsdcrank@squbes.com) Received: from [192.168.177.29] ([151.205.168.18]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IIK00G533WZ5HC1@vms044.mailsrvcs.net> for freebsd-hackers@freebsd.org; Thu, 23 Jun 2005 16:34:11 -0500 (CDT) Date: Thu, 23 Jun 2005 17:34:10 -0400 From: Gregg Cooper In-reply-to: <20050623230313.D80563@newtrinity.zeist.de> To: Marius Strobl Message-id: <42BB2AD2.2070803@squbes.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en References: <42BAC058.3040603@squbes.com> <42BAC1CB.30402@samsco.org> <86mzphcc0z.fsf@xps.des.no> <42BAEA23.70802@squbes.com> <20050623230313.D80563@newtrinity.zeist.de> User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050524) Cc: freebsd-hackers@freebsd.org Subject: Re: Duplicate inodes in 5.4-RELEASE-i386-disc1.iso 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, 23 Jun 2005 21:34:12 -0000 Marius Strobl wrote: > Please run it through the author of cdrtools first (Joerg Schilling > ). If he thinks it's the right thing > to do I'm happy to add it to the port. Well, from the follow-up discussion, it is clear that this is deeper water than I should navigate, so will defer this to somebody with an @freebsd.org address ... :) Gregg From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 14:31:32 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B60C16A429 for ; Fri, 24 Jun 2005 14:31:32 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: from mailserv1.neuroflux.com (ns2.neuroflux.com [204.228.228.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id C40B343D1F for ; Fri, 24 Jun 2005 14:31:31 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: (qmail 6177 invoked by uid 89); 24 Jun 2005 14:34:13 -0000 Received: from unknown (HELO www2.neuroflux.com) (127.0.0.1) by localhost with SMTP; 24 Jun 2005 14:34:13 -0000 Received: from 66.166.104.222 (SquirrelMail authenticated user ryans@gamersimpact.com); by www2.neuroflux.com with HTTP; Fri, 24 Jun 2005 08:34:13 -0600 (MDT) Message-ID: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> Date: Fri, 24 Jun 2005 08:34:13 -0600 (MDT) From: "Ryan Sommers" To: hackers@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Subject: To C++ or not to C++ 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, 24 Jun 2005 14:31:32 -0000 Greetings all... I'm about to undertake a major software engineering project and I can't decide between C or C++ and was wondering if I could get some input from the community. As part of this project I'm going to need to make use of at least 2 C libraries (OpenSSL and ncurses) and the application must be compatible with the standard range of Linux/UNIX compilers and operating systems. All of these signs make me sway closer to just doing it in C. However, one strong point always seems to pull me back to C++, constructors and destructors. Constructors and destructors can offer so much in the way of memory leak avoidance. Of course, each language can leak memory like a sieve if used improperly. However, for statically allocated structures semi-automatic garbage collection can be a nice cushion. Anyway, without getting into too much detail. Anyone had to make this choice on a project? What were your thoughts in retrospect? What would you have done different, what would stay the same... PS For this project things like polymorphisms and inheritance really aren't needed. Thanks -- Ryan Sommers ryans@gamersimpact.com From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 15:19:50 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ABA816A41C for ; Fri, 24 Jun 2005 15:19:50 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: from sarajevo.pacific.net.sg (sarajevo.pacific.net.sg [203.120.90.134]) by mx1.FreeBSD.org (Postfix) with SMTP id DBE0243D48 for ; Fri, 24 Jun 2005 15:19:49 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: (qmail 21442 invoked from network); 24 Jun 2005 15:19:48 -0000 Received: from unknown (HELO maxwell6.pacific.net.sg) (203.120.90.212) by sarajevo with SMTP; 24 Jun 2005 15:19:48 -0000 Received: from [192.168.0.107] ([210.24.122.16]) by maxwell6.pacific.net.sg with ESMTP id <20050624151947.HSZJ1233.maxwell6.pacific.net.sg@[192.168.0.107]>; Fri, 24 Jun 2005 23:19:47 +0800 Message-ID: <42BC248D.8060206@pacific.net.sg> Date: Fri, 24 Jun 2005 23:19:41 +0800 From: Erich Dollansky Organization: oceanare pte ltd User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050514) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ryan Sommers References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> In-Reply-To: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: To C++ or not to C++ 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, 24 Jun 2005 15:19:50 -0000 Hi, Ryan Sommers wrote: > > Anyway, without getting into too much detail. Anyone had to make this > choice on a project? What were your thoughts in retrospect? What would you > have done different, what would stay the same... > No matter what kind of project I did after the C++ hype was over it was in C++ with as little as object orientation as possible just to make use of the advantages compilers offer for C++. You need one or more interfaces to plain C libraries. You should see pretty fast where you better switch to C++ as long as you keep this clear line to C libraries always intact. You also should draw a clear line if your programs will be called from others. Draw the same clear line between C and C++ to avoid confusion and stick with plain C as much as possible. Never forget, many of the object orientated principles also work with plain C. Erich From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 16:14:47 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F0BD16A41C for ; Fri, 24 Jun 2005 16:14:47 +0000 (GMT) (envelope-from cmello@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8D0243D1F for ; Fri, 24 Jun 2005 16:14:46 +0000 (GMT) (envelope-from cmello@gmail.com) Received: by wproxy.gmail.com with SMTP id 68so1319435wri for ; Fri, 24 Jun 2005 09:14:46 -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:references; b=fDt1kJRlGz9xgJ7eXjhX9xHJoS0669WZ67JdJcAL++41h/qtgkWiGQ4C3KpOKvaoVsWkTUz69KmHu5eUQReiupYW7il5nfOUgoVSYb3O88olTA3mHCVrfkQNK9a5LiCKJLI3TuIeoXz3xMJQ8alzRRhBjo8O1tzQsrvHXXTrB5Q= Received: by 10.54.114.6 with SMTP id m6mr1936882wrc; Fri, 24 Jun 2005 09:14:45 -0700 (PDT) Received: by 10.54.102.20 with HTTP; Fri, 24 Jun 2005 09:14:45 -0700 (PDT) Message-ID: Date: Fri, 24 Jun 2005 13:14:45 -0300 From: Cesar Mello To: Erich Dollansky In-Reply-To: <42BC248D.8060206@pacific.net.sg> Mime-Version: 1.0 References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> <42BC248D.8060206@pacific.net.sg> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Ryan Sommers , hackers@freebsd.org Subject: Re: To C++ or not to C++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cesar Mello List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2005 16:14:47 -0000 Go for C++ and keep your C APIs hidden.=20 Automatic resource acquisition, the standard template library and exceptio= n=20 handling work great and will allow you to write very clean code. If you haven't done this yet, buy a copy of "The C++ Programming Language"= =20 by Bjarne Stroustrup and "C++ Coding Standards" by Herb Sutter, that change= d=20 my life drastically. hehe In the other hand, if you have seen MFC, forget everything you know as C++= =20 and go buy those books. [] Mello 2005/6/24, Erich Dollansky :=20 >=20 > Hi, >=20 > Ryan Sommers wrote: > > > > Anyway, without getting into too much detail. Anyone had to make this > > choice on a project? What were your thoughts in retrospect? What would= =20 > you > > have done different, what would stay the same... > > > No matter what kind of project I did after the C++ hype was over it was > in C++ with as little as object orientation as possible just to make use > of the advantages compilers offer for C++. >=20 > You need one or more interfaces to plain C libraries. >=20 > You should see pretty fast where you better switch to C++ as long as you > keep this clear line to C libraries always intact. >=20 > You also should draw a clear line if your programs will be called from > others. Draw the same clear line between C and C++ to avoid confusion > and stick with plain C as much as possible. >=20 > Never forget, many of the object orientated principles also work with > plain C. >=20 > Erich > _______________________________________________ > 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 24 19:34:07 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 704F816A41C for ; Fri, 24 Jun 2005 19:34:07 +0000 (GMT) (envelope-from alexander_kurilovich@hotmail.com) Received: from hotmail.com (bay13-dav2.bay13.hotmail.com [64.4.31.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E58943D48 for ; Fri, 24 Jun 2005 19:34:07 +0000 (GMT) (envelope-from alexander_kurilovich@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 24 Jun 2005 12:34:06 -0700 Message-ID: Received: from 66.174.76.203 by BAY13-DAV2.phx.gbl with DAV; Fri, 24 Jun 2005 19:34:06 +0000 X-Originating-IP: [66.174.76.203] X-Originating-Email: [alexander_kurilovich@hotmail.com] X-Sender: alexander_kurilovich@hotmail.com From: "Alexander Kurilovich" To: Date: Fri, 24 Jun 2005 15:33:56 -0400 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001C_01C578D2.22502470" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-Index: AcV486knGyLVIKQhQfGrgRQByAo9Vw== X-OriginalArrivalTime: 24 Jun 2005 19:34:06.0879 (UTC) FILETIME=[AF9FAAF0:01C578F3] X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Wireless CDMA cards for Verizon 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, 24 Jun 2005 19:34:07 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_001C_01C578D2.22502470 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi I've implemented 2 PCMCI wireless CDMA-3G cards from Verizon. I use them via 'ppp' using 'ucom'. It might be helpful for somebody. Code, ppp.conf and usbd.conf in attached file. Alexander Kurilovich ------=_NextPart_000_001C_01C578D2.22502470-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 20:02:42 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3763B16A41F for ; Fri, 24 Jun 2005 20:02:42 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id E13F943D4C for ; Fri, 24 Jun 2005 20:02:41 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id j5OK2d8c020964; Fri, 24 Jun 2005 15:02:40 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Date: Fri, 24 Jun 2005 15:02:41 -0500 (CDT) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: Ryan Sommers In-Reply-To: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> Message-ID: <20050624145937.E20046@thor.farley.org> References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-948064467-1119643361=:20046" Cc: hackers@freebsd.org Subject: Re: To C++ or not to C++ 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, 24 Jun 2005 20:02:42 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-948064467-1119643361=:20046 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 24 Jun 2005, Ryan Sommers wrote: > Greetings all... I'm about to undertake a major software engineering > project and I can't decide between C or C++ and was wondering if I > could get some input from the community. > > As part of this project I'm going to need to make use of at least 2 C > libraries (OpenSSL and ncurses) and the application must be compatible > with the standard range of Linux/UNIX compilers and operating systems. > All of these signs make me sway closer to just doing it in C. However, > one strong point always seems to pull me back to C++, constructors and > destructors. > > Constructors and destructors can offer so much in the way of memory > leak avoidance. Of course, each language can leak memory like a sieve > if used improperly. However, for statically allocated structures > semi-automatic garbage collection can be a nice cushion. > > Anyway, without getting into too much detail. Anyone had to make this > choice on a project? What were your thoughts in retrospect? What would > you have done different, what would stay the same... > > PS For this project things like polymorphisms and inheritance really > aren't needed. If you would like to use C but want some sort of memory handling, I can recommend using the Apache Portable Runtime (APR) in /usr/ports/devel/apr which uses memory pools. Although I have not used it before, there is also the Boehm Garbage Collector found in /usr/ports/devel/boehm-gc. Se=E1n --=20 sean-freebsd@farley.org --0-948064467-1119643361=:20046-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 20:45:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED2CE16A41C for ; Fri, 24 Jun 2005 20:45:19 +0000 (GMT) (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 9750843D48 for ; Fri, 24 Jun 2005 20:45:18 +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 j5OKjIXQ099487; Fri, 24 Jun 2005 15:45:18 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <42BC70D8.5020404@centtech.com> Date: Fri, 24 Jun 2005 15:45:12 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050603 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alexander Kurilovich References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Wireless CDMA cards for Verizon 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, 24 Jun 2005 20:45:20 -0000 Alexander Kurilovich wrote: > Hi > > > > I've implemented 2 PCMCI wireless CDMA-3G cards from Verizon. I use them via > 'ppp' using 'ucom'. > > > > It might be helpful for somebody. Code, ppp.conf and usbd.conf in attached > file. I didn't see any attachment.. ? Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology A lost ounce of gold may be found, a lost moment of time never. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 21:02:47 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5628716A41C for ; Fri, 24 Jun 2005 21:02:47 +0000 (GMT) (envelope-from nkoch@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id A564943D1D for ; Fri, 24 Jun 2005 21:02:46 +0000 (GMT) (envelope-from nkoch@gmx.de) Received: (qmail invoked by alias); 24 Jun 2005 21:02:44 -0000 Received: from C3B3BF52.dial.de.easynet.net (EHLO C3B3BF52.dial.de.easynet.net) [195.179.191.82] by mail.gmx.net (mp015) with SMTP; 24 Jun 2005 23:02:44 +0200 X-Authenticated: #472702 From: Norbert Koch To: freebsd-hackers@freebsd.org Date: Fri, 24 Jun 2005 23:01:05 +0200 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506242301.05728.nkoch@gmx.de> X-Y-GMX-Trusted: 0 Subject: uplcom callin/callout device? 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, 24 Jun 2005 21:02:47 -0000 Hello. I'm trying to get a sub-to-rs232 adaptor running with FreeBSD-5. The vendor of this adaptor is some chinese company named High-Edge Tech, but as usbdevs shows, it identifies as USB_VENDOR_PROLIFIC(0x067b) and USB_PRODUCT_PROLIFIC_PL2303(0x2303). For testing, I connect the adaptor with the same computer's cuaa0 and do an 'stty speed 9600 clocal' on /dev/ucom0 and /dev/cuaia0. Now, if I do 'cat < /dev/ucom0' and 'cat > /dev/cuaa0', I see typed characters coming in. If I try the opposite direction, nothing happens. Is that something, I should've expected, and if so, why? Does it have something to do with the difference of callin and callout devices? Can I use /dev/ucom0 only as callin device like /dev/ttyd0? Thanks, Norbert From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 22:39:22 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B10A816A41C for ; Fri, 24 Jun 2005 22:39:22 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E23F43D1D for ; Fri, 24 Jun 2005 22:39:22 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so1175701wra for ; Fri, 24 Jun 2005 15:39:21 -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=pWAmbZVUuim6xbY6Iybs1BFBkMdZerlL950Qfdw5Q5qWV40VP+NcuYn82SDrwV2nYtsXxBPuDfGxBBLqcijhup5cebVMx9S3wcjgrYKXksvb4Z89uTKvM/+DpDAzlz78jxkHFewbLeegNXMX7kIquJoibUEce7VQjQc/UuXkmhk= Received: by 10.54.52.76 with SMTP id z76mr2129133wrz; Fri, 24 Jun 2005 15:39:21 -0700 (PDT) Received: by 10.54.102.4 with HTTP; Fri, 24 Jun 2005 15:39:21 -0700 (PDT) Message-ID: <319cceca05062415396440b9c5@mail.gmail.com> Date: Sat, 25 Jun 2005 01:39:21 +0300 From: Maslan To: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= In-Reply-To: <20050624145937.E20046@thor.farley.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> <20050624145937.E20046@thor.farley.org> Cc: Ryan Sommers , hackers@freebsd.org Subject: Re: To C++ or not to C++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maslan List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2005 22:39:22 -0000 i don't think this is the suitable mailling list to ask this question On 6/24/05, Se=E1n C. Farley wrote: > On Fri, 24 Jun 2005, Ryan Sommers wrote: >=20 > > Greetings all... I'm about to undertake a major software engineering > > project and I can't decide between C or C++ and was wondering if I > > could get some input from the community. > > > > As part of this project I'm going to need to make use of at least 2 C > > libraries (OpenSSL and ncurses) and the application must be compatible > > with the standard range of Linux/UNIX compilers and operating systems. > > All of these signs make me sway closer to just doing it in C. However, > > one strong point always seems to pull me back to C++, constructors and > > destructors. > > > > Constructors and destructors can offer so much in the way of memory > > leak avoidance. Of course, each language can leak memory like a sieve > > if used improperly. However, for statically allocated structures > > semi-automatic garbage collection can be a nice cushion. > > > > Anyway, without getting into too much detail. Anyone had to make this > > choice on a project? What were your thoughts in retrospect? What would > > you have done different, what would stay the same... > > > > PS For this project things like polymorphisms and inheritance really > > aren't needed. >=20 > If you would like to use C but want some sort of memory handling, I can > recommend using the Apache Portable Runtime (APR) in > /usr/ports/devel/apr which uses memory pools. Although I have not used > it before, there is also the Boehm Garbage Collector found in > /usr/ports/devel/boehm-gc. >=20 > Se=E1n > -- > sean-freebsd@farley.org >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " >=20 >=20 --=20 I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 08:37:12 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82B7B16A41C for ; Sat, 25 Jun 2005 08:37:12 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: from sarajevo.pacific.net.sg (sarajevo.pacific.net.sg [203.120.90.134]) by mx1.FreeBSD.org (Postfix) with SMTP id AB48843D55 for ; Sat, 25 Jun 2005 08:37:11 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: (qmail 21131 invoked from network); 25 Jun 2005 08:37:09 -0000 Received: from unknown (HELO maxwell2.pacific.net.sg) (203.120.90.192) by sarajevo with SMTP; 25 Jun 2005 08:37:09 -0000 Received: from [192.168.0.107] ([210.24.122.16]) by maxwell2.pacific.net.sg with ESMTP id <20050625083708.NTDG28012.maxwell2.pacific.net.sg@[192.168.0.107]>; Sat, 25 Jun 2005 16:37:08 +0800 Message-ID: <42BD17AC.1020409@pacific.net.sg> Date: Sat, 25 Jun 2005 16:37:00 +0800 From: Erich Dollansky Organization: oceanare pte ltd User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050514) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maslan References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> <20050624145937.E20046@thor.farley.org> <319cceca05062415396440b9c5@mail.gmail.com> In-Reply-To: <319cceca05062415396440b9c5@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Ryan Sommers , hackers@freebsd.org, =?ISO-8859-1?Q?=22Se=E1n_C=2E_Farley=22?= Subject: Re: To C++ or not to C++ 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, 25 Jun 2005 08:37:12 -0000 Hi, Maslan wrote: > i don't think this is the suitable mailling list to ask this question > aren't hackers the people who have the real-life experience? What will a C programmer tell? What will a Java programmer tell? Isn't it much better to ask here? Erich > > On 6/24/05, Seán C. Farley wrote: > >>On Fri, 24 Jun 2005, Ryan Sommers wrote: >> >> >>>Greetings all... I'm about to undertake a major software engineering >>>project and I can't decide between C or C++ and was wondering if I >>>could get some input from the community. >>> From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 10:03:18 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5026516A420 for ; Sat, 25 Jun 2005 10:03:18 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from md1.swissinfo.org (md1.swissinfo.org [146.159.4.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id D388F43D53 for ; Sat, 25 Jun 2005 10:03:17 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md1.swissinfo.org (phad1.swissinfo.org [146.159.6.9]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 53-md50000540121.msg for ; Sat, 25 Jun 2005 12:03:12 +0200 Received: from AAmiens-152-1-2-37.w83-192.abo.wanadoo.fr (83.192.65.37) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942004372AD8 for freebsd-hackers@freebsd.org; Sat, 25 Jun 2005 12:03:10 +0200 From: Seb To: freebsd-hackers@freebsd.org Date: Sat, 25 Jun 2005 12:03:13 +0200 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506251203.13569.sebastien.b@swissinfo.org> X-Spam-Processed: phad1.swissinfo.org, Sat, 25 Jun 2005 12:03:12 +0200 (not processed: message from valid local sender) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: phad1.swissinfo.org, Sat, 25 Jun 2005 12:03:15 +0200 Subject: Accessing filesystem from a KLD 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, 25 Jun 2005 10:03:18 -0000 Hello, How can I access the filesystem from a kernel module ? In fact, I want my device driver to retreive a firmware image stored on the filesystem (instead of putting the firmware data in a static array at compile-time) for memory usage and legal concerns. Blocking calls are OK. I have searched the manpages and the web, but I haven't found anything relevant. Thanks, Sebastien From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 10:15:26 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80DA916A41C for ; Sat, 25 Jun 2005 10:15:26 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from efnet-math.org (efnet-math.org [69.60.109.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 292DF43D55 for ; Sat, 25 Jun 2005 10:15:26 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.1.12] (63-170-138-118.cst-sg.blacksburg.ntc-com.net [63.170.138.118]) (authenticated bits=0) by efnet-math.org (8.13.1/8.13.1) with ESMTP id j5PAFOt5030601 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Sat, 25 Jun 2005 06:15:24 -0400 In-Reply-To: <200506251203.13569.sebastien.b@swissinfo.org> References: <200506251203.13569.sebastien.b@swissinfo.org> Mime-Version: 1.0 (Apple Message framework v730) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <42F160E7-9B19-4A8A-8656-A86E0076EBB3@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Suleiman Souhlal Date: Sat, 25 Jun 2005 06:15:18 -0400 To: Seb X-Mailer: Apple Mail (2.730) Cc: freebsd-hackers@FreeBSD.org Subject: Re: Accessing filesystem from a KLD 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, 25 Jun 2005 10:15:26 -0000 Hi, On Jun 25, 2005, at 6:03 AM, Seb wrote: > Hello, > How can I access the filesystem from a kernel module ? > In fact, I want my device driver to retreive a firmware image > stored on the > filesystem (instead of putting the firmware data in a static array at > compile-time) for memory usage and legal concerns. Blocking calls > are OK. > I have searched the manpages and the web, but I haven't found anything > relevant. > Thanks, > Sebastien You can use vn_open() to open the file, and then read it using vn_rdwr (), and finally, vn_close() to close it. Look at src/sys/kern/ link_elf_obj.c for an example. -- Suleiman Souhlal | ssouhlal@vt.edu The FreeBSD Project | ssouhlal@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 11:19:51 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4189316A41C for ; Sat, 25 Jun 2005 11:19:51 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAEF443D48 for ; Sat, 25 Jun 2005 11:19:46 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-8-51.belrs4.nsw.optusnet.com.au [220.239.8.51]) by mail10.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j5PBHlGI021866 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 25 Jun 2005 21:17:48 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id j5PBHlRx076037; Sat, 25 Jun 2005 21:17:47 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j5PBGwc4076036; Sat, 25 Jun 2005 21:16:58 +1000 (EST) (envelope-from pjeremy) Date: Sat, 25 Jun 2005 21:16:58 +1000 From: Peter Jeremy To: Erich Dollansky Message-ID: <20050625111658.GC50157@cirb503493.alcatel.com.au> References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> <20050624145937.E20046@thor.farley.org> <319cceca05062415396440b9c5@mail.gmail.com> <42BD17AC.1020409@pacific.net.sg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42BD17AC.1020409@pacific.net.sg> User-Agent: Mutt/1.4.2i Cc: Maslan , hackers@freebsd.org, =?iso-8859-1?Q?Se=E1n_C=2E?= Farley , Ryan Sommers Subject: Re: To C++ or not to C++ 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, 25 Jun 2005 11:19:51 -0000 On Sat, 2005-Jun-25 16:37:00 +0800, Erich Dollansky wrote: >>i don't think this is the suitable mailling list to ask this question >> >aren't hackers the people who have the real-life experience? > >What will a C programmer tell? >What will a Java programmer tell? > >Isn't it much better to ask here? To quote the mailing list charter: This is a forum for technical discussions related to FreeBSD. This is the primary technical mailing list. It is for individuals actively working on FreeBSD, to bring up problems or discuss alternative solutions. Individuals interested in following the technical discussion are also welcome. The question made no mention of FreeBSD but was a general question on C++ with reference to Linux. comp.lang.c++ might be a more appropriate forum. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 11:40:14 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC85816A41C for ; Sat, 25 Jun 2005 11:40:14 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: from salvador.pacific.net.sg (salvador.pacific.net.sg [203.120.90.219]) by mx1.FreeBSD.org (Postfix) with SMTP id 0DF8D43D48 for ; Sat, 25 Jun 2005 11:40:13 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: (qmail 8906 invoked from network); 25 Jun 2005 11:40:12 -0000 Received: from unknown (HELO maxwell2.pacific.net.sg) (203.120.90.192) by salvador with SMTP; 25 Jun 2005 11:40:11 -0000 Received: from [192.168.0.107] ([210.24.122.16]) by maxwell2.pacific.net.sg with ESMTP id <20050625114010.OBPQ28012.maxwell2.pacific.net.sg@[192.168.0.107]>; Sat, 25 Jun 2005 19:40:10 +0800 Message-ID: <42BD4290.4040205@pacific.net.sg> Date: Sat, 25 Jun 2005 19:40:00 +0800 From: Erich Dollansky Organization: oceanare pte ltd User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050514) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Jeremy References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> <20050624145937.E20046@thor.farley.org> <319cceca05062415396440b9c5@mail.gmail.com> <42BD17AC.1020409@pacific.net.sg> <20050625111658.GC50157@cirb503493.alcatel.com.au> In-Reply-To: <20050625111658.GC50157@cirb503493.alcatel.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Maslan , hackers@freebsd.org, =?ISO-8859-1?Q?=22Se=E1n_C=2E_Farley=22?= , Ryan Sommers Subject: Re: To C++ or not to C++ 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, 25 Jun 2005 11:40:14 -0000 Hi, Peter Jeremy wrote: > On Sat, 2005-Jun-25 16:37:00 +0800, Erich Dollansky wrote: > >>>i don't think this is the suitable mailling list to ask this question >>> >> >>aren't hackers the people who have the real-life experience? >> >>What will a C programmer tell? >>What will a Java programmer tell? >> >>Isn't it much better to ask here? > > > To quote the mailing list charter: > This is a forum for technical discussions related to FreeBSD. This is This was clear to me and I linked OpenSSL and NCURSES plus the compilers to this. > the primary technical mailing list. It is for individuals actively > working on FreeBSD, to bring up problems or discuss alternative I missed this part of it. > solutions. Individuals interested in following the technical > discussion are also welcome. > > The question made no mention of FreeBSD but was a general question on > C++ with reference to Linux. comp.lang.c++ might be a more appropriate > forum. > How about CHAT? Erich > From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 12:24:25 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C22E16A41C for ; Sat, 25 Jun 2005 12:24:25 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD98343D4C for ; Sat, 25 Jun 2005 12:24:24 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j5PCOLGG043532; Sat, 25 Jun 2005 21:54:22 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sat, 25 Jun 2005 21:54:17 +0930 User-Agent: KMail/1.8 References: <200506251203.13569.sebastien.b@swissinfo.org> In-Reply-To: <200506251203.13569.sebastien.b@swissinfo.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1279585.YzMc3188s8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200506252154.18242.doconnor@gsoft.com.au> X-Spam-Score: -2.4 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: Seb Subject: Re: Accessing filesystem from a KLD 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, 25 Jun 2005 12:24:25 -0000 --nextPart1279585.YzMc3188s8 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 25 Jun 2005 19:33, Seb wrote: > How can I access the filesystem from a kernel module ? > In fact, I want my device driver to retreive a firmware image stored on t= he > filesystem (instead of putting the firmware data in a static array at > compile-time) for memory usage and legal concerns. Blocking calls are OK. > I have searched the manpages and the web, but I haven't found anything > relevant. if_ndis does this (well ndis) to load firmware images from the file system = for=20 drivers. I wonder if it would make sense to generalise it - the ndis code covers thi= ngs=20 like building the firmware image into the kernel for cases where you are NF= S=20 mounting your disks (for example). =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1279585.YzMc3188s8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBCvUzy5ZPcIHs/zowRAoFbAJ4smOYx7gD5FJHeolLQLh6wecYsWwCfR4Zu w/Z73/sQhDPlsjVqJpP9bA0= =fc87 -----END PGP SIGNATURE----- --nextPart1279585.YzMc3188s8-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 12:53:03 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AB0316A41C for ; Sat, 25 Jun 2005 12:53:03 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB4F343D49 for ; Sat, 25 Jun 2005 12:53:02 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: by wproxy.gmail.com with SMTP id 57so78719wri for ; Sat, 25 Jun 2005 05:53:02 -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=osrMc5H5cmm2cDjDE+tapIZqDbDNgsDsco4hDmgVb5hP5hvg0Ov3FfJ5dTQq7Rch1QCyXKFJg9cGIgg4VSskjBPlddPmn3BmEagFBG3cWvxeEip0vVD1GcN6HHKCzVSBMvZML+vdUds88ZfaQ4uHM+delzZXpMzQJlNRtNvgxbo= Received: by 10.54.67.3 with SMTP id p3mr2407479wra; Sat, 25 Jun 2005 05:53:02 -0700 (PDT) Received: by 10.54.102.4 with HTTP; Sat, 25 Jun 2005 05:53:02 -0700 (PDT) Message-ID: <319cceca050625055376ca720e@mail.gmail.com> Date: Sat, 25 Jun 2005 15:53:02 +0300 From: Maslan To: Erich Dollansky In-Reply-To: <42BD4290.4040205@pacific.net.sg> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> <20050624145937.E20046@thor.farley.org> <319cceca05062415396440b9c5@mail.gmail.com> <42BD17AC.1020409@pacific.net.sg> <20050625111658.GC50157@cirb503493.alcatel.com.au> <42BD4290.4040205@pacific.net.sg> Cc: Peter Jeremy , hackers@freebsd.org, =?ISO-8859-1?Q?=22Se=E1n_C=2E_Farley=22?= , Ryan Sommers Subject: Re: To C++ or not to C++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maslan List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jun 2005 12:53:03 -0000 >To quote the mailing list charter: > This is a forum for technical discussions related to FreeBSD. This is > the primary technical mailing list. It is for individuals actively > working on FreeBSD, to bring up problems or discuss alternative > solutions. Individuals interested in following the technical > discussion are also welcome. >The question made no mention of FreeBSD but was a general question on >C++ with reference to Linux. comp.lang.c++ might be a more appropriate >forum. i agree with u On 6/25/05, Erich Dollansky wrote: > Hi, >=20 > Peter Jeremy wrote: > > On Sat, 2005-Jun-25 16:37:00 +0800, Erich Dollansky wrote: > > > >>>i don't think this is the suitable mailling list to ask this question > >>> > >> > >>aren't hackers the people who have the real-life experience? > >> > >>What will a C programmer tell? > >>What will a Java programmer tell? > >> > >>Isn't it much better to ask here? > > > > > > To quote the mailing list charter: > > This is a forum for technical discussions related to FreeBSD. This i= s >=20 > This was clear to me and I linked OpenSSL and NCURSES plus the compilers > to this. >=20 > > the primary technical mailing list. It is for individuals actively > > working on FreeBSD, to bring up problems or discuss alternative >=20 > I missed this part of it. >=20 > > solutions. Individuals interested in following the technical > > discussion are also welcome. > > > > The question made no mention of FreeBSD but was a general question on > > C++ with reference to Linux. comp.lang.c++ might be a more appropriate > > forum. > > > How about CHAT? >=20 > Erich > > >=20 --=20 I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 17:59:05 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C724216A41C; Sat, 25 Jun 2005 17:59:05 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D43643D49; Sat, 25 Jun 2005 17:59:05 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.3) with ESMTP id j5PHuDXH001596; Sat, 25 Jun 2005 11:56:13 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 25 Jun 2005 11:57:47 -0600 (MDT) Message-Id: <20050625.115747.127180168.imp@bsdimp.com> To: ssouhlal@freebsd.org From: "M. Warner Losh" In-Reply-To: <42F160E7-9B19-4A8A-8656-A86E0076EBB3@FreeBSD.org> References: <200506251203.13569.sebastien.b@swissinfo.org> <42F160E7-9B19-4A8A-8656-A86E0076EBB3@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, sebastien.b@swissinfo.org Subject: Re: Accessing filesystem from a KLD 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, 25 Jun 2005 17:59:05 -0000 In message: <42F160E7-9B19-4A8A-8656-A86E0076EBB3@FreeBSD.org> Suleiman Souhlal writes: : You can use vn_open() to open the file, and then read it using vn_rdwr : (), and finally, vn_close() to close it. Look at src/sys/kern/ : link_elf_obj.c for an example. There's also a desire to provide an easier to use interface for drivers to load, for example, firmware. Warner