From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 00:40:51 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 511A816A403 for ; Sun, 29 Oct 2006 00:40:51 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout2.cac.washington.edu (mxout2.cac.washington.edu [140.142.33.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C095043D4C for ; Sun, 29 Oct 2006 00:40:50 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7]) by mxout2.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id k9T0eoCt003412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 28 Oct 2006 17:40:50 -0700 X-Auth-Received: from [192.168.0.101] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id k9T0ei8F024902 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 28 Oct 2006 17:40:48 -0700 Message-ID: <4543F878.2020006@u.washington.edu> Date: Sat, 28 Oct 2006 17:40:24 -0700 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.7 (X11/20060929) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.0.266434, Antispam-Engine: 2.4.0.264935, Antispam-Data: 2006.10.28.172933 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __LINES_OF_YELLING 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: How to write a FreeBSD-style makefile : checking for external vars existence? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 00:40:51 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I was just wondering... - -How do I go about checking for external variables, as defined by a shell? - -How do I go about checking for variables as defined in make.conf? - -What do variable definitions generally look like in each of these cases, ie what's the difference between $$VAR, ${VAR}, and VAR? The reason why I'm asking is because I'm trying to make a set of FreeBSD makefiles and the following type of declaration doesn't work for some odd reason.. .ifdef $$VAR @echo define $$VAR please! .else #do something to build program .endif Make reports errors in the above case if I put anything in other than VAR, which is confusing given my knowledge of shell scripting and so on. TIA, - -Garrett -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFQ/h36CkrZkzMC68RAv9jAJ4wrk2LKzOYwEoXFmjcCrCh4eEewgCeKTwj +7BbbZ5ThjGJiOUZARwmoos= =/FVX -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 01:50:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D1BAE16A412 for ; Sun, 29 Oct 2006 01:50:46 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9F4143D5A for ; Sun, 29 Oct 2006 01:50:43 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp222-190.lns2.adl4.internode.on.net [203.122.222.190]) (authenticated bits=0) by cain.gsoft.com.au (8.13.5/8.13.4) with ESMTP id k9T1odDK017960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 29 Oct 2006 12:20:39 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sun, 29 Oct 2006 11:20:21 +0930 User-Agent: KMail/1.9.4 References: <4543F878.2020006@u.washington.edu> In-Reply-To: <4543F878.2020006@u.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1926769.yE4iDYJp9d"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200610291220.35363.doconnor@gsoft.com.au> X-Spam-Score: -2.304 () AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.57 on 203.31.81.10 Cc: Garrett Cooper Subject: Re: How to write a FreeBSD-style makefile : checking for external vars existence? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 01:50:46 -0000 --nextPart1926769.yE4iDYJp9d Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 29 October 2006 11:10, Garrett Cooper wrote: > -How do I go about checking for external variables, as defined by a shell? > -How do I go about checking for variables as defined in make.conf? > -What do variable definitions generally look like in each of these > cases, ie what's the difference between $$VAR, ${VAR}, and VAR? AFAIK there is no way to differentiate between environmental variables and= =20 ones set in a makefile. (or ones passed in via the command line) I don't think $$FOO is a valid construct, also there is no difference betwe= en=20 $(FOO) ${FOO}, $FOO means ${F}OO. > The reason why I'm asking is because I'm trying to make a set of > FreeBSD makefiles and the following type of declaration doesn't work for > some odd reason.. > > .ifdef $$VAR > @echo define $$VAR please! > .else > #do something to build program > .endif Try =2Eif !defined(VAR) =2E.. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1926769.yE4iDYJp9d Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFRAjr5ZPcIHs/zowRArE6AJ0avQHpO7GAHf96MEjSdIwt7FH9LwCfcY7q t+jxWtqCxRn3RMNF980XecM= =rs2t -----END PGP SIGNATURE----- --nextPart1926769.yE4iDYJp9d-- From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 14:07:22 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6108D16A417 for ; Sun, 29 Oct 2006 14:07:22 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77D9C43D53 for ; Sun, 29 Oct 2006 14:07:19 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k9TE7Hi0012757 for ; Sun, 29 Oct 2006 17:07:17 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k9TE7GxG012756 for hackers@freebsd.org; Sun, 29 Oct 2006 17:07:16 +0300 (MSK) (envelope-from yar) Date: Sun, 29 Oct 2006 17:07:16 +0300 From: Yar Tikhiy To: hackers@freebsd.org Message-ID: <20061029140716.GA12058@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: Subject: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 14:07:22 -0000 Folks, Here's a funny observation. A program essentially doing: for (;;) { mkdir("foo"); chdir("foo"); } starts as fast as the system permits, but settles to *exactly* one cycle per second at some depth that seems to depend only on the amount of RAM in the machine. An array sized at boot time seems to play a role there: for 128M the depth is ~7800, for 512M it's ~35000. The system feels very slow then, but only due to the fact that fs-related syscalls often take *exactly* one second to complete. As for the said program, it keeps its 1 Hz pace, mostly waiting on "vlruwk". It's killable, after a delay. The system doesn't show any signs of instability, and it's mostly idle according to top or systat! Weird, eh? Any ideas what's going on? -- Yar P.S. Here's the test program generalised and enhanced with timing diagnostics (-v). By setting several -v options, you'll get the diagnostics more often, exponentially. /* * Usage: * * xdir [-v -v ...] name-length tree-depth * * This program will create a chain of subdirectories rooted * in the current directory. Each subdir's name will be: * * 000 ... [ name-lenght times ] ... 000 * * The total depth will be tree-depth: * * 000+/000+/ ... [ tree-depth times] ... /000+/000+ */ #include #include #include #include #include #include #include #include int verbose; int main(int argc, char **argv) { int i, n, m, r; double dt; struct timeval tv0, tv; char buf[NAME_MAX + 1]; while ((i = getopt(argc, argv, "v")) != -1) switch (i) { case 'v': verbose++; break; default: errx(2, "bad option"); } argc -= optind; argv += optind; if (argv[0] == NULL || (n = atoi(argv[0])) <= 0) errx(2, "bad length"); if (argv[1] == NULL || (m = atoi(argv[1])) <= 0) errx(2, "bad depth"); if (n > NAME_MAX) errx(2, "too long"); sprintf(buf, "%0*d", n, 0); r = 1000; /* fool gcc */ if (verbose) { for (i = 1; i < verbose && r > 9; i++) r /= 10; gettimeofday(&tv0, NULL); } for (i = 1; i <= m; i++) { if (mkdir(buf, 0700) == -1) err(2, "mkdir %s", buf); if (chdir(buf) == -1) err(2, "chdir %s", buf); if (verbose && (i % r) == 0) { gettimeofday(&tv, NULL); dt = tv.tv_usec - tv0.tv_usec; dt /= 1000000; dt += tv.tv_sec - tv0.tv_sec; printf("%d (%.1lf)... ", i, r / dt); fflush(stdout); tv0 = tv; } } return (0); } From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 15:13:32 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E22E816A492 for ; Sun, 29 Oct 2006 15:13:32 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id E863343D5C for ; Sun, 29 Oct 2006 15:13:30 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so837710uge for ; Sun, 29 Oct 2006 07:13:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=s4qOj74Lm1pbYysI0MPcDUGG6M1Lbw8quKlvRU1JMG4rE8ASf+XpLmeJvPHML8diRdZCEgsURPZKr7cD3fOmELn5vS+wHqIPp5hoEAolOHVwZFPDuXu6WvaVB6mgCsGoFOvVZHeHy5vYAnUZF6XHsKK+jSfzrkgCV9zPKpgnvc0= Received: by 10.66.224.3 with SMTP id w3mr2681661ugg; Sun, 29 Oct 2006 07:13:29 -0800 (PST) Received: from roadrunner.q.local ( [85.180.143.55]) by mx.google.com with ESMTP id 27sm2052880ugp.2006.10.29.07.13.28; Sun, 29 Oct 2006 07:13:29 -0800 (PST) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.8/8.13.8) with ESMTP id k9TFDOdK002339; Sun, 29 Oct 2006 16:13:24 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.13.8/8.13.8/Submit) id k9TFDOGe002338; Sun, 29 Oct 2006 16:13:24 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Sun, 29 Oct 2006 16:13:24 +0100 From: Ulrich Spoerlein To: Yar Tikhiy Message-ID: <20061029151324.GA1491@roadrunner.q.local> Mail-Followup-To: Yar Tikhiy , hackers@freebsd.org References: <20061029140716.GA12058@comp.chem.msu.su> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061029140716.GA12058@comp.chem.msu.su> Cc: hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 15:13:33 -0000 Yar Tikhiy wrote: > Weird, eh? Any ideas what's going on? None, but have you tried without soft updates? Ulrich Spoerlein -- A: Yes. >Q: Are you sure? > >A: Because it reverses the logical flow of conversation. > >>Q: Why is top posting frowned upon? From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 15:22:31 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A5CC16A4A7 for ; Sun, 29 Oct 2006 15:22:31 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 85E4243D45 for ; Sun, 29 Oct 2006 15:22:30 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 29 Oct 2006 15:22:28 +0000 (GMT) Date: Sun, 29 Oct 2006 15:22:27 +0000 From: David Malone To: Yar Tikhiy Message-ID: <20061029152227.GA11826@walton.maths.tcd.ie> References: <20061029140716.GA12058@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061029140716.GA12058@comp.chem.msu.su> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 15:22:31 -0000 On Sun, Oct 29, 2006 at 05:07:16PM +0300, Yar Tikhiy wrote: > Weird, eh? Any ideas what's going on? I would guess that you need a new vnode to create the new file, but no vnodes are obvious candidates for freeing because they all have a child directory in use. Is there some sort of vnode clearing that goes on every second if we are short of vnodes? David. From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 16:31:59 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1724016A40F for ; Sun, 29 Oct 2006 16:31:59 +0000 (UTC) (envelope-from matt@gsicomp.on.ca) Received: from daisy2.compar.com (daisy2.compar.com [216.208.38.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48C6143D69 for ; Sun, 29 Oct 2006 16:31:44 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from localhost (localhost.compar.com [127.0.0.1]) by daisy2.compar.com (Postfix) with ESMTP id DB15513C48C; Sun, 29 Oct 2006 11:24:25 -0500 (EST) Received: from unknown by localhost (amavisd-new, unix socket) id client-HzwRvAs3; Sun, 29 Oct 2006 11:24:23 -0500 (EST) Received: from gabby.gsicomp.on.ca (CPE00062566c7bb-CM0011e6ede298.cpe.net.cable.rogers.com [72.56.73.77]) by daisy2.compar.com (Postfix) with ESMTP id 1F28213C481; Sun, 29 Oct 2006 11:24:22 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gabby.gsicomp.on.ca (Postfix) with ESMTP id 56C626128; Sun, 29 Oct 2006 12:16:14 -0500 (EST) Received: from unknown by localhost (amavisd-new, unix socket) id client-IUFGKsNj; Sun, 29 Oct 2006 12:15:58 -0500 (EST) Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (Postfix) with ESMTP id 8E81760F6; Sun, 29 Oct 2006 12:15:58 -0500 (EST) Message-ID: <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> From: "Matt Emmerton" To: "David Malone" , "Yar Tikhiy" References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> Date: Sun, 29 Oct 2006 11:32:58 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Virus-Scanned: amavisd-new at gsicomp.on.ca X-Virus-Scanned: amavisd-new at compar.com Cc: hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 16:31:59 -0000 [ Restoring some OP context.] > On Sun, Oct 29, 2006 at 05:07:16PM +0300, Yar Tikhiy wrote: > > > As for the said program, it keeps its 1 Hz pace, mostly waiting on > > "vlruwk". It's killable, after a delay. The system doesn't show ... > > > > Weird, eh? Any ideas what's going on? > > I would guess that you need a new vnode to create the new file, but no > vnodes are obvious candidates for freeing because they all have a child > directory in use. Is there some sort of vnode clearing that goes on every > second if we are short of vnodes? See sys/vfs_subr.c, subroutine getnewvnode(). We call msleep() if we're waiting on vnodes to be created (or recycled). And just look at the 'hz' parameter passed to msleep()! The calling process's mkdir() will end up waiting in getnewvnode() (in "vlruwk" state) while the vnlru kernel thread does it's thing (which is to recycle vnodes.) Either the vnlru kernel thread has to work faster, or the caller has to sleep less, in order to avoid this lock-step behaviour. Regards, -- Matt Emmerton From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 18:51:34 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E76B416A407 for ; Sun, 29 Oct 2006 18:51:34 +0000 (UTC) (envelope-from freebsd@bitfreak.org) Received: from mail.twinthornes.com (mail.twinthornes.com [65.75.198.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6E9C43D4C for ; Sun, 29 Oct 2006 18:51:34 +0000 (GMT) (envelope-from freebsd@bitfreak.org) Received: from [10.9.70.3] (c-71-56-148-19.hsd1.or.comcast.net [71.56.148.19]) by mail.twinthornes.com (Postfix) with ESMTP id B212EDD2 for ; Sun, 29 Oct 2006 10:51:33 -0800 (PST) Message-ID: <4544F837.9010304@bitfreak.org> Date: Sun, 29 Oct 2006 10:51:35 -0800 From: freebsd@bitfreak.org User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> In-Reply-To: <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Yeah, but what does it mean? [Was: Re: File trees: the deeper, the weirder] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 18:51:35 -0000 This has bugged me for a long time and I guess my morning coffee hasn't kicked enough for me to let it go today. It's not documented anywhere that I can find and that includes a grep of all src and man pages. Google and Ask just give the "What is vnlru?" page in a handful of languages, a whole bunch of calcru errors and various chatter about vnode-related system slowness. It's not even in a comment in vfs_subr.c! What does vnlru stand for? VNode List Recycling Unit? Someone please tell me. I lost Deep Thought's email address, so I'm a bit stuck. From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 19:34:43 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A97F16A4B3 for ; Sun, 29 Oct 2006 19:34:43 +0000 (UTC) (envelope-from frank@exit.com) Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0DCC43D45 for ; Sun, 29 Oct 2006 19:34:42 +0000 (GMT) (envelope-from frank@exit.com) Received: from jill.exit.com (jill.exit.com [206.223.0.4]) by tinker.exit.com (8.13.8/8.13.4) with ESMTP id k9TJYdOP068863; Sun, 29 Oct 2006 11:34:39 -0800 (PST) (envelope-from frank@exit.com) Received: from jill.exit.com (localhost [127.0.0.1]) by jill.exit.com (8.13.6/8.13.4) with ESMTP id k9TJYc9G089763; Sun, 29 Oct 2006 11:34:38 -0800 (PST) (envelope-from frank@exit.com) Received: (from frank@localhost) by jill.exit.com (8.13.6/8.13.6/Submit) id k9TJYcFT089762; Sun, 29 Oct 2006 11:34:38 -0800 (PST) (envelope-from frank@exit.com) X-Authentication-Warning: jill.exit.com: frank set sender to frank@exit.com using -f From: Frank Mayhar To: freebsd@bitfreak.org In-Reply-To: <4544F837.9010304@bitfreak.org> References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> <4544F837.9010304@bitfreak.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Exit Consulting Date: Sun, 29 Oct 2006 11:34:38 -0800 Message-Id: <1162150478.89604.11.camel@jill.exit.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 FreeBSD GNOME Team Port X-Virus-Scanned: ClamAV 0.88.4/2130/Sun Oct 29 09:21:43 2006 on tinker.exit.com X-Virus-Status: Clean Cc: hackers@freebsd.org Subject: Re: Yeah, but what does it mean? [Was: Re: File trees: the deeper, the weirder] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: frank@exit.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Oct 2006 19:34:43 -0000 On Sun, 2006-10-29 at 10:51 -0800, freebsd@bitfreak.org wrote: > What does vnlru stand for? VNode List Recycling Unit? Someone please > tell me. I lost Deep Thought's email address, so I'm a bit stuck. I wasn't in on the naming, but I'll bet it stands for something along the lines of VNode Least Recently Used. -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/ From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 22:26:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FA3916A416 for ; Sun, 29 Oct 2006 22:26:38 +0000 (UTC) (envelope-from smortex@free.fr) Received: from smtp2-g19.free.fr (smtp2-g19.free.fr [212.27.42.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id C415243D5E for ; Sun, 29 Oct 2006 22:26:35 +0000 (GMT) (envelope-from smortex@free.fr) Received: from marvin.astase.com (unknown [81.56.211.189]) by smtp2-g19.free.fr (Postfix) with ESMTP id BDD4475D55 for ; Sun, 29 Oct 2006 23:26:34 +0100 (CET) Received: by marvin.astase.com (Postfix, from userid 1001) id E2B4756426; Sun, 29 Oct 2006 23:28:47 +0100 (CET) Date: Sun, 29 Oct 2006 23:28:47 +0100 From: Romain Tartiere To: freebsd-hackers@freebsd.org Message-ID: <20061029222847.GA68272@marvin.astase.com> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Subject: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 22:26:38 -0000 --SkvwRMAIpAhPCcCJ Content-Type: multipart/mixed; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello The rm utility provides a "-P" option for overwriting files before removing them. I was wondering about the behaviour of it on regular files with more than one hard link. I just wrote a few lines in a file, created an hard link to it and "rm -P" the first one. The content of the second one was just lost too. I wonder if this is a desired feature, in accordance to some standard, or just something so improbable that nobody got in trouble with it (yet) ? I guess that in some circumstances this may be an issue. As an example, for associating UIDs with user names in an anonymous FTP server, you may have to provide a copy of the /etc/passwd file... or maybe you will just think about creating a hard link to it. I guess that it can be fixed (in case it is not desired) by: - Ignoring the -P option when the link count is greater then one, or - Asking the user whether he is ready to lose data, assuming "no" if the -f option is set, or - Asking the user whether he is ready to lose data, assuming "yes" if the -f option is set. I have attached a patch that implements the first behaviour. I think here is the best place to speak about this, maybe before thinking about filling-in a problem-report? Regards, Romain --=20 Romain Tartiere http://romain.astase.com/ pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rm.patch" diff -ru /usr/src/bin/rm/rm.1 rm/rm.1 --- /usr/src/bin/rm/rm.1 Fri Mar 31 01:58:14 2006 +++ rm/rm.1 Sun Oct 29 22:44:17 2006 @@ -92,6 +92,8 @@ .Nm to generate an error message and exit. The file will not be removed or overwritten. +This option is silently ignored if the file link count is greater than +one and overwriting it would cause data loss. .It Fl R Attempt to remove the file hierarchy rooted in each file argument. The diff -ru /usr/src/bin/rm/rm.c rm/rm.c --- /usr/src/bin/rm/rm.c Tue May 16 18:14:51 2006 +++ rm/rm.c Sun Oct 15 22:55:05 2006 @@ -289,7 +289,7 @@ continue; /* FALLTHROUGH */ default: - if (Pflag) + if (Pflag && (1 == p->fts_statp->st_nlink)) if (!rm_overwrite(p->fts_accpath, NULL)) continue; rval = unlink(p->fts_accpath); @@ -357,7 +357,7 @@ else if (S_ISDIR(sb.st_mode)) rval = rmdir(f); else { - if (Pflag) + if (Pflag && (1 == sb.st_nlink)) if (!rm_overwrite(f, &sb)) continue; rval = unlink(f); --9jxsPFA5p3P2qPhR-- --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFRSsf2OmjP/9W/0MRAql8AJ9oIM4AIkRcGUFBYaj5C78DlHcwvQCdEWVV HpmrfzFPLYIPac6sV8VzgCw= =IuNE -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ-- From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 23:36:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3425F16A47C for ; Sun, 29 Oct 2006 23:36:37 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 751B743D64 for ; Sun, 29 Oct 2006 23:36:35 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id 1859B4241CC for ; Mon, 30 Oct 2006 00:36:34 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdforen.de Received: from mail.bsdforen.de ([127.0.0.12]) by localhost (mail.bsdforen.de [127.0.0.12]) (amavisd-new, port 10024) with ESMTP id dv8etLAPzcqb for ; Mon, 30 Oct 2006 00:36:33 +0100 (CET) Received: from loki.starkstrom.lan (p549CE11B.dip.t-dialin.net [84.156.225.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 0F3DD4241C8 for ; Mon, 30 Oct 2006 00:36:32 +0100 (CET) Date: Mon, 30 Oct 2006 00:36:28 +0100 From: Joerg Pernfuss To: freebsd-hackers@freebsd.org Message-ID: <20061030003628.42bc5f8d@loki.starkstrom.lan> In-Reply-To: <20061029222847.GA68272@marvin.astase.com> References: <20061029222847.GA68272@marvin.astase.com> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_6OnIi496Ye01RJ76_ZatY=U"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 23:36:37 -0000 --Sig_6OnIi496Ye01RJ76_ZatY=U Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 29 Oct 2006 23:28:47 +0100 Romain Tartiere wrote: > The rm utility provides a "-P" option for overwriting files before > removing them. I was wondering about the behaviour of it on regular > files with more than one hard link. > I just wrote a few lines in a file, created an hard link to it and "rm > -P" the first one. The content of the second one was just lost too. Of course. It is the same file. Every other outcome would indicate a serious bug somewhere in the filesystem code. > I guess that it can be fixed (in case it is not desired) by: > - Ignoring the -P option when the link count is greater then one, or Silently ignoring user specified options is seldom a good way to go. The user explicitly stated he wants to wipe the file contents. > - Asking the user whether he is ready to lose data, assuming "no" if > the -f option is set, or > - Asking the user whether he is ready to lose data, assuming "yes" if > the -f option is set. As -f is the `i know how to shoot my feet' option, a user should be allowed to do so, therefor the second one of these two is better. I guess it boils down to the question how well people understand the linkcount in `ls -l' and how much FreeBSD wants to hold the user's hand. Personally, i'd go nuts if rm(1) constantly asks if I am sure I want to delete that file, because deleted files are lost. If I ever want that, I can set `rm -i' as alias for rm. Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_6OnIi496Ye01RJ76_ZatY=U Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFRTr8H31s/bvKrSQRAr9+AJ44c/CoBqrts86vXa+G1Xg8S6CU7ACeO46n Wu6LU20fqfCZAJ2daa3rlrE= =1TnD -----END PGP SIGNATURE----- --Sig_6OnIi496Ye01RJ76_ZatY=U-- From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 23:58:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5419616A407 for ; Sun, 29 Oct 2006 23:58:08 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id C40F243D49 for ; Sun, 29 Oct 2006 23:58:07 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003149271.msg for ; Sun, 29 Oct 2006 23:57:58 +0000 Message-ID: <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Joerg Pernfuss" , References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> Date: Sun, 29 Oct 2006 23:57:45 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Sun, 29 Oct 2006 23:57:58 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Sun, 29 Oct 2006 23:57:58 +0000 Cc: Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 23:58:08 -0000 ----- Original Message ----- From: "Joerg Pernfuss" >> I guess that it can be fixed (in case it is not desired) by: >> - Ignoring the -P option when the link count is greater then one, or > > Silently ignoring user specified options is seldom a good way to go. > The user explicitly stated he wants to wipe the file contents. That maybe the case but does rm -f remove all copies? Nope so its behaviour is safe even with multiple hardlinks. >From the description I've seen thats not the case for -P here and as such I dont think its quite a simple as that. My personal preference would be for it to warn or perhaps error if the link count is not zero. Possibly use -f to override this but even that I'd say is dangerous. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 01:26:25 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9459916A403 for ; Mon, 30 Oct 2006 01:26:25 +0000 (UTC) (envelope-from BORJAMAR@SARENET.ES) Received: from smtp2.sarenet.es (smtp2.sarenet.es [194.30.0.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41D4043D4C for ; Mon, 30 Oct 2006 01:26:24 +0000 (GMT) (envelope-from BORJAMAR@SARENET.ES) Received: from [127.0.0.1] (matahari.sarenet.es [192.148.167.18]) by smtp2.sarenet.es (Postfix) with ESMTP id 2734417A0C; Mon, 30 Oct 2006 02:26:23 +0100 (CET) In-Reply-To: <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> Mime-Version: 1.0 (Apple Message framework v752.2) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8649A16F-CA40-4050-9F66-03B5B20D8B90@SARENET.ES> Content-Transfer-Encoding: 7bit From: Borja Marcos Date: Mon, 30 Oct 2006 02:26:28 +0100 To: "Steven Hartland" X-Mailer: Apple Mail (2.752.2) Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 01:26:25 -0000 > That maybe the case but does rm -f remove all copies? > Nope so its behaviour is safe even with multiple hardlinks. No. rm unlinks a file from a directory. If the file had no more links, it is deleted as well. There's no surprise at all on the behavior of rm with hard links. Borja. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 01:33:55 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 298C516A403 for ; Mon, 30 Oct 2006 01:33:55 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id E98DC43D7E for ; Mon, 30 Oct 2006 01:33:41 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 39878 invoked by uid 1001); 30 Oct 2006 01:34:21 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Sun, 29 Oct 2006 20:34:21 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17733.22173.12972.677850@bhuda.mired.org> Date: Sun, 29 Oct 2006 20:34:21 -0500 To: "Steven Hartland" In-Reply-To: <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: Joerg Pernfuss , freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 01:33:55 -0000 In <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk>, Steven Hartland typed: > > ----- Original Message ----- > From: "Joerg Pernfuss" > >> I guess that it can be fixed (in case it is not desired) by: > >> - Ignoring the -P option when the link count is greater then one, or > > Silently ignoring user specified options is seldom a good way to go. > > The user explicitly stated he wants to wipe the file contents. > That maybe the case but does rm -f remove all copies? > Nope so its behaviour is safe even with multiple hardlinks. Of course it doesn't remove all copies - because there *aren't* multiple copies. There is only *one* copy, with multiple hardlinks. You told it to remove one hardlink, and it did that, without caring if that's the last link or not, and erroring out because you could lose data if it's the last link. > From the description I've seen thats not the case for -P > here and as such I dont think its quite a simple as that. I think it is. There's a flag that basically says "make sure no one can read this data ever again". It does that. That said data is still available via some other link is immaterial. > My personal preference would be for it to warn or perhaps > error if the link count is not zero. Possibly use -f to > override this but even that I'd say is dangerous. My personal preference is that the system do what I tell it to. If I wanted a system that second guessed me and didn't do things that I told it to because it thought it knew better than I did what I wanted, I wouldn't be using Unix. Adding code so that this is mentioned if you asked to be coddled with -i or -I is probably worthwhile, at least if you can make it not ask if you're actually removing all the links if you do -RP. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 01:44:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02CA516A494 for ; Mon, 30 Oct 2006 01:44:05 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 687AE43D5D for ; Mon, 30 Oct 2006 01:44:02 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id 51C144241C8 for ; Mon, 30 Oct 2006 02:44:01 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdforen.de Received: from mail.bsdforen.de ([127.0.0.12]) by localhost (mail.bsdforen.de [127.0.0.12]) (amavisd-new, port 10024) with ESMTP id ot-bz5sv4wTM for ; Mon, 30 Oct 2006 02:44:01 +0100 (CET) Received: from loki.starkstrom.lan (p549CE11B.dip.t-dialin.net [84.156.225.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 7B208423DE4 for ; Mon, 30 Oct 2006 02:44:00 +0100 (CET) Date: Mon, 30 Oct 2006 02:43:58 +0100 From: Joerg Pernfuss To: Message-ID: <20061030024358.39a12359@loki.starkstrom.lan> In-Reply-To: <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_72hEnRl=0BuVy3QGkiY+3eW"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 01:44:05 -0000 --Sig_72hEnRl=0BuVy3QGkiY+3eW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 29 Oct 2006 23:57:45 -0000 "Steven Hartland" wrote: > That maybe the case but does rm -f remove all copies? > Nope so its behaviour is safe even with multiple hardlinks. >=20 > From the description I've seen thats not the case for -P > here and as such I dont think its quite a simple as that. The problem is that -P is the only option that actually modifies data instead of just the filesystem. From the online man pages it was added somewhere between 4.3BSD and 4.4BSD Lite2, so the FreeBSD CVS doesn't cover the initial -P commit. The option also does not seem to be POSIX or sth similar, but a historic BSD thing. =20 > My personal preference would be for it to warn or perhaps > error if the link count is not zero. Possibly use -f to > override this but even that I'd say is dangerous. s/not zero/greater than one/ BSD behaviour: - OpenBSD handles hardlinks since 3.3: -P Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted. Files with multiple links will not be overwritten. - NetBSD uses 0xff, 0x00 and then random data. Ignores link count - DragonFlyBSD has the same behaviour as FreeBSD External behaviour: - bcwipe ignores the link count - GNU's shred ignores the link count too (`shred $file' as well as `shred -u $file') Although I am a big defender of "the user should know what he does", the "right thing to do"[TM] would probably be to sync the behaviour of FreeBSD's rm(1) to OpenBSD and lobby NetBSD and DragonFlyBSD to do the same :) That would mean that `rm -P ' with having a link count of at least 2, would behave like `rm ' (and like Romain suggested). Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_72hEnRl=0BuVy3QGkiY+3eW Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFRVjeH31s/bvKrSQRAtHgAJ9rBMUnz5YfyZQZgTh/2PnkSI8D0QCaAxvy t7L5/tdZ5ley+qsavqqtXog= =yVEr -----END PGP SIGNATURE----- --Sig_72hEnRl=0BuVy3QGkiY+3eW-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:00:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 619BB16A49E for ; Mon, 30 Oct 2006 02:00:37 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E6AB43D5E for ; Mon, 30 Oct 2006 02:00:28 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.25]) (authenticated bits=0) by cain.gsoft.com.au (8.13.5/8.13.4) with ESMTP id k9U208YK080399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Oct 2006 12:30:08 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 30 Oct 2006 12:30:02 +1030 User-Agent: KMail/1.9.4 References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> In-Reply-To: <20061030003628.42bc5f8d@loki.starkstrom.lan> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2008763.zpj0jJP4Kn"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200610301230.03595.doconnor@gsoft.com.au> X-Spam-Score: -3.423 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.57 on 203.31.81.10 Cc: Joerg Pernfuss Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:00:37 -0000 --nextPart2008763.zpj0jJP4Kn Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 30 October 2006 10:06, Joerg Pernfuss wrote: > > I guess that it can be fixed (in case it is not desired) by: > > - Ignoring the -P option when the link count is greater then one, or > > Silently ignoring user specified options is seldom a good way to go. > The user explicitly stated he wants to wipe the file contents. I disagree that the user really meant to wipe the file if its link count is= =20 >1. IMO having rm -P not wipe the file if its link count is >1 is a good idea. if you are deleting a tree containing a file with links then this will resu= lt=20 in the file getting wiped in the end anyway because the link count will be = 1=20 after the first link is removed. Also, -f ONLY means to ignore permissions (or rather, try to ignore them). It would be easy enough to add a diagnostic message in the -P case where th= e=20 link count is >1. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart2008763.zpj0jJP4Kn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFRVyj5ZPcIHs/zowRAg52AJ9SsQVHPsITd2uk5/MC+X4K9t6FVACcDXy4 C1HE5WvjePcKs6rSu8+7o5U= =3NXT -----END PGP SIGNATURE----- --nextPart2008763.zpj0jJP4Kn-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:06:43 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7F8616A415 for ; Mon, 30 Oct 2006 02:06:43 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9DD743D46 for ; Mon, 30 Oct 2006 02:06:41 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id A29584241CC for ; Mon, 30 Oct 2006 03:06:40 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdforen.de Received: from mail.bsdforen.de ([127.0.0.12]) by localhost (mail.bsdforen.de [127.0.0.12]) (amavisd-new, port 10024) with ESMTP id 3smGLTZ4IZIR for ; Mon, 30 Oct 2006 03:06:40 +0100 (CET) Received: from loki.starkstrom.lan (p549CE7DE.dip.t-dialin.net [84.156.231.222]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 9C5E2423DE4 for ; Mon, 30 Oct 2006 03:06:39 +0100 (CET) Date: Mon, 30 Oct 2006 03:06:36 +0100 From: Joerg Pernfuss To: Message-ID: <20061030030636.66af0924@loki.starkstrom.lan> In-Reply-To: <20061030024358.39a12359@loki.starkstrom.lan> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_apcFppHl5NtD1txbFPDNdOe; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:06:43 -0000 --Sig_apcFppHl5NtD1txbFPDNdOe Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 30 Oct 2006 02:43:58 +0100 Joerg Pernfuss wrote: > That would mean that `rm -P ' with having a link count of > at least 2, would behave like `rm ' (and like Romain suggested). Correction after some `read the frakkin code': if (sbp->st_nlink > 1) { warnx("%s (inode %u): not overwritten due to multiple links", file, sbp->st_ino); return (0); The link is removed, the file is not overwritten and a warning is generated. Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_apcFppHl5NtD1txbFPDNdOe Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFRV4tH31s/bvKrSQRAs0oAJ44a4wPbXkdB2Ueie0dxuyCIAKGBwCfbrGo 7ZkP51EAAeWm8c5mrN1aXEc= =+La/ -----END PGP SIGNATURE----- --Sig_apcFppHl5NtD1txbFPDNdOe-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:14:49 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3039C16A40F for ; Mon, 30 Oct 2006 02:14:49 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CC0843D55 for ; Mon, 30 Oct 2006 02:14:48 +0000 (GMT) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id k9U2ChDL098215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 29 Oct 2006 18:12:44 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id k9U2ChaR098214; Sun, 29 Oct 2006 18:12:43 -0800 (PST) Received: from fbsd61 ([192.168.200.61]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA02520; Sun, 29 Oct 06 18:11:16 PST Date: Sun, 29 Oct 2006 18:11:54 -0800 From: perryh@pluto.rain.com To: elessar@bsdforen.de Message-Id: <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> In-Reply-To: <20061030003628.42bc5f8d@loki.starkstrom.lan> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:14:49 -0000 > ... deleted files are lost. Not if another hard link exists! I think a very strong case can be made that the *intent* of -P -- to prevent retrieval of the contents by reading the filesystem's free space -- implies that it should affect only the "real" removal of the file, when its blocks are released because the link count has become zero. At that point, we by definition are only wiping out data which is eligible to be overwritten by any process that happens to be allocating space on the same filesystem, and which can no longer be read by "normal" filesystem operations, anyway. In this interpretation, "rm -P" when the link count exceeds 1 is an erroneous command. I'd at least allow rm -P to wipe a file with a non-zero remaining link count only under the same restrictions applied to files that are not writable by the invoker of rm. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:15:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 378CD16A407 for ; Mon, 30 Oct 2006 02:15:38 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id B88B143D46 for ; Mon, 30 Oct 2006 02:15:37 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id C18174241C8; Mon, 30 Oct 2006 03:15:36 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdforen.de Received: from mail.bsdforen.de ([127.0.0.12]) by localhost (mail.bsdforen.de [127.0.0.12]) (amavisd-new, port 10024) with ESMTP id 5UU-wuwdfGsy; Mon, 30 Oct 2006 03:15:36 +0100 (CET) Received: from loki.starkstrom.lan (p549CE7DE.dip.t-dialin.net [84.156.231.222]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 90E39423DE4; Mon, 30 Oct 2006 03:15:35 +0100 (CET) Date: Mon, 30 Oct 2006 03:15:33 +0100 From: Joerg Pernfuss To: freebsd-hackers@freebsd.org Message-ID: <20061030031533.44737ff4@loki.starkstrom.lan> In-Reply-To: <200610301230.03595.doconnor@gsoft.com.au> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <200610301230.03595.doconnor@gsoft.com.au> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_NbWjanV+I21JwvITsVlP/8C"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:15:38 -0000 --Sig_NbWjanV+I21JwvITsVlP/8C Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 30 Oct 2006 12:30:02 +1030 "Daniel O'Connor" wrote: > > Silently ignoring user specified options is seldom a good way to go. > > The user explicitly stated he wants to wipe the file contents. >=20 > I disagree that the user really meant to wipe the file if its link > count is >1. That of course may or may not be true. I still do not like the 'silent' part. > IMO having rm -P not wipe the file if its link count is >1 is a good > idea. if you are deleting a tree containing a file with links then > this will result in the file getting wiped in the end anyway because > the link count will be 1 after the first link is removed. >=20 > It would be easy enough to add a diagnostic message in the -P case > where the link count is >1. Yes, see my other mails. Bahviour similar to OpenBSD (don't overwrite, generate warning, unlink) is probably what should be done. The pitfall may really be too big. Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_NbWjanV+I21JwvITsVlP/8C Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFRWBFH31s/bvKrSQRAr+GAJ0ZndfK8Ud6Cjxy1tTtld8Z2bt22gCfZruz H3R6AC2oOHDBN+ktJ1kYr6k= =vOut -----END PGP SIGNATURE----- --Sig_NbWjanV+I21JwvITsVlP/8C-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:23:30 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9C4816A407 for ; Mon, 30 Oct 2006 02:23:30 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72BEF43D6E for ; Mon, 30 Oct 2006 02:23:17 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003149446.msg for ; Mon, 30 Oct 2006 02:22:11 +0000 Message-ID: <004301c6fbca$33046750$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Mike Meyer" References: <20061029222847.GA68272@marvin.astase.com><20061030003628.42bc5f8d@loki.starkstrom.lan><00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <17733.22173.12972.677850@bhuda.mired.org> Date: Mon, 30 Oct 2006 02:22:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Mon, 30 Oct 2006 02:22:11 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Mon, 30 Oct 2006 02:22:11 +0000 Cc: Joerg Pernfuss , freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:23:30 -0000 Mike Meyer wrote: >> That maybe the case but does rm -f remove all copies? >> Nope so its behaviour is safe even with multiple hardlinks. > > Of course it doesn't remove all copies - because there *aren't* > multiple copies. There is only *one* copy, with multiple hardlinks. > You told it to remove one hardlink, and it did that, without caring if > that's the last link or not, and erroring out because you could lose > data if it's the last link. I think you missed my point. If you had a file with multiple hardlink rm -f does NOT remove all copies it just decrements the link count. As such you will never loose data IF it was just a hardlink. This does not seem to be the case here IF it is a hardlink, it makes no difference the file is lost. This is the issue as I see it. There can be other references which the user doesnt know about. Yes thats sort of their fault but how many times have you honestly looked before doing an rm -f to see if the file in question was a hardlink? I guess none as you dont have to worry about it. The unfortunate fact here is its unexpected behaviour from a users perspective. As a user I would much prefer to have this potiential issue flagged up to me so I can make an informed decision instead the current behaviour. >> From the description I've seen thats not the case for -P >> here and as such I dont think its quite a simple as that. > > I think it is. There's a flag that basically says "make sure no one > can read this data ever again". It does that. That said data is still > available via some other link is immaterial. No ones suggesting that it leaves it available without informing the user. >> My personal preference would be for it to warn or perhaps >> error if the link count is not zero. Possibly use -f to >> override this but even that I'd say is dangerous. > > My personal preference is that the system do what I tell it to. If I > wanted a system that second guessed me and didn't do things that I > told it to because it thought it knew better than I did what I wanted, > I wouldn't be using Unix. So before every single rm -f you would prefer to have to check if the link count of every file was > 1 if its defined behaviour was to "destory" the file, I very much doubt that. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:25:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 496B516A50C for ; Mon, 30 Oct 2006 02:25:38 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65B8543D5F for ; Mon, 30 Oct 2006 02:25:26 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003149449.msg for ; Mon, 30 Oct 2006 02:24:56 +0000 Message-ID: <005401c6fbca$95c180d0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Joerg Pernfuss" , References: <20061029222847.GA68272@marvin.astase.com><20061030003628.42bc5f8d@loki.starkstrom.lan><00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk><20061030024358.39a12359@loki.starkstrom.lan> <20061030030636.66af0924@loki.starkstrom.lan> Date: Mon, 30 Oct 2006 02:24:46 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Mon, 30 Oct 2006 02:24:56 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Mon, 30 Oct 2006 02:24:57 +0000 Cc: Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:25:38 -0000 From: "Joerg Pernfuss" > Correction after some `read the frakkin code': > > if (sbp->st_nlink > 1) { > warnx("%s (inode %u): not overwritten due to multiple links", > file, sbp->st_ino); > return (0); > > The link is removed, the file is not overwritten and a > warning is generated. Hehe so it does what we would expect, time for a minor docs update then :) Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:32:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3592E16A417 for ; Mon, 30 Oct 2006 02:32:17 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A62543D88 for ; Mon, 30 Oct 2006 02:32:05 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id 06D0F4241C8; Mon, 30 Oct 2006 03:32:03 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdforen.de Received: from mail.bsdforen.de ([127.0.0.12]) by localhost (mail.bsdforen.de [127.0.0.12]) (amavisd-new, port 10024) with ESMTP id zEhfgR50-5Da; Mon, 30 Oct 2006 03:32:03 +0100 (CET) Received: from loki.starkstrom.lan (p549CE7DE.dip.t-dialin.net [84.156.231.222]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 966A2423DE4; Mon, 30 Oct 2006 03:32:02 +0100 (CET) Date: Mon, 30 Oct 2006 03:32:00 +0100 From: Joerg Pernfuss To: Message-ID: <20061030033200.5ab1bd51@loki.starkstrom.lan> In-Reply-To: <005401c6fbca$95c180d0$b3db87d4@multiplay.co.uk> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan> <20061030030636.66af0924@loki.starkstrom.lan> <005401c6fbca$95c180d0$b3db87d4@multiplay.co.uk> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_Wa.YrvDkrrHU0xrLeMtn874; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Steven Hartland Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:32:17 -0000 --Sig_Wa.YrvDkrrHU0xrLeMtn874 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 30 Oct 2006 02:24:46 -0000 "Steven Hartland" wrote: > From: "Joerg Pernfuss" > > Correction after some `read the frakkin code': > >=20 > > if (sbp->st_nlink > 1) { > > warnx("%s (inode %u): not overwritten due to multiple links", > > file, sbp->st_ino); > > return (0); > > > > The link is removed, the file is not overwritten and a > > warning is generated. >=20 > Hehe so it does what we would expect, time for a minor > docs update then :) Err, that is OpenBSD code :) Time for a minor code and doc update? Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_Wa.YrvDkrrHU0xrLeMtn874 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFRWQgH31s/bvKrSQRAmHAAJ9Ip6XKykSgJOij6sDDO+g7IxhEEACdEwzn JzL+B2OcPeMID2I+HCxpwzU= =dOXj -----END PGP SIGNATURE----- --Sig_Wa.YrvDkrrHU0xrLeMtn874-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:59:04 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6707316A403 for ; Mon, 30 Oct 2006 02:59:04 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id F12DF43D6A for ; Mon, 30 Oct 2006 02:59:01 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003149472.msg for ; Mon, 30 Oct 2006 02:58:10 +0000 Message-ID: <007f01c6fbcf$39207bb0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Joerg Pernfuss" , References: <20061029222847.GA68272@marvin.astase.com><20061030003628.42bc5f8d@loki.starkstrom.lan><00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk><20061030024358.39a12359@loki.starkstrom.lan><20061030030636.66af0924@loki.starkstrom.lan><005401c6fbca$95c180d0$b3db87d4@multiplay.co.uk> <20061030033200.5ab1bd51@loki.starkstrom.lan> Date: Mon, 30 Oct 2006 02:57:18 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Mon, 30 Oct 2006 02:58:10 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Mon, 30 Oct 2006 02:58:11 +0000 Cc: Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:59:04 -0000 ----- Original Message ----- From: "Joerg Pernfuss" > Err, that is OpenBSD code :) > Time for a minor code and doc update? Ah sorry though you meant that was FreeBSD code and it was just the docs out of alignment. Yes I agree this should be the behaviour of -P. Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:59:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 048ED16A412 for ; Mon, 30 Oct 2006 02:59:36 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id 23BBA43D5F for ; Mon, 30 Oct 2006 02:59:19 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 41891 invoked by uid 1001); 30 Oct 2006 03:00:01 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Sun, 29 Oct 2006 22:00:01 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17733.27312.946128.816900@bhuda.mired.org> Date: Sun, 29 Oct 2006 22:00:00 -0500 To: "Steven Hartland" In-Reply-To: <004301c6fbca$33046750$b3db87d4@multiplay.co.uk> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <17733.22173.12972.677850@bhuda.mired.org> <004301c6fbca$33046750$b3db87d4@multiplay.co.uk> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: Joerg Pernfuss , freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 02:59:36 -0000 In <004301c6fbca$33046750$b3db87d4@multiplay.co.uk>, Steven Hartland typed: > Mike Meyer wrote: > >> That maybe the case but does rm -f remove all copies? > >> Nope so its behaviour is safe even with multiple hardlinks. > > Of course it doesn't remove all copies - because there *aren't* > > multiple copies. There is only *one* copy, with multiple hardlinks. > > You told it to remove one hardlink, and it did that, without caring if > > that's the last link or not, and erroring out because you could lose > > data if it's the last link. > I think you missed my point. If you had a file with multiple > hardlink rm -f does NOT remove all copies it just decrements > the link count. As such you will never loose data IF it was > just a hardlink. Actually, rm -f either removes no copies or removes them all, because there's only one copy. It either gets removed (if this was the last link) or it doesn't. And you seem to have missed my point. Having a "destroy this data" option that doesn't do it based on the link count makes as much sense as having "rm" not remove a link based on the link count. > >> My personal preference would be for it to warn or perhaps > >> error if the link count is not zero. Possibly use -f to > >> override this but even that I'd say is dangerous. > > My personal preference is that the system do what I tell it to. If I > > wanted a system that second guessed me and didn't do things that I > > told it to because it thought it knew better than I did what I wanted, > > I wouldn't be using Unix. > So before every single rm -f you would prefer to have to check > if the link count of every file was > 1 if its defined behaviour > was to "destory" the file, I very much doubt that. No, because I wouldn't be using "rm -f" if it's behavior is "destroy the file" but I just wanted it unlinked. Trying to second guess the user is the wrong thing to do in a system designed for adults. Yeah, we can check the hard link count, and issue a warning. This will make scripts that try to be secure fail to do their job, and we'll add an option to ignore the check (or maybe it'll go in in the first place) so that we can still write secure scripts - though they won't be portable. Then someone will complain because their symlink got clobbered. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 03:31:33 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12C8516A407 for ; Mon, 30 Oct 2006 03:31:33 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D43B43D49 for ; Mon, 30 Oct 2006 03:31:32 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([85.236.96.60]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003149497.msg for ; Mon, 30 Oct 2006 03:30:33 +0000 Message-ID: <008d01c6fbd3$bfd29cc0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Mike Meyer" References: <20061029222847.GA68272@marvin.astase.com><20061030003628.42bc5f8d@loki.starkstrom.lan><00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk><17733.22173.12972.677850@bhuda.mired.org><004301c6fbca$33046750$b3db87d4@multiplay.co.uk> <17733.27312.946128.816900@bhuda.mired.org> Date: Mon, 30 Oct 2006 03:30:22 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Mon, 30 Oct 2006 03:30:33 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 85.236.96.60 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Mon, 30 Oct 2006 03:30:35 +0000 Cc: Joerg Pernfuss , freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 03:31:33 -0000 ----- Original Message ----- From: "Mike Meyer" > Actually, rm -f either removes no copies or removes them all, because > there's only one copy. It either gets removed (if this was the last > link) or it doesn't. And you seem to have missed my point. Having a > "destroy this data" option that doesn't do it based on the link count > makes as much sense as having "rm" not remove a link based on the link > count. Hehe your saying that removing a file doesnt always remove the file, thanks for making my point :D Its clear in my mind and others it seems, that the OpenBSD method is how this should work. You can procrastinate all you like about "designed for adults" that doesnt change the fact destroying the data in a file referenced else where is not what the user would expect, adult or not. Just like they wouldn't expect rm -f to automatically decrement the reference count to 0 and erase the file from FS totally. This would be the case by your argument, as reading the man page of rm there is no mention of anything like: "Only if the reference count reaches 0 is the file really removed from the file system." It only stats the following: "The rm utility exits 0 if all of the named files or file hierarchies were removed" But as we all know the files may be referenced else where and hence said files may not in fact be "removed" at all only their local reference. So either the docs need to be updated to make it VERY clear this unexpected behaviour will occur or the code and the docs updated to make it function in a more predictable manor. Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 03:42:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B28916A407 for ; Mon, 30 Oct 2006 03:42:06 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA2A643D49 for ; Mon, 30 Oct 2006 03:42:04 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 4606CEB397E; Mon, 30 Oct 2006 11:42:03 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id ayj2xuzk-SSH; Mon, 30 Oct 2006 11:42:00 +0800 (CST) Received: from [10.217.12.47] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 5AA56EB386F; Mon, 30 Oct 2006 11:42:00 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:x-enigmail-version:content-type; b=o0wXxUAWqA3Q9IFFNld6TQ862vKD8lzsW+rhcKMMMNWe4awGMGYorKAAe04Ny7pnB DXyWYBZjcBTcP6vqOoArw== Message-ID: <4545745D.5080008@delphij.net> Date: Mon, 30 Oct 2006 11:41:17 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Joerg Pernfuss References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan> <20061030030636.66af0924@loki.starkstrom.lan> In-Reply-To: <20061030030636.66af0924@loki.starkstrom.lan> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig0AB80D5AFBC14FC2B4120A08" Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 03:42:06 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0AB80D5AFBC14FC2B4120A08 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Joerg Pernfuss wrote: > On Mon, 30 Oct 2006 02:43:58 +0100 > Joerg Pernfuss wrote: >=20 >> That would mean that `rm -P ' with having a link count of= >> at least 2, would behave like `rm ' (and like Romain suggested).= >=20 >=20 > Correction after some `read the frakkin code': >=20 > if (sbp->st_nlink > 1) { > warnx("%s (inode %u): not overwritten due to multiple links", > file, sbp->st_ino); > return (0); > The link is removed, the file is not overwritten and a warning is gener= ated. Yeah I think this is reasonable and thanks y'all for mentioning this. I have just committed a similar patch that is ported from OpenBSD against -HEAD. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig0AB80D5AFBC14FC2B4120A08 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.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFRXRdOfuToMruuMARA9tqAJ42vUDqcWYSI4/BfnwCAHQmL40o4wCeMAsr DQvbfYCrtQeQozok1ucHFw8= =DUE7 -----END PGP SIGNATURE----- --------------enig0AB80D5AFBC14FC2B4120A08-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 03:56:00 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94D1016A416 for ; Mon, 30 Oct 2006 03:56:00 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4226443D49 for ; Mon, 30 Oct 2006 03:56:00 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.25] ([192.168.42.25]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id k9U3rwKP008719; Sun, 29 Oct 2006 21:53:58 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <45457757.6090408@centtech.com> Date: Sun, 29 Oct 2006 21:53:59 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.7 (X11/20061015) MIME-Version: 1.0 To: frank@exit.com References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> <4544F837.9010304@bitfreak.org> <1162150478.89604.11.camel@jill.exit.com> In-Reply-To: <1162150478.89604.11.camel@jill.exit.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2131/Sun Oct 29 16:00:12 2006 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd@bitfreak.org, hackers@freebsd.org Subject: Re: Yeah, but what does it mean? [Was: Re: File trees: the deeper, the weirder] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 03:56:00 -0000 On 10/29/06 13:34, Frank Mayhar wrote: > On Sun, 2006-10-29 at 10:51 -0800, freebsd@bitfreak.org wrote: >> What does vnlru stand for? VNode List Recycling Unit? Someone please >> tell me. I lost Deep Thought's email address, so I'm a bit stuck. > > I wasn't in on the naming, but I'll bet it stands for something along > the lines of VNode Least Recently Used. Yep, that's what it means. vn* is commonly used in the kernel for vnodes, and an 'lru' is commonly known for a 'least recently used' sort of list. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 05:17:55 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 992F516A407 for ; Mon, 30 Oct 2006 05:17:55 +0000 (UTC) (envelope-from dave@endlessdream.org) Received: from endlessdream.org (mail.dammcomputers.com [63.246.134.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C45043D45 for ; Mon, 30 Oct 2006 05:17:55 +0000 (GMT) (envelope-from dave@endlessdream.org) Received: from [192.168.1.106] [70.126.42.209] by endlessdream.org with ESMTP (SMTPD32-8.15) id AB52D390166; Mon, 30 Oct 2006 00:19:14 -0500 Message-ID: <45458BBE.6030103@endlessdream.org> Date: Mon, 30 Oct 2006 00:21:02 -0500 From: Dave Clausen User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Process arguments X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 05:17:55 -0000 Hello list, I'm a n00b to the FreeBSD kernel and I'm trying to log all commands run on the command line from within the kernel for security purposes by loading a kernel module which redefines execve(). I've successfully created the KLD and have it working, but am having problems saving the command's arguments. Could anyone point me to where in the kernel I should be looking for the arguments sent to the process? p->p_args gives me the parent process's cmdname only (sh, in this case), and uap->argv is just the relative pathname of uap->fname. Ideally, I'd like the user, full command line, and cwd logged for each command entered. Here's an example of what I've been working away on: int new_execve (struct thread *td, struct execve_args *uap) { char *user; struct proc *p = td->td_proc; user = p->p_pgrp->pg_session->s_login; if (p->p_ucred->cr_ruid == 1001) { printf("%s %d %s\n", user, p->p_pid, uap->fname); } return (execve(td,uap)); } Running 'ls -al' with the above, I get the username, pid, and absolute filename printed such as, but can't find the actual arguments: dave 6689 /bin/ls Any help would be appreciated. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 05:26:30 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54AE116A415 for ; Mon, 30 Oct 2006 05:26:30 +0000 (UTC) (envelope-from prvs=julian=45182861c@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EC4C43D5A for ; Mon, 30 Oct 2006 05:26:30 +0000 (GMT) (envelope-from prvs=julian=45182861c@elischer.org) Received: from unknown (HELO [192.168.2.4]) ([10.251.60.124]) by a50.ironport.com with ESMTP; 29 Oct 2006 21:26:29 -0800 Message-ID: <45458D02.7040008@elischer.org> Date: Sun, 29 Oct 2006 21:26:26 -0800 From: Julian Elischer User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Dave Clausen References: <45458BBE.6030103@endlessdream.org> In-Reply-To: <45458BBE.6030103@endlessdream.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Process arguments X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 05:26:30 -0000 Dave Clausen wrote: > Hello list, > > I'm a n00b to the FreeBSD kernel and I'm trying to log all commands run > on the command line from within the kernel for security purposes by > loading a kernel module which redefines execve(). I've successfully > created the KLD and have it working, but am having problems saving the > command's arguments. > Could anyone point me to where in the kernel I should be looking for the > arguments sent to the process? p->p_args gives me the parent process's > cmdname only (sh, in this case), and uap->argv is just the relative > pathname of uap->fname. Ideally, I'd like the user, full command line, > and cwd logged for each command entered. > > Here's an example of what I've been working away on: > > int > new_execve (struct thread *td, struct execve_args *uap) > { > char *user; > struct proc *p = td->td_proc; > > user = p->p_pgrp->pg_session->s_login; > if (p->p_ucred->cr_ruid == 1001) { > printf("%s %d %s\n", user, p->p_pid, uap->fname); > } > return (execve(td,uap)); > } > > Running 'ls -al' with the above, I get the username, pid, and absolute > filename printed such as, but can't find the actual arguments: > dave 6689 /bin/ls > > Any help would be appreciated. > there have been patches around for years that do this.. I know I used them for Bank of America in their security auditing. I can not remember the name of them however.. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 06:31:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 441F916A412 for ; Mon, 30 Oct 2006 06:31:18 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41C7743D7B for ; Mon, 30 Oct 2006 06:31:11 +0000 (GMT) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=[192.168.0.18]) by publicd.ub.mng.net with esmtpa (Exim 4.63 (FreeBSD)) (envelope-from ) id 1GeQfl-0009LR-Sr; Mon, 30 Oct 2006 14:31:01 +0800 Message-ID: <45459C25.1060909@micom.mng.net> Date: Mon, 30 Oct 2006 14:31:01 +0800 From: Ganbold User-Agent: Thunderbird 1.5.0.4 (X11/20060612) MIME-Version: 1.0 To: Dave Clausen References: <45458BBE.6030103@endlessdream.org> In-Reply-To: <45458BBE.6030103@endlessdream.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Process arguments X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 06:31:18 -0000 Dave Clausen wrote: > Hello list, > > I'm a n00b to the FreeBSD kernel and I'm trying to log all commands > run on the command line from within the kernel for security purposes > by loading a kernel module which redefines execve(). I've > successfully created the KLD and have it working, but am having > problems saving the command's arguments. > Could anyone point me to where in the kernel I should be looking for > the arguments sent to the process? p->p_args gives me the parent > process's cmdname only (sh, in this case), and uap->argv is just the > relative pathname of uap->fname. Ideally, I'd like the user, full > command line, and cwd logged for each command entered. > > Here's an example of what I've been working away on: > > int > new_execve (struct thread *td, struct execve_args *uap) > { > char *user; > struct proc *p = td->td_proc; > > user = p->p_pgrp->pg_session->s_login; > if (p->p_ucred->cr_ruid == 1001) { > printf("%s %d %s\n", user, p->p_pid, uap->fname); > } > return (execve(td,uap)); > } > > Running 'ls -al' with the above, I get the username, pid, and absolute > filename printed such as, but can't find the actual arguments: > dave 6689 /bin/ls If I'm not mistaken pjd@ has written similar module which is called lrexec for RELENG_4 and RELENG_5. See his web site. Also recently rwatson@ enabled audit support in RELENG_6 and CURRENT, though I don't know yet whether it can log arguments. hth, Ganbold > > Any help would be appreciated. > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" > > > From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 08:29:53 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 909A916A412 for ; Mon, 30 Oct 2006 08:29:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0990B43D66 for ; Mon, 30 Oct 2006 08:29:52 +0000 (GMT) (envelope-from adrian.chadd@gmail.com) Received: by wx-out-0506.google.com with SMTP id i27so1192290wxd for ; Mon, 30 Oct 2006 00:29:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Hz9TAgj4GRxa4IJjL7uSGtbxXCVim0drj/RwmVKYaNx2Y9HczplBmLO4EuJvmUzrwuB/zZp26ijqkqC+F2umvsQBasB2zQ3c0Cqi+0A5Z1Z181uilRwLthDxuSFeLlI8+P1LJQis5fzBtSUKrDE85eCqZsNaf+qJW9vE8UqX41s= Received: by 10.90.115.9 with SMTP id n9mr582854agc; Mon, 30 Oct 2006 00:29:52 -0800 (PST) Received: by 10.90.66.16 with HTTP; Mon, 30 Oct 2006 00:29:52 -0800 (PST) Message-ID: Date: Mon, 30 Oct 2006 16:29:52 +0800 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Dave Clausen" In-Reply-To: <45458BBE.6030103@endlessdream.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45458BBE.6030103@endlessdream.org> X-Google-Sender-Auth: b1d515766c57dd32 Cc: freebsd-hackers@freebsd.org Subject: Re: Process arguments X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 08:29:53 -0000 Don't forget logging the environment as well as the command line. Many programs will treat environment variables as arguments. adrian -- Adrian Chadd - adrian@freebsd.org From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 08:35:04 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A884416A407 for ; Mon, 30 Oct 2006 08:35:04 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FE0D43D88 for ; Mon, 30 Oct 2006 08:35:00 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k9U8YphV027141 for ; Mon, 30 Oct 2006 11:34:51 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k9U8Ynla027140 for hackers@freebsd.org; Mon, 30 Oct 2006 11:34:49 +0300 (MSK) (envelope-from yar) Date: Mon, 30 Oct 2006 11:34:49 +0300 From: Yar Tikhiy To: hackers@freebsd.org Message-ID: <20061030083448.GA27062@comp.chem.msu.su> References: <20061029140716.GA12058@comp.chem.msu.su> <20061029151324.GA1491@roadrunner.q.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061029151324.GA1491@roadrunner.q.local> User-Agent: Mutt/1.5.9i Cc: Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 08:35:04 -0000 On Sun, Oct 29, 2006 at 04:13:24PM +0100, Ulrich Spoerlein wrote: > Yar Tikhiy wrote: > > Weird, eh? Any ideas what's going on? > > None, but have you tried without soft updates? Yes, I tried, but no soft updates didn't affect the picture. -- Yar From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 08:38:55 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09C8916A407 for ; Mon, 30 Oct 2006 08:38:55 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7B7E43D5E for ; Mon, 30 Oct 2006 08:38:53 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c58-107-94-118.belrs4.nsw.optusnet.com.au [58.107.94.118]) by mail10.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k9U8cneN001075 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 30 Oct 2006 19:38:51 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id k9U8cnrH001478; Mon, 30 Oct 2006 19:38:49 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id k9U8cn7O001477; Mon, 30 Oct 2006 19:38:49 +1100 (EST) (envelope-from peter) Date: Mon, 30 Oct 2006 19:38:49 +1100 From: Peter Jeremy To: perryh@pluto.rain.com Message-ID: <20061030083849.GB871@turion.vk2pj.dyndns.org> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="24zk1gE8NUlDmwG9" Content-Disposition: inline In-Reply-To: <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 08:38:55 -0000 --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 2006-Oct-29 18:11:54 -0800, perryh@pluto.rain.com wrote: >I think a very strong case can be made that the *intent* of -P -- >to prevent retrieval of the contents by reading the filesystem's >free space -- implies that it should affect only the "real" removal >of the file, when its blocks are released because the link count >has become zero. =2E.. >In this interpretation, "rm -P" when the link count exceeds 1 is >an erroneous command. I agree. Doing "rm -P" on a file with multiple links suggests that the user is unaware that there are multiple links. I don't think that just unlinking the file and issuing a warning is a good solution because it's then virtually impossible to locate the other copy(s) of the file, which remains viewable. I believe this is a security hole. Consider: In FreeBSD, it is possible to create a hardlink to a file if you are not the owner, even if you can't read it. Mallory may decide to create hardlinks to Alice's files, even if he can't read them today on the off-chance that he may be able to circumvent the protections at a later date. Unless Alice notices that her file has a second link before she deletes it, when she issues "rm -P", she will lose her link to the file (and her only way of uniquely identifying it) whilst leaving the remaining link to the file in Mallory's control. --=20 Peter Jeremy --24zk1gE8NUlDmwG9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFRboZ/opHv/APuIcRAitpAJ9O/dA5PyqDQLnbFMSEBOJDYCJacgCaA3Nh XGIis5mvhU/OHHhHdvOHjuI= =fOZo -----END PGP SIGNATURE----- --24zk1gE8NUlDmwG9-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 09:32:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBEE916A40F for ; Mon, 30 Oct 2006 09:32:27 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39B9943D45 for ; Mon, 30 Oct 2006 09:32:27 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id 4B3F54241C8; Mon, 30 Oct 2006 10:32:26 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdforen.de Received: from mail.bsdforen.de ([127.0.0.12]) by localhost (mail.bsdforen.de [127.0.0.12]) (amavisd-new, port 10024) with ESMTP id oQIwgjnPFFLt; Mon, 30 Oct 2006 10:32:25 +0100 (CET) Received: from loki.starkstrom.lan (p549CE7DE.dip.t-dialin.net [84.156.231.222]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 71779423DE4; Mon, 30 Oct 2006 10:32:17 +0100 (CET) Date: Mon, 30 Oct 2006 10:32:12 +0100 From: Joerg Pernfuss To: freebsd-hackers@freebsd.org Message-ID: <20061030103212.13e6ad07@loki.starkstrom.lan> In-Reply-To: <20061030083849.GB871@turion.vk2pj.dyndns.org> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_U1hr9CC.N7f7gSDIFarMWJ4; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: perryh@pluto.rain.com Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 09:32:28 -0000 --Sig_U1hr9CC.N7f7gSDIFarMWJ4 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 30 Oct 2006 19:38:49 +1100 Peter Jeremy wrote: > I agree. Doing "rm -P" on a file with multiple links suggests that > the user is unaware that there are multiple links. I don't think > that just unlinking the file and issuing a warning is a good solution > because it's then virtually impossible to locate the other copy(s) > of the file, which remains viewable. The only method I know of to find out all the hardlinks to a file is find /path/to/mountpoint -type f -inum The inode number can be obtained via `ls -li' if the file is linked, or from the warning the committed patch issues. It surely isn't obvious, but neither is it virtually impossible, I'd say. The intend of the patch boils down to: - overwriting a file with multiple links suggets the user is unaware of this - if `rm -rP' is used and all links are under the hierarchy that is to be deleted, the file will actually get overwritten when the last link is removed - if rm is not invoked recursive, print the inode number and give the user the means to check out what is going on > Consider: In FreeBSD, it is possible to create a hardlink to a file if > you are not the owner, even if you can't read it. Mallory may decide > to create hardlinks to Alice's files, even if he can't read them today > on the off-chance that he may be able to circumvent the protections at > a later date. Unless Alice notices that her file has a second link > before she deletes it, when she issues "rm -P", she will lose her link > to the file (and her only way of uniquely identifying it) whilst > leaving the remaining link to the file in Mallory's control. Now it gets tricky. Indeed, one can do this. I wasn't aware of that. The second link is created with owner and access permissions of the first one and keeps them, even after the first file is deleted. So yes, Mallory can deny Alice the ability to remove her file, but she can't read it unless she can circumvent the unix file permissions system. And Alice can search for the inode, link it again and dd(1) a fair share of /dev/random over it. Assuming that Alice's find(1) can enter the directory in which Mallory linked the file. That isn't really that nice, true. But why can i link files that I have no business with in the first place? Is there is specific reason? Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_U1hr9CC.N7f7gSDIFarMWJ4 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFRcacH31s/bvKrSQRAl4qAJ9Y863TR/BLPyw3oUUszx0jwJo7NACfR1Lm 4q1zN+OG+pNDNkYr1NjiTfY= =D4IW -----END PGP SIGNATURE----- --Sig_U1hr9CC.N7f7gSDIFarMWJ4-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 09:40:57 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B938416A407; Mon, 30 Oct 2006 09:40:57 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC86143D55; Mon, 30 Oct 2006 09:40:55 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id F3782EB3B99; Mon, 30 Oct 2006 17:40:54 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id RUvsG6imZMSl; Mon, 30 Oct 2006 17:40:52 +0800 (CST) Received: from [10.217.12.47] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 8F3BAEB39AD; Mon, 30 Oct 2006 17:40:51 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:x-enigmail-version:content-type; b=TRZtaKgDSfsGAuSnwZ5KFJcW5h2yv0U3TSkwV5WMKbinhOpF19NIDgyPNgc5nB6Wx X0WYfWkDWRT1/J1D7OmHQ== Message-ID: <4545C86A.1030008@delphij.net> Date: Mon, 30 Oct 2006 17:39:54 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Peter Jeremy References: <200610300332.k9U3W9xF099044@repoman.freebsd.org> <20061030090054.GC871@turion.vk2pj.dyndns.org> In-Reply-To: <20061030090054.GC871@turion.vk2pj.dyndns.org> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig0F4CF7E431D24B241E6A1D3B" Cc: freebsd-hackers@FreeBSD.org, src-committers@FreeBSD.ORG, Xin LI , cvs-all@FreeBSD.ORG, cvs-src@FreeBSD.ORG Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 09:40:57 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0F4CF7E431D24B241E6A1D3B Content-Type: multipart/mixed; boundary="------------040408050409090307030603" This is a multi-part message in MIME format. --------------040408050409090307030603 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Peter Jeremy wrote: > On Mon, 2006-Oct-30 03:32:09 +0000, Xin LI wrote: >> Be more reasonable when overwrite mode is specified while there >> is hard links. Overwritting when links > 1 would cause data >> loss, which is usually undesired. >=20 > Another way of looking at it is that not overwriting when links > 1 > means that the data I thought I securely deleted is still present > somewhere on my computer and I have no easy way to find it. >=20 > I believe that this change creates a security hole and should be > reverted. It the user specified '-P', either the file should be > over-written or the file should be left untouched (not deleted). > This is the only way that the user can be protected both against > accidently over-writing a wanted file when an unwanted link is > removed and failing to over-write an unwanted file which had a > stray additional link. Well thought, I think that you are correct that specifying -P should do nothing but generate a warning. In addition to this I have changed the behavior a bit (patch attached) that, if -f is specified along with -P, the overwritten is happen and the link would be removed. Please let me know if you are happy with this change. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------040408050409090307030603 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="patch-rm-P" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="patch-rm-P" Index: rm.1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/bin/rm/rm.1,v retrieving revision 1.40 diff -u -r1.40 rm.1 --- rm.1 30 Oct 2006 03:32:09 -0000 1.40 +++ rm.1 30 Oct 2006 09:32:44 -0000 @@ -88,7 +88,9 @@ Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted. -Files with multiple links will not be overwritten. +Files with multiple links will not be overwritten nor deleted unless +.Fl f +is specified. .Pp Specifying this flag for a read only file will cause .Nm Index: rm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/bin/rm/rm.c,v retrieving revision 1.57 diff -u -r1.57 rm.c --- rm.c 30 Oct 2006 03:32:09 -0000 1.57 +++ rm.c 30 Oct 2006 09:31:35 -0000 @@ -400,10 +400,10 @@ } if (!S_ISREG(sbp->st_mode)) return (1); - if (sbp->st_nlink > 1) { + if (sbp->st_nlink > 1 && !fflag) { warnx("%s (inode %u): not overwritten due to multiple links", file, sbp->st_ino); - return (1); + return (0); } if ((fd =3D open(file, O_WRONLY, 0)) =3D=3D -1) goto err; --------------040408050409090307030603-- --------------enig0F4CF7E431D24B241E6A1D3B 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.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFRchqOfuToMruuMARA6CjAJ9izk7Xx8OTJoI7FsNbcwjw7U+zsQCeNVIk fVqlx+6bPHhhKLOOC2sOJeA= =QxMv -----END PGP SIGNATURE----- --------------enig0F4CF7E431D24B241E6A1D3B-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 10:03:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D4D316A49E for ; Mon, 30 Oct 2006 10:03:56 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from cydem.org (S0106000103ce4c9c.vc.shawcable.net [24.87.27.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF4FC43D82 for ; Mon, 30 Oct 2006 10:03:53 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from soralx.cydem.org (unknown [192.168.0.249]) by cydem.org (Postfix/FreeBSD) with ESMTP id 0DECE90FD6 for ; Mon, 30 Oct 2006 02:03:52 -0800 (PST) Date: Mon, 30 Oct 2006 02:03:50 -0800 From: To: freebsd-hackers@freebsd.org Message-ID: <20061030020350.4d58e461@soralx.cydem.org> In-Reply-To: <20061030103212.13e6ad07@loki.starkstrom.lan> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103212.13e6ad07@loki.starkstrom.lan> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 10:03:56 -0000 > > protections at a later date. Unless Alice notices that her file > > has a second link before she deletes it, when she issues "rm -P", > > she will lose her link to the file (and her only way of uniquely > > identifying it) whilst leaving the remaining link to the file in > > Mallory's control. well, that's the whole point of '-P' -- erase file's data _before_ unlinking the file, is it not? > That isn't really that nice, true. But why can i link files that I > have no business with in the first place? Is there is specific reason? if you can't see the contents of other user's directory (think '0750') you really will get no buisiness there, whether you want it or not Of course, one must be careful when using `rm -P` (which, ironically, is very likely to happen in limited-time situations), and even the protection of requiring the '-f' flag if {(inode count) > 1} is inadequate protection for fools like me (who are used to good ol' `rm -rf` on large directory structures) ;P [SorAlx] ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 10:06:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 491D616A47B for ; Mon, 30 Oct 2006 10:06:54 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F85E43D58 for ; Mon, 30 Oct 2006 10:06:21 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id CCB3EEB0CFE; Mon, 30 Oct 2006 18:06:20 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id eiskp+KKDO5K; Mon, 30 Oct 2006 18:06:15 +0800 (CST) Received: from [10.217.12.47] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 3B196EB3459; Mon, 30 Oct 2006 18:06:13 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:x-enigmail-version:content-type; b=DMCACNPn/qNJ/CnnL0hSo8Xj78JHdV499Onn4QaHmfAuR9vxI5rrjJPrhRairw2i3 XH/RfpkT3Wwru4ZvLAuKA== Message-ID: <4545CE6B.1010405@delphij.net> Date: Mon, 30 Oct 2006 18:05:31 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Joerg Pernfuss References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103212.13e6ad07@loki.starkstrom.lan> In-Reply-To: <20061030103212.13e6ad07@loki.starkstrom.lan> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig9740C3C4138859AC6ED563A3" Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 10:06:54 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9740C3C4138859AC6ED563A3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Joerg Pernfuss wrote: > On Mon, 30 Oct 2006 19:38:49 +1100 > Peter Jeremy wrote: >=20 >> I agree. Doing "rm -P" on a file with multiple links suggests that >> the user is unaware that there are multiple links. I don't think >> that just unlinking the file and issuing a warning is a good solution >> because it's then virtually impossible to locate the other copy(s) >> of the file, which remains viewable. >=20 > The only method I know of to find out all the hardlinks to a file is > find /path/to/mountpoint -type f -inum >=20 > The inode number can be obtained via `ls -li' if the file is linked, > or from the warning the committed patch issues. It surely isn't obvious= , > but neither is it virtually impossible, I'd say. >=20 > The intend of the patch boils down to: > - overwriting a file with multiple links suggets the user is > unaware of this > - if `rm -rP' is used and all links are under the hierarchy > that is to be deleted, the file will actually get overwritten > when the last link is removed > - if rm is not invoked recursive, print the inode number and > give the user the means to check out what is going on >=20 >> Consider: In FreeBSD, it is possible to create a hardlink to a file if= >> you are not the owner, even if you can't read it. Mallory may decide >> to create hardlinks to Alice's files, even if he can't read them today= >> on the off-chance that he may be able to circumvent the protections at= >> a later date. Unless Alice notices that her file has a second link >> before she deletes it, when she issues "rm -P", she will lose her link= >> to the file (and her only way of uniquely identifying it) whilst >> leaving the remaining link to the file in Mallory's control. >=20 > Now it gets tricky. Indeed, one can do this. > I wasn't aware of that. The second link is created with owner and acces= s > permissions of the first one and keeps them, even after the first file = is > deleted. So yes, Mallory can deny Alice the ability to remove her file,= > but she can't read it unless she can circumvent the unix file permissio= ns > system. >=20 > And Alice can search for the inode, link it again and dd(1) a fair shar= e > of /dev/random over it. Assuming that Alice's find(1) can enter the > directory in which Mallory linked the file. >=20 > That isn't really that nice, true. But why can i link files that I have= > no business with in the first place? Is there is specific reason? Another solution is that we follow the OpenBSD behavior and make it possible for the user to use the historical "feature=E2=80=9C, but by def= ault, if there is hard link then we just do nothing. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig9740C3C4138859AC6ED563A3 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.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFRc5rOfuToMruuMARA0qNAJ9qcaZinNX9qYdUg4ypN35PmL8XswCdEB0G uOOODatvvMhpyhtP4uX6yGg= =LxOG -----END PGP SIGNATURE----- --------------enig9740C3C4138859AC6ED563A3-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 10:31:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32B6D16A417 for ; Mon, 30 Oct 2006 10:31:56 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DD5443D55 for ; Mon, 30 Oct 2006 10:31:55 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c58-107-94-118.belrs4.nsw.optusnet.com.au [58.107.94.118]) by mail09.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k9UAVqOX020302 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 30 Oct 2006 21:31:53 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id k9UAVpBo001835; Mon, 30 Oct 2006 21:31:51 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id k9UAVpwg001834; Mon, 30 Oct 2006 21:31:51 +1100 (EST) (envelope-from peter) Date: Mon, 30 Oct 2006 21:31:51 +1100 From: Peter Jeremy To: perryh@pluto.rain.com Message-ID: <20061030103151.GD871@turion.vk2pj.dyndns.org> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OaZoDhBhXzo6bW1J" Content-Disposition: inline In-Reply-To: <20061030083849.GB871@turion.vk2pj.dyndns.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 10:31:56 -0000 --OaZoDhBhXzo6bW1J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 2006-Oct-30 19:38:49 +1100, Peter Jeremy wrote: >the user is unaware that there are multiple links. I don't think >that just unlinking the file and issuing a warning is a good solution >because it's then virtually impossible to locate the other copy(s) >of the file, which remains viewable. I missed the fact that the warning message includes the inode number. My apologies. This reduces "virtually impossible" to "hard". I still think this current behaviour is undesirable and a security hole. Maybe someone from the SO team would like to offer their opinion - I might just have my tinfoil hat on too tight tonight. --=20 Peter Jeremy --OaZoDhBhXzo6bW1J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFRdSX/opHv/APuIcRAoTPAJ4/rZuTYI4qE2PB8nXHfqv9qcUY/wCfXpXv 8Td5NQr14YsGRE/PQ6rBPt0= =CuX4 -----END PGP SIGNATURE----- --OaZoDhBhXzo6bW1J-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 12:34:53 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D56416A47C for ; Mon, 30 Oct 2006 12:34:53 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6375343D58 for ; Mon, 30 Oct 2006 12:34:45 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k9UCYbpi031007; Mon, 30 Oct 2006 15:34:37 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k9UCYb72031006; Mon, 30 Oct 2006 15:34:37 +0300 (MSK) (envelope-from yar) Date: Mon, 30 Oct 2006 15:34:37 +0300 From: Yar Tikhiy To: David Malone Message-ID: <20061030123437.GD27062@comp.chem.msu.su> References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061029152227.GA11826@walton.maths.tcd.ie> User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 12:34:53 -0000 On Sun, Oct 29, 2006 at 03:22:27PM +0000, David Malone wrote: > On Sun, Oct 29, 2006 at 05:07:16PM +0300, Yar Tikhiy wrote: > > Weird, eh? Any ideas what's going on? > > I would guess that you need a new vnode to create the new file, but no > vnodes are obvious candidates for freeing because they all have a child > directory in use. Is there some sort of vnode clearing that goes on every > second if we are short of vnodes? It seems to me that in Unix, when a process chdir's to a directory, the parent directory of the latter (and the whole chain of them up to the root dir) isn't kept busy. Is this untrue? -- Yar From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 12:51:57 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C650316A403 for ; Mon, 30 Oct 2006 12:51:57 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35F1A43D49 for ; Mon, 30 Oct 2006 12:51:57 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 61319EB3CE8; Mon, 30 Oct 2006 20:51:56 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id gHa965cO4PEc; Mon, 30 Oct 2006 20:51:47 +0800 (CST) Received: from [192.168.1.32] (unknown [221.216.129.118]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 6D0DDEB3CEB; Mon, 30 Oct 2006 20:51:47 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:x-enigmail-version:content-type; b=ejx3mCE0K/6ZdMvhEvFNv8uD/t4mCzYU9Adsup2Jz0us3+2gzMZ7N+vgAzY4VG7gd fAqMaPmBxVM2Tt+//2Ziw== Message-ID: <4545F539.90704@delphij.net> Date: Mon, 30 Oct 2006 20:51:05 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Peter Jeremy References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103151.GD871@turion.vk2pj.dyndns.org> In-Reply-To: <20061030103151.GD871@turion.vk2pj.dyndns.org> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig6301D9249DECF1A237027792" Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 12:51:57 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6301D9249DECF1A237027792 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Peter Jeremy wrote: > On Mon, 2006-Oct-30 19:38:49 +1100, Peter Jeremy wrote: >> the user is unaware that there are multiple links. I don't think >> that just unlinking the file and issuing a warning is a good solution >> because it's then virtually impossible to locate the other copy(s) >> of the file, which remains viewable. >=20 > I missed the fact that the warning message includes the inode number. > My apologies. This reduces "virtually impossible" to "hard". >=20 > I still think this current behaviour is undesirable and a security > hole. Maybe someone from the SO team would like to offer their > opinion - I might just have my tinfoil hat on too tight tonight. I think the concern of the removal is perfectly valid. It's possible that someone run: find secret/ -type f -exec rm {} + and there are zillions of files in secret/, causing the warning to be scrolled over. Also, it's possible that there is places that the user can not enter. Therefore, I agree that my checkin has introduced a security hole and we should fix it. I have posted a possible patch here and to cvs-all@ for review. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig6301D9249DECF1A237027792 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.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFRfU5OfuToMruuMARAyiJAJsEQaJfYSTDGNaBWYTyPbXrINqwAQCgjTFn mxIBWAa/jNuViRTOkaukyW8= =DUcK -----END PGP SIGNATURE----- --------------enig6301D9249DECF1A237027792-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 13:05:24 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73BAA16A47B for ; Mon, 30 Oct 2006 13:05:24 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id C676243D68 for ; Mon, 30 Oct 2006 13:05:22 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k9UD5KVR031448; Mon, 30 Oct 2006 16:05:20 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k9UD5K9c031444; Mon, 30 Oct 2006 16:05:20 +0300 (MSK) (envelope-from yar) Date: Mon, 30 Oct 2006 16:05:19 +0300 From: Yar Tikhiy To: Matt Emmerton Message-ID: <20061030130519.GE27062@comp.chem.msu.su> References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> User-Agent: Mutt/1.5.9i Cc: David Malone , hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 13:05:24 -0000 On Sun, Oct 29, 2006 at 11:32:58AM -0500, Matt Emmerton wrote: > [ Restoring some OP context.] > > > On Sun, Oct 29, 2006 at 05:07:16PM +0300, Yar Tikhiy wrote: > > > > > As for the said program, it keeps its 1 Hz pace, mostly waiting on > > > "vlruwk". It's killable, after a delay. The system doesn't show ... > > > > > > Weird, eh? Any ideas what's going on? > > > > I would guess that you need a new vnode to create the new file, but no > > vnodes are obvious candidates for freeing because they all have a child > > directory in use. Is there some sort of vnode clearing that goes on every > > second if we are short of vnodes? > > See sys/vfs_subr.c, subroutine getnewvnode(). We call msleep() if we're > waiting on vnodes to be created (or recycled). And just look at the 'hz' > parameter passed to msleep()! > > The calling process's mkdir() will end up waiting in getnewvnode() (in > "vlruwk" state) while the vnlru kernel thread does it's thing (which is to > recycle vnodes.) > > Either the vnlru kernel thread has to work faster, or the caller has to > sleep less, in order to avoid this lock-step behaviour. I'm afraid that, though your analysis is right, you arrive at wrong conclusions. The process waits for the whole second in getnewvnode() because the vnlru thread cannot free as much vnodes as it wants to. vnlru_proc() will wake up sleepers on vnlruproc_sig (i.e., getnewvnode()) only if (numvnodes <= desiredvnodes * 9 / 10). Whether this condition is attainable depends on vlrureclaim() (called from the vnlru thread) freeing vnodes at a sufficient rate. Perhaps vlrureclaim() just can't keep the pace at this conditions. debug.vnlru_nowhere increasing is an indication of that. Consequently, each getnewvnode() call sleeps 1 second, then grabs a vnode beyond desiredvnodes. It's no surprise that the 1 second delays start to appear after approx. kern.maxvnodes directories were created. Yar From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 13:32:36 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61F9416A403 for ; Mon, 30 Oct 2006 13:32:36 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id C34B443D70 for ; Mon, 30 Oct 2006 13:32:28 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k9UDWITT031839; Mon, 30 Oct 2006 16:32:19 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k9UDWIXJ031834; Mon, 30 Oct 2006 16:32:18 +0300 (MSK) (envelope-from yar) Date: Mon, 30 Oct 2006 16:32:18 +0300 From: Yar Tikhiy To: Matt Emmerton Message-ID: <20061030133218.GF27062@comp.chem.msu.su> References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> <20061030130519.GE27062@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061030130519.GE27062@comp.chem.msu.su> User-Agent: Mutt/1.5.9i Cc: David Malone , hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 13:32:36 -0000 On Mon, Oct 30, 2006 at 04:05:19PM +0300, Yar Tikhiy wrote: > On Sun, Oct 29, 2006 at 11:32:58AM -0500, Matt Emmerton wrote: > > [ Restoring some OP context.] > > > > > On Sun, Oct 29, 2006 at 05:07:16PM +0300, Yar Tikhiy wrote: > > > > > > > As for the said program, it keeps its 1 Hz pace, mostly waiting on > > > > "vlruwk". It's killable, after a delay. The system doesn't show ... > > > > > > > > Weird, eh? Any ideas what's going on? > > > > > > I would guess that you need a new vnode to create the new file, but no > > > vnodes are obvious candidates for freeing because they all have a child > > > directory in use. Is there some sort of vnode clearing that goes on every > > > second if we are short of vnodes? > > > > See sys/vfs_subr.c, subroutine getnewvnode(). We call msleep() if we're > > waiting on vnodes to be created (or recycled). And just look at the 'hz' > > parameter passed to msleep()! > > > > The calling process's mkdir() will end up waiting in getnewvnode() (in > > "vlruwk" state) while the vnlru kernel thread does it's thing (which is to > > recycle vnodes.) > > > > Either the vnlru kernel thread has to work faster, or the caller has to > > sleep less, in order to avoid this lock-step behaviour. > > I'm afraid that, though your analysis is right, you arrive at wrong > conclusions. The process waits for the whole second in getnewvnode() > because the vnlru thread cannot free as much vnodes as it wants to. > vnlru_proc() will wake up sleepers on vnlruproc_sig (i.e., > getnewvnode()) only if (numvnodes <= desiredvnodes * 9 / 10). > Whether this condition is attainable depends on vlrureclaim() (called > from the vnlru thread) freeing vnodes at a sufficient rate. Perhaps > vlrureclaim() just can't keep the pace at this conditions. > debug.vnlru_nowhere increasing is an indication of that. Consequently, > each getnewvnode() call sleeps 1 second, then grabs a vnode beyond > desiredvnodes. It's no surprise that the 1 second delays start to > appear after approx. kern.maxvnodes directories were created. Sorry, I hit the send button too early, before telling what my own conclusions were. Well, we may try to sleep less in getnewvnode(), or arrange the vnlru thread to wake up getnewvnode() after a failed attempt to free more vnodes, but this will mean unlimited growth of the number of allocated vnodes. Perhaps we should see what prevents vlrureclaim() from freeing enough vnodes to sustain the vnode pressure of the pattern at issue. -- Yar From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 13:48:16 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0805016A412 for ; Mon, 30 Oct 2006 13:48:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B02843D53 for ; Mon, 30 Oct 2006 13:48:14 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k9UDPi6v079499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Oct 2006 15:25:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id k9UDlbQm007338; Mon, 30 Oct 2006 15:47:37 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id k9UDlbEw007337; Mon, 30 Oct 2006 15:47:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 30 Oct 2006 15:47:37 +0200 From: Kostik Belousov To: Yar Tikhiy Message-ID: <20061030134737.GF1627@deviant.kiev.zoral.com.ua> References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> <20061030130519.GE27062@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Zi0sgQQBxRFxMTsj" Content-Disposition: inline In-Reply-To: <20061030130519.GE27062@comp.chem.msu.su> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: David Malone , hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 13:48:16 -0000 --Zi0sgQQBxRFxMTsj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 30, 2006 at 04:05:19PM +0300, Yar Tikhiy wrote: > On Sun, Oct 29, 2006 at 11:32:58AM -0500, Matt Emmerton wrote: > > [ Restoring some OP context.] > >=20 > > > On Sun, Oct 29, 2006 at 05:07:16PM +0300, Yar Tikhiy wrote: > > > > > > > As for the said program, it keeps its 1 Hz pace, mostly waiting on > > > > "vlruwk". It's killable, after a delay. The system doesn't show .= .. > > > > > > > > Weird, eh? Any ideas what's going on? > > > > > > I would guess that you need a new vnode to create the new file, but no > > > vnodes are obvious candidates for freeing because they all have a chi= ld > > > directory in use. Is there some sort of vnode clearing that goes on e= very > > > second if we are short of vnodes? > >=20 > > See sys/vfs_subr.c, subroutine getnewvnode(). We call msleep() if we're > > waiting on vnodes to be created (or recycled). And just look at the 'h= z' > > parameter passed to msleep()! > >=20 > > The calling process's mkdir() will end up waiting in getnewvnode() (in > > "vlruwk" state) while the vnlru kernel thread does it's thing (which is= to > > recycle vnodes.) > >=20 > > Either the vnlru kernel thread has to work faster, or the caller has to > > sleep less, in order to avoid this lock-step behaviour. >=20 > I'm afraid that, though your analysis is right, you arrive at wrong > conclusions. The process waits for the whole second in getnewvnode() > because the vnlru thread cannot free as much vnodes as it wants to. > vnlru_proc() will wake up sleepers on vnlruproc_sig (i.e., > getnewvnode()) only if (numvnodes <=3D desiredvnodes * 9 / 10). > Whether this condition is attainable depends on vlrureclaim() (called > from the vnlru thread) freeing vnodes at a sufficient rate. Perhaps > vlrureclaim() just can't keep the pace at this conditions. > debug.vnlru_nowhere increasing is an indication of that. Consequently, > each getnewvnode() call sleeps 1 second, then grabs a vnode beyond > desiredvnodes. It's no surprise that the 1 second delays start to > appear after approx. kern.maxvnodes directories were created. I think that David is right. The references _from_ the directory make it im= mune to vnode reclamation. Try this patch. It is very unfair for lsof. Index: sys/kern/vfs_subr.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/arch/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.685 diff -u -r1.685 vfs_subr.c --- sys/kern/vfs_subr.c 2 Oct 2006 07:25:58 -0000 1.685 +++ sys/kern/vfs_subr.c 30 Oct 2006 13:44:59 -0000 @@ -582,7 +582,7 @@ * If it's been deconstructed already, it's still * referenced, or it exceeds the trigger, skip it. */ - if (vp->v_usecount || !LIST_EMPTY(&(vp)->v_cache_src) || + if (vp->v_usecount || /* !LIST_EMPTY(&(vp)->v_cache_src) || */ (vp->v_iflag & VI_DOOMED) !=3D 0 || (vp->v_object !=3D NULL && vp->v_object->resident_page_count > trigger)) { VI_UNLOCK(vp); @@ -607,7 +607,7 @@ * interlock, the other thread will be unable to drop the * vnode lock before our VOP_LOCK() call fails. */ - if (vp->v_usecount || !LIST_EMPTY(&(vp)->v_cache_src) || + if (vp->v_usecount || /* !LIST_EMPTY(&(vp)->v_cache_src) || */ (vp->v_object !=3D NULL &&=20 vp->v_object->resident_page_count > trigger)) { VOP_UNLOCK(vp, LK_INTERLOCK, td); --Zi0sgQQBxRFxMTsj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFRgJ4C3+MBN1Mb4gRApbYAKC6yQr20AOAweGrOLEtgP7MicI3TQCfXGAa 4oj1SmtFfo6zWiKO+H441Nw= =dFO6 -----END PGP SIGNATURE----- --Zi0sgQQBxRFxMTsj-- From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 16:29:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B24816A407 for ; Sun, 29 Oct 2006 16:29:08 +0000 (UTC) (envelope-from S@mSmith.net) Received: from sebastian.foriru.co.uk (router.foriru.co.uk [82.152.78.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1ABDE43D6A for ; Sun, 29 Oct 2006 16:29:05 +0000 (GMT) (envelope-from S@mSmith.net) Received: from sebastian.foriru.co.uk (localhost [127.0.0.1]) by sebastian.foriru.co.uk (8.13.6/8.12.6) with ESMTP id k9TGT1D6020473 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Sun, 29 Oct 2006 16:29:03 GMT Received: from localhost (sams@localhost) by sebastian.foriru.co.uk (8.13.6/8.12.6/Submit) with ESMTP id k9TGSvtL002099 for ; Sun, 29 Oct 2006 16:28:58 GMT X-Authentication-Warning: sebastian.foriru.co.uk: sams owned process doing -bs Date: Sun, 29 Oct 2006 16:28:57 +0000 (GMT) From: Sam Smith X-X-Sender: sams@sebastian.foriru.co.uk To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Mon, 30 Oct 2006 14:25:29 +0000 Subject: UKUUG SysAdmin Conference in Manchester UK in March X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 Oct 2006 16:29:08 -0000 It would be good to get some sysadmin focussed freebsd talks from people based in the UK - we had a number last year which worked very well. Given the time scale, feel free to offer a half-formed idea and supply more details later. Regards Sam __START__ UKUUG's annual Large Installation Systems Administration (LISA) conference will take place in Manchester from 19-21 March 2007 - www.ukuug.org/events/spring2007 This is the UK's only conference aimed specifically at systems and network administrators. It attracts a large number of professionals from sites of all shapes and sizes. As well as the technical talks, the conference provides a friendly environment for delegates to meet, learn, and enjoy lively debate on a host of subjects. Tutorial The conference will be preceded by a tutorial or extended workshop. Recent past conferences have included sessions on: Perl for Systems Administrators; IPv6; Linux HA; Perl 6; Samba. If you would like to offer a tutorial that might interest our target audience, please submit a proposal. Conference We already have talks lined up on migrating to and using xen, using wmvare, and 2 talks from xensource - the authors of xen. We also have talks about Perl 6, for those who use Perl and those who have users who use Perl. We're still accepting talks; so if you are a systems administrator, we want to hear from you. We are seeking papers covering all aspects of systems and network administration: * operating systems * security and audit * ethics and legislative compliance * storage solutions * network file systems * databases and directory services * authentication and authorisation * nomadic and wireless computing * benchmarking and performance tuning * configuration management * scripting and task automation * cluster management If you have a novel solution to a problem, experience of a particular application or hardware platform, tips and tricks for fellow systems administrators, or a favourite tool you could talk about, please submit a paper for consideration by the programme committee. We are especially interested in talks which include some aspect of "Virtualisation, large-scale resource management and flexibility", and aim to have a stream covering many aspects of this topic. Quoting Tim O'Reilly: I really think that everyone in IT is going to be dealing with virtualisation over the next few years. There's too many compelling resource and energy issues to ignore it. Significant Dates Initial closing date for abstracts: 5th November 2006 To offer a talk, or make enquiries about a partially formed idea, email spring2007@ukuug.org For more information see www.ukuug.org/events/spring2007 From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 04:49:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E6FD416A407 for ; Mon, 30 Oct 2006 04:49:46 +0000 (UTC) (envelope-from gmohler@speedtoys.com) Received: from mail.vidnet.net (mail.vidnet.net [208.3.200.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1D3443D72 for ; Mon, 30 Oct 2006 04:49:44 +0000 (GMT) (envelope-from gmohler@speedtoys.com) Received: from mail.vidnet.net (localhost [127.0.0.1]) by mail.vidnet.net (8.13.1/8.13.1) with ESMTP id k9U4V51l017456 for ; Sun, 29 Oct 2006 22:31:05 -0600 (CST) (envelope-from gmohler@speedtoys.com) Received: from localhost (gmohler@localhost) by mail.vidnet.net (8.13.1/8.13.1/Submit) with ESMTP id k9U4V1MN017446 for ; Sun, 29 Oct 2006 22:31:05 -0600 (CST) (envelope-from gmohler@speedtoys.com) X-Authentication-Warning: mail.vidnet.net: gmohler owned process doing -bs Date: Sun, 29 Oct 2006 22:31:01 -0600 (CST) From: Geoff Mohler X-X-Sender: gmohler@mail.vidnet.net To: freebsd-hackers@freebsd.org Message-ID: <20061029222751.O17408@mail.vidnet.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Mon, 30 Oct 2006 14:26:16 +0000 Subject: NFS attr cache performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 04:49:47 -0000 Im looking for deep hacks into what I could do to make the 6.x NFS client hold a larger (or much larger) file/directory attribute cache. In very large make "everything" environments with Fbsd, we are about 1/3rd the speed of local disk coming from a very large Netapp box. The same make from a heavily patched/modified Linux NFS client is miles faster than local disk. I have no insight to the Linux modifications, but looking at the nfsstats, attribute calls are the bulk of the traffic to the NFS mounted file system. Any and all ideas are OK..maybe something simple I overlooked. I need to reserve another build server early this week, and go over my options again on whats not been working, and get the list numbers as well. Thanks in advance. From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 14:33:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C130416A511 for ; Mon, 30 Oct 2006 14:33:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70A8C43D49 for ; Mon, 30 Oct 2006 14:33:07 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 0468846CA7; Mon, 30 Oct 2006 09:33:07 -0500 (EST) Date: Mon, 30 Oct 2006 14:33:06 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Dave Clausen In-Reply-To: <45458BBE.6030103@endlessdream.org> Message-ID: <20061030142920.X76777@fledge.watson.org> References: <45458BBE.6030103@endlessdream.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Process arguments X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 14:33:07 -0000 On Mon, 30 Oct 2006, Dave Clausen wrote: > I'm a n00b to the FreeBSD kernel and I'm trying to log all commands run on > the command line from within the kernel for security purposes by loading a > kernel module which redefines execve(). I've successfully created the KLD > and have it working, but am having problems saving the command's arguments. > Could anyone point me to where in the kernel I should be looking for the > arguments sent to the process? p->p_args gives me the parent process's > cmdname only (sh, in this case), and uap->argv is just the relative pathname > of uap->fname. Ideally, I'd like the user, full command line, and cwd > logged for each command entered. As of FreeBSD 6.2, you can use our security audit subsystem to do this. There's a FreeBSD handbook chapter with the details, but the short version is: - Enable options AUDIT in your kernel. This enables kernel audit support. - Add auditd_enable="YES" to /etc/rc.conf. This turns on the audit daemon. - Modify the flags and naflags entries in /etc/security/audit_control to be lo,+ex -- the +ex means "log successful executions". - Add ,argv to the policy line in /etc/security/audit_control. This causes auditing of the full command line, not just the program run. - Reboot. You can then extract complete command lines (among other things) from trails in /var/audit, or watch them live by running praudit on /dev/auditpipe. FYI: Audit support is considered experimental in 6.2, as there are some areas that need testing and/or are not complete. However, it works quite well in practice, and any feedback would be most welcome. Robert N M Watson Computer Laboratory University of Cambridge > > Here's an example of what I've been working away on: > > int > new_execve (struct thread *td, struct execve_args *uap) > { > char *user; > struct proc *p = td->td_proc; > > user = p->p_pgrp->pg_session->s_login; > if (p->p_ucred->cr_ruid == 1001) { > printf("%s %d %s\n", user, p->p_pid, uap->fname); > } > return (execve(td,uap)); > } > > Running 'ls -al' with the above, I get the username, pid, and absolute > filename printed such as, but can't find the actual arguments: > dave 6689 /bin/ls > > Any help would be appreciated. > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 14:41:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0443816A417 for ; Mon, 30 Oct 2006 14:41:28 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2BDB43D68 for ; Mon, 30 Oct 2006 14:41:25 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id k9UEfNeQ020172; Mon, 30 Oct 2006 08:41:23 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <45460F15.8020109@centtech.com> Date: Mon, 30 Oct 2006 08:41:25 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.7 (X11/20061015) MIME-Version: 1.0 To: Geoff Mohler References: <20061029222751.O17408@mail.vidnet.net> In-Reply-To: <20061029222751.O17408@mail.vidnet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2131/Sun Oct 29 16:00:12 2006 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-hackers@freebsd.org Subject: Re: NFS attr cache performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 14:41:28 -0000 On 10/29/06 22:31, Geoff Mohler wrote: > Im looking for deep hacks into what I could do to make the 6.x NFS client > hold a larger (or much larger) file/directory attribute cache. > > In very large make "everything" environments with Fbsd, we are about 1/3rd > the speed of local disk coming from a very large Netapp box. > > The same make from a heavily patched/modified Linux NFS client is miles > faster than local disk. > > I have no insight to the Linux modifications, but looking at the nfsstats, > attribute calls are the bulk of the traffic to the NFS mounted file > system. > > Any and all ideas are OK..maybe something simple I overlooked. > > I need to reserve another build server early this week, and go over my > options again on whats not been working, and get the list numbers as well. > > Thanks in advance. See Bruce Evans very recent work on this on freebsd-fs@ mailing list. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 15:43:10 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E71116A416 for ; Mon, 30 Oct 2006 15:43:10 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CEB643D67 for ; Mon, 30 Oct 2006 15:42:52 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k9UFggdZ033983; Mon, 30 Oct 2006 18:42:42 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k9UFggb7033981; Mon, 30 Oct 2006 18:42:42 +0300 (MSK) (envelope-from yar) Date: Mon, 30 Oct 2006 18:42:41 +0300 From: Yar Tikhiy To: Kostik Belousov Message-ID: <20061030154241.GI27062@comp.chem.msu.su> References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> <20061030130519.GE27062@comp.chem.msu.su> <20061030134737.GF1627@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061030134737.GF1627@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 15:43:10 -0000 On Mon, Oct 30, 2006 at 03:47:37PM +0200, Kostik Belousov wrote: > > I think that David is right. The references _from_ the directory make it immune > to vnode reclamation. Try this patch. It is very unfair for lsof. Sorry, but I'm leaving now and I'll be unable to play with your patch until I return in a fortnight. I hope I'll have a bit of free time to study our modern namei cache design while off-line. :-) -- Yar From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 18:03:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1200816A527 for ; Mon, 30 Oct 2006 18:03:36 +0000 (UTC) (envelope-from rottled@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id D89BC43D6B for ; Mon, 30 Oct 2006 18:03:29 +0000 (GMT) (envelope-from rottled@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so1027313uge for ; Mon, 30 Oct 2006 10:03:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=EpzfRtHDcICxedemcJJn7ss13yS89iQrFk2xd1J0JmXbaOjMhepT67pwjVWV0Qd5+LX/wxfJgiBgig5aVsj0H1QCQklO5OKvel02en6mtneYbrv8V0yEYn1LYiJe2f8YOlh5PeCAEov1ZQG3LETUbqFx36eMx4gyPwHrjqFKoVs= Received: by 10.82.101.3 with SMTP id y3mr808938bub; Mon, 30 Oct 2006 10:02:55 -0800 (PST) Received: by 10.82.101.19 with HTTP; Mon, 30 Oct 2006 10:02:55 -0800 (PST) Message-ID: <54b90fdf0610301002i1d988c80wf62d31645c38d683@mail.gmail.com> Date: Mon, 30 Oct 2006 13:02:55 -0500 From: Yan To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Obtaining used pages on process exit? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 18:03:36 -0000 Hello, I am currently writing my first kernel module to extract data from the kernel and bring it into user-space. As I understand, FreeBSD only loads pages of the text segment that it is about to use by registering its handler for page faults, and bringing in more pages from the binary as needed. I want to track this progress, and report the amount of pages it brought in on process exit. The current idea I have and the path I'm following is as follows: I register a callback in my module using EVENTHANDLER_REGISTER, using 'process_exit' name. That gives me the proc structure on exit, I then try to find the information I need using the p_vmspace member, and try using vm_tsize for the number of pages. But this is the number of pages in the virtual address space of the text segment, which does not correlate to how many pages were actually brought in. For the context of this, I am trying to write a tiny utility, that watches the execution of a process, and tracks how many pages were actually used during its execution. It passes that knowledge to a hopefully-to-be-written user-space utility that generates a new binary using only those pages for the text segment. (If an execution was to go outside that, a seg fault is okay.) Any help is appreciated. Thanks, Yan From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 18:45:23 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8033816A407; Mon, 30 Oct 2006 18:45:23 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80DBF43D4C; Mon, 30 Oct 2006 18:45:22 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c58-107-94-118.belrs4.nsw.optusnet.com.au [58.107.94.118]) by mail28.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k9UIj8ZD026209 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 31 Oct 2006 05:45:09 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id k9UIj8gg003487; Tue, 31 Oct 2006 05:45:08 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id k9UIj85F003486; Tue, 31 Oct 2006 05:45:08 +1100 (EST) (envelope-from peter) Date: Tue, 31 Oct 2006 05:45:08 +1100 From: Peter Jeremy To: LI Xin Message-ID: <20061030184508.GE871@turion.vk2pj.dyndns.org> References: <200610300332.k9U3W9xF099044@repoman.freebsd.org> <20061030090054.GC871@turion.vk2pj.dyndns.org> <4545C86A.1030008@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9l24NVCWtSuIVIod" Content-Disposition: inline In-Reply-To: <4545C86A.1030008@delphij.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI , cvs-all@FreeBSD.ORG, cvs-src@FreeBSD.ORG Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 18:45:23 -0000 --9l24NVCWtSuIVIod Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 2006-Oct-30 17:39:54 +0800, LI Xin wrote: >Well thought, I think that you are correct that specifying -P should do >nothing but generate a warning. > >In addition to this I have changed the behavior a bit (patch attached) >that, if -f is specified along with -P, the overwritten is happen and >the link would be removed. Please let me know if you are happy with >this change. I prefer this patch to what was committed. It still has foot-shooting potential but I don't believe that there have been massive screams about the current -P behaviour so presumably not too many people have accidently destroyed the content of a file they still wanted when deleting an unwanted link to the file. IMHO, rm.1 should explicitly state that "rm -fP" on a multi-linked file will destry the file contents as seen via the remaining link(s). This probably belongs in the "NOTE" section. --=20 Peter Jeremy --9l24NVCWtSuIVIod Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFRkg0/opHv/APuIcRAukbAJ9K4uYUcvlcYYxJ3yK65aaOmGqN0gCdFh/w W7x3Wgznu6+ojtacJGsiw5c= =S+e2 -----END PGP SIGNATURE----- --9l24NVCWtSuIVIod-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 18:47:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2531E16A415 for ; Mon, 30 Oct 2006 18:47:01 +0000 (UTC) (envelope-from dave@endlessdream.org) Received: from endlessdream.org (mail.dammcomputers.com [63.246.134.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF82C43D49 for ; Mon, 30 Oct 2006 18:46:54 +0000 (GMT) (envelope-from dave@endlessdream.org) Received: from [192.168.1.106] [70.126.42.209] by endlessdream.org with ESMTP (SMTPD32-8.15) id A8F5DF0186; Mon, 30 Oct 2006 13:48:21 -0500 Message-ID: <45464960.6090707@endlessdream.org> Date: Mon, 30 Oct 2006 13:50:08 -0500 From: Dave Clausen User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Ganbold References: <45458BBE.6030103@endlessdream.org> <45459C25.1060909@micom.mng.net> In-Reply-To: <45459C25.1060909@micom.mng.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Process arguments X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 18:47:01 -0000 > > If I'm not mistaken pjd@ has written similar module which is called > lrexec for RELENG_4 and RELENG_5. See his web site. > Also recently rwatson@ enabled audit support in RELENG_6 and CURRENT, > though I don't know yet whether it can log arguments. Great, lrexec was exactly what I was looking for. Thanks for your help! From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 18:51:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE0AC16A403 for ; Mon, 30 Oct 2006 18:51:08 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 17F0243DB5 for ; Mon, 30 Oct 2006 18:50:47 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 21719 invoked by uid 399); 30 Oct 2006 18:50:46 -0000 Received: from localhost (HELO ?192.168.0.7?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 30 Oct 2006 18:50:46 -0000 Message-ID: <45464984.1040602@FreeBSD.org> Date: Mon, 30 Oct 2006 10:50:44 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Peter Jeremy References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> In-Reply-To: <20061030083849.GB871@turion.vk2pj.dyndns.org> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com, delphij@FreeBSD.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 18:51:08 -0000 Peter Jeremy wrote: > On Sun, 2006-Oct-29 18:11:54 -0800, perryh@pluto.rain.com wrote: >> I think a very strong case can be made that the *intent* of -P -- >> to prevent retrieval of the contents by reading the filesystem's >> free space -- implies that it should affect only the "real" removal >> of the file, when its blocks are released because the link count >> has become zero. > ... >> In this interpretation, "rm -P" when the link count exceeds 1 is >> an erroneous command. > > I agree. Doing "rm -P" on a file with multiple links suggests that > the user is unaware that there are multiple links. I don't think > that just unlinking the file and issuing a warning is a good solution > because it's then virtually impossible to locate the other copy(s) > of the file, which remains viewable. I believe this is a security > hole. > > Consider: In FreeBSD, it is possible to create a hardlink to a file if > you are not the owner, even if you can't read it. Mallory may decide > to create hardlinks to Alice's files, even if he can't read them today > on the off-chance that he may be able to circumvent the protections at > a later date. Unless Alice notices that her file has a second link > before she deletes it, when she issues "rm -P", she will lose her link > to the file (and her only way of uniquely identifying it) whilst > leaving the remaining link to the file in Mallory's control. I think Peter is right here. I recently patched the -P option to error out if a file is unwritable. I think that is the correct behavior here too. If the file is not removed, then it is correct for rm to exit with an rc > 0. Another poster mentioned the case of using rm in a script, or for a large directory where this kind of warning might get missed, which is one of the reasons I think it needs to exit with an error code. My suggestion would be to change warnx() to errx(), and drop the return(1); from that patch. If there are no objections I'll do it myself if no one gets to it first. In any case I think that this is a good addition to the code, and I'm glad that this issue was raised. Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 19:16:16 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7EBAC16A412; Mon, 30 Oct 2006 19:16:16 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB8D743D45; Mon, 30 Oct 2006 19:16:11 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 06DFF5B82; Mon, 30 Oct 2006 11:16:11 -0800 (PST) To: Doug Barton In-reply-to: Your message of "Mon, 30 Oct 2006 10:50:44 PST." <45464984.1040602@FreeBSD.org> Date: Mon, 30 Oct 2006 11:16:10 -0800 From: Bakul Shah Message-Id: <20061030191611.06DFF5B82@mail.bitblocks.com> Cc: perryh@pluto.rain.com, delphij@FreeBSD.org, freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 19:16:16 -0000 Sorry if I tuned in late:-) I vote for taking *out* -P. It is an ill-designed feature. Or if you keep it, also add it to mv, cp -f & ln -f since these commands can also unlink a file and once unlinked in this matter you can't scrub it. And also fix up the behavior for -P when multiple links. And since mv can use rename(2), you will have to also dirty up the kernel interface somehow. Not to mention even editing such a sensitive file can leave stuff all over the disk that a bad guy can get at. If you are truely paranoid (as opposed to paranoid only when on meds) you know how bad that is! If you are that concious about scrubbing why not add scrubbing as a mount option (suggested option: -o paranoid) then at least it will be handled consistently. What's the world come to when even the paranoid are such amateurs. -- bakul Doug Barton writes: > Peter Jeremy wrote: > > On Sun, 2006-Oct-29 18:11:54 -0800, perryh@pluto.rain.com wrote: > >> I think a very strong case can be made that the *intent* of -P -- > >> to prevent retrieval of the contents by reading the filesystem's > >> free space -- implies that it should affect only the "real" removal > >> of the file, when its blocks are released because the link count > >> has become zero. > > ... > >> In this interpretation, "rm -P" when the link count exceeds 1 is > >> an erroneous command. > > > > I agree. Doing "rm -P" on a file with multiple links suggests that > > the user is unaware that there are multiple links. I don't think > > that just unlinking the file and issuing a warning is a good solution > > because it's then virtually impossible to locate the other copy(s) > > of the file, which remains viewable. I believe this is a security > > hole. > > > > Consider: In FreeBSD, it is possible to create a hardlink to a file if > > you are not the owner, even if you can't read it. Mallory may decide > > to create hardlinks to Alice's files, even if he can't read them today > > on the off-chance that he may be able to circumvent the protections at > > a later date. Unless Alice notices that her file has a second link > > before she deletes it, when she issues "rm -P", she will lose her link > > to the file (and her only way of uniquely identifying it) whilst > > leaving the remaining link to the file in Mallory's control. > > I think Peter is right here. I recently patched the -P option to error > out if a file is unwritable. I think that is the correct behavior here > too. If the file is not removed, then it is correct for rm to exit > with an rc > 0. Another poster mentioned the case of using rm in a > script, or for a large directory where this kind of warning might get > missed, which is one of the reasons I think it needs to exit with an > error code. > > My suggestion would be to change warnx() to errx(), and drop the > return(1); from that patch. If there are no objections I'll do it > myself if no one gets to it first. > > In any case I think that this is a good addition to the code, and I'm > glad that this issue was raised. > > Doug > > -- > > This .signature sanitized for your protection > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 19:32:45 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADF4516A514 for ; Mon, 30 Oct 2006 19:32:45 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id D7F8343E1A for ; Mon, 30 Oct 2006 19:26:19 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 17685 invoked by uid 399); 30 Oct 2006 19:26:11 -0000 Received: from localhost (HELO ?192.168.0.7?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 30 Oct 2006 19:26:11 -0000 Message-ID: <454651D0.6090208@FreeBSD.org> Date: Mon, 30 Oct 2006 11:26:08 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Bakul Shah References: <20061030191611.06DFF5B82@mail.bitblocks.com> In-Reply-To: <20061030191611.06DFF5B82@mail.bitblocks.com> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: perryh@pluto.rain.com, delphij@FreeBSD.org, freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 19:32:45 -0000 Bakul Shah wrote: > Sorry if I tuned in late:-) > > I vote for taking *out* -P. It is an ill-designed feature. > Or if you keep it, also add it to mv, cp -f & ln -f since > these commands can also unlink a file and once unlinked in > this matter you can't scrub it. And also fix up the behavior > for -P when multiple links. And since mv can use rename(2), > you will have to also dirty up the kernel interface somehow. > Not to mention even editing such a sensitive file can leave > stuff all over the disk that a bad guy can get at. If you > are truely paranoid (as opposed to paranoid only when on > meds) you know how bad that is! > > If you are that concious about scrubbing why not add > scrubbing as a mount option (suggested option: -o paranoid) > then at least it will be handled consistently. The patches to implement your suggestions didn't make it through on this message. Please feel free to post them for review and send the URL to the list. Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 19:48:48 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6488B16A403; Mon, 30 Oct 2006 19:48:48 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8FF743D5A; Mon, 30 Oct 2006 19:48:47 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 6C3935B82; Mon, 30 Oct 2006 11:48:44 -0800 (PST) To: Doug Barton In-reply-to: Your message of "Mon, 30 Oct 2006 11:26:08 PST." <454651D0.6090208@FreeBSD.org> Date: Mon, 30 Oct 2006 11:48:44 -0800 From: Bakul Shah Message-Id: <20061030194844.6C3935B82@mail.bitblocks.com> Cc: perryh@pluto.rain.com, delphij@FreeBSD.org, freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 19:48:48 -0000 Doug Barton writes: > Bakul Shah wrote: > > Sorry if I tuned in late:-) > > > > I vote for taking *out* -P. It is an ill-designed feature. > > Or if you keep it, also add it to mv, cp -f & ln -f since > > these commands can also unlink a file and once unlinked in > > this matter you can't scrub it. And also fix up the behavior > > for -P when multiple links. And since mv can use rename(2), > > you will have to also dirty up the kernel interface somehow. > > Not to mention even editing such a sensitive file can leave > > stuff all over the disk that a bad guy can get at. If you > > are truely paranoid (as opposed to paranoid only when on > > meds) you know how bad that is! > > > > If you are that concious about scrubbing why not add > > scrubbing as a mount option (suggested option: -o paranoid) > > then at least it will be handled consistently. > > The patches to implement your suggestions didn't make it through on > this message. Please feel free to post them for review and send the > URL to the list. Writing code is the easy part, too easy in fact, which is part of the problem. Interface changes need to be discussed and made carefully. But since you asked, here's the patch to remove -P from rm. Index: rm.c =================================================================== RCS file: /home/ncvs/src/bin/rm/rm.c,v retrieving revision 1.54 diff -w -u -b -r1.54 rm.c --- rm.c 15 Apr 2006 09:26:23 -0000 1.54 +++ rm.c 30 Oct 2006 19:43:40 -0000 @@ -57,7 +57,11 @@ #include #include +#ifdef HALF_PARANOID int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok; +#else +int dflag, eval, fflag, iflag, vflag, Wflag, stdin_ok; +#endif int rflag, Iflag; uid_t uid; @@ -66,7 +70,9 @@ void checkdot(char **); void checkslash(char **); void rm_file(char **); +#ifdef HALF_PARANOID int rm_overwrite(char *, struct stat *); +#endif void rm_tree(char **); void usage(void); @@ -103,8 +109,13 @@ exit(eval); } +#ifdef HALF_PARANOID Pflag = rflag = 0; while ((ch = getopt(argc, argv, "dfiIPRrvW")) != -1) +#else + rflag = 0; + while ((ch = getopt(argc, argv, "dfiIRrvW")) != -1) +#endif switch(ch) { case 'd': dflag = 1; @@ -120,9 +131,11 @@ case 'I': Iflag = 1; break; +#ifdef HALF_PARANOID case 'P': Pflag = 1; break; +#endif case 'R': case 'r': /* Compatibility. */ rflag = 1; @@ -289,9 +302,11 @@ continue; /* FALLTHROUGH */ default: +#ifdef HALF_PARANOID if (Pflag) if (!rm_overwrite(p->fts_accpath, NULL)) continue; +#endif rval = unlink(p->fts_accpath); if (rval == 0 || (fflag && errno == ENOENT)) { if (rval == 0 && vflag) @@ -357,9 +372,11 @@ else if (S_ISDIR(sb.st_mode)) rval = rmdir(f); else { +#ifdef HALF_PARANOID if (Pflag) if (!rm_overwrite(f, &sb)) continue; +#endif rval = unlink(f); } } @@ -372,6 +389,7 @@ } } +#ifdef HALF_PARANOID /* * rm_overwrite -- * Overwrite the file 3 times with varying bit patterns. @@ -436,7 +454,7 @@ warn("%s", file); return (0); } - +#endif int check(char *path, char *name, struct stat *sp) @@ -462,6 +480,7 @@ strmode(sp->st_mode, modep); if ((flagsp = fflagstostr(sp->st_flags)) == NULL) err(1, "fflagstostr"); +#ifdef HALF_PARANOID if (Pflag) errx(1, "%s: -P was specified, but file is not writable", @@ -472,6 +491,7 @@ group_from_gid(sp->st_gid, 0), *flagsp ? flagsp : "", *flagsp ? " " : "", path); +#endif free(flagsp); } (void)fflush(stderr); @@ -583,7 +603,11 @@ { (void)fprintf(stderr, "%s\n%s\n", +#ifdef HALF_PARANOID "usage: rm [-f | -i] [-dIPRrvW] file ...", +#else + "usage: rm [-f | -i] [-dIRrvW] file ...", +#endif " unlink file"); exit(EX_USAGE); } From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 20:20:33 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7880316A4A0 for ; Mon, 30 Oct 2006 20:20:33 +0000 (UTC) (envelope-from simon@zaphod.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC81143D49 for ; Mon, 30 Oct 2006 20:20:32 +0000 (GMT) (envelope-from simon@zaphod.nitro.dk) Received: from zaphod.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 26C9D386C03; Mon, 30 Oct 2006 20:20:02 +0000 (UTC) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id 0F26D1141D; Mon, 30 Oct 2006 21:20:31 +0100 (CET) Date: Mon, 30 Oct 2006 21:20:31 +0100 From: "Simon L. Nielsen" To: Peter Jeremy Message-ID: <20061030202030.GB1043@zaphod.nitro.dk> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103151.GD871@turion.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061030103151.GD871@turion.vk2pj.dyndns.org> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 20:20:33 -0000 On 2006.10.30 21:31:51 +1100, Peter Jeremy wrote: > On Mon, 2006-Oct-30 19:38:49 +1100, Peter Jeremy wrote: > >the user is unaware that there are multiple links. I don't think > >that just unlinking the file and issuing a warning is a good solution > >because it's then virtually impossible to locate the other copy(s) > >of the file, which remains viewable. > > I missed the fact that the warning message includes the inode number. > My apologies. This reduces "virtually impossible" to "hard". > > I still think this current behaviour is undesirable and a security > hole. Maybe someone from the SO team would like to offer their > opinion - I might just have my tinfoil hat on too tight tonight. Personally I think rm should do what you ask it to do - if you ask it to overwrite a file which has multiple links, well... though luck. I guess rm exiting for antifootshoot without -f can be OK, that's still very visible to the user. What's currently in -CURRENT is probably a bad idea since you might end up with a file which you thought you had deleted, but in fact you haven't. That said, I wouldn't trust -P to _really_ remove the content of the files anyway, so personally I don't really care much. If you want the file to be gone, use encryption in the first place, or use apropriate tool (hammer, axe, C4, etc.). -- Simon L. Nielsen From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 20:20:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0E6B16A4D4 for ; Mon, 30 Oct 2006 20:20:36 +0000 (UTC) (envelope-from tim1timau@yahoo.com) Received: from web50311.mail.yahoo.com (web50311.mail.yahoo.com [206.190.39.202]) by mx1.FreeBSD.org (Postfix) with SMTP id B044843D5F for ; Mon, 30 Oct 2006 20:20:34 +0000 (GMT) (envelope-from tim1timau@yahoo.com) Received: (qmail 99458 invoked by uid 60001); 30 Oct 2006 20:20:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=wy/ReToo6NF/BqnG/1I5AefwTWY0T68Xbfeu3TBHmVxTzK2nLZWe+HCVHoQwvgEZU7Y56lx2UKkjbJ1T6WkMwSx6S/DeH+IKcnlRj1bgQtXpz75scDPyFsfQP1WEE9pbGWae+RCKAyDJWEaDO2YceH8u7Nfd0p1ZEGJ/YUScfL0= ; Message-ID: <20061030202034.99456.qmail@web50311.mail.yahoo.com> Received: from [210.0.100.149] by web50311.mail.yahoo.com via HTTP; Mon, 30 Oct 2006 12:20:33 PST Date: Mon, 30 Oct 2006 12:20:33 -0800 (PST) From: Tim Clewlow To: Bakul Shah , Doug Barton In-Reply-To: <20061030191611.06DFF5B82@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: delphij@FreeBSD.org, perryh@pluto.rain.com, freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 20:20:36 -0000 --- Bakul Shah wrote: > Sorry if I tuned in late:-) > > I vote for taking *out* -P. It is an ill-designed > feature. > Or if you keep it, also add it to mv, cp -f & ln -f > since > these commands can also unlink a file and once > unlinked in > this matter you can't scrub it. And also fix up the > behavior > for -P when multiple links. And since mv can use > rename(2), > you will have to also dirty up the kernel interface > somehow. > Not to mention even editing such a sensitive file > can leave > stuff all over the disk that a bad guy can get at. > If you > are truely paranoid (as opposed to paranoid only > when on > meds) you know how bad that is! > > If you are that concious about scrubbing why not add > scrubbing as a mount option (suggested option: -o > paranoid) > then at least it will be handled consistently. > > What's the world come to when even the paranoid are > such > amateurs. > > -- bakul > Based on all the potential situations where a -P option may possibly be implemented, is it worthwhile considering creating a command that just scrubs a file, and does nothing else. This would seem to fit the Unix paradigm of single command to do a single thing, and may be preferable to attempting to embed this function in every command that may "possibly" remove a file. Just my 2c Tim ____________________________________________________________________________________ Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates (http://voice.yahoo.com) From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 21:05:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36C0E16A510 for ; Mon, 30 Oct 2006 21:05:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 3761143D64 for ; Mon, 30 Oct 2006 21:05:16 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 17452 invoked by uid 399); 30 Oct 2006 21:05:15 -0000 Received: from localhost (HELO ?192.168.0.7?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 30 Oct 2006 21:05:15 -0000 Message-ID: <45466902.5090603@FreeBSD.org> Date: Mon, 30 Oct 2006 13:05:06 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: "Simon L. Nielsen" References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103151.GD871@turion.vk2pj.dyndns.org> <20061030202030.GB1043@zaphod.nitro.dk> In-Reply-To: <20061030202030.GB1043@zaphod.nitro.dk> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: perryh@pluto.rain.com, freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 21:05:17 -0000 Simon L. Nielsen wrote: > Personally I think rm should do what you ask it to do - if you ask it > to overwrite a file which has multiple links, well... though luck. Sorry, I disagree. It's not always obvious to the user when a file has hard links, and I can't see any situation where the pre-recent-patch behavior (overwriting the actual file when using -P on a hard link) is the expected outcome. It's all well and good to say, "tough luck," but I don't think that's what our users expect. Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 21:17:23 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A146616A4A0 for ; Mon, 30 Oct 2006 21:17:23 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id 3C8AD43DD6 for ; Mon, 30 Oct 2006 21:16:43 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 54276 invoked by uid 1001); 30 Oct 2006 21:17:05 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Mon, 30 Oct 2006 16:17:05 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17734.27601.79021.873705@bhuda.mired.org> Date: Mon, 30 Oct 2006 16:17:05 -0500 To: Doug Barton In-Reply-To: <45466902.5090603@FreeBSD.org> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103151.GD871@turion.vk2pj.dyndns.org> <20061030202030.GB1043@zaphod.nitro.dk> <45466902.5090603@FreeBSD.org> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com, "Simon L. Nielsen" Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 21:17:23 -0000 In <45466902.5090603@FreeBSD.org>, Doug Barton typed: > Simon L. Nielsen wrote: > > Personally I think rm should do what you ask it to do - if you ask it > > to overwrite a file which has multiple links, well... though luck. > It's all well and good to say, "tough luck," but I don't think that's > what our users expect. I'm a user. It's what I expect. If I wanted an OS that protected me from myself, I wouldn't be running Unix. Please give me the rope I need to get the job done. If that happens to be enough that I can hang myself, and I sometimes do - well, I got what I asked for. When I want to be coddled, I'll run a different OS. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 00:14:11 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19B7416A407 for ; Tue, 31 Oct 2006 00:14:11 +0000 (UTC) (envelope-from fcash@ocis.net) Received: from smtp.sd73.bc.ca (smtp.sd73.bc.ca [142.24.13.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2E8F43D45 for ; Tue, 31 Oct 2006 00:14:10 +0000 (GMT) (envelope-from fcash@ocis.net) Received: from localhost (localhost [127.0.0.1]) by localhost.sd73.bc.ca (Postfix) with ESMTP id 6C1688A0050 for ; Mon, 30 Oct 2006 16:14:10 -0800 (PST) Received: from smtp.sd73.bc.ca ([127.0.0.1]) by localhost (smtp.sd73.bc.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26682-04 for ; Mon, 30 Oct 2006 16:14:04 -0800 (PST) Received: from s10.sbo (s10.sbo [192.168.0.10]) by smtp.sd73.bc.ca (Postfix) with ESMTP id F28988A0071 for ; Mon, 30 Oct 2006 16:14:03 -0800 (PST) From: Freddie Cash To: freebsd-hackers@freebsd.org Date: Mon, 30 Oct 2006 16:13:59 -0800 User-Agent: KMail/1.9.5 References: <20061029222847.GA68272@marvin.astase.com> <45466902.5090603@FreeBSD.org> <17734.27601.79021.873705@bhuda.mired.org> In-Reply-To: <17734.27601.79021.873705@bhuda.mired.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610301613.59298.fcash@ocis.net> X-Virus-Scanned: by amavisd-new using ClamAV at sd73.bc.ca Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 00:14:11 -0000 On Monday 30 October 2006 01:17 pm, Mike Meyer wrote: > In <45466902.5090603@FreeBSD.org>, Doug Barton typed: > > Simon L. Nielsen wrote: > > > Personally I think rm should do what you ask it to do - if you ask > > > it to overwrite a file which has multiple links, well... though > > > luck. > > > > It's all well and good to say, "tough luck," but I don't think that's > > what our users expect. > > I'm a user. It's what I expect. If I wanted an OS that protected me > from myself, I wouldn't be running Unix. Please give me the rope I > need to get the job done. If that happens to be enough that I can hang > myself, and I sometimes do - well, I got what I asked for. When I want > to be coddled, I'll run a different OS. Isn't that what the -f option is for in every command? By default, be conservative in what you do (error out with nice messages when in doubt). If the user knows what they are doing then let them specify -f. -- Freddie Cash fcash@ocis.net From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 00:22:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41DD116A403 for ; Tue, 31 Oct 2006 00:22:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 174B243D83 for ; Tue, 31 Oct 2006 00:22:23 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 3446 invoked by uid 399); 31 Oct 2006 00:22:23 -0000 Received: from localhost (HELO ?192.168.0.7?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 31 Oct 2006 00:22:23 -0000 Message-ID: <4546973C.1060900@FreeBSD.org> Date: Mon, 30 Oct 2006 16:22:20 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Mike Meyer References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103151.GD871@turion.vk2pj.dyndns.org> <20061030202030.GB1043@zaphod.nitro.dk> <45466902.5090603@FreeBSD.org> <17734.27601.79021.873705@bhuda.mired.org> In-Reply-To: <17734.27601.79021.873705@bhuda.mired.org> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com, "Simon L. Nielsen" Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 00:22:26 -0000 Mike Meyer wrote: > In <45466902.5090603@FreeBSD.org>, Doug Barton typed: >> Simon L. Nielsen wrote: >>> Personally I think rm should do what you ask it to do - if you ask it >>> to overwrite a file which has multiple links, well... though luck. >> It's all well and good to say, "tough luck," but I don't think that's >> what our users expect. > > I'm a user. It's what I expect. I would argue that the average reader of the -hackers list is pretty far on one end or the other of the "FreeBSD Users" bell-shaped curve. > If I wanted an OS that protected me > from myself, I wouldn't be running Unix. Please give me the rope I > need to get the job done. If that happens to be enough that I can hang > myself, and I sometimes do - well, I got what I asked for. When I want > to be coddled, I'll run a different OS. I'm not suggesting taking the rope away from you, I'm suggesting putting it on another shelf (so to speak). Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 19:09:55 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB00D16A515 for ; Mon, 30 Oct 2006 19:09:55 +0000 (UTC) (envelope-from gmohler@speedtoys.com) Received: from mail.vidnet.net (mail.vidnet.net [208.3.200.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id A62A843E4C for ; Mon, 30 Oct 2006 19:05:28 +0000 (GMT) (envelope-from gmohler@speedtoys.com) Received: from mail.vidnet.net (localhost [127.0.0.1]) by mail.vidnet.net (8.13.1/8.13.1) with ESMTP id k9UIkYJ0053598; Mon, 30 Oct 2006 12:46:34 -0600 (CST) (envelope-from gmohler@speedtoys.com) Received: from localhost (gmohler@localhost) by mail.vidnet.net (8.13.1/8.13.1/Submit) with ESMTP id k9UIkThu053588; Mon, 30 Oct 2006 12:46:34 -0600 (CST) (envelope-from gmohler@speedtoys.com) X-Authentication-Warning: mail.vidnet.net: gmohler owned process doing -bs Date: Mon, 30 Oct 2006 12:46:28 -0600 (CST) From: Geoff Mohler X-X-Sender: gmohler@mail.vidnet.net To: Eric Anderson In-Reply-To: <45460F15.8020109@centtech.com> Message-ID: <20061030124625.A52830@mail.vidnet.net> References: <20061029222751.O17408@mail.vidnet.net> <45460F15.8020109@centtech.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Tue, 31 Oct 2006 00:35:17 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: NFS attr cache performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 Oct 2006 19:09:55 -0000 I will do that, thanks! On Mon, 30 Oct 2006, Eric Anderson wrote: > On 10/29/06 22:31, Geoff Mohler wrote: >> Im looking for deep hacks into what I could do to make the 6.x NFS client >> hold a larger (or much larger) file/directory attribute cache. >> >> In very large make "everything" environments with Fbsd, we are about 1/3rd >> the speed of local disk coming from a very large Netapp box. >> >> The same make from a heavily patched/modified Linux NFS client is miles >> faster than local disk. >> >> I have no insight to the Linux modifications, but looking at the nfsstats, >> attribute calls are the bulk of the traffic to the NFS mounted file system. >> >> Any and all ideas are OK..maybe something simple I overlooked. >> >> I need to reserve another build server early this week, and go over my >> options again on whats not been working, and get the list numbers as well. >> >> Thanks in advance. > > > See Bruce Evans very recent work on this on freebsd-fs@ mailing list. > > Eric > > > -- > ------------------------------------------------------------------------ > Eric Anderson Sr. Systems Administrator Centaur Technology > Anything that works is better than anything that doesn't. > ------------------------------------------------------------------------ > From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 00:38:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8374116A536 for ; Tue, 31 Oct 2006 00:38:22 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id 13E4F43D46 for ; Tue, 31 Oct 2006 00:38:21 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 60440 invoked by uid 1001); 31 Oct 2006 00:39:04 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Mon, 30 Oct 2006 19:39:04 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17734.39720.437654.333677@bhuda.mired.org> Date: Mon, 30 Oct 2006 19:39:04 -0500 To: Freddie Cash In-Reply-To: <200610301613.59298.fcash@ocis.net> References: <20061029222847.GA68272@marvin.astase.com> <45466902.5090603@FreeBSD.org> <17734.27601.79021.873705@bhuda.mired.org> <200610301613.59298.fcash@ocis.net> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 00:38:22 -0000 In <200610301613.59298.fcash@ocis.net>, Freddie Cash typed: > On Monday 30 October 2006 01:17 pm, Mike Meyer wrote: > > In <45466902.5090603@FreeBSD.org>, Doug Barton > typed: > > > Simon L. Nielsen wrote: > > > > Personally I think rm should do what you ask it to do - if you ask > > > > it to overwrite a file which has multiple links, well... though > > > > luck. > > > > > > It's all well and good to say, "tough luck," but I don't think that's > > > what our users expect. > > > > I'm a user. It's what I expect. If I wanted an OS that protected me > > from myself, I wouldn't be running Unix. Please give me the rope I > > need to get the job done. If that happens to be enough that I can hang > > myself, and I sometimes do - well, I got what I asked for. When I want > > to be coddled, I'll run a different OS. > Isn't that what the -f option is for in every command? So how does the '-f' option to cc give me more rope? > By default, be conservative in what you do (error out with nice messages > when in doubt). So why doesn't "rm foo" not error out with a nice message if it would be removeing the last link to foo? After all, that's the conservative thing to do, and if the user really wants to remove the last link: > If the user knows what they are doing then let them specify -f. Now you've decided that you know better what the user wants than they do. That's not what I expect from a Unix system. The claim was that that's not "what our users expect". I was pointing out that there's at least one user who expects - indeed, prefers - that the system do what they tell it to, without trying to protect them from themselves. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 00:51:11 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0E7E16A412 for ; Tue, 31 Oct 2006 00:51:11 +0000 (UTC) (envelope-from tech@nano.net) Received: from mail.smallweb.com (mail.smallweb.com [216.85.125.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADBF543D62 for ; Tue, 31 Oct 2006 00:51:06 +0000 (GMT) (envelope-from tech@nano.net) Received: from Sixpence.mail.smallweb.com (sixpence.nano.net [216.85.125.9]) by mail.smallweb.com (Rockliffe SMTPRA 5.3.11) with ESMTP id for ; Mon, 30 Oct 2006 17:59:55 -0700 Message-Id: <6.2.0.14.2.20061030165949.021173a0@nano.net> X-Mailer: QUALCOMM Windows Eudora Version 6.2.0.14 Date: Mon, 30 Oct 2006 17:51:03 -0700 To: freebsd-hackers@freebsd.org From: tech@nano.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Email recommendations X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 00:51:11 -0000 I get a LOT of corrupt mailboxes. Just 187 mailboxes and daily problems. It's always the same error in the log files: "-ERR Unable to process From lines (envelopes), change recognition modes." I've done some research and don't know any more about where the problem lives than I did before. I know that some From: lines are missing the colon, but I don't know why. Can anyone recommend a more forgiving popper or MTA? I'm running QPOP 2.53 and Sendmail 8.13.6. From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 01:03:00 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 634AE16A407 for ; Tue, 31 Oct 2006 01:03:00 +0000 (UTC) (envelope-from speedtoys.racing@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05D7643DAE for ; Tue, 31 Oct 2006 01:02:12 +0000 (GMT) (envelope-from speedtoys.racing@gmail.com) Received: by nf-out-0910.google.com with SMTP id p77so87196nfc for ; Mon, 30 Oct 2006 17:02:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=X1prQ/LBfaX2c7CWT5jdxM+NrXqOcm8+BNmkbbEoFMAHsCkPG8rv8u9Y99vbVtP81q88u4ZI4XhHx5IsrVy9XVicsmC0wr3Ye9xRPuyBGAUUQl11Fmozyk56gTGBfbeAFEcA166jGwGu7JgIZvai7SlPHFDqlwOAuIQjzESAtoc= Received: by 10.49.41.18 with SMTP id t18mr419248nfj.1162256524204; Mon, 30 Oct 2006 17:02:04 -0800 (PST) Received: by 10.48.203.16 with HTTP; Mon, 30 Oct 2006 17:02:04 -0800 (PST) Message-ID: Date: Mon, 30 Oct 2006 17:02:04 -0800 From: "Jeff Mohler" To: "tech@nano.net" In-Reply-To: <6.2.0.14.2.20061030165949.021173a0@nano.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6.2.0.14.2.20061030165949.021173a0@nano.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Email recommendations X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 01:03:00 -0000 Is your spool over NFS? You'll get those exact errors if you are on an NFS mount with spools without some form of locking to prevent new message insertion into existing messages. On 10/30/06, tech@nano.net wrote: > > > > I get a LOT of corrupt mailboxes. Just 187 mailboxes and daily problems. > It's always the same error in the log files: "-ERR Unable to process From > lines (envelopes), change recognition modes." > > I've done some research and don't know any more about where the problem > lives than I did before. I know that some From: lines are missing the > colon, but I don't know why. Can anyone recommend a more forgiving popper > or MTA? I'm running QPOP 2.53 and Sendmail 8.13.6. > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 05:00:24 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0199416A40F for ; Tue, 31 Oct 2006 05:00:23 +0000 (UTC) (envelope-from fcash@ocis.net) Received: from smtp.sd73.bc.ca (smtp.sd73.bc.ca [142.24.13.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8800543D49 for ; Tue, 31 Oct 2006 05:00:23 +0000 (GMT) (envelope-from fcash@ocis.net) Received: from localhost (localhost [127.0.0.1]) by localhost.sd73.bc.ca (Postfix) with ESMTP id 4362C8A0042 for ; Mon, 30 Oct 2006 21:00:23 -0800 (PST) Received: from smtp.sd73.bc.ca ([127.0.0.1]) by localhost (smtp.sd73.bc.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29675-50 for ; Mon, 30 Oct 2006 21:00:16 -0800 (PST) Received: from webmail.sd73.bc.ca (unknown [10.10.10.17]) by smtp.sd73.bc.ca (Postfix) with ESMTP id AD25B8A002C for ; Mon, 30 Oct 2006 21:00:11 -0800 (PST) Received: from 24.71.118.34 (SquirrelMail authenticated user fcash) by webmail.sd73.bc.ca with HTTP; Mon, 30 Oct 2006 21:00:16 -0800 (PST) Message-ID: <60338.24.71.118.34.1162270816.squirrel@webmail.sd73.bc.ca> In-Reply-To: <6.2.0.14.2.20061030165949.021173a0@nano.net> References: <6.2.0.14.2.20061030165949.021173a0@nano.net> Date: Mon, 30 Oct 2006 21:00:16 -0800 (PST) From: "Freddie Cash" To: hackers@freebsd.org User-Agent: SquirrelMail/1.5.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new using ClamAV at sd73.bc.ca Cc: Subject: Re: Email recommendations X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 05:00:24 -0000 On Mon, October 30, 2006 4:51 pm, tech@nano.net wrote: > I get a LOT of corrupt mailboxes. Just 187 mailboxes and daily > problems. It's always the same error in the log files: "-ERR Unable to > process From lines (envelopes), change recognition modes." > > I've done some research and don't know any more about where the > problem lives than I did before. I know that some From: lines are > missing the colon, but I don't know why. Can anyone recommend a more > forgiving popper or MTA? I'm running QPOP 2.53 and Sendmail 8.13.6. If this is your own server, I'd recommend switching to Postfix and using Maildir for message storage. The problem with mbox format message stores is that only 1 process can be writing to the file, which stores *all* messages for a folder. If you are receiving a new message while deleting an existing one, all kinds of nasty things can happen. If you need POP3 (I'd recommend going with IMAP instead) then look at Courier, Dovecot, or Cyrus. They provide nice, fast, stable, Maildir-support with POP3 and IMAP daemons that access the same folders. ---- Freddie Cash fcash@ocis.net From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 07:26:49 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F36516A40F; Tue, 31 Oct 2006 07:26:49 +0000 (UTC) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C7FC43D53; Tue, 31 Oct 2006 07:26:49 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2]) by jengal.datamax.bg (Postfix) with SMTP id 22A16B833; Tue, 31 Oct 2006 09:26:47 +0200 (EET) Received: (nullmailer pid 69729 invoked by uid 1002); Tue, 31 Oct 2006 07:26:49 -0000 Date: Tue, 31 Oct 2006 09:26:49 +0200 From: Vasil Dimov To: Doug Barton Message-ID: <20061031072649.GA69594@qlovarnika.bg.datamax> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103151.GD871@turion.vk2pj.dyndns.org> <20061030202030.GB1043@zaphod.nitro.dk> <45466902.5090603@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline In-Reply-To: <45466902.5090603@FreeBSD.org> Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com, "Simon L. Nielsen" Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 07:26:49 -0000 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 30, 2006 at 01:05:06PM -0800, Doug Barton wrote: > Simon L. Nielsen wrote: >=20 > > Personally I think rm should do what you ask it to do - if you ask it > > to overwrite a file which has multiple links, well... though luck. =20 >=20 > Sorry, I disagree. It's not always obvious to the user when a file has > hard links, and I can't see any situation where the pre-recent-patch > behavior (overwriting the actual file when using -P on a hard link) is > the expected outcome. >=20 > It's all well and good to say, "tough luck," but I don't think that's > what our users expect. How do you know what is "obvious to the user" and what "users expect"? Have you done some surveys or researches? If not, than it is all relative and happening inside _your_ head. To speak in facts: How many users do you know that have complained about rm(1)'s behavior before this thread was started (I mean the -P switch when file has multiple links)? Or have lost their valuable data because of "rm -P"-ing their files? IMHO many problems arise when someone tries to please even the stupidest user by writing a fool-proof software. To me the beauty of Unixes is that they are _not_ fool-proof, e.g. your are holding a real gun, you should be carefull not to point it to your head and pull the trigger. --=20 Vasil Dimov gro.DSBeerF@dv % Shaw's Principle: Build a system that even a fool can use, and only a fool will want to use it. --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFFRvq5Fw6SP/bBpCARAmorAJ4h8c4wvQuf7LAS9Ow/2uoAhCr/GwCeO5O+ n8vqD+Mw/WKDn2312MdKjpI= =v1c4 -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG-- From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 08:26:52 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A03A616A415 for ; Tue, 31 Oct 2006 08:26:52 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8DAD43D49 for ; Tue, 31 Oct 2006 08:26:51 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from stinger.cc.rsu.ru (stinger.cc.rsu.ru [195.208.252.82]) (authenticated bits=0) by mail.r61.net (8.13.8/8.13.8) with ESMTP id k9V8Qmq9092824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 31 Oct 2006 11:26:48 +0300 (MSK) (envelope-from bushman@freebsd.org) From: Michael Bushkov Organization: Rostov State University To: freebsd-hackers@freebsd.org Date: Tue, 31 Oct 2006 12:26:31 +0400 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610311126.32121.bushman@freebsd.org> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on asterix.r61.net X-Virus-Status: Clean Subject: PIC questions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Michael Bushkov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 08:26:52 -0000 Hi, I've got 2 questions about PIC. 1. NO_PIC variable. It is defined in several places across the system sources. As an example: ./lib/libcompat/Makefile:NO_PIC= ./lib/libdisk/Makefile:NO_PIC= ./lib/libstand/Makefile:NO_PIC= ./lib/liby/Makefile:NO_PIC= What are the reasons for explicitly setting this variable in these libraries? I mean - as they are static, do we need to explicitly set NO_PIC there? 2. And theoretical question. Does every object that will be linked into the shared library should be built with PIC enabled? -- With best regards, Michael Bushkov From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 08:51:53 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E269016A403; Tue, 31 Oct 2006 08:51:53 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id F143443D7B; Tue, 31 Oct 2006 08:51:28 +0000 (GMT) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id k9V8nOhj049815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 31 Oct 2006 00:49:24 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id k9V8nO8V049814; Tue, 31 Oct 2006 00:49:24 -0800 (PST) Received: from fbsd61 ([192.168.200.61]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA08707; Tue, 31 Oct 06 00:48:56 PST Date: Tue, 31 Oct 2006 00:49:32 -0800 From: perryh@pluto.rain.com To: vd@freebsd.org Message-Id: <45470e1c.Ygp7f4OdPaauT8tL%perryh@pluto.rain.com> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103151.GD871@turion.vk2pj.dyndns.org> <20061030202030.GB1043@zaphod.nitro.dk> <45466902.5090603@FreeBSD.org> <20061031072649.GA69594@qlovarnika.bg.datamax> In-Reply-To: <20061031072649.GA69594@qlovarnika.bg.datamax> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 08:51:54 -0000 > IMHO many problems arise when someone tries to please even the > stupidest user by writing a fool-proof software. To me the beauty > of Unixes is that they are _not_ fool-proof, e.g. your are holding > a real gun, you should be carefull not to point it to your head > and pull the trigger. If we wanted to follow that line of reasoning to its logical conclusion, I think we would have to make "-f" the default behavior for rm, which BTW is how it worked in AT&T 6th Edition. From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 08:54:58 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D0E216A415 for ; Tue, 31 Oct 2006 08:54:58 +0000 (UTC) (envelope-from tech@nano.net) Received: from mail.smallweb.com (mail.smallweb.com [216.85.125.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id D080043D75 for ; Tue, 31 Oct 2006 08:54:57 +0000 (GMT) (envelope-from tech@nano.net) Received: from Sixpence.mail.smallweb.com (sixpence.nano.net [216.85.125.9]) by mail.smallweb.com (Rockliffe SMTPRA 5.3.11) with ESMTP id ; Tue, 31 Oct 2006 02:03:48 -0700 Message-Id: <6.2.0.14.2.20061031014527.0210f060@nano.net> X-Mailer: QUALCOMM Windows Eudora Version 6.2.0.14 Date: Tue, 31 Oct 2006 01:54:54 -0700 To: "Jeff Mohler" From: tech@nano.net In-Reply-To: References: <6.2.0.14.2.20061030165949.021173a0@nano.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Email recommendations X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 08:54:58 -0000 Thanks, but it's not over NFS. The problem was occurring on the last server, different hardware and earlier versions of the same software. I was surprised that it showed up again after the upgrade. I've had everything from garbage at the top of mail files, to missing colons in the From lines, to bad temp pop files... I think the dragon may be multi-headed, so I'm looking for products that will be less quick to crash. At 06:02 PM 10/30/2006, Jeff Mohler wrote: >Is your spool over NFS? > >You'll get those exact errors if you are on an NFS mount with spools >without some form of locking to prevent new message insertion into >existing messages. > >On 10/30/06, tech@nano.net wrote: >> >> >> >>I get a LOT of corrupt mailboxes. Just 187 mailboxes and daily problems. >>It's always the same error in the log files: "-ERR Unable to process From >>lines (envelopes), change recognition modes." >> >>I've done some research and don't know any more about where the problem >>lives than I did before. I know that some From: lines are missing the >>colon, but I don't know why. Can anyone recommend a more forgiving popper >>or MTA? I'm running QPOP 2.53 and Sendmail 8.13.6. >> >> >> >>_______________________________________________ >>freebsd-hackers@freebsd.org mailing list >>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 09:03:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78BFF16A4DD; Tue, 31 Oct 2006 09:03:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFFC743D7B; Tue, 31 Oct 2006 09:03:08 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k9V8eaHw011590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 31 Oct 2006 10:40:36 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id k9V933qk055769; Tue, 31 Oct 2006 11:03:04 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id k9V933w8055768; Tue, 31 Oct 2006 11:03:03 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Oct 2006 11:03:03 +0200 From: Kostik Belousov To: Michael Bushkov Message-ID: <20061031090303.GH1627@deviant.kiev.zoral.com.ua> References: <200610311126.32121.bushman@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bpVaumkpfGNUagdU" Content-Disposition: inline In-Reply-To: <200610311126.32121.bushman@freebsd.org> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: PIC questions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 09:03:21 -0000 --bpVaumkpfGNUagdU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 31, 2006 at 12:26:31PM +0400, Michael Bushkov wrote: > Hi, > I've got 2 questions about PIC. >=20 > 2. And theoretical question. Does every object that will be linked into t= he=20 > shared library should be built with PIC enabled? This is not so theoretical. This is required, for instance, for amd64. Beca= use compiler by default generates so called small code model where text and data of object shall live in lower 2 Gb of address space. Solaris linker will gi= ve warnings when relocations are to big to fit into signed 32-bit location. Our linker will silently ignore overflow. This will result in either core dump (if you lucky), or data corruption. --bpVaumkpfGNUagdU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFRxFGC3+MBN1Mb4gRAiV6AKDGNMRdEvo1c3HQmlrT/sY2phoxbwCg2vw6 DA1NCmRg4stNpXwYoUdduTM= =ZRcM -----END PGP SIGNATURE----- --bpVaumkpfGNUagdU-- From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 09:24:25 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DA5716A403 for ; Tue, 31 Oct 2006 09:24:25 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A95C43D46 for ; Tue, 31 Oct 2006 09:24:24 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (mzsxer@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k9V9OIEZ031891; Tue, 31 Oct 2006 10:24:23 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k9V9OHUM031890; Tue, 31 Oct 2006 10:24:17 +0100 (CET) (envelope-from olli) Date: Tue, 31 Oct 2006 10:24:17 +0100 (CET) Message-Id: <200610310924.k9V9OHUM031890@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, rottled@gmail.com In-Reply-To: <54b90fdf0610301002i1d988c80wf62d31645c38d683@mail.gmail.com> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 31 Oct 2006 10:24:23 +0100 (CET) Cc: Subject: Re: Obtaining used pages on process exit? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, rottled@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 09:24:25 -0000 Yan wrote: > I am currently writing my first kernel module to extract data from > the kernel and bring it into user-space. As I understand, FreeBSD > only loads pages of the text segment that it is about to use by > registering its handler for page faults, and bringing in more pages > from the binary as needed. I want to track this progress, and report > the amount of pages it brought in on process exit. > > The current idea I have and the path I'm following is as follows: > I register a callback in my module using EVENTHANDLER_REGISTER, > using 'process_exit' name. That gives me the proc structure on exit, > I then try to find the information I need using the p_vmspace member, > and try using vm_tsize for the number of pages. But this is the > number of pages in the virtual address space of the text segment, > which does not correlate to how many pages were actually brought > in. > > For the context of this, I am trying to write a tiny utility, that > watches the execution of a process, and tracks how many pages were > actually used during its execution. It passes that knowledge to a > hopefully-to-be-written user-space utility that generates a new > binary using only those pages for the text segment. (If an execution > was to go outside that, a seg fault is okay.) > > Any help is appreciated. The problem with that is the fact that text pages are not "owned" by a process. If you run the same binary several times, the pages will be brought into memory only once. So if you're running a webserver with hundreds of httpd processes, the text pages of httpd are brought into memory only once. Unless, of course, some of them (or even all of them) had to be re-used during a low-memory situation, so they have to be brought in again. Note that text pages are _not_ paged out to swap space, because that would be just a waste since. Instead they are simply discarded, because they can be paged in from the binary again. So, if you really need to assign page-ins to a certain process, you must make sure that the binary in question was never executed before (since last reboot), and make sure that it is not executed again until the first process terminates. Also note that you might easily miss code paths that are not executed during one run, but required during another run, so you might not get all pages that are necessary to run the binary under all circumstances. I also think that the pager will bring multiple pages into memory at once, as an optimization because doing for every single page on demand is inefficient, especially on large binaries. (I'm not 100% sure how that works, though. Someone will certainly correct me if necessary.) By the way, /usr/bin/time is very useful with the option -l to display pageing activity during execution of a process. Here's just an example with running lynx two times after another (I hadn't used it before since last reboot, but all the libraries had already been used): $ /usr/bin/time -l lynx -dump {some URL} >/dev/null 259 page reclaims 37 page faults 10 block input operations $ /usr/bin/time -l lynx -dump {some URL} >/dev/null 243 page reclaims 0 page faults 0 block input operations Note that the size of the binary is about 1 MB, which is about 250 pages: -r-xr-xr-x 1 root wheel 1086480 Jul 20 2005 lynx Not all of those pages are text pages, though, of course. By the way: Even if you manage to find out which pages are actually used by a binary, it is probably non-trivial to map that information back to parts of the binary file, let alone to build a binary that contains only those parts. You'll have to fight with the run-time linker. Uhm ... The more I think about the whole thing, the more potential problems come to my mind, so I better stop now. :-) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "We, the unwilling, led by the unknowing, are doing the impossible for the ungrateful. We have done so much, for so long, with so little, we are now qualified to do anything with nothing."         -- Mother Teresa From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 16:16:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 379A416A407 for ; Tue, 31 Oct 2006 16:16:42 +0000 (UTC) (envelope-from fetrovsky@yahoo.com) Received: from web53907.mail.yahoo.com (web53907.mail.yahoo.com [206.190.36.217]) by mx1.FreeBSD.org (Postfix) with SMTP id C4BD343D45 for ; Tue, 31 Oct 2006 16:16:41 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: (qmail 71809 invoked by uid 60001); 31 Oct 2006 16:16:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type; b=0oXUqD4k5dWlbpeH0wLYTHIXuk54yD1IgIBgnybIZfXwCbsa/wfWoOtAQCG/Zedl6qQmVdNrO84D8hi95qoIOT2tKnlhcAtux02zUdfpp/nui2yhvmOc2rM8s3XThBLdiV+9khs5eztTYfZ2LLHKULIGgsZAFvoEkQWWQSYE1yw= ; Message-ID: <20061031161640.71807.qmail@web53907.mail.yahoo.com> Received: from [128.195.84.249] by web53907.mail.yahoo.com via HTTP; Tue, 31 Oct 2006 08:16:40 PST Date: Tue, 31 Oct 2006 08:16:40 -0800 (PST) From: Daniel Valencia To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 16:16:42 -0000 Actually, I would like to support this motion... Thinking over the possible= behaviours of -P is to sit in a room saying "to delete or not to delete...= " If you think it over from a higher perspective, "The UNIX Way" (TM) is t= o have individual commands for specific tasks and to extract tasks from com= mands that have gotten too complex... and I think this is the case of rm...= a "shred" command should be added that has the following behaviour:=0A=0A= if the file is not writable, return with error.=0Aif the file has multiple = links, and option -f was not specified, return with error.=0Aoverwrite the = file.=0Aoptionally, unlink the file.=0A=0AAdditionally, -P should either be= rm'ed from rm, or added as a backwards compatibility hack that calls "shre= d" and returns with error every time the latter does.=0A=0AThese are my 1.9= 9 cents.=0A=0A=0A- Daniel=0A=0A=0A----- Original Message ----=0AFrom: Tim C= lewlow =0ATo: Bakul Shah ; Doug B= arton =0ACc: delphij@FreeBSD.org; perryh@pluto.rain.com;= freebsd-hackers@freebsd.org=0ASent: Monday, October 30, 2006 12:20:33 PM= =0ASubject: Re: [patch] rm can have undesired side-effects=0A=0A=0A--- Baku= l Shah wrote:=0A=0A> Sorry if I tuned in late:-)=0A> = =0A> I vote for taking *out* -P. It is an ill-designed=0A> feature.=0A> Or= if you keep it, also add it to mv, cp -f & ln -f=0A> since=0A> these comma= nds can also unlink a file and once=0A> unlinked in=0A> this matter you can= 't scrub it. And also fix up the=0A> behavior=0A> for -P when multiple lin= ks. And since mv can use=0A> rename(2),=0A> you will have to also dirty up= the kernel interface=0A> somehow.=0A> Not to mention even editing such a s= ensitive file=0A> can leave=0A> stuff all over the disk that a bad guy can = get at. =0A> If you=0A> are truely paranoid (as opposed to paranoid only=0A= > when on=0A> meds) you know how bad that is!=0A> =0A> If you are that conc= ious about scrubbing why not add=0A> scrubbing as a mount option (suggested= option: -o=0A> paranoid)=0A> then at least it will be handled consistently= .=0A> =0A> What's the world come to when even the paranoid are=0A> such=0A>= amateurs.=0A> =0A> -- bakul=0A> =0A=0ABased on all the potential situation= s where a -P=0Aoption may possibly be implemented, is it worthwhile=0Aconsi= dering creating a command that just scrubs a=0Afile, and does nothing else.= This would seem to fit=0Athe Unix paradigm of single command to do a singl= e=0Athing, and may be preferable to attempting to embed=0Athis function in = every command that may "possibly"=0Aremove a file.=0A=0AJust my 2c=0A=0ATim= =0A=0A=0A=0A_______________________________________________________________= _____________________=0ALow, Low, Low Rates! Check out Yahoo! Messenger's c= heap PC-to-Phone call rates =0A(http://voice.yahoo.com)=0A=0A______________= _________________________________=0Afreebsd-hackers@freebsd.org mailing lis= t=0Ahttp://lists.freebsd.org/mailman/listinfo/freebsd-hackers=0ATo unsubscr= ibe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"=0A=0A From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 17:04:10 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0213B16A403 for ; Tue, 31 Oct 2006 17:04:10 +0000 (UTC) (envelope-from tim1timau@yahoo.com) Received: from web50307.mail.yahoo.com (web50307.mail.yahoo.com [206.190.38.61]) by mx1.FreeBSD.org (Postfix) with SMTP id 8749843D69 for ; Tue, 31 Oct 2006 17:03:59 +0000 (GMT) (envelope-from tim1timau@yahoo.com) Received: (qmail 94784 invoked by uid 60001); 31 Oct 2006 17:03:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=DVGC686sKA6K/uYnkxp7qdSCFAJ9M1viGXUXCrkKG5+wNJpwdqXN5SHaSugkLgmvdUEo+DsHNyFHmP23ola8WseKq+sywk7hgkRuZKbt6cWEhSCIOUdltw+koe28iuh5Yz3geta+G0KkrNQP4ulzj8ei+FqCxtgAWO82nuIVkhs= ; Message-ID: <20061031170358.94782.qmail@web50307.mail.yahoo.com> Received: from [210.0.100.149] by web50307.mail.yahoo.com via HTTP; Tue, 31 Oct 2006 09:03:58 PST Date: Tue, 31 Oct 2006 09:03:58 -0800 (PST) From: Tim Clewlow To: freebsd-hackers@freebsd.org In-Reply-To: <20061031161640.71807.qmail@web53907.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 17:04:10 -0000 --- Daniel Valencia wrote: > Actually, I would like to support this motion... > Thinking over the possible behaviours of -P is to > sit in a room saying "to delete or not to delete..." > If you think it over from a higher perspective, > "The UNIX Way" (TM) is to have individual commands > for specific tasks and to extract tasks from > commands that have gotten too complex... and I think > this is the case of rm... a "shred" command should > be added that has the following behaviour: > > if the file is not writable, return with error. > if the file has multiple links, and option -f was > not specified, return with error. > overwrite the file. > optionally, unlink the file. > > Additionally, -P should either be rm'ed from rm, or > added as a backwards compatibility hack that calls > "shred" and returns with error every time the latter > does. > > These are my 1.99 cents. > > > - Daniel > > > ----- Original Message ---- > From: Tim Clewlow > To: Bakul Shah ; Doug Barton > > Cc: delphij@FreeBSD.org; perryh@pluto.rain.com; > freebsd-hackers@freebsd.org > Sent: Monday, October 30, 2006 12:20:33 PM > Subject: Re: [patch] rm can have undesired > side-effects > > > --- Bakul Shah wrote: > > > Sorry if I tuned in late:-) > > > > I vote for taking *out* -P. It is an ill-designed > > feature. > > Or if you keep it, also add it to mv, cp -f & ln > -f > > since > > these commands can also unlink a file and once > > unlinked in > > this matter you can't scrub it. And also fix up > the > > behavior > > for -P when multiple links. And since mv can use > > rename(2), > > you will have to also dirty up the kernel > interface > > somehow. > > Not to mention even editing such a sensitive file > > can leave > > stuff all over the disk that a bad guy can get at. > > > If you > > are truely paranoid (as opposed to paranoid only > > when on > > meds) you know how bad that is! > > > > If you are that concious about scrubbing why not > add > > scrubbing as a mount option (suggested option: -o > > paranoid) > > then at least it will be handled consistently. > > > > What's the world come to when even the paranoid > are > > such > > amateurs. > > > > -- bakul > > > > Based on all the potential situations where a -P > option may possibly be implemented, is it worthwhile > considering creating a command that just scrubs a > file, and does nothing else. This would seem to fit > the Unix paradigm of single command to do a single > thing, and may be preferable to attempting to embed > this function in every command that may "possibly" > remove a file. > > Just my 2c > > Tim > Having thought this over some more, if a shred/scramble/scrub command is created in its own right, then a number of new features could be added that do not currently exist. - The command could be writen to protect a single file, or, it could also write to an entire file system/media. - The command could offer many types of randomising possiblities, eg the current 0xff, 0x00, 0xff; or perhaps /dev/random could be written; or perhaps the user could specify exactly what is to be used to overwrite the file/file system - from memory some large organistations (govt depts) have specific rules about how files/file systems should be overwritten before old medie is thrown out and replaced (so no-one can scavenge the media and read sensitive data) Kind of thinking out loud here, apologies if its noisy, Tim. ____________________________________________________________________________________ Everyone is raving about the all-new Yahoo! Mail (http://advision.webevents.yahoo.com/mailbeta/) From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 17:44:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1851E16A403 for ; Tue, 31 Oct 2006 17:44:05 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0237343D5D for ; Tue, 31 Oct 2006 17:44:02 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 761185B21; Tue, 31 Oct 2006 09:44:02 -0800 (PST) To: Tim Clewlow In-reply-to: Your message of "Tue, 31 Oct 2006 09:03:58 PST." <20061031170358.94782.qmail@web50307.mail.yahoo.com> Date: Tue, 31 Oct 2006 09:44:02 -0800 From: Bakul Shah Message-Id: <20061031174402.761185B21@mail.bitblocks.com> Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 17:44:05 -0000 > Having thought this over some more, if a > shred/scramble/scrub command is created in its own > right, then a number of new features could be added > that do not currently exist. > - The command could be writen to protect a single > file, or, it could also write to an entire file > system/media. These won't share much beyond what patterns to write and how many times. > - The command could offer many types of randomising > possiblities, eg the current 0xff, 0x00, 0xff; or > perhaps /dev/random could be written; or perhaps the > user could specify exactly what is to be used to > overwrite the file/file system - from memory some > large organistations (govt depts) have specific rules > about how files/file systems should be overwritten > before old medie is thrown out and replaced (so no-one > can scavenge the media and read sensitive data) IMHO even this does not address paranoia very well. The point of rm -P is to make sure freed blocks on the disk don't have any useful information. But if the bad guy can read the disk *while* it also holds other files on it, the battle is already lost as presumably he can also read data in live files. If you are using rm -P in preparation to throwing a disk away, you may as well just use a whole disk scrubber. If you are using rm -P to prevent a nosy admin to look at your sensitive data, you will likely lose. He can easily replace rm with his own command. A separate scrub command may help since you can verify the data is erased. This is not to say rm -P or scrub is not helpful. If you know what you are doing it is perfectly adequate. But if you don't or you make mistakes, it will give you a false sense of security. For example, once a file is unlinked through some other means (such as mv) you don't have a handle on it any more to scrub. Basically you lost the ability to scrub your data due to a mistake. Worse, editing such a file may free unscrubbed blocks. A separate command won't help. This is why I suggested to have the system do this for you (through a mount option -- I don't care enough to want to implement it). > Kind of thinking out loud here, apologies if its > noisy, Tim. If the end result is clear headed go right ahead! From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 18:11:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A5E316A407 for ; Tue, 31 Oct 2006 18:11:21 +0000 (UTC) (envelope-from tim1timau@yahoo.com) Received: from web50308.mail.yahoo.com (web50308.mail.yahoo.com [206.190.38.62]) by mx1.FreeBSD.org (Postfix) with SMTP id D371243D45 for ; Tue, 31 Oct 2006 18:11:20 +0000 (GMT) (envelope-from tim1timau@yahoo.com) Received: (qmail 27146 invoked by uid 60001); 31 Oct 2006 18:11:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Ze4Eb55oNALJ2fYt/J93OEUETMeonyP9x/6Yaxg/1Y3z28CiXeS2CS72vPxo1ZV3AHkvxvayEGJAuMUCCeH4qKS8nPs2a7fmuZa9SH8QSc1k7BlqtZsAaHAvIAKPyNrru9TXVEJ29y0+RXMdGBLCLAhFs2+6DRDJriA5H25dchk= ; Message-ID: <20061031181120.27144.qmail@web50308.mail.yahoo.com> Received: from [210.0.100.149] by web50308.mail.yahoo.com via HTTP; Tue, 31 Oct 2006 10:11:20 PST Date: Tue, 31 Oct 2006 10:11:20 -0800 (PST) From: Tim Clewlow To: freebsd-hackers@freebsd.org In-Reply-To: <20061031174402.761185B21@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 18:11:21 -0000 --- Bakul Shah wrote: > > Having thought this over some more, if a > > shred/scramble/scrub command is created in its own > > right, then a number of new features could be > added > > that do not currently exist. > > > - The command could be writen to protect a single > > file, or, it could also write to an entire file > > system/media. > > These won't share much beyond what patterns to write > and how many times. > > > - The command could offer many types of > randomising > > possiblities, eg the current 0xff, 0x00, 0xff; or > > perhaps /dev/random could be written; or perhaps > the > > user could specify exactly what is to be used to > > overwrite the file/file system - from memory some > > large organistations (govt depts) have specific > rules > > about how files/file systems should be overwritten > > before old medie is thrown out and replaced (so > no-one > > can scavenge the media and read sensitive data) > > IMHO even this does not address paranoia very well. > The > point of rm -P is to make sure freed blocks on the > disk don't > have any useful information. But if the bad guy can > read the > disk *while* it also holds other files on it, the > battle is > already lost as presumably he can also read data in > live > files. If you are using rm -P in preparation to > throwing a > disk away, you may as well just use a whole disk > scrubber. > If you are using rm -P to prevent a nosy admin to > look at > your sensitive data, you will likely lose. He can > easily > replace rm with his own command. A separate scrub > command > may help since you can verify the data is erased. > > This is not to say rm -P or scrub is not helpful. > If you > know what you are doing it is perfectly adequate. > But if you > don't or you make mistakes, it will give you a false > sense of > security. For example, once a file is unlinked > through some > other means (such as mv) you don't have a handle on > it any > more to scrub. Basically you lost the ability to > scrub your > data due to a mistake. Worse, editing such a file > may free > unscrubbed blocks. A separate command won't help. > > This is why I suggested to have the system do this > for you > (through a mount option -- I don't care enough to > want to > implement it). > > > Kind of thinking out loud here, apologies if its > > noisy, Tim. > > If the end result is clear headed go right ahead! > Having cleared my head a bit more, I realise most of this can be done with consecutive runs of 'dd'. I think I've reached a conclusion here. Tim. ____________________________________________________________________________________ Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates (http://voice.yahoo.com) From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 20:07:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13B6816A412 for ; Tue, 31 Oct 2006 20:07:07 +0000 (UTC) (envelope-from untilzero@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F12D43D76 for ; Tue, 31 Oct 2006 20:07:06 +0000 (GMT) (envelope-from untilzero@gmail.com) Received: by wx-out-0506.google.com with SMTP id i27so1664967wxd for ; Tue, 31 Oct 2006 12:07:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PNK1dhz5DO+nNhcUA2vSrN3ITHEkbV09gj5qGTHtNio7Ff8Lv1WP/f3EzlXRHBPOAQgT2zYMqhpQN/1s3cdnS4Cdc7pkqBUftj6iB35zAQYaUXHtbaX3sZmyJfJ1vkI6kHbWsA/De86sxEdc9sFvSdft/evXg8lOj/4w0cADQcc= Received: by 10.70.54.20 with SMTP id c20mr7879593wxa; Tue, 31 Oct 2006 12:07:05 -0800 (PST) Received: by 10.70.21.14 with HTTP; Tue, 31 Oct 2006 12:07:05 -0800 (PST) Message-ID: Date: Tue, 31 Oct 2006 14:07:05 -0600 From: Shane To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Compile Issue: "cannot find -ldl" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 20:07:07 -0000 Hi... What I'm on: FreeBSD/i386 version 6.1 What I'm doing: Trying to get PHP to compile against a Linux binary install of the Informix Client SDK, and I've been running into an issue I cannot correct. Compile Error: ... /usr/local/ifx/lib/esql/checkapi.o -lifglx -lcrypt -liconv -liconv -lm -lcrypt -lcrypt -o sapi/cgi/php /usr/bin/ld: cannot find -ldl *** Error code 1 ... What I know: I know that FreeBSD does not house its dl* functions in libdl, and I'm well aware of the ability to simple take out any references to -ldl in the Makefile, but doing so causes even more compile errors (i'll gladly include them if you like) What I've tried so far: * Adding AC_SEARCH_LIBS(dlopen,dl) to the configure.in script and removing all references to -ldl in the Makefile I really need help on this. Apparently IBM doesn't have any BSD-family distributions for its client SDK, and I don't know how to make these two guys friends. This same setup has (obviously) worked out very well on the Debian machine it was previously on, but I would much rather get it working on my FreeBSD server as opposed to going back to Debian. Is this possible? Any help would be greatly appreciated. - Shane From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 20:15:41 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EE7916A416 for ; Tue, 31 Oct 2006 20:15:41 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id C926043D49 for ; Tue, 31 Oct 2006 20:15:26 +0000 (GMT) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net ([12.207.12.9]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20061031201510m9200km5mje>; Tue, 31 Oct 2006 20:15:10 +0000 Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id k9VKF39w037964; Tue, 31 Oct 2006 14:15:04 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id k9VKF3pv037963; Tue, 31 Oct 2006 14:15:03 -0600 (CST) (envelope-from brooks) Date: Tue, 31 Oct 2006 14:15:02 -0600 From: Brooks Davis To: Shane Message-ID: <20061031201502.GA37630@lor.one-eyed-alien.net> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: Compile Issue: "cannot find -ldl" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 Oct 2006 20:15:41 -0000 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 31, 2006 at 02:07:05PM -0600, Shane wrote: > Hi... >=20 > What I'm on: > FreeBSD/i386 version 6.1 >=20 > What I'm doing: > Trying to get PHP to compile against a Linux binary install of the > Informix Client SDK, and I've been running into an issue I cannot > correct. >=20 > Compile Error: > ... > /usr/local/ifx/lib/esql/checkapi.o -lifglx -lcrypt -liconv -liconv -lm > -lcrypt -lcrypt -o sapi/cgi/php > /usr/bin/ld: cannot find -ldl > *** Error code 1 > ... >=20 > What I know: > I know that FreeBSD does not house its dl* functions in libdl, and I'm > well aware of the ability to simple take out any references to -ldl in > the Makefile, but doing so causes even more compile errors (i'll > gladly include them if you like) >=20 > What I've tried so far: > * Adding AC_SEARCH_LIBS(dlopen,dl) to the configure.in script and > removing all references to -ldl in the Makefile >=20 > I really need help on this. Apparently IBM doesn't have any > BSD-family distributions for its client SDK, and I don't know how to > make these two guys friends. This same setup has (obviously) worked > out very well on the Debian machine it was previously on, but I would > much rather get it working on my FreeBSD server as opposed to going > back to Debian. >=20 > Is this possible? Any help would be greatly appreciated. This isn't the sort of thing that's easily possible. The problem is that you need to link the Linux library against the Linux libraries it uses or provide shims for the needed symbols. This is possible, but it's rather non-trivial. The www/linuxpluginwrapper port does this for plugins with some success, but it's non-trivial and tends to be rather fragile. -- Brooks --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFR67GXY6L6fI4GtQRAoC/AKCd3T6FV97Av8ybXi8K+gLTcE8uLQCdGE8G QPlIwwi12XAErDI1A03EY20= =ck17 -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 19:01:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95B7D16A53D for ; Tue, 31 Oct 2006 19:01:02 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0837543DEC for ; Tue, 31 Oct 2006 18:58:23 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so1311114uge for ; Tue, 31 Oct 2006 10:58:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=Tr0J9HCj4P2/5oDTDaCHDFGv9xCneGXgHU+tyUXHAOsasHvb9jLPW7eBYZN5xhMsmS/MqLXWLvhiqGp1KuAFkuKPKxkqvXEWm+2/tNeHCeOChJgR54E6GavKZnqpiljETd8W5WyS0b3e6DaNlvCMniZxP4y35x1+e6ggjfKkXTY= Received: by 10.82.109.19 with SMTP id h19mr1245374buc; Tue, 31 Oct 2006 10:58:23 -0800 (PST) Received: by 10.82.163.16 with HTTP; Tue, 31 Oct 2006 10:58:23 -0800 (PST) Message-ID: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> Date: Tue, 31 Oct 2006 10:58:23 -0800 From: "Josh Carroll" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mailman-Approved-At: Wed, 01 Nov 2006 03:06:44 +0000 Cc: josh.carroll@gmail.com Subject: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@psualum.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 19:01:02 -0000 All, I have added two options to the sockstat command to list tcp and/or udp sockets. -t ([-]-tcp) : display tcp sockets -d ([-]-udp) : display udp sockets The previous command line options are unchanged, although I did change the use of getopt to getopt_long_only and added long options for the other command line switches. I know the same effect can be accomplished with grep, but figured it'd be nice to have it included in the sockstat command line. Thoughts/comments? Patch is below. patch with: patch -p0 < /path/to/sockstat.patch from the /usr/src/usr.bin/sockstat directory. Please cc: me on replies, as I am not subscribed to the hackers mailing list. Thanks! Josh --- sockstat.c.orig Tue Oct 31 10:51:40 2006 +++ sockstat.c Tue Oct 31 10:51:58 2006 @@ -58,6 +58,7 @@ #include #include #include +#include static int opt_4; /* Show IPv4 sockets */ static int opt_6; /* Show IPv6 sockets */ @@ -65,6 +66,8 @@ static int opt_l; /* Show listening sockets */ static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ +static int opt_tcp; /* show tcp */ +static int opt_udp; /* show udp */ static int *ports; @@ -584,8 +587,20 @@ main(int argc, char *argv[]) { int o; + static struct option options[] = { + {"ipv4", 0, NULL, '4'}, + {"ipv6", 0, NULL, 0}, + {"connected", 0, NULL, 'c'}, + {"listening", 0, NULL, 'l'}, + {"unix", 0, NULL, 'u'}, + {"verbose", 0, NULL, 'v'}, + {"port", 1, NULL, 'p'}, + {"tcp", 0, NULL, 't'}, + {"udp", 0, NULL, 'd'}, + {NULL, 0, NULL, 0} + }; - while ((o = getopt(argc, argv, "46clp:uv")) != -1) + while ((o = getopt_long_only(argc, argv, "46clp:uvtd", options, NULL)) != -1) switch (o) { case '4': opt_4 = 1; @@ -608,6 +623,12 @@ case 'v': ++opt_v; break; + case 't': + opt_tcp = 1; + break; + case 'd': + opt_udp = 1; + break; default: usage(); } @@ -618,20 +639,35 @@ if (argc > 0) usage(); - if (!opt_4 && !opt_6 && !opt_u) - opt_4 = opt_6 = opt_u = 1; + if (!opt_4 && !opt_6) { + opt_4 = opt_6 = 1; + + if(!opt_u) { + if(opt_tcp || opt_udp) + opt_u = 0; + } else { + opt_4 = opt_6 = opt_u = 1; + } + } + if (!opt_c && !opt_l) opt_c = opt_l = 1; + if(!opt_tcp && !opt_udp) + opt_tcp = opt_udp = 1; + if (opt_4 || opt_6) { - gather_inet(IPPROTO_TCP); - gather_inet(IPPROTO_UDP); + if(opt_tcp) + gather_inet(IPPROTO_TCP); + if(opt_udp) + gather_inet(IPPROTO_UDP); gather_inet(IPPROTO_DIVERT); } if (opt_u) { gather_unix(SOCK_STREAM); gather_unix(SOCK_DGRAM); } + getfiles(); display(); From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 1 03:21:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE1EF16A407 for ; Wed, 1 Nov 2006 03:21:19 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from cydem.org (S0106000103ce4c9c.vc.shawcable.net [24.87.27.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86EE843D6B for ; Wed, 1 Nov 2006 03:21:15 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from soralx.cydem.org (unknown [192.168.0.249]) by cydem.org (Postfix/FreeBSD) with ESMTP id 23E9390FA0 for ; Tue, 31 Oct 2006 19:21:13 -0800 (PST) Date: Tue, 31 Oct 2006 19:21:12 -0800 From: To: freebsd-hackers@freebsd.org Message-ID: <20061031192112.01c593dd@soralx.cydem.org> In-Reply-To: <20061031181120.27144.qmail@web50308.mail.yahoo.com> References: <20061031174402.761185B21@mail.bitblocks.com> <20061031181120.27144.qmail@web50308.mail.yahoo.com> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Nov 2006 03:21:19 -0000 > Having cleared my head a bit more, I realise most of > this can be done with consecutive runs of 'dd'. > I think I've reached a conclusion here. that is, install "ports/sysutils/obliterate/"? > Tim. [SorAlx] ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 08:53:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D33016A403 for ; Thu, 2 Nov 2006 08:53:46 +0000 (UTC) (envelope-from mohacsi@niif.hu) Received: from mail.ki.iif.hu (ki.iif.hu [193.6.222.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05E6543D53 for ; Thu, 2 Nov 2006 08:53:45 +0000 (GMT) (envelope-from mohacsi@niif.hu) Received: by mail.ki.iif.hu (Postfix, from userid 1003) id 4C61D55D8; Thu, 2 Nov 2006 09:53:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.ki.iif.hu (Postfix) with ESMTP id 4A8EA55CD; Thu, 2 Nov 2006 09:53:43 +0100 (CET) Date: Thu, 2 Nov 2006 09:53:43 +0100 (CET) From: Mohacsi Janos X-X-Sender: mohacsi@mignon.ki.iif.hu To: josh.carroll@psualum.com In-Reply-To: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> Message-ID: <20061102094748.G75543@mignon.ki.iif.hu> References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: josh.carroll@gmail.com, freebsd-hackers@freebsd.org Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 08:53:46 -0000 Hi, I haven't tested yet, but I think in the options structure you should use : + {"ipv6", 0, NULL, '6'}, instead of: + {"ipv6", 0, NULL, 0}, also for portability you should use: no_argument or required_argument as a second field.... Regards, Janos Mohacsi On Tue, 31 Oct 2006, Josh Carroll wrote: > All, > > I have added two options to the sockstat command to list tcp and/or udp > sockets. > > -t ([-]-tcp) : display tcp sockets > -d ([-]-udp) : display udp sockets > > The previous command line options are unchanged, although I did change > the use of getopt to getopt_long_only and added long options for the > other command line switches. > > I know the same effect can be accomplished with grep, but figured it'd > be nice to have it included in the sockstat command line. > > Thoughts/comments? Patch is below. patch with: > > patch -p0 < /path/to/sockstat.patch > > from the /usr/src/usr.bin/sockstat directory. > > Please cc: me on replies, as I am not subscribed to the hackers mailing list. > > Thanks! > Josh > > > > --- sockstat.c.orig Tue Oct 31 10:51:40 2006 > +++ sockstat.c Tue Oct 31 10:51:58 2006 > @@ -58,6 +58,7 @@ > #include > #include > #include > +#include > > static int opt_4; /* Show IPv4 sockets */ > static int opt_6; /* Show IPv6 sockets */ > @@ -65,6 +66,8 @@ > static int opt_l; /* Show listening sockets */ > static int opt_u; /* Show Unix domain sockets */ > static int opt_v; /* Verbose mode */ > +static int opt_tcp; /* show tcp */ > +static int opt_udp; /* show udp */ > > static int *ports; > > @@ -584,8 +587,20 @@ > main(int argc, char *argv[]) > { > int o; > + static struct option options[] = { > + {"ipv4", 0, NULL, '4'}, > + {"ipv6", 0, NULL, 0}, > + {"connected", 0, NULL, 'c'}, > + {"listening", 0, NULL, 'l'}, > + {"unix", 0, NULL, 'u'}, > + {"verbose", 0, NULL, 'v'}, > + {"port", 1, NULL, 'p'}, > + {"tcp", 0, NULL, 't'}, > + {"udp", 0, NULL, 'd'}, > + {NULL, 0, NULL, 0} > + }; > > - while ((o = getopt(argc, argv, "46clp:uv")) != -1) > + while ((o = getopt_long_only(argc, argv, "46clp:uvtd", options, > NULL)) != -1) > switch (o) { > case '4': > opt_4 = 1; > @@ -608,6 +623,12 @@ > case 'v': > ++opt_v; > break; > + case 't': > + opt_tcp = 1; > + break; > + case 'd': > + opt_udp = 1; > + break; > default: > usage(); > } > @@ -618,20 +639,35 @@ > if (argc > 0) > usage(); > > - if (!opt_4 && !opt_6 && !opt_u) > - opt_4 = opt_6 = opt_u = 1; > + if (!opt_4 && !opt_6) { > + opt_4 = opt_6 = 1; > + + if(!opt_u) { > + if(opt_tcp || opt_udp) > + opt_u = 0; > + } else { > + opt_4 = opt_6 = opt_u = 1; > + } > + } > + > if (!opt_c && !opt_l) > opt_c = opt_l = 1; > > + if(!opt_tcp && !opt_udp) > + opt_tcp = opt_udp = 1; > + > if (opt_4 || opt_6) { > - gather_inet(IPPROTO_TCP); > - gather_inet(IPPROTO_UDP); > + if(opt_tcp) > + gather_inet(IPPROTO_TCP); > + if(opt_udp) > + gather_inet(IPPROTO_UDP); > gather_inet(IPPROTO_DIVERT); > } > if (opt_u) { > gather_unix(SOCK_STREAM); > gather_unix(SOCK_DGRAM); > } > + > getfiles(); > display(); > _______________________________________________ > 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 Nov 2 10:52:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1DA616A47C; Thu, 2 Nov 2006 10:52:20 +0000 (UTC) (envelope-from jhs@flat.berklix.net) Received: from thin.berklix.org (thin.berklix.org [194.246.123.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB86543D68; Thu, 2 Nov 2006 10:52:17 +0000 (GMT) (envelope-from jhs@flat.berklix.net) Received: from js.berklix.net (p549A5826.dip.t-dialin.net [84.154.88.38]) (authenticated bits=128) by thin.berklix.org (8.12.11/8.12.11) with ESMTP id kA2Anf5x014109; Thu, 2 Nov 2006 11:49:43 +0100 (CET) (envelope-from jhs@flat.berklix.net) Received: from fire.jhs.private (fire.jhs.private [192.168.91.41]) by js.berklix.net (8.13.6/8.13.6) with ESMTP id kA2AnbwJ002058; Thu, 2 Nov 2006 11:49:38 +0100 (CET) (envelope-from jhs@flat.berklix.net) Received: from fire.jhs.private (localhost [127.0.0.1]) by fire.jhs.private (8.13.6/8.13.6) with ESMTP id kA2AoHv7028917; Thu, 2 Nov 2006 11:50:17 +0100 (CET) (envelope-from jhs@fire.jhs.private) Received: (from jhs@localhost) by fire.jhs.private (8.13.6/8.13.6/Submit) id kA2AoH5S028916; Thu, 2 Nov 2006 11:50:17 +0100 (CET) (envelope-from jhs) Date: Thu, 2 Nov 2006 11:50:17 +0100 (CET) Message-Id: <200611021050.kA2AoH5S028916@fire.jhs.private> To: freebsd-hackers@freebsd.org From: "Julian Stacey" Organization: http://berklix.com BSD Unix C Net Consultancy, Munich/Muenchen Fcc: sent User-agent: EXMH http://beedub.com/exmh/ on FreeBSD http://freebsd.org X-URL: http://berklix.com/~jhs/cv/ X-Fallback: jhs@mail.brierdr.com, jhs@freebsd.org, jhs@berklix.net Cc: jhs@berlix.com Subject: NFS on 6.1 limits at 4 Gig X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 10:52:20 -0000 NFS fails on files >= 4 Gig Can someone confirm please. uname -r # 6.1-RELEASE (both hosts) # echo "1024 1024 * 4 * 1 + p" | dc # 4194305 dd if=/dev/zero of=junk bs=1k count=4194305 ls -l junk # 4294968320 bytes rsh an_nfs_host ls -l /host/`hostname -s`/usr/tmp/junk # 1024 byte size! # with count=4194304, ls shows 0 bytes. It's not AMD failing, but NFS, as with an /etc/amd.map with a non NFS entry for my host "laps" for efficiency (in case some shell on host laps mounts itself), the full size 4294968320 is seen. /etc/amd.map /defaults type:=host;fs:=${autodir}/${rhost};rhost:=${key} laps type:=link;fs:=.. It's not just ls, cmp fails too, ( as also does my http://berklix.com/~jhs/src/bsd/jhs/bin/public/cmpd/cmpd.c ) cmp -z junk /host/laps/usr/tmp/junk # junk /host/laps/usr/tmp/junk differ: size Is send-pr appropriate ? Julian -- Julian Stacey. BSD Unix C Net Consultancy, Munich/Muenchen http://berklix.com Mail Ascii, not HTML. Ihr Rauch = mein allergischer Kopfschmerz. http://berklix.org/free-software From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 10:52:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 585A916A504 for ; Thu, 2 Nov 2006 10:52:37 +0000 (UTC) (envelope-from jan.grant@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB6D843D5E for ; Thu, 2 Nov 2006 10:52:36 +0000 (GMT) (envelope-from jan.grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk ([137.222.16.62]) by dirg.bris.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1GfaBU-0005vC-VF; Thu, 02 Nov 2006 10:52:35 +0000 Received: from cse-jg.cse.bris.ac.uk ([137.222.12.37]:50691) by mail.ilrt.bris.ac.uk with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1GfaBI-0006bL-26; Thu, 02 Nov 2006 10:52:20 +0000 Date: Thu, 2 Nov 2006 10:52:19 +0000 (GMT) From: Jan Grant X-X-Sender: cmjg@tribble.ilrt.bris.ac.uk To: Daniel Valencia In-Reply-To: <20061031161640.71807.qmail@web53907.mail.yahoo.com> Message-ID: <20061102104744.O52313@tribble.ilrt.bris.ac.uk> References: <20061031161640.71807.qmail@web53907.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-ILRT-MailScanner: Found to be clean X-ILRT-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.228, required 6, autolearn=disabled, ALL_TRUSTED -1.44, AWL 0.21) X-ILRT-MailScanner-From: jan.grant@bristol.ac.uk X-Spam-Status: No X-Spam-Score: -1.3 X-Spam-Level: - Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 10:52:37 -0000 On Tue, 31 Oct 2006, Daniel Valencia wrote: > if the file is not writable, return with error. > if the file has multiple links, and option -f was not specified, > return with error. > overwrite the file. > optionally, unlink the file. > > Additionally, -P should either be rm'ed from rm, or added as a > backwards compatibility hack that calls "shred" and returns with error > every time the latter does. > > These are my 1.99 cents. You might as well just truncate the file before removing it. --- Bakul Shah wrote: > If you are that concious about scrubbing why not add > scrubbing as a mount option (suggested option: -o paranoid) > then at least it will be handled consistently. This is, I reckon, the only sensible suggestion thus far: if the FS doesn't help you then you are implicitly depending on the FS implementation to ensure you are writing over the original data blocks anyway. -- jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/ Tel +44 (0)117 3317661 http://ioctl.org/jan/ You see what happens when you have fun with a stranger in the Alps? From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 16:36:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D750216A4CE for ; Thu, 2 Nov 2006 16:36:06 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46F1C43D78 for ; Thu, 2 Nov 2006 16:35:26 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1GffWx-0007L1-1J for freebsd-hackers@freebsd.org; Thu, 02 Nov 2006 17:35:03 +0100 Received: from nat155.aci.icn.bmstu.ru ([80.92.248.155]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 17:35:02 +0100 Received: from thIOretic by nat155.aci.icn.bmstu.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 17:35:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: "Maxim A. Zhuravlev" Date: Thu, 2 Nov 2006 19:03:53 +0300 Lines: 36 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: nat155.aci.icn.bmstu.ru X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.5744.16384 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.5744.16384 Sender: news Subject: [call for comments] l2sched X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 16:36:06 -0000 What is l2sched? l2sched is a mechanism that allows multiple third-party thread schedulers collaborate. These schedulers are to be implemented as loadable kernel modules aka KLD (kernel loadable driver). l2sched is being designed to to make it possible to provide a complicated software system with a scheduler meeting the system's requirements. l2sched is going to increase the portability of a software, dependant on an OS-specific scheduler's behavior (e.g.. the software, requiring the POSIX real-time schedulers). Currently the POSIX real-time schedulers are implemented as a part of the system schedulers. l2sched should let to implement them independently. l2schd should provide an scheduling policy-independent interface for the thread/process-scheduler interaction. The interface is be based on /usr/src/sys/sys/sched.h. The policy-specific calls like void sched_prio(struct thread , u_char); are to be replaced by void sched_set_param(void*, void*). l2sched is to give scheduler access to the cpu on a priority-based, proportional basis (here we come - level 2 scheduling -l2sched). As the l2sched is being designed for a general-purpose OS FreeBSD, it should provide an adequate experience. So idle process' schedulers should act only if no time-sharing threads' schedulers have runnable threads. The latest should act only when no real-time schedulers are active. A scheduler can schedule any subset of process types. With two given schedulers, the one that hosts more threads should be provided with a bigger portion of processor's time. The author believes that the performance overhead can be minimized provided a well-designed internal calls interface. Any descussion/comments are wellcome. mailto:maxim.zhuravlev@gmail.com maxim (dot) zhuravlev (at) gmail (dot) com -- WBR Maxim A. Zhuravlev From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 17:09:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73E7C16A415 for ; Thu, 2 Nov 2006 17:09:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id E402A43D5A for ; Thu, 2 Nov 2006 17:09:38 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kA2H6qRh013455; Thu, 2 Nov 2006 12:06:58 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 2 Nov 2006 12:02:27 -0500 User-Agent: KMail/1.9.1 References: <200611021050.kA2AoH5S028916@fire.jhs.private> In-Reply-To: <200611021050.kA2AoH5S028916@fire.jhs.private> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611021202.28351.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Thu, 02 Nov 2006 12:06:59 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2149/Thu Nov 2 10:27:15 2006 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: jhs@berlix.com, Julian Stacey Subject: Re: NFS on 6.1 limits at 4 Gig X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 17:09:39 -0000 On Thursday 02 November 2006 05:50, Julian Stacey wrote: > NFS fails on files >= 4 Gig Can someone confirm please. > > uname -r # 6.1-RELEASE (both hosts) > # echo "1024 1024 * 4 * 1 + p" | dc # 4194305 > dd if=/dev/zero of=junk bs=1k count=4194305 > ls -l junk # 4294968320 bytes > rsh an_nfs_host ls -l /host/`hostname -s`/usr/tmp/junk # 1024 byte size! > # with count=4194304, ls shows 0 bytes. > > It's not AMD failing, but NFS, as with an /etc/amd.map with a > non NFS entry for my host "laps" for efficiency (in case some > shell on host laps mounts itself), the full size 4294968320 is seen. > /etc/amd.map > /defaults type:=host;fs:=${autodir}/${rhost};rhost:=${key} > laps type:=link;fs:=.. > > It's not just ls, cmp fails too, ( as also does my > http://berklix.com/~jhs/src/bsd/jhs/bin/public/cmpd/cmpd.c ) > cmp -z junk /host/laps/usr/tmp/junk # junk /host/laps/usr/tmp/junk differ: size > > Is send-pr appropriate ? Are you using NFS v2 or v3? v2 doesn't support large files. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 17:50:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CE2F16A403 for ; Thu, 2 Nov 2006 17:50:18 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B902443D5D for ; Thu, 2 Nov 2006 17:50:17 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.7/8.13.7/NETPLEX) with ESMTP id kA2HoEep003699; Thu, 2 Nov 2006 12:50:14 -0500 (EST) Date: Thu, 2 Nov 2006 12:50:14 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: "Maxim A. Zhuravlev" In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-2.0.2 (mail.ntplx.net [204.213.176.10]); Thu, 02 Nov 2006 12:50:14 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org Subject: Re: [call for comments] l2sched X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2006 17:50:18 -0000 On Thu, 2 Nov 2006, Maxim A. Zhuravlev wrote: > What is l2sched? Did you forget to post a link to the patches or code? Or include an attachment? -- DE From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 18:03:32 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2405616A412 for ; Thu, 2 Nov 2006 18:03:32 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC90C43D64 for ; Thu, 2 Nov 2006 18:03:26 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Gfgu1-0002ft-IG for freebsd-hackers@freebsd.org; Thu, 02 Nov 2006 19:02:57 +0100 Received: from nat155.aci.icn.bmstu.ru ([80.92.248.155]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 19:02:57 +0100 Received: from thIOretic by nat155.aci.icn.bmstu.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 19:02:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: "Maxim A. Zhuravlev" Date: Thu, 2 Nov 2006 21:03:39 +0300 Lines: 9 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=response Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: nat155.aci.icn.bmstu.ru In-Reply-To: X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.5744.16384 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.5744.16384 Sender: news Subject: Re: [call for comments] l2sched X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 18:03:32 -0000 > Did you forget to post a link to the patches or code? Or > include an attachment? Well, working on them currently. I'd like to get some comments on the design. -- JID: thIOretic@jabber.icn.bmstu.ru From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 18:34:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24A3D16A416 for ; Thu, 2 Nov 2006 18:34:36 +0000 (UTC) (envelope-from zombyfork@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id B02CC43D5E for ; Thu, 2 Nov 2006 18:34:18 +0000 (GMT) (envelope-from zombyfork@gmail.com) Received: by nz-out-0102.google.com with SMTP id o37so154493nzf for ; Thu, 02 Nov 2006 10:34:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=p4GArx5R+rxM6qKMHDlEHDZ885XRHR8ari1a4McROzx1qGO/X04hFjR41xlTxiHuTkHqFEMIZ8PjDGL2VQTycQnCA9XqA6ZXGGh/cnHjbQdDskvUN/EeOYO6Taqls7+18xfLBrjdEDzc+eJbiySYogLWMc+b/EJgcFCxeQ0qEFY= Received: by 10.65.250.11 with SMTP id c11mr1243427qbs.1162492440527; Thu, 02 Nov 2006 10:34:00 -0800 (PST) Received: by 10.64.241.10 with HTTP; Thu, 2 Nov 2006 10:34:00 -0800 (PST) Message-ID: <346a80220611021034y469794d2he8de25e96ebe09c@mail.gmail.com> Date: Thu, 2 Nov 2006 13:34:00 -0500 From: "Coleman Kane" To: "Maxim A. Zhuravlev" In-Reply-To: MIME-Version: 1.0 References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: [call for comments] l2sched X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: cokane@cokane.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2006 18:34:36 -0000 On 11/2/06, Maxim A. Zhuravlev wrote: > > > Did you forget to post a link to the patches or code? Or > > include an attachment? > > > Well, working on them currently. I'd like to get some comments on the > design. > > -- > JID: thIOretic@jabber.icn.bmstu.ru > > _______________________________________________ > 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" It sounds interesting. If you have access to publish HTML or PDF somewhere, that would be appealing. Perhaps you could post a better formatted version of the previous email up as a wepage somewhere. Optionally, you could post a blog entry of it and allow for comments... -- Coleman Kane From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 19:44:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2280B16A403 for ; Thu, 2 Nov 2006 19:44:22 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D48E343D7C for ; Thu, 2 Nov 2006 19:44:04 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GfiCi-0003zc-KS for freebsd-hackers@freebsd.org; Thu, 02 Nov 2006 20:26:20 +0100 Received: from nat155.aci.icn.bmstu.ru ([80.92.248.155]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 20:26:20 +0100 Received: from thIOretic by nat155.aci.icn.bmstu.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 20:26:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: "Maxim A. Zhuravlev" Date: Thu, 2 Nov 2006 22:18:00 +0300 Lines: 9 Message-ID: References: <346a80220611021034y469794d2he8de25e96ebe09c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=response Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: nat155.aci.icn.bmstu.ru In-Reply-To: <346a80220611021034y469794d2he8de25e96ebe09c@mail.gmail.com> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.5744.16384 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.5744.16384 Sender: news Subject: Re: [call for comments] l2sched X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 19:44:22 -0000 >Optionally, you could post a > blog entry of it and allow for comments... > http://mzhuravlev.blogspot.com/ -- JID: thIOretic@jabber.icn.bmstu.ru From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 19:53:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2B3616A4B3 for ; Thu, 2 Nov 2006 19:53:07 +0000 (UTC) (envelope-from zombyfork@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id D709743E50 for ; Thu, 2 Nov 2006 19:51:42 +0000 (GMT) (envelope-from zombyfork@gmail.com) Received: by nz-out-0102.google.com with SMTP id o37so171632nzf for ; Thu, 02 Nov 2006 11:51:21 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=QNao76uspBYBsFpfJPcR43vdZUsw4p2X6YbwKq9TSfNjKwXsRkGoTwkRxZgMk2GhmFXNC5sEjzjPQC90TUx91K2Jsj2vHnstDnvOJ4z+wPEFGaeFLQEdEbn2u9JCCOlA/lZBHkmSLwlRVg+GErcDvV8fv+IZjsXbyLh2wMP6q7c= Received: by 10.64.156.3 with SMTP id d3mr1392049qbe.1162497081015; Thu, 02 Nov 2006 11:51:21 -0800 (PST) Received: by 10.64.241.10 with HTTP; Thu, 2 Nov 2006 11:51:20 -0800 (PST) Message-ID: <346a80220611021151j4eeded74p4f326eee3504cfeb@mail.gmail.com> Date: Thu, 2 Nov 2006 14:51:20 -0500 From: "Coleman Kane" To: "Maxim A. Zhuravlev" In-Reply-To: MIME-Version: 1.0 References: <346a80220611021034y469794d2he8de25e96ebe09c@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: [call for comments] l2sched X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: cokane@cokane.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2006 19:53:07 -0000 On 11/2/06, Maxim A. Zhuravlev wrote: > > >Optionally, you could post a > > blog entry of it and allow for comments... > > > > > http://mzhuravlev.blogspot.com/ > > -- > JID: thIOretic@jabber.icn.bmstu.ru > > _______________________________________________ > 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" > Thanks, you rock! From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 20:12:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3EAB16A47C; Thu, 2 Nov 2006 20:12:42 +0000 (UTC) (envelope-from jhs@flat.berklix.net) Received: from thin.berklix.org (thin.berklix.org [194.246.123.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07AFD43D53; Thu, 2 Nov 2006 20:12:41 +0000 (GMT) (envelope-from jhs@flat.berklix.net) Received: from js.berklix.net (p549A7CFB.dip.t-dialin.net [84.154.124.251]) (authenticated bits=128) by thin.berklix.org (8.12.11/8.12.11) with ESMTP id kA2KA60Q015939; Thu, 2 Nov 2006 21:10:07 +0100 (CET) (envelope-from jhs@flat.berklix.net) Received: from fire.jhs.private (fire.jhs.private [192.168.91.41]) by js.berklix.net (8.13.6/8.13.6) with ESMTP id kA2KA0J0007866; Thu, 2 Nov 2006 21:10:04 +0100 (CET) (envelope-from jhs@flat.berklix.net) Received: from fire.jhs.private (localhost [127.0.0.1]) by fire.jhs.private (8.13.6/8.13.6) with ESMTP id kA2KA9O7004585; Thu, 2 Nov 2006 21:10:09 +0100 (CET) (envelope-from jhs@fire.jhs.private) Message-Id: <200611022010.kA2KA9O7004585@fire.jhs.private> To: John Baldwin In-reply-to: <200611021202.28351.jhb@freebsd.org> References: <200611021050.kA2AoH5S028916@fire.jhs.private> <200611021202.28351.jhb@freebsd.org> Comments: In-reply-to John Baldwin message dated "Thu, 02 Nov 2006 12:02:27 -0500." Date: Thu, 02 Nov 2006 21:10:09 +0100 From: "Julian H. Stacey" Cc: freebsd-hackers@freebsd.org, jhs@berlix.com Subject: Re: NFS on 6.1 limits at 4 Gig X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 20:12:42 -0000 John Baldwin wrote: > On Thursday 02 November 2006 05:50, Julian Stacey wrote: > > NFS fails on files >= 4 Gig Can someone confirm please. > > > > uname -r # 6.1-RELEASE (both hosts) > > # echo "1024 1024 * 4 * 1 + p" | dc # 4194305 > > dd if=/dev/zero of=junk bs=1k count=4194305 > > ls -l junk # 4294968320 bytes > > rsh an_nfs_host ls -l /host/`hostname -s`/usr/tmp/junk # 1024 byte size! > > # with count=4194304, ls shows 0 bytes. > > > > It's not AMD failing, but NFS, as with an /etc/amd.map with a > > non NFS entry for my host "laps" for efficiency (in case some > > shell on host laps mounts itself), the full size 4294968320 is seen. > > /etc/amd.map > > /defaults type:=host;fs:=${autodir}/${rhost};rhost:=${key} > > laps type:=link;fs:=.. > > > > It's not just ls, cmp fails too, ( as also does my > > http://berklix.com/~jhs/src/bsd/jhs/bin/public/cmpd/cmpd.c ) > > cmp -z junk /host/laps/usr/tmp/junk # junk /host/laps/usr/tmp/junk differ: size > > > > Is send-pr appropriate ? > > Are you using NFS v2 or v3? v2 doesn't support large files. > > John Baldwin Thanks, I don't know ! Whatever 6.1-RELEASE comes standard with. After your mail I did cd /usr/ports ; echo */*nfs* net-mgmt/nfsen net/nfsshell net/pcnfsd net/unfs3 /usr/ports/net/unfs3 offers a non ernel V3 server but I'd still need a v3 client I suppose ? Are 6.2-pre or current using V3 NFS then ? Hints which way to jump / where to RTFM please :-) -- Julian Stacey. BSD Unix C Net Consultancy, Munich/Muenchen http://berklix.com Mail Ascii, not HTML. Ihr Rauch = mein allergischer Kopfschmerz. http://berklix.org/free-software From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 20:35:47 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E47D16A416 for ; Thu, 2 Nov 2006 20:35:47 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C05743D46 for ; Thu, 2 Nov 2006 20:35:46 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1GfjHB-0002xY-PT for freebsd-hackers@freebsd.org; Thu, 02 Nov 2006 21:35:01 +0100 Received: from anthonychavez.org ([166.70.126.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 21:35:01 +0100 Received: from acc by anthonychavez.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 21:35:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Anthony Chavez Date: Thu, 02 Nov 2006 13:19:25 -0700 Lines: 150 Message-ID: <87odrpr48i.fsf@hephaistos.aegaeum.anthonychavez.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: anthonychavez.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) Cancel-Lock: sha1:O/lRrAcKiCMI64UiN0PPdR8QchA= Sender: news Subject: Panic on 6.1-RELEASE-p3 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 20:35:47 -0000 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Transfer-Encoding: quoted-printable freebsd-hackers: I have attached the backtraces of 17 core dumps from one of my machines. I have several deployments of this same FreeBSD version in the wild, and this is the only machine exhibiting this behavior. Initially, the cause of these panics seemed to be related to some component in the FreeBSD toolchain, as they would occur when attempting to install a port. net/samba3 was the one we'd usually test with, but the system would panic with most other larger packages as well. However, the system is panicking at irrgeular intervals, ranging between 1-3 weeks apart. This is mostly happening in the off-hours when no human users are actively using the machine, but there have been 1 or 2 incidences where the machine has panicked during prime time. I would greatly appreciate any assistance that I can get with this. =2D-=20 Anthony Chavez http://anthonychavez.org/ mailto:acc@anthonychavez.org jabber:acc@jabber.anthonychavez.org --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=backtraces.txt.gz Content-Transfer-Encoding: base64 H4sICD5BSkUCA2NyYXNoZHVtcC5sb2cA7Z17c+O2dsD/tj4Fxjvp9Wa8Xrwfbn3v5NFkMpMmabO5 aef2joYEQUtdSdQlKa89nX73HvAhU5RsS47WlnexM/bKRyAOQAIH50cAB9ObOLv+Ar2/TGL0dlHk b7P4f6r/i9y+LW6Kt7//8O6739++d/nMTc4SFy8u0dXUZrk7Y4O/ff/t1+jDeDJBs6xEsUNRPHGo zFCdblG4/M00S0A0yl2UFOe1isk49j+1cJjEZ0V2jn6bJS4dz1yCiptpnE3Q8bwYzi8nWRxNhpMs e7+YH/998P1PvyFfVHlGzgj623e5c1//+u3fB99k85t8fDkqEcWYIy9Hv2Zp+SHKHfouW8ySqBxn s1P0w8yeDXyxxwVKfaqiSXWKbHblctAf30B5HfKqvnczl0cT9Msinowt+nFs3ayApNEsQTfZAsF1 gw9uYrNpVW07imaXDo1Ln+BtlqNkXJT5OF6UDnKfj12BstR/DeVxObIuL6PxDL6aJWNfvOJs8O5m 7tBxMco++CtuxrPLY59z4VxVqJWkIyiur0cUF9kEdExu4DkgqEwezcoblEIBoKZnCHUybb89rr5O HBRgUuUF+VRPMyq8knR8ufD3Av46HjMt30yj3LrJG3/L4iI5PhsMfpv5x4fmWe7L4yvmC1g3FDR1 RRHBrYgXaery80EjLvNojgiFNlOO0HhWujxfzMvC3yffdJLBYPBdVEbLhOdo7nNJo8WkRB9GY2hd cL9aHdCyBvVXV+O8XMBlUZLkoPnoAuFr3HxnIdkRSIrF3OVX4wKq7Qt+WmftG+4crnGzcjCewdNa 2Ko686wqXpUTxef42mKpsbF8UJSRfb/8HjX/qnQa0jkjRRTHfJDmEbSKh9LZgS8fPN/LKRTBlzOO CueLf4om4ym0FXyd+n+nqPRPEV+TeHDk0337y48IEvnCI3IKjzJl1H+4hOeLyGCeZxZuBdTWpZPo 0t8TSLmYQuv94We4FAoysIs8B62oSetzZZIJjk5sVL4eVA9htpjGUH74itDBPJqNbfehDH6bl+Op O0cskSMup4QVg28X0zm0W0QwZejfvkYnFDrGYva+eD1A9SeEzxHx3xBhqsyK1+js7Axl75cpyHl1 fXW5JBrrNh3BWCFjCDJKIAPXG86QoSAjBGkjkFYGacmQ5gppBjIikDIGKc2QkgopQZBiICMgwwxJ rZBUBEkhkGQGSSi1BB0CdAjQIUCHAB0CdAjQwUEHBx0cdHDQwUEHBx0MdDDQwUAHAx0MdDDQwUAH BR0UdFDQQUEHBR0UdBDQQUCHvw8EdBDQQUCH8UVGXgHkBUnEYPAKI5RkUQI3F528RhE8NTtfnI3O iRQD+Dlq/kQ/gbVY2BFKfW+pbFDubJnlN2eDI+g8dbLBibf4r6GJFSX6stO6bz96ywLpy0UO3QLy GsY5qLcRXHCyMkL47vi2WMT5cJn2zJ4rol+fDRRhR/CLHx29/RL+F0dH6Ev0DlpoAWahMhjxJLPv wdJUJQFL52VzB1YOWpCX+Tykv+wtfFBHR9PyeugvGRbQyE7+qUyGYK5KV5QuqeSv/xnS6aOjd1/9 8OO/D7/5+advvnoHyYo3fy5hPKkzPkWtoNEOnau++h/V5aZWs5g9pIhiqB0lde0orWr3/fgKBsLb ++Yr5SJ4IPV4580xVHHi72MtQZeuLNoHEoNxgX5n3f0P/BVBqHpUIk2hpcBzijOwZCdg4svsgkpc XbD+mPyvYTFalEn2YQZPiWM6eEWbvCSmHPu8qm6OTtJpeeG/0DFTOkLHXxTHvguj7bIWQg9esTpr rSJsKtvtbcowrWz8SWUhL1pTqPgpclfRBd6sw49C9S+fBeSvmRy84m3+Rpmozb/NeVCb3P8t02Fa gMHT8JjTofMfOa4+J53PLhnDH2/AtGitiaFNYi9sEsRzn4ApQwnVss5tXHSFRjYpr6usKAejwXWj N9kktJuEkRfy6rOvDwzq3vrW3+X5bYHGlW4CT85QJnQttb5OrEldmX74G4wbZ02N5ssMiqK+XkgJ ygX9vy1vPZVm8Eo0t15qE1W33kaTSX37X9+Thbu2bu6H2LPinDDIRzatrzE6d1icsoCGgu9pfhsM kBq8Um03UQJMMGQ+7HbsiXNQ2qlv5ARzGSf2FGVzr+q0Mp8XzTA8cxf4oZY/BQfsGtRKBc1S12pV 6lJsvdqrGYzyQz+E5ZXxgCY6zotyCN42GGdfAHiEkmC9Wc3V9G0nB9BCiIHeZRo1LhaKVmqmw9rp OZlGc5+roDwSvlpX3jW6kAraCaYY2lmlp0o89I7FBUV/+m+M6Z9OG2HVci70641ladT4pmDgERLc 9kKbpstePm+KstLNEwa6PRh47+2C1F2+KhahRG/Z/sDkglLSKtU6fajrC3Pb95vPSVde9f1lMTpd n0ED7/Z+gpUyHMwmX+/+nPNO94creafj005/p51uju/p5rLTzcFF4QL6Gr3t5IL0OrnEgnc6eVvY 1pgVdY237eWMMbjLdD+9nLDK8cXCOFX1iL/8BXIY/JK7q3G28CzmveXxbObdAu8FjFvZCcCmpwRU Od5/ed2OlP9YjMvB9PH4ygO+BnwN+LqGpSIlW+Frle7Q8JVrCsh0cpm7+W78SshUiMCugV0DuwZ2 3YldvR08HHalmBip72FXyanhfXb1QrXKrppBwWgLtMkmod0kfHp2hfvHmPys2ZXqxD/0Z2NXJq11 fN/sKoxhnqFadiXSYCXo87ArdPM72BWKRakyz82uTTE6XZ8KaTawq8B8vfsL2mVXuLL70op0+jvZ kl3VKrsKSjnV97Mr3sCuwOQHw67yYNhVBHYN7BrYdcOUqtpy6lUdHrsS/1rxUew6YmpKcaDXQK+B XgO97jjzql4SvVIqiJD9qRcQar4680q5MKydxE02Ce0m4UehV2YCvR4wvRogIsnwvulVK4UxPhB6 hcfwidArWV94Qblqe92B0Sv07ECva/QqA70Get2SXhvqae3eeQOkcN0sqz8CReU3pxV/niNnwB6D 2V2yEcVTqgMZvSQyOiRHvB6rG2/cYKJsjI63bYxfTK4f67aDY8FTvdGxIJizjmPBDOEaE7K9Z4Ef 9CyU6fr3iXL3vRc31Ajb8Sxw7VnU5WKSyW1dCz/oiaVWY81+qEITLhRfWc8JqMEYFE7QFbzQGDPK Gme+9S8qoVzxL/qX1+u7iMJdR4N3PI3eBZtdDtojCyGJUV2nY40sJLTXjtMhhREddwNv621wxpcs 8Ie9jcbtV7EDB9znk6bA+pBXZoeLtKDo5Kp2j5UzxsAdA98iLzNI5cqL32YwDiYTGD4SGG5S5K79 K7aiGiXm1cs6fG3YYHO9IPe3af3TKPRMINUtEySSx7wt04d8DIPrSdWnqlYcO/twxsAC86LKly4h QOsIxiqf719//mX4+3/88O5fh1/98leoaTav7YaJnG9V0SZVNV2MU5+pJ4vGo5eWKV6Txawta9pM i2ErnPflx1mboY1t0/sjW46v3NDCGFwnTpX2upuu71+3VHKmmMW1JViWYHTOFF2691ITFzFfgiTz drspxMr1kG9yAUXplawuSb98Oz5kXzSvF4pFuVz6w1CshKv2XXR9a67uKFavCPcx7E0xvPQ+29i2 Q0LlN1f6rEy8vs03YFG3oK3zBmMCefP25QyLq1sMaXyH+0MQhe96b1LDCGvNT9eyEbmyZhV8DoWJ pl18WrFqlN39ngTfYcykokILKdk9/MTVOj2xFrmW9PSwLQNrD3dXLG1ZDcX/OZ6V+Frj4fI2b2vT wJeE/KSfFKj+MXYQBKUCQQWC+lgExVPZJSgyEnzKA0IFhPqUEYoaRrl+JoQi8k6EArhSjD4zQnGh iaJqHaG0WLoPrU8hoDFo3nM0QCiYXEOo28srTwNwR92PUMsL9odQKztmXhRCqcSaJDkchCLyyRBq VdUjEIoJZboIReTdCCXjKMIbEIrqCEawxyNUfX0foZqS9RCqKd9TINRqsXpF2CtCtZpeEELR/ssh wYxollNvh1BKNi+YHp5r3gtEMSMDRG2EKB0gKkBUWES5vrFPy+02APp0B7cBkHAAtd3j1wDl0jBT GNZQhjWUYQ3lzjsAwRAeUPQaQzGRd66h1BhrQtf8WC9c8WPfGK382kjV2wG4IrSbhE+/hlIqxST+ zKPXUIKfbw2l0JR8hB2AFFsju2soBTxu+kzRa6Cb37WG0heL42dfQ1kXo9P1fdAYLJdv7lZYVmq9 ZgOwWolgVWUpJO6ybDduFXzPDFG8+6KuUglmSG6/urKT/s7VlWID2raKD2F1JXcyPYzVlSZgbcDa LbF2j7jKeYrTeJlkA7VWL/8ega3CWqO2wFZuYrYNtvp0T4mty/cEyM2qtwSnW5EsUBZBJ252tRvI 8ikNk7UvlWLrpn77saFYm1c28SQqs+nYen3cAJ4Szo+Wood0tgk/c1TjJkobVCPg2kgOfo98HLMl 9l5vsdHUn9TdWSt4OR9hUrfrJXrfjzFCieyRohfi/lyuF64sh21qpJTukSJUQmvcI8WucKcZEE+K CoO1IOy+CV2iaddVND6YK9Ssi4zL6j7n9G7bwW97t80vluNT3a06/f0WyyQXUWTrScWhu3b2qjOj JqJqUWKU+5nKOjMbwx2eRnY4f4BBq37lM6wY5XZyFhRibZfThR9LJRWdqVvwJoz0Ku/QVk8Z8i2z Jlp2iOspJgy7r1dwp6/gO2YF8d370vAdb05qcMLmHnASZEM4UIq7nWGXGUG65xlBtnFGcE8YRHDg oMBBYXqvzz+KumSb6b063eHFSCFgNh4TI4VOZcCiMLkXJvfC5N4uxFiZwUMKkCLBOb5rco8TyYRp 9zo2yFYLBcWry28pZtL0AqSsCu0mYQjv+fkFSBGp5Ybv/WgKaBWE2sMIkOK7+acSIEVs6P5Y6sMM kEJxCJCyzq4ksGtg18Cu63N3VG+3NNWnO7ijFRnWFIa/q11PViRmxPGUB34N/Br4NfDrjjOeYApf zNGKGnMpKe9POXqhov3FqYpuWJzaEdpNwnC04ud3tKKIHdwAu3d+jdLDOVoRuvmncbQiUWthargU euX11cEcrQi2DIejFdf5lQZ+Dfwa+HUDl7ot+dUd4NZKhql5DL+KEZdh9jXQa6DXQK8706t7UfTK iZT9bVVeaHqHKyqMCVe0R69dod0kDPT6+dGrIknKyN5nX61JeYwPhl7dp0uvnNCVIKuBXg+cXlmg 10CvH+18ChF1o6uyRI+omYpwel8IsPpJB1hVPizocwVYVdGdAVYVFuzZA6yCm625kXibMyoIA5e4 P0MGQrMhwGrvjAqOjXjyMypeboBVKDyr9ioeSIBVFT1ZgNVVVbsHWKWJU37B3zJ6qIruDLCqwY6Q TQFWWZLgP3RGRXV9FclULQOstiXrBVhtyvckZ1SsFKtXhP2eUdFoekEBVtfenhAAyZ0CrFLcJn+a Qyr6QWhCfNWWo3jgqMBRzxCJRmCGrePPF4kmjraLROPTvYBINFxobcANKXad+JMjhqchpmqIRhOi 0Wye3YqjbjQapanShH6UaDSNpg3RaHbT+hTRaJQBr4gtdyzNO8K1s9+9cOXs96ZGauUd+xtIxwQ2 /aWhK8KniEajuNZCrUajaat7mNFo/Bj1yGg0DJBGr4SGgW7+caPR7E3lVtFoWm0hGg0ijAsYq9Su 0WhYG3X4E49GIwILBRbaloUOnghgtJIYnRSjHYOwJJSNKJmygARhsuvgnXOLu8659lNrmH8U57zR tME5303rEznnHH7RvnMOwt7J6ZVQY73qnPsa4f6+LakJw6LvnHeFT+GcM4IBZZtcb53zqrqH6Zxb /PhQkU4mq56yxR87VOS+VG4XKrLRFpzzKkAHeLVNKNftnXNiHnt43MtyzmVwzoNzHrYrrYeAtOl2 oSJ9uoMLFWmYJsAoxSjZjVIoTYgcMTVlKnBK2LMU9iyFPUu7RYwEa3goe5Y011pzjO+JGMk1Zaof Mg6Ey6s6ESOpNnItYuSt0G4SPu2eJaMFF1pS/hlvWYK7QzR/xtPgFI9VlOz9NDgS2Wqub7lliXDB n2nLku/ld21ZgmIZxp99y1JdjO6WJaE2rLkDCyzXej9ZXXPHVgNGPmbLUi9gpMS6XTm305YlsEsH s2VJuYPZsqQCwQaCDQS7tsRO8u0CblTpDo1gYdQ3Cp2A5PoGxsAdz4FLzIjwKQsbywLDBoYNDLvb 5Ke3hwd1pDnV+s64G8pQSTHtzz56Ye9Ic6VAbuTqQXWrQrtJGOJufH5xNwyLhYz3f6S5cI504m7A qCWqZXN9iCUVxJKdN8buEncDuvkdEAvFAmP6zEead19bEcYBVMVyrW8HCrFeWxYMLopYiblDqOie eEC7+2DbPx5kWL7CsM0tuo9hAaPXGdYvgDgUhmWSCoMPg2F1YNjAsIFh17eJ6XS7oJH6AGdh/djm GXZUlnNwq3dlWEpHQk45CRAbIDZAbIDY3Vbw6gOaiNXamGUcx43BIzHn/f1ttXBlf5sPCakZU7R/ 2npXaDcJnx5iwcBy9nlDLJWUPONMrKCpTeTeg0eadBViqfZrup8reKS+cyZWY2DB55+JrYvRhVm8 aSaWi7XoJ5gzw7onnxC875nYbYJHbjq6TzEZgkeuU6wJFBsodkuK/dUPFd4lbVy2k3KceBQhPgzR HD5rBqP/awSuD9QHqjF7U40uVYPyBr9lp2I1ow5AETwSKsTgCBvu/rC77owCT+q419Qe67uDY4bj Wk+eQSOKSnBD8nGWj6GPNlt4oD1oiXdyz4i5dd+9+2noqu/3IQI7c+K7Th3gL46J9nMMH8CiPVKl ZLeb7rxHSPXSI1zzB5cKoaNfMIaxYKR6hdz6h7X/1HcSt3AQhW8PrdMba5ZUXHSVFsNpcTOD5zit PDeeuDowZ+2I0Xsq6q/1lfXumObi1uuNta39Qp8xOEJV9lG9f+vBrBjWeunJah1TY9uohN/9+l8/ fdONStiEI+xFAISHjCm+3XIWS57aZXGqZOgkzqraOk6dWQYU5HFE7HpAQcHU7W6yWHrL5HOzI0Dy unIPV4tIH4+0jUrIjU2qIsFo8n7orn2b8x5Otqj7EmgRFqN/udXx52pXXF3nug207q3AhCdM39cG vBaPrlh0PasI3xYBjMl0nvnWtMvGK70vpwgeV3CKglMUXu1/UudBCb+tFJ18GGW7vdU3CRtxOhXh pX54qR9e6oeX+i/6RKj7V6btciKUFFKz/olQXaHdJAwr0z6/lWlaRgmP9r4yTYl4dXtVOBFqHydC ScpfzolQbWCfT/Cl/v8DKA+SzOr4AAA= --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iQEVAwUBRUpS5fAIdTFWAbdTAQJv4gf9HlTfPpQK6T3sVPNAQvtzF8n9+HjGcx6C iBri+gA+QLVDnmy8/IQ9IF2e8ZmKyd0gXbjUNOwVxG0VbY2NeWXnwkbKQ4DIkvou cz4owMbensim8uRcTQfZwT3b6Ozp/cpTFF/YGEG+9R5g2QfQ2yUeH4k/vlauhLoT PBgfz0T3f7r+YNucNIPK1jn8KJnTm3TdgsLS/8d6iT0ySxYQOke8jC8GHsAqS/+w vNMdeOaKqpqpZf81shHrEiJeTs6NdDceCX1SrVaksM5nwW9fl1V6C4TT17vVXDVW pn7DuxML+2wsgeE9JfSQlkWUn3PaLojmJuYvaxCuIzWoh9+jTiR4ag== =krcF -----END PGP SIGNATURE----- --==-=-=-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 21:37:40 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8094416A40F for ; Thu, 2 Nov 2006 21:37:40 +0000 (UTC) (envelope-from tech@nano.net) Received: from mail.smallweb.com (mail.smallweb.com [216.85.125.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0200143D5A for ; Thu, 2 Nov 2006 21:37:39 +0000 (GMT) (envelope-from tech@nano.net) Received: from Sixpence.mail.smallweb.com (sixpence.nano.net [216.85.125.9]) by mail.smallweb.com (Rockliffe SMTPRA 5.3.11) with ESMTP id for ; Thu, 2 Nov 2006 14:46:40 -0700 Message-Id: <6.2.0.14.2.20061102143341.034e71b0@nano.net> X-Mailer: QUALCOMM Windows Eudora Version 6.2.0.14 Date: Thu, 02 Nov 2006 14:37:31 -0700 To: freebsd-hackers@freebsd.org From: tech@nano.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Java X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 21:37:40 -0000 I need a jre to run a java app. The "jre" in the ports collection in the java directory is broken, I also tried grabbing it manually and it's still broken. I tried diablo, and that was a dead end too. Can I run java apps on FreeBSD? Any recommendations? I need something quick and easy as this is a test, this is only a test. And I've wasted a lot of time on it already..... From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 21:50:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8330616A40F for ; Thu, 2 Nov 2006 21:50:42 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id D29FA43D49 for ; Thu, 2 Nov 2006 21:50:39 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 23058 invoked by uid 1001); 2 Nov 2006 21:51:27 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Thu, 02 Nov 2006 16:51:26 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17738.26718.743060.34748@bhuda.mired.org> Date: Thu, 2 Nov 2006 16:51:26 -0500 To: tech@nano.net In-Reply-To: <6.2.0.14.2.20061102143341.034e71b0@nano.net> References: <6.2.0.14.2.20061102143341.034e71b0@nano.net> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: Java X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 21:50:42 -0000 In <6.2.0.14.2.20061102143341.034e71b0@nano.net>, tech@nano.net typed: > I need a jre to run a java app. The "jre" in the ports collection in the > java directory is broken, I also tried grabbing it manually and it's still > broken. I tried diablo, and that was a dead end too. Can I run java apps on > FreeBSD? Any recommendations? I need something quick and easy as this is a > test, this is only a test. And I've wasted a lot of time on it already..... Read http://catb.org/esr/faqs/smart-questions.html, then try asking your question again with that in mind. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 21:51:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA35016A416 for ; Thu, 2 Nov 2006 21:51:24 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18DCE43D76 for ; Thu, 2 Nov 2006 21:51:20 +0000 (GMT) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net ([12.207.12.9]) by sccmmhc91.asp.att.net (sccmmhc91) with ESMTP id <20061102215119m9100emeude>; Thu, 2 Nov 2006 21:51:19 +0000 Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id kA2LpDsf076991; Thu, 2 Nov 2006 15:51:13 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id kA2LpCKi076990; Thu, 2 Nov 2006 15:51:12 -0600 (CST) (envelope-from brooks) Date: Thu, 2 Nov 2006 15:51:12 -0600 From: Brooks Davis To: tech@nano.net Message-ID: <20061102215112.GC74928@lor.one-eyed-alien.net> References: <6.2.0.14.2.20061102143341.034e71b0@nano.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jy6Sn24JjFx/iggw" Content-Disposition: inline In-Reply-To: <6.2.0.14.2.20061102143341.034e71b0@nano.net> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: Java X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 21:51:24 -0000 --jy6Sn24JjFx/iggw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 02, 2006 at 02:37:31PM -0700, tech@nano.net wrote: >=20 > I need a jre to run a java app. The "jre" in the ports collection in the= =20 > java directory is broken, I also tried grabbing it manually and it's stil= l=20 > broken. I tried diablo, and that was a dead end too. Can I run java apps = on=20 > FreeBSD? Any recommendations? I need something quick and easy as this is = a=20 > test, this is only a test. And I've wasted a lot of time on it already...= =2E. The package from the FreeBSD Foundation at: http://www.freebsdfoundation.org/downloads/java.shtml works for many people. If it doesn't work for you, you'll need to provide a lot more infomration if you want help. At an absolute minimum you'll need to provide your OS version, architecture, the version of these packages/ports you are trying to install, and the errors you are seeing. -- Brooks --jy6Sn24JjFx/iggw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFSmhPXY6L6fI4GtQRAmaUAJ42BQfvuP1opsaQSYrn0kYLPT1JxQCeLQXs x9FGZ1NstmYmaAMEWXrvL2E= =AMUf -----END PGP SIGNATURE----- --jy6Sn24JjFx/iggw-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 22:05:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D6D816A53D for ; Thu, 2 Nov 2006 22:05:46 +0000 (UTC) (envelope-from tech@nano.net) Received: from mail.smallweb.com (mail.smallweb.com [216.85.125.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7486843D88 for ; Thu, 2 Nov 2006 22:04:57 +0000 (GMT) (envelope-from tech@nano.net) Received: from Sixpence.mail.smallweb.com (sixpence.nano.net [216.85.125.9]) by mail.smallweb.com (Rockliffe SMTPRA 5.3.11) with ESMTP id ; Thu, 2 Nov 2006 15:13:58 -0700 Message-Id: <6.2.0.14.2.20061102150128.034ecde0@nano.net> X-Mailer: QUALCOMM Windows Eudora Version 6.2.0.14 Date: Thu, 02 Nov 2006 15:04:49 -0700 To: Brooks Davis From: tech@nano.net In-Reply-To: <20061102215112.GC74928@lor.one-eyed-alien.net> References: <6.2.0.14.2.20061102143341.034e71b0@nano.net> <20061102215112.GC74928@lor.one-eyed-alien.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Java X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 22:05:46 -0000 Thanks. I didn't realize the situation was this bad. I've got a java app from a vendor that I wanted to try running from a command line, I'm running it on an xp box and it's not doing well. So I thought I'd try a more stable and speedy UNIX platform. Nevermind!!!!! At 02:51 PM 11/2/2006, Brooks Davis wrote: >On Thu, Nov 02, 2006 at 02:37:31PM -0700, tech@nano.net wrote: > > > > I need a jre to run a java app. The "jre" in the ports collection in the > > java directory is broken, I also tried grabbing it manually and it's still > > broken. I tried diablo, and that was a dead end too. Can I run java > apps on > > FreeBSD? Any recommendations? I need something quick and easy as this is a > > test, this is only a test. And I've wasted a lot of time on it already..... > >The package from the FreeBSD Foundation at: > >http://www.freebsdfoundation.org/downloads/java.shtml > >works for many people. If it doesn't work for you, you'll need to >provide a lot more infomration if you want help. At an absolute minimum >you'll need to provide your OS version, architecture, the version of >these packages/ports you are trying to install, and the errors you are >seeing. > >-- Brooks From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 22:10:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 705CD16A510 for ; Thu, 2 Nov 2006 22:10:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id A441C43D55 for ; Thu, 2 Nov 2006 22:10:01 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kA2M7FQx015381; Thu, 2 Nov 2006 17:07:25 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Julian H. Stacey" Date: Thu, 2 Nov 2006 16:52:07 -0500 User-Agent: KMail/1.9.1 References: <200611021050.kA2AoH5S028916@fire.jhs.private> <200611021202.28351.jhb@freebsd.org> <200611022010.kA2KA9O7004585@fire.jhs.private> In-Reply-To: <200611022010.kA2KA9O7004585@fire.jhs.private> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611021652.07853.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Thu, 02 Nov 2006 17:07:25 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2151/Thu Nov 2 13:35:18 2006 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, jhs@berlix.com Subject: Re: NFS on 6.1 limits at 4 Gig X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 22:10:02 -0000 On Thursday 02 November 2006 15:10, Julian H. Stacey wrote: > John Baldwin wrote: > > On Thursday 02 November 2006 05:50, Julian Stacey wrote: > > > NFS fails on files >= 4 Gig Can someone confirm please. > > > > > > uname -r # 6.1-RELEASE (both hosts) > > > # echo "1024 1024 * 4 * 1 + p" | dc # 4194305 > > > dd if=/dev/zero of=junk bs=1k count=4194305 > > > ls -l junk # 4294968320 bytes > > > rsh an_nfs_host ls -l /host/`hostname -s`/usr/tmp/junk # 1024 byte size! > > > # with count=4194304, ls shows 0 bytes. > > > > > > It's not AMD failing, but NFS, as with an /etc/amd.map with a > > > non NFS entry for my host "laps" for efficiency (in case some > > > shell on host laps mounts itself), the full size 4294968320 is seen. > > > /etc/amd.map > > > /defaults type:=host;fs:=${autodir}/${rhost};rhost:=${key} > > > laps type:=link;fs:=.. > > > > > > It's not just ls, cmp fails too, ( as also does my > > > http://berklix.com/~jhs/src/bsd/jhs/bin/public/cmpd/cmpd.c ) > > > cmp -z junk /host/laps/usr/tmp/junk # junk /host/laps/usr/tmp/junk differ: size > > > > > > Is send-pr appropriate ? > > > > Are you using NFS v2 or v3? v2 doesn't support large files. > > > > John Baldwin > > Thanks, I don't know ! Whatever 6.1-RELEASE comes standard with. > > After your mail I did cd /usr/ports ; echo */*nfs* > net-mgmt/nfsen net/nfsshell net/pcnfsd net/unfs3 > /usr/ports/net/unfs3 offers a non ernel V3 server > but I'd still need a v3 client I suppose ? > Are 6.2-pre or current using V3 NFS then ? > Hints which way to jump / where to RTFM please :-) It should default to v3, the nfs client in the base system can do either v2 or v3. I'm not sure if amd is going to default to v2 with your map file though. You can use tcpdump on the port with NFS traffic to see if it's v2 or v3 though. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 22:11:57 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B3FB16A494 for ; Thu, 2 Nov 2006 22:11:57 +0000 (UTC) (envelope-from mlobo@digiart.art.br) Received: from recife.ipad.com.br (recife.ipadnet.com.br [200.249.204.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 684B343D5D for ; Thu, 2 Nov 2006 22:11:55 +0000 (GMT) (envelope-from mlobo@digiart.art.br) Received: from lobo ([201.32.148.166]) (authenticated bits=0) by recife.ipad.com.br (8.12.8/8.12.8) with ESMTP id kA2MdXmd024866 for ; Thu, 2 Nov 2006 19:39:39 -0300 From: Mario Lobo To: freebsd-hackers@freebsd.org Date: Thu, 2 Nov 2006 19:15:30 -0300 User-Agent: KMail/1.9.4 References: <6.2.0.14.2.20061102143341.034e71b0@nano.net> <17738.26718.743060.34748@bhuda.mired.org> In-Reply-To: <17738.26718.743060.34748@bhuda.mired.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611021915.30997.mlobo@digiart.art.br> Subject: Re: Java X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 22:11:57 -0000 On Thursday 02 November 2006 18:51, Mike Meyer wrote: > Read http://catb.org/esr/faqs/smart-questions.html, then try asking > your question again with that in mind. > > X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF18816A415 for ; Thu, 2 Nov 2006 22:32:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53A5943D8E for ; Thu, 2 Nov 2006 22:30:43 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kA2MUZLe015593; Thu, 2 Nov 2006 17:30:35 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 2 Nov 2006 17:12:32 -0500 User-Agent: KMail/1.9.1 References: <87odrpr48i.fsf@hephaistos.aegaeum.anthonychavez.org> In-Reply-To: <87odrpr48i.fsf@hephaistos.aegaeum.anthonychavez.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611021712.32665.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Thu, 02 Nov 2006 17:30:35 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2151/Thu Nov 2 13:35:18 2006 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: Anthony Chavez Subject: Re: Panic on 6.1-RELEASE-p3 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 22:32:08 -0000 On Thursday 02 November 2006 15:19, Anthony Chavez wrote: > freebsd-hackers: > > I have attached the backtraces of 17 core dumps from one of my > machines. I have several deployments of this same FreeBSD version in > the wild, and this is the only machine exhibiting this behavior. > > Initially, the cause of these panics seemed to be related to some > component in the FreeBSD toolchain, as they would occur when > attempting to install a port. net/samba3 was the one we'd usually > test with, but the system would panic with most other larger packages > as well. > > However, the system is panicking at irrgeular intervals, ranging > between 1-3 weeks apart. This is mostly happening in the off-hours > when no human users are actively using the machine, but there have > been 1 or 2 incidences where the machine has panicked during prime > time. > > I would greatly appreciate any assistance that I can get with this. Have you ran a memory checker or other diags to check for failing hardware? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 23:07:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2873216A47E for ; Thu, 2 Nov 2006 23:07:17 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42F6843D7F for ; Thu, 2 Nov 2006 23:07:13 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so242088uge for ; Thu, 02 Nov 2006 15:07:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uH+kzvg645/+dq+UAOuKbkew5lBQuvwIYCualHjJVH/rBaYBWEnaPDSsPkbDXuVWvZm9qcaD6FH77evVFmhVvImkwzoH2R395kHL6xtgyXBPtFJDUFXb8AViRzYt3X5QlYMmGNTcdTw44T3el22hwBhQlkeg7FaM/AqO3lqxEn8= Received: by 10.82.135.13 with SMTP id i13mr513983bud.1162508830727; Thu, 02 Nov 2006 15:07:10 -0800 (PST) Received: by 10.82.163.16 with HTTP; Thu, 2 Nov 2006 15:07:10 -0800 (PST) Message-ID: <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> Date: Thu, 2 Nov 2006 15:07:10 -0800 From: "Josh Carroll" To: freebsd-hackers@freebsd.org In-Reply-To: <20061102094748.G75543@mignon.ki.iif.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <20061102094748.G75543@mignon.ki.iif.hu> Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@psualum.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2006 23:07:17 -0000 > I haven't tested yet, but I think in the options structure you > should use : > > + {"ipv6", 0, NULL, '6'}, > > instead of: > + {"ipv6", 0, NULL, 0}, Oops, thanks for catching that. Fixed that in the new patch below. > also for portability you should use: > no_argument or required_argument as a second field.... Thank you for the feedback, I've modified that and the new patch is below. Thanks, Josh --- sockstat.c.orig Thu Nov 2 15:01:16 2006 +++ sockstat.c Thu Nov 2 15:02:32 2006 @@ -58,6 +58,7 @@ #include #include #include +#include static int opt_4; /* Show IPv4 sockets */ static int opt_6; /* Show IPv6 sockets */ @@ -65,6 +66,8 @@ static int opt_l; /* Show listening sockets */ static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ +static int opt_tcp; /* show tcp */ +static int opt_udp; /* show udp */ static int *ports; @@ -584,8 +587,20 @@ main(int argc, char *argv[]) { int o; + static struct option options[] = { + {"ipv4", no_argument, NULL, '4'}, + {"ipv6", no_argument, NULL, '6'}, + {"connected", no_argument, NULL, 'c'}, + {"listening", no_argument, NULL, 'l'}, + {"unix", no_argument, NULL, 'u'}, + {"verbose", no_argument, NULL, 'v'}, + {"port", required_argument, NULL, 'p'}, + {"tcp", no_argument, NULL, 't'}, + {"udp", no_argument, NULL, 'd'}, + {NULL, 0, NULL, 0} + }; - while ((o = getopt(argc, argv, "46clp:uv")) != -1) + while ((o = getopt_long_only(argc, argv, "46clp:uvtd", options, NULL)) != -1) switch (o) { case '4': opt_4 = 1; @@ -608,6 +623,12 @@ case 'v': ++opt_v; break; + case 't': + opt_tcp = 1; + break; + case 'd': + opt_udp = 1; + break; default: usage(); } @@ -618,20 +639,35 @@ if (argc > 0) usage(); - if (!opt_4 && !opt_6 && !opt_u) - opt_4 = opt_6 = opt_u = 1; + if (!opt_4 && !opt_6) { + opt_4 = opt_6 = 1; + + if(!opt_u) { + if(opt_tcp || opt_udp) + opt_u = 0; + } else { + opt_4 = opt_6 = opt_u = 1; + } + } + if (!opt_c && !opt_l) opt_c = opt_l = 1; + if(!opt_tcp && !opt_udp) + opt_tcp = opt_udp = 1; + if (opt_4 || opt_6) { - gather_inet(IPPROTO_TCP); - gather_inet(IPPROTO_UDP); + if(opt_tcp) + gather_inet(IPPROTO_TCP); + if(opt_udp) + gather_inet(IPPROTO_UDP); gather_inet(IPPROTO_DIVERT); } if (opt_u) { gather_unix(SOCK_STREAM); gather_unix(SOCK_DGRAM); } + getfiles(); display(); From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 23:11:53 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC85316A417 for ; Thu, 2 Nov 2006 23:11:53 +0000 (UTC) (envelope-from devon.odell@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6780343D75 for ; Thu, 2 Nov 2006 23:11:51 +0000 (GMT) (envelope-from devon.odell@gmail.com) Received: by nf-out-0910.google.com with SMTP id p77so1159148nfc for ; Thu, 02 Nov 2006 15:11:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=OXi0RL7eEIiF+lzFKMnN4mygTkaLLHmK/g/WZbAVaNxRv7WK5R2zWkq6PUPiElu5s8oY09kfo7AD31SktWUifrNes7OpbZAzbPDQcbMlZOmbhY9rvmxo/JQbvG1wl+N08O8TjthDPYeEX754NjjfCJFlO+HZ7saEvNKFsOO59fc= Received: by 10.82.105.13 with SMTP id d13mr524304buc.1162509061043; Thu, 02 Nov 2006 15:11:01 -0800 (PST) Received: by 10.82.136.13 with HTTP; Thu, 2 Nov 2006 15:11:00 -0800 (PST) Message-ID: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> Date: Thu, 2 Nov 2006 18:11:00 -0500 From: "Devon H. O'Dell" To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: vr(4) performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 23:11:53 -0000 Hey all, So, vr(4) kind of sucks, and it seems like this is mostly due to the fact that we call m_defrag() on every mbuf that we send through it. This seems to really screw performance on outgoing packets (something like 33% the output efficiency of fxp(4), if I'm understanding this all correctly). I'm sort of wondering if anybody has attempted to address this before and if there's a way to possibly mitigate this behavior. I know Bill Paul's comments say ``Unfortunately, FreeBSD FreeBSD doesn't guarantee that mbufs will be filled in starting at longword boundaries, so we have to do a buffer copy before transmission.'' -- since it's been a long day, and I'm about to go home to grab a pizza and stop thinking about code, would anybody mind offering suggestions as to either: a) Pros and cons of guaranteeing that they're filled in aligned (and possibly hints on doing it), or b) Possible workarounds / hacks to do this faster for vr(4) Any input is appreciated! (Except ``vr(4) is lol'') Kind regards, Devon H. O'Dell From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 23:27:49 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1850616A403 for ; Thu, 2 Nov 2006 23:27:49 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78CB843D67 for ; Thu, 2 Nov 2006 23:27:48 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.80] ([10.0.0.80]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id kA2NRlIu056547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Nov 2006 15:27:48 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <454A7EF2.5090201@errno.com> Date: Thu, 02 Nov 2006 15:27:46 -0800 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: "Devon H. O'Dell" References: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> In-Reply-To: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: vr(4) performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Nov 2006 23:27:49 -0000 Devon H. O'Dell wrote: > Hey all, > > So, vr(4) kind of sucks, and it seems like this is mostly due to the > fact that we call m_defrag() on every mbuf that we send through it. > This seems to really screw performance on outgoing packets (something > like 33% the output efficiency of fxp(4), if I'm understanding this > all correctly). > > I'm sort of wondering if anybody has attempted to address this before > and if there's a way to possibly mitigate this behavior. I know Bill > Paul's comments say ``Unfortunately, FreeBSD FreeBSD doesn't guarantee > that mbufs will be filled in starting at longword boundaries, so we > have to do a buffer copy before transmission.'' -- since it's been a > long day, and I'm about to go home to grab a pizza and stop thinking > about code, would anybody mind offering suggestions as to either: > > a) Pros and cons of guaranteeing that they're filled in aligned (and > possibly hints on doing it), or > b) Possible workarounds / hacks to do this faster for vr(4) > > Any input is appreciated! (Except ``vr(4) is lol'') m_defrag is ~10x slower than it needs to be. I proposed changes to address this a while back but eventually gave up and put driver-specific code in ath. You can look there or I can send you some patches to m_defrag to try out in vr. Sam From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 00:30:38 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FE8416A4AB for ; Fri, 3 Nov 2006 00:30:38 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id D822A43D45 for ; Fri, 3 Nov 2006 00:30:37 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by wx-out-0506.google.com with SMTP id i27so247140wxd for ; Thu, 02 Nov 2006 16:30:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=WVdYFYJKEKfKzE2TxYJ3mHzu+NCDa9jsWXkdh0hrrYOVc+2gru4yOM1tZvVDnmQ54UvD0n/I1CSdtvzvTX6nMQ7oQ/0STS0MtL2MU3rFTZWVICxbZTpZq9oqOUmX9PtEDQrsduFQGEfQ58l0zjzGPE3eXAI3S60irmvuDNEG6S4= Received: by 10.70.75.14 with SMTP id x14mr1922574wxa.1162513836807; Thu, 02 Nov 2006 16:30:36 -0800 (PST) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTP id i19sm183057wxd.2006.11.02.16.30.35; Thu, 02 Nov 2006 16:30:36 -0800 (PST) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id kA30XDuY069619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 3 Nov 2006 09:33:13 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id kA30XB1I069618; Fri, 3 Nov 2006 09:33:11 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Fri, 3 Nov 2006 09:33:11 +0900 From: Pyun YongHyeon To: Sam Leffler Message-ID: <20061103003311.GD69214@cdnetworks.co.kr> References: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> <454A7EF2.5090201@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <454A7EF2.5090201@errno.com> User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org, "Devon H. O'Dell" Subject: Re: vr(4) performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2006 00:30:38 -0000 On Thu, Nov 02, 2006 at 03:27:46PM -0800, Sam Leffler wrote: > Devon H. O'Dell wrote: > > Hey all, > > > > So, vr(4) kind of sucks, and it seems like this is mostly due to the > > fact that we call m_defrag() on every mbuf that we send through it. > > This seems to really screw performance on outgoing packets (something > > like 33% the output efficiency of fxp(4), if I'm understanding this > > all correctly). > > > > I'm sort of wondering if anybody has attempted to address this before > > and if there's a way to possibly mitigate this behavior. I know Bill > > Paul's comments say ``Unfortunately, FreeBSD FreeBSD doesn't guarantee > > that mbufs will be filled in starting at longword boundaries, so we > > have to do a buffer copy before transmission.'' -- since it's been a > > long day, and I'm about to go home to grab a pizza and stop thinking > > about code, would anybody mind offering suggestions as to either: > > > > a) Pros and cons of guaranteeing that they're filled in aligned (and > > possibly hints on doing it), or > > b) Possible workarounds / hacks to do this faster for vr(4) > > > > Any input is appreciated! (Except ``vr(4) is lol'') > > m_defrag is ~10x slower than it needs to be. I proposed changes to > address this a while back but eventually gave up and put driver-specific > code in ath. You can look there or I can send you some patches to > m_defrag to try out in vr. > Because the purpose of m_defrag(9) in vr(4) is to guarantee longword aligned mbufs I'm not sure ath_defrag can be used here. If memory serve me right ath_defrag would not change the first mbuf address in a chain. If the first mbuf is not aligned on longword boundary it wouldn't work I guess. Of course we can check the first mbuf in the chain before calling super-fast ath_defrag, I guess. -- Regards, Pyun YongHyeon From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 02:18:25 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61B4216A415 for ; Fri, 3 Nov 2006 02:18: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 9A05943D45 for ; Fri, 3 Nov 2006 02:18:23 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kA32ICsA006340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 3 Nov 2006 04:18:19 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kA32I4GL016247; Fri, 3 Nov 2006 04:18:05 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kA32I3ts016246; Fri, 3 Nov 2006 04:18:03 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 3 Nov 2006 04:18:03 +0200 From: Giorgos Keramidas To: josh.carroll@psualum.com Message-ID: <20061103021803.GC8508@kobe.laptop> References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <20061102094748.G75543@mignon.ki.iif.hu> <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.537, required 5, AWL -0.14, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 02:18:25 -0000 On 2006-11-02 15:07, Josh Carroll wrote: > > I haven't tested yet, but I think in the options structure you > >should use : > > > >+ {"ipv6", 0, NULL, '6'}, > > > >instead of: > >+ {"ipv6", 0, NULL, 0}, > > Oops, thanks for catching that. Fixed that in the new patch below. > > >also for portability you should use: > >no_argument or required_argument as a second field.... > > Thank you for the feedback, I've modified that and the new patch is below. Can we have something that doesn't need one option letter for each protocol, protocol family or socket type, please? :) I've tested this patch, and it seems to work ok -- at least much better than having to type: $ sockstat -4 | { read head; echo "$head" ; grep -i tcp; } But I don't particularly like the fact that it grabs two option letters for tcp and udp. Maybe we can add an option like: -P proto Display only sockets of _protocol_ type. Then we can use just two options, similar to the ones netstat(1) uses, to designate a protocol family and a specific protocol within that family :) > --- sockstat.c.orig Thu Nov 2 15:01:16 2006 > +++ sockstat.c Thu Nov 2 15:02:32 2006 > @@ -58,6 +58,7 @@ > #include > #include > #include > +#include > > static int opt_4; /* Show IPv4 sockets */ > static int opt_6; /* Show IPv6 sockets */ > @@ -65,6 +66,8 @@ > static int opt_l; /* Show listening sockets */ > static int opt_u; /* Show Unix domain sockets */ > static int opt_v; /* Verbose mode */ > +static int opt_tcp; /* show tcp */ > +static int opt_udp; /* show udp */ > > static int *ports; > > @@ -584,8 +587,20 @@ > main(int argc, char *argv[]) > { > int o; > + static struct option options[] = { > + {"ipv4", no_argument, NULL, '4'}, > + {"ipv6", no_argument, NULL, '6'}, > + {"connected", no_argument, NULL, 'c'}, > + {"listening", no_argument, NULL, 'l'}, > + {"unix", no_argument, NULL, 'u'}, > + {"verbose", no_argument, NULL, 'v'}, > + {"port", required_argument, NULL, 'p'}, > + {"tcp", no_argument, NULL, 't'}, > + {"udp", no_argument, NULL, 'd'}, > + {NULL, 0, NULL, 0} > + }; > > - while ((o = getopt(argc, argv, "46clp:uv")) != -1) > + while ((o = getopt_long_only(argc, argv, "46clp:uvtd", options, > NULL)) != -1) > switch (o) { > case '4': > opt_4 = 1; > @@ -608,6 +623,12 @@ > case 'v': > ++opt_v; > break; > + case 't': > + opt_tcp = 1; > + break; > + case 'd': > + opt_udp = 1; > + break; > default: > usage(); > } > @@ -618,20 +639,35 @@ > if (argc > 0) > usage(); > > - if (!opt_4 && !opt_6 && !opt_u) > - opt_4 = opt_6 = opt_u = 1; > + if (!opt_4 && !opt_6) { > + opt_4 = opt_6 = 1; > + > + if(!opt_u) { > + if(opt_tcp || opt_udp) > + opt_u = 0; > + } else { > + opt_4 = opt_6 = opt_u = 1; > + } > + } > + > if (!opt_c && !opt_l) > opt_c = opt_l = 1; > > + if(!opt_tcp && !opt_udp) > + opt_tcp = opt_udp = 1; > + > if (opt_4 || opt_6) { > - gather_inet(IPPROTO_TCP); > - gather_inet(IPPROTO_UDP); > + if(opt_tcp) > + gather_inet(IPPROTO_TCP); > + if(opt_udp) > + gather_inet(IPPROTO_UDP); > gather_inet(IPPROTO_DIVERT); > } > if (opt_u) { > gather_unix(SOCK_STREAM); > gather_unix(SOCK_DGRAM); > } > + > getfiles(); > display(); > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 02:27:15 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F6DD16A47B for ; Fri, 3 Nov 2006 02:27:15 +0000 (UTC) (envelope-from tech@nano.net) Received: from mail.smallweb.com (mail.smallweb.com [216.85.125.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07A0E43D69 for ; Fri, 3 Nov 2006 02:27:11 +0000 (GMT) (envelope-from tech@nano.net) Received: from Sixpence.mail.smallweb.com (sixpence.nano.net [216.85.125.9]) by mail.smallweb.com (Rockliffe SMTPRA 5.3.11) with ESMTP id for ; Thu, 2 Nov 2006 19:36:13 -0700 Message-Id: <6.2.0.14.2.20061102192644.034ef110@nano.net> X-Mailer: QUALCOMM Windows Eudora Version 6.2.0.14 Date: Thu, 02 Nov 2006 19:27:04 -0700 To: freebsd-hackers@freebsd.org From: tech@nano.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: Java X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 02:27:15 -0000 I never said it was broken, just that the jre in the ports collection was. It seems to be looking for something other than itself when you attempt a make. Under the circumstances it seems it should be removed? http://cvsweb.freebsd.org/ports/java/jre/jre.tar.gz?tarball=1 Thanks again, but Brooks was very helpful and understanding, and his link to the java page cleared it all up for me. I'm good now.....really.....I'm just fine now.....honest...... At 03:48 PM 11/2/2006, Kris Kennaway wrote: >On Thu, Nov 02, 2006 at 03:04:49PM -0700, tech@nano.net wrote: > > > > > > > > Thanks. I didn't realize the situation was this bad. I've got a java app > > from a vendor that I wanted to try running from a command line, I'm > running > > it on an xp box and it's not doing well. So I thought I'd try a more > stable > > and speedy UNIX platform. Nevermind!!!!! > >I guess you didn't bother to understand the previous reply. > >Java on FreeBSD is not broken, you are :) > > > >> test, this is only a test. And I've wasted a lot of time on it > > >already..... > > > > > >The package from the FreeBSD Foundation at: > > > > > >http://www.freebsdfoundation.org/downloads/java.shtml > > > > > >works for many people. If it doesn't work for you, you'll need to > > >provide a lot more infomration if you want help. At an absolute minimum > > >you'll need to provide your OS version, architecture, the version of > > >these packages/ports you are trying to install, and the errors you are > > >seeing. > > > > > >-- Brooks > > > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 02:34:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1372016A407 for ; Fri, 3 Nov 2006 02:34:59 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B26C43D4C for ; Fri, 3 Nov 2006 02:34:58 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so274445uge for ; Thu, 02 Nov 2006 18:34:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=hsXS9q1H+IgAXn32DQ1yOsLgkSfyB+FWB8ffy5KJxXr60U2wfZopWrweTT7XDdpkaVuAXijIukT5ZLKbNj8BI9ZuwcRvWO6mplzKoYZ66KEG82qWVPA3NyCV1HLelDGDa6RxWgb+Zu+0wNdIKPqkSlFqOExirjl5EAqBwWnJc70= Received: by 10.82.109.19 with SMTP id h19mr612743buc.1162521294461; Thu, 02 Nov 2006 18:34:54 -0800 (PST) Received: by 10.82.163.16 with HTTP; Thu, 2 Nov 2006 18:34:54 -0800 (PST) Message-ID: <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> Date: Thu, 2 Nov 2006 18:34:54 -0800 From: "Josh Carroll" Sender: josh.carroll@gmail.com To: freebsd-hackers@freebsd.org In-Reply-To: <20061103021803.GC8508@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <20061102094748.G75543@mignon.ki.iif.hu> <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> <20061103021803.GC8508@kobe.laptop> X-Google-Sender-Auth: 4fb865a2b2f74584 Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 02:34:59 -0000 > Can we have something that doesn't need one option letter for each > protocol, protocol family or socket type, please? :) I'd be willing to modify it to take a -P argument with one of: tcp udp tcp,udp udp,tcp If the consensus is to add -P, I'd be happy to make the changes. I assume without -P we'd want to show both, so perhaps udp,tcp and tcp,udp aren't necessary. Thanks, Josh From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 02:46:47 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7738B16A407 for ; Fri, 3 Nov 2006 02:46:47 +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 7C2F043D45 for ; Fri, 3 Nov 2006 02:46:46 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kA32keaE007196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 3 Nov 2006 04:46:41 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kA32kR3K016491; Fri, 3 Nov 2006 04:46:32 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kA32kM7X016490; Fri, 3 Nov 2006 04:46:22 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 3 Nov 2006 04:46:21 +0200 From: Giorgos Keramidas To: Josh Carroll Message-ID: <20061103024621.GB16445@kobe.laptop> References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <20061102094748.G75543@mignon.ki.iif.hu> <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> <20061103021803.GC8508@kobe.laptop> <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.536, required 5, AWL -0.14, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 02:46:47 -0000 On 2006-11-02 18:34, Josh Carroll wrote: > >Can we have something that doesn't need one option letter for each > >protocol, protocol family or socket type, please? :) > > I'd be willing to modify it to take a -P argument with one of: > > tcp > udp > tcp,udp > udp,tcp > > If the consensus is to add -P, I'd be happy to make the changes. I > assume without -P we'd want to show both, so perhaps udp,tcp and > tcp,udp aren't necessary. Quite right. If the default is to show *both*, then we only need to specify one of them in the -P argument. If you want, for the sake of completeness to support the "-P proto[,proto]" syntax too, that's also fine, I guess :) From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 02:48:44 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C29D616A412 for ; Fri, 3 Nov 2006 02:48:44 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43FB843D45 for ; Fri, 3 Nov 2006 02:48:44 +0000 (GMT) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net ([12.207.12.9]) by sccmmhc91.asp.att.net (sccmmhc91) with ESMTP id <20061103024842m9100elbh3e>; Fri, 3 Nov 2006 02:48:42 +0000 Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id kA32mc4R079974; Thu, 2 Nov 2006 20:48:39 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id kA32mbjh079973; Thu, 2 Nov 2006 20:48:37 -0600 (CST) (envelope-from brooks) Date: Thu, 2 Nov 2006 20:48:37 -0600 From: Brooks Davis To: Giorgos Keramidas Message-ID: <20061103024837.GB79357@lor.one-eyed-alien.net> References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <20061102094748.G75543@mignon.ki.iif.hu> <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> <20061103021803.GC8508@kobe.laptop> <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> <20061103024621.GB16445@kobe.laptop> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V" Content-Disposition: inline In-Reply-To: <20061103024621.GB16445@kobe.laptop> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org, Josh Carroll Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 02:48:44 -0000 --uQr8t48UFsdbeI+V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 03, 2006 at 04:46:21AM +0200, Giorgos Keramidas wrote: > On 2006-11-02 18:34, Josh Carroll wrote: > > >Can we have something that doesn't need one option letter for each > > >protocol, protocol family or socket type, please? :) > >=20 > > I'd be willing to modify it to take a -P argument with one of: > >=20 > > tcp > > udp > > tcp,udp > > udp,tcp > >=20 > > If the consensus is to add -P, I'd be happy to make the changes. I > > assume without -P we'd want to show both, so perhaps udp,tcp and > > tcp,udp aren't necessary. >=20 > Quite right. If the default is to show *both*, then we only need to > specify one of them in the -P argument. If you want, for the sake of > completeness to support the "-P proto[,proto]" syntax too, that's also > fine, I guess :) We're getting SCTP support RSN so that's probably a good idea... -- Brooks --uQr8t48UFsdbeI+V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFSq4EXY6L6fI4GtQRAljOAKC/1WwgdHoZy6qkM76Mdc3CdJ4i7QCdExnD DMhq4lqM0l3y/x8L+UetcTs= =D144 -----END PGP SIGNATURE----- --uQr8t48UFsdbeI+V-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 02:55:16 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2099916A407 for ; Fri, 3 Nov 2006 02:55:16 +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 3347A43D46 for ; Fri, 3 Nov 2006 02:55:14 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kA32suEO007427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 3 Nov 2006 04:55:07 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kA32sgr5016588; Fri, 3 Nov 2006 04:54:45 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kA32sgLl016587; Fri, 3 Nov 2006 04:54:42 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 3 Nov 2006 04:54:42 +0200 From: Giorgos Keramidas To: Brooks Davis Message-ID: <20061103025442.GB16543@kobe.laptop> References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <20061102094748.G75543@mignon.ki.iif.hu> <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> <20061103021803.GC8508@kobe.laptop> <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> <20061103024621.GB16445@kobe.laptop> <20061103024837.GB79357@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20061103024837.GB79357@lor.one-eyed-alien.net> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.536, required 5, AWL -0.14, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, Josh Carroll Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 02:55:16 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2006-11-02 20:48, Brooks Davis wrote: >On Fri, Nov 03, 2006 at 04:46:21AM +0200, Giorgos Keramidas wrote: >>On 2006-11-02 18:34, Josh Carroll wrote: >>> >Can we have something that doesn't need one option letter for each >>> >protocol, protocol family or socket type, please? :) >>>=20 >>> I'd be willing to modify it to take a -P argument with one of: >>>=20 >>> tcp >>> udp >>> tcp,udp >>> udp,tcp >>>=20 >>> If the consensus is to add -P, I'd be happy to make the changes. I >>> assume without -P we'd want to show both, so perhaps udp,tcp and >>> tcp,udp aren't necessary. >>=20 >> Quite right. If the default is to show *both*, then we only need to >> specify one of them in the -P argument. If you want, for the sake of >> completeness to support the "-P proto[,proto]" syntax too, that's also >> fine, I guess :) >=20 > We're getting SCTP support RSN so that's probably a good idea... Precisely. This is why I said "for the sake of completeness", since adding the support for proto[,proto] parsing will make this immensely easier when sctp gets committed to CVS :) --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFSq9y1g+UGjGGA7YRAhVfAJ4g1bi/5vY05zcsrN6mo6W61neCGwCgq4r+ HE7P4UvHmyPI+eA/B0tUoPY= =TXcb -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 05:02:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2B9016A415 for ; Fri, 3 Nov 2006 05:02:59 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DBE043D55 for ; Fri, 3 Nov 2006 05:02:59 +0000 (GMT) (envelope-from craig@tobuj.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id D7795115AF; Thu, 2 Nov 2006 23:02:58 -0600 (CST) Date: Thu, 2 Nov 2006 23:02:56 -0600 From: Craig Boston To: Jan Grant Message-ID: <20061103050256.GA87797@nowhere> Mail-Followup-To: Craig Boston , Jan Grant , Daniel Valencia , freebsd-hackers@freebsd.org References: <20061031161640.71807.qmail@web53907.mail.yahoo.com> <20061102104744.O52313@tribble.ilrt.bris.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061102104744.O52313@tribble.ilrt.bris.ac.uk> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org, Daniel Valencia Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 05:02:59 -0000 On Thu, Nov 02, 2006 at 10:52:19AM +0000, Jan Grant wrote: > This is, I reckon, the only sensible suggestion thus far: if the FS > doesn't help you then you are implicitly depending on the FS > implementation to ensure you are writing over the original data blocks > anyway. And you may very well not be. If the underlying FS is say for example journaled or snapshotted, your new data blocks may go to a completely different part of the disk. For UFS today -P may work most of the time, assuming no snapshots or other events moving the file. With gjournal and gvirtstor coming who knows if that will remain true. That doesn't even take into account things like unionfs or other VFS stacking. If writing zeros or whatever to a file (that may or may not overwrite the previous contents on disk) is really what you want to do, dd works just fine for the task. /me votes for removing the -P misfeature altogether Craig From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 06:55:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48A9116A40F; Fri, 3 Nov 2006 06:55:39 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from antivirus.uni-rostock.de (mailrelay1.uni-rostock.de [139.30.8.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7498743D58; Fri, 3 Nov 2006 06:55:37 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 07:55:36 +0100 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Clearswift SMTPRS 5.2.5) with ESMTP id ; Fri, 3 Nov 2006 07:55:36 +0100 Received: from mail pickup service by antivirus.uni-rostock.de with Microsoft SMTPSVC; Fri, 3 Nov 2006 07:55:36 +0100 X-SCL: 1 42.44% Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 07:55:28 +0100 Received: from conversion-daemon.mail2.uni-rostock.de by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) id <0J85003016XJFN@mail.uni-rostock.de> (original mail from joerg@britannica.bec.de); Fri, 03 Nov 2006 07:55:27 +0100 (MET) Received: from britannica.bec.de (wlan033094.uni-rostock.de [139.30.33.94]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) with ESMTP id <0J85005F876MFM@mail.uni-rostock.de>; Fri, 03 Nov 2006 07:54:22 +0100 (MET) Received: by britannica.bec.de (Postfix, from userid 1000) id B418E571E; Fri, 03 Nov 2006 07:54:21 +0100 (CET) Date: Fri, 03 Nov 2006 07:54:21 +0100 From: Joerg Sonnenberger In-reply-to: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> To: freebsd-hackers@freebsd.org, hackers@freebsd.org Mail-followup-to: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-id: <20061103065421.GA829@britannica.bec.de> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) References: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> X-OriginalArrivalTime: 03 Nov 2006 06:55:28.0146 (UTC) FILETIME=[0BA5F720:01C6FF15] Cc: Subject: Re: vr(4) performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 06:55:39 -0000 On Thu, Nov 02, 2006 at 06:11:00PM -0500, Devon H. O'Dell wrote: > So, vr(4) kind of sucks, and it seems like this is mostly due to the > fact that we call m_defrag() on every mbuf that we send through it. > This seems to really screw performance on outgoing packets (something > like 33% the output efficiency of fxp(4), if I'm understanding this > all correctly). What hardware are you running at that it is a problem? Seriously -- copying 100Mbit/s in memory shouldn't fully busy any post-2k non-embedded CPU. You could just allocate a static output queue and copy into that, dropping at least the allocations of the mbuf clusters, but I don't think it should b worth it. And yes, if you can sustain Fast Ethernet speed with scp to localhost, m_defrag is absolutely not the main problem. Joerg From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 06:55:39 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48A9116A40F; Fri, 3 Nov 2006 06:55:39 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from antivirus.uni-rostock.de (mailrelay1.uni-rostock.de [139.30.8.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7498743D58; Fri, 3 Nov 2006 06:55:37 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 07:55:36 +0100 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Clearswift SMTPRS 5.2.5) with ESMTP id ; Fri, 3 Nov 2006 07:55:36 +0100 Received: from mail pickup service by antivirus.uni-rostock.de with Microsoft SMTPSVC; Fri, 3 Nov 2006 07:55:36 +0100 X-SCL: 1 42.44% Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 07:55:28 +0100 Received: from conversion-daemon.mail2.uni-rostock.de by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) id <0J85003016XJFN@mail.uni-rostock.de> (original mail from joerg@britannica.bec.de); Fri, 03 Nov 2006 07:55:27 +0100 (MET) Received: from britannica.bec.de (wlan033094.uni-rostock.de [139.30.33.94]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) with ESMTP id <0J85005F876MFM@mail.uni-rostock.de>; Fri, 03 Nov 2006 07:54:22 +0100 (MET) Received: by britannica.bec.de (Postfix, from userid 1000) id B418E571E; Fri, 03 Nov 2006 07:54:21 +0100 (CET) Date: Fri, 03 Nov 2006 07:54:21 +0100 From: Joerg Sonnenberger In-reply-to: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> To: freebsd-hackers@freebsd.org, hackers@freebsd.org Mail-followup-to: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-id: <20061103065421.GA829@britannica.bec.de> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) References: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> X-OriginalArrivalTime: 03 Nov 2006 06:55:28.0146 (UTC) FILETIME=[0BA5F720:01C6FF15] Cc: Subject: Re: vr(4) performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 06:55:39 -0000 On Thu, Nov 02, 2006 at 06:11:00PM -0500, Devon H. O'Dell wrote: > So, vr(4) kind of sucks, and it seems like this is mostly due to the > fact that we call m_defrag() on every mbuf that we send through it. > This seems to really screw performance on outgoing packets (something > like 33% the output efficiency of fxp(4), if I'm understanding this > all correctly). What hardware are you running at that it is a problem? Seriously -- copying 100Mbit/s in memory shouldn't fully busy any post-2k non-embedded CPU. You could just allocate a static output queue and copy into that, dropping at least the allocations of the mbuf clusters, but I don't think it should b worth it. And yes, if you can sustain Fast Ethernet speed with scp to localhost, m_defrag is absolutely not the main problem. Joerg From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 08:53:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF78316A415 for ; Fri, 3 Nov 2006 08:53:19 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id F171F43D67 for ; Fri, 3 Nov 2006 08:53:18 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c58-107-94-118.belrs4.nsw.optusnet.com.au [58.107.94.118]) by mail10.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id kA38rGKi005135 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 3 Nov 2006 19:53:17 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id kA38rGtp001462; Fri, 3 Nov 2006 19:53:16 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id kA38rGPO001461; Fri, 3 Nov 2006 19:53:16 +1100 (EST) (envelope-from peter) Date: Fri, 3 Nov 2006 19:53:16 +1100 From: Peter Jeremy To: tech@nano.net Message-ID: <20061103085316.GB854@turion.vk2pj.dyndns.org> References: <6.2.0.14.2.20061102192644.034ef110@nano.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OwLcNYc0lM97+oe1" Content-Disposition: inline In-Reply-To: <6.2.0.14.2.20061102192644.034ef110@nano.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: Java X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 08:53:19 -0000 --OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 2006-Nov-02 19:27:04 -0700, tech@nano.net wrote: >I never said it was broken, just that the jre in the ports collection was.= =20 >It seems to be looking for something other than itself when you attempt a= =20 >make. Under the circumstances it seems it should be removed? ports/java/jre is Java 1.1.8 - which is positively ancient. It is no longer possible to build it because it depends on FreeBSD 3.x binaries which in turn rely on the compax3x port which is forbidden due to multiple security vulnerabilities. Yes, it probably should be deleted. There are a number of ports in a similar condition and they are being cleansed as a low-priority task by at least one committer. --=20 Peter Jeremy --OwLcNYc0lM97+oe1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFSwN8/opHv/APuIcRAum2AJ99KGSxLob04SbEum4XVTPFNeH8PACgh9Yx rcTe/6HY6HqGxqDqk6cjsb0= =0Sjb -----END PGP SIGNATURE----- --OwLcNYc0lM97+oe1-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 17:00:16 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30BF016A407 for ; Fri, 3 Nov 2006 17:00:16 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id A43E443D45 for ; Fri, 3 Nov 2006 17:00:15 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.13.1/8.13.3) with ESMTP id kA3H0EDp010024; Fri, 3 Nov 2006 09:00:14 -0800 (PST) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.13.1/8.13.3/Submit) id kA3H0DLn010023; Fri, 3 Nov 2006 09:00:13 -0800 (PST) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Fri, 3 Nov 2006 09:00:13 -0800 From: Greg Lewis To: Peter Jeremy Message-ID: <20061103170012.GA9825@misty.eyesbeyond.com> References: <6.2.0.14.2.20061102192644.034ef110@nano.net> <20061103085316.GB854@turion.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061103085316.GB854@turion.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org, tech@nano.net Subject: Re: Java X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 17:00:16 -0000 On Fri, Nov 03, 2006 at 07:53:16PM +1100, Peter Jeremy wrote: > On Thu, 2006-Nov-02 19:27:04 -0700, tech@nano.net wrote: > >I never said it was broken, just that the jre in the ports collection was. > >It seems to be looking for something other than itself when you attempt a > >make. Under the circumstances it seems it should be removed? > > ports/java/jre is Java 1.1.8 - which is positively ancient. It is no > longer possible to build it because it depends on FreeBSD 3.x binaries > which in turn rely on the compax3x port which is forbidden due to > multiple security vulnerabilities. > > Yes, it probably should be deleted. There are a number of ports in > a similar condition and they are being cleansed as a low-priority > task by at least one committer. All JDK/JREs earlier than 1.3 need to die. I just haven't had the time to do it yet. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 19:16:08 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE62616A403 for ; Fri, 3 Nov 2006 19:16:08 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp8.server.rpi.edu (smtp8.server.rpi.edu [128.113.2.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D38643D4C for ; Fri, 3 Nov 2006 19:16:08 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp8.server.rpi.edu (8.13.1/8.13.1) with ESMTP id kA3JFsIf027053; Fri, 3 Nov 2006 14:15:56 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <20061103050256.GA87797@nowhere> References: <20061031161640.71807.qmail@web53907.mail.yahoo.com> <20061102104744.O52313@tribble.ilrt.bris.ac.uk> <20061103050256.GA87797@nowhere> Date: Fri, 3 Nov 2006 14:15:53 -0400 To: Craig Boston , Jan Grant From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Cc: freebsd-hackers@FreeBSD.org, Daniel Valencia Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 19:16:09 -0000 At 11:02 PM -0600 11/2/06, Craig Boston wrote: >On Thu, Nov 02, 2006 at 10:52:19AM +0000, Jan Grant wrote: > > This is, I reckon, the only sensible suggestion thus far: if the > > FS doesn't help you then you are implicitly depending on the FS > > implementation to ensure you are writing over the original data > > blocks anyway. > >And you may very well not be. If the underlying FS is say for example >journaled or snapshotted, your new data blocks may go to a completely >different part of the disk. For UFS today -P may work most of the time, >assuming no snapshots or other events moving the file. With gjournal >and gvirtstor coming who knows if that will remain true. > >That doesn't even take into account things like unionfs or other VFS >stacking. > >If writing zeros or whatever to a file (that may or may not overwrite >the previous contents on disk) is really what you want to do, dd works >just fine for the task. > >/me votes for removing the -P misfeature altogether I'm inclined to agree that the option should be removed. We can't seem to agree on how it should work with links. We can't guarantee that it will work even if we agreed on when it should work. And putting the feature in 'rm' does no good at all when it is some other command (such as 'mv') which is going to unlink() the filename. I think this is a case where we should have stuck with the idea that separate features should be implemented in separate commands. 'rm' is just not a good command to write a lot of data into a file. In this case, we're not even interested in writing "to the file", but what we really want is to write to specific sectors of a disk. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 22:00:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAF8916A415 for ; Fri, 3 Nov 2006 22:00:08 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D07B943D46 for ; Fri, 3 Nov 2006 22:00:07 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Gg74o-000681-Ty for freebsd-hackers@freebsd.org; Fri, 03 Nov 2006 22:59:50 +0100 Received: from anthonychavez.org ([166.70.126.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Nov 2006 22:59:50 +0100 Received: from acc by anthonychavez.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Nov 2006 22:59:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Anthony Chavez Date: Fri, 03 Nov 2006 14:59:14 -0700 Lines: 54 Message-ID: <87lkmsmbt9.fsf@hephaistos.aegaeum.anthonychavez.org> References: <87odrpr48i.fsf@hephaistos.aegaeum.anthonychavez.org> <200611021712.32665.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: anthonychavez.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) Cancel-Lock: sha1:jlficfNeRniVwUkx34Yqq8fflfo= Sender: news Subject: Re: Panic on 6.1-RELEASE-p3 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 22:00:08 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable John Baldwin writes: > On Thursday 02 November 2006 15:19, Anthony Chavez wrote: >> freebsd-hackers: >>=20 >> I have attached the backtraces of 17 core dumps from one of my >> machines. I have several deployments of this same FreeBSD version in >> the wild, and this is the only machine exhibiting this behavior. >>=20 >> Initially, the cause of these panics seemed to be related to some >> component in the FreeBSD toolchain, as they would occur when >> attempting to install a port. net/samba3 was the one we'd usually >> test with, but the system would panic with most other larger packages >> as well. >>=20 >> However, the system is panicking at irrgeular intervals, ranging >> between 1-3 weeks apart. This is mostly happening in the off-hours >> when no human users are actively using the machine, but there have >> been 1 or 2 incidences where the machine has panicked during prime >> time. > > Have you ran a memory checker or other diags to check for failing hardwar= e? I ran sysutils/memtest twice. Both times, it failed to panic the system. I have yet to bring the system down and boot into a "real" memory/hardware checker, however. I usually just go with ultimatebootcd.com when testing, but if you have other suggestions for tools, I'd welcome your input before we schedule to do the testing. Thanks! =2D-=20 Anthony Chavez http://anthonychavez.org/ mailto:acc@anthonychavez.org jabber:acc@jabber.anthonychavez.org --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iQEVAwUBRUu7tPAIdTFWAbdTAQIFsQgAhsgH1Kh+CIC2ElT+ttL4nfkEFA+wsiWO blPAIfQ/d/x80d8OVyrpwe9rt0k4ZXgd2XswSxBSDU0dU7w8b/hMs/IWE9SFP+9K PxV5obSSBw+qYEK0cPvheibCgxSWpmHaoZ/6nB9HAAjZ0dTNt6wzq/ZGA/p/eCfG 1fduSR64bezsLTYgewV/WfosZnyy6h4fbbtjPPzOoJWc/82mUEA5O31keVgjgFf0 kdInPjsFe4H/nUMZ5YxURb7nMQ1UuFoQ9/S9oXLvdKMuHMjaot0Igo73dld3r0y/ uNxpzH89auwbO6AjjKEY1Ae3+izzoFY8Q8SF5FwBs3EClLkAJguCtA== =dB3F -----END PGP SIGNATURE----- --=-=-=-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 3 23:50:31 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06FA216A492 for ; Fri, 3 Nov 2006 23:50:31 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id D947643D6E for ; Fri, 3 Nov 2006 23:50:12 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by nf-out-0910.google.com with SMTP id i2so1633037nfe for ; Fri, 03 Nov 2006 15:50:11 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=K6bJq95N7LRq1PEw2ZIp2fMm77M9upPB9zS/DUM++8VTkKHoogzMeY98VY2V8QR/EOBjFQNkeIcaWJ92Yun83skgcM6H7VrT+NQ6S/yQb6mujbZvXb2TeAwtfXNi9H+2vIvIi3MxjKcFWAVVSMrtOGdFyxLu942clX4dSctlqbY= Received: by 10.82.135.13 with SMTP id i13mr910860bud.1162597811143; Fri, 03 Nov 2006 15:50:11 -0800 (PST) Received: by 10.82.163.16 with HTTP; Fri, 3 Nov 2006 15:50:10 -0800 (PST) Message-ID: <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> Date: Fri, 3 Nov 2006 15:50:10 -0800 From: "Josh Carroll" Sender: josh.carroll@gmail.com To: freebsd-hackers@freebsd.org In-Reply-To: <20061103025442.GB16543@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <20061102094748.G75543@mignon.ki.iif.hu> <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> <20061103021803.GC8508@kobe.laptop> <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> <20061103024621.GB16445@kobe.laptop> <20061103024837.GB79357@lor.one-eyed-alien.net> <20061103025442.GB16543@kobe.laptop> X-Google-Sender-Auth: ad48bb677780bb85 Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Nov 2006 23:50:31 -0000 Below is an initial attempt at the -P argument implementation. I'm not sure if the method used to parse out the protocol is "up to snuff" for the FreeBSD project, but I'm welcome to suggestions/advice/etc. I tested the previous behavior and given the exact command line, sockstat works the same prior to the patch and with the patch. So the -P option is additive only (so as not to break legacy scripts/automation that may parse the sockstat output). I included a limitation on the maximum length of a proto (mostly to avoid buffer overflows) and 20 is probably way too large, so I can lower that if need be. The -P argument also will sense and ignore multiple commas, e.g.: -P tcp,,udp Will still just detect tcp and udp. I implemented the protocols with a sort of lookup table for the protocol types for arguments to -P. So adding another protocol should be as easy as adding a #define, incrementing the #defined for NUM_PROTOS and updating the add_proto_type function to recognize and properly store the new protocol type. Again, I'm open to any feedback on this particular approach. Thanks again for everyone's attetion on this. It's a nice little project to get me ramped back up into C and I do appreciate all the feedback! Regards, Josh --- sockstat.c.orig Thu Nov 2 15:04:39 2006 +++ sockstat.c Fri Nov 3 15:25:34 2006 @@ -66,8 +66,15 @@ static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ +#define NUM_PROTOS 2 +#define MAX_PROTO_LEN 20 +#define TCP_PROTO 0 +#define UDP_PROTO 1 +static int *protos; /* protocols to use */ + static int *ports; + #define INT_BIT (sizeof(int)*CHAR_BIT) #define SET_PORT(p) do { ports[p / INT_BIT] |= 1 << (p % INT_BIT); } while (0) #define CHK_PORT(p) (ports[p / INT_BIT] & (1 << (p % INT_BIT))) @@ -105,6 +112,97 @@ } static void +clear_protos(void) +{ + int i; + + for(i=0; i <= NUM_PROTOS; i++) + protos[i] = 0; + +} + +static void +init_protos(void) +{ + int i; + + if((protos = calloc(NUM_PROTOS, sizeof(int))) == NULL) + err(1, "calloc()"); + + for(i=0; i <= NUM_PROTOS; i++) + protos[i] = 0; + +} + + +/* this function needs to be updated to reflect additional protocols + that are to be supported */ +static int +add_proto_type(const char *proto) +{ + int found = 0; + + if(strlen(proto) == 0) + return 0; + + if(strncmp(proto, "tcp", 3) == 0) { + protos[TCP_PROTO] = 1; + found = 1; + } + else if(strncmp(proto, "udp", 3) == 0) { + protos[UDP_PROTO] = 1; + found = 1; + } else { + printf("Invalid protocol: %s\n", proto); + } + + return found; +} + +static int +parse_protos(const char *protospec) +{ + const char *p; + char curr_proto[MAX_PROTO_LEN]; + int proto_index = 0; + int protos_defined = 0; + + p = protospec; + while(*p != '\0') { + if(*p == ',') { + curr_proto[proto_index] = '\0'; + protos_defined += add_proto_type(curr_proto); + proto_index = 0; + } else { + curr_proto[proto_index++] = *p; + } + p++; + if(*p == '\0' && proto_index != 0) { + curr_proto[proto_index] = '\0'; + protos_defined += add_proto_type(curr_proto); + } + if(proto_index == MAX_PROTO_LEN) { + printf("Warning: truncating protocol\n"); + curr_proto[proto_index] = '\0'; + protos_defined += add_proto_type(curr_proto); + + /* need to seek to the next , or \0 now */ + while(*p != ',' && *p != '\0') + p++; + + /* if we're at a proto boundary (comma), move on */ + if(*p == ',') + p++; + + proto_index = 0; + } + } + + return protos_defined; +} + + +static void parse_ports(const char *portspec) { const char *p, *q; @@ -576,16 +674,24 @@ static void usage(void) { - fprintf(stderr, "Usage: sockstat [-46clu] [-p ports]\n"); + fprintf(stderr, "Usage: sockstat [-46clu] [-p ports] [-P protos]\n"); exit(1); } int main(int argc, char *argv[]) { + /* if protos_defined remains -1, no -P was provided, sowe avoid + attempting to read from that int array later */ + int protos_defined = -1; + int o; - while ((o = getopt(argc, argv, "46clp:uv")) != -1) + /* initialize all protos to 0, if they're all still unset later + then -P wasn't use and the default is to display all of them */ + init_protos(); + + while ((o = getopt(argc, argv, "46clp:P:uv")) != -1) switch (o) { case '4': opt_4 = 1; @@ -602,6 +708,9 @@ case 'p': parse_ports(optarg); break; + case 'P': + protos_defined = parse_protos(optarg); + break; case 'u': opt_u = 1; break; @@ -618,17 +727,28 @@ if (argc > 0) usage(); - if (!opt_4 && !opt_6 && !opt_u) - opt_4 = opt_6 = opt_u = 1; + /* if -u was explicityl defined, zero out the protos array */ + if(opt_u && protos_defined == -1 && !opt_4 && !opt_6) { + clear_protos(); + protos_defined = 0; + } + + if (!opt_4 && !opt_6 && !opt_u && protos_defined == -1) + opt_u = 1; + if (!opt_4 && !opt_6) + opt_4 = opt_6 = 1; if (!opt_c && !opt_l) opt_c = opt_l = 1; if (opt_4 || opt_6) { - gather_inet(IPPROTO_TCP); - gather_inet(IPPROTO_UDP); + if(protos[TCP_PROTO] == 1 || protos_defined == -1) + gather_inet(IPPROTO_TCP); + if(protos[UDP_PROTO] == 1 || protos_defined == -1) + gather_inet(IPPROTO_UDP); gather_inet(IPPROTO_DIVERT); } - if (opt_u) { + + if ( opt_u || (protos_defined == -1 && !opt_4 && !opt_6)) { gather_unix(SOCK_STREAM); gather_unix(SOCK_DGRAM); } From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 4 06:24:44 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCB5C16A407 for ; Sat, 4 Nov 2006 06:24:44 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id D18A443D46 for ; Sat, 4 Nov 2006 06:24:43 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c58-107-94-118.belrs4.nsw.optusnet.com.au [58.107.94.118]) by mail28.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id kA46Oewi001275 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 4 Nov 2006 17:24:41 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id kA46Oe53012192; Sat, 4 Nov 2006 17:24:40 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id kA46Odv0012191; Sat, 4 Nov 2006 17:24:39 +1100 (EST) (envelope-from peter) Date: Sat, 4 Nov 2006 17:24:39 +1100 From: Peter Jeremy To: Josh Carroll Message-ID: <20061104062439.GD854@turion.vk2pj.dyndns.org> References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <20061102094748.G75543@mignon.ki.iif.hu> <8cb6106e0611021507n6315b629kad8cbbf901343c2@mail.gmail.com> <20061103021803.GC8508@kobe.laptop> <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> <20061103024621.GB16445@kobe.laptop> <20061103024837.GB79357@lor.one-eyed-alien.net> <20061103025442.GB16543@kobe.laptop> <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mSxgbZZZvrAyzONB" Content-Disposition: inline In-Reply-To: <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: sockstat tcp/udp switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Nov 2006 06:24:44 -0000 --mSxgbZZZvrAyzONB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, 2006-Nov-03 15:50:10 -0800, Josh Carroll wrote: >I'm not sure if the method used to parse out the protocol is "up to >snuff" for the FreeBSD project, but I'm welcome to >suggestions/advice/etc. I suggest you use /etc/protocols rather than hard code the protocols. This will make the code future-proof. See getprotoent(3) for the correct way to read /etc/protocols. --=20 Peter Jeremy --mSxgbZZZvrAyzONB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFTDIn/opHv/APuIcRAlthAKCzg8C9oDuOGneXe2jPQPqE6wrwdACfYslB 8FjLnxTK4v2w7udHbLSGFb4= =gKJL -----END PGP SIGNATURE----- --mSxgbZZZvrAyzONB-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 4 08:56:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4472D16A40F; Sat, 4 Nov 2006 08:56:46 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from webmail11.yandex.ru (webmail11.yandex.ru [213.180.200.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76BAD43D5C; Sat, 4 Nov 2006 08:56:45 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from YAMAIL (webmail11.yandex.ru) by mail.yandex.ru id ; Sat, 4 Nov 2006 11:56:29 +0300 Received: from [82.211.152.12] ([82.211.152.12]) by mail.yandex.ru with HTTP; Sat, 4 Nov 2006 11:56:29 +0300 (MSK) Date: Sat, 4 Nov 2006 11:56:29 +0300 (MSK) From: "Andrey V. Elsukov" Sender: bu7cher@yandex.ru Message-Id: <454C55BD.000003.22283@webmail11.yandex.ru> MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] Errors-To: bu7cher@yandex.ru To: freebsd-hackers@freebsd.org X-Source-Ip: 82.211.152.12 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: jwd@FreeBSD.org, xdivac02@stud.fit.vutbr.cz, joel@FreeBSD.org Subject: Yet another magic symlinks implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bu7cher@yandex.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2006 08:56:46 -0000 Hi, All! I've ported NetBSD magic symlinks implementation to FreeBSD. The description of magiclinks can been found here: http://www.daemon-systems.org/man/symlink.7.html Patch here: http://butcher.heavennet.ru/patches/kernel/magiclinks/ -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 4 09:02:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2332116A407; Sat, 4 Nov 2006 09:02:36 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.176.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CA2E43DA3; Sat, 4 Nov 2006 09:02:09 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.8/8.13.7) with ESMTP id kA4924I7039811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Nov 2006 10:02:04 +0100 (CET) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.8/8.13.3/Submit) id kA4924Hu039810; Sat, 4 Nov 2006 10:02:04 +0100 (CET) Date: Sat, 4 Nov 2006 10:02:04 +0100 From: Divacky Roman To: "Andrey V. Elsukov" Message-ID: <20061104090204.GA38945@stud.fit.vutbr.cz> References: <454C55BD.000003.22283@webmail11.yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <454C55BD.000003.22283@webmail11.yandex.ru> User-Agent: Mutt/1.4.2.2i X-Scanned-By: MIMEDefang 2.57 on 147.229.176.14 Cc: freebsd-hackers@freebsd.org, joel@freebsd.org Subject: Re: Yet another magic symlinks implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Nov 2006 09:02:36 -0000 On Sat, Nov 04, 2006 at 11:56:29AM +0300, Andrey V. Elsukov wrote: > Hi, All! > > I've ported NetBSD magic symlinks implementation to FreeBSD. > The description of magiclinks can been found here: > http://www.daemon-systems.org/man/symlink.7.html > > Patch here: > http://butcher.heavennet.ru/patches/kernel/magiclinks/ wow this was fast ;) thnx for porting this, have you checked locking? netbsd kernel is still under one giant lock so locking might differ. roman From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 4 13:46:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8984516A5EC; Sat, 4 Nov 2006 13:46:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA66F43D45; Sat, 4 Nov 2006 13:46:12 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id kA4DjnuY081876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Nov 2006 15:45:49 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id kA4DjJMs082007; Sat, 4 Nov 2006 15:45:49 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id kA4DimBr082000; Sat, 4 Nov 2006 15:44:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 4 Nov 2006 15:44:48 +0200 From: Kostik Belousov To: "Andrey V. Elsukov" Message-ID: <20061104134448.GM12108@deviant.kiev.zoral.com.ua> References: <454C55BD.000003.22283@webmail11.yandex.ru> <20061104090204.GA38945@stud.fit.vutbr.cz> <454C75B9.000002.09555@mfront8.yandex.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yaap9KN+GmBP785v" Content-Disposition: inline In-Reply-To: <454C75B9.000002.09555@mfront8.yandex.ru> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL, UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, jroberson@chesapeake.net, joel@freebsd.org Subject: Re: Yet another magic symlinks implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Nov 2006 13:46:14 -0000 --yaap9KN+GmBP785v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 04, 2006 at 02:12:57PM +0300, Andrey V. Elsukov wrote: > >On Sat, Nov 04, 2006 at 11:56:29AM +0300, Andrey V. Elsukov wrote: > >> I've ported NetBSD magic symlinks implementation to FreeBSD. > >> The description of magiclinks can been found here: > >> http://www.daemon-systems.org/man/symlink.7.html > >>=20 > >> Patch here: > >> http://butcher.heavennet.ru/patches/kernel/magiclinks/ > > > >thnx for porting this, have you checked locking? netbsd > >kernel is still under one giant lock so locking might > >differ. >=20 > Sorry, i'm not locking guru.. Code seems simple.. > Mybe somebody from committers can see into code? > Konstantin, Jeff, whath you think? I don't think that any additional locking is required there. --yaap9KN+GmBP785v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFTJlPC3+MBN1Mb4gRAgq7AJ9naISx4sTtc2cOAM73s1bm5PJvOgCgi0HE XpNMABuiemrCwxeFueMkT5E= =wYiU -----END PGP SIGNATURE----- --yaap9KN+GmBP785v-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 4 16:24:59 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0ECB16A6D1 for ; Sat, 4 Nov 2006 16:24:59 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B32A43D53 for ; Sat, 4 Nov 2006 16:24:57 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id kA4GOtS3069505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Nov 2006 08:24:57 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <454CBED7.2000103@errno.com> Date: Sat, 04 Nov 2006 08:24:55 -0800 From: Sam Leffler User-Agent: Thunderbird 1.5.0.7 (X11/20060920) MIME-Version: 1.0 To: pyunyh@gmail.com References: <9ab217670611021511l3120d58bhd0b61bf44f8ecc87@mail.gmail.com> <454A7EF2.5090201@errno.com> <20061103003311.GD69214@cdnetworks.co.kr> In-Reply-To: <20061103003311.GD69214@cdnetworks.co.kr> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, "Devon H. O'Dell" Subject: Re: vr(4) performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Nov 2006 16:24:59 -0000 Pyun YongHyeon wrote: > On Thu, Nov 02, 2006 at 03:27:46PM -0800, Sam Leffler wrote: > > Devon H. O'Dell wrote: > > > Hey all, > > > > > > So, vr(4) kind of sucks, and it seems like this is mostly due to the > > > fact that we call m_defrag() on every mbuf that we send through it. > > > This seems to really screw performance on outgoing packets (something > > > like 33% the output efficiency of fxp(4), if I'm understanding this > > > all correctly). > > > > > > I'm sort of wondering if anybody has attempted to address this before > > > and if there's a way to possibly mitigate this behavior. I know Bill > > > Paul's comments say ``Unfortunately, FreeBSD FreeBSD doesn't guarantee > > > that mbufs will be filled in starting at longword boundaries, so we > > > have to do a buffer copy before transmission.'' -- since it's been a > > > long day, and I'm about to go home to grab a pizza and stop thinking > > > about code, would anybody mind offering suggestions as to either: > > > > > > a) Pros and cons of guaranteeing that they're filled in aligned (and > > > possibly hints on doing it), or > > > b) Possible workarounds / hacks to do this faster for vr(4) > > > > > > Any input is appreciated! (Except ``vr(4) is lol'') > > > > m_defrag is ~10x slower than it needs to be. I proposed changes to > > address this a while back but eventually gave up and put driver-specific > > code in ath. You can look there or I can send you some patches to > > m_defrag to try out in vr. > > > > Because the purpose of m_defrag(9) in vr(4) is to guarantee longword > aligned mbufs I'm not sure ath_defrag can be used here. If memory > serve me right ath_defrag would not change the first mbuf address > in a chain. If the first mbuf is not aligned on longword boundary > it wouldn't work I guess. Of course we can check the first mbuf in > the chain before calling super-fast ath_defrag, I guess. > m_defrag is used for two purposes (mainly) in the system: reducing the mbuf count in a chain so that an outbound packet fits in a limited number of h/w tx descriptors and aligning packet data for cards with constrained dma engines. Both these operations belong in bus_dma. Combining both these operations in a single routine results in overly pessimistic code for the common case. Separately the algorithm in m_defrag is suboptimal (e.g. it makes a complete copy even when a packet needs no changes). ath_defrag is example code tailored to the ath driver that handles only the mbuf chain too long issue. I have other code that can do packet alignment and/or both alignment+mbuf coalescing far better than the current logic in m_defrag. The right solution to this problem--as suggested by John Baldwin and Scott Long is to improve the bus_dma code so these things happen automatically for the driver according to the dma tag config. This would eliminate the need for m_defrag in all cases I'm aware of. Since bus_dma has info like the max # segments a device can accept and any alignment constraints it can do a much more efficient job. Sam From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 4 23:35:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9F9A16A412 for ; Sat, 4 Nov 2006 23:35:22 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id 864BC43D4C for ; Sat, 4 Nov 2006 23:35:21 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 65250 invoked by uid 1001); 4 Nov 2006 23:36:12 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Sat, 04 Nov 2006 18:36:12 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17741.9196.102826.208010@bhuda.mired.org> Date: Sat, 4 Nov 2006 18:36:12 -0500 To: bu7cher@yandex.ru In-Reply-To: <454C55BD.000003.22283@webmail11.yandex.ru> References: <454C55BD.000003.22283@webmail11.yandex.ru> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, joel@FreeBSD.org, jwd@FreeBSD.org Subject: Re: Yet another magic symlinks implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Nov 2006 23:35:22 -0000 In <454C55BD.000003.22283@webmail11.yandex.ru>, Andrey V. Elsukov typed: > Hi, All! > > I've ported NetBSD magic symlinks implementation to FreeBSD. > The description of magiclinks can been found here: > http://www.daemon-systems.org/man/symlink.7.html This kind of thing has been showing up in Unix variants for a couple of decades, but none have have ever caught on. Can you provide some examples of what this is being used for? It's not clear the the thing that it looks to me like it would be most useful for is possible. That would be making various lib directories on 64bit platforms that supported 32bit binaries point to either lib32 or lib64, depending on which mode the process was running in. It doesn't look like @emul gets set for that, and the docs say that @machine_arch depensd are the results of a uname invocation, which I wouldn't expect to change based on the mode of the process. Thanks, http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.