From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 10:20:15 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF0FA106566C for ; Mon, 17 May 2010 10:20:15 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3BB8FC14 for ; Mon, 17 May 2010 10:20:14 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o4HAKBq0086581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 May 2010 12:20:12 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o4HAK8wo024514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 May 2010 12:20:08 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o4HAK8Kt013702; Mon, 17 May 2010 12:20:08 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o4HAK7Rc013701; Mon, 17 May 2010 12:20:07 +0200 (CEST) (envelope-from ticso) Date: Mon, 17 May 2010 12:20:07 +0200 From: Bernd Walter To: Tjado =?iso-8859-1?Q?M=E4cke?= Message-ID: <20100517102007.GQ92942@cicely7.cicely.de> References: <201005151225.o4FCPkl3056460@fire.js.berklix.net> <4BEEBE99.4050105@maecke.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4BEEBE99.4050105@maecke.net> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: freebsd-hackers@freebsd.org, "Julian H. Stacey" Subject: Re: /dev/null & zero inside chroot for make release X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 10:20:15 -0000 On Sat, May 15, 2010 at 05:32:41PM +0200, Tjado Mäcke wrote: > > > Thanks for trying to help :-) But this is in Wrong. > > Line 4 on that page: > > Last updated: 2005-08-11 > > 5 years later, FreeBSD-8.0 has via ls -l /dev/null > > crw-rw-rw- 1 root wheel 0, 31 May 15 14:17 /dev/null > > so both major & minor numbers have changed, command now would be > > mknod dev/null c 0 31 > > which I already posted in my original Thu, 13 May 2010 19:44:58 +0200 > > as having tried, but not good enough. > > > > As I posted Fri, 14 May 2010 21:59:23 +0200 (but you may not have > > seen when you posted) > > > > > > Hm... i did this on 7.2 because chrooted scponly shell with WinSCP > support needs it. In this case it works... > But I'm wrong because the dev/null with my nod numbers doesn't work > correctly and WinSCP looks only if this file is there :D On my 7.0-stable I have: [192]cicely7> ls -al /dev/null crw-rw-rw- 1 root wheel 0, 14 May 17 12:11 /dev/null You may very well have you HDD under 2,2 and having any innocent program writing it's output to it... Fortunately it takes many devnodes until 2,2 is getting used. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 10:26:41 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 370F41065672 for ; Mon, 17 May 2010 10:26:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id AD4F88FC19 for ; Mon, 17 May 2010 10:26:40 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o4HAQmgi087770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 May 2010 13:26:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o4HAQYRg020082; Mon, 17 May 2010 13:26:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o4HAQYkJ020081; Mon, 17 May 2010 13:26:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 17 May 2010 13:26:34 +0300 From: Kostik Belousov To: ticso@cicely.de Message-ID: <20100517102634.GI83316@deviant.kiev.zoral.com.ua> References: <201005151225.o4FCPkl3056460@fire.js.berklix.net> <4BEEBE99.4050105@maecke.net> <20100517102007.GQ92942@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ixDdryD3ui8aoCe5" Content-Disposition: inline In-Reply-To: <20100517102007.GQ92942@cicely7.cicely.de> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org, Tjado M?cke , "Julian H. Stacey" Subject: Re: /dev/null & zero inside chroot for make release X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 17 May 2010 10:26:41 -0000 --ixDdryD3ui8aoCe5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 17, 2010 at 12:20:07PM +0200, Bernd Walter wrote: > On Sat, May 15, 2010 at 05:32:41PM +0200, Tjado M?cke wrote: > >=20 > > > Thanks for trying to help :-) But this is in Wrong. > > > Line 4 on that page: > > > Last updated: 2005-08-11 > > > 5 years later, FreeBSD-8.0 has via ls -l /dev/null > > > crw-rw-rw- 1 root wheel 0, 31 May 15 14:17 /dev/null > > > so both major & minor numbers have changed, command now would be > > > mknod dev/null c 0 31 > > > which I already posted in my original Thu, 13 May 2010 19:44:58 +0200 > > > as having tried, but not good enough. > > > > > > As I posted Fri, 14 May 2010 21:59:23 +0200 (but you may not have > > > seen when you posted) > > > > > > =20 > >=20 > > Hm... i did this on 7.2 because chrooted scponly shell with WinSCP > > support needs it. In this case it works... > > But I'm wrong because the dev/null with my nod numbers doesn't work > > correctly and WinSCP looks only if this file is there :D >=20 > On my 7.0-stable I have: > [192]cicely7> ls -al /dev/null > crw-rw-rw- 1 root wheel 0, 14 May 17 12:11 /dev/null >=20 > You may very well have you HDD under 2,2 and having any innocent program > writing it's output to it... > Fortunately it takes many devnodes until 2,2 is getting used. For very long time, the following two statements are true: - char devices only have magic property of being a door to the device drivers when living on devfs mount point. Character devices on UFS or any other non-devfs mounts do not provide access to the physical devices. - major and minor numbers of devfs nodes, as displayed by ls, are not persistent across reboot. mknod on devfs is only useful to unhide the rm'ed node. --ixDdryD3ui8aoCe5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvxGdkACgkQC3+MBN1Mb4j9fACferelEcUfCgWDAIocQ8pKz87M FGoAoJrBsH4Yt6hNR/ngjyD+RT+A37GT =edxm -----END PGP SIGNATURE----- --ixDdryD3ui8aoCe5-- From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 15:02:23 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 339E31065672 for ; Mon, 17 May 2010 15:02:23 +0000 (UTC) (envelope-from dkmcnulty@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id BC4998FC17 for ; Mon, 17 May 2010 15:02:22 +0000 (UTC) Received: by ewy24 with SMTP id 24so1299083ewy.13 for ; Mon, 17 May 2010 08:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=POP/fw/CQD79ViKjZBvzE6YeFh2zUcV8jEGVh0KdLE0=; b=PtIdhFI9cBxSaNgbiIs8tp72DZ+j7LL7S8Hx137uze6VoP1C7uEWP+ogO4BoTEzzd9 5oQs8qCbTZH+/q2XwsWlZ5CkERedhaFGIp8pDIf8smV+Op8s2+bm2fqdeI8anTN0gGun 4QKJLDEQP4t1J5W+jqKcSYmjOjLAV0LEO3xZg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=iPWtqTNFkDFVYf+BCZhwNauvMaaoWX23MtAbX2ZT48/nx1erOhqQEXifcTTQ58ezsn tQoCIOLEHZ+C1OBXhdTqW8MOxzOPkyNMuA3EOdf2/M4T6wykRVL18KxeasZIvgBVc7Sx oBjLL5V0SL+3jQY894sX2WfxNvESz6eekzu4A= MIME-Version: 1.0 Received: by 10.239.132.206 with SMTP id 14mr498047hbs.111.1274106811543; Mon, 17 May 2010 07:33:31 -0700 (PDT) Received: by 10.239.153.198 with HTTP; Mon, 17 May 2010 07:33:31 -0700 (PDT) Date: Mon, 17 May 2010 09:33:31 -0500 Message-ID: From: Dan McNulty To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Efficient way to determine when a child process forks or calls exec X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 17 May 2010 15:02:23 -0000 Hi all, I have been experimenting with ptrace to determine when a child process forks or calls exec. Particularly, I have explored tracing every system call entry and exit similar to what the truss utility does, and for my case, the performance impact of tracing every system call is too great. Is there a more efficient way than tracing every system call entry and exit to determine when a child process forks, calls exec, or creates a new LWP? Thanks a lot for your help! -Dan From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 19:11:13 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEDB7106566C for ; Mon, 17 May 2010 19:11:13 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5638A8FC1B for ; Mon, 17 May 2010 19:11:13 +0000 (UTC) Received: by wyf19 with SMTP id 19so471362wyf.13 for ; Mon, 17 May 2010 12:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type; bh=Hp6qhHhFcb/xBygwW3vfDvSB5dZrkqY+hXcmUJ82mHs=; b=FU/G2m2T+sOF66UfYPf2APcdbXf4eW3SzKtrR/sqt+c4lqku6DyVuVJr46WhaFHufu t5rjF5qTN9EQ7QZQtIFG/8I6GUUsVh6BmN9nh6eeurLSv2ggXZWgq7r9nf780pVAhVWz 37ExJ82XlLMUeOHxpDkOWl1jZ5NOfPlLVeKDU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type; b=oUZY1UJBZi/OYuQLe86x8xokbou5D2wS/SnPyoiIms79qPqH5BcD8pLuFulzjWBP86 edp62Bh4IrHPUrfZl4KyWvzp+LZfCSoWy4r6eBW6KUtHOTCiQXFJ0NCb+s7T+q4Bkuef 55OjG1rf9kZDI1PY5u7A+EP08+JrbsKGCRliE= Received: by 10.216.88.21 with SMTP id z21mr534703wee.144.1274123472465; Mon, 17 May 2010 12:11:12 -0700 (PDT) Received: from centel.dataix.local (adsl-99-35-14-184.dsl.klmzmi.sbcglobal.net [99.35.14.184]) by mx.google.com with ESMTPS id e82sm1978168wej.16.2010.05.17.12.11.09 (version=SSLv3 cipher=RC4-MD5); Mon, 17 May 2010 12:11:10 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4BF194CB.5060807@dataix.net> Date: Mon, 17 May 2010 15:11:07 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100515 Thunderbird/3.0.4 MIME-Version: 1.0 To: Eitan Adler References: In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=89D8547E Content-Type: multipart/mixed; boundary="------------090009070704060703050008" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org Subject: Re: adding "check option to md5(1) [was: md5(1) and cal(1) on -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, 17 May 2010 19:11:14 -0000 This is a multi-part message in MIME format. --------------090009070704060703050008 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 05/12/2010 04:01, Eitan Adler wrote: >> D> 2. Why doesn't md5(1) have a "check" option? Seems to me requiring a >> D> manual inspection is error-prone at best, and makes scripting >> D> unecessarily complicated. > > Would something like the attached patch be good? > It adds a -c option for a string to check against. It prints > "[failed]" if the string does not match the files md5 unless in -q > mode. > It also returns 2 to indicate md5 match failure for use in scripts. > I have reviewed this patch for functionality and my final conclusion is commit it. Though I would like to see the same functionality that the GNU GPL'd version of md5 has with the '-c' option and being able to check every sum that is listed in a file against a file on disk(c), this version brings the availability to doing the checking right from md5 and utils from a script. I have also edited the manual page portion of the patch to include the '[-c string]' option in the SYNOPSIS section of the man pages. This newly generated patch was generated from the root of the source tree. # cd /path/to/src # patch Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5E841065765 for ; Mon, 17 May 2010 19:19:54 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id E442E8FC08 for ; Mon, 17 May 2010 19:19:53 +0000 (UTC) Received: by pxi7 with SMTP id 7so1420332pxi.13 for ; Mon, 17 May 2010 12:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type; bh=rIEftJzQBYex6Ar5ULXmpUI3/vAog79d/E6SbpqcaN4=; b=vpziJK8xwdUX7KRmV5TOS3FcMYFqpOv9zWKzIzTcenJJWl9L/PuNZJj2uHpm+d3YGH tPDH4BPxmC3/UPd/PsvqSi6/TlUB1pEDE9lBnkiZhbP6RfTUTkKNQo6Pw7k/wcVXf3Ej Gu76yaEGk/OkixcfroSafEVwzuD68KYlsZH3k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type; b=P+Vl11vN4GEg7e7ifOVbqHPm+isL05ltPTGQ8aGHBLjNzKI6khrQZmmEn2FJ0OAHo4 g9HjbrJs5Brpk6XS9tsy+LDic2LXWZc9vlKh+YsAZKzPn1I7QeXYFcCTjE3KBVaivJpY fUugG/sLOe6gRGuNjqDtC+63ioQwt94owBX+w= Received: by 10.142.119.22 with SMTP id r22mr348077wfc.191.1274123993335; Mon, 17 May 2010 12:19:53 -0700 (PDT) Received: from centel.dataix.local (adsl-99-35-14-184.dsl.klmzmi.sbcglobal.net [99.35.14.184]) by mx.google.com with ESMTPS id y27sm1688300wfi.17.2010.05.17.12.19.50 (version=SSLv3 cipher=RC4-MD5); Mon, 17 May 2010 12:19:51 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4BF196D5.5030901@dataix.net> Date: Mon, 17 May 2010 15:19:49 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100515 Thunderbird/3.0.4 MIME-Version: 1.0 To: Dan McNulty References: In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=89D8547E Content-Type: multipart/mixed; boundary="------------080707030207080005040309" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Efficient way to determine when a child process forks or calls exec X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 17 May 2010 19:19:57 -0000 This is a multi-part message in MIME format. --------------080707030207080005040309 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 05/17/2010 10:33, Dan McNulty wrote: > Hi all, > > I have been experimenting with ptrace to determine when a child > process forks or calls exec. Particularly, I have explored tracing > every system call entry and exit similar to what the truss utility > does, and for my case, the performance impact of tracing every system > call is too great. > > Is there a more efficient way than tracing every system call entry and > exit to determine when a child process forks, calls exec, or creates a > new LWP? > > Thanks a lot for your help! > -Dan Not sure if this is exactly what your looking for but have you looked into possibly using the audit system for tracking these things ? In its own way its really efficient and the utilities that are provided (auditreduce) you might just find a easier way to get the information your looking for. Regards, -- jhell --------------080707030207080005040309-- From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 19:28:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C931F1065676 for ; Mon, 17 May 2010 19:28:49 +0000 (UTC) (envelope-from fergleiser@yahoo.com) Received: from web31706.mail.mud.yahoo.com (web31706.mail.mud.yahoo.com [68.142.201.186]) by mx1.freebsd.org (Postfix) with SMTP id 86EB18FC1C for ; Mon, 17 May 2010 19:28:49 +0000 (UTC) Received: (qmail 28840 invoked by uid 60001); 17 May 2010 19:28:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1274124529; bh=lmdfgnil7frSk4W8pUXi8Ir+ntBu7zHOnuvuHg4Axgg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=oCmXw1iMptYLrysc3eRyN4xRYaNgPjFNk+n7lPaNJLehdeIc0pr3V1g8tu/TyiqAXWtEgA4zN6Qgqr8djeDSMDt7d03tTFM58WQAmTRezhztRE8R+4/ZVGGMx5IRtq8eO/6gJ8lZ3ygtZTJlDVBTCfj833p5cLTt3IfUkm2H/zw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=1vXfoHNRbhXEKyfL6BGJ7gEOs+ki+Wd2t8p5UPB0ay1xi8FX3zeXIC5X9GDztur6GIOHCiyh9HssR0nRX5qcvvneVoyC8fnla1cvc7G4Gj+XCNpzFTuvY+D/G4/Ns2iBUWaGuIqvmnPK2/x6pI1OEaJ4GnA8n68ON0dTZbHEIHM=; Message-ID: <167913.27782.qm@web31706.mail.mud.yahoo.com> X-YMail-OSG: qOjWeIkVM1kBU2icC4SXKUrPVFiHmOrEqIBtAKZj2kU4Fna Ra7vXwAHPsViZY2xe7jPUxbiEPpzqv29iiwR_ceiPTkwJy5DKaMuYJ4IwTZ4 WMypV22a6uugEhbbKUfkDIBdsVICnanreEgoIBcyC6510kJvWGn3.2RJ5HmA fheT3SeiSZxqvn7RmN29Ky7BpV3CwW5TV6Sa8DkPN7r04dPJsMrYfCnq3Mc8 _pkWoiwFHdaclTy0p5oStSZWhHL2D0HqIeRIQFwrmIvXtyaDWIkGNSxPhyKM vWvuPEal3bbqJw_zDa00maBla.2TxtUegDXNM.U1P3ba2ZlxFai1pJ6VkzWJ 75SY- Received: from [186.109.140.158] by web31706.mail.mud.yahoo.com via HTTP; Mon, 17 May 2010 12:28:49 PDT X-Mailer: YahooMailRC/374.4 YahooMailWebService/0.8.103.269680 References: Date: Mon, 17 May 2010 12:28:49 -0700 (PDT) From: Fernando Gleiser To: Dan McNulty , freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: Re: Efficient way to determine when a child process forks or calls exec X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 17 May 2010 19:28:49 -0000 ----- Original Message ---- > From: Dan McNulty > To: freebsd-hackers@freebsd.org > Sent: Mon, May 17, 2010 11:33:31 AM > Subject: Efficient way to determine when a child process forks or calls exec > > Hi all, >I have been experimenting with ptrace to determine when a > child process forks or calls exec. Particularly, I have explored > tracing every system call entry and exit similar to what the truss > utility does, and for my case, the performance impact of tracing every > system call is too great. > Is there a more efficient way than tracing > every system call entry and exit to determine when a child process forks, > calls exec, or creates a new LWP? You can do that very easily with DTrace's syscall provider #!/usr/sbin/dtrace -s syscall::fork:entry { self->traceme=1; } syscall::exec*:entry /self->traceme/ { printf("pid %d has called %s\n", pid, probefunc); self->traceme=0; } Hope that helps } Thanks a lot for your > help! -Dan _______________________________________________ > ymailto="mailto:freebsd-hackers@freebsd.org" > href="mailto:freebsd-hackers@freebsd.org">freebsd-hackers@freebsd.org > mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To > unsubscribe, send any mail to " > ymailto="mailto:freebsd-hackers-unsubscribe@freebsd.org" > href="mailto:freebsd-hackers-unsubscribe@freebsd.org">freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 22:59:29 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F192E106564A for ; Mon, 17 May 2010 22:59:29 +0000 (UTC) (envelope-from gonzo@launchpad.bluezbox.com) Received: from launchpad.bluezbox.com (launchpad.bluezbox.com [195.137.202.161]) by mx1.freebsd.org (Postfix) with ESMTP id A3FBE8FC15 for ; Mon, 17 May 2010 22:59:29 +0000 (UTC) Received: from [76.77.86.2] (helo=[192.168.100.37]) by launchpad.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1OE9HP-000Kyt-Ac; Mon, 17 May 2010 22:59:27 +0000 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Oleksandr Tymoshenko In-Reply-To: <892C86B0-81B0-433D-BF9C-7CDBD479F6CC@errno.com> Date: Mon, 17 May 2010 15:58:50 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4BE46650.7010008@bluezbox.com> <892C86B0-81B0-433D-BF9C-7CDBD479F6CC@errno.com> To: Sam Leffler X-Mailer: Apple Mail (2.1078) Sender: gonzo@launchpad.bluezbox.com X-Spam-Level: ---- X-Spam-Report: -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.4 AWL AWL: From: address is in the auto white-list Cc: freebsd-hackers@freebsd.org Subject: Re: hifn(4) DMA fix for review X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 17 May 2010 22:59:30 -0000 On 2010-05-10, at 8:23 AM, Sam Leffler wrote: >=20 > On May 7, 2010, at 12:13 PM, Oleksandr Tymoshenko wrote: >=20 >> Proposed patch addresses hifn(4) problems on FreeBSD/mips. Current >> implementation keeps some of the state information (indexes in >> buffers, etc) in DMA-mapped memory and bus_dma code invalidates them >> during sync operations. This fix moves data that doesn't belong to = DMA >> ring to softc structure. >>=20 >> Patch: http://people.freebsd.org/~gonzo/hifn.diff >> Stats for original driver: >> http://people.freebsd.org/~gonzo/hifn.stats.orig.txt >> Stats for patched version: >> http://people.freebsd.org/~gonzo/hifn.stats.patched.txt >>=20 >>=20 >=20 > The changes look fine and make sense (did something similar for some = other drivers for when the dma data structures were mapped uncached). I = can't see any performance change in your stats; but I'm just eyeballing = the numbers side-by-side. Was this on x86? (where there should be zero = difference) It would be good to present these numbers better (e.g. = curves on the same graph, ministat output, etc). I took some time to learn gnuplot and here is result: http://people.freebsd.org/~gonzo/hifn-cmp.png The red ones are data from original driver, the blue ones are patched. = There are some=20 fluctuations but I think they're OK. I made three measurements for = original drivers and=20 there are fluctuations too with comparable order of magnitude: http://people.freebsd.org/~gonzo/hifn-orig.png=20 If it's OK - I'll commit fixes --=20 gonzo From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 23:21:12 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6005C1065674 for ; Mon, 17 May 2010 23:21:12 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id AEA2D8FC08 for ; Mon, 17 May 2010 23:21:10 +0000 (UTC) Received: from park.js.berklix.net (p549A57DD.dip.t-dialin.net [84.154.87.221]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id o4HNKtqg034085; Mon, 17 May 2010 23:20:56 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id o4HNKjGU039614; Tue, 18 May 2010 01:20:46 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id o4HNKNOV005436; Tue, 18 May 2010 01:20:40 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201005172320.o4HNKNOV005436@fire.js.berklix.net> To: hackers@freebsd.org From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Linux Unix Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com/~jhs/cv/ Date: Tue, 18 May 2010 01:20:23 +0200 Sender: jhs@berklix.com Cc: alex-goncharov@comcast.net Subject: make clean fails to rm /usr/src/contrib/groff/src/include/defs.h X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 17 May 2010 23:21:12 -0000 Hi Hackers, I just filed a send-pr on a bug, if someone writes a fix, please send-pr to http://www.freebsd.org/cgi/query-pr.cgi?pr=146682 No patch, sorry, about to travel. Below a vebatim copy of what I sent. ( It may need some discussion before a fix, hence I did not CC hackers@ the send-pr mail, to keep send-pr web lean. ) ----------- >From jhs@@@berklix.com Tue May 18 00:46:06 2010 Date: Tue, 18 May 2010 00:43:54 +0200 (CEST) Message-Id: <201005172243.o4HMhs8V051385@@@fire.js.berklix.net> To: FreeBSD-gnats-submit@@@freebsd.org Subject: make clean fails to rm /usr/src/contrib/groff/src/include/defs.h From: "Julian H. Stacey" Reply-To: "Julian H. Stacey" Cc: jhs@@@berklix.com X-send-pr-version: 3.113 X-GNATS-Notify: >Submitter-Id: current-users >Originator: Julian H. Stacey >Organization: http://berklix.com BSD Linux Unix Consultancy, Munich/Muenchen. >Confidential: no >Synopsis: make clean fails to rm /usr/src/contrib/groff/src/include/defs.h >Severity: serious >Priority: medium >Category: gnu >Class: sw-bug >Release: FreeBSD 8.0-RELEASE amd64 >Environment: System: FreeBSD fire.js.berklix.net 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Wed Apr 21 10:27:18 CEST 2010 jhs@@@fire.js.berklix.net:/usr1/src/sys/amd64/compile/FIRE64.small2 amd64 >Description: There is a bug in groff. Description & manual fix below. /usr/src/gnu/usr.bin/groff Makefiles should deal with these issues: /usr/src/contrib/groff/src/include/defs.h What creates it ? (ports?) Should it be removed by make clean. Should it be in /usr/obj not /usr/src What about a /usr/src mounted read only. The Problem: { If you accidentally (**) create /usr/src/contrib/groff/src/include/defs.h A make clean fails to remove defs.h. A make compiles all these executables grn grodvi groff grolbp grolj4 grops grotty post-grohtml pre-grohtml troff with a non existant font paths in /usr/local (instead of, not as well as, base fonts in /usr/share/groff_font ). groff fails, so man fails & make world fails. Tests if system affected: ls -l /usr/src/contrib/groff/src/include/defs.h echo hallo > ~/tmp/dummy.rof ; groff ~/tmp/dummy.rof | head -2 groff: can't find `DESC' file groff:fatal error: invalid device `ps' To see failing paths: A good binary will return nothing on next command: strings /usr/bin/groff | grep local | grep -v setlocale /usr/local/bin /usr/local/share/groff/site-font:\ /usr/local/share/groff/1.19.2/font:/usr/lib/font cd /usr/bin; grep -l share/groff/site-font * grn grodvi groff grolbp grolj4 grops grotty post-grohtml pre-grohtml troff truss groff ~/tmp/dummy.rof open("/usr/local/share/groff/site-font/devps/DESC", O_RDONLY,0666) ERR#2 'No such file or directory' open("/usr/local/share/groff/1.19.2/font/devps/DESC", O_RDONLY,0666) ERR#2 'No such file or directory' open("/usr/lib/font/devps/DESC", O_RDONLY,0666) ERR#2 'No such file or directory' A good system should just have: open("/usr/share/groff_font/devps/DESC",O_RDONLY,0666) = 2 (0x2) cd /usr/src/contrib/groff/src/include l defs.h # 541 Apr 27 23:37 defs.h grep local defs.h # See full file at end of mail. cd /usr/obj/usr/src ; Grep groff/site-font | sort # Binary file gnu/usr.bin/groff/src/devices/grodvi/grodvi gnu/usr.bin/groff/src/devices/grohtml/post-grohtml gnu/usr.bin/groff/src/devices/grolbp/grolbp gnu/usr.bin/groff/src/devices/grolj4/grolj4 gnu/usr.bin/groff/src/devices/grops/grops gnu/usr.bin/groff/src/devices/grotty/grotty gnu/usr.bin/groff/src/preproc/grn/grn gnu/usr.bin/groff/src/preproc/html/pre-grohtml gnu/usr.bin/groff/src/roff/groff/groff gnu/usr.bin/groff/src/roff/troff/troff gnu/usr.bin/groff/doc/groff.info A better /usr/obj has just: Grep groff/site-font | sort Binary file ./usr/src/gnu/usr.bin/groff/doc/groff.info matches } How The Problem Arose: { I'm not sure how defs.h got created on my system cd /var/db/pkg ls | wc # 652 652 11818 uname -a FreeBSD fire.js.berklix.net 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Wed Apr 21 10:27:18 CEST 2010 jhs@@@fire.js.berklix.net:/usr1/src/sys/amd64/compile/FIRE64.small2 amd64 defs.h did not get created when I ran a make world within a chroot. } A Lot Of People Have Been Caught Over Time: { Not perhaps a lot of FreeBSD people, though some, but this groff path problem & too cryptic error message has catching people for years on many architectures, eg paste this into google: groff: can't find `DESC' file FreeBSD & get this URL: http://www.google.de/#hl=de&q=groff%3A+can%27t+find+%60DESC%27+file+FreeBSD&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=d778669e1739683f } The too cryptic errors that give no clue which path fails: /usr/src/contrib/groff/src/libs/libgroff/font.cpp can't find `DESC' file /usr/src/contrib/groff/src/roff/groff/groff.cpp invalid device A manual work round a broken system might be possible via: export GROFF_FONT_PATH=/usr/share/groff_font export GROFF_TMAC_PATH=/usr/share/tmac But to recover I did: cd /usr/src/contrib/groff/src/include ; mv defs.h defs.h.MV cd /usr/src;make clean;make -k;make -k install;make;make install >How-To-Repeat: Not sure what first accidentally created my /usr/src/contrib/groff/src/include/defs.h But fill it with this, the run a cd /usr/src; make install ; man man -------- #define PROG_PREFIX "" #define DEVICE "ps" #define INSTALLPATH "/usr/local" #define BINPATH "/usr/local/bin" #define FONTPATH "/usr/local/share/groff/site-font:/usr/local/share/groff/1.19.2/font:/usr/lib/font" #define MACROPATH "/usr/local/lib/groff/site-tmac:/usr/local/share/groff/site-tmac:/usr/local/share/groff/1.19.2/tmac" #define INDEX_SUFFIX ".i" #define COMMON_WORDS_FILE "/usr/local/share/groff/1.19.2/eign" #define DEFAULT_INDEX_DIR "/usr/dict/papers" #define DEFAULT_INDEX_NAME "Ind" #define DEFAULT_INDEX "/usr/dict/papers/Ind" -------- >Fix: I have not written a patch for send-pr as I am about to travel, I hope others may want to work up a patch to submit via send-pr Hopefully someone can fix this. If not, in a month maybe I may write a patch & send-pr it & put a copy here http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/contrib/groff/src/include/defs.h.send-pr ---------------- Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text, Not HTML quoted-printable Base64 http://www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Tue May 18 07:40:54 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5017D106568E for ; Tue, 18 May 2010 07:40:54 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 40A708FC1D for ; Tue, 18 May 2010 07:40:54 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 387901A3D5A; Tue, 18 May 2010 00:40:54 -0700 (PDT) Date: Tue, 18 May 2010 00:40:54 -0700 From: Alfred Perlstein To: Dan McNulty Message-ID: <20100518074054.GE6175@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Efficient way to determine when a child process forks or calls exec X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 18 May 2010 07:40:54 -0000 * Dan McNulty [100517 08:02] wrote: > Hi all, > > I have been experimenting with ptrace to determine when a child > process forks or calls exec. Particularly, I have explored tracing > every system call entry and exit similar to what the truss utility > does, and for my case, the performance impact of tracing every system > call is too great. > > Is there a more efficient way than tracing every system call entry and > exit to determine when a child process forks, calls exec, or creates a > new LWP? > > Thanks a lot for your help! kevent has some hooks, have you looked at that? -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 .- FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 11:21:52 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5A59106566B for ; Wed, 19 May 2010 11:21:52 +0000 (UTC) (envelope-from pali.gabor@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 552918FC13 for ; Wed, 19 May 2010 11:21:52 +0000 (UTC) Received: by mail-fx0-f54.google.com with SMTP id 4so889784fxm.13 for ; Wed, 19 May 2010 04:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=mXSsBVX2HqKm7RPkyIgz6iz9pgHG3vEYVTo1D10+4VY=; b=RASCyPmPQG2OrwANnPUGLYNis5Ve1fJjBHLm9O55QilWiThAu2jp4FbODeQlE7AFiE did45oSHJLIO+awf4An9uTgtd+VTowDv8S9N9w6YRcAKs2RZBctzLWQU4GLbItEhfN+J 4VN8nBLbC1jGWEEfsp8Y/FQ71n12cDiShx1As= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=gTx2SVFZri33Vas1Bx29OOLcQd66lrn4XT4Bc0BYge+4RKuBrlJqCWVzA4kP36nfXs sdg6pSx01+tSqAvNz8Sa7IAKDexfFudOUWKRpgVSWVx1i1GLQxUBD//N8yBi1ImA3YTO E9eCHYBkKHqN4unDnBIOt4fVBectC2VNX8Uik= MIME-Version: 1.0 Received: by 10.223.99.212 with SMTP id v20mr115857fan.44.1274266324725; Wed, 19 May 2010 03:52:04 -0700 (PDT) Sender: pali.gabor@googlemail.com Received: by 10.223.120.129 with HTTP; Wed, 19 May 2010 03:52:04 -0700 (PDT) Date: Wed, 19 May 2010 12:52:04 +0200 X-Google-Sender-Auth: GfiQWRVa8fOYfD7nzlk9DLMGO6Q Message-ID: From: Gabor PALI To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: How to Include Headers for siginterrupt() and vsnprintf() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 May 2010 11:21:52 -0000 Hello there, I have some sources developed on non-FreeBSD systems (the sources of the run-time system for the Glasgow Haskell Compiler [1]) which try to #include signal.h to use siginterrupt() and stdio.h to use vsnprintf(). The problem is that they #define (or not) some constants which makes them hidden so the prototypes are not seen by the compiler. How to cope with this kind of sources? My naive solution is to do something like that (rts/posix/Signals.c): #if defined(HAVE_SIGNAL_H) # if defined(freebsd_HOST_OS) extern int siginterrupt(int,int); # endif # include #endif and that (rts/eventlog/EventLog.c): #ifdef freebsd_HOST_OS int vsnprintf(char * __restrict, size_t, const char * __restrict,__va_list) __printflike(3, 0); #endif Thank you for the hints in advance. Cheers, :g [1] http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=tree From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 13:36:07 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BAB71065672; Wed, 19 May 2010 13:36:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6E3028FC0A; Wed, 19 May 2010 13:36:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 20B4546B8D; Wed, 19 May 2010 09:36:07 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 3797F8A01F; Wed, 19 May 2010 09:36:06 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 19 May 2010 09:15:12 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005190915.12716.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 19 May 2010 09:36:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Gabor PALI , hackers@freebsd.org Subject: Re: How to Include Headers for siginterrupt() and vsnprintf() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 May 2010 13:36:07 -0000 On Wednesday 19 May 2010 6:52:04 am Gabor PALI wrote: > Hello there, > > I have some sources developed on non-FreeBSD systems (the sources of > the run-time system for the Glasgow Haskell Compiler [1]) which try to > #include signal.h to use siginterrupt() and stdio.h to use > vsnprintf(). The problem is that they #define (or not) some constants > which makes them hidden so the prototypes are not seen by the > compiler. How to cope with this kind of sources? My naive solution > is to do something like that (rts/posix/Signals.c): > > #if defined(HAVE_SIGNAL_H) > # if defined(freebsd_HOST_OS) > extern int siginterrupt(int,int); > # endif > # include > #endif > > and that (rts/eventlog/EventLog.c): > > #ifdef freebsd_HOST_OS > int vsnprintf(char * __restrict, size_t, const char * > __restrict,__va_list) __printflike(3, 0); > #endif > > > Thank you for the hints in advance. What do they do to hide the prototypes? Do they set a specific version of POSIX or ISO C that they wish to use? Probably the code should not be doing that. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 13:36:07 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BAB71065672; Wed, 19 May 2010 13:36:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6E3028FC0A; Wed, 19 May 2010 13:36:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 20B4546B8D; Wed, 19 May 2010 09:36:07 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 3797F8A01F; Wed, 19 May 2010 09:36:06 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 19 May 2010 09:15:12 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005190915.12716.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 19 May 2010 09:36:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Gabor PALI , hackers@freebsd.org Subject: Re: How to Include Headers for siginterrupt() and vsnprintf() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 May 2010 13:36:07 -0000 On Wednesday 19 May 2010 6:52:04 am Gabor PALI wrote: > Hello there, > > I have some sources developed on non-FreeBSD systems (the sources of > the run-time system for the Glasgow Haskell Compiler [1]) which try to > #include signal.h to use siginterrupt() and stdio.h to use > vsnprintf(). The problem is that they #define (or not) some constants > which makes them hidden so the prototypes are not seen by the > compiler. How to cope with this kind of sources? My naive solution > is to do something like that (rts/posix/Signals.c): > > #if defined(HAVE_SIGNAL_H) > # if defined(freebsd_HOST_OS) > extern int siginterrupt(int,int); > # endif > # include > #endif > > and that (rts/eventlog/EventLog.c): > > #ifdef freebsd_HOST_OS > int vsnprintf(char * __restrict, size_t, const char * > __restrict,__va_list) __printflike(3, 0); > #endif > > > Thank you for the hints in advance. What do they do to hide the prototypes? Do they set a specific version of POSIX or ISO C that they wish to use? Probably the code should not be doing that. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 13:40:14 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FCA4106564A; Wed, 19 May 2010 13:40:14 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id F2C498FC24; Wed, 19 May 2010 13:40:13 +0000 (UTC) Received: by fxm4 with SMTP id 4so1060195fxm.13 for ; Wed, 19 May 2010 06:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=4LgJmunZku5WhuORUCpSWA6I9/EFZUtq53WQGwgKOcE=; b=pto8UYjzXUOODhQH2TZ3fVxn9eWrih0W0TRVEptKgzdW4KgOwYfjxZdyoq7kRP8rnn kPssGLyVqPi8bSKx3NiggmmHhFIcqpxgGO4V63BLXUHONop79E0w8VsxzGEJdLE/Mqo6 DEScKxdcvyeXHwsNx7/8CRCY/UegMBEzj4STw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=dfv17jWy1BZ/xelVqa0v10P4mKigjwvBvKp99dO3LBH1S2RbNCR/rjfvEsQ2HkTLLF WnZPY2K+WeqEzubnxlD6YdF2yghvb/nfw/16MYLdDMyuLSzbIuMRRUlXJWmdZLh5pUOl SO2G77vrDl/FQEVaT0Ly2ryrspIkWpdmvjK+o= Received: by 10.223.5.81 with SMTP id 17mr9818743fau.42.1274275027590; Wed, 19 May 2010 06:17:07 -0700 (PDT) Received: from ernst.jennejohn.org (p578E2C16.dip.t-dialin.net [87.142.44.22]) by mx.google.com with ESMTPS id 2sm36002077fav.13.2010.05.19.06.17.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 May 2010 06:17:06 -0700 (PDT) Date: Wed, 19 May 2010 15:17:05 +0200 From: Gary Jennejohn To: Gabor PALI Message-ID: <20100519151705.4aa19e25@ernst.jennejohn.org> In-Reply-To: References: X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: How to Include Headers for siginterrupt() and vsnprintf() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 13:40:14 -0000 On Wed, 19 May 2010 12:52:04 +0200 Gabor PALI wrote: > Hello there, > > I have some sources developed on non-FreeBSD systems (the sources of > the run-time system for the Glasgow Haskell Compiler [1]) which try to > #include signal.h to use siginterrupt() and stdio.h to use > vsnprintf(). The problem is that they #define (or not) some constants > which makes them hidden so the prototypes are not seen by the > compiler. How to cope with this kind of sources? My naive solution > is to do something like that (rts/posix/Signals.c): > > #if defined(HAVE_SIGNAL_H) > # if defined(freebsd_HOST_OS) > extern int siginterrupt(int,int); > # endif > # include > #endif > > and that (rts/eventlog/EventLog.c): > > #ifdef freebsd_HOST_OS > int vsnprintf(char * __restrict, size_t, const char * > __restrict,__va_list) __printflike(3, 0); > #endif > > > Thank you for the hints in advance. > Try moving stdlib.h and string.h up near the top. stdlib.h includes sys/cdefs.h which defines (most) of these macros, like __XSI_VISIBLE. -- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 14:13:52 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D8AE1065676; Wed, 19 May 2010 14:13:52 +0000 (UTC) (envelope-from dkmcnulty@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id 017408FC16; Wed, 19 May 2010 14:13:51 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 22so2028492fge.13 for ; Wed, 19 May 2010 07:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=aTc3BKd5XTfaxoRDN8mfYcmqoO1iwVSZajm/vTwsqVo=; b=nneutToY4LPELlcdSrsIRXG6+5TXke+ixwqjgaDoW7ZJFjEHhLciqq5lDYBuBdQvx5 3XJuFO4t3rxzcslXUy2M+IMat76O/AmXRsD+EYL+j5XISgOv2EqPDv/uKU9jrpK8nawY 4QpQrdatk6jkavY/4YCoADSjXp143CIhkUY80= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=i/6m57IkHtoZMzgLfzsASmQt2P4q3GPAZqz6sDRZwqexcnKfiYwnFjTIWMM+Ur6ctP zxhKI/P+EBZedl/6EBihzK+skETQ+HZlIyUtXYrRSvx5ld6JcltftOYsj+0vvPG94+I9 +NOhvUBAM1NVqprfknAVP/rM/O+Bo5cpdcOWs= MIME-Version: 1.0 Received: by 10.239.188.202 with SMTP id q10mr889850hbh.126.1274278430502; Wed, 19 May 2010 07:13:50 -0700 (PDT) Received: by 10.239.153.198 with HTTP; Wed, 19 May 2010 07:13:50 -0700 (PDT) In-Reply-To: <20100518074054.GE6175@elvis.mu.org> References: <20100518074054.GE6175@elvis.mu.org> Date: Wed, 19 May 2010 09:13:50 -0500 Message-ID: From: Dan McNulty To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Efficient way to determine when a child process forks or calls exec X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 May 2010 14:13:52 -0000 Thanks for all the great suggestions! It looks like the kevent system call is the closest to what I need. However, I didn't mention this, but I would like the process being traced to be stopped on entrance to fork, exec, etc. This would be similar to Linux's ptrace interface which sends a SIGTRAP to the traced process on exec, fork, etc. From what I could tell so far, kevent doesn't provide this functionality. Am I missing something? Is there a way to get kevent to stop the process when events occur? Thanks again for your help, -Dan On Tue, May 18, 2010 at 2:40 AM, Alfred Perlstein wrote: > * Dan McNulty [100517 08:02] wrote: >> Hi all, >> >> I have been experimenting with ptrace to determine when a child >> process forks or calls exec. Particularly, I have explored tracing >> every system call entry and exit similar to what the truss utility >> does, and for my case, the performance impact of tracing every system >> call is too great. >> >> Is there a more efficient way than tracing every system call entry and >> exit to determine when a child process forks, calls exec, or creates a >> new LWP? >> >> Thanks a lot for your help! > > kevent has some hooks, have you looked at that? > > -- > - Alfred Perlstein > .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 > .- FreeBSD committer > From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 19:36:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0D3B1065675 for ; Wed, 19 May 2010 19:36:59 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 59BAC8FC16 for ; Wed, 19 May 2010 19:36:58 +0000 (UTC) Received: by fxm4 with SMTP id 4so1519324fxm.13 for ; Wed, 19 May 2010 12:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=/gCJawj/29t89e6sn6aMyOOqnL0dJW4n2Qj7/NTY2DI=; b=Istiri+Kl9JPhMB7ufkouVHubrurotEVhH/93p/1BXGbA6h0brHiByZH1xlXBU4SAQ FHROODjtJrOIyKxQjyazfljBWvGSqVmp44mfz2tFSgF32+i4xXMGFVj6BLbWSRhkwfDF RhITwbw6oeu548mXvDFppLQb01FihestOOlx0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=xQisVDOj1plGyGTu9cGuzJ8liLYx8FXewY5d2fvimLio2KrAv+4I87oEFhLKeSJjn1 jOo0hdEf6h1/4218owJYrqKtDxvN2eXhuJF2CPlKaAnhuUqdfb3L45vcWFzmyexuBieW vmknoI7WAVapxLGIFnVUu0QwMWHtNNdPCMW5E= Received: by 10.223.19.87 with SMTP id z23mr7188056faa.7.1274296141190; Wed, 19 May 2010 12:09:01 -0700 (PDT) Received: from [157.181.97.113] (quark.teteny.elte.hu [157.181.97.113]) by mx.google.com with ESMTPS id u12sm5216824fah.16.2010.05.19.12.08.59 (version=SSLv3 cipher=RC4-MD5); Wed, 19 May 2010 12:08:59 -0700 (PDT) Message-ID: <4BF43774.4060303@gmail.com> Date: Wed, 19 May 2010 21:09:40 +0200 From: deeptech71@gmail.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.4 MIME-Version: 1.0 To: Lucius Windschuh , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: boot process gets weirdly interrupted when using scroll lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 May 2010 19:36:59 -0000 [Topic moved away from freebsd-current as the problem doesn't seem to be -CURRENT-specific, and I think there's a larger crowd here :).] This may give a hint. The following patch resolves the 60-second idling issue. --- bgfuck 2010-05-19 20:23:50.000000000 +0200 +++ bgfsck 2010-05-19 20:23:40.000000000 +0200 @@ -34,7 +34,7 @@ check_startmsgs && echo "${bgfsck_msg}." fi - (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ + (sleep 1; nice -4 fsck -B -p) 2>&1 | \ logger -p daemon.notice -t fsck & } So sleep is foregrounded or something? From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 19:49:35 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4494A106566B for ; Wed, 19 May 2010 19:49:35 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id DA98A8FC1D for ; Wed, 19 May 2010 19:49:34 +0000 (UTC) Received: (qmail 8973 invoked by uid 399); 19 May 2010 19:49:34 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 19 May 2010 19:49:34 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BF440CC.1000007@FreeBSD.org> Date: Wed, 19 May 2010 12:49:32 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: deeptech71@gmail.com References: <4BF43774.4060303@gmail.com> In-Reply-To: <4BF43774.4060303@gmail.com> X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: multipart/mixed; boundary="------------040003030107080308070506" Cc: Lucius Windschuh , freebsd-hackers@freebsd.org Subject: Re: boot process gets weirdly interrupted when using scroll lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 May 2010 19:49:35 -0000 This is a multi-part message in MIME format. --------------040003030107080308070506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 05/19/10 12:09, deeptech71@gmail.com wrote: > [Topic moved away from freebsd-current as the problem doesn't seem to be > -CURRENT-specific, and I think there's a larger crowd here :).] > > This may give a hint. The following patch resolves the 60-second idling > issue. > --- bgfuck 2010-05-19 20:23:50.000000000 +0200 > +++ bgfsck 2010-05-19 20:23:40.000000000 +0200 > @@ -34,7 +34,7 @@ > check_startmsgs && echo "${bgfsck_msg}." > fi > > - (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ > + (sleep 1; You can accomplish the same thing by simply setting that variable to 1 in /etc/rc.conf. > nice -4 fsck -B -p) 2>&1 | \ > logger -p daemon.notice -t fsck & > } > > So sleep is foregrounded or something? I missed the original thread, sorry, but looking at the current state of the code it's unclear to me why the close-paren is located where it is. Can you try the attached patch and let us know if it works for you? Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ --------------040003030107080308070506 Content-Type: text/plain; name="bgfsck.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bgfsck.diff" Index: bgfsck =================================================================== --- bgfsck (revision 208310) +++ bgfsck (working copy) @@ -34,8 +34,8 @@ check_startmsgs && echo "${bgfsck_msg}." fi - (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ - logger -p daemon.notice -t fsck & + (sleep ${background_fsck_delay}; nice -4 fsck -B -p 2>&1 | \ + logger -p daemon.notice -t fsck) & } load_rc_config $name --------------040003030107080308070506-- From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 21:39:04 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A36EF1065673 for ; Wed, 19 May 2010 21:39:04 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2DB5C8FC14 for ; Wed, 19 May 2010 21:39:01 +0000 (UTC) Received: by fxm4 with SMTP id 4so1661943fxm.13 for ; Wed, 19 May 2010 14:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=16fCMuwmkKEgZ5E2dYlWMCd4qJJsviWb7Jkyy1b3WDc=; b=m2tB6cZl2Gvl2vFwHszW7tf9COY5S6QQCjuHIVRXUPEpra0ajCBiGH9KKk3Ik2vcRi kmLB3Z5204rLpDJ6I/bjIg5fb7vvKTQQiUABSgK2xXLCsBpGEWpgbBIwA3B0B3vBRGQl G7kEzk3BHNkrG96hJyW5IszSaYG5YIexM8pqo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=S2jfd7mNWfz6FSxM4+AAVohCd5XYjKGpp6+KceozVR71kv0sobsfTKQFEI/D6jsexS zd6qHsfpLjxpI44YHgYSmn7BWfDnqTrY+fGogr1RanYxrsNQKsGvPKExRYYC5mjjHs/d ZlKqkwth+ZSI1dEYeioyj7F5bZ1UyOO2OUnUA= Received: by 10.223.16.84 with SMTP id n20mr1545566faa.94.1274305140850; Wed, 19 May 2010 14:39:00 -0700 (PDT) Received: from [157.181.97.113] (quark.teteny.elte.hu [157.181.97.113]) by mx.google.com with ESMTPS id r12sm478248fah.20.2010.05.19.14.38.59 (version=SSLv3 cipher=RC4-MD5); Wed, 19 May 2010 14:39:00 -0700 (PDT) Message-ID: <4BF45A9D.4030806@gmail.com> Date: Wed, 19 May 2010 23:39:41 +0200 From: deeptech71@gmail.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.4 MIME-Version: 1.0 To: Doug Barton References: <4BF43774.4060303@gmail.com> <4BF440CC.1000007@FreeBSD.org> In-Reply-To: <4BF440CC.1000007@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Lucius Windschuh , freebsd-hackers@freebsd.org Subject: Re: boot process gets weirdly interrupted when using scroll lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 May 2010 21:39:04 -0000 Doug Barton wrote: > On 05/19/10 12:09, deeptech71@gmail.com wrote: >> [Topic moved away from freebsd-current as the problem doesn't seem to be >> -CURRENT-specific, and I think there's a larger crowd here :).] >> >> This may give a hint. The following patch resolves the 60-second idling >> issue. >> --- bgfuck 2010-05-19 20:23:50.000000000 +0200 >> +++ bgfsck 2010-05-19 20:23:40.000000000 +0200 >> @@ -34,7 +34,7 @@ >> check_startmsgs && echo "${bgfsck_msg}." >> fi >> >> - (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ >> + (sleep 1; > > You can accomplish the same thing by simply setting that variable to 1 > in /etc/rc.conf. > >> nice -4 fsck -B -p) 2>&1 | \ >> logger -p daemon.notice -t fsck & >> } >> >> So sleep is foregrounded or something? > > I missed the original thread, sorry, but looking at the current state of > the code it's unclear to me why the close-paren is located where it is. Archived at http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016562.html, but let me rephrase it. > Can you try the attached patch and let us know if it works for you? Didn't work. > > > Doug > So the problem is: During the boot process, when the rc scripts are printing messages (for example "Creating and/or trimming log files"), if I turn on the scroll lock, then (1) the messages are not printed and are permanently lost, and (2) the system waits for backgrounded (shell script) sleep calls to end before proceeding. Here's a test case. Insert the following text into /etc/rc.d/bgfsck: echo TURN ON THE SCROLL LOCK NOW sleep 4 echo HI THERE sleep 30 & echo HI THERE During boot, when you see the "TURN ON THE SCROLL LOCK NOW" message, turn on the scroll lock. Wait for 5 seconds, then turn off the scroll lock. Confirm that the script sleeps for another ~30 seconds, and that neither "HI THERE" message are ever printed. From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 21:51:39 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D020106566C for ; Wed, 19 May 2010 21:51:39 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7998FC14 for ; Wed, 19 May 2010 21:51:39 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 5D2941A3D0F; Wed, 19 May 2010 14:51:39 -0700 (PDT) Date: Wed, 19 May 2010 14:51:39 -0700 From: Alfred Perlstein To: Dan McNulty Message-ID: <20100519215139.GZ6175@elvis.mu.org> References: <20100518074054.GE6175@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Efficient way to determine when a child process forks or calls exec X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 19 May 2010 21:51:39 -0000 * Dan McNulty [100519 07:13] wrote: > Thanks for all the great suggestions! > > It looks like the kevent system call is the closest to what I need. > However, I didn't mention this, but I would like the process being > traced to be stopped on entrance to fork, exec, etc. This would be > similar to Linux's ptrace interface which sends a SIGTRAP to the > traced process on exec, fork, etc. From what I could tell so far, > kevent doesn't provide this functionality. > > Am I missing something? Is there a way to get kevent to stop the > process when events occur? Not that I know of off the top of my head. Although if you want to contrib the code I can help get it in. :) -Alfred > > Thanks again for your help, > -Dan > > On Tue, May 18, 2010 at 2:40 AM, Alfred Perlstein wrote: > > * Dan McNulty [100517 08:02] wrote: > >> Hi all, > >> > >> I have been experimenting with ptrace to determine when a child > >> process forks or calls exec. Particularly, I have explored tracing > >> every system call entry and exit similar to what the truss utility > >> does, and for my case, the performance impact of tracing every system > >> call is too great. > >> > >> Is there a more efficient way than tracing every system call entry and > >> exit to determine when a child process forks, calls exec, or creates a > >> new LWP? > >> > >> Thanks a lot for your help! > > > > kevent has some hooks, have you looked at that? > > > > -- > > - Alfred Perlstein > > .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 > > .- FreeBSD committer > > -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 .- FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 04:31:51 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F4C8106566B for ; Thu, 20 May 2010 04:31:51 +0000 (UTC) (envelope-from ligregni@unixmexico.org) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0F61D8FC0A for ; Thu, 20 May 2010 04:31:50 +0000 (UTC) Received: by pxi7 with SMTP id 7so2864048pxi.13 for ; Wed, 19 May 2010 21:31:50 -0700 (PDT) Received: by 10.115.113.6 with SMTP id q6mr8238446wam.165.1274328210770; Wed, 19 May 2010 21:03:30 -0700 (PDT) Received: from localhost ([189.163.135.110]) by mx.google.com with ESMTPS id n29sm73578572wae.16.2010.05.19.21.03.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 May 2010 21:03:29 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org Date: Thu, 20 May 2010 23:04:41 -0500 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Sergio Ligregni" Organization: ITQ Message-ID: User-Agent: Opera Mail/10.10 (FreeBSD) Subject: Distributed Audit GSoC Project X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 20 May 2010 04:31:51 -0000 Hi all I'll be developing the Distributed Audit Project for TrustedBSD/FreeBSD,= = here's the abstract: The shipping daemon will deliver the audit trails generated through the = = network to a master system, that will admin the trails to have the = auditing centralized, ease to admin and practical. The admin will have a= ll = the trails in one system and can do the security auditing in one system = = (perhaps a special system to keep the auditing). Some mechanisms as MD5 = = checksum and cryptographic features will be implemented to guarantee the= = integrity of the delivery system. Working Sergio Ligregni with the mentoring of Stacey Son Hope to get this project done in the best way and get your help if neede= d. -- = ----------------------------------------------------------- Sergio Andr=C3=A9s Ligregni Arredondo Estudiante Ingenier=C3=ADa en Sistemas Computacionales, ITQ. Is UNIX Hot Enough for You? | FreeBSD From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 10:54:48 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CE531065678 for ; Thu, 20 May 2010 10:54:48 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 5769B8FC20 for ; Thu, 20 May 2010 10:54:48 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OF3Oo-0000VL-U3 for freebsd-hackers@freebsd.org; Thu, 20 May 2010 12:54:46 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 May 2010 12:54:46 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 May 2010 12:54:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org connect(): No such file or directory From: Ivan Voras Date: Thu, 20 May 2010 12:54:39 +0200 Lines: 14 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100518 Thunderbird/3.0.4 X-Enigmail-Version: 1.0.1 Cc: freebsd-ports@freebsd.org Subject: GSoC: Binary patches to packages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 20 May 2010 10:54:48 -0000 Hello, As one of the SoC projects dealing with the ports/packages infrastructure, I will be working on infrastructure for building, applying and maintaining binary patches to packages. This is a part of the discussion at various threads I've started or participated in, but with a reduced scope. More details can be found here: http://wiki.freebsd.org/IvanVoras/pkg_patch It should be both interesting and useful :) From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 11:37:29 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EBBD1065778; Thu, 20 May 2010 11:37:29 +0000 (UTC) (envelope-from pali.gabor@googlemail.com) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by mx1.freebsd.org (Postfix) with ESMTP id E221F8FC19; Thu, 20 May 2010 11:37:28 +0000 (UTC) Received: by fxm12 with SMTP id 12so691174fxm.17 for ; Thu, 20 May 2010 04:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :organization:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=fS6RnVk37VAFGl8aq/ZTISYc3gWlGnKJm7OBTCPSgWk=; b=MgHYNdQTJPw6RjKK5qrEqGTapp0zxVtywuZb4883+UFU8limGITlFSVXULC6s2qXSx 4dtPXcUte36KWPzU4HcTkI0v/jwjcX4WjwKY4xqa53XWFb0KG52RodHyjejeZUygKAcu Z2XHlpMy69N4OxpVrssFMTVU16JV7dtbjsOcU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=nukYoADPBcihykm+UCUcb+bEYq7bukMo2mqzMSV7nJ3bcg7b2P++pQAaR7bU2kfgYn 7iRABKBJMkP+vTegXEthXT+yQh1AWOqM/9OD6No6PDyIMI+suI3erEof99SV9jWu/YVp Pnak79y3UQNX42dW9qxTwwf5doiqWyxk5UBb4= Received: by 10.103.133.4 with SMTP id k4mr1717832mun.10.1274355447301; Thu, 20 May 2010 04:37:27 -0700 (PDT) Received: from [129.16.199.244] (dhcp-199-244.nomad.chalmers.se [129.16.199.244]) by mx.google.com with ESMTPS id 24sm28609731bkr.12.2010.05.20.04.37.25 (version=SSLv3 cipher=RC4-MD5); Thu, 20 May 2010 04:37:26 -0700 (PDT) Sender: =?UTF-8?B?UMOBTEkgR8OhYm9yIErDoW5vcw==?= Message-ID: <4BF51E20.9030604@FreeBSD.org> Date: Thu, 20 May 2010 13:33:52 +0200 From: Gabor PALI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 MIME-Version: 1.0 To: John Baldwin References: <201005190915.12716.jhb@freebsd.org> In-Reply-To: <201005190915.12716.jhb@freebsd.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: How to Include Headers for siginterrupt() and vsnprintf() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 20 May 2010 11:37:29 -0000 Hi, On 05/19/10 15:15, John Baldwin wrote: > What do they do to hide the prototypes? Do they set a specific version of > POSIX or ISO C that they wish to use? Probably the code should not be doing > that There is a file (rts/PosixSource.h) which does this: #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 199506L #define _XOPEN_SOURCE 500 #define _ISOC99_SOURCE The comment in the file says: "Include this file into sources which should not need any non-Posix services. That includes most RTS C sources." Cheers, :g From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 13:33:16 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D871065674; Thu, 20 May 2010 13:33:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 592238FC1D; Thu, 20 May 2010 13:33:16 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0CABD46C08; Thu, 20 May 2010 09:33:16 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1CDE58A025; Thu, 20 May 2010 09:33:15 -0400 (EDT) From: John Baldwin To: Gabor PALI Date: Thu, 20 May 2010 09:30:56 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201005190915.12716.jhb@freebsd.org> <4BF51E20.9030604@FreeBSD.org> In-Reply-To: <4BF51E20.9030604@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005200930.57027.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 20 May 2010 09:33:15 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: hackers@freebsd.org Subject: Re: How to Include Headers for siginterrupt() and vsnprintf() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 20 May 2010 13:33:16 -0000 On Thursday 20 May 2010 7:33:52 am Gabor PALI wrote: > Hi, > > On 05/19/10 15:15, John Baldwin wrote: > > What do they do to hide the prototypes? Do they set a specific version of > > POSIX or ISO C that they wish to use? Probably the code should not be doing > > that > > There is a file (rts/PosixSource.h) which does this: > > #define _POSIX_SOURCE 1 > #define _POSIX_C_SOURCE 199506L > #define _XOPEN_SOURCE 500 > #define _ISOC99_SOURCE > > > The comment in the file says: "Include this file into sources which > should not need any non-Posix services. That includes most RTS C sources." Ok, well their code is broken. They claim they only use POSIX interfaces from a certain date and those are older than vsnprintf(). Ah, so we do not honor _ISOC99_SOURCE in Instead, the POSIX version they specify implies C90. Looks like this is just busted code given this thread: http://www.mail-archive.com/freebsd-current@freebsd.org/msg53882.html If they want C99, then they should use POSIX 2001, not 1995. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 14:43:14 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B787B106564A; Thu, 20 May 2010 14:43:14 +0000 (UTC) (envelope-from dkmcnulty@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 221058FC1A; Thu, 20 May 2010 14:43:13 +0000 (UTC) Received: by fxm4 with SMTP id 4so2544845fxm.13 for ; Thu, 20 May 2010 07:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=pBIIQEhZPW5/qqgUr556oDmF2WvEg4quodaszs6CBqM=; b=s0snGbhIV1+2YL/u/3kZtPscHcwCaA7fQ+S5YP80xiepJ94xtxBwDGtboQ9Fc30KM8 C6uprLba9c/rpIZCpVA5pI0YFxRh7P1OSUwfoLxbgx0qf9g8yJou1B4Q2PyCWXoQpXpD KWsWdws2vsd1PmLGBKfTRvRd1ylI+Zj/8lhKM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QpnMvfiAmE5EN2ueSsTF+MIQ4yMc9NcroNc7E7w3FmtT1XCXeDe4eA7uDWytAzsNpd F3jNklUOUV13uKwKNzGEwmDbRnp4lWkyCpMVeLN+uOb6PLQF0j61Xn8nsSzgYG62v21y Wij1hmZiQWr3h+WtNdV7wTtX+4fQCQawC+MSY= MIME-Version: 1.0 Received: by 10.239.190.72 with SMTP id w8mr14258hbh.117.1274366592816; Thu, 20 May 2010 07:43:12 -0700 (PDT) Received: by 10.239.153.198 with HTTP; Thu, 20 May 2010 07:43:12 -0700 (PDT) In-Reply-To: <20100519215139.GZ6175@elvis.mu.org> References: <20100518074054.GE6175@elvis.mu.org> <20100519215139.GZ6175@elvis.mu.org> Date: Thu, 20 May 2010 09:43:12 -0500 Message-ID: From: Dan McNulty To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Efficient way to determine when a child process forks or calls exec X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 20 May 2010 14:43:14 -0000 On Wed, May 19, 2010 at 4:51 PM, Alfred Perlstein wrote: > * Dan McNulty [100519 07:13] wrote: >> Thanks for all the great suggestions! >> >> It looks like the kevent system call is the closest to what I need. >> However, I didn't mention this, but I would like the process being >> traced to be stopped on entrance to fork, exec, etc. This would be >> similar to Linux's ptrace interface which sends a SIGTRAP to the >> traced process on exec, fork, etc. From what I could tell so far, >> kevent doesn't provide this functionality. >> >> Am I missing something? Is there a way to get kevent to stop the >> process when events occur? > > Not that I know of off the top of my head. > > Although if you want to contrib the code I can help get it in. :) > > -Alfred Unfortunately, writing a patch for the FreeBSD kernel may be beyond the scope of my current work. Although I wouldn't mind working on it in my spare time outside of my job. Maybe in some free time this summer. I think the ideal fix for my problem would be to implement a mechanism similar to the Linux ptrace interface that sends a SIGTRAP for events such as fork, exec, thread create, etc. Maybe I will poke around in the FreeBSD kernel source and see what I can figure out. Thanks for the help! -Dan >> >> Thanks again for your help, >> -Dan >> >> On Tue, May 18, 2010 at 2:40 AM, Alfred Perlstein wrote: >> > * Dan McNulty [100517 08:02] wrote: >> >> Hi all, >> >> >> >> I have been experimenting with ptrace to determine when a child >> >> process forks or calls exec. Particularly, I have explored tracing >> >> every system call entry and exit similar to what the truss utility >> >> does, and for my case, the performance impact of tracing every system >> >> call is too great. >> >> >> >> Is there a more efficient way than tracing every system call entry and >> >> exit to determine when a child process forks, calls exec, or creates a >> >> new LWP? >> >> >> >> Thanks a lot for your help! >> > >> > kevent has some hooks, have you looked at that? >> > >> > -- >> > - Alfred Perlstein >> > .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 >> > .- FreeBSD committer >> > > > -- > - Alfred Perlstein > .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 > .- FreeBSD committer > From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 17:41:25 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80A4F1065688 for ; Thu, 20 May 2010 17:41:25 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1AFC18FC1D for ; Thu, 20 May 2010 17:41:24 +0000 (UTC) Received: by wye20 with SMTP id 20so66073wye.13 for ; Thu, 20 May 2010 10:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to:date :message-id:subject:from:to:content-type; bh=quh8fi/lyQuGoBw/njOSg+/bncg+EvP4EGyUbZzoV5c=; b=qrfPh42imc1E3pNVWejhA2QMn46PS6eya1NklAiPKdqGk3a96dxvcnP9ZLZvQ/V3xe KuY1rqLy0I+MTIX7QS1Pe/arqZr/vAoldKLRI1cRkjWdxOIt/NvdOM5BoPXRVYsPAAIj KtiVW4K3+EX/5jIEp+FQb6b1EOGobEkZM9eII= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; b=dfel3PlPEZLZ9hP19C5u1HWMlFW+dj4r7mjMhHmAP2mGGw5BkP86Lme3eg5u95+BnD u617jENepX+dbMMuj03RGX3U4uz+9Alpmka3EUfYnSquMlI6nEIgCKKpPDepTzb3VtZM HiK24bcdL30B41x5Q446XB0PbVB+cyIzYy0Io= MIME-Version: 1.0 Received: by 10.216.188.130 with SMTP id a2mr126986wen.54.1274377282618; Thu, 20 May 2010 10:41:22 -0700 (PDT) Received: by 10.216.64.68 with HTTP; Thu, 20 May 2010 10:41:22 -0700 (PDT) Date: Thu, 20 May 2010 13:41:22 -0400 Message-ID: From: "b. f." To: freebsd-hackers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: kernel usage of fxsave/fxrstor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 17:41:25 -0000 I'm wondering why we equate cpu_fxsr and hw_instruction_sse in our kernel, when several families of Intel and AMD processors have fxsave/fxrstor, but not sse, and various documents from both companies suggest that fxsave/fxrstor is faster than fsave/fnsave/frstor, even when only saving the fpu/mmx state, and ought to be used for context switches and calls and returns from interrupt and exception handlers (e.g.. Sections 8.1.11, 10.5, and 11.6.5 of the Intel 64 and IA-32 Software Developers' Manual, Volume 1: http://www.intel.com/Assets/PDF/manual/253665.pdf ). As far as I can tell from a cursory check, Linux draws a distinction between cpu_has_fxsr, and cpu_has_xmm/xmm2, and uses fxsave/fxrstor on all processors that have the feature, regardless of whether they have sse. Shouldn't we do the same? Was this overlooked in the initial sse commits? Or are the Intel assertions that the newer instructions are faster incorrect? Or was the extra handling needed for the different semantics of the newer instructions, and/or concerns over FreeBSD-SA-06:14.fpu.asc/CVE-2006-1056 responsible for their suppression in pre-sse processors, even though safe methods of using them was suggested: http://security.freebsd.org/advisories/FreeBSD-SA-06:14-amd.txt ? (Note that I'm not asking about setting the CR4.OSFXSR bit when sse isn't needed or present, just using the newer fxsave/fxrstor when they are present.) Regards, b. From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 21:06:46 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37097106564A for ; Thu, 20 May 2010 21:06:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id C579A8FC22 for ; Thu, 20 May 2010 21:06:45 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o4KL6jDW087575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 May 2010 00:06:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o4KL6WpR072253; Fri, 21 May 2010 00:06:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o4KL6VX5072252; Fri, 21 May 2010 00:06:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 21 May 2010 00:06:31 +0300 From: Kostik Belousov To: bf1783@gmail.com Message-ID: <20100520210631.GI83316@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+K5d9Dhw/eNQKwhM" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: kernel usage of fxsave/fxrstor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 20 May 2010 21:06:46 -0000 --+K5d9Dhw/eNQKwhM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2010 at 01:41:22PM -0400, b. f. wrote: > I'm wondering why we equate cpu_fxsr and hw_instruction_sse in our > kernel, when several families of Intel and AMD processors have > fxsave/fxrstor, but not sse, and various documents from both companies > suggest that fxsave/fxrstor is faster than fsave/fnsave/frstor, even > when only saving the fpu/mmx state, and ought to be used for context > switches and calls and returns from interrupt and exception handlers > (e.g.. Sections 8.1.11, 10.5, and 11.6.5 of the Intel 64 and IA-32 > Software Developers' Manual, Volume 1: >=20 > http://www.intel.com/Assets/PDF/manual/253665.pdf >=20 > ). What are the several families ? I am aware only of Pentium II that did have FXSAVE implemented, but not SSE. I am not even sure that all Pentium IIs have it, or only the later models. It is funny that I disposed my 2CPU Pentium II machine several weeks ago. I do not consider it worth an effort trying to optimize for some Pentiums II in 2010. >=20 >=20 > As far as I can tell from a cursory check, Linux draws a distinction > between cpu_has_fxsr, and cpu_has_xmm/xmm2, and uses fxsave/fxrstor on > all processors that have the feature, regardless of whether they have > sse. Shouldn't we do the same? Was this overlooked in the initial > sse commits? Or are the Intel assertions that the newer instructions > are faster incorrect? Or was the extra handling needed for the > different semantics of the newer instructions, and/or concerns over > FreeBSD-SA-06:14.fpu.asc/CVE-2006-1056 responsible for their > suppression in pre-sse processors, even though safe methods of using > them was suggested: >=20 > http://security.freebsd.org/advisories/FreeBSD-SA-06:14-amd.txt ? >=20 > (Note that I'm not asking about setting the CR4.OSFXSR bit when sse > isn't needed or present, just using the newer fxsave/fxrstor when they > are present.) >=20 > Regards, > b. > _______________________________________________ > 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" --+K5d9Dhw/eNQKwhM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkv1pFcACgkQC3+MBN1Mb4hlkgCfaGY50BEoZk8dFzYUnKbioeJz Q04AoIzQQgkDe8K4rDWc6ZZ3Qqh/mWRa =7SUo -----END PGP SIGNATURE----- --+K5d9Dhw/eNQKwhM-- From owner-freebsd-hackers@FreeBSD.ORG Thu May 20 21:45:19 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7B26106566C for ; Thu, 20 May 2010 21:45:18 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 752A58FC14 for ; Thu, 20 May 2010 21:45:18 +0000 (UTC) Received: by wwb18 with SMTP id 18so54328wwb.13 for ; Thu, 20 May 2010 14:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=3vYWStVyWkBWxut2xyuN9ns1dJbKUKzdpv65N6TGbe4=; b=IN8/10BGzVZAs9RnQjbN7rLgmTCh1zuFOiHnCvqr5aUkczJcz3zxUV8ecTCQEPOr9d AB76fFSMOwI8Rs+eVHnhZ4UlLk2TvbSVncXgBGsIoQiKbs5nSm5sUN/S7V2ftQC4x286 hcJ1cZhhIxGApVa+GRTvn9AF6LE/oNbnkWF+8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=m9Y5PzxFS6v2cMtPm4isxynEp8XCWDVVLZ7wSIIV4w+F93oIWiOLiHmvUSw5JM5Xe1 H8ouLeplFxT3vkiU5QfXxvBcQGM5VjJc9jJS5uLKjZx6Zq0KSHicXmF0gC7mYljlv3Yd EnQ3Pc3uQF5/DNREn0JUWhz75O4WUMn0X60N4= MIME-Version: 1.0 Received: by 10.216.158.12 with SMTP id p12mr275377wek.152.1274391917455; Thu, 20 May 2010 14:45:17 -0700 (PDT) Received: by 10.216.64.68 with HTTP; Thu, 20 May 2010 14:45:17 -0700 (PDT) In-Reply-To: <20100520210631.GI83316@deviant.kiev.zoral.com.ua> References: <20100520210631.GI83316@deviant.kiev.zoral.com.ua> Date: Thu, 20 May 2010 17:45:17 -0400 Message-ID: From: "b. f." To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: kernel usage of fxsave/fxrstor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 21:45:19 -0000 On 5/20/10, Kostik Belousov wrote: > On Thu, May 20, 2010 at 01:41:22PM -0400, b. f. wrote: >> I'm wondering why we equate cpu_fxsr and hw_instruction_sse in our >> kernel, when several families of Intel and AMD processors have >> fxsave/fxrstor, but not sse, and various documents from both companies >> suggest that fxsave/fxrstor is faster than fsave/fnsave/frstor, even >> when only saving the fpu/mmx state, and ought to be used for context >> switches and calls and returns from interrupt and exception handlers >> (e.g.. Sections 8.1.11, 10.5, and 11.6.5 of the Intel 64 and IA-32 >> Software Developers' Manual, Volume 1: >> >> http://www.intel.com/Assets/PDF/manual/253665.pdf >> >> ). > What are the several families ? I am aware only of Pentium II > that did have FXSAVE implemented, but not SSE. I am not even sure > that all Pentium IIs have it, or only the later models. I think only later models of Pentium II, from Deschutes onward. As for the number of families, I guess it depends upon how you classify them. I was thinking of the several Athlon variants in addition to the Pentium II models. > > It is funny that I disposed my 2CPU Pentium II machine several weeks > ago. I do not consider it worth an effort trying to optimize for > some Pentiums II in 2010. I have two Pentium II laptops that see occasional use, and an Athlon desktop, that fall into this category. I'm sure that I'm not alone. If a few simple changes, using code similar to that we already are using for later models would yield some performance gains for them, I"d be interested in testing patches. Regards, b. >> >> >> As far as I can tell from a cursory check, Linux draws a distinction >> between cpu_has_fxsr, and cpu_has_xmm/xmm2, and uses fxsave/fxrstor on >> all processors that have the feature, regardless of whether they have >> sse. Shouldn't we do the same? Was this overlooked in the initial >> sse commits? Or are the Intel assertions that the newer instructions >> are faster incorrect? Or was the extra handling needed for the >> different semantics of the newer instructions, and/or concerns over >> FreeBSD-SA-06:14.fpu.asc/CVE-2006-1056 responsible for their >> suppression in pre-sse processors, even though safe methods of using >> them was suggested: >> >> http://security.freebsd.org/advisories/FreeBSD-SA-06:14-amd.txt ? >> >> (Note that I'm not asking about setting the CR4.OSFXSR bit when sse >> isn't needed or present, just using the newer fxsave/fxrstor when they >> are present.) >> >> Regards, >> b. >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 11:47:35 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F8E210656F8 for ; Sat, 22 May 2010 11:47:35 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 615EA8FC2B for ; Sat, 22 May 2010 11:47:35 +0000 (UTC) Received: from mobileKamikaze.norad (HSI-KBW-078-042-098-160.hsi3.kabel-badenwuerttemberg.de [78.42.98.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id E82C48A1DDA for ; Sat, 22 May 2010 13:47:33 +0200 (CEST) Message-ID: <4BF7C455.6040806@bsdforen.de> Date: Sat, 22 May 2010 13:47:33 +0200 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Activate PCIe slot deactivated by BIOS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 22 May 2010 11:47:35 -0000 My wpi wireless never was reliable, but since I upgraded to 8gb RAM it doesn't do anything (if I'm lucky) or panic my system. So, after some discussion on STABLE I followed the recommendation to get an Atheros card for 10$ on ebay. Today the card arrived and the BIOS complains (HP 6510b): 104-Unsupported wireless network device detected. System halted. Remove device and restart. The system boots if I turn off the wireless device in BIOS, but this means I cannot use it. Now, I could just get a BIOS image and exchange the device IDs there. But I wonder, wouldn't it be easier to just reactivate the PCIe slot through the OS? -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 12:07:29 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 571E4106566B for ; Sat, 22 May 2010 12:07:29 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by mx1.freebsd.org (Postfix) with ESMTP id DF3C18FC29 for ; Sat, 22 May 2010 12:07:28 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id l26so1107353fgb.13 for ; Sat, 22 May 2010 05:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=ICZNnu+6i5nnEBe+vIkaEA1PTklNRxhbMLhEy+abCmc=; b=uK4uAiqtoBGpnWI/BO5LbDIRQv8CwL2Br+R6tIGMxafn06yRKpew3izEkAl7Vtqgjv 0++bY+h2Edo7BNC+XTf0wqpBx8dkUZClLtOfUSePi0WUKz2w0obqKCIuv1yRhjxTzNNd Vx77QoIOg1PTstxe5nbkV4U/F/QeBAT7xLw2Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Pi2oOF5eTWeMQ0uH4jTiKuA9eU7PZEMT1HqPSDWna8dfIfZ5QAVhB6RL6pPcgqAwsB n7INf9vhvpO7XGF6hm8U8qrotLV7OjQYZ7HC+/hQcak4IBeNuw0RJQm4s1rV1lUio8P6 isGrkMJ3npyeBR+d4o5RUlBicx43iKouSS5Bg= MIME-Version: 1.0 Received: by 10.103.67.20 with SMTP id u20mr2461360muk.97.1274530046574; Sat, 22 May 2010 05:07:26 -0700 (PDT) Received: by 10.103.40.20 with HTTP; Sat, 22 May 2010 05:07:26 -0700 (PDT) Date: Sat, 22 May 2010 15:07:26 +0300 Message-ID: From: Gleb Kurtsou To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: GSoC: namecache improvements X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 22 May 2010 12:07:29 -0000 Hello, My project is about reimplementing namecache. In a few words it's about generalizing UFS-like dirhash cache and exposing it to upper layers so that it can be used for reliable full path lookup. The idea is quite different from existing implementations in DragonflyBSD and Linux, instead of making namecache first class interface for vnode lookup and thus making VFS name centric, I propose that filesystem itself is to keep cache in sync, thus eliminating the need of changing existing filesystems, avoiding problems with network filesystems (especially NFS) and keeping existing VFS design intact. More detailed proposal: http://lists.freebsd.org/pipermail/freebsd-arch/2010-April/010083.html I'm going to update my blog on the progress during the summer: http://glebkurtsou.blogspot.com/ Thanks, Gleb. From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 12:22:12 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 042D91065677; Sat, 22 May 2010 12:22:12 +0000 (UTC) (envelope-from anjali@juniper.net) Received: from exprod7og126.obsmtp.com (exprod7og126.obsmtp.com [64.18.2.206]) by mx1.freebsd.org (Postfix) with ESMTP id 7D38B8FC13; Sat, 22 May 2010 12:22:11 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob126.postini.com ([64.18.6.12]) with SMTP ID DSNKS/fMcogCQeW/xWIWWE/5Hwvo2syv7ZpM@postini.com; Sat, 22 May 2010 05:22:11 PDT Received: from EMBX01-HQ.jnpr.net ([fe80::c821:7c81:f21f:8bc7]) by P-EMHUB01-HQ.jnpr.net ([fe80::fc92:eb1:759:2c72%11]) with mapi; Sat, 22 May 2010 05:09:32 -0700 From: Anjali Kulkarni To: "freebsd-net@freebsd.org" Date: Sat, 22 May 2010 05:09:31 -0700 Thread-Topic: Common OS/kernel code between freebsd and linux Thread-Index: AQHK+aeiVE/G37v7OkKM7CCVvJavpQ== Message-ID: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-hackers@freebsd.org" Subject: Common OS/kernel code between freebsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 12:22:12 -0000 Hi Folks, I am not sure the right forum to ask this question - is there any effort do= ne to find portable code between different OSes, particularly freebsd and l= inux?=20 Specifically, the networking layer could be portable between the 2 and ther= e could be some set of APIs to call into the OS specific parts. This could = be modeled as - if I want to port the networking layer or other stuff to us= erland, what set of code could reside in userspace such that that layer is = portable between OSes ? For eg, there could be an API to access mbufs or sk= buffs in freebsd or linux respectively, but the processing to be done for I= P etc could remain the same. I don't know if this is worth thinking about? = Please share your thoughts. Anjali= From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 12:27:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41CF61065758 for ; Sat, 22 May 2010 12:27:49 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 0449A8FC13 for ; Sat, 22 May 2010 12:27:48 +0000 (UTC) Received: from mobileKamikaze.norad (HSI-KBW-078-042-098-160.hsi3.kabel-badenwuerttemberg.de [78.42.98.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id DF0E08A1DC6 for ; Sat, 22 May 2010 14:27:47 +0200 (CEST) Message-ID: <4BF7CDC3.8050908@bsdforen.de> Date: Sat, 22 May 2010 14:27:47 +0200 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4BF7C455.6040806@bsdforen.de> In-Reply-To: <4BF7C455.6040806@bsdforen.de> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: Activate PCIe slot deactivated by BIOS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 22 May 2010 12:27:49 -0000 On 22/05/2010 13:47, Dominic Fandrey wrote: > Today the card arrived and the BIOS complains (HP 6510b): > 104-Unsupported wireless network device detected. > System halted. Remove device and restart. > > The system boots if I turn off the wireless device in BIOS, but > this means I cannot use it. > > Now, I could just get a BIOS image and exchange the device IDs > there. But I wonder, wouldn't it be easier to just reactivate the > PCIe slot through the OS? This e-mail is written through the ath wireless I got: # ifconfig ath0: flags=8843 metric 0 mtu 2290 ether 00:24:2c:1d:f0:2f media: IEEE 802.11 Wireless Ethernet autoselect mode 11g status: associated ... wlan0: flags=8843 metric 0 mtu 1500 ether 00:24:2c:1d:f0:2f inet 192.168.178.41 netmask 0xffffff00 broadcast 192.168.178.255 media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g status: associated ssid "Obi-Wan Kenobi" channel 7 (2442 MHz 11g) bssid 00:15:0c:d5:37:a0 regdomain 101 indoor ecm authmode WPA2/802.11i privacy ON deftxkey UNDEF AES-CCM 2:128-bit txpower 20 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS wme burst roaming MANUAL I achieved this by passing the BIOS check with the intel wireless and hot-swapping it with the atheros card afterwards. This is impractical and evil, so I'm still searching for a solution. But at least I know that the device works. -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 12:55:30 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93358106564A for ; Sat, 22 May 2010 12:55:30 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 235FF8FC0C for ; Sat, 22 May 2010 12:55:29 +0000 (UTC) Received: by ewy1 with SMTP id 1so285329ewy.13 for ; Sat, 22 May 2010 05:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=KweVJDfmKF+CZD8IvnzerXEvEvOM+ggpwkfKUiLYRhA=; b=YqZvcldJLEoLMzPQ6RJxeM1yyQlngR+Qxvub5hX//D7q/QBI5WBjOFX2WQ2ePPc+Px uq1JbJALZJyi2ri5Yho9vSz6okzoeSI2f4YJDQug7ImTLuoqiRnNETnBiqiHiVubm98b q+dYizX/YmdD17U6eDl/WpI3LcNLqwoEHp0CQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=VNAfwboUvrPzpow76Ace7OQSfD6+j9liaFDM/SPZcWg2PUY2rMsspwaY27v3rhWkXQ mMkCTnFtH49th8lT8dbFYNB4u+tYBEQpPumnJJLW6IuwWeTlRVNrDconm7XqbzJ94jIk Lg7dCchEDeL3y4OQDjVP7eohlt0I7FT1ioR4Y= Received: by 10.213.63.13 with SMTP id z13mr1022377ebh.21.1274532929009; Sat, 22 May 2010 05:55:29 -0700 (PDT) Received: from gumby.homeunix.com (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mx.google.com with ESMTPS id 14sm975760ewy.14.2010.05.22.05.55.27 (version=SSLv3 cipher=RC4-MD5); Sat, 22 May 2010 05:55:28 -0700 (PDT) Date: Sat, 22 May 2010 13:55:26 +0100 From: RW To: freebsd-hackers@freebsd.org Message-ID: <20100522135526.580642d7@gumby.homeunix.com> In-Reply-To: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> References: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Common OS/kernel code between freebsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 12:55:30 -0000 On Sat, 22 May 2010 05:09:31 -0700 Anjali Kulkarni wrote: > I am not sure the right forum to ask this question - is there any > effort done to find portable code between different OSes, > particularly freebsd and linux? BSD code has been used in most operating systems due to its open licence, but it's very awkward to mix GNU/Linux GPLed code with BSD code without the whole thing ending up GPLed. From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 13:37:27 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DBFB106564A for ; Sat, 22 May 2010 13:37:27 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (unknown [IPv6:2001:470:1f09:679::1]) by mx1.freebsd.org (Postfix) with ESMTP id 43E628FC12 for ; Sat, 22 May 2010 13:37:27 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 16103C400D; Sat, 22 May 2010 13:37:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon.cran.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.7 required=8.0 tests=AWL,BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.5 Received: from core.draftnet (87-194-158-129.bethere.co.uk [87.194.158.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Sat, 22 May 2010 13:37:26 +0000 (UTC) From: Bruce Cran To: freebsd-hackers@freebsd.org Date: Sat, 22 May 2010 14:37:21 +0100 User-Agent: KMail/1.13.3 (FreeBSD/9.0-CURRENT; KDE/4.4.3; amd64; ; ) References: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> <20100522135526.580642d7@gumby.homeunix.com> In-Reply-To: <20100522135526.580642d7@gumby.homeunix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005221437.21707.bruce@cran.org.uk> Cc: RW Subject: Re: Common OS/kernel code between freebsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 13:37:27 -0000 On Saturday 22 May 2010 13:55:26 RW wrote: > On Sat, 22 May 2010 05:09:31 -0700 > > Anjali Kulkarni wrote: > > I am not sure the right forum to ask this question - is there any > > effort done to find portable code between different OSes, > > particularly freebsd and linux? > > BSD code has been used in most operating systems due to its open > licence, but it's very awkward to mix GNU/Linux GPLed code with BSD > code without the whole thing ending up GPLed. The bigger problem perhaps is that Linux has its own way of doing things: whereas for example UNIX has traditionally used routing sockets, Linux uses netlink. I don't think there's much in the way of common architecture between Linux and FreeBSD unfortunately. -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 13:01:54 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 023A61065673 for ; Sat, 22 May 2010 13:01:54 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with SMTP id 400658FC18 for ; Sat, 22 May 2010 13:01:52 +0000 (UTC) Received: (qmail 37351 invoked from network); 22 May 2010 12:35:11 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 22 May 2010 12:35:11 -0000 Date: Sat, 22 May 2010 14:35:11 +0200 (CEST) Message-Id: <20100522.143511.74745433.sthaug@nethelp.no> To: anjali@juniper.net From: sthaug@nethelp.no In-Reply-To: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> References: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 22 May 2010 13:37:54 +0000 Cc: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Common OS/kernel code between freebsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 13:01:54 -0000 > I am not sure the right forum to ask this question - is there any effort done to find portable code between different OSes, particularly freebsd and linux? > Specifically, the networking layer could be portable between the 2 and there could be some set of APIs to call into the OS specific parts. This could be modeled as - if I want to port the networking layer or other stuff to userland, what set of code could reside in userspace such that that layer is portable between OSes ? For eg, there could be an API to access mbufs or skbuffs in freebsd or linux respectively, but the processing to be done for IP etc could remain the same. I don't know if this is worth thinking about? Please share your thoughts. Are you sure the Linux crowd is interested in this? As far as I know the BSD networking code has been *available* to the Linux crowd basically from day 1 - but they chose to write their own... Steinar Haug, Nethelp consulting, sthaug@nethelp.no From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 14:20:48 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1509106564A for ; Sat, 22 May 2010 14:20:48 +0000 (UTC) (envelope-from raysonlogin@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 764928FC0C for ; Sat, 22 May 2010 14:20:48 +0000 (UTC) Received: by vws18 with SMTP id 18so43036vws.13 for ; Sat, 22 May 2010 07:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1CSGcBcDQk/DGuXC0q9CTcKlWKeE9GTLGBLs9gHigoY=; b=QUtDBMuyGYMrZWb62e9IMqvapUwUXZ55inHoYDDgUv69WDjiflqvpMIwYP5BoJR0Ge OyWjUiF5d9eGgGKx6morJQxrTIQMGW6tMURCJdYgJOzLBf257aqRJ+C+VacpPi6LYiVw ZzUxz0cx8mvM8pT86pBIptq2/wSeIUFNzmOX8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=DdSPA6jTFqsF9AeE996D80r2J3sEEJfehz+vFkd2rzGaQkuRSEkw5r8jzwYXW6ZINy n8rxIIkPQrzpeKdIDHpNcgwTfRM3aNcdwRWMjibZfU1by0JQElTbAONZTpS9H5REHQG0 MLOs18b3akYX6plzBdtIhoS93Z0t5Z+14Wo5Y= MIME-Version: 1.0 Received: by 10.220.128.202 with SMTP id l10mr2007140vcs.57.1274538047404; Sat, 22 May 2010 07:20:47 -0700 (PDT) Received: by 10.220.84.145 with HTTP; Sat, 22 May 2010 07:20:47 -0700 (PDT) In-Reply-To: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> References: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> Date: Sat, 22 May 2010 09:20:47 -0500 Message-ID: From: Rayson Ho To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Anjali Kulkarni Subject: Re: Common OS/kernel code between freebsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 14:20:48 -0000 The BSD TCP stack is at least in OpenVMS & QNX: "Parallelism and Performance in the OpenVMS TCP/IP Kernel": http://h71000.www7.hp.com/openvms/journal/v4/tcp_ip_scalable_kernel.html http://h71000.www7.hp.com/openvms/journal/v4/tcp_ip_scalable_kernel.pdf "Porting the NetBSD IP stack to a microkernel RTOS": http://www.bsdcan.org/2007/schedule/events/37.en.html (The QNX guys emailed me the presentation PDF -- let me know if you want a copy.) But the design approach of each TCP stack is different - most are designed for speed, some for small memory footprint, and the stack in Solaris got rewritten in Solaris 10 because the old one was not good enough on new multi-core machines (google: Solaris+FireEngine). Further, the implementation & rules of synchronization point & techniques in each OS is different, and thus I believe creating a portable TCP stack is not easy - esp. you will need the Linux vs. *BSD developers working together designing a common interface... Rayson On Sat, May 22, 2010 at 7:09 AM, Anjali Kulkarni wrote= : > Hi Folks, > > I am not sure the right forum to ask this question - is there any effort = done to find portable code between different OSes, particularly freebsd and= linux? > Specifically, the networking layer could be portable between the 2 and th= ere could be some set of APIs to call into the OS specific parts. This coul= d be modeled as - if I want to port the networking layer or other stuff to = userland, what set of code could reside in userspace such that that layer i= s portable between OSes ? For eg, there could be an API to access mbufs or = skbuffs in freebsd or linux respectively, but the processing to be done for= IP etc could remain the same. I don't know if this is worth thinking about= ? Please share your thoughts. > > Anjali_______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 15:49:44 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2A5A106566B; Sat, 22 May 2010 15:49:44 +0000 (UTC) (envelope-from aman.jassal@esigetel.fr) Received: from smtpfb2-g21.free.fr (smtpfb2-g21.free.fr [212.27.42.10]) by mx1.freebsd.org (Postfix) with ESMTP id F3DCE8FC16; Sat, 22 May 2010 15:49:42 +0000 (UTC) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by smtpfb2-g21.free.fr (Postfix) with ESMTP id 39ED0CA9C12; Sat, 22 May 2010 17:32:58 +0200 (CEST) Received: from smtp2-g21.free.fr (localhost [127.0.0.1]) by smtp2-g21.free.fr (Postfix) with ESMTP id 223C24B00B7; Sat, 22 May 2010 17:32:50 +0200 (CEST) Received: from [127.0.0.1] (san94-2-78-239-228-93.fbx.proxad.net [78.239.228.93]) by smtp2-g21.free.fr (Postfix) with ESMTP; Sat, 22 May 2010 17:32:49 +0200 (CEST) Message-ID: <4BF7F90E.7060901@esigetel.fr> Date: Sat, 22 May 2010 17:32:30 +0200 From: Aman Jassal User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: sthaug@nethelp.no References: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> <20100522.143511.74745433.sthaug@nethelp.no> In-Reply-To: <20100522.143511.74745433.sthaug@nethelp.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 100522-0, 22/05/2010), Outbound message X-Antivirus-Status: Clean X-Mailman-Approved-At: Sat, 22 May 2010 15:58:40 +0000 Cc: freebsd-net@freebsd.org, anjali@juniper.net, freebsd-hackers@freebsd.org Subject: Re: Common OS/kernel code between freebsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 15:49:45 -0000 Hello, sthaug@nethelp.no a écrit : >> I am not sure the right forum to ask this question - is there any effort done to find portable code between different OSes, particularly freebsd and linux? >> Specifically, the networking layer could be portable between the 2 and there could be some set of APIs to call into the OS specific parts. This could be modeled as - if I want to port the networking layer or other stuff to userland, what set of code could reside in userspace such that that layer is portable between OSes ? For eg, there could be an API to access mbufs or skbuffs in freebsd or linux respectively, but the processing to be done for IP etc could remain the same. I don't know if this is worth thinking about? Please share your thoughts. >> > > Are you sure the Linux crowd is interested in this? > > As far as I know the BSD networking code has been *available* to the > Linux crowd basically from day 1 - but they chose to write their own... > > Steinar Haug, Nethelp consulting, sthaug@nethelp.no > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > I don't think the BSD and Linux networking code are similar enough, or that there is any effort being done to make them similar. Linux also has a few interfaces that are exclusive to it (and were written from scratch), like the Netlink socket to mention but one (although I remember Bruce Simpson saying that it would be worthwhile implementing this socket for BSD, it was some time ago...). Therefore, their networking stack probably has some features and APIs that will be a little difficult to port... I don't have a lot of experience with the Linux networking kernel, but as Steinar Haug pointed out : if the Linux community was interested in our networking code, something would have been done or in the process of being done already. If I may : Anjali, what kind of project are you working on (that would require portability between both networking code) ? ---------------- Aman Jassal Wisdom comes from experience. Experience comes from a lack of wisdom. From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 19:18:47 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5273C1065677 for ; Sat, 22 May 2010 19:18:47 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id E677B8FC18 for ; Sat, 22 May 2010 19:18:46 +0000 (UTC) Received: by qyk11 with SMTP id 11so3671738qyk.13 for ; Sat, 22 May 2010 12:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=dz8JPW5Yrfo1Pf0zQT1vRPAjQT+SF1HgbG3ttRihFSI=; b=TMFyzPXvbbTv59fKRBqPCVQay0vDoC3mR7WKARr9MYHvf9yp9H+RDMlzLCzptP71Vf oxm+e/yHDXBXvO0ByNCfnLZaj2Y0+KudA81eJwenULIthECFumlLBamg0zInxJq1UfYj Nql8tFVuk1EhT0g7ByDYg28pERIMK3ymdHUR0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=YgKdHH9vPSIh4oU4JVe3+WDja/WeQuKREsKm6Ame4aNR4ZVnI1cTCpE7jExYINsvFC a9ggEQ6Q9vnQZiOeNL01GwSQQdmC2+LzS++eVD+jI0vi5JqXqrK2TsFZ8jgSAv394bl6 UsMZ7MlxA4+DyhpMiEZovZXmpw24XS0i2jJuo= MIME-Version: 1.0 Received: by 10.229.213.80 with SMTP id gv16mr747816qcb.72.1274555926065; Sat, 22 May 2010 12:18:46 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Sat, 22 May 2010 12:18:45 -0700 (PDT) In-Reply-To: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> References: <50B3A5560BA4D74CADEC55A48B4641B23D5119D0BA@EMBX01-HQ.jnpr.net> Date: Sat, 22 May 2010 12:18:45 -0700 Message-ID: From: Garrett Cooper To: Anjali Kulkarni Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-net@freebsd.org" , "freebsd-hackers@freebsd.org" Subject: Re: Common OS/kernel code between freebsd and linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 19:18:47 -0000 On Sat, May 22, 2010 at 5:09 AM, Anjali Kulkarni wrote= : > Hi Folks, > > I am not sure the right forum to ask this question - is there any effort = done to find portable code between different OSes, particularly freebsd and= linux? > Specifically, the networking layer could be portable between the 2 and th= ere could be some set of APIs to call into the OS specific parts. This coul= d be modeled as - if I want to port the networking layer or other stuff to = userland, what set of code could reside in userspace such that that layer i= s portable between OSes ? For eg, there could be an API to access mbufs or = skbuffs in freebsd or linux respectively, but the processing to be done for= IP etc could remain the same. I don't know if this is worth thinking about= ? Please share your thoughts. Hi Anjali, About the closest that you'll probably get to portability between OSes is the POSIX layer (which is just libcalls for the most part, and thus doesn't include the scope you're requesting). Even so, there are areas that *BSD is not 100% POSIX compliant, Linux is not 100% POSIX compliant, and there are other areas beyond that where stuff doesn't meet requirements like it says in the manpage documentation under Linux [ioctl(2)'s, for instance]. While this may seem like a valiant effort, I think that trying to unify a network stack and kernel code between FreeBSD and Linux would result in a `religious' war over licensing, ownership, and style. Thanks, -Garrett