From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 6 11:52:20 2008 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 A3C2C1065670 for ; Sun, 6 Apr 2008 11:52:20 +0000 (UTC) (envelope-from dino@unitix.org) Received: from fbihome.de (stud.fbi.h-da.de [141.100.40.65]) by mx1.freebsd.org (Postfix) with ESMTP id 5C0E48FC15 for ; Sun, 6 Apr 2008 11:52:20 +0000 (UTC) (envelope-from dino@unitix.org) Received: from localhost (localhost [127.0.0.1]) by fbihome.de (Postfix) with ESMTP id ED72A93326 for ; Sun, 6 Apr 2008 13:27:18 +0200 (CEST) Received: from fbihome.de ([127.0.0.1]) by localhost (stud1 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15696-16 for ; Sun, 6 Apr 2008 13:27:18 +0200 (CEST) Received: from [10.10.10.30] (unknown [84.173.216.71]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fbihome.de (Postfix) with ESMTP id B067B93325 for ; Sun, 6 Apr 2008 13:27:18 +0200 (CEST) Message-ID: <47F8C1B3.4030902@unitix.org> Date: Sun, 06 Apr 2008 14:27:31 +0200 From: dino User-Agent: Thunderbird 2.0.0.12 (X11/20080320) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by fbihome.de X-Mailman-Approved-At: Sun, 06 Apr 2008 12:29:36 +0000 Subject: bug in /bin/sh?!? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 11:52:20 -0000 Hello, on my FreeBSD 7.0-STABLE the line: > sh -c 'set -- ${HOME+A B C}; echo "1:$1"; echo "2:$2:"; echo "3:$3:"' prints 1:A B C: 2:: 3:: I would rather expect: 1:A: 2:B: 3:C: Is it correct that field splitting isn't performed on default/alternate expanded values? regards, Corrado Ficicchia From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 6 18:17:19 2008 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 E03E61065678 for ; Sun, 6 Apr 2008 18:17:19 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outZ.internet-mail-service.net (outz.internet-mail-service.net [216.240.47.249]) by mx1.freebsd.org (Postfix) with ESMTP id C23BF8FC25 for ; Sun, 6 Apr 2008 18:17:19 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Sun, 06 Apr 2008 14:06:39 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 9A1382D600D; Sun, 6 Apr 2008 11:17:15 -0700 (PDT) Message-ID: <47F913AE.3040604@elischer.org> Date: Sun, 06 Apr 2008 11:17:18 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: dino References: <47F8C1B3.4030902@unitix.org> In-Reply-To: <47F8C1B3.4030902@unitix.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: bug in /bin/sh?!? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 18:17:20 -0000 dino wrote: > Hello, > > on my FreeBSD 7.0-STABLE the line: > >> sh -c 'set -- ${HOME+A B C}; echo "1:$1"; echo "2:$2:"; echo "3:$3:"' > > prints > > 1:A B C: > 2:: > 3:: > > I would rather expect: > > 1:A: > 2:B: > 3:C: > > Is it correct that field splitting isn't performed on default/alternate > expanded values? > "A B C" is a single value tha thappens to contain spaces. so, yes there is no splitting at that point. > regards, > > Corrado Ficicchia > _______________________________________________ > 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 Sun Apr 6 20:26:07 2008 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 70EF8106566C for ; Sun, 6 Apr 2008 20:26:07 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id C08BD8FC14 for ; Sun, 6 Apr 2008 20:26:06 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl58-200.kln.forthnet.gr [77.49.185.200]) (authenticated bits=128) by igloo.linux.gr (8.14.2/8.14.2/Debian-3) with ESMTP id m36KPWFJ005588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 6 Apr 2008 23:25:39 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m36KPWfQ002098; Sun, 6 Apr 2008 23:25:32 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m36KPV0F002093; Sun, 6 Apr 2008 23:25:31 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Ed Schouten References: <20080405145038.GE5934@hoeg.nl> Date: Sun, 06 Apr 2008 23:25:31 +0300 In-Reply-To: <20080405145038.GE5934@hoeg.nl> (Ed Schouten's message of "Sat, 5 Apr 2008 16:50:38 +0200") Message-ID: <87bq4mpw78.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m36KPWFJ005588 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.932, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.47, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: FreeBSD Hackers Subject: Re: Perforce and `p4 diff2' against the origin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 20:26:07 -0000 On Sat, 5 Apr 2008 16:50:38 +0200, Ed Schouten wrote: > Hello everyone, > > Because my mpsafetty project in Perforce is going quite well, I'm > considering running some kind of cron job to generate nightly diffs, so > other people (interested friends, colleagues and others) to test my > work. > > I've read `p4 help diff2' and it seems you can run the following > command: > > p4 diff2 -b mpsafetty > > Unfortunately this command just does a braindead diff against the latest > FreeBSD vendor source, which is not useful in my case. I just want it to > generate a diff against the version I integrated. > > Is it possible to do this with Perforce? Yes, as long as you have a 'base' version to diff against. I'd probably try something like: p4 diff2 -du //depot/vendor/freebsd/head/... //depot/user/ed/mpsafetty/... The only tricky part with diff2 is that it expects depot-based paths, as it runs the diff `in the server', not against local workspace files. From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 6 21:11:56 2008 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 521031065671 for ; Sun, 6 Apr 2008 21:11:56 +0000 (UTC) (envelope-from sbrabez@gmail.com) Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.249]) by mx1.freebsd.org (Postfix) with ESMTP id F24FA8FC2B for ; Sun, 6 Apr 2008 21:11:55 +0000 (UTC) (envelope-from sbrabez@gmail.com) Received: by hs-out-0708.google.com with SMTP id m63so759297hsc.11 for ; Sun, 06 Apr 2008 14:11:55 -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:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=G9ZNGdYW7ce7Cd/mQ8hITnpOEpMbLZEpN7NOAkcDcF8=; b=OhhlykHGabzB+DJ4Uj2iKyMigNJZeelMGp+HMBh3CPO6h9Prj8UnJs8Vrxfu/8CCbu/i/Ii2q1a6tTyc6FVhzriP8iZXZ02bg8OY4X5/IhVzPHMy3H/Aar+PREbMQ32iQT0hfonN7sLais4wNqBPwnAYb6efp+kD1ADwRGcy6ng= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=us/jOoNJem+yojb6iscQiwk2wW9ixGiDSoBbsM1gPUxATf1ujJqDED/yQa2I/LN8PlIckKTnvj36y78OgpcMS2ceD5c96vbYTIc5LqHiw8vmTfyk37YopIv3iK9aoT9kqC/MxdDRtPONPrZV2jSJNySvIoAyFNvOCqIDmKcxfHw= Received: by 10.100.201.16 with SMTP id y16mr7682054anf.26.1207516315140; Sun, 06 Apr 2008 14:11:55 -0700 (PDT) Received: by 10.100.31.2 with HTTP; Sun, 6 Apr 2008 14:11:55 -0700 (PDT) Message-ID: <3456f9ca0804061411n4d749521p1b1a29d2db7720e8@mail.gmail.com> Date: Sun, 6 Apr 2008 23:11:55 +0200 From: "Sofian Brabez" To: "Alexander Leidinger" In-Reply-To: <20080404103637.21420xu11y89zdms@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080403202620.GG48868@bunrab.catwhisker.org> <3456f9ca0804032011i7db909d4qc34ff53bd6f7aa28@mail.gmail.com> <20080404103637.21420xu11y89zdms@webmail.leidinger.net> Cc: hackers@freebsd.org Subject: Re: Is describing sysctl variables useful? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 21:11:56 -0000 On Fri, Apr 4, 2008 at 10:36 AM, Alexander Leidinger wrote: > Unfortunately this is not suitable for the SoC. Google wants code > contributions, not pure documentation work. Maybe you can find something > else you would be willing to do during the SoC. In case you haven't send > multiple applications, feel free to send more than one. > > Bye, > Alexander. > > -- > Goldfish... what stupid animals. Even Wayne Cody stops > eating before he bursts. > > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > According with my submit proposal, it's not just concern a "pure" documentation, but sysctl improvements. As Ivan said it, the sysctl description are hardcoded in kernel source in C. That's why, during this summer i would dive into sysctl(3) C architecture composed by OID, MIB, tree and node sysctls to complete description, do code cleanup and fix some bugs identified by XXX/TODO and new pr. Moreover, i have proposed another little hack around lib fetch(3) to be busy during all summer code period. Finally, i've got enough time, i would take to ports some security applications (fuzzing, proxy) in port tree. I explain with more details my project on Google Web Application, the summary is "sysctl improvements and python binding of FreeBSD libfetch library". With this complementary informations, do you think this project it's not suitable for Google summer code this year ? Best Regards. -- sbz From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 6 21:56:08 2008 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 1D187106564A for ; Sun, 6 Apr 2008 21:56:08 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id CBACD8FC13 for ; Sun, 6 Apr 2008 21:56:07 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 570EF2089; Sun, 6 Apr 2008 23:56:06 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Julian Elischer References: <47F8C1B3.4030902@unitix.org> <47F913AE.3040604@elischer.org> Date: Sun, 06 Apr 2008 23:56:05 +0200 In-Reply-To: <47F913AE.3040604@elischer.org> (Julian Elischer's message of "Sun\, 06 Apr 2008 11\:17\:18 -0700") Message-ID: <86ej9i3ax6.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, dino Subject: Re: bug in /bin/sh?!? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 21:56:08 -0000 Julian Elischer writes: > "A B C" is a single value tha thappens to contain spaces. > so, yes there is no splitting at that point. Unfortunately, I do not have a copy of the original Bourne shell, but bash in both bash and sh mode disagrees; zsh in both sh and ksh mode disagrees; pdksh disagrees; the original AT&T ksh disagrees; and I too disagree, since the expansion is not quoted. ${HOME+A B C} expands to A B C which should be split. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 6 21:58:48 2008 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 E004C1065673 for ; Sun, 6 Apr 2008 21:58:48 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 9B0B08FC1E for ; Sun, 6 Apr 2008 21:58:48 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id D443E20B9 for ; Sun, 6 Apr 2008 23:42:51 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: hackers@freebsd.org References: <20080403202620.GG48868@bunrab.catwhisker.org> Date: Sun, 06 Apr 2008 23:42:51 +0200 In-Reply-To: <20080403202620.GG48868@bunrab.catwhisker.org> (David Wolfskill's message of "Thu\, 3 Apr 2008 13\:26\:20 -0700") Message-ID: <86iqyu3bj8.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Is describing sysctl variables useful? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 21:58:49 -0000 David Wolfskill writes: > To that end, I've cobbled up a Perl script that acts as a "wrapper" > around time(1) and uses that command to obtain the "rusage" (ref. > getrusage(2)) information about the command in question. http://search.cpan.org/~taffy/Unix-Getrusage-0.03/ DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 7 02:22:25 2008 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 DF5DA1065676 for ; Mon, 7 Apr 2008 02:22:25 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 615228FC24 for ; Mon, 7 Apr 2008 02:22:24 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl58-200.kln.forthnet.gr [77.49.185.200]) (authenticated bits=128) by igloo.linux.gr (8.14.2/8.14.2/Debian-3) with ESMTP id m372M37Y028785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 7 Apr 2008 05:22:10 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m372M1AH001577; Mon, 7 Apr 2008 05:22:01 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m372Lu81001563; Mon, 7 Apr 2008 05:21:56 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Julian Elischer References: <47F8C1B3.4030902@unitix.org> <47F913AE.3040604@elischer.org> Date: Mon, 07 Apr 2008 05:21:55 +0300 In-Reply-To: <47F913AE.3040604@elischer.org> (Julian Elischer's message of "Sun, 06 Apr 2008 11:17:18 -0700") Message-ID: <87ve2ujtfg.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m372M37Y028785 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.23, required 5, ALL_TRUSTED -1.80, AWL -0.22, BAYES_00 -2.60, PLING_QUERY 1.39) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, dino Subject: Re: bug in /bin/sh?!? 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, 07 Apr 2008 02:22:26 -0000 On Sun, 06 Apr 2008 11:17:18 -0700, Julian Elischer wrote: > dino wrote: >> Hello, >> >> on my FreeBSD 7.0-STABLE the line: >> >>> sh -c 'set -- ${HOME+A B C}; echo "1:$1"; echo "2:$2:"; echo "3:$3:"' >> >> prints >> >> 1:A B C: >> 2:: >> 3:: >> >> I would rather expect: >> >> 1:A: >> 2:B: >> 3:C: >> >> Is it correct that field splitting isn't performed on default/alternate >> expanded values? > > "A B C" is a single value tha thappens to contain spaces. > so, yes there is no splitting at that point. I think there *is* splitting. To inhibit splitting, you would have to use quotes, i.e. one of: set -- "${HOME+A B C}"; echo "1:$1"; echo "2:$2"; echo "3:$3" set -- ${HOME+"A B C"}; echo "1:$1"; echo "2:$2"; echo "3:$3" Splitting does occur in bash, mksh, pdksh and zsh in FreeBSD. The Solaris 10 version of /bin/sh shell does not accept the original at all (I used Solaris 10 Update 3, aka "Solaris 10 11/06 s10x_u3wos_10 X86", for the test): $ sh -c 'set -- ${HOME+A B C}; echo "1:$1"; echo "2:$2:"; echo "3:$3:"' sh: bad substitution $ but it does accept any of the quoted options. The /usr/bin/ksh shell on Solaris accepts the original, but it splits the result at whitespace. From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 6 21:14:01 2008 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 11A9E106567D for ; Sun, 6 Apr 2008 21:14:01 +0000 (UTC) (envelope-from dan@grillo.net) Received: from grillo.net (adsl-69-107-204-137.dsl.pltn13.pacbell.net [69.107.204.137]) by mx1.freebsd.org (Postfix) with ESMTP id AF19E8FC1E for ; Sun, 6 Apr 2008 21:14:00 +0000 (UTC) (envelope-from dan@grillo.net) Received: from more.grillo.net (localhost.grillo.net [127.0.0.1]) by grillo.net (8.14.2/8.14.2) with ESMTP id m36KYIKr085502; Sun, 6 Apr 2008 13:34:19 -0700 (PDT) (envelope-from grio@more-enet.grillo.net) Received: (from grio@localhost) by more.grillo.net (8.14.2/8.14.2/Submit) id m36KYItX085501; Sun, 6 Apr 2008 13:34:18 -0700 (PDT) (envelope-from grio) From: Dan Grillo Message-Id: <200804062034.m36KYItX085501@more.grillo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Organization: President, Grillo Networking, Inc. To: Julian Elischer References: <47F8C1B3.4030902@unitix.org> <47F913AE.3040604@elischer.org> Date: Sun, 6 Apr 2008 13:34:18 -0700 Versions: dmail (bsd44) 2.7/makemail 2.15 X-Mailman-Approved-At: Mon, 07 Apr 2008 05:05:35 +0000 Cc: freebsd-hackers@freebsd.org, dino Subject: Re: bug in /bin/sh?!? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 21:14:01 -0000 Julian Elischer writes: | dino wrote: | > Hello, | > | > on my FreeBSD 7.0-STABLE the line: | > | >> sh -c 'set -- ${HOME+A B C}; echo "1:$1"; echo "2:$2:"; echo "3:$3:"' | > | > prints | > | > 1:A B C: | > 2:: | > 3:: | > | > I would rather expect: | > | > 1:A: | > 2:B: | > 3:C: | > | > Is it correct that field splitting isn't performed on default/alternate | > expanded values? | > | | "A B C" is a single value tha thappens to contain spaces. | so, yes there is no splitting at that point. This is one place where bash and ash disagree: ~ redhat-linux-box[2]> /bin/bash bash-3.00$ sh -c 'set -- ${HOME+A B C}; echo "1:$1"; echo "2:$2:"; echo "3:$3:"' 1:A 2:B: 3:C: bash-3.00$ bash --version GNU bash, version 3.00.15(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2004 Free Software Foundation, Inc. --Dan -- Dan Grillo dan@grillo.net 650-299-1470 From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 7 14:58:34 2008 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 2A0051065670 for ; Mon, 7 Apr 2008 14:58:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1B6C88FC17 for ; Mon, 7 Apr 2008 14:58:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 51E611A4D8C; Mon, 7 Apr 2008 07:58:32 -0700 (PDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 7 Apr 2008 10:39:07 -0400 User-Agent: KMail/1.9.7 References: <20080405145038.GE5934@hoeg.nl> In-Reply-To: <20080405145038.GE5934@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804071039.07210.jhb@freebsd.org> Cc: Ed Schouten Subject: Re: Perforce and `p4 diff2' against the origin 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, 07 Apr 2008 14:58:34 -0000 On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote: > Hello everyone, > > Because my mpsafetty project in Perforce is going quite well, I'm > considering running some kind of cron job to generate nightly diffs, so > other people (interested friends, colleagues and others) to test my > work. > > I've read `p4 help diff2' and it seems you can run the following > command: > > p4 diff2 -b mpsafetty > > Unfortunately this command just does a braindead diff against the latest > FreeBSD vendor source, which is not useful in my case. I just want it to > generate a diff against the version I integrated. > > Is it possible to do this with Perforce? One option is to create a label and sync it each time you do an integ. I do this for projects/smpng. Then I can do: p4 diff2 -u -b smpng @smpng_base #head Another option is to use a convention when you do integ's. What I tend to do is when I do a 'p4 integ' I first do a 'p4 changes -m 10' in another window and include the last 'importer' submit in my submit message by having a message of: 'IFC @XXXXXX' e.g. 'IFC @12345' Then you can use p4 changes on your branch and find the last IFC and use that diff like so: p4 diff2 -u -b mybranch @12345 #head I have a script to look in p4 changes of the branch to find the last IFC commit and figure out the '12345' part automatically like so: #!/bin/sh b=$1 change=$(p4 changes -m 20 //depot/user/jhb/${b}/... | awk '/IFC @[1-9][0-9]*/ { match($0, /@[1-9][0-9]*/); printf "%s\n", substr($0, RSTART, RLENGTH); exit 0 }') echo "Updating ~/work/patches/$b.patch" p4 diff2 -u -b jhb_$b $change \#head > ~/work/patches/$b.patch -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 7 16:43:03 2008 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 A4753106564A for ; Mon, 7 Apr 2008 16:43:03 +0000 (UTC) (envelope-from mwm@mired.org) Received: from mired.org (student.mired.org [66.92.153.77]) by mx1.freebsd.org (Postfix) with ESMTP id 4BEC88FC18 for ; Mon, 7 Apr 2008 16:43:03 +0000 (UTC) (envelope-from mwm@mired.org) Received: (qmail 55617 invoked from network); 7 Apr 2008 12:42:01 -0400 Received: from unknown (HELO mbook-fbsd) (192.168.195.250) by 0 with SMTP; 7 Apr 2008 12:42:01 -0400 Date: Mon, 7 Apr 2008 12:43:00 -0400 From: Mike Meyer To: John Baldwin Message-ID: <20080407124300.5195e299@mbook-fbsd> In-Reply-To: <200804071039.07210.jhb@freebsd.org> References: <20080405145038.GE5934@hoeg.nl> <200804071039.07210.jhb@freebsd.org> Organization: Meyer Consulting X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.5; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 07 Apr 2008 16:55:27 +0000 Cc: freebsd-hackers@freebsd.org, Ed Schouten Subject: Re: Perforce and `p4 diff2' against the origin 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, 07 Apr 2008 16:43:03 -0000 On Mon, 7 Apr 2008 10:39:07 -0400 John Baldwin wrote: > On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote: > > Hello everyone, > > > > Because my mpsafetty project in Perforce is going quite well, I'm > > considering running some kind of cron job to generate nightly diffs, so > > other people (interested friends, colleagues and others) to test my > > work. > > > > I've read `p4 help diff2' and it seems you can run the following > > command: > > > > p4 diff2 -b mpsafetty > > > > Unfortunately this command just does a braindead diff against the latest > > FreeBSD vendor source, which is not useful in my case. I just want it to > > generate a diff against the version I integrated. > > > > Is it possible to do this with Perforce? > Then you can use p4 changes on your branch and find the last IFC and use that > diff like so: > > p4 diff2 -u -b mybranch @12345 #head > > I have a script to look in p4 changes of the branch to find the last IFC > commit and figure out the '12345' part automatically like so: Perforce has facilities designed specifically to support this kind of thing - counters and the "review" command. You can find a brief description plus a link to the perforce-standard review daemon here: http://www.perforce.com/perforce/loadsupp.html#daemon It's designed to send email to perforce user. Actually, something similar ought to be running on the repository already. If so, and you're not using it, you can 'cheat' by setting up the mail list you want and pointing your p4 user Email field at that, along with the appropriate Reviews setting for yourself. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 7 17:06:23 2008 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 F3B4F1065675 for ; Mon, 7 Apr 2008 17:06:22 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outI.internet-mail-service.net (outi.internet-mail-service.net [216.240.47.232]) by mx1.freebsd.org (Postfix) with ESMTP id DAD8E8FC1D for ; Mon, 7 Apr 2008 17:06:22 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 07 Apr 2008 12:59:17 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id D3F0E2D60F6; Mon, 7 Apr 2008 10:06:18 -0700 (PDT) Message-ID: <47FA548D.6060108@elischer.org> Date: Mon, 07 Apr 2008 10:06:21 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Mike Meyer References: <20080405145038.GE5934@hoeg.nl> <200804071039.07210.jhb@freebsd.org> <20080407124300.5195e299@mbook-fbsd> In-Reply-To: <20080407124300.5195e299@mbook-fbsd> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Ed Schouten Subject: Re: Perforce and `p4 diff2' against the origin 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, 07 Apr 2008 17:06:23 -0000 Mike Meyer wrote: > On Mon, 7 Apr 2008 10:39:07 -0400 John Baldwin wrote: > >> On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote: >>> Hello everyone, >>> >>> Because my mpsafetty project in Perforce is going quite well, I'm >>> considering running some kind of cron job to generate nightly diffs, so >>> other people (interested friends, colleagues and others) to test my >>> work. >>> >>> I've read `p4 help diff2' and it seems you can run the following >>> command: >>> >>> p4 diff2 -b mpsafetty >>> >>> Unfortunately this command just does a braindead diff against the latest >>> FreeBSD vendor source, which is not useful in my case. I just want it to >>> generate a diff against the version I integrated. >>> >>> Is it possible to do this with Perforce? >> Then you can use p4 changes on your branch and find the last IFC and use that >> diff like so: >> >> p4 diff2 -u -b mybranch @12345 #head >> >> I have a script to look in p4 changes of the branch to find the last IFC >> commit and figure out the '12345' part automatically like so: > > > Perforce has facilities designed specifically to support this kind of > thing - counters and the "review" command. You can find a brief > description plus a link to the perforce-standard review daemon here: > > http://www.perforce.com/perforce/loadsupp.html#daemon > > It's designed to send email to perforce user. > > Actually, something similar ought to be running on the repository > already. If so, and you're not using it, you can 'cheat' by setting up > the mail list you want and pointing your p4 user Email field at that, > along with the appropriate Reviews setting for yourself. > > From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 7 18:14:17 2008 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 1C820106566B for ; Mon, 7 Apr 2008 18:14:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 8ECCE8FC15 for ; Mon, 7 Apr 2008 18:14:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8s) with ESMTP id 238254153-1834499 for multiple; Mon, 07 Apr 2008 13:57:59 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m37Hv2Rt043811; Mon, 7 Apr 2008 13:57:02 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Mike Meyer Date: Mon, 7 Apr 2008 13:56:40 -0400 User-Agent: KMail/1.9.7 References: <20080405145038.GE5934@hoeg.nl> <200804071039.07210.jhb@freebsd.org> <20080407124300.5195e299@mbook-fbsd> In-Reply-To: <20080407124300.5195e299@mbook-fbsd> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804071356.41181.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 07 Apr 2008 13:57:02 -0400 (EDT) X-Virus-Scanned: ClamAV 0.91.2/6649/Mon Apr 7 12:09:17 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org, Ed Schouten Subject: Re: Perforce and `p4 diff2' against the origin 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, 07 Apr 2008 18:14:17 -0000 On Monday 07 April 2008 12:43:00 pm Mike Meyer wrote: > On Mon, 7 Apr 2008 10:39:07 -0400 John Baldwin wrote: > > > On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote: > > > Hello everyone, > > > > > > Because my mpsafetty project in Perforce is going quite well, I'm > > > considering running some kind of cron job to generate nightly diffs, so > > > other people (interested friends, colleagues and others) to test my > > > work. > > > > > > I've read `p4 help diff2' and it seems you can run the following > > > command: > > > > > > p4 diff2 -b mpsafetty > > > > > > Unfortunately this command just does a braindead diff against the latest > > > FreeBSD vendor source, which is not useful in my case. I just want it to > > > generate a diff against the version I integrated. > > > > > > Is it possible to do this with Perforce? > > Then you can use p4 changes on your branch and find the last IFC and use that > > diff like so: > > > > p4 diff2 -u -b mybranch @12345 #head > > > > I have a script to look in p4 changes of the branch to find the last IFC > > commit and figure out the '12345' part automatically like so: > > > Perforce has facilities designed specifically to support this kind of > thing - counters and the "review" command. You can find a brief > description plus a link to the perforce-standard review daemon here: > > http://www.perforce.com/perforce/loadsupp.html#daemon > > It's designed to send email to perforce user. > > Actually, something similar ought to be running on the repository > already. If so, and you're not using it, you can 'cheat' by setting up > the mail list you want and pointing your p4 user Email field at that, > along with the appropriate Reviews setting for yourself. This is not for e-mails for individual submits. This for generating a cumulative patch of all the differences in one branch relative to the parent. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 7 18:32:18 2008 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 B62A01065687 for ; Mon, 7 Apr 2008 18:32:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 0D80C8FC2A for ; Mon, 7 Apr 2008 18:32:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id E29781CC4C; Mon, 7 Apr 2008 20:31:59 +0200 (CEST) Date: Mon, 7 Apr 2008 20:31:59 +0200 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20080407183159.GP5934@hoeg.nl> References: <20080405145038.GE5934@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PY8tzLeNxmyMVNR3" Content-Disposition: inline In-Reply-To: <20080405145038.GE5934@hoeg.nl> User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Perforce and `p4 diff2' against the origin 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, 07 Apr 2008 18:32:18 -0000 --PY8tzLeNxmyMVNR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks everyone for your replies. I think I should spend some time at the office trying the solutions to see what's the easiest way. I'm just a little bit disappointed by the fact that p4 doesn't have some kind of switch for diff2 to do this by default. It should already keep a list of such relations internally to make integrations and such work. Is there a way for us to submit feature requests at Perforce? --=20 Ed Schouten WWW: http://g-rave.nl/ --PY8tzLeNxmyMVNR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkf6aJ8ACgkQ52SDGA2eCwVTJACfUzfY9jiC3LNLfkFYSgLD2GL6 9ZwAnjAik8Vx0p1icwqRto/41H45OMGB =U6Hx -----END PGP SIGNATURE----- --PY8tzLeNxmyMVNR3-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 7 20:02:46 2008 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 0171A106566C; Mon, 7 Apr 2008 20:02:46 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id B52E98FC1A; Mon, 7 Apr 2008 20:02:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id E6AC91CC4C; Mon, 7 Apr 2008 22:02:25 +0200 (CEST) Date: Mon, 7 Apr 2008 22:02:25 +0200 From: Ed Schouten To: John Baldwin Message-ID: <20080407200225.GQ5934@hoeg.nl> References: <20080405145038.GE5934@hoeg.nl> <200804071039.07210.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3sseE1tnmEs+TkKq" Content-Disposition: inline In-Reply-To: <200804071039.07210.jhb@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD Hackers Subject: Re: Perforce and `p4 diff2' against the origin 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, 07 Apr 2008 20:02:46 -0000 --3sseE1tnmEs+TkKq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * John Baldwin wrote: > On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote: > > Hello everyone, > > > > Because my mpsafetty project in Perforce is going quite well, I'm > > considering running some kind of cron job to generate nightly diffs, so > > other people (interested friends, colleagues and others) to test my > > work. > > > > I've read `p4 help diff2' and it seems you can run the following > > command: > > > > p4 diff2 -b mpsafetty > > > > Unfortunately this command just does a braindead diff against the latest > > FreeBSD vendor source, which is not useful in my case. I just want it to > > generate a diff against the version I integrated. > > > > Is it possible to do this with Perforce? >=20 > One option is to create a label and sync it each time you do an integ. I= do=20 > this for projects/smpng. Then I can do: >=20 > p4 diff2 -u -b smpng @smpng_base #head I just tried this and just wanted to say it works great. This method is quite useful when you want to generate nightly patches and such. Thanks! --=20 Ed Schouten WWW: http://g-rave.nl/ --3sseE1tnmEs+TkKq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkf6fdEACgkQ52SDGA2eCwUhcwCfdVcAs4kxyEpr2o8AzrdaibVv ypMAn2ScvHrWr3sJKlc9KG+nT6/2AL/Z =Qj73 -----END PGP SIGNATURE----- --3sseE1tnmEs+TkKq-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 7 21:58:54 2008 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 1AB0A106566C for ; Mon, 7 Apr 2008 21:58:54 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outI.internet-mail-service.net (outi.internet-mail-service.net [216.240.47.232]) by mx1.freebsd.org (Postfix) with ESMTP id E04C98FC1E for ; Mon, 7 Apr 2008 21:58:53 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 07 Apr 2008 17:53:00 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 27C482D6011; Mon, 7 Apr 2008 14:58:50 -0700 (PDT) Message-ID: <47FA991C.80704@elischer.org> Date: Mon, 07 Apr 2008 14:58:52 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Ed Schouten References: <20080405145038.GE5934@hoeg.nl> <200804071039.07210.jhb@freebsd.org> <20080407200225.GQ5934@hoeg.nl> In-Reply-To: <20080407200225.GQ5934@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: Perforce and `p4 diff2' against the origin 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, 07 Apr 2008 21:58:54 -0000 Ed Schouten wrote: > * John Baldwin wrote: >> On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote: >>> Hello everyone, >>> >>> Because my mpsafetty project in Perforce is going quite well, I'm >>> considering running some kind of cron job to generate nightly diffs, so >>> other people (interested friends, colleagues and others) to test my >>> work. >>> >>> I've read `p4 help diff2' and it seems you can run the following >>> command: >>> >>> p4 diff2 -b mpsafetty >>> >>> Unfortunately this command just does a braindead diff against the latest >>> FreeBSD vendor source, which is not useful in my case. I just want it to >>> generate a diff against the version I integrated. >>> >>> Is it possible to do this with Perforce? >> One option is to create a label and sync it each time you do an integ. I do >> this for projects/smpng. Then I can do: >> >> p4 diff2 -u -b smpng @smpng_base #head > > I just tried this and just wanted to say it works great. This method is The two scripts I mentioned do exactly this. (but easier on the eyes.) > From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 8 05:07:01 2008 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 C11DE106564A; Tue, 8 Apr 2008 05:07:01 +0000 (UTC) (envelope-from so14k@valentine.liquidneon.com) Received: from valentine.liquidneon.com (valentine.liquidneon.com [216.87.78.132]) by mx1.freebsd.org (Postfix) with ESMTP id AAC038FC1F; Tue, 8 Apr 2008 05:07:01 +0000 (UTC) (envelope-from so14k@valentine.liquidneon.com) Received: by valentine.liquidneon.com (Postfix, from userid 1018) id 3D67B8FD81; Mon, 7 Apr 2008 22:46:42 -0600 (MDT) Date: Mon, 7 Apr 2008 22:46:42 -0600 From: Brad Davis To: freebsd-current@freebsd.org Message-ID: <20080408044642.GA47438@valentine.liquidneon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: FreeBSD Status Reports due: April 14th, 2008 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, 08 Apr 2008 05:07:01 -0000 Hi Everyone, It is that time again. We would like to remind everybody who has exciting news to share to write a report about their project. This is a good way to improve exposure of your work, receive feedback and help. Looking forward to your reports. As always you can either use the template or the CGI generator and mail the output to monthly@ by Monday April 14th, 2008. http://www.freebsd.org/news/status/ http://www.freebsd.org/cgi/monthly.cgi http://www.freebsd.org/news/status/report-sample.xml Regards, Brad Davis From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 8 14:26:56 2008 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 A9BCB106566B for ; Tue, 8 Apr 2008 14:26:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 989618FC1A for ; Tue, 8 Apr 2008 14:26:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 023181A4D8B; Tue, 8 Apr 2008 07:26:56 -0700 (PDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 8 Apr 2008 10:07:17 -0400 User-Agent: KMail/1.9.7 References: <20080405145038.GE5934@hoeg.nl> <20080407183159.GP5934@hoeg.nl> In-Reply-To: <20080407183159.GP5934@hoeg.nl> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200804081007.17874.jhb@freebsd.org> Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Cc: Ed Schouten Subject: Re: Perforce and `p4 diff2' against the origin 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, 08 Apr 2008 14:26:56 -0000 On Monday 07 April 2008 02:31:59 pm Ed Schouten wrote: > Thanks everyone for your replies. I think I should spend some time at > the office trying the solutions to see what's the easiest way. > > I'm just a little bit disappointed by the fact that p4 doesn't have some > kind of switch for diff2 to do this by default. It should already keep a > list of such relations internally to make integrations and such work. > > Is there a way for us to submit feature requests at Perforce? Well, it's not quite that simple because p4 lets you do things like cherry pick revisions (I want to merge revisions 1-4 and 7 into foo.c but not 5 and 6 yet.. in that case, what should it diff against, #4? #7? #7 with #5 and #6 backed out somehow (what if that has conflicts?)?) and merge from different paths into the same file. So for example if I had this: //depot/foo.c //depot/bar.c //depot/baz.c and I merged foo.c#1-#2 into bar.c and foo.c#1 into baz.c. Then suppose I merge bar.c into baz.c (thus carrying the changes in foo.c#2 into baz.c). If I diff foo.c against baz.c should it diff against #1 or #2? The reason you have a good answer for what to merge in your case is because it is a degenerate case and while that one may seem obvious a general purpose solution is not as obvious. The other thing to recall is that if you were just using p4 w/o HEAD in CVS you wouldn't generate patches in the first place. Instead, you would use 'p4 integ -r' to merge changes from your branches up into HEAD. I do this at work where all out stuff lives in p4 and don't really use patches much anymore except to review before a submit (so I would do 'p4 integ -r -b foo_feature; p4 resolve -a; p4 diff -du ... | less; p4 submit'). Thus, we use p4 in a bit of an odd way since HEAD is in CVS and if you use it as it is designed to be used patches aren't all that important, hence they aren't going to focus as much effort on it. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 8 15:59:20 2008 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 BB7391065677 for ; Tue, 8 Apr 2008 15:59:20 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mta1.srv.hcvlny.cv.net (mta1.srv.hcvlny.cv.net [167.206.4.196]) by mx1.freebsd.org (Postfix) with ESMTP id 93A148FC30 for ; Tue, 8 Apr 2008 15:59:20 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from flosoft.no-ip.biz (ool-435559b8.dyn.optonline.net [67.85.89.184]) by mta1.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0JZ0006B1J0VX571@mta1.srv.hcvlny.cv.net> for freebsd-hackers@freebsd.org; Tue, 08 Apr 2008 11:29:19 -0400 (EDT) Received: from flosoft.no-ip.biz (localhost [IPv6:::1]) by flosoft.no-ip.biz (8.14.2/8.14.2) with ESMTP id m38FTI48061885 for ; Tue, 08 Apr 2008 11:29:19 -0400 Date: Tue, 08 Apr 2008 11:29:13 -0400 From: "Aryeh M. Friedman" To: freebsd-hackers@freebsd.org Message-id: <47FB8F49.6060105@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.95.6 User-Agent: Thunderbird 2.0.0.12 (X11/20080329) Subject: normal users calling setpriority(2) 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, 08 Apr 2008 15:59:20 -0000 Is it possible via sysctl or some other method to allow non-superusers to set any priority they want. The specific question is I often want to set idprio 31 on stuff but don't want to switch to root to do it (I am the only user on the machine). From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 8 17:02:18 2008 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 CF1E31065670 for ; Tue, 8 Apr 2008 17:02:18 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 712368FC1D for ; Tue, 8 Apr 2008 17:02:18 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [202.108.54.204]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 1F17928448 for ; Wed, 9 Apr 2008 01:02:17 +0800 (CST) Received: from localhost (tarsier.geekcn.org [202.108.54.204]) by tarsier.geekcn.org (Postfix) with ESMTP id 76BFDEC2031; Wed, 9 Apr 2008 01:02:16 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([202.108.54.204]) by localhost (mail.geekcn.org [202.108.54.204]) (amavisd-new, port 10024) with ESMTP id Flba9RPQMjtW; Wed, 9 Apr 2008 01:02:10 +0800 (CST) Received: from LI-Xins-MacBook.local (71.5.7.139.ptr.us.xo.net [71.5.7.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id EA56FEBBA50; Wed, 9 Apr 2008 01:02:09 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=drliVudxOFEIgTnNezFHarYIZMwtu1ThTEhZl7/GrtiqEdtj+9tw+xneEn35pWxTD SgB68qMePWGcewwq0nmqQ== Message-ID: <47FBA50B.6020801@delphij.net> Date: Tue, 08 Apr 2008 10:02:03 -0700 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: "Aryeh M. Friedman" References: <47FB8F49.6060105@gmail.com> In-Reply-To: <47FB8F49.6060105@gmail.com> X-Enigmail-Version: 0.95.6 OpenPGP: url=http://www.delphij.net/delphij.asc Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigDFDCA8A953D350A346B58E65" Cc: freebsd-hackers@freebsd.org Subject: Re: normal users calling setpriority(2) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2008 17:02:18 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDFDCA8A953D350A346B58E65 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Aryeh M. Friedman wrote: > Is it possible via sysctl or some other method to allow non-superusers = > to set any priority they want. The specific question is I often want = > to set idprio 31 on stuff but don't want to switch to root to do it (I = > am the only user on the machine). No if nobody implement PRIV_SCHED_SETPRIORTY support for non-root. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enigDFDCA8A953D350A346B58E65 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH+6ULOfuToMruuMARCmDsAJ9w/t/NEJXwayCrbaikB5xgLYPELgCfTmcy eqOvMz2pepcm6/gBCOcW/tg= =lEVX -----END PGP SIGNATURE----- --------------enigDFDCA8A953D350A346B58E65-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 8 17:34:49 2008 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 871D61065671 for ; Tue, 8 Apr 2008 17:34:49 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outA.internet-mail-service.net (outa.internet-mail-service.net [216.240.47.224]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0308FC13 for ; Tue, 8 Apr 2008 17:34:49 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Tue, 08 Apr 2008 15:52:18 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 785322D8BF1; Tue, 8 Apr 2008 10:34:44 -0700 (PDT) Message-ID: <47FBACB8.4080304@elischer.org> Date: Tue, 08 Apr 2008 10:34:48 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: John Baldwin References: <20080405145038.GE5934@hoeg.nl> <20080407183159.GP5934@hoeg.nl> <200804081007.17874.jhb@freebsd.org> In-Reply-To: <200804081007.17874.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Ed Schouten Subject: Re: Perforce and `p4 diff2' against the origin 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, 08 Apr 2008 17:34:49 -0000 John Baldwin wrote: > On Monday 07 April 2008 02:31:59 pm Ed Schouten wrote: >> Thanks everyone for your replies. I think I should spend some time at >> the office trying the solutions to see what's the easiest way. >> >> I'm just a little bit disappointed by the fact that p4 doesn't have some >> kind of switch for diff2 to do this by default. It should already keep a >> list of such relations internally to make integrations and such work. >> >> Is there a way for us to submit feature requests at Perforce? > > Well, it's not quite that simple because p4 lets you do things like cherry > pick revisions (I want to merge revisions 1-4 and 7 into foo.c but not 5 and > 6 yet.. in that case, what should it diff against, #4? #7? #7 with #5 and > #6 backed out somehow (what if that has conflicts?)?) and merge from > different paths into the same file. So for example if I had this: > > //depot/foo.c > //depot/bar.c > //depot/baz.c > > and I merged foo.c#1-#2 into bar.c and foo.c#1 into baz.c. Then suppose I > merge bar.c into baz.c (thus carrying the changes in foo.c#2 into baz.c). If > I diff foo.c against baz.c should it diff against #1 or #2? > > The reason you have a good answer for what to merge in your case is because it > is a degenerate case and while that one may seem obvious a general purpose > solution is not as obvious. The other thing to recall is that if you were > just using p4 w/o HEAD in CVS you wouldn't generate patches in the first > place. Instead, you would use 'p4 integ -r' to merge changes from your > branches up into HEAD. I do this at work where all out stuff lives in p4 and > don't really use patches much anymore except to review before a submit (so I > would do 'p4 integ -r -b foo_feature; p4 resolve -a; p4 diff -du ... | less; > p4 submit'). Thus, we use p4 in a bit of an odd way since HEAD is in CVS and > if you use it as it is designed to be used patches aren't all that important, > hence they aren't going to focus as much effort on it. > the new p4 interchanges command may be relaqvent to this discussion... I haven't used it yet but it seems relevant. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 17:03:00 2008 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 F2E33106566B for ; Wed, 9 Apr 2008 17:03:00 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell.rawbw.com (shell.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id C5E298FC1B for ; Wed, 9 Apr 2008 17:03:00 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from eagle.syrec.org (ip224.carlyle.sfo.ygnition.net [24.219.144.224]) (authenticated bits=0) by shell.rawbw.com (8.13.6/8.13.6) with ESMTP id m39GdBWl038705; Wed, 9 Apr 2008 09:39:11 -0700 (PDT) Message-ID: <47FCF12D.3070902@rawbw.com> Date: Wed, 09 Apr 2008 09:39:09 -0700 From: Yuri User-Agent: Thunderbird 2.0.0.12 (X11/20080312) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: C++ exceptions are broken in FreeBSD with gcc-compiled code? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yuri@rawbw.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 17:03:01 -0000 I am unable to make a C++ program to catch an exception using the the system g++ compiler. > cat exc.C #include #include using namespace std; int main() { try { throw string("String"); } catch (string s) { cout << "Caught an exception \"" << s << "\"\n"; } } * Failed attempts with system compiler (using /lib/libgcc_s.so.1 and /usr/lib/libstdc++.so.6): > echo $LD_LIBRARY_PATH > g++ -fexceptions -o exc exc.C > exc Exception raised: Memory allocation failure! > g++ -pthread -fexceptions -o exc exc.C > exc Exception raised: Memory allocation failure! * Succeeded attempt with gcc-4.3.0 and -pthread option (using /usr/local/gcc-4.3.0/lib/libgcc_s.so.1 and /usr/local/gcc-4.3.0/lib/libstdc): > echo $LD_LIBRARY_PATH /usr/local/gcc-4.3.0/lib > /usr/local/gcc-4.3.0/bin/g++ -pthread -fexceptions -o exc exc.C > exc Caught an exception "String" * Failed attempt with gcc-4.3.0 without -pthread option (using /usr/local/gcc-4.3.0/lib/libgcc_s.so.1 and /usr/local/gcc-4.3.0/lib/libstdc): > echo $LD_LIBRARY_PATH /usr/local/gcc-4.3.0/lib > /usr/local/gcc-4.3.0/bin/g++ -fexceptions -o exc exc.C > exc Abort trap: 6 So exceptions *only* work with new gcc-4.3.0 and -pthread option. Is this a known issue? > g++ --version g++ (GCC) 4.2.1 20070719 [FreeBSD] > uname -a FreeBSD xxx.xxx.xxx 7.0-STABLE FreeBSD 7.0-STABLE #5: Thu Feb 28 03:58:20 PST 2008 yuri@xxx.xxx.xxx:/usr/obj/usr/src/sys/GENERIC i386 Yuri From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 17:40:02 2008 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 C91411065674 for ; Wed, 9 Apr 2008 17:40:02 +0000 (UTC) (envelope-from faber@ISI.EDU) Received: from boreas.isi.edu (boreas.isi.edu [128.9.160.161]) by mx1.freebsd.org (Postfix) with ESMTP id AAA638FC2C for ; Wed, 9 Apr 2008 17:40:02 +0000 (UTC) (envelope-from faber@ISI.EDU) Received: from zod.isi.edu (zod.isi.edu [128.9.168.221]) by boreas.isi.edu (8.13.8/8.13.8) with ESMTP id m39HT5dp026744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 9 Apr 2008 10:29:06 -0700 (PDT) Received: (from faber@localhost) by zod.isi.edu (8.14.2/8.14.2/Submit) id m39HT52o079741; Wed, 9 Apr 2008 10:29:05 -0700 (PDT) (envelope-from faber) Date: Wed, 9 Apr 2008 10:29:05 -0700 From: Ted Faber To: Yuri Message-ID: <20080409172905.GA33086@zod.isi.edu> References: <47FCF12D.3070902@rawbw.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <47FCF12D.3070902@rawbw.com> User-Agent: Mutt/1.4.2.3i X-url: http://www.isi.edu/~faber X-ISI-4-43-8-MailScanner: Found to be clean X-MailScanner-From: faber@zod.isi.edu Cc: freebsd-hackers@freebsd.org Subject: Re: C++ exceptions are broken in FreeBSD with gcc-compiled code? 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, 09 Apr 2008 17:40:02 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 09, 2008 at 09:39:09AM -0700, Yuri wrote: > I am unable to make a C++ program to catch an exception using the the=20 > system g++ compiler. >=20 > > cat exc.C > #include > #include > using namespace std; >=20 > int main() { > try { > throw string("String"); > } catch (string s) { > cout << "Caught an exception \"" << s << "\"\n"; > } > } >=20 >=20 > * Failed attempts with system compiler (using /lib/libgcc_s.so.1 and=20 FYI it works here: zod:~$ cat > test.cc #include #include using namespace std; int main() { try { throw string("String"); } catch (string s) { cout << "Caught an exception \"" << s << "\"\n"; } } zod:~$ g++ test.cc=20 zod:~$ ./a.out Caught an exception "String" zod:~$ g++ -v=20 Using built-in specs. Target: i386-undermydesk-freebsd Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 4.2.1 20070719 [FreeBSD] zod:~$ uname -a FreeBSD zod.isi.edu 8.0-CURRENT FreeBSD 8.0-CURRENT #5: Tue Apr 1 13:00:38 PDT 2008 root@zod.isi.edu:/usr/obj/usr/src/sys/ZOD i386 --=20 Ted Faber http://www.isi.edu/~faber PGP: http://www.isi.edu/~faber/pubkeys.= asc Unexpected attachment on this mail? See http://www.isi.edu/~faber/FAQ.html#= SIG --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkf8/OEACgkQaUz3f+Zf+XsPIQCg/FvDoXieoFihPmnb5JaO/VWp EZUAoPP+LInURskze68jdW0bKTaWlc7G =Hilr -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT-- From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 18:26:09 2008 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 CB4271065671 for ; Wed, 9 Apr 2008 18:26:09 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 4F4B08FC1C for ; Wed, 9 Apr 2008 18:26:09 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:51413 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Jjezm-0007HK-3R for freebsd-hackers@freebsd.org; Wed, 09 Apr 2008 20:26:08 +0200 Received: (qmail 55227 invoked from network); 9 Apr 2008 20:26:02 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 9 Apr 2008 20:26:02 +0200 Received: (qmail 46321 invoked by uid 1001); 9 Apr 2008 20:26:02 +0200 Date: Wed, 9 Apr 2008 20:26:02 +0200 From: Erik Trulsson To: Ted Faber Message-ID: <20080409182602.GA46118@owl.midgard.homeip.net> Mail-Followup-To: Ted Faber , Yuri , freebsd-hackers@freebsd.org References: <47FCF12D.3070902@rawbw.com> <20080409172905.GA33086@zod.isi.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080409172905.GA33086@zod.isi.edu> User-Agent: Mutt/1.5.17 (2007-11-01) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1Jjezm-0007HK-3R. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Jjezm-0007HK-3R be4f0711d41da79445f59e07eaf6d286 Cc: Yuri , freebsd-hackers@freebsd.org Subject: Re: C++ exceptions are broken in FreeBSD with gcc-compiled code? 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, 09 Apr 2008 18:26:09 -0000 On Wed, Apr 09, 2008 at 10:29:05AM -0700, Ted Faber wrote: > On Wed, Apr 09, 2008 at 09:39:09AM -0700, Yuri wrote: > > I am unable to make a C++ program to catch an exception using the the > > system g++ compiler. > > > > > cat exc.C > > #include > > #include > > using namespace std; > > > > int main() { > > try { > > throw string("String"); > > } catch (string s) { > > cout << "Caught an exception \"" << s << "\"\n"; > > } > > } > > > > > > * Failed attempts with system compiler (using /lib/libgcc_s.so.1 and > > FYI it works here: > > zod:~$ cat > test.cc > #include > #include > using namespace std; > > int main() { > try { > throw string("String"); > } catch (string s) { > cout << "Caught an exception \"" << s << "\"\n"; > } > } > zod:~$ g++ test.cc > zod:~$ ./a.out > Caught an exception "String" > zod:~$ g++ -v > Using built-in specs. > Target: i386-undermydesk-freebsd > Configured with: FreeBSD/i386 system compiler > Thread model: posix > gcc version 4.2.1 20070719 [FreeBSD] > zod:~$ uname -a > FreeBSD zod.isi.edu 8.0-CURRENT FreeBSD 8.0-CURRENT #5: Tue Apr 1 > 13:00:38 PDT 2008 root@zod.isi.edu:/usr/obj/usr/src/sys/ZOD i386 > It works fine for me too, using FreeBSD 6-stable and the built-in gcc 3.4.6 as well as with gcc 4.2.4 20080305 installed from ports. No need to use -pthreads in either case. -- Erik Trulsson ertr1013@student.uu.se From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 18:38:26 2008 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 765201065676 for ; Wed, 9 Apr 2008 18:38:26 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell.rawbw.com (shell.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4A25B8FC2E for ; Wed, 9 Apr 2008 18:38:25 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from eagle.syrec.org (ip224.carlyle.sfo.ygnition.net [24.219.144.224]) (authenticated bits=0) by shell.rawbw.com (8.13.6/8.13.6) with ESMTP id m39IcPco004455; Wed, 9 Apr 2008 11:38:25 -0700 (PDT) Message-ID: <47FD0D21.7010009@rawbw.com> Date: Wed, 09 Apr 2008 11:38:25 -0700 From: Yuri User-Agent: Thunderbird 2.0.0.12 (X11/20080312) MIME-Version: 1.0 To: Ted Faber , freebsd-hackers@freebsd.org References: <47FCF12D.3070902@rawbw.com> <20080409172905.GA33086@zod.isi.edu> <20080409182602.GA46118@owl.midgard.homeip.net> In-Reply-To: <20080409182602.GA46118@owl.midgard.homeip.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: C++ exceptions are broken in FreeBSD with gcc-compiled code? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yuri@rawbw.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 18:38:26 -0000 Erik Trulsson wrote: > It works fine for me too, using FreeBSD 6-stable and the built-in gcc > 3.4.6 > as well as with gcc 4.2.4 20080305 installed from ports. > No need to use -pthreads in either case This means that this issue is STABLE-7.0 specific. Yuri From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 19:17:08 2008 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 98565106566B for ; Wed, 9 Apr 2008 19:17:08 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.191]) by mx1.freebsd.org (Postfix) with ESMTP id 1C2B78FC1B for ; Wed, 9 Apr 2008 19:17:07 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by gv-out-0910.google.com with SMTP id n40so578652gve.39 for ; Wed, 09 Apr 2008 12:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; bh=ZPXfF2w9V6xzVNVkYYMju7vfLckW2btsSx+kA//+ymg=; b=Xa7wRTv37LvrObO//IZ8C4NS7Bms27ce/C8tvDcsAwI89cKkYgBcNuXub0MdvUbbxdm/luFcE7K6OusRHbhL4Mmme9jf4OvRD+HjTD0juYNdRjtRKn8HlnOYeJzY4n7WpX/vxltFxeHOJxDq1mQMP//4Ug1ICa/y0nH2hAoPTqk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=qcIxqsGNp7zI5acMEljIlkW0e2EogrNfRzfY7S3EGeMxXrtpNAgoF/j8aPeJEzg+3yu2FGvuyyEJZ9uh8InfNTxBmLChkp4y72mQ9ZmGcJKMk2olst4eZWkATuuCpa/4CvbVGgqDBG/hhMZdDEdl6WhLo+BbKw/kSP54CRM5G4U= Received: by 10.150.92.11 with SMTP id p11mr777133ybb.36.1207766923208; Wed, 09 Apr 2008 11:48:43 -0700 (PDT) Received: from kan.dnsalias.net ( [24.218.183.247]) by mx.google.com with ESMTPS id a45sm1192680rne.1.2008.04.09.11.48.35 (version=SSLv3 cipher=OTHER); Wed, 09 Apr 2008 11:48:39 -0700 (PDT) Date: Wed, 9 Apr 2008 14:48:27 -0400 From: Alexander Kabaev To: yuri@rawbw.com Message-ID: <20080409144827.39bc4f33@kan.dnsalias.net> In-Reply-To: <47FCF12D.3070902@rawbw.com> References: <47FCF12D.3070902@rawbw.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/iD9spt9QYGHAIGXlAkRJ/Ob"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org Subject: Re: C++ exceptions are broken in FreeBSD with gcc-compiled code? 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, 09 Apr 2008 19:17:08 -0000 --Sig_/iD9spt9QYGHAIGXlAkRJ/Ob Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 09 Apr 2008 09:39:09 -0700 Yuri wrote: > I am unable to make a C++ program to catch an exception using the the=20 > system g++ compiler. % c++ -o exc exc.c=20 % ./exc Caught an exception "String" % c++ -O2 -pthread -o exc exc.c % ./exc =20 Caught an exception "String" % c++42 -O2 -pthread -o exc exc.c % ./exc Caught an exception "String" % c++42 -O2 -o exc exc.c =20 % ./exc =20 Caught an exception "String" % cat exc.c #include #include using namespace std; int main() { try { throw string("String"); } catch (string s) { cout << "Caught an exception \"" << s << "\"\n"; } return 0; } % uname -a FreeBSD kan.dnsalias.net 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sun Apr 6 14:22:23 EDT 2008 ... Same on RELENG_6 (do not have 7.0 around, but 8.0 and 7.0 are identical compiler-wise. Same on 8.0/amd64. BTW, do you have . in your PATH? > g++ -fexceptions -o exc exc.C > exc <=3D=3D=3D=3D should it be ./exc ?=20 Exception raised: Memory allocation failure! ^^^^^^^^^^^ Not in your sample code. --=20 Alexander Kabaev --Sig_/iD9spt9QYGHAIGXlAkRJ/Ob Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iD8DBQFH/Q97Q6z1jMm+XZYRAks+AKCGBgEyL0NRgNt+KmBI8r/c+jpvDQCbBZGJ ZNrRh6FBUbN4Cq+axMW/BqQ= =JKzo -----END PGP SIGNATURE----- --Sig_/iD9spt9QYGHAIGXlAkRJ/Ob-- From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 22:28:31 2008 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 A83A31065677 for ; Wed, 9 Apr 2008 22:28:31 +0000 (UTC) (envelope-from cavac@magicbooks.org) Received: from mail.magicbooks.org (www.magicbooks.org [217.79.181.111]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8EF8FC12 for ; Wed, 9 Apr 2008 22:28:30 +0000 (UTC) (envelope-from cavac@magicbooks.org) Received: from mail.magicbooks.org (localhost [127.0.0.1]) by mail.magicbooks.org (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m39MSNex006354 for ; Thu, 10 Apr 2008 00:28:26 +0200 Received: from 85.124.106.201 (SquirrelMail authenticated user cavac) by mail.magicbooks.org with HTTP; Thu, 10 Apr 2008 00:28:26 +0200 (CEST) Message-ID: <3652.85.124.106.201.1207780106.squirrel@mail.magicbooks.org> Date: Thu, 10 Apr 2008 00:28:26 +0200 (CEST) From: "Rene Schickbauer" To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.4.6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: RFC3514 for FreeBSD7 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, 09 Apr 2008 22:28:31 -0000 Hi! Well, i'm a bit late for this years aprils fools day, but the patch took much me longer than expected. Here it is, an updated and enhanced patch for RFC3514 "Security Flag in the IPv4 header", also known as the "evil bit". This patch now also supports using the "error" led on some embedded systems like that from Soekris (tested only with the Net5501). Any comments and bug reports are welcome. LLAP & LG Rene -- ---------------------- OmniCode 0.1.6 ----------------------- sxy cm169 esO sp= Ag1976 anE hda ZoS Rl! Kd! MBINTJ UFGreg&Sid IN10 AdC&N PrPerl(8)&C(7)&C++(7)&LUA(8)&PHP(8)&C#(4)&SQL(8)&BSLUA(9) ----------- Omnicode http://www.gadgeteer.net/omnicode/ ----------- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 Visit to decode GCS/CM d--(-) s:- a C++(+++)$>++++ UBLAHC*+++(++++)$>++++ P+++(++++)$>+++++ L+(++)>$ !E---(-) W+++$ N+(++)@ o+(++)@ K? w+++(++)$>--- !O- M++>$ V-(--) PS+ PE Y+ PGP+ t+ 5 X- R- tv-- b++(+++) DI-- D+ G++ e- h r? y+ ------END GEEK CODE BLOCK------ Hackerkey: http://tinyurl.com/2qtnbq From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 22:19:32 2008 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 295DE106566C for ; Wed, 9 Apr 2008 22:19:32 +0000 (UTC) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.freebsd.org (Postfix) with ESMTP id 9D6348FC13 for ; Wed, 9 Apr 2008 22:19:31 +0000 (UTC) (envelope-from hank@et.bocholt.fh-gelsenkirchen.de) Received: from sora.hank.home (i577BD44B.versanet.de [87.123.212.75]) by alice.et.bocholt.fh-gelsenkirchen.de (8.14.2/8.14.2) with ESMTP id m39M4Ycx017471 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Apr 2008 00:04:35 +0200 X-DKIM: Sendmail DKIM Filter v2.4.0 alice.et.bocholt.fh-gelsenkirchen.de m39M4Ycx017471 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=et.bocholt.fh-gelsenkirchen.de; s=et; t=1207778676; bh=papWx3HxoY MV9pnTqu+zTlwSOEMMlyZAC3gwPLAZu9o=; h=Received:Subject:In-reply-to: References:Comments:X-Mailer:Date:Message-ID:From; b=FMZ9tAnPzCAId Ad7YRkeq+yIFr76Xxu2hYoR1omk+lB9m87uhDnCbtjyxVpx4yeJH6lGZPXnzEnhVW0/ t7tAwFc88KRa4FLwogPQ9kW3oZLR6ZFsglCvpY50Y8ERQnSHotKoyfnl446L5hOtuzG LKAzeu6akDYhoIXCaKy/Y2Ic= Received: from localhost (localhost.hank.home [127.0.0.1]) by sora.hank.home (8.14.2/8.14.2) with ESMTP id m39M46Q3001095; Thu, 10 Apr 2008 00:04:07 +0200 (CEST) (envelope-from hank@sora.hank.home) To: yuri@rawbw.com In-reply-to: <47FD0D21.7010009@rawbw.com> References: <47FCF12D.3070902@rawbw.com> <20080409172905.GA33086@zod.isi.edu> <20080409182602.GA46118@owl.midgard.homeip.net> <47FD0D21.7010009@rawbw.com> Comments: In-reply-to Yuri message dated "Wed, 09 Apr 2008 11:38:25 -0700." X-Mailer: MH-E 8.0.3; nmh 1.2; GNU Emacs 22.1.1 Date: Thu, 10 Apr 2008 00:04:06 +0200 Message-ID: <1094.1207778646@sora.hank.home> From: Dirk GOUDERS X-Spam-Status: No, score=-97.7 required=5.0 tests=AWL,BAYES_00,HELO_LH_HOME, RCVD_IN_PBL, RCVD_IN_SORBS_DUL, SPF_SOFTFAIL, USER_IN_WHITELIST autolearn=no version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlin.ccamp.de X-Mailman-Approved-At: Thu, 10 Apr 2008 00:32:27 +0000 Cc: freebsd-hackers@freebsd.org, Ted Faber Subject: Re: C++ exceptions are broken in FreeBSD with gcc-compiled code? 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, 09 Apr 2008 22:19:32 -0000 > > It works fine for me too, using FreeBSD 6-stable and the built-in gcc > > 3.4.6 > > as well as with gcc 4.2.4 20080305 installed from ports. > > No need to use -pthreads in either case > > This means that this issue is STABLE-7.0 specific. I am not able to reproduce the problem here; I will compile the updated sources tonight to check if that changes anything: # uname -sr FreeBSD 7.0-STABLE # g++ --version g++ (GCC) 4.2.1 20070719 [FreeBSD] Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # cat exc.C #include #include using namespace std; int main() { try { throw string("String"); } catch (string s) { cout << "Caught an exception \"" << s << "\"\n"; } } # g++ -o exc exc.C # ./exc Caught an exception "String" From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 22:23:37 2008 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 C16D810656C8 for ; Wed, 9 Apr 2008 22:23:37 +0000 (UTC) (envelope-from cavac@magicbooks.org) Received: from mail.magicbooks.org (www.magicbooks.org [217.79.181.111]) by mx1.freebsd.org (Postfix) with ESMTP id 887D38FC22 for ; Wed, 9 Apr 2008 22:23:35 +0000 (UTC) (envelope-from cavac@magicbooks.org) Received: from mail.magicbooks.org (localhost [127.0.0.1]) by mail.magicbooks.org (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m39MNUex006178 for ; Thu, 10 Apr 2008 00:23:31 +0200 Received: from 85.124.106.201 (SquirrelMail authenticated user cavac) by mail.magicbooks.org with HTTP; Thu, 10 Apr 2008 00:23:31 +0200 (CEST) Message-ID: <3640.85.124.106.201.1207779811.squirrel@mail.magicbooks.org> Date: Thu, 10 Apr 2008 00:23:31 +0200 (CEST) From: "Rene Schickbauer" To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.4.6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Mailman-Approved-At: Thu, 10 Apr 2008 00:32:38 +0000 Subject: RFC3514 for FreeBSD7 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, 09 Apr 2008 22:23:37 -0000 Hi! Well, i'm a bit late for this years aprils fools day, but the patch took much me longer than expected. Here it is, an updated and enhanced patch for RFC3514 "Security Flag in the IPv4 header", also known as the "evil bit". This patch now also supports using the "error" led on some embedded systems like that from Soekris (tested only with the Net5501). Any comments and bug reports are welcome. LLAP & LG Rene -- ---------------------- OmniCode 0.1.6 ----------------------- sxy cm169 esO sp= Ag1976 anE hda ZoS Rl! Kd! MBINTJ UFGreg&Sid IN10 AdC&N PrPerl(8)&C(7)&C++(7)&LUA(8)&PHP(8)&C#(4)&SQL(8)&BSLUA(9) ----------- Omnicode http://www.gadgeteer.net/omnicode/ ----------- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 Visit to decode GCS/CM d--(-) s:- a C++(+++)$>++++ UBLAHC*+++(++++)$>++++ P+++(++++)$>+++++ L+(++)>$ !E---(-) W+++$ N+(++)@ o+(++)@ K? w+++(++)$>--- !O- M++>$ V-(--) PS+ PE Y+ PGP+ t+ 5 X- R- tv-- b++(+++) DI-- D+ G++ e- h r? y+ ------END GEEK CODE BLOCK------ Hackerkey: http://tinyurl.com/2qtnbq From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 10 14:07:31 2008 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 D9B401065671 for ; Thu, 10 Apr 2008 14:07:31 +0000 (UTC) (envelope-from z@zlo.nu) Received: from mzh.zlo.nu (ns0.zlo.nu [85.17.141.90]) by mx1.freebsd.org (Postfix) with ESMTP id A15908FC13 for ; Thu, 10 Apr 2008 14:07:31 +0000 (UTC) (envelope-from z@zlo.nu) Received: by mzh.zlo.nu (Postfix, from userid 1000) id 7932B141F4; Thu, 10 Apr 2008 15:46:59 +0200 (CEST) Date: Thu, 10 Apr 2008 15:46:59 +0200 From: Marc Olzheim To: d@delphij.net Message-ID: <20080410134659.GA11204@zlo.nu> References: <47FB8F49.6060105@gmail.com> <47FBA50B.6020801@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <47FBA50B.6020801@delphij.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-Mailman-Approved-At: Thu, 10 Apr 2008 15:36:56 +0000 Cc: freebsd-hackers@freebsd.org, "Aryeh M. Friedman" Subject: Re: normal users calling setpriority(2) 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, 10 Apr 2008 14:07:31 -0000 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 08, 2008 at 10:02:03AM -0700, LI Xin wrote: > Aryeh M. Friedman wrote: > >Is it possible via sysctl or some other method to allow non-superusers= =20 > >to set any priority they want. The specific question is I often want= =20 > >to set idprio 31 on stuff but don't want to switch to root to do it (I= =20 > >am the only user on the machine). >=20 > No if nobody implement PRIV_SCHED_SETPRIORTY support for non-root. It's intentionally disabled to prevent deadlocks, see about line 330 of /usr/src/sys/kern/kern_resource.c: * Realtime priority has to be restricted for reasons which should be * obvious. However, for idle priority, there is a potential for * system deadlock if an idleprio process gains a lock on a resource * that other processes need (and the idleprio process can't run * due to a CPU-bound normal process). Fix me! XXX If you want to allow it (we've done so for years without any real trouble), simply change it to like: #if 1 if (RTP_PRIO_IS_REALTIME(rtp.type)) #else if (rtp.type !=3D RTP_PRIO_NORMAL) #endif { Marc --huq684BweRXVnRxX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFH/hpTezjnobFOgrERAmL3AKClVIu5/D6zIPvup75SswF6I1zprwCeOsIY WTURwp8SgrKAUeFXFGbBvos= =KOza -----END PGP SIGNATURE----- --huq684BweRXVnRxX-- From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 10 14:57:45 2008 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 336BF10656E4 for ; Thu, 10 Apr 2008 14:57:45 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.freebsd.org (Postfix) with ESMTP id CCA8B8FC19 for ; Thu, 10 Apr 2008 14:57:44 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms244.mailsrvcs.net ([172.18.12.134]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JZ400IYK6VHXJC1@vms046.mailsrvcs.net> for freebsd-hackers@freebsd.org; Thu, 10 Apr 2008 09:57:18 -0500 (CDT) Received: from 65.242.108.162 ([65.242.108.162]) by vms244.mailsrvcs.net (Verizon Webmail) with HTTP; Thu, 10 Apr 2008 09:57:16 -0500 (CDT) Date: Thu, 10 Apr 2008 09:57:16 -0500 (CDT) From: Sergey Babkin X-Originating-IP: [65.242.108.162] To: Dirk GOUDERS , yuri@rawbw.com Message-id: <31423336.5418911207839437687.JavaMail.root@vms244.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-Mailman-Approved-At: Thu, 10 Apr 2008 15:44:37 +0000 Cc: freebsd-hackers@freebsd.org, Ted Faber Subject: Re: Re: C++ exceptions are broken in FreeBSD with gcc-compiled code? 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, 10 Apr 2008 14:57:45 -0000 Oh, this reminded me of something I've seen before. In some version of GCC (3.96? 4.something?) if you declare a function with an explicit throw() declaration and then throw from it an exception that is not in the declaration, the exception never gets caught. It just goes all the way out. Any chance that this is one of these cases? I don't remember the exact details but it looked somewhat like this: void f() throw exception; voif f() { throw(string("zzz")); } main() { try { f(); } catch(exception e) { ... } catch (string s) { ... } } -SB > >> > It works fine for me too, using FreeBSD 6-stable and the built-in gcc >> > 3.4.6 >> > as well as with gcc 4.2.4 20080305 installed from ports. >> > No need to use -pthreads in either case >> >> This means that this issue is STABLE-7.0 specific. > >I am not able to reproduce the problem here; I will compile the >updated sources tonight to check if that changes anything: > ># uname -sr >FreeBSD 7.0-STABLE > ># g++ --version >g++ (GCC) 4.2.1 20070719 [FreeBSD] >Copyright (C) 2007 Free Software Foundation, Inc. >This is free software; see the source for copying conditions. There is NO >warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > ># cat exc.C > >#include >#include >using namespace std; > >int main() { > try { > throw string("String"); > } catch (string s) { > cout << "Caught an exception \"" << s << "\"\n"; > } >} > ># g++ -o exc exc.C ># ./exc >Caught an exception "String" >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 10 15:29:32 2008 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 91955106566B for ; Thu, 10 Apr 2008 15:29:32 +0000 (UTC) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from alice.et.bocholt.fh-gelsenkirchen.de (alice.et.bocholt.fh-gelsenkirchen.de [193.175.197.63]) by mx1.freebsd.org (Postfix) with ESMTP id D740F8FC26 for ; Thu, 10 Apr 2008 15:29:31 +0000 (UTC) (envelope-from gouders@et.bocholt.fh-gelsenkirchen.de) Received: from musashi.et.bocholt.fh-gelsenkirchen.de ([192.168.106.100]) by alice.et.bocholt.fh-gelsenkirchen.de (8.14.2/8.14.2) with ESMTP id m3AFJEAl022310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Apr 2008 17:19:14 +0200 X-DKIM: Sendmail DKIM Filter v2.4.0 alice.et.bocholt.fh-gelsenkirchen.de m3AFJEAl022310 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=et.bocholt.fh-gelsenkirchen.de; s=et; t=1207840755; bh=UQhiMu/8J1 uUW5uaGRDYD8oxW3uWDoDENO8HgSBrKoY=; h=Received:Subject:In-reply-to: References:Comments:X-Mailer:Date:Message-ID:From; b=CaC1nQcYQUjPf xZYS0cbPpvop+2XCf2v9d9MgrTRmUIERiXUE9RFy2hXqcmko9co0p+9JyPYzeMvurDl lRclafDMeTHq9InQk8CWEHJYJ2bxO6ERCpFaKhPcYXv9Ckf21e3hmPmF/OZhuddNU7n 4gQpDOw1ZirhV/SMwW7zx57w= Received: from localhost (localhost [127.0.0.1]) by musashi.et.bocholt.fh-gelsenkirchen.de (8.14.2/8.14.2) with ESMTP id m3AFInS8035598; Thu, 10 Apr 2008 17:18:49 +0200 (CEST) (envelope-from hank@musashi.et.bocholt.fh-gelsenkirchen.de) To: Sergey Babkin In-reply-to: <31423336.5418911207839437687.JavaMail.root@vms244.mailsrvcs.net> References: <31423336.5418911207839437687.JavaMail.root@vms244.mailsrvcs.net> Comments: In-reply-to Sergey Babkin message dated "Thu, 10 Apr 2008 09:57:16 -0500." X-Mailer: MH-E 8.0.3; nmh 1.2; GNU Emacs 22.1.1 Date: Thu, 10 Apr 2008 17:18:49 +0200 Message-ID: <35597.1207840729@musashi.et.bocholt.fh-gelsenkirchen.de> From: Dirk GOUDERS X-Spam-Status: No, score=-103.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, USER_IN_WHITELIST autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlin.ccamp.de X-Mailman-Approved-At: Thu, 10 Apr 2008 15:44:50 +0000 Cc: yuri@rawbw.com, Ted Faber , freebsd-hackers@freebsd.org Subject: Re: C++ exceptions are broken in FreeBSD with gcc-compiled code? 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, 10 Apr 2008 15:29:32 -0000 Oh, this mail reminds me... > >I am not able to reproduce the problem here; I will compile the > >updated sources tonight to check if that changes anything: ...that I forgot to report that I did a cvsup and rebuild the system (7.0-STABLE), tonight. That did not change anything: I am not able to reproduce Yuri's problem on my machine. Dirk From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 10 19:42:48 2008 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 F06B0106566B for ; Thu, 10 Apr 2008 19:42:48 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from heka.cenkes.org (heka.cenkes.org [208.79.80.110]) by mx1.freebsd.org (Postfix) with ESMTP id ABA748FC1C for ; Thu, 10 Apr 2008 19:42:48 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from amilo.cenkes.org (ppp85-140-149-151.pppoe.mtu-net.ru [85.140.149.151]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTPSA id B758B242F832 for ; Thu, 10 Apr 2008 23:25:57 +0400 (MSD) Date: Thu, 10 Apr 2008 23:25:54 +0400 From: Andrew Pantyukhin To: hackers@FreeBSD.org Message-ID: <20080410192552.GC81939@amilo.cenkes.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline X-OS: FreeBSD 8.0-CURRENT amd64 User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Subject: mtree acl [patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2008 19:42:49 -0000 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I was surprised to learn that ACL support in our mtree is limited to a shy mention here: http://www.freebsd.org/news/status/report-dec-2001-jan-2002.html#TrustedBSD-ACLs Would something like the patch attached be feasible? I can add support for default lists, maybe restoring, etc., if the overall idea does not seem wrong. Also here: http://heka.cenkes.org/sat/diffs/mtree_acl.diff Thanks for your time! --2oS5YaxWCcQjTEyO Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="mtree_acl.diff" Index: mtree/compare.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/compare.c,v retrieving revision 1.34 diff -u -r1.34 compare.c --- mtree/compare.c 29 Mar 2005 11:44:17 -0000 1.34 +++ mtree/compare.c 10 Apr 2008 19:13:42 -0000 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -315,6 +316,32 @@ } } #endif /* SHA256 */ + if (s->flags & F_ACL) { + char *new_acl_text; + acl_t acl; + size_t i; + + acl = acl_get_file(p->fts_accpath, ACL_TYPE_ACCESS); + new_acl_text = acl_to_text(acl, NULL); + for(i = 0; new_acl_text[++i] != '\0';){ + if (new_acl_text[i] == '\n') + new_acl_text[i] = ','; + } + new_acl_text[i-1] = '\0'; + if (!new_acl_text) { + LABEL; + printf("%sACL: %s: %s\n", tab, p->fts_accpath, + strerror(errno)); + tab = "\t"; + } else if (strcmp(new_acl_text, s->acl)) { + LABEL; + printf("%sACL expected %s found %s\n", + tab, s->acl, new_acl_text); + tab = "\t"; + } + acl_free(acl); + acl_free(new_acl_text); + } if (s->flags & F_SLINK && strcmp(cp = rlink(p->fts_accpath), s->slink)) { Index: mtree/create.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/create.c,v retrieving revision 1.37 diff -u -r1.37 create.c --- mtree/create.c 29 Mar 2005 11:44:17 -0000 1.37 +++ mtree/create.c 10 Apr 2008 19:13:42 -0000 @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -265,6 +266,24 @@ if (keys & F_SLINK && (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) output(indent, &offset, "link=%s", rlink(p->fts_accpath)); + if (keys & F_ACL) { + char *acl_text; + acl_t acl; + size_t i; + + acl = acl_get_file(p->fts_accpath, ACL_TYPE_ACCESS); + acl_text = acl_to_text(acl, NULL); + if (!acl_text) + err(1, "%s", p->fts_accpath); + for(i = 0; acl_text[++i] != '\0';){ + if (acl_text[i] == '\n') + acl_text[i] = ','; + } + acl_text[i-1] = '\0'; + output(indent, &offset, "acl=%s", acl_text); + acl_free(acl); + acl_free(acl_text); + } if (keys & F_FLAGS && p->fts_statp->st_flags != flags) { fflags = flags_to_string(p->fts_statp->st_flags); output(indent, &offset, "flags=%s", fflags); Index: mtree/misc.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/misc.c,v retrieving revision 1.17 diff -u -r1.17 misc.c --- mtree/misc.c 3 Jul 2006 10:55:21 -0000 1.17 +++ mtree/misc.c 10 Apr 2008 19:13:42 -0000 @@ -54,6 +54,7 @@ /* NB: the following table must be sorted lexically. */ static KEY keylist[] = { + {"acl", F_ACL, NEEDVALUE}, {"cksum", F_CKSUM, NEEDVALUE}, {"flags", F_FLAGS, NEEDVALUE}, {"gid", F_GID, NEEDVALUE}, Index: mtree/mtree.5 =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/mtree.5,v retrieving revision 1.1 diff -u -r1.1 mtree.5 --- mtree/mtree.5 1 Jan 2008 06:15:57 -0000 1.1 +++ mtree/mtree.5 10 Apr 2008 19:13:42 -0000 @@ -184,6 +184,8 @@ .It Cm rmd160digest A synonym for .Cm ripemd160digest . +.It Cm acl +The current file's access control list in text format. .It Cm mode The current file's permissions as a numeric (octal) or symbolic value. Index: mtree/mtree.8 =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/mtree.8,v retrieving revision 1.56 diff -u -r1.56 mtree.8 --- mtree/mtree.8 16 Jun 2007 08:26:00 -0000 1.56 +++ mtree/mtree.8 10 Apr 2008 19:13:42 -0000 @@ -214,6 +214,8 @@ The .Tn RIPEMD160 message digest of the file. +.It Cm acl +The current file's access control list in text format. .It Cm mode The current file's permissions as a numeric (octal) or symbolic value. Index: mtree/mtree.h =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/mtree.h,v retrieving revision 1.8 diff -u -r1.8 mtree.h --- mtree/mtree.h 3 Jul 2006 10:55:21 -0000 1.8 +++ mtree/mtree.h 10 Apr 2008 19:13:42 -0000 @@ -49,6 +49,7 @@ char *sha256digest; /* SHA-256 digest */ char *rmd160digest; /* RIPEMD160 digest */ char *slink; /* symbolic link reference */ + char *acl; /* Access Control List */ uid_t st_uid; /* uid */ gid_t st_gid; /* gid */ #define MBITS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO) @@ -79,6 +80,7 @@ #define F_FLAGS 0x80000 /* file flags */ #define F_SHA256 0x100000 /* SHA-256 digest */ #define F_OPT 0x200000 /* existence optional */ +#define F_ACL 0x400000 /* SHA-256 digest */ u_int flags; /* items set */ #define F_BLOCK 0x001 /* block special */ Index: mtree/spec.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/spec.c,v retrieving revision 1.23 diff -u -r1.23 spec.c --- mtree/spec.c 3 Jul 2006 10:55:21 -0000 1.23 +++ mtree/spec.c 10 Apr 2008 19:13:42 -0000 @@ -210,6 +210,11 @@ else if (strtofflags(&val, &ip->st_flags, NULL) != 0) errx(1, "line %d: invalid flag %s",lineno, val); break; + case F_ACL: + ip->acl = strdup(val); + if(!ip->acl) + errx(1, "strdup"); + break; case F_GID: ip->st_gid = strtoul(val, &ep, 10); if (*ep) Index: mtree/specspec.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/specspec.c,v retrieving revision 1.6 diff -u -r1.6 specspec.c --- mtree/specspec.c 29 Mar 2005 11:44:17 -0000 1.6 +++ mtree/specspec.c 10 Apr 2008 19:13:42 -0000 @@ -84,6 +84,8 @@ printf(" rmd160digest=%s", n->rmd160digest); if (f & F_SHA256) printf(" sha256digest=%s", n->sha256digest); + if (f & F_ACL) + printf(" acl=%s", n->acl); if (f & F_FLAGS) printf(" flags=%s", flags_to_string(n->st_flags)); printf("\n"); Index: mtree/test/test03.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/mtree/test/test03.sh,v retrieving revision 1.2 diff -u -r1.2 test03.sh --- mtree/test/test03.sh 29 Mar 2005 11:44:17 -0000 1.2 +++ mtree/test/test03.sh 10 Apr 2008 19:13:42 -0000 @@ -15,7 +15,7 @@ rm -rf ${TMP} mkdir -p ${TMP} -K=uid,uname,gid,gname,flags,md5digest,size,ripemd160digest,sha1digest,sha256digest,cksum +K=uid,uname,gid,gname,flags,md5digest,size,ripemd160digest,sha1digest,sha256digest,acl,cksum rm -rf _FOO mkdir _FOO --2oS5YaxWCcQjTEyO-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 11 05:23:10 2008 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 89451106564A; Fri, 11 Apr 2008 05:23:10 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from heka.cenkes.org (heka.cenkes.org [208.79.80.110]) by mx1.freebsd.org (Postfix) with ESMTP id 690108FC18; Fri, 11 Apr 2008 05:23:10 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from amilo.cenkes.org (ppp85-140-149-151.pppoe.mtu-net.ru [85.140.149.151]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTPSA id A0099242F886; Fri, 11 Apr 2008 09:23:08 +0400 (MSD) Date: Fri, 11 Apr 2008 09:23:06 +0400 From: Andrew Pantyukhin To: Tim Kientzle Message-ID: <20080411052305.GE81939@amilo.cenkes.org> References: <20080410192552.GC81939@amilo.cenkes.org> <47FEF166.6060606@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47FEF166.6060606@freebsd.org> X-OS: FreeBSD 8.0-CURRENT amd64 User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org Subject: Re: mtree acl [patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2008 05:23:10 -0000 On Thu, Apr 10, 2008 at 10:04:38PM -0700, Tim Kientzle wrote: > Andrew Pantyukhin wrote: >> ... ACL support in our mtree ... >> Also here: http://heka.cenkes.org/sat/diffs/mtree_acl.diff > > Could you give an example of a short mtree file that includes ACLs? > > I see a few minor style issues (tag names should be sorted on > the mtree.5 and mtree.8 man pages, you need to correct a comment > that got duplicated in mtree.h), but the idea looks right. Thanks for taking a look, I corrected the things you pointed out. Here, the parent dir and "file" have ACLs, "kk" doesn't. I considered "acl=none" for ACL-less files, but I think it'll produce more problems than use cases. # user: sat # machine: amilo.cenkes.org # tree: /usr/home/sat/bsdevel/src/usr.sbin/mtree/tt # date: Fri Apr 11 09:12:43 2008 # . /set type=file . type=dir \ acl=user::rwx,user:root:rwx,group::r-x,mask::rwx,other::r-x file acl=user::rw-,group::r--,group:wheel:rwx,mask::rwx,other::r-- kk acl=user::rw-,group::r--,other::r-- .. From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 11 05:26:54 2008 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 5E332106566C for ; Fri, 11 Apr 2008 05:26:54 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 2D6198FC16 for ; Fri, 11 Apr 2008 05:26:54 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.128] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id m3B54ctv034169; Thu, 10 Apr 2008 22:04:38 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <47FEF166.6060606@freebsd.org> Date: Thu, 10 Apr 2008 22:04:38 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: infofarmer@freebsd.org References: <20080410192552.GC81939@amilo.cenkes.org> In-Reply-To: <20080410192552.GC81939@amilo.cenkes.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: mtree acl [patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2008 05:26:54 -0000 Andrew Pantyukhin wrote: > ... ACL support in our mtree ... > Also here: http://heka.cenkes.org/sat/diffs/mtree_acl.diff Could you give an example of a short mtree file that includes ACLs? I see a few minor style issues (tag names should be sorted on the mtree.5 and mtree.8 man pages, you need to correct a comment that got duplicated in mtree.h), but the idea looks right. Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 04:14:07 2008 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 8E9F61065673 for ; Sat, 12 Apr 2008 04:14:07 +0000 (UTC) (envelope-from shase@andrew.cmu.edu) Received: from smtp.andrew.cmu.edu (SMTP.andrew.cmu.edu [128.2.10.212]) by mx1.freebsd.org (Postfix) with ESMTP id 53DCB8FC1D for ; Sat, 12 Apr 2008 04:14:07 +0000 (UTC) (envelope-from shase@andrew.cmu.edu) Received: from [128.237.229.163] (CMU-201361.WV.CC.CMU.EDU [128.237.229.163]) (user=shase mech=PLAIN (0 bits)) by smtp.andrew.cmu.edu (8.13.8/8.13.8) with ESMTP id m3C4E6Jx023631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 12 Apr 2008 00:14:06 -0400 Message-ID: <48003712.9020507@andrew.cmu.edu> Date: Sat, 12 Apr 2008 00:14:10 -0400 From: sanket hase User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.60 on 128.2.10.212 Subject: freebsd/xen: pcifront: bypass irq routing on guest 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, 12 Apr 2008 04:14:07 -0000 Hi, I want to disable irq routing table on guest-OS ( freebsd domU )so that it can contact host OS to get interrupts. Can anyone tell me , how irq routing on x86 is done in freebsd. I want to "bypass/disable" that function or rather replace it with some of my routine which makes guest os conatct host os (dom0 ) Can you please tell me where exactly this code/interface resides? Thanks, Sanket From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 05:09:56 2008 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 D4937106564A; Sat, 12 Apr 2008 05:09:56 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id C4F828FC20; Sat, 12 Apr 2008 05:09:56 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.128] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id m3C59utv041448; Fri, 11 Apr 2008 22:09:56 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <48004424.3080403@freebsd.org> Date: Fri, 11 Apr 2008 22:09:56 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: infofarmer@freebsd.org References: <20080410192552.GC81939@amilo.cenkes.org> <47FEF166.6060606@freebsd.org> <20080411052305.GE81939@amilo.cenkes.org> In-Reply-To: <20080411052305.GE81939@amilo.cenkes.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: mtree acl [patch] 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, 12 Apr 2008 05:09:56 -0000 >>Could you give an example of a short mtree file that includes ACLs? > > Here, the parent dir and "file" have ACLs, "kk" doesn't. I > considered "acl=none" for ACL-less files, but I think it'll > produce more problems than use cases. > > # . > /set type=file > . type=dir \ > acl=user::rwx,user:root:rwx,group::r-x,mask::rwx,other::r-x > file acl=user::rw-,group::r--,group:wheel:rwx,mask::rwx,other::r-- > kk acl=user::rw-,group::r--,other::r-- > .. 'kk' here should not have an 'acl' keyword at all. Just omit it. If someone specifies 'acl' keyword and not 'mode' keyword, then its because they only want to see extended ACL information. Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 05:38:13 2008 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 C58A4106564A for ; Sat, 12 Apr 2008 05:38:13 +0000 (UTC) (envelope-from lordbyte@esperanza.rebooten.de) Received: from esperanza.rebooten.de (esperanza.rebooten.de [83.136.81.141]) by mx1.freebsd.org (Postfix) with ESMTP id 773FC8FC15 for ; Sat, 12 Apr 2008 05:38:12 +0000 (UTC) (envelope-from lordbyte@esperanza.rebooten.de) Received: from esperanza.rebooten.de (esperanza.rebooten.de [83.136.81.141]) by esperanza.rebooten.de (8.13.8/8.13.8) with ESMTP id m3C5FaIj037303 for ; Sat, 12 Apr 2008 07:15:36 +0200 (CEST) (envelope-from lordbyte@esperanza.rebooten.de) Received: (from lordbyte@localhost) by esperanza.rebooten.de (8.13.8/8.13.8/Submit) id m3C5Fask037301 for hackers@freebsd.org; Sat, 12 Apr 2008 07:15:36 +0200 (CEST) (envelope-from lordbyte) Date: Sat, 12 Apr 2008 07:15:36 +0200 From: Markus Boelter To: hackers@freebsd.org Message-ID: <20080412051535.GC36035@rebooten.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: www.FreeBSD.org IPv6 broken? 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, 12 Apr 2008 05:38:13 -0000 Hi! Is the ipv6 routing to www.FreeBSD.org broken? This traceroute6 is from a Comcast cablemodem line in Santa Clara, CA. traceroute6 to www.freebsd.org (2001:4f8:fff6::21) from 2002:4c67:29ce::216:cbff:fead:95f9, 30 hops max, 12 byte packets 1 2002:4c67:29ce::21b:63ff:fef5:89a1 1.938 ms 0.422 ms 0.31 ms 2 2002:c058:6301:: 70.306 ms 73.252 ms 71.707 ms 3 stf.ge-1.3.0-33.core1.chi.bb6.your.org 72.595 ms 70.735 ms 71.919 ms 4 ge-0-0-1-107.cr1.ord1.us.nlayer.net 71.992 ms 70.133 ms 81.845 ms 5 xe-2-1-0.cr1.ord1.us.nlayer.net 69.469 ms 86.334 ms 71.393 ms 6 xe-2-1-0.cr2.iad1.us.nlayer.net 93.72 ms 89.703 ms 90.785 ms 7 xe-0.equinix.asbnva01.us.bb.gin.ntt.net 94.846 ms 98.588 ms 96.885 ms 8 ae-0.r20.asbnva01.us.bb.gin.ntt.net 102.865 ms 95.485 ms 95.3 ms 9 as-0.r20.snjsca04.us.bb.gin.ntt.net 173.125 ms 164.067 ms 196.141 ms 10 ae-1.r21.plalca01.us.bb.gin.ntt.net 170.93 ms 170.291 ms 161.528 ms 11 xe-3-4.r03.plalca01.us.bb.gin.ntt.net 174.246 ms 187.715 ms 179.749 ms 12 * * * ^C Cheers Markus -- Markus Boelter From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 10:38:35 2008 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 26760106566B for ; Sat, 12 Apr 2008 10:38:35 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id DE5D98FC12 for ; Sat, 12 Apr 2008 10:38:34 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 4CB7267C4D3 for ; Sat, 12 Apr 2008 12:19:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UcLevZ+bPCHD for ; Sat, 12 Apr 2008 12:19:01 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 74EB967C4D1 for ; Sat, 12 Apr 2008 12:19:01 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m3CAJ1RU090510 for hackers@freebsd.org; Sat, 12 Apr 2008 12:19:01 +0200 (CEST) (envelope-from rdivacky) Date: Sat, 12 Apr 2008 12:19:01 +0200 From: Roman Divacky To: hackers@freebsd.org Message-ID: <20080412101901.GA90214@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: use of MAXPATHLEN in kernel 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, 12 Apr 2008 10:38:35 -0000 --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi there's an awfully lot of code like char foo[MAXPATHLEN]; in the kernel. either in functions (ie. allocated on stack during runtime) or global variables. Most of the usage is without a good reason and only wastes space. should we do something about it? maybe an idea in projects/ideas webpage? thnx roman --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkgAjJUACgkQLVEj6D3CBEwycACeP+BxV36EzsVTUGXwmFmq1Y4S CO4An2Fh+V+j95XQownLBK6xujKOPS3X =U5Vm -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6-- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 06:33:16 2008 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 B8C471065670; Sat, 12 Apr 2008 06:33:16 +0000 (UTC) (envelope-from toasty@dragondata.com) Received: from tokyo01.jp.mail.your.org (tokyo01.jp.mail.your.org [204.9.54.5]) by mx1.freebsd.org (Postfix) with ESMTP id 75CDF8FC1D; Sat, 12 Apr 2008 06:33:16 +0000 (UTC) (envelope-from toasty@dragondata.com) Received: from mail.your.org (server3-a.your.org [64.202.112.67]) by tokyo01.jp.mail.your.org (Postfix) with ESMTP id 09D6E2AD57DB; Sat, 12 Apr 2008 06:02:16 +0000 (UTC) Received: from pool011.dhcp.your.org (pool011.dhcp.your.org [69.31.99.11]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.your.org (Postfix) with ESMTP id 52BEFA0A44E; Sat, 12 Apr 2008 06:02:15 +0000 (UTC) Message-Id: <883CE4E8-4B70-4C56-9F1B-A6BCE67D85B5@dragondata.com> From: Kevin Day To: Markus Boelter In-Reply-To: <20080412051535.GC36035@rebooten.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sat, 12 Apr 2008 01:02:14 -0500 References: <20080412051535.GC36035@rebooten.de> X-Mailer: Apple Mail (2.919.2) X-Mailman-Approved-At: Sat, 12 Apr 2008 11:14:24 +0000 Cc: hackers@freebsd.org Subject: Re: www.FreeBSD.org IPv6 broken? 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, 12 Apr 2008 06:33:16 -0000 On Apr 12, 2008, at 12:15 AM, Markus Boelter wrote: > Hi! > > Is the ipv6 routing to www.FreeBSD.org broken? This traceroute6 is > from a > Comcast cablemodem line in Santa Clara, CA. > > traceroute6 to www.freebsd.org (2001:4f8:fff6::21) from > 2002:4c67:29ce::216:cbff:fead:95f9, 30 hops max, 12 byte packets > 1 2002:4c67:29ce::21b:63ff:fef5:89a1 1.938 ms 0.422 ms 0.31 ms > 2 2002:c058:6301:: 70.306 ms 73.252 ms 71.707 ms > 3 stf.ge-1.3.0-33.core1.chi.bb6.your.org 72.595 ms 70.735 ms > 71.919 ms > 4 ge-0-0-1-107.cr1.ord1.us.nlayer.net 71.992 ms 70.133 ms 81.845 > ms > 5 xe-2-1-0.cr1.ord1.us.nlayer.net 69.469 ms 86.334 ms 71.393 ms > 6 xe-2-1-0.cr2.iad1.us.nlayer.net 93.72 ms 89.703 ms 90.785 ms > 7 xe-0.equinix.asbnva01.us.bb.gin.ntt.net 94.846 ms 98.588 ms > 96.885 ms > 8 ae-0.r20.asbnva01.us.bb.gin.ntt.net 102.865 ms 95.485 ms 95.3 ms > 9 as-0.r20.snjsca04.us.bb.gin.ntt.net 173.125 ms 164.067 ms > 196.141 ms > 10 ae-1.r21.plalca01.us.bb.gin.ntt.net 170.93 ms 170.291 ms > 161.528 ms > 11 xe-3-4.r03.plalca01.us.bb.gin.ntt.net 174.246 ms 187.715 ms > 179.749 ms > 12 * * * > ^C I'm with your.org, the 6to4 relay provider you're using there. There looks like there might be a MTU problem there possibly too... 12 byte packets work for me: traceroute6 to 2001:4f8:fff6::21 (2001:4f8:fff6::21) from 2001:4978:1:410:207:e9ff:fe13:5c82, 64 hops max, 12 byte packets 1 stf.ge-1.3.0-33.core1.chi.bb6.your.org 0.642 ms 0.498 ms 0.438 ms 2 ge-0-0-1-107.cr1.ord1.us.nlayer.net 0.519 ms 0.421 ms 0.399 ms 3 xe-2-1-0.cr1.ord1.us.nlayer.net 0.494 ms 0.431 ms 0.394 ms 4 xe-2-1-0.cr2.iad1.us.nlayer.net 56.583 ms 18.452 ms 18.444 ms 5 xe-0.equinix.asbnva01.us.bb.gin.ntt.net 23.696 ms 23.796 ms 31.787 ms 6 ae-0.r20.asbnva01.us.bb.gin.ntt.net 23.825 ms 23.790 ms 23.865 ms 7 as-0.r20.snjsca04.us.bb.gin.ntt.net 78.954 ms 78.748 ms 84.759 ms 8 ae-1.r21.plalca01.us.bb.gin.ntt.net 77.244 ms 71.859 ms 71.898 ms 9 xe-3-4.r03.plalca01.us.bb.gin.ntt.net 111.361 ms 167.676 ms 92.019 ms 10 ge-0.isc.plalca01.us.bb.gin.ntt.net 164.071 ms 203.144 ms 208.322 ms 11 gig-2-1-0.r7.pao1.isc.org 77.275 ms 77.120 ms 77.144 ms 12 ipv6gw-isc.freebsd.org 78.388 ms 78.822 ms 73.404 ms 13 www.freebsd.org 78.649 ms 78.716 ms 73.372 ms but 1400 byte packets don't: traceroute6 to 2001:4f8:fff6::21 (2001:4f8:fff6::21) from 2001:4978:1:410:207:e9ff:fe13:5c82, 64 hops max, 1400 byte packets 1 stf.ge-1.3.0-33.core1.chi.bb6.your.org 6.110 ms 0.984 ms 1.003 ms 2 ge-0-0-1-107.cr1.ord1.us.nlayer.net 0.974 ms 0.893 ms 0.833 ms 3 xe-2-1-0.cr1.ord1.us.nlayer.net 0.516 ms 0.453 ms 0.442 ms 4 xe-2-1-0.cr2.iad1.us.nlayer.net 18.559 ms 18.649 ms 18.588 ms 5 xe-0.equinix.asbnva01.us.bb.gin.ntt.net 24.361 ms 24.249 ms 24.193 ms 6 ae-0.r20.asbnva01.us.bb.gin.ntt.net 24.309 ms 24.405 ms 24.463 ms 7 as-0.r20.snjsca04.us.bb.gin.ntt.net 74.135 ms 79.199 ms 74.157 ms 8 ae-1.r21.plalca01.us.bb.gin.ntt.net 72.514 ms 77.348 ms 77.665 ms 9 xe-3-4.r03.plalca01.us.bb.gin.ntt.net 77.567 ms 77.494 ms 77.521 ms 10 ge-0.isc.plalca01.us.bb.gin.ntt.net 71.997 ms * 77.345 ms 11 gig-2-1-0.r7.pao1.isc.org 100.200 ms 72.491 ms 77.545 ms 12 * * * 13 * * * Even if I force our router to take a different path, it's no better: traceroute6 to 2001:4f8:fff6::21 (2001:4f8:fff6::21) from 2001:4978:1:410:207:e9ff:fe13:5c82, 64 hops max, 1400 byte packets 1 stf.ge-1.3.0-33.core1.chi.bb6.your.org 1.204 ms 1.052 ms 0.952 ms 2 2001:470:0:7f::1 2.728 ms 0.593 ms 0.527 ms 3 10g-3-2.core1.sjc2.ipv6.he.net 58.063 ms 58.138 ms 58.017 ms 4 10g-3-2.core1.pao1.ipv6.he.net 58.649 ms 58.773 ms 58.782 ms 5 he.pao1.isc.org 58.883 ms 58.779 ms * 6 gig-2-1-0.r7.pao1.isc.org 59.597 ms 59.443 ms 59.497 ms 7 * * * 8 * * * Since 6to4 is asymmetrical, I'm guessing the problem is the route back to 2002::/16 (6to4) from within ISC's network. I'll open a ticket with ISC and see if we can figure out what the problem is together. -- Kevin your.org From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 14:46:38 2008 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 C07D4106566B for ; Sat, 12 Apr 2008 14:46:38 +0000 (UTC) (envelope-from anishbabu.m@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.244]) by mx1.freebsd.org (Postfix) with ESMTP id 7E94C8FC1A for ; Sat, 12 Apr 2008 14:46:38 +0000 (UTC) (envelope-from anishbabu.m@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so246189anc.13 for ; Sat, 12 Apr 2008 07:46:37 -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:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=LEeW4vgK5nny7WZol5975imTFzX8H+SfDWqzpLl642I=; b=l1ooJNJUs4fM+3l03Bl02slET66/nWteew58YT2RHQJG5AHY3Me29FJB2vzeLDlKnBDrc9fVx9dWMzlhsdV6zAoMGWS+wk2Hsi/EzSk7DbNynWbrPbQcVaOsJQxK9V0LZt68UhXOypNYSlbwtnpQAewTfCha+xCFUCqU5IpD3rg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=d+Qpkbqxg94yWy8urxYiBrCUEDU2734Bo/cS09aypzd5j9dWczBiyylFKoWD+IAwdanqoH73yX0fAhERCkBZ17M4MgpJvoeD3S9xgFpJ2UwZYU0Bi631u8qll75E5gJOlc2RE9YmRO5eujMOVzCF3E/riTEq51UkkLMjaC5fvbc= Received: by 10.100.107.7 with SMTP id f7mr7921895anc.16.1208010088516; Sat, 12 Apr 2008 07:21:28 -0700 (PDT) Received: by 10.100.135.4 with HTTP; Sat, 12 Apr 2008 07:21:28 -0700 (PDT) Message-ID: <1a31da330804120721t3a4976c3hfe732fe8357cf2f8@mail.gmail.com> Date: Sat, 12 Apr 2008 09:21:28 -0500 From: "anish babu" To: hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mailman-Approved-At: Sat, 12 Apr 2008 15:22:32 +0000 Cc: Subject: GSoc 2008 project proposal.. please suggest any uncovered details 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, 12 Apr 2008 14:46:38 -0000 Hi all, My name is Anish and I am a graduate student at Texas A&M University , college station. I made a proposal for GSoC 2008 and the description is as follows. Title: "Passive libpcap based TCP session anomaly detector" ----- Abstract: ----------- A daemon to listen on a network interface and logs the anomalies in connection is to be designed. If there are no anomalies, then normal session information like sequence numbers, acknowledgment numbers, SYN features etc, are logged to understand the behavior of connection. In case of anomalies, like duplicate packets, duplicate acknowledgments, SACK responses, out of order segments etc... then it logs the packet headers into the tcpdump file for later analysis by tools like wireshark. This tool helps in analyzing various TCP algorithms in real practice on internet instead of abstract theoretical explanations. Proposal: ----------- Steps to capture packets using lippcap library: 1) Open an interface 2) Open the device for capturing packets: 3)Apply filters to capture only TCP packets: 4)Collect a set of 'count' packets and apply a call back function for each of the pakcet. We now have the packet in the u_char* packet variable of the callback function. If we we are accessing TCP/IP packets on an Ethernet, then we have ethernet, IP. TCP headers in order at the start of packet. So, we have to strip ethernet headers and IP headers in order to access TCP headers. All of the main processing is done in call back function. Assumptions ( for the below solution): ------------------------------------------- 1)Before this, I have a few doubts regarding sliding window protocol working. Is there a any way to access the 'Last byte Read by application', 'Next Byte Expected', 'Last Byte received' values from our function? I assume that we can somehow know these values. 2)We are maintaining seperate statistics for each session indicated by (dest.port, dest.IP, Source.port, Source.IP) pair. However, if we are collecting statistics on a single machine, (dest.port, source.port) pair is enough to uniquely track each session. 3) That the transmit and receive side buffers are linear. however below ideas can be easily extended if they are circular. On Receiving side: a) Duplicate packets: Maintain a bit array of size ('Last Byte read' - 'Next Byte Expected'). If any packet with sequence numbers in this range is found , set the bit to 1 if already 0. Otherwise, increment the counter of duplicate packets. If any packet with sequence number less that 'Next byte Expected' is found, then just the increment the counter of duplicate packets. b) Out of order segments : For every packet, if the sequence number is less than the 'Last Byte Received' that means that this is an out of order packet. So increase the counter for this session. Sending side: c) Duplicate Acknowledgements: Use the 'Last Byte Acknowledged' pointer of sliding window to track until howmany bytes were acknowledged and check with this for all incoming ACK packets. Lesser ACK in new packet means this is duplicate ACk packet and increment the counter for this session. d) SACK responses: ( I think this is not necessary when we are maintaining statistic for out of order packets on receiving side. What you say? ) we can use the SACK packets ( if both sides agree to use SACK option) to track how many packets are reaching the receiver out of order. Use the log details stored in Header for the start and end of non-contiguous bytes reached to receiver. All of the above statistics are collected for each individual session. We can apped the details even if the session incarnates( begins again). Produce summarized results for easy understanding. More detailed description is can b From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 14:50:59 2008 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 D7EFA1065671 for ; Sat, 12 Apr 2008 14:50:59 +0000 (UTC) (envelope-from anishbabu.m@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 949AE8FC1A for ; Sat, 12 Apr 2008 14:50:59 +0000 (UTC) (envelope-from anishbabu.m@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so246560anc.13 for ; Sat, 12 Apr 2008 07:50:59 -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:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=lIaULRLQrIC1v2NoA3jBynmkioLNwruGjyr9vr1rCVM=; b=h+P6OIa4UMMkJXIVXhwxotXO1hdJ1sNc4hQR6UNPnnylVJHioQx/Dl0ae7oZpPo96qitwAr4oGlTfXtP1BTiuMG3t1fuxZngA3y8D15STEwg3YWQARhmBOspi4mgzjtZNP64iTuE/VBaQDSOoBti15r9StZ1W9TnODwQwS+uGUk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=moyN1GWkh+fD6eEM09VvbQiZ/bXvfiMEDvuc3XinpGjKAtmWoj4AzU10SL27bRpJznSHsPF9VrYHJa+/Ck+8QXo1kpbiEt2Q0PQIa3uD0pFLBRjyy6WA/qr2h3hB50EShWWKbRVRHrD/51lddSSQLjHYwKa2ddswS3zfUJuHHFQ= Received: by 10.100.173.9 with SMTP id v9mr1254436ane.150.1208010207691; Sat, 12 Apr 2008 07:23:27 -0700 (PDT) Received: by 10.100.135.4 with HTTP; Sat, 12 Apr 2008 07:23:27 -0700 (PDT) Message-ID: <1a31da330804120723k35981ff4wfa86af826e67d5f4@mail.gmail.com> Date: Sat, 12 Apr 2008 09:23:27 -0500 From: "anish babu" To: hackers@freebsd.org In-Reply-To: <1a31da330804120721t3a4976c3hfe732fe8357cf2f8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1a31da330804120721t3a4976c3hfe732fe8357cf2f8@mail.gmail.com> X-Mailman-Approved-At: Sat, 12 Apr 2008 16:02:36 +0000 Cc: Subject: Re: GSoc 2008 project proposal.. please suggest any uncovered details 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, 12 Apr 2008 14:50:59 -0000 Sorry for my multiple mails.. previous mail was sent acidentally with out complete details. Hi all, My name is Anish and I am a graduate student at Texas A&M University , college station. I made a proposal for GSoC 2008 and the description is as follows. Title: "Passive libpcap based TCP session anomaly detector" ----- Abstract: ----------- A daemon to listen on a network interface and logs the anomalies in connection is to be designed. If there are no anomalies, then normal session information like sequence numbers, acknowledgment numbers, SYN features etc, are logged to understand the behavior of connection. In case of anomalies, like duplicate packets, duplicate acknowledgments, SACK responses, out of order segments etc... then it logs the packet headers into the tcpdump file for later analysis by tools like wireshark. This tool helps in analyzing various TCP algorithms in real practice on internet instead of abstract theoretical explanations. Proposal: ----------- Steps to capture packets using lippcap library: 1) Open an interface 2) Open the device for capturing packets: 3)Apply filters to capture only TCP packets: 4)Collect a set of 'count' packets and apply a call back function for each of the pakcet. We now have the packet in the u_char* packet variable of the callback function. If we we are accessing TCP/IP packets on an Ethernet, then we have ethernet, IP. TCP headers in order at the start of packet. So, we have to strip ethernet headers and IP headers in order to access TCP headers. All of the main processing is done in call back function. Assumptions ( for the below solution): ------------------------------------------- 1)Before this, I have a few doubts regarding sliding window protocol working. Is there a any way to access the 'Last byte Read by application', 'Next Byte Expected', 'Last Byte received' values from our function? I assume that we can somehow know these values. 2)We are maintaining seperate statistics for each session indicated by (dest.port, dest.IP, Source.port, Source.IP) pair. However, if we are collecting statistics on a single machine, (dest.port, source.port) pair is enough to uniquely track each session. 3) That the transmit and receive side buffers are linear. however below ideas can be easily extended if they are circular. On Receiving side: a) Duplicate packets: Maintain a bit array of size ('Last Byte read' - 'Next Byte Expected'). If any packet with sequence numbers in this range is found , set the bit to 1 if already 0. Otherwise, increment the counter of duplicate packets. If any packet with sequence number less that 'Next byte Expected' is found, then just the increment the counter of duplicate packets. b) Out of order segments : For every packet, if the sequence number is less than the 'Last Byte Received' that means that this is an out of order packet. So increase the counter for this session. Sending side: c) Duplicate Acknowledgements: Use the 'Last Byte Acknowledged' pointer of sliding window to track until howmany bytes were acknowledged and check with this for all incoming ACK packets. Lesser ACK in new packet means this is duplicate ACk packet and increment the counter for this session. d) SACK responses: ( I think this is not necessary when we are maintaining statistic for out of order packets on receiving side. What you say? ) we can use the SACK packets ( if both sides agree to use SACK option) to track how many packets are reaching the receiver out of order. Use the log details stored in Header for the start and end of non-contiguous bytes reached to receiver. All of the above statistics are collected for each individual session. We can apped the details even if the session incarnates( begins again). Produce summarized results for easy understanding. More detailed description is can be found in my application in GSoC 2008. Please feel free to ask me for any further details. Thanks, Anish From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 20:50:42 2008 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 7587B1065684; Sat, 12 Apr 2008 20:50:42 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3404D8FC12; Sat, 12 Apr 2008 20:50:42 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.14.1/8.14.1) with ESMTP id m3CKdrSP065293; Sat, 12 Apr 2008 13:39:53 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.14.1/8.13.4/Submit) id m3CKdrPJ065292; Sat, 12 Apr 2008 13:39:53 -0700 (PDT) Date: Sat, 12 Apr 2008 13:39:53 -0700 (PDT) From: Matthew Dillon Message-Id: <200804122039.m3CKdrPJ065292@apollo.backplane.com> To: Jonathan Chen References: <20080309212441.GA56523@porthos.spock.org> Cc: hackers@freebsd.org Subject: Re: mlock & COW 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, 12 Apr 2008 20:50:42 -0000 :I've been battling with a bug related to mlock and COW pages. Since I'm :basically clueless when it comes to the VM subsystem, I was hoping someone :with more clue can look at my fix and let me know if I'm doing the right :thing here. : :The problem: User programs will crash (SEGV/BUS) if COW pages become :writable after the pages are mlocked. This happens if shared libraries is :loaded in a program after a call to mlockall(MCL_FUTURE), and can be seen :with amd and ntpd when nss_ldap is used in the system. Included at the end :of this message is a sample program that demonstrates the problem. : :The "solution": Forcibly wire the page via vm_fault_wire() when the page :protection bits are changed. This seems to make the problem disappear, but :I'm not sure if causing a fault on vm_map_protect() is a good thing to do. :Am I correct in thinking vm_fault_wire() will cause the COW page to be :copied immediately? I think this is the right thing to do, given the page :is supposed to be wired, but I'm not sure if somewhere in the vm fault :routines might be a better place to put the fix. I'm also not sure what :the last argument to vm_fault_wire() (fictitious) means, I just copied the :argument from another invocation. My patch (against 7-STABLE) is included :below. : :I'll commit this if someone blesses the fix as the right thing. : : :Index: sys/vm/vm_map.c :=================================================================== :RCS file: /home/ncvs/src/sys/vm/vm_map.c,v :retrieving revision 1.388.2.3 :diff -u -p -r1.388.2.3 vm_map.c :--- sys/vm/vm_map.c 18 Jan 2008 10:02:53 -0000 1.388.2.3 :+++ sys/vm/vm_map.c 9 Mar 2008 20:55:50 -0000 :@@ -1621,6 +1621,15 @@ vm_map_protect(vm_map_t map, vm_offset_t : current->end, : current->protection & MASK(current)); : #undef MASK :+ if ((entry->eflags & :+ (MAP_ENTRY_USER_WIRED|MAP_ENTRY_COW)) == :+ (MAP_ENTRY_USER_WIRED|MAP_ENTRY_COW)) { :+ vm_fault_wire(map, current->start, :+ current->end, TRUE, :+ entry->object.vm_object != NULL && :+ entry->object.vm_object->type == :+ OBJT_DEVICE); :+ } : } : vm_map_simplify_entry(map, current); : current = current->next; Hmm. mlock() will COW pages in writeable maps before locking the pages, so you are on the right track with regards to what to do if a read-only map is locked first, and then made writeable later. Here's mlock's flow: mlock() calls vm_map_wire(): * lookup entry * mark entry in transition * bump entry wired count * unlock map * vm_fault_wire <--- this does the COW * relock map vm_map_protect's flow: * lookup entry [ entry not marked in transition ] * adjust pmap protections (if COW forces read-only) [ This is where your patch currently is ] I don't think your patch is going to work as-is. The pages are already wired read-only at this point in your bug reproduction sequence: * mmap * protect read-only * mlock * protect read-write <----- this point pages already wired RO * modify memory Here are some likely issues: * You can't issue the vm_fault_wire() unless the entry is marked in-transition, otherwise the entry can get ripped out from under you. * When you call vm_fault_wire() it will COW the page, but the *ORIGINAL* read-only page will still have been marked wired and will probably wind up being out of sync with the related map entries. I don't think vm_fault_wire() was designed to deal with that situation so its likely you will get a wiring leak. I think your only choice is to first do a wholesale unwiring of the pages (equivalent to munlock()), and then re-lock them after the protection change. It should be possible to do this from inside vm_map_protect() as long as you properly handle the vm_map_entry. -Matt Matthew Dillon From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 21:56:51 2008 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 61FF2106566C; Sat, 12 Apr 2008 21:56:51 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 2A68C8FC1D; Sat, 12 Apr 2008 21:56:51 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.14.1/8.14.1) with ESMTP id m3CLuodT065754; Sat, 12 Apr 2008 14:56:50 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.14.1/8.13.4/Submit) id m3CLuot5065753; Sat, 12 Apr 2008 14:56:50 -0700 (PDT) Date: Sat, 12 Apr 2008 14:56:50 -0700 (PDT) From: Matthew Dillon Message-Id: <200804122156.m3CLuot5065753@apollo.backplane.com> To: Jonathan Chen References: <20080309212441.GA56523@porthos.spock.org> Cc: hackers@freebsd.org Subject: Re: mlock & COW 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, 12 Apr 2008 21:56:51 -0000 I've looked at it some more and it looks like it would be a real mess to do it in the protection code. I think it may be best to fix it in the fault code. That is, to explicitly allow a user-wired page to be write-faulted. The primary protection check that is causing the segv is in vm_map_lookup() line 3161 and line 3297 (FreeBSD current). Commenting those out will allow the COW on the user-wired page: if ((entry->eflags & MAP_ENTRY_USER_WIRED) && (entry->eflags & MAP_ENTRY_COW) && (fault_type & VM_PROT_WRITE) && (fault_typea & VM_PROT_OVERRIDE_WRITE) == 0) { RETURN(KERN_PROTECTION_FAILURE); } BUT! This is going to cause a panic later on. There is one big gotcha and that is the COW fault will cause the VM system to lose track of the wiring of (I think) either the original page or the COW'd page, and you will get a panic when it tries to unwire it later on. I will mess with it a bit in DragonFly to see if there's a simple solution. -Matt From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 22:33:54 2008 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 4C6F11065679 for ; Sat, 12 Apr 2008 22:33:54 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 10B7E8FC28 for ; Sat, 12 Apr 2008 22:33:53 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1139751waf.3 for ; Sat, 12 Apr 2008 15:33:53 -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:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=b4T96wudkYVNPdb4RySPBNCDAa4qlVMMZ4Lh+l8JFq4=; b=rrkbc0ukQZSvzBeZQyI9XMNkUh6+SlmFTFJSqihsxo/Dn0d4FeNTkGwk8zbA+Xr7DNObvWuU8eA914Hyscz4Df4uYXNY4/oCxbrGaQSnnbxM/mfp6Q9N0a6HOXgZbdeubi9yOJR5rtLLu+Sb3wkZbQhFx07V6gAU2/JSfRxJtnM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=wU9gNqgduOT4GI+sRBmEVKjV/xXbCL7ATmsZdzeGJEw99X7a7Ay3ys26zpk2jUwcFNxihMtE0IQyQemWbo4HCdesQmCGHccxSAIsWqJMxAYu4GXnjJ/zH0ymgQ35L3s39+jPMqfp6fmasPLaXX6exR3u00lTElKRFQOaX9O2vec= Received: by 10.114.151.13 with SMTP id y13mr5083302wad.148.1208039633847; Sat, 12 Apr 2008 15:33:53 -0700 (PDT) Received: by 10.114.255.16 with HTTP; Sat, 12 Apr 2008 15:33:53 -0700 (PDT) Message-ID: Date: Sat, 12 Apr 2008 15:33:53 -0700 From: "Kip Macy" To: "Matthew Dillon" In-Reply-To: <200804122156.m3CLuot5065753@apollo.backplane.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080309212441.GA56523@porthos.spock.org> <200804122156.m3CLuot5065753@apollo.backplane.com> Cc: hackers@freebsd.org, Jonathan Chen Subject: Re: mlock & COW 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, 12 Apr 2008 22:33:54 -0000 On Sat, Apr 12, 2008 at 2:56 PM, Matthew Dillon wrote: > I've looked at it some more and it looks like it would be a real > mess to do it in the protection code. I think it may be best to > fix it in the fault code. That is, to explicitly allow a user-wired > page to be write-faulted. > > The primary protection check that is causing the segv is in > vm_map_lookup() line 3161 and line 3297 (FreeBSD current). Commenting > those out will allow the COW on the user-wired page: > > if ((entry->eflags & MAP_ENTRY_USER_WIRED) && > (entry->eflags & MAP_ENTRY_COW) && > (fault_type & VM_PROT_WRITE) && > (fault_typea & VM_PROT_OVERRIDE_WRITE) == 0) { > RETURN(KERN_PROTECTION_FAILURE); > } > > BUT! This is going to cause a panic later on. There is one big gotcha > and that is the COW fault will cause the VM system to lose track of > the wiring of (I think) either the original page or the COW'd page, > and you will get a panic when it tries to unwire it later on. > > I will mess with it a bit in DragonFly to see if there's a simple > solution. For TCP offload I just have to ensure that the users pages have the right permissions and don't get re-allocated during DMA so I have the following fairly simple code: http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/dev/cxgb/ulp/tom/cxgb_vm.c?rev=1.1;content-type=text%2Fplain The one bit that is interesting is that on receive I know in advance that I will be writing to the pages so I force the COW fault in advance before holding the page. This doesn't address the issue of mlock and cow in the general case, but its a good example of how knowing your application can greatly simplify the code. -Kip From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 23:53:07 2008 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 E9B681065678; Sat, 12 Apr 2008 23:53:07 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id AF0688FC13; Sat, 12 Apr 2008 23:53:07 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.14.1/8.14.1) with ESMTP id m3CNr7aL066380; Sat, 12 Apr 2008 16:53:07 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.14.1/8.13.4/Submit) id m3CNr7sR066379; Sat, 12 Apr 2008 16:53:07 -0700 (PDT) Date: Sat, 12 Apr 2008 16:53:07 -0700 (PDT) From: Matthew Dillon Message-Id: <200804122353.m3CNr7sR066379@apollo.backplane.com> To: "Kip Macy" References: <20080309212441.GA56523@porthos.spock.org> <200804122156.m3CLuot5065753@apollo.backplane.com> Cc: hackers@freebsd.org, Jonathan Chen Subject: Re: mlock & COW 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, 12 Apr 2008 23:53:08 -0000 :> vm_map_lookup() line 3161 and line 3297 (FreeBSD current). Commenting :> those out will allow the COW on the user-wired page: :> :> if ((entry->eflags & MAP_ENTRY_USER_WIRED) && :> (entry->eflags & MAP_ENTRY_COW) && :> (fault_type & VM_PROT_WRITE) && :> (fault_typea & VM_PROT_OVERRIDE_WRITE) == 0) { :> RETURN(KERN_PROTECTION_FAILURE); :> } Ok, never mind on commenting out that code in vm_map_lookup(), it won't work. In fact, it will crash the machine even faster. It's messy both ways, but marginally less messy if you do it in the vm_fault() code. The problem with fixing it in the fault code is that the vm_fault() routine is called by the wiring and unwiring code and also by code which undoes failed wirings (where the entry flags do not reflect what the caller wants vm_fault() to do), so vm_fault() can't just check the entry flags and automatically user-wire. To do it without rewriting the whole mess (and rewriting is not a bad idea), the platform trap code needs to call vm_fault() with a new flag VM_FAULT_AUTOWIRE, then vm_map_lookup() needs to set the contents of &fs.wired whether it succeeds or fails, then vm_fault(), upon seeing result == KERN_PROTECTION_FAILURE, must check whether VM_FAULT_AUTOWIRE was specified and if so check fs.wired to see if the mapping failed due to incompatible protections on a user wired mapping, and THEN it can set VM_FAULT_USER_WIRE in fault_flags and continue normally. And on top of all of that I'm still not sure whether the originally underlying read-only paged that was COW'd will be properly unwired. As I said, messy. -Matt Matthew Dillon From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 23:56:03 2008 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 76B531065670 for ; Sat, 12 Apr 2008 23:56:03 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id 38EA48FC1F for ; Sat, 12 Apr 2008 23:56:03 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1169472waf.3 for ; Sat, 12 Apr 2008 16:56:02 -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:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=gSCHVaFWxJ7be+wXSjEZVUG4R7457wwQ+X+laQ5GZLg=; b=dyAFv+ivDNuaDre3A/Ogv1Egl8C68twqeTaCuBELzvy1iwGOCQ5umRoAoga/nJI+vGvKDTTaFmk9pi2F44OrId4E8L/3rIwhVX6LDh6ql8qIYw4EV+IVPChpnRfLmtalv9c0aAcROaXfj/uao6dmIRU0xnG4kGINlIDfK9FDF7k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZNjPoKDecHz4U5uOOdxoZcZkUTOu/yqW2z3vIqeblGt2uQmvloe83FfP6hwpC3X9uHr1NuuQHmsVHx8tHCz5orXQvDnJlT5kJtVuYWlDx5E2mDsVprHd8DLxCg2MnYTsWh5Uwkc9HCs7z439B1+eQnxcU+rKc/If8+nG5QVDLfg= Received: by 10.115.61.1 with SMTP id o1mr5196595wak.94.1208044562951; Sat, 12 Apr 2008 16:56:02 -0700 (PDT) Received: by 10.114.255.16 with HTTP; Sat, 12 Apr 2008 16:56:02 -0700 (PDT) Message-ID: Date: Sat, 12 Apr 2008 16:56:02 -0700 From: "Kip Macy" To: "Matthew Dillon" In-Reply-To: <200804122353.m3CNr7sR066379@apollo.backplane.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080309212441.GA56523@porthos.spock.org> <200804122156.m3CLuot5065753@apollo.backplane.com> <200804122353.m3CNr7sR066379@apollo.backplane.com> Cc: hackers@freebsd.org, Jonathan Chen Subject: Re: mlock & COW 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, 12 Apr 2008 23:56:03 -0000 > As I said, messy. > Yup, which is why I bypassed the whole affair to have any confidence in my solution. Bypassing the copy to user makes a huge difference cpu usage at 10Gbps. -Kip