From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 02:47: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 DB0E216A69F for ; Sun, 5 Nov 2006 02:47:58 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C710441FA for ; Sun, 5 Nov 2006 02:22:52 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.7/8.13.4) with ESMTP id kA52MdO5011498; Sat, 4 Nov 2006 18:22:39 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.7/8.13.4/Submit) id kA52Mdm0011497; Sat, 4 Nov 2006 18:22:39 -0800 (PST) Date: Sat, 4 Nov 2006 18:22:39 -0800 (PST) From: Matthew Dillon Message-Id: <200611050222.kA52Mdm0011497@apollo.backplane.com> 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> 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, 05 Nov 2006 02:47:59 -0000 ::... ::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 :) :: :: Joerg : : I agree. I will make this change in DragonFly right now, in fact. : The -P option really needs to be consistent across environments : and my take on the original design was so users could alias rm to : rm -P in their .cshrc files. Clearly it cannot destroy the contents : of the file in the presence of hard links when used in that context. : : -Matt Followup note here. OpenBSD's /bin/rm source is doing something unexpected... it isn't unlink()ing the file if it has > 1 hardlinks and -P is used. That is its current behavior. pkgbox# /usr/obj/archive/OpenBSD-current/src/bin/rm/rm -P /tmp/x pkgbox# echo "x" > /tmp/x pkgbox# ln /tmp/x /tmp/y pkgbox# /usr/obj/archive/OpenBSD-current/src/bin/rm/rm -P /tmp/x rm: /tmp/x (inode 36): not overwritten due to multiple links pkgbox# ls -la /tmp/x /tmp/y -rw-r--r-- 2 root wheel 2 Nov 4 18:19 /tmp/x -rw-r--r-- 2 root wheel 2 Nov 4 18:19 /tmp/y pkgbox# I'm not sure I agree with this. It makes -P unusable as a .cshrc alias. I would have expected it to still unlink the file. In anycase, for now I am going to sync DragonFly's rm with OpenBSD anyhow, even though I'm scratching my head a bit. This may be just as broken as before, just in a different (and safer) way. -Matt Matthew Dillon From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 03:02: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 4E15016A47E for ; Sun, 5 Nov 2006 03:02:43 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDEC043DF7 for ; Sun, 5 Nov 2006 02:08:08 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.7/8.13.4) with ESMTP id kA5288IS011369 for ; Sat, 4 Nov 2006 18:08:08 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.7/8.13.4/Submit) id kA5288ol011368; Sat, 4 Nov 2006 18:08:08 -0800 (PST) Date: Sat, 4 Nov 2006 18:08:08 -0800 (PST) From: Matthew Dillon Message-Id: <200611050208.kA5288ol011368@apollo.backplane.com> To: freebsd-hackers@freebsd.org References: <454C55BD.000003.22283@webmail11.yandex.ru> <17741.9196.102826.208010@bhuda.mired.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: Sun, 05 Nov 2006 03:02:43 -0000 It is interesting to note that DragonFly has had variant symlnks for a long time, but we haven't actually found a use for them yet. No smoking killer app has presented itself. We use varsyms in our RC implementation kind of like uber-environment variables (rclist, rcstart, rcstop, etc), but we don't actually use them in symlinks. Originally I envisioned using variant symlinks as part of a packaging system to allow package environments to be built on the fly, thus allowing multiple versions of libraries to coreside and not have the 'you have to upgrade everything to install one new thing' problem. But that was before we adopted pkgsrc. Pkgsrc doesn't use varsyms, so... The concept is interesting enough that I'm not going to rip it out. -Matt From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 03:02: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 860B916A818 for ; Sun, 5 Nov 2006 03:02:52 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 131A043EC2 for ; Sun, 5 Nov 2006 02:10:56 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.7/8.13.4) with ESMTP id kA52AgZa011404; Sat, 4 Nov 2006 18:10:42 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.7/8.13.4/Submit) id kA52AfcE011403; Sat, 4 Nov 2006 18:10:41 -0800 (PST) Date: Sat, 4 Nov 2006 18:10:41 -0800 (PST) From: Matthew Dillon Message-Id: <200611050210.kA52AfcE011403@apollo.backplane.com> 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> 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: Sun, 05 Nov 2006 03:02:52 -0000 :... :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 : :... :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 :) : : Joerg I agree. I will make this change in DragonFly right now, in fact. The -P option really needs to be consistent across environments and my take on the original design was so users could alias rm to rm -P in their .cshrc files. Clearly it cannot destroy the contents of the file in the presence of hard links when used in that context. -Matt From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 04:28: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 34CD516A4C2 for ; Sun, 5 Nov 2006 04:28:45 +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 0FC3043D73 for ; Sun, 5 Nov 2006 04:28:37 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id 6ACE54241CD; Sun, 5 Nov 2006 05:28: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 T3LpWWy5vqkV; Sun, 5 Nov 2006 05:28:35 +0100 (CET) Received: from loki.starkstrom.lan (p549CD877.dip.t-dialin.net [84.156.216.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id E9FC54241CA; Sun, 5 Nov 2006 05:28:34 +0100 (CET) Date: Sun, 5 Nov 2006 05:28:32 +0100 From: Joerg Pernfuss To: Message-ID: <20061105052832.68400a56@loki.starkstrom.lan> In-Reply-To: <200611050222.kA52Mdm0011497@apollo.backplane.com> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan> <200611050222.kA52Mdm0011497@apollo.backplane.com> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_i8/aBOQpG+geYAE2sQ26qdq"; 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: Sun, 05 Nov 2006 04:28:45 -0000 --Sig_i8/aBOQpG+geYAE2sQ26qdq Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 4 Nov 2006 18:22:39 -0800 (PST) Matthew Dillon wrote: > : I agree. I will make this change in DragonFly right now, in > : fact. The -P option really needs to be consistent across > : environments and my take on the original design was so users could > : alias rm to rm -P in their .cshrc files. Clearly it cannot destroy > : the contents of the file in the presence of hard links when used in > : that context. > : > : -Matt >=20 > Followup note here. OpenBSD's /bin/rm source is doing something > unexpected... it isn't unlink()ing the file if it has > 1 > hardlinks and -P is used. That is its current behavior. Yes, delphij@ and I stumbled upon that as well. It isn't really reflected in the man page and the initial OpenBSD commit log "Attempt to do something reasonable when overwrite mode is combined with hard links, and document it. In consultation with dynamo and approved by millert." isn't that conclusive either. With the objection that was raised around here, maybe it was done intentionally. > I'm not sure I agree with this. It makes -P unusable as a .cshrc > alias. I would have expected it to still unlink the file. Yes, this behaviour breaks `rm -r' when rm is aliased to rm -P, which limits the usefulness of the -P flags significantly imho. But it makes sure one does not miss the warning. Just hope for good error handling in the script. > In anycase, for now I am going to sync DragonFly's rm with > OpenBSD anyhow, even though I'm scratching my head a bit. This may > be just as broken as before, just in a different (and safer) way. So far the easiest mayhem one could cause (aside from safekeeping someone elses file) I could think of is in a quota environment. If Mallory links all of Alice's files, then Alice's quota will fill up, because she probably can't delete her files anymore. Yet as they preserve owner and access mode, they will count towards Alice's limit I would assume. Quotas are set on a per-filesystem, not per-path basis (according to quotactl(2), not tested). If Mallory set up the directory in which the files got linked just as bad as Alice set up her ~/, then Alice can either delete the malicious links (write access to the directory), link them back (execute access to the directory) or watch them sit there (read access to the directory). In the first case, everything is good. In the second one, she can at least dd(1) the file and destroy the data, although the quota will fill. In the third, Alice can try to somehow magically write directly to that inode - no idea. But the quota will fill up. And I still have no idea why ln(1) allows links to files the user has no access rights whatsoever, in a directory the owner of the file has no access to in the first place. And what happens when I link the 0600 file state_secret.doc that is owned by someone else, into a directory I own and set SUIDDIR? Will that then be my file and the original owner will be denied access on his link to the file? (yes, kernel support required, i know. but it would be fun.) I am not convinced anymore that rm is the real culprit. 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_i8/aBOQpG+geYAE2sQ26qdq Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD4DBQFFTWhwH31s/bvKrSQRAvfrAJ91Y+BcscNGdG3YQUdQf4LwknCx+gCYpLxC 1Rd2hXk+4JUyiymKtGriBA== =ReX1 -----END PGP SIGNATURE----- --Sig_i8/aBOQpG+geYAE2sQ26qdq-- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 06:10:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAD0116A4A0 for ; Sun, 5 Nov 2006 06:10:03 +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 EDD1B43DDA for ; Sun, 5 Nov 2006 06:09:29 +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 kA569N5V005974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 5 Nov 2006 08:09:23 +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 kA569NP0016945; Sun, 5 Nov 2006 08:09:23 +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 kA569N5n016944; Sun, 5 Nov 2006 08:09:23 +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: Sun, 5 Nov 2006 08:09:23 +0200 From: Kostik Belousov To: Joerg Pernfuss Message-ID: <20061105060923.GO12108@deviant.kiev.zoral.com.ua> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan> <200611050222.kA52Mdm0011497@apollo.backplane.com> <20061105052832.68400a56@loki.starkstrom.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Sr6hGnsCY8KeifOY" Content-Disposition: inline In-Reply-To: <20061105052832.68400a56@loki.starkstrom.lan> 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 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, 05 Nov 2006 06:10:03 -0000 --Sr6hGnsCY8KeifOY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 05, 2006 at 05:28:32AM +0100, Joerg Pernfuss wrote: > And I still have no idea why ln(1) allows links to files the user has > no access rights whatsoever, in a directory the owner of the file > has no access to in the first place. And what happens when I link the > 0600 file state_secret.doc that is owned by someone else, into a > directory I own and set SUIDDIR? Will that then be my file and the > original owner will be denied access on his link to the file? > (yes, kernel support required, i know. but it would be fun.) >=20 You could use security.bsd.hardlink_check_uid and security.bsd.hardlink_check_gid sysctls to control this. By default, they are disabled. --Sr6hGnsCY8KeifOY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFTYASC3+MBN1Mb4gRAr7bAKDuMDKVuQjfFzLCdBdwubg7ipWyYgCgkUqu K0gLnkC/3H/bDxjFJJ+exjk= =RgRO -----END PGP SIGNATURE----- --Sr6hGnsCY8KeifOY-- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 06:23:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34C6116A4A0 for ; Sun, 5 Nov 2006 06:23:03 +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 DE4E043D5D for ; Sun, 5 Nov 2006 06:22:41 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id 097F64241CD; Sun, 5 Nov 2006 07:22:41 +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 pvR8T0LjCnCh; Sun, 5 Nov 2006 07:22:40 +0100 (CET) Received: from loki.starkstrom.lan (p549CD877.dip.t-dialin.net [84.156.216.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 5B8154241CA; Sun, 5 Nov 2006 07:22:39 +0100 (CET) Date: Sun, 5 Nov 2006 07:22:36 +0100 From: Joerg Pernfuss To: Kostik Belousov Message-ID: <20061105072236.383bb353@loki.starkstrom.lan> In-Reply-To: <20061105060923.GO12108@deviant.kiev.zoral.com.ua> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan> <200611050222.kA52Mdm0011497@apollo.backplane.com> <20061105052832.68400a56@loki.starkstrom.lan> <20061105060923.GO12108@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_RXsMl_r.L4P8ssPetmQyY3+; protocol="application/pgp-signature"; micalg=PGP-SHA1 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: Sun, 05 Nov 2006 06:23:03 -0000 --Sig_RXsMl_r.L4P8ssPetmQyY3+ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 5 Nov 2006 08:09:23 +0200 Kostik Belousov wrote: > On Sun, Nov 05, 2006 at 05:28:32AM +0100, Joerg Pernfuss wrote: > > And I still have no idea why ln(1) allows links to files the user > > has no access rights whatsoever, in a directory the owner of the > > file has no access to in the first place. And what happens when I > > link the 0600 file state_secret.doc that is owned by someone else, > > into a directory I own and set SUIDDIR? Will that then be my file > > and the original owner will be denied access on his link to the > > file? (yes, kernel support required, i know. but it would be fun.) > >=20 > You could use security.bsd.hardlink_check_uid and > security.bsd.hardlink_check_gid sysctls to control this. By default, > they are disabled. Ah, thank you. 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_RXsMl_r.L4P8ssPetmQyY3+ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFTYMtH31s/bvKrSQRAk5BAJ0ZieSVqTmVAP2p/gZRNImY0lYD3wCfVu3f Gc1+ue1P72Eag3Beg7u5OrI= =JENK -----END PGP SIGNATURE----- --Sig_RXsMl_r.L4P8ssPetmQyY3+-- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 07:14: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 3BBFD16A412; Sun, 5 Nov 2006 07:14:58 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E2E643D5C; Sun, 5 Nov 2006 07:14:50 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1GgcDO-000BOk-19; Sun, 05 Nov 2006 09:14:46 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Mike Meyer In-reply-to: <17741.9196.102826.208010@bhuda.mired.org> References: <454C55BD.000003.22283@webmail11.yandex.ru> <17741.9196.102826.208010@bhuda.mired.org> Comments: In-reply-to Mike Meyer message dated "Sat, 04 Nov 2006 18:36:12 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 05 Nov 2006 09:14:45 +0200 From: Danny Braniss Message-ID: Cc: freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, bu7cher@yandex.ru, jwd@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: Sun, 05 Nov 2006 07:14:58 -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, > 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 116F216A4C8 for ; Sun, 5 Nov 2006 08:17:58 +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 9B7D343D58 for ; Sun, 5 Nov 2006 08:17:56 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 95415 invoked by uid 1001); 5 Nov 2006 08:18:48 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Sun, 05 Nov 2006 03:18:47 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17741.40551.489511.604335@bhuda.mired.org> Date: Sun, 5 Nov 2006 03:18:47 -0500 To: Danny Braniss In-Reply-To: References: <454C55BD.000003.22283@webmail11.yandex.ru> <17741.9196.102826.208010@bhuda.mired.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, xdivac02@stud.fit.vutbr.cz, bu7cher@yandex.ru, 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: Sun, 05 Nov 2006 08:17:58 -0000 In , Danny Braniss typed: > > 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. > agree, > btw, am/am-utils has most (maybe more) of this magics/semantics, and > it is available on many different unix flavours, thus making it > ideal for this kind of things, imho. Yeah, sharing things between platforms of different types seems to be the most useful thing the current set of variables can be used for. Most of them on a single machine won't change short of a kernel install, so they could replace fixed symlinks that get set at install time, if they exist. The @domainname and/or @hostname might be useful if your machine moves between a fixed set of domains. It might take hacking dhclient to make sure those get set *before* it writes /etc/resolv.conf to be really useful, though. But this is pure speculation; OSX's superresolver is a better solution to the problems I have in that area. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 09:56:37 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73A1C16A40F for ; Sun, 5 Nov 2006 09:56:37 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mail-ihug.icp-qv1-irony1.iinet.net.au (ihug-mail.icp-qv1-irony1.iinet.net.au [203.59.1.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id C862E43D4C for ; Sun, 5 Nov 2006 09:56:36 +0000 (GMT) (envelope-from julian@elischer.org) Received: from 203-59-204-18.dyn.iinet.net.au (HELO [10.1.1.4]) ([203.59.204.18]) by mail-ihug.icp-qv1-irony1.iinet.net.au with ESMTP; 05 Nov 2006 17:56:33 +0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAADxETUXLO8wSXWdsb2JhbAANhX2GNyw X-IronPort-AV: i="4.09,388,1157299200"; d="scan'208"; a="43329913:sNHT46050932" Message-ID: <454DB551.9070708@elischer.org> Date: Sun, 05 Nov 2006 01:56:33 -0800 From: Julian Elischer User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Anyone have a picoBSD image? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Nov 2006 09:56:37 -0000 I need a picobsd floppy image, (anything that can get me to a shell that will allow me to dd if=/dev/zero of=/dev/ad0 bs=1M ) for a machine that I need to wipe the disk on (it has a floppy and drive (windows) I need to wipe). of course if you have a better way to zap several disks on an old 486 PC that would work as well.. (no not 'jump on them') From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 10:43:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D7C416A40F; Sun, 5 Nov 2006 10:43:39 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mfront8.mail.yandex.net (mfront8.mail.yandex.net [213.180.223.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38BA343D7C; Sun, 5 Nov 2006 10:43:34 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from YAMAIL (mfront8.yandex.ru) by mail.yandex.ru id ; Sun, 5 Nov 2006 13:43:23 +0300 Received: from [82.211.152.12] ([82.211.152.12]) by mail.yandex.ru with HTTP; Sun, 5 Nov 2006 13:43:23 +0300 (MSK) Date: Sun, 5 Nov 2006 13:43:23 +0300 (MSK) From: "Andrey V. Elsukov" Sender: bu7cher@yandex.ru Message-Id: <454DC04B.000001.16751@mfront8.yandex.ru> MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] Errors-To: bu7cher@yandex.ru To: jroberson@chesapeake.net In-Reply-To: <20061104124649.M622@10.0.0.1> References: <454C55BD.000003.22283@webmail11.yandex.ru> <20061104124649.M622@10.0.0.1> X-Source-Ip: 82.211.152.12 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, joel@freebsd.org Subject: Re: 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: Sun, 05 Nov 2006 10:43:39 -0000 >This code really needs some work though. First of all, macros should >never operate on variables not passed in as arguments. The SUBSTITUTE >macro should be a function. The matching algorithm is not very efficient >either. First of thank to all for the attention and spent time. I've tried port this feature after Roman ask. And this is mostly a copy of code from NetBSD. If somebody from commiters want commit this, i can rewrite code. -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 11:03: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 14FF816A40F; Sun, 5 Nov 2006 11:03:47 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from tide.yandex.ru (tide.yandex.ru [213.180.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id C62E543D8F; Sun, 5 Nov 2006 11:03:38 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from YAMAIL (tide.yandex.ru) by mail.yandex.ru id ; Sun, 5 Nov 2006 14:03:23 +0300 Received: from [82.211.152.12] ([82.211.152.12]) by mail.yandex.ru with HTTP; Sun, 5 Nov 2006 14:03:23 +0300 (MSK) Date: Sun, 5 Nov 2006 14:03:23 +0300 (MSK) From: "Andrey V. Elsukov" Sender: bu7cher@yandex.ru Message-Id: <454DC4FB.000001.19509@tide.yandex.ru> MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] Errors-To: bu7cher@yandex.ru To: dillon@apollo.backplane.com In-Reply-To: <200611050208.kA5288ol011368@apollo.backplane.com> References: <454C55BD.000003.22283@webmail11.yandex.ru> <200611050208.kA5288ol011368@apollo.backplane.com> X-Source-Ip: 82.211.152.12 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit 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 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: Sun, 05 Nov 2006 11:03:47 -0000 > It is interesting to note that DragonFly has had variant symlnks for > a long time, but we haven't actually found a use for them yet. Yes, Matt. Some time ago i've ported Df's variant symlinks too :) http://butcher.heavennet.ru/patches/kernel/varsym/ This task was declared on the ideas page: http://www.freebsd.org/projects/ideas/#p-magicsymlinks But i don't see an interest in this feature among commiters. :( > Originally I envisioned using variant symlinks as part of a packaging > system to allow package environments to be built on the fly, thus > allowing multiple versions of libraries to coreside and not have the > 'you have to upgrade everything to install one new thing' problem. > But that was before we adopted pkgsrc. Pkgsrc doesn't use varsyms, > so... Yes, i think varsyms can be usefull in build enviroments. Somebody spoke that varsyms can be usable in a cluster or jailed enviroments. But i think, that it is necessary to change a priority of levels. The system level must have a hight priority, and unprivileged users can not override system variables. For a NetBSD's magiclinks i see only one scope - build enviroment. -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 14:57:02 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 7B2E216A59C for ; Sun, 5 Nov 2006 14:57:02 +0000 (UTC) (envelope-from henry.lenzi@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 9D9B743D6B for ; Sun, 5 Nov 2006 14:56:59 +0000 (GMT) (envelope-from henry.lenzi@gmail.com) Received: by nf-out-0910.google.com with SMTP id i2so2174220nfe for ; Sun, 05 Nov 2006 06:56:58 -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=LVbawN0M/CwQVvqr/fy/U/+VdsclX/yaZzhwbPTyjuTkDyVk0FCBzOVx/H//0IpAoTDWKn7SQtg1DIkWEbfmbAMo1NGgnqz9qmkoXzVpI0CnMuobCUNpAEGUEpqeQfhnBxkHd+0KDrVxKtl6phRLEt7Q6AvFbCLhmvLBCycvLbo= Received: by 10.78.193.19 with SMTP id q19mr5492230huf.1162738617552; Sun, 05 Nov 2006 06:56:57 -0800 (PST) Received: by 10.78.141.6 with HTTP; Sun, 5 Nov 2006 06:56:57 -0800 (PST) Message-ID: <8b4c81f0611050656o554894aaw6d8d2fac2b217d49@mail.gmail.com> Date: Sun, 5 Nov 2006 12:56:57 -0200 From: "Henry Lenzi" 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: EiffelStudio 5.7 (GPL) for FreeBSD ! (and OpenBSD, Linux an Solaris) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Nov 2006 14:57:02 -0000 Hi * This is to let you know that Eiffel Software has released their premier Eiffel development IDE/compiler, called, EiffelStudio for FreeBSD 32 and 64 bits (and OpenBSD, Linux, and Solaris) under a dual-licensing scheme: for GPLed projects, you may use Eiffel Studio without paying for a license. Eiffel is an Object Oriented language with built-in safe programming features (Design by Contract, Garbage Collection) and performance on par with C++. This is great news, everyone! Yet another commercial software company betting their chips the FreeBSD platform (recently, a major Common Lisp vendor - Lispworks - also announced their IDE for FreeBSD). I think some of you hackers out there will appreciate this news. (*) Best regards, Henry Lenzi (*) I realise this GPL choice will not result in any *BSD using it for system software. Nevertheless, some might ind it usefull (e.g., the scientific community). From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 16:35:29 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82F8816A403; Sun, 5 Nov 2006 16:35:29 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 638F343D6D; Sun, 5 Nov 2006 16:35:27 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 0EE53487F3; Sun, 5 Nov 2006 17:35:26 +0100 (CET) Received: from localhost (dlo147.neoplus.adsl.tpnet.pl [83.24.44.147]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 66FE845685; Sun, 5 Nov 2006 17:35:18 +0100 (CET) Date: Sun, 5 Nov 2006 17:35:08 +0100 From: Pawel Jakub Dawidek To: "Andrey V. Elsukov" Message-ID: <20061105163508.GO83118@garage.freebsd.pl> References: <454C55BD.000003.22283@webmail11.yandex.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="THYEXwetZJOK3OLY" Content-Disposition: inline In-Reply-To: <454C55BD.000003.22283@webmail11.yandex.ru> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: ** X-Spam-Status: No, score=2.9 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_NJABL_PROXY,RCVD_IN_SORBS_DUL,RCVD_IN_XBL autolearn=no version=3.0.4 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: Sun, 05 Nov 2006 16:35:29 -0000 --THYEXwetZJOK3OLY Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 04, 2006 at 11:56:29AM +0300, Andrey V. Elsukov wrote: > Hi, All! >=20 > 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/ =46rom what I know NetBSD removed mount flag and switched to global sysctl to enable/disable this feature. Would be good to know why and eventually do the same. I like the idea and I probably can work on getting it to the tree. Creating perforce account for you would be a good start. Would you like to work there? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --THYEXwetZJOK3OLY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFFThK8ForvXbEpPzQRAlYvAKDaPsEDddgyPdf4p9fMAuwF83+I4gCg9y+y 9i3C7s/ZalDo+E85f4eMpVI= =6wTi -----END PGP SIGNATURE----- --THYEXwetZJOK3OLY-- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 16:43: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 95D7516A407; Sun, 5 Nov 2006 16:43:25 +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 3F9D243D5F; Sun, 5 Nov 2006 16:43:25 +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 kA5GhNGW076165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 5 Nov 2006 08:43:24 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <454E14AB.6060806@errno.com> Date: Sun, 05 Nov 2006 08:43:23 -0800 From: Sam Leffler User-Agent: Thunderbird 1.5.0.7 (X11/20060920) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <454C55BD.000003.22283@webmail11.yandex.ru> <20061105163508.GO83118@garage.freebsd.pl> In-Reply-To: <20061105163508.GO83118@garage.freebsd.pl> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, "Andrey V. Elsukov" , 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: Sun, 05 Nov 2006 16:43:25 -0000 Pawel Jakub Dawidek wrote: > 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/ > > From what I know NetBSD removed mount flag and switched to global sysctl > to enable/disable this feature. Would be good to know why and eventually > do the same. The folks that objected to the feature wanted a way to turn it off entirely; not just on a per-mount basis. In fact there has been considerable pushback on the feature. Check the netbsd mailing lists. > > I like the idea and I probably can work on getting it to the tree. > Creating perforce account for you would be a good start. Would you like > to work there? > Whatever is done please make this a feature that is enabled w/ a compile-time option. Sam From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 17:12: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 827B716A4D2; Sun, 5 Nov 2006 17:12:44 +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 7AA3843DB0; Sun, 5 Nov 2006 17:12:30 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from YAMAIL (webmail11.yandex.ru) by mail.yandex.ru id ; Sun, 5 Nov 2006 20:12:03 +0300 Received: from [82.211.152.12] ([82.211.152.12]) by mail.yandex.ru with HTTP; Sun, 5 Nov 2006 20:12:02 +0300 (MSK) Date: Sun, 5 Nov 2006 20:12:02 +0300 (MSK) From: "Andrey V. Elsukov" Sender: bu7cher@yandex.ru Message-Id: <454E1B62.000003.24728@webmail11.yandex.ru> MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] Errors-To: bu7cher@yandex.ru To: pjd@FreeBSD.org In-Reply-To: <20061105163508.GO83118@garage.freebsd.pl> References: <454C55BD.000003.22283@webmail11.yandex.ru> <20061105163508.GO83118@garage.freebsd.pl> X-Source-Ip: 82.211.152.12 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: 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: Sun, 05 Nov 2006 17:12:44 -0000 >On Sat, Nov 04, 2006 at 11:56:29AM +0300, Andrey V. Elsukov wrote: >From what I know NetBSD removed mount flag and switched to global sysctl >to enable/disable this feature. Would be good to know why and eventually >do the same. Actually the current implementation uses a sysctl variable to enable/disable this feature. >I like the idea and I probably can work on getting it to the tree. >Creating perforce account for you would be a good start. Would you like >to work there? I can, but i need some p4 knowlege :) -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 19:30: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 1923116A47B for ; Sun, 5 Nov 2006 19:30:33 +0000 (UTC) (envelope-from fetrovsky@yahoo.com) Received: from web53902.mail.yahoo.com (web53902.mail.yahoo.com [206.190.36.212]) by mx1.FreeBSD.org (Postfix) with SMTP id BB76643D62 for ; Sun, 5 Nov 2006 19:30:30 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: (qmail 11276 invoked by uid 60001); 5 Nov 2006 19:30:30 -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=julQVDnT6nzUrYOskUNB4SsllcGJJNqCATzp8vhOdhcYDvGMjC2M3HCNlx7WF5MN8zdZb4f04TAL/At+Y0tW3M2UMVRUKUcaMKEnT6I0wzhoBJ9aCsYK4pomSe2LQuuFw8LzBXxUTKHZYR+4Vx54MwiDsVjq8mFbCIuDq7Zkpdk= ; Message-ID: <20061105193029.11274.qmail@web53902.mail.yahoo.com> Received: from [128.195.84.249] by web53902.mail.yahoo.com via HTTP; Sun, 05 Nov 2006 11:30:29 PST Date: Sun, 5 Nov 2006 11:30:29 -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: Sun, 05 Nov 2006 19:30:33 -0000 Shouldn't it be actually enabled by default?... I think a user should be ab= le to get the insecure behaviour _only_ if he wants to...=0A=0A- Daniel=0A= =0A=0A=0A----- Original Message ----=0AFrom: Joerg Pernfuss =0ATo: Kostik Belousov =0ACc: freebsd-hackers@fr= eebsd.org=0ASent: Saturday, November 4, 2006 10:22:36 PM=0ASubject: Re: [pa= tch] rm can have undesired side-effects=0A=0A=0AOn Sun, 5 Nov 2006 08:09:23= +0200=0AKostik Belousov wrote:=0A=0A> On Sun, Nov 05= , 2006 at 05:28:32AM +0100, Joerg Pernfuss wrote:=0A> > And I still have no= idea why ln(1) allows links to files the user=0A> > has no access rights w= hatsoever, in a directory the owner of the=0A> > file has no access to in t= he first place. And what happens when I=0A> > link the 0600 file state_secr= et.doc that is owned by someone else,=0A> > into a directory I own and set = SUIDDIR? Will that then be my file=0A> > and the original owner will be den= ied access on his link to the=0A> > file? (yes, kernel support required, i = know. but it would be fun.)=0A> > =0A> You could use security.bsd.hardlink_= check_uid and=0A> security.bsd.hardlink_check_gid sysctls to control this. = By default,=0A> they are disabled.=0A=0AAh, thank you.=0A=0A Joerg=0A=0A= -- =0A| /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a |= =0A| \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 |=0A| = X HTML in email | .the next sentence is true. |=0A| / \ = and news | .the previous sentence was a lie. |=0A=0A From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 20:04: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 1101A16A494 for ; Sun, 5 Nov 2006 20:04:19 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE54D43D6A for ; Sun, 5 Nov 2006 20:04:12 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp3-g19.free.fr (Postfix) with ESMTP id 7D5D84A0E6 for ; Sun, 5 Nov 2006 21:04:11 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 56B569E6C2 for ; Sun, 5 Nov 2006 20:04:47 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 33738405B; Sun, 5 Nov 2006 21:04:47 +0100 (CET) Date: Sun, 5 Nov 2006 21:04:47 +0100 From: Jeremie Le Hen To: freebsd-hackers@FreeBSD.org Message-ID: <20061105200447.GY20405@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Subject: Puzzling variables behaviour in make(1) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Nov 2006 20:04:19 -0000 Hello, I wrote the following piece of Makefile: % .warning "VAR contains: ${VAR}" % % VAR_BACKUP:= ${VAR} % VAR:= value2 % % .if ${VAR} == "value2" % .warning "VAR is overwritable: ${VAR}" % .else % .warning "VAR is NOT overwritable: ${VAR}" % .endif % % VAR:= ${VAR_BACKUP} % % all: If I define VAR within the Makefile (VAR:= value1), I get: % jarjarbinks:~/test/makevars:230# make % "Makefile", line 3: warning: "VAR contains: value1" % "Makefile", line 7: warning: "VAR is overwritable: value2" If I remove the VAR assignment in the Makefile and define it from the command -line, I get: % jarjarbinks:~/test/makevars:232# make VAR=value1 % "Makefile", line 3: warning: "VAR contains: value1" % "Makefile", line 9: warning: "VAR is NOT overwritable: value2" Note that this behaviour is puzzling since it follows the path as if {VAR} didn't contain "value2" but the warning message shows it does contains "value2". Finally, if I define VAR both from the command-line and within the Makefile: % jarjarbinks:~/test/makevars:242# make VAR=value1 % "Makefile", line 3: warning: "VAR contains: value1" % "Makefile", line 11: warning: "VAR is NOT overwritable: value2" Same weird behaviour. Actually I am trying to find a way to tell whether a variable has been defined from make.conf(5) or src.conf(5) or from the command-line. According to the code path this method appears to work, but the value of ${VAR} isn't "correct". If this is the expected behaviour, I'd be glad to understand the magic behind this. Thank you. Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 20:19: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 6D47116A40F for ; Sun, 5 Nov 2006 20:19:53 +0000 (UTC) (envelope-from brucem@mail.cruzio.com) Received: from cruzio.com (dsl-63-249-85-132.cruzio.com [63.249.85.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9CF343D66 for ; Sun, 5 Nov 2006 20:19:52 +0000 (GMT) (envelope-from brucem@mail.cruzio.com) Received: from mail.cruzio.com (localhost [127.0.0.1]) by cruzio.com (8.12.10/8.12.10) with ESMTP id kA5LNghH000449; Sun, 5 Nov 2006 13:23:43 -0800 (PST) (envelope-from brucem@mail.cruzio.com) Received: (from brucem@localhost) by mail.cruzio.com (8.12.10/8.12.10/Submit) id kA5LNgk4000448; Sun, 5 Nov 2006 13:23:42 -0800 (PST) (envelope-from brucem) Date: Sun, 5 Nov 2006 13:23:42 -0800 (PST) From: "Bruce R. Montague" Message-Id: <200611052123.kA5LNgk4000448@mail.cruzio.com> To: julian@elischer.org Cc: hackers@freebsd.org Subject: Re: Anyone have a picoBSD image? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Nov 2006 20:19:53 -0000 Hi, re: > I need a picobsd floppy image, (anything that can get me to a shell > that will allow me to > dd if=/dev/zero of=/dev/ad0 bs=1M > ) On old 485 motherboards... if nobody else has contacted you, I put an image that should do this at http://63.249.85.132/ It is under the page "PicoBSD Related Resources". I put a 4.3 and 4.9 image there. If they dont work, somewhere I have a bunch of other images for many circa-2000 PCs... - bruce From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 20:34: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 B99A216A40F for ; Sun, 5 Nov 2006 20:34:37 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9D3D43E61 for ; Sun, 5 Nov 2006 20:33:25 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (izdwqmav94dmxncr@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id kA5KXBM4080764; Sun, 5 Nov 2006 12:33:11 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id kA5KXBl7080763; Sun, 5 Nov 2006 12:33:11 -0800 (PST) (envelope-from jmg) Date: Sun, 5 Nov 2006 12:33:10 -0800 From: John-Mark Gurney To: usleepless@gmail.com Message-ID: <20061105203310.GR25511@funkthat.com> Mail-Followup-To: usleepless@gmail.com, freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: taskqueue_drain X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2006 20:34:37 -0000 usleepless@gmail.com wrote this message on Wed, Oct 25, 2006 at 14:42 +0200: > i am working on improving the driver for hauppauge PVR cards > (multimedia/pvrxxx). i just implemented a "fast" interrupt using a > taskqueue ( like the new if_em driver ). > > i have a couple of questions: > 1. if_em is using taskqueue_enqueue rather than > taskqueue_enqueue_fast. this is contrary to what "man taskqueue" > claims. how come? Probably a bug... > 2. when my capture-device is closed, i need to drain the taskqueue. > however, taskqueue_drain needs a task as an argument. but i have > queued 2 different tasks on the taskqueue. what to do? i guess they > need to be processed "in order". Just drain each of them.. of course make sure that you unregister your interrupt (not just disable.. you could use a flag, as you may get interrupts due to shared interrupts) before draining the taskqueue... > 3. when and in which version will the "fast" versions of the > taskqueue-functions be released? will it be backported? if i create a > patch and send-pr it, is it likely to be accepted for 6.x? Someone else will have to answer this... /me wishes he had machines w/ more pci slots so he could keep all his cards attached for testing. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 21:14:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBB5F16A40F for ; Sun, 5 Nov 2006 21:14:33 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB24643D46 for ; Sun, 5 Nov 2006 21:14:18 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id DC7105FB2; Mon, 6 Nov 2006 00:14:16 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id A7AA85F4A; Mon, 6 Nov 2006 00:14:11 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kA5LEDsA072877; Mon, 6 Nov 2006 00:14:13 +0300 (MSK) (envelope-from ru) Date: Mon, 6 Nov 2006 00:14:13 +0300 From: Ruslan Ermilov To: Jeremie Le Hen Message-ID: <20061105211413.GA72777@rambler-co.ru> References: <20061105200447.GY20405@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline In-Reply-To: <20061105200447.GY20405@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-hackers@freebsd.org Subject: Re: Puzzling variables behaviour in make(1) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Nov 2006 21:14:34 -0000 --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 05, 2006 at 09:04:47PM +0100, Jeremie Le Hen wrote: > Hello, >=20 > I wrote the following piece of Makefile: >=20 > % .warning "VAR contains: ${VAR}" > % > % VAR_BACKUP:=3D ${VAR} > % VAR:=3D value2 > %=20 > % .if ${VAR} =3D=3D "value2" > % .warning "VAR is overwritable: ${VAR}" > % .else > % .warning "VAR is NOT overwritable: ${VAR}" > % .endif > %=20 > % VAR:=3D ${VAR_BACKUP} > % > % all: >=20 > If I define VAR within the Makefile (VAR:=3D value1), I get: > % jarjarbinks:~/test/makevars:230# make > % "Makefile", line 3: warning: "VAR contains: value1" > % "Makefile", line 7: warning: "VAR is overwritable: value2" >=20 > If I remove the VAR assignment in the Makefile and define it from > the command -line, I get: > % jarjarbinks:~/test/makevars:232# make VAR=3Dvalue1 > % "Makefile", line 3: warning: "VAR contains: value1" > % "Makefile", line 9: warning: "VAR is NOT overwritable: value2" >=20 > Note that this behaviour is puzzling since it follows the path as if > {VAR} didn't contain "value2" but the warning message shows it does > contains "value2". >=20 > Finally, if I define VAR both from the command-line and within the > Makefile: > % jarjarbinks:~/test/makevars:242# make VAR=3Dvalue1 > % "Makefile", line 3: warning: "VAR contains: value1" > % "Makefile", line 11: warning: "VAR is NOT overwritable: value2" >=20 > Same weird behaviour. >=20 >=20 > Actually I am trying to find a way to tell whether a variable has > been defined from make.conf(5) or src.conf(5) or from the command-line. > According to the code path this method appears to work, but the > value of ${VAR} isn't "correct". >=20 >=20 > If this is the expected behaviour, I'd be glad to understand the magic > behind this. >=20 Command-line variables are of the highest precedence. %%% Index: parse.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/usr.bin/make/parse.c,v retrieving revision 1.111 diff -u -p -r1.111 parse.c --- parse.c 22 Jul 2006 14:00:31 -0000 1.111 +++ parse.c 5 Nov 2006 21:09:51 -0000 @@ -2231,7 +2231,7 @@ parse_message(char *line, int iserror, i while (isspace((u_char)*line)) line++; =20 - line =3D Buf_Peel(Var_Subst(line, VAR_GLOBAL, FALSE)); + line =3D Buf_Peel(Var_Subst(line, VAR_CMD, FALSE)); Parse_Error(iserror ? PARSE_FATAL : PARSE_WARNING, "%s", line); free(line); =20 %%% Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --M9NhX3UHpAaciwkO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFTlQlqRfpzJluFF4RAsb2AJ45WBt0jlkF6PBmWGMg9u5acizRzACfYDpA ouPTKSBUnD+37c3z7XNn1Q0= =hxDh -----END PGP SIGNATURE----- --M9NhX3UHpAaciwkO-- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 5 21:36: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 DCA1D16A40F; Sun, 5 Nov 2006 21:36:11 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84D7B43D6D; Sun, 5 Nov 2006 21:36:02 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp4-g19.free.fr (Postfix) with ESMTP id 5739F88EA; Sun, 5 Nov 2006 22:36:02 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 4CE609E6C2; Sun, 5 Nov 2006 21:36:40 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 2A880405B; Sun, 5 Nov 2006 22:36:40 +0100 (CET) Date: Sun, 5 Nov 2006 22:36:40 +0100 From: Jeremie Le Hen To: Ruslan Ermilov Message-ID: <20061105213640.GZ20405@obiwan.tataz.chchile.org> References: <20061105200447.GY20405@obiwan.tataz.chchile.org> <20061105211413.GA72777@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061105211413.GA72777@rambler-co.ru> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org, Jeremie Le Hen Subject: Re: [fbsd] Re: Puzzling variables behaviour in make(1) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Nov 2006 21:36:12 -0000 Hi Ruslan, thank you for your swiftness. On Mon, Nov 06, 2006 at 12:14:13AM +0300, Ruslan Ermilov wrote: > Command-line variables are of the highest precedence. > > %%% > Index: parse.c > =================================================================== > RCS file: /home/ncvs/src/usr.bin/make/parse.c,v > retrieving revision 1.111 > diff -u -p -r1.111 parse.c > --- parse.c 22 Jul 2006 14:00:31 -0000 1.111 > +++ parse.c 5 Nov 2006 21:09:51 -0000 > @@ -2231,7 +2231,7 @@ parse_message(char *line, int iserror, i > while (isspace((u_char)*line)) > line++; > > - line = Buf_Peel(Var_Subst(line, VAR_GLOBAL, FALSE)); > + line = Buf_Peel(Var_Subst(line, VAR_CMD, FALSE)); > Parse_Error(iserror ? PARSE_FATAL : PARSE_WARNING, "%s", line); > free(line); > > %%% The patch works. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 6 09:50: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 2AF6B16A416 for ; Mon, 6 Nov 2006 09:50:56 +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 8AE9343D66 for ; Mon, 6 Nov 2006 09:50:51 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (dybkve@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kA69ohKT072243; Mon, 6 Nov 2006 10:50:49 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kA69ogbY072242; Mon, 6 Nov 2006 10:50:42 +0100 (CET) (envelope-from olli) Date: Mon, 6 Nov 2006 10:50:42 +0100 (CET) Message-Id: <200611060950.kA69ogbY072242@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, bu7cher@yandex.ru In-Reply-To: <454DC4FB.000001.19509@tide.yandex.ru> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 06 Nov 2006 10:50:49 +0100 (CET) Cc: Subject: Re: Yet another magic symlinks implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, bu7cher@yandex.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2006 09:50:56 -0000 Andrey V. Elsukov wrote: > > It is interesting to note that DragonFly has had variant symlnks for > > a long time, but we haven't actually found a use for them yet. > > Yes, Matt. Some time ago i've ported Df's variant symlinks too :) > http://butcher.heavennet.ru/patches/kernel/varsym/ > > This task was declared on the ideas page: > http://www.freebsd.org/projects/ideas/#p-magicsymlinks > > But i don't see an interest in this feature among commiters. :( > > > Originally I envisioned using variant symlinks as part of a packaging > > system to allow package environments to be built on the fly, thus > > allowing multiple versions of libraries to coreside and not have the > > 'you have to upgrade everything to install one new thing' problem. > > But that was before we adopted pkgsrc. Pkgsrc doesn't use varsyms, > > so... > > Yes, i think varsyms can be usefull in build enviroments. Somebody spoke that > varsyms can be usable in a cluster or jailed enviroments. FWIW, if FreeBSD had variant symlinks, I would definitely use that feature for jailed environments. Another task: I've written an rc script for my notebook which detects the network environment (home, office, wlan, offline) by pinging some IP addresses. Then it configures several files in /etc for that environment (rc.conf, hosts, ntp.conf, resolv.conf, fstab, etc.). Currently this is done by modifying a bunch of symlimks in /etc each time the notebook is rebooted. I don't like that "solution" at all; in fact I would prefer the root file system to stay read- only. If variant symlinks were available in FreeBSD, the problem could be solved easily. I'm afraid that I don't like NetBSD's "magic symlinks" very much. It's less flexible than variant symlinks because it only supports a fixed set of variables. As far as I can tell, it does not solve any of the tasks described above. Therefore I would really like to see your port of DragonFly BSD's variant symlinks comitted to FreeBSD. Of course, it could be a compile-time option in case there are people who don't want the code in their kernel at all. But you have to set a sysctl anyway to enable it globally (it's disabled by default on DragonFly). Just my 2 cents. 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. "Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing." -- Dick Brandon From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 6 15:08: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 CFA2A16A566 for ; Mon, 6 Nov 2006 15:08:45 +0000 (UTC) (envelope-from gonzalo.arana@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00AFD43D83 for ; Mon, 6 Nov 2006 15:08:40 +0000 (GMT) (envelope-from gonzalo.arana@gmail.com) Received: by nf-out-0910.google.com with SMTP id n15so336605nfc for ; Mon, 06 Nov 2006 07:08:27 -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=tTQjhi+qeEU0ClBJWjvwQa/AKKTjPYW3FDB3QzfXffaEuA3sWICBEqnXMg1chsLl8ScFPusLi2i64hhX1A8zy6J5+cRRszir/BdIwivpXH+k3lg8/RMHShKJqEle/qeY1EtQE/ZI6UDr7lZSAqheRkOgY4EPKcwZGeU3Rz8KIjo= Received: by 10.82.98.13 with SMTP id v13mr1298028bub.1162825706269; Mon, 06 Nov 2006 07:08:26 -0800 (PST) Received: by 10.82.165.13 with HTTP; Mon, 6 Nov 2006 07:08:25 -0800 (PST) Message-ID: Date: Mon, 6 Nov 2006 12:08:26 -0300 From: "Gonzalo Arana" 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: net/mpd causes a kernel freeze X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Nov 2006 15:08:45 -0000 Hi, When I open a pptp tunnel with net/mpd, my PC freezes (numlock stops responding, for instance). I am using 6.1-RELEASE with GENERIC kernel. I've recompiled removing USB, SCSI/RAID controllers, with the same result. The freeze occurs right after the tunnel is up. Does anyone expierence the same problem? Here are the relevant configs: > /usr/local/etc/mpd/mpd.conf: > > default: > load vpn > > vpn: > new -i ng0 vpn vpn > set iface disable on-demand > set iface idle 0 > # disconnect the client after 8 hours > set iface session 28800 > #set iface route 192.168.2.0/24 > set bundle disable multilink > set bundle authname my_username > set bundle password my_password > set link yes acfcomp protocomp > set link no pap chap > set link accept pap > set link mtu 1460 > # If remote machine is NT you need this.. > # set link enable no-orig-auth > set link keep-alive 10 75 > set ipcp no vjcomp > > /usr/local/etc/mpd/mpd.links: > vpn: > set link type pptp > set pptp self ZZZ > set pptp peer YYY > set pptp enable originate incoming outcall > set pptp disable windowing > > > where: > ZZZ my ethernet IP address > YYY ip address of TCP peer > Thank you very much in advance, -- Gonzalo A. Arana From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 6 16:10:29 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E1AE16A407 for ; Mon, 6 Nov 2006 16:10:29 +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 554C443D45 for ; Mon, 6 Nov 2006 16:10:26 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (pyjsba@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kA6GAHAV092750; Mon, 6 Nov 2006 17:10: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 kA6GAHrM092749; Mon, 6 Nov 2006 17:10:17 +0100 (CET) (envelope-from olli) Date: Mon, 6 Nov 2006 17:10:17 +0100 (CET) Message-Id: <200611061610.kA6GAHrM092749@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, elessar@bsdforen.de In-Reply-To: <20061105052832.68400a56@loki.starkstrom.lan> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 06 Nov 2006 17:10:23 +0100 (CET) Cc: 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: freebsd-hackers@FreeBSD.ORG, elessar@bsdforen.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2006 16:10:29 -0000 First of all, just for the record, I also vote for removing -P from rm(1), for reasons already mentioned by others. It was intended as a security feature, but such a security feature must have a well defined and very clear behaviour, and it must work correctly under all circumstances. The -P option cannot do that. It's a good example of a security feature that can easily be turned into a security risk. Wiping and overwriting of unallocated disk blocks belongs somewhere else, e.g. the FS driver (possibly as a mount option), but defintiely not in rm(1). Joerg Pernfuss wrote: > And I still have no idea why ln(1) allows links to files the user has > no access rights whatsoever, in a directory the owner of the file > has no access to in the first place. Well, the permission bits of a file protect only the file's contents, not the inode. The inode is protected by the permission bits of the directories that contain a reference to it. Creating a hardlink doesn't require accessing the actual file contents, because it only creates another reference to the inode, so you only need read permission for the directory that contains the inode entry. For exactly the same reason you can delete (unlink) other people's files even if the permissions don't allow you to access the file's contents. You only need write permission for the directory in order to remove the directory entry (hardlink). So, while the behaviour with creating hardlinks might be considered a security flaw, at least it is consistent with deleting them (and it's what should be expected, so it doesn't violate POLA, in my opinion). In the case of deleting a hardlink (i.e. unlink), the security problem has been approached by the "sticky bit" feature, which is usually set on /tmp (mdoe 1777), so you cannot unlink other peoples files even though /tmp is writable for everybody. But for creating hardlinks, it's not that easy. If you don't want someone else to create hardlinks to your files, make the directory mode 0700. But that's not always possible: Sometimes you want others to be able to read a directory and the files in it, but not be able to hardlink them. For that purpose it would be neccessary to invent a new permission bit, analogous to the sticky bit. Global settings like FreeBSD's hardlink_check_* sysctl are not a good solution. By the way, a user _can_ prevent hardlinking his files by setting the "immutable" flag (see chflags(1)) on the files. But it makes handling the files more diffcult for the owner (he cannot edit them anymore etc.). There are more pitfalls hidden in the jungle of permissions and file flags. For example, if Alice has set the "unlink" flag on some of her files, and Brad tries to capture them by hardlinking them into his directory, this will succeed, _but_ then Brad will not be able to delete them: unlink will fail, even though Brad owns the directory and has write access to it. He cannot move them either -- but he can move the directory they're in (within the same file system). In other words, Brad has shot his foot pretty badly and will require Alice's help to get rid of the hard- links: The only solution is that Alice removes the unlink flag on her files, and only then will Brad be able to remove the hardlinks from his directory. Pretty weird if you ask me. But consistent behaviour. 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. "I made up the term 'object-oriented', and I can tell you I didn't have C++ in mind." -- Alan Kay, OOPSLA '97 From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 4 22:26: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 1B27516A58E; Sat, 4 Nov 2006 22:26:04 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id A51C543D46; Sat, 4 Nov 2006 22:26:03 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.102] (c-71-231-138-78.hsd1.or.comcast.net [71.231.138.78]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.1/8.13.1) with ESMTP id kA4MPocD085973; Sat, 4 Nov 2006 17:25:53 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Sat, 4 Nov 2006 14:24:30 -0800 (PST) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Kostik Belousov In-Reply-To: <20061104134448.GM12108@deviant.kiev.zoral.com.ua> Message-ID: <20061104124649.M622@10.0.0.1> References: <454C55BD.000003.22283@webmail11.yandex.ru> <20061104090204.GA38945@stud.fit.vutbr.cz> <454C75B9.000002.09555@mfront8.yandex.ru> <20061104134448.GM12108@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.52 on 216.240.101.25 X-Mailman-Approved-At: Mon, 06 Nov 2006 20:08:34 +0000 Cc: freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, "Andrey V. Elsukov" , 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 22:26:04 -0000 On Sat, 4 Nov 2006, Kostik Belousov wrote: > 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 >>>> >>>> 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. >> >> 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. > No additional locking is required. This code really needs some work though. First of all, macros should never operate on variables not passed in as arguments. The SUBSTITUTE macro should be a function. The matching algorithm is not very efficient either. Jeff From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 6 01:12: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 49ECF16A49E for ; Mon, 6 Nov 2006 01:12:00 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1DB143D55 for ; Mon, 6 Nov 2006 01:11:58 +0000 (GMT) (envelope-from pawel.worach@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so657560uge for ; Sun, 05 Nov 2006 17:11:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ukx9LuIUBpW7COWtiFuI9koRWLFAZTFtSYKu406M+NkiR5bU1lz1vLRLIEj9IE1ZjnuPtqqu/g3wcR6iZGZtvUiDfY0LdYz1W30SPSqZppFf5if59mNlcS7GpEt23KA+WCw9z6/iWmJ3k8LmrHRJj2QisHy+WEKNaJnGcFUWDiQ= Received: by 10.67.30.6 with SMTP id h6mr6530048ugj.1162775516977; Sun, 05 Nov 2006 17:11:56 -0800 (PST) Received: from ?192.168.1.200? ( [80.217.194.157]) by mx.google.com with ESMTP id o24sm4319237ugd.2006.11.05.17.11.56; Sun, 05 Nov 2006 17:11:56 -0800 (PST) Message-ID: <454E8BDA.9030304@gmail.com> Date: Mon, 06 Nov 2006 02:11:54 +0100 From: Pawel Worach User-Agent: Thunderbird 1.5.0.7 (X11/20061105) MIME-Version: 1.0 To: Mike Meyer References: <454C55BD.000003.22283@webmail11.yandex.ru> <17741.9196.102826.208010@bhuda.mired.org> In-Reply-To: <17741.9196.102826.208010@bhuda.mired.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 06 Nov 2006 20:09:03 +0000 Cc: freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, bu7cher@yandex.ru, jwd@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: Mon, 06 Nov 2006 01:12:00 -0000 Mike Meyer wrote: > 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? > An interesting use for this is found in an commercial embedded platform where a system image is selected with a @sys variable symlink. This is used for live upgrades (and fast backouts or test boots) of the platform where a new image is extracted from a .tgz to /image/$new_version and the @sys variable is likely updated by the boot loader for the next boot. # ls -l /usr lrwxr-xr-x 1 root wheel 8 Oct 3 13:32 /usr -> @sys/usr # cd /usr # pwd /image/OS-VERSION-BUILD-ID/usr Here a sysctl/kenv variable defines the @sys link target kern:@sys = image/OS-VERSION-BUILD-ID Regards -- Pawel From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 6 05:58: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 F0E3E16A407 for ; Mon, 6 Nov 2006 05:58:44 +0000 (UTC) (envelope-from frol@nerve.riss-telecom.ru) Received: from nerve.riss-telecom.ru (nerve.riss-telecom.ru [80.66.65.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A64D43D64 for ; Mon, 6 Nov 2006 05:58:41 +0000 (GMT) (envelope-from frol@nerve.riss-telecom.ru) Received: from nerve.riss-telecom.ru (localhost [127.0.0.1]) by nerve.riss-telecom.ru (8.13.6/8.13.6) with ESMTP id kA65wdpj023240 for ; Mon, 6 Nov 2006 11:58:39 +0600 (NOVT) (envelope-from frol@nerve.riss-telecom.ru) Received: (from frol@localhost) by nerve.riss-telecom.ru (8.13.6/8.13.6/Submit) id kA65wc06023239 for freebsd-hackers@freebsd.org; Mon, 6 Nov 2006 11:58:38 +0600 (NOVT) (envelope-from frol) Date: Mon, 6 Nov 2006 11:58:38 +0600 From: Dmitry Frolov To: freebsd-hackers@freebsd.org Message-ID: <20061106055838.GA22879@nerve.riss-telecom.ru> Mail-Followup-To: freebsd-hackers@freebsd.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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> Organization: RISS-Telecom, JSC X-PGP-Fingerprint: 5232 98E7 596E 21C2 52B5 FCAE 8088 3F87 88BC 27B0 User-Agent: Mutt/1.5.11 X-Mailman-Approved-At: Mon, 06 Nov 2006 20:09:13 +0000 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: Mon, 06 Nov 2006 05:58:45 -0000 * Josh Carroll [04.11.2006 06:15]: > Below is an initial attempt at the -P argument implementation. [...] > 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); > } [...] I see You just let divert protocol pass through. Would be nice if divert pseudo protocol is also covered. wbr&w, dmitry. -- Dmitry Frolov RISS-Telecom Network, Novosibirsk, Russia 66415911@ICQ, +7 383 2278800, DVF-RIPE From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 6 23:17: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 A324916A40F for ; Mon, 6 Nov 2006 23:17:20 +0000 (UTC) (envelope-from josh.carroll@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 DA90B43D5A for ; Mon, 6 Nov 2006 23:17:19 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by nf-out-0910.google.com with SMTP id y38so2518481nfb for ; Mon, 06 Nov 2006 15:17:18 -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=XROF1VuvWyq/jHXEvIAvkbqf9vJuU0IrCAwVfw6hV/edfNAoigWhBoGhVtneEhMR1KTt0au/YsFUth1QFpE7nH3PaZ4AFo/SyZuLJGtrWv64HFgCQiTqZcvMOsYN9h6VvSrsXAj6TpQObeJdxVRm8Ntl2+TdynXvBaYyzQq1nKE= Received: by 10.82.190.2 with SMTP id n2mr1402864buf.1162855038193; Mon, 06 Nov 2006 15:17:18 -0800 (PST) Received: by 10.82.163.16 with HTTP; Mon, 6 Nov 2006 15:17:17 -0800 (PST) Message-ID: <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> Date: Mon, 6 Nov 2006 15:17:17 -0800 From: "Josh Carroll" Sender: josh.carroll@gmail.com To: "Peter Jeremy" In-Reply-To: <20061104062439.GD854@turion.vk2pj.dyndns.org> 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> <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> <20061104062439.GD854@turion.vk2pj.dyndns.org> X-Google-Sender-Auth: 6ca90ab030cbea27 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: Mon, 06 Nov 2006 23:17:20 -0000 > 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. Thanks Peter, that's a great idea. Below is a new patch that uses getprotoent(3). For now, to maintain backward compatibility, I've defined a default list of protocols (tcp, udp, divert), in the event -P is not specified. This should retain the normal command line behavior. Thanks again for the suggestion. Dmitry - with this change, diver is now the default but can also be specified as an argument to -P as well. Thanks, Josh --- sockstat.c.orig Thu Jun 9 23:36:03 2005 +++ sockstat.c Mon Nov 6 15:12:43 2006 @@ -66,8 +66,18 @@ static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ +/* maximum length of a given protocol name to accept + from user input */ +#define MAX_PROTO_LEN 20 +/* default protocols to use if no -P was defined, currently + tcp, udp and divert */ +const char *default_protos[] = {"tcp", "udp", "divert", NULL}; + +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))) @@ -104,6 +114,104 @@ return (len); } + +/* this function needs to be updated to reflect additional protocols + that are to be supported */ +static int +get_proto_type(const char *proto) +{ + struct protoent *pent; + + if(strlen(proto) == 0) + return 0; + + pent = malloc(sizeof(struct protoent)); + pent = getprotobyname(proto); + if(pent == NULL) { + printf("Unrecognized protocol: %s\n", proto); + return -1; + } else { + return pent->p_proto; + } +} + + +static void init_protos(int num) +{ + int proto_count = 0; + + if(num > 0) { + proto_count = num; + } else { + /* find the maximum number of possible protocols */ + while(getprotoent() != NULL) + proto_count++; + endprotoent(); + } + + protos = malloc(sizeof(int) * proto_count); +} + + +static int +parse_protos(const char *protospec) +{ + const char *p; + char curr_proto[MAX_PROTO_LEN]; + /* to track the current protocol from the protospec */ + int pindex = 0; + int protos_defined = 0; + /* the index into the protos integer array to track found + protocols */ + int proto_index = 0; + int proto_num; + + /* 0 argument => get all entries */ + init_protos(0); + + p = protospec; + while(*p != '\0') { + if(*p == ',') { + curr_proto[pindex] = '\0'; + if( (proto_num = get_proto_type(curr_proto)) != -1) { + protos[proto_index++] = proto_num; + protos_defined++; + } + pindex = 0; + } else { + curr_proto[pindex++] = *p; + } + p++; + if(*p == '\0' && pindex != 0) { + curr_proto[pindex] = '\0'; + if( (proto_num = get_proto_type(curr_proto)) != -1) { + protos[proto_index++] = proto_num; + protos_defined++; + } + } + if(pindex == MAX_PROTO_LEN) { + printf("Warning: truncating protocol\n"); + curr_proto[pindex] = '\0'; + if( (proto_num = get_proto_type(curr_proto)) != -1) { + protos[proto_index++] = proto_num; + protos_defined++; + } + + /* 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++; + + pindex = 0; + } + } + return protos_defined; +} + + static void parse_ports(const char *portspec) { @@ -573,19 +681,49 @@ } } +static int set_default_protos(void) +{ + struct protoent *prot; + const char **curr_proto; + int proto_index = 0; + int proto_count = 0; + + /* determine the number of default protocols */ + for(curr_proto = default_protos; *curr_proto; curr_proto++, proto_count++) + ; + + init_protos(proto_count); + + for(curr_proto = default_protos; *curr_proto; curr_proto++) { + prot = getprotobyname(*curr_proto); + if(prot == NULL) { + printf("Cannot determine default protocols\n"); + exit(EXIT_FAILURE); + } + protos[proto_index++] = prot->p_proto; + } + + return proto_index; +} + + 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[]) { - int o; + /* if protos_defined remains -1, no -P was provided, sowe avoid + attempting to read from that int array later */ + int protos_defined = -1; - while ((o = getopt(argc, argv, "46clp:uv")) != -1) + int o, i; + + while ((o = getopt(argc, argv, "46clp:P:uv")) != -1) switch (o) { case '4': opt_4 = 1; @@ -602,6 +740,9 @@ case 'p': parse_ports(optarg); break; + case 'P': + protos_defined = parse_protos(optarg); + break; case 'u': opt_u = 1; break; @@ -618,17 +759,25 @@ if (argc > 0) usage(); - if (!opt_4 && !opt_6 && !opt_u) - opt_4 = opt_6 = opt_u = 1; + + if (!opt_4 && !opt_6 && !opt_u && protos_defined == -1) { + opt_u = 1; + /* show tcp, udp and divert by default if no -P was specified */ + /* restore protos_defined to the number of default protocols */ + protos_defined = set_default_protos(); + } + + 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); - gather_inet(IPPROTO_DIVERT); + for(i=0; i < protos_defined; i++) + gather_inet(protos[i]); } - 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 Tue Nov 7 04:54: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 3F82C16A412 for ; Tue, 7 Nov 2006 04:54:21 +0000 (UTC) (envelope-from b3k@mail.ru) Received: from mx5.mail.ru (mx5.mail.ru [194.67.23.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91E8C43D79 for ; Tue, 7 Nov 2006 04:54:08 +0000 (GMT) (envelope-from b3k@mail.ru) Received: from [212.57.150.10] (port=31859 helo=[192.168.0.22]) by mx5.mail.ru with asmtp id 1GhIyM-000LwU-00 for freebsd-hackers@freebsd.org; Tue, 07 Nov 2006 07:54:06 +0300 From: Elisey Savateev To: freebsd-hackers@freebsd.org Date: Tue, 7 Nov 2006 09:53:35 +0500 User-Agent: KMail/1.9.4 References: <453F15C0.70009@delphij.net> In-Reply-To: <453F15C0.70009@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1441938.a0TNfDeDSi"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200611070953.59866.b3k@mail.ru> X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Best practice for displaying license? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 07 Nov 2006 04:54:21 -0000 --nextPart1441938.a0TNfDeDSi Content-Type: multipart/mixed; boundary="Boundary-01=_QFBUFiYltlFWO0l" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_QFBUFiYltlFWO0l Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit Content-Disposition: inline > Hi, folks, > > I am thinking about whether we can use a better way to display license > for a BSD licensed software. Currently I have copy and pasted the > copyright as a static string constant, but that means that we have to > duplicate the text, like this: > > static const char license[] = " * Copyright (c) [year] [your name]\n > * All rights reserved.\n > *\n > * Redistribution and use in source and binary forms, with or without\n > * modification, are permitted provided that the following conditions\n > * are met:\n > [...] > * SUCH DAMAGE.\n > " > > Is there some better way not to include so much duplicated text? Look at my way to include usage text. --- Elisey Savateev --Boundary-01=_QFBUFiYltlFWO0l-- --nextPart1441938.a0TNfDeDSi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFUBFnraHIUFMyansRAiZkAKCmEI/S1PDzAJOmKHVS81TYhrV3qgCg55kq Dq6qv6WBwqBQZtSuxpt/0VI= =B+fr -----END PGP SIGNATURE----- --nextPart1441938.a0TNfDeDSi-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 7 05:14: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 F262D16A403 for ; Tue, 7 Nov 2006 05:14:18 +0000 (UTC) (envelope-from b3k@mail.ru) Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91EB543D60 for ; Tue, 7 Nov 2006 05:14:18 +0000 (GMT) (envelope-from b3k@mail.ru) Received: from [212.57.150.10] (port=41073 helo=[192.168.0.22]) by mx3.mail.ru with asmtp id 1GhJHt-000AoB-00 for freebsd-hackers@freebsd.org; Tue, 07 Nov 2006 08:14:17 +0300 From: Elisey Savateev To: freebsd-hackers@freebsd.org Date: Tue, 7 Nov 2006 10:14:09 +0500 User-Agent: KMail/1.9.4 References: <453F15C0.70009@delphij.net> <200611070953.59866.b3k@mail.ru> In-Reply-To: <200611070953.59866.b3k@mail.ru> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_iYBUFEvzhV6yOZh" Message-Id: <200611071014.10452.b3k@mail.ru> X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Best practice for displaying license? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 07 Nov 2006 05:14:19 -0000 --Boundary-00=_iYBUFEvzhV6yOZh Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit Content-Disposition: inline > > Look at my way to include usage text. > Sorry, I forgot to attach my examle :) --- Elisey Savateev --Boundary-00=_iYBUFEvzhV6yOZh-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 7 17:36: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 EBA1316A47B for ; Tue, 7 Nov 2006 17:36:59 +0000 (UTC) (envelope-from deathjestr@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by mx1.FreeBSD.org (Postfix) with ESMTP id F048143D60 for ; Tue, 7 Nov 2006 17:36:38 +0000 (GMT) (envelope-from deathjestr@gmail.com) Received: by wr-out-0506.google.com with SMTP id 71so351003wri for ; Tue, 07 Nov 2006 09:36:37 -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=Y4sjHRHvPxIoxAG9T29wn42LAlW+yBIkmK/lr9b4Nr2NXT5NbwIzFJFES1+8SLHTOR5XvEuhSJ4p8juY6WsnDMwN7TaAO8NSnYYaICLfY0hldYGMLd8opdpgI6odI8SLIOlAnzfB+LjJDA6paXgdeZdLSZ9yhVQwR+su/Sbmr7E= Received: by 10.65.38.7 with SMTP id q7mr8127218qbj.1162920996786; Tue, 07 Nov 2006 09:36:36 -0800 (PST) Received: by 10.64.125.18 with HTTP; Tue, 7 Nov 2006 09:36:36 -0800 (PST) Message-ID: <44b564930611070936n1e5d791em207ef6ae7b704b93@mail.gmail.com> Date: Tue, 7 Nov 2006 12:36:36 -0500 From: "Michael M. Press" To: "Josh Carroll" In-Reply-To: <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8cb6106e0610311058s7144d38bp2b1dafd114e2b433@mail.gmail.com> <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> <20061104062439.GD854@turion.vk2pj.dyndns.org> <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> 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: Tue, 07 Nov 2006 17:37:00 -0000 Josh Carroll wrote: > 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. I'm not sure buffer overflows are prevented: static int parse_protos(const char *protospec) { ... char curr_proto[MAX_PROTO_LEN]; while(...) { ... if(pindex == MAX_PROTO_LEN) { printf("Warning: truncating protocol\n"); curr_proto[pindex] = '\0'; ... } } ... } The code above writes past the end of the array when the 'if' condition is true. You probably meant if(pindex == MAX_PROTO_LEN-1). From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 7 17:41: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 2814216A47E for ; Tue, 7 Nov 2006 17:41:58 +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 91B3143D53 for ; Tue, 7 Nov 2006 17:41:57 +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 <20061107174155m9200km1gme>; Tue, 7 Nov 2006 17:41:56 +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 kA7HfrtU051609; Tue, 7 Nov 2006 11:41:53 -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 kA7Hfqb3051608; Tue, 7 Nov 2006 11:41:52 -0600 (CST) (envelope-from brooks) Date: Tue, 7 Nov 2006 11:41:51 -0600 From: Brooks Davis To: Josh Carroll Message-ID: <20061107174151.GA51473@lor.one-eyed-alien.net> References: <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> <20061104062439.GD854@turion.vk2pj.dyndns.org> <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> User-Agent: Mutt/1.5.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: Tue, 07 Nov 2006 17:41:58 -0000 --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 06, 2006 at 03:17:17PM -0800, Josh Carroll wrote: > >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 > Thanks Peter, that's a great idea. Below is a new patch that uses > getprotoent(3). For now, to maintain backward compatibility, I've > defined a default list of protocols (tcp, udp, divert), in the event > -P is not specified. This should retain the normal command line > behavior. >=20 > Thanks again for the suggestion. >=20 > Dmitry - with this change, diver is now the default but can also be > specified as an argument to -P as well. On other suggestion I'd have it to consider using strsep to parse the string. I'm pretty the code will be smaller and more readable. -- Brooks --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFUMVeXY6L6fI4GtQRArq0AKDlkJuD3gXlr4hnSahB+3nMFGLN6wCgmt7q rhd4fr+GA+Ag78mHGH4xToY= =lQ65 -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 7 18:08: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 2623516A412 for ; Tue, 7 Nov 2006 18:08:45 +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 91E2143D5C for ; Tue, 7 Nov 2006 18:08:39 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1100269uge for ; Tue, 07 Nov 2006 10:08:34 -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=eanfFl+z693nenItkKF9O+WWEvtUD6icNwBnNW5IZo018419b0F7Qg9SrjA3rMCxVN0xrV5TU0cCsnO/LoMXuA62zBg4hyW0KscOvySyImFxdbnwLLNBJBDjqVf9WcqVQo3uXiZIU7djo/I2gCw7Ljw6u4cZy/eSJzqeq5HDkqI= Received: by 10.82.129.5 with SMTP id b5mr1554402bud.1162922914291; Tue, 07 Nov 2006 10:08:34 -0800 (PST) Received: by 10.82.163.16 with HTTP; Tue, 7 Nov 2006 10:08:34 -0800 (PST) Message-ID: <8cb6106e0611071008y6811a79x9ba056c2be94d773@mail.gmail.com> Date: Tue, 7 Nov 2006 10:08:34 -0800 From: "Josh Carroll" Sender: josh.carroll@gmail.com To: "Brooks Davis" In-Reply-To: <20061107174151.GA51473@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061102094748.G75543@mignon.ki.iif.hu> <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> <20061104062439.GD854@turion.vk2pj.dyndns.org> <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> <20061107174151.GA51473@lor.one-eyed-alien.net> X-Google-Sender-Auth: a4c8043cd592b9ed 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: Tue, 07 Nov 2006 18:08:45 -0000 > On other suggestion I'd have it to consider using strsep to parse the > string. I'm pretty the code will be smaller and more readable. Good point. And yes, per the other mail I do need to fix the MAX_PROTO_LEN checking, but I'll make sure that is proper when I update it to use strsep. Josh From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 7 18:51: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 21E0116A407 for ; Tue, 7 Nov 2006 18:51:37 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FC3843D68 for ; Tue, 7 Nov 2006 18:51:24 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by ug-out-1314.google.com with SMTP id m3so1298246ugc for ; Tue, 07 Nov 2006 10:51:24 -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=WvpOKLJzGAAYdmzFaYo3Cn3asMyAqvZGxoZHF6f2SlapuLRCJ8rY6PZPheNMzBm07IrjKCeToI4QX5YQ1Q5L0bMdWQYfyvodVh28Q0qHxbxWw0dBE0NajM/QWtUaKKG6c7OOTUPViqldbP67IMAgZVAgNdczUOG5ua+WrQjeEvU= Received: by 10.82.107.15 with SMTP id f15mr1561389buc.1162925483393; Tue, 07 Nov 2006 10:51:23 -0800 (PST) Received: by 10.82.163.16 with HTTP; Tue, 7 Nov 2006 10:51:23 -0800 (PST) Message-ID: <8cb6106e0611071051y6cbbca1padc24ba315d4a2b3@mail.gmail.com> Date: Tue, 7 Nov 2006 10:51:23 -0800 From: "Josh Carroll" Sender: josh.carroll@gmail.com To: "Brooks Davis" In-Reply-To: <8cb6106e0611071008y6811a79x9ba056c2be94d773@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061102094748.G75543@mignon.ki.iif.hu> <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> <20061103024621.GB16445@kobe.laptop> <20061103024837.GB79357@lor.one-eyed-alien.net> <20061103025442.GB16543@kobe.laptop> <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> <20061104062439.GD854@turion.vk2pj.dyndns.org> <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> <20061107174151.GA51473@lor.one-eyed-alien.net> <8cb6106e0611071008y6811a79x9ba056c2be94d773@mail.gmail.com> X-Google-Sender-Auth: 11e81e3b041a5686 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: Tue, 07 Nov 2006 18:51:37 -0000 Below is the patch using strsep instead. I also updated the gather_inet function to print a message that a protocol is not supported if it exists in /etc/protocols, but does not have a case in the gather_inet function. patch is here if you'd rather just fetch it: http://pflog.net/~floyd/sockstat.patch Thanks, Josh --- sockstat.c.orig Thu Jun 9 23:36:03 2005 +++ sockstat.c Tue Nov 7 10:49:28 2006 @@ -66,8 +66,15 @@ static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ +/* default protocols to use if no -P was defined, currently + tcp, udp and divert */ +const char *default_protos[] = {"tcp", "udp", "divert", NULL}; + +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))) @@ -104,6 +111,68 @@ return (len); } + +/* this function needs to be updated to reflect additional protocols + that are to be supported */ +static int +get_proto_type(const char *proto) +{ + struct protoent *pent; + + if(strlen(proto) == 0) + return 0; + + pent = getprotobyname(proto); + if(pent == NULL) { + printf("Unrecognized protocol: %s\n", proto); + return -1; + } else { + return pent->p_proto; + } +} + + +static void init_protos(int num) +{ + int proto_count = 0; + + if(num > 0) { + proto_count = num; + } else { + /* find the maximum number of possible protocols */ + while(getprotoent() != NULL) + proto_count++; + endprotoent(); + } + + if ((protos = malloc(sizeof(int) * proto_count)) == NULL) + err(1, "malloc()"); +} + + +static int +parse_protos(char *protospec) +{ + char **prot; + char *tmp = protospec; + int protos_defined = 0, proto_type, proto_index = 0; + + init_protos(0); + + while( (*prot = strsep(&tmp, ",")) != NULL) { + /* handle ,, */ + if(strlen(*prot) > 0) { + proto_type = get_proto_type(*prot); + if(proto_type != -1) { + protos[proto_index++] = proto_type; + protos_defined++; + } + } + } + return protos_defined; +} + + static void parse_ports(const char *portspec) { @@ -188,6 +257,7 @@ size_t len, bufsize; void *buf; int hash, retry, vflag; + struct protoent *pent; vflag = 0; if (opt_4) @@ -209,7 +279,9 @@ protoname = "div"; break; default: - abort(); + pent = getprotobynumber(proto); + printf("protocol `%s' not supported.\n", pent->p_name); + exit(EXIT_FAILURE); } buf = NULL; @@ -264,7 +336,9 @@ so = &xip->xi_socket; break; default: - abort(); + pent = getprotobynumber(proto); + printf("protocol `%s' not supported.\n", pent->p_name); + exit(EXIT_FAILURE); } if ((inp->inp_vflag & vflag) == 0) continue; @@ -573,19 +647,49 @@ } } +static int set_default_protos(void) +{ + struct protoent *prot; + const char **curr_proto; + int proto_index = 0; + int proto_count = 0; + + /* determine the number of default protocols */ + for(curr_proto = default_protos; *curr_proto; curr_proto++, proto_count++) + ; + + init_protos(proto_count); + + for(curr_proto = default_protos; *curr_proto; curr_proto++) { + prot = getprotobyname(*curr_proto); + if(prot == NULL) { + printf("Cannot determine default protocols\n"); + exit(EXIT_FAILURE); + } + protos[proto_index++] = prot->p_proto; + } + + return proto_index; +} + + 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[]) { - int o; + /* 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, i; - while ((o = getopt(argc, argv, "46clp:uv")) != -1) + while ((o = getopt(argc, argv, "46clp:P:uv")) != -1) switch (o) { case '4': opt_4 = 1; @@ -602,6 +706,9 @@ case 'p': parse_ports(optarg); break; + case 'P': + protos_defined = parse_protos(optarg); + break; case 'u': opt_u = 1; break; @@ -618,17 +725,25 @@ if (argc > 0) usage(); - if (!opt_4 && !opt_6 && !opt_u) - opt_4 = opt_6 = opt_u = 1; + + if (!opt_4 && !opt_6 && !opt_u && protos_defined == -1) { + opt_u = 1; + /* show tcp, udp and divert by default if no -P was specified */ + /* restore protos_defined to the number of default protocols */ + protos_defined = set_default_protos(); + } + + 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); - gather_inet(IPPROTO_DIVERT); + for(i=0; i < protos_defined; i++) + gather_inet(protos[i]); } - 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 Wed Nov 8 00:05: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 3085B16A417; Wed, 8 Nov 2006 00:05:25 +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 6B20843D45; Wed, 8 Nov 2006 00:05:24 +0000 (GMT) (envelope-from jhs@flat.berklix.net) Received: from js.berklix.net (p549A665E.dip.t-dialin.net [84.154.102.94]) (authenticated bits=128) by thin.berklix.org (8.12.11/8.12.11) with ESMTP id kA805LFG031149; Wed, 8 Nov 2006 01:05:21 +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 kA805IOK001566; Wed, 8 Nov 2006 01:05:19 +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 kA805ICY005742; Wed, 8 Nov 2006 01:05:18 +0100 (CET) (envelope-from jhs@fire.jhs.private) Message-Id: <200611080005.kA805ICY005742@fire.jhs.private> To: John Baldwin In-reply-to: <200611021652.07853.jhb@freebsd.org> References: <200611021050.kA2AoH5S028916@fire.jhs.private> <200611021202.28351.jhb@freebsd.org> <200611022010.kA2KA9O7004585@fire.jhs.private> <200611021652.07853.jhb@freebsd.org> Comments: In-reply-to John Baldwin message dated "Thu, 02 Nov 2006 16:52:07 -0500." Date: Wed, 08 Nov 2006 01:05:18 +0100 From: "Julian H. Stacey" Cc: freebsd-hackers@freebsd.org 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: Wed, 08 Nov 2006 00:05:25 -0000 John Baldwin wrote: > 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. Ah Yes ! Fresh eyes :-) My /etc/amd.map had bit rot with "vers=2" in * opts:=rw,grpid,resvport,vers=2,proto=udp,nodev I tested with manually mounted mount_nfs -2 & -3, then removed "vers=2" from amd.map & now all OK, comparing 5 gig files over NFS. > You can use tcpdump on the port with NFS traffic to see > if it's v2 or v3 though. I tried tcpdump -v -t -s 192 -i rl0 port 2049 IP (tos 0x0, ttl 64, id 52774, offset 0, flags [none], proto: UDP (17), length: 128) fire.jhs.private.1181802316 > laps.jhs.private.nfs: 100 lookup fh 1041,235166/2 "usr2" IP (tos 0x0, ttl 64, id 35491, offset 0, flags [none], proto: UDP (17), length: 156) laps.jhs.private.nfs > fire.jhs.private.1181802316: reply ok 128 lookup fh 1041,235166/16512 DIR 40755 ids 0/0 sz 512 But didnt know how to read it for NFS 2/3 hence used mount_nfs -2 & -3. Problem solved. Thanks John. -- 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 Wed Nov 8 01:38: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 8386A16A494 for ; Wed, 8 Nov 2006 01:38:42 +0000 (UTC) (envelope-from pfgshield-pitt@yahoo.com) Received: from web32713.mail.mud.yahoo.com (web32713.mail.mud.yahoo.com [68.142.206.26]) by mx1.FreeBSD.org (Postfix) with SMTP id 4748643D72 for ; Wed, 8 Nov 2006 01:38:37 +0000 (GMT) (envelope-from pfgshield-pitt@yahoo.com) Received: (qmail 77608 invoked by uid 60001); 8 Nov 2006 01:38:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=DMamIIX0NAq56ZYCDsq7I1Msid55HEyrO5AxTMm638M3i48183INWhADLW/VTbjhPMDfLQBmTvzFrYUcxug7Hgq6aT+JSZ6KciuXeWOr553aNdEJ6TQ0aPSvvWC4jKhUtwk95frzCFXLEsQMedcFBGIsAoE6NzLFatq9x0FWsq4= ; Message-ID: <20061108013836.77606.qmail@web32713.mail.mud.yahoo.com> Received: from [200.118.60.212] by web32713.mail.mud.yahoo.com via HTTP; Wed, 08 Nov 2006 02:38:36 CET Date: Wed, 8 Nov 2006 02:38:36 +0100 (CET) From: Pedro F Giffuni To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Mailman-Approved-At: Wed, 08 Nov 2006 02:45:31 +0000 Subject: SEEK_HOLE and SEEK_DATA for sparse files any takers? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfgshield-pitt@yahoo.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2006 01:38:42 -0000 Hi; >From http://blogs.sun.com/bonwick/date/200512 "At this writing, SEEK_HOLE and SEEK_DATA are Solaris-specific. I encourage (implore? beg?) other operating systems to adopt these lseek(2) extensions verbatim (100% tax-free) so that sparse file navigation becomes a ubiquitous feature that every backup and archiving program can rely on. It's long overdue." It should be mentioned that linux adopted them and they would help the ZFS port. cheers, Pedro __________________________________________________ Do You Yahoo!? Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi http://mail.yahoo.it From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 8 13:36: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 21D1F16A40F for ; Wed, 8 Nov 2006 13:36:59 +0000 (UTC) (envelope-from massimo@cedoc.mo.it) Received: from insomma.datacode.it (ip-174-86.sn2.eutelia.it [83.211.174.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id A864043D8E for ; Wed, 8 Nov 2006 13:36:45 +0000 (GMT) (envelope-from massimo@cedoc.mo.it) Received: from localhost (localhost.datacode.it [127.0.0.1]) by insomma.datacode.it (Postfix) with SMTP id 3012F2C90B for ; Wed, 8 Nov 2006 14:36:42 +0100 (CET) Received: from insomma.datacode.it (localhost.datacode.it [127.0.0.1]) by insomma.datacode.it (Postfix) with ESMTP id 0B7112C90A; Wed, 8 Nov 2006 14:36:41 +0100 (CET) Received: from massimo.datacode.it (massimo.datacode.it [192.168.1.13]) by insomma.datacode.it (Postfix) with ESMTP id BEC902C906; Wed, 8 Nov 2006 14:36:41 +0100 (CET) From: Massimo Lusetti To: net@freebsd.org Content-Type: text/plain Organization: CEDOC - Modena Date: Wed, 08 Nov 2006 14:36:41 +0100 Message-Id: <1162993001.4305.37.camel@massimo.datacode.it> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Wed, 08 Nov 2006 13:53:32 +0000 Cc: hackers@freebsd.org Subject: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Nov 2006 13:36:59 -0000 Hi all, I'm pleased to tell you i got the latest wpi driver from Damien Bergamini to work properly on a latest -stable on an Acer laptop. Some history: I didn't do anything special, only report some problems on the misc@openbsd about this new driver on the recently 4.0 release and Damien was kind enough to respond me, the problem were related to the switch on my laptop used to turn on/off the receiver being an ACPI-only switch, this cause the driver to not work properly due to openbsd acpi issues on the laptop. Then Damien ask if i would like to have the FreeBSD version of the driver since i told him the switch work properly on FreeBSD, this all end up me having the driver working smoothly on FreeBSD. The driver as provided by Damien compiled without any issues on my stable, no need to put it under any special directory or what else. Obviously the driver is BSD licensed and obviously is an unsupported version of the driver so not complain to the author if this fail for you. For make this all clear i quote word from the author: --- No problem. It's BSD-licensed, you can redistribute it freely. I just don't want to hear complaints from users if it doesn't work. I don't provide any "support" for the FreeBSD version of wpi(4). --- The driver is available here: http://www.datacode.it/wpi-freebsd/wpi-freebsd.tgz If anyone from FreeBSD team or else is willing to put it on a host with more bandwidth it's more then welcome. Here is the relevant part from the dmesg and ifconfig. wpi0: mem 0xd2100000-0xd2100fff irq 19 at device 0.0 on pci5 channel 1 pwr1 0x007d pwr2 0x007c channel 2 pwr1 0x007b pwr2 0x007e channel 3 pwr1 0x009c pwr2 0x009d channel 4 pwr1 0x009e pwr2 0x009c channel 5 pwr1 0x0000 pwr2 0x0000 channel 6 pwr1 0x0075 pwr2 0x0076 channel 7 pwr1 0x0075 pwr2 0x0074 channel 8 pwr1 0x0077 pwr2 0x0076 channel 9 pwr1 0x0075 pwr2 0x0077 channel 10 pwr1 0x0000 pwr2 0x0000 channel 11 pwr1 0x0001 pwr2 0x0001 channel 12 pwr1 0x0001 pwr2 0x0001 channel 13 pwr1 0x0001 pwr2 0x0001 channel 14 pwr1 0x0001 pwr2 0x0001 wpi0: Ethernet address: 00:13:02:18:e5:b2 wpi0: flags=8802 mtu 1500 ether 00:13:02:18:e5:b2 media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid "" channel 1 authmode OPEN privacy OFF txpowmax 100 bmiss 7 protmode CTS Regards -- Massimo.run(); From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 8 14:37: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 1D53E16A416 for ; Wed, 8 Nov 2006 14:37:37 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9E7A43D64 for ; Wed, 8 Nov 2006 14:37:35 +0000 (GMT) (envelope-from jacques.fourie@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1325990uge for ; Wed, 08 Nov 2006 06:37:35 -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=bZZYSPj55WQRmfVPjJ/jUFKyu6xs8DIde3H9VdUYeH+TGicvoP6KyBsIlI7iLLSZozDwVXLxx08ldrMOZ3lkY8aH9y8qkr6lwl7rlUkByw4xF9Y+zFN9iI0BrCEwjVo3Blaau3JGZlmS0ikNjKBrdhyWFziv15VdDN+hXlUf/CE= Received: by 10.78.193.19 with SMTP id q19mr9881054huf.1162996654404; Wed, 08 Nov 2006 06:37:34 -0800 (PST) Received: by 10.78.198.12 with HTTP; Wed, 8 Nov 2006 06:37:34 -0800 (PST) Message-ID: Date: Wed, 8 Nov 2006 16:37:34 +0200 From: "Jacques Fourie" 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: m_free() in if_bridge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2006 14:37:37 -0000 While browsing through if_bridge.c I noticed that if the bridge interface is in monitoring mode, m_free() gets called on the packet after passing it to BPF. Should this not be m_freem() instead or am I missing something? The code in question can be found in the bridge_input() function, line 1877 in if_bridge.c. regards, jacques From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 8 15:24: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 8B0F716A403; Wed, 8 Nov 2006 15:24:16 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FA6043D53; Wed, 8 Nov 2006 15:24:14 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 330EE5C59; Wed, 8 Nov 2006 18:24:13 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 119F05C4F; Wed, 8 Nov 2006 18:24:13 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kA8FOEm3016572; Wed, 8 Nov 2006 18:24:14 +0300 (MSK) (envelope-from ru) Date: Wed, 8 Nov 2006 18:24:14 +0300 From: Ruslan Ermilov To: Jacques Fourie Message-ID: <20061108152414.GA16466@rambler-co.ru> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-hackers@FreeBSD.org, "Christian S.J. Peron" Subject: Re: m_free() in if_bridge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2006 15:24:16 -0000 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 08, 2006 at 04:37:34PM +0200, Jacques Fourie wrote: > While browsing through if_bridge.c I noticed that if the bridge > interface is in monitoring mode, m_free() gets called on the packet > after passing it to BPF. Should this not be m_freem() instead or am I > missing something? The code in question can be found in the > bridge_input() function, line 1877 in if_bridge.c. >=20 It's been fixed already: : revision 1.85 : date: 2006/11/05 17:56:25; author: csjp; state: Exp; lines: +1 -1 : Fix possible leak when bridge is in monitor mode. Use m_freem() which will : free the entire chain, instead of using m_free() which will free just the : mbuf that was passed. :=20 : Discussed with: thompsa : MFC after: 3 days Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFUfaeqRfpzJluFF4RArLGAJ9ylgpqg47ZYDeyVAAr4wXfrrJlbgCcD4Bn kRyptlpZ8+QkuFD+7xufFk8= =TaDj -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY-- From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 8 16:50: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 D0C0016A49E for ; Wed, 8 Nov 2006 16:50:55 +0000 (UTC) (envelope-from lamont@scriptkiddie.org) Received: from sploit.scriptkiddie.org (sploit.scriptkiddie.org [216.231.47.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4276E43D7D for ; Wed, 8 Nov 2006 16:50:33 +0000 (GMT) (envelope-from lamont@scriptkiddie.org) Received: from sploit (sploit [216.231.47.214]) by sploit.scriptkiddie.org (8.12.11/8.12.11) with ESMTP id kA8GoVGs013503 for ; Wed, 8 Nov 2006 08:50:31 -0800 (PST) Date: Wed, 8 Nov 2006 08:50:31 -0800 (PST) From: Lamont Granquist To: freebsd-hackers@freebsd.org In-Reply-To: <200611060950.kA69ogbY072242@lurza.secnetix.de> Message-ID: References: <200611060950.kA69ogbY072242@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Wed, 08 Nov 2006 16:50:56 -0000 AFS also has an @sys variable which is useful for network filesystem mounted binaries and software for multiple architectures through a single globally unique path: http://www.openafs.org/pages/doc/AdminReference/auarf234.htm#HDRSYS And I'd vote with Oliver on preferring variant symlinks for flexibility: On Mon, 6 Nov 2006, Oliver Fromme wrote: > I'm afraid that I don't like NetBSD's "magic symlinks" very > much. It's less flexible than variant symlinks because it > only supports a fixed set of variables. As far as I can > tell, it does not solve any of the tasks described above. > > Therefore I would really like to see your port of DragonFly > BSD's variant symlinks comitted to FreeBSD. Of course, it > could be a compile-time option in case there are people who > don't want the code in their kernel at all. But you have > to set a sysctl anyway to enable it globally (it's disabled > by default on DragonFly). From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 8 19:49:09 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D207916A47E for ; Wed, 8 Nov 2006 19:49:09 +0000 (UTC) (envelope-from nicko@stbernard.com) Received: from mail.stbernard.com (mail.stbernard.com [64.154.93.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6480443D49 for ; Wed, 8 Nov 2006 19:48:55 +0000 (GMT) (envelope-from nicko@stbernard.com) Received: from slayer.rapid.stbernard.com ([192.168.4.1]) by mail.stbernard.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 8 Nov 2006 11:48:55 -0800 Date: Wed, 8 Nov 2006 11:53:32 -0800 (PST) From: Nicolas Dehaine X-X-Sender: nicko@slayer.rapid.stbernard.com To: freebsd-hackers@freebsd.org Message-ID: <20061108115319.X27988@slayer.rapid.stbernard.com> MIME-Version: 1.0 Content-Type: MULTIPART/Mixed; BOUNDARY="0-270479657-1161393605=:18463" Content-ID: <20061025111457.C46523@slayer.rapid.stbernard.com> X-OriginalArrivalTime: 08 Nov 2006 19:48:55.0511 (UTC) FILETIME=[ECA8A670:01C7036E] Cc: Wesley Peters Subject: Panic in contigmalloc/vm_page_remove (fwd) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Nov 2006 19:49:09 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-270479657-1161393605=:18463 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Content-ID: <20061025111457.P46523@slayer.rapid.stbernard.com> Back in June 2005, I encountered an issue with contigmalloc1() (see rev 1.43 of src/sys/vm/vm_contig.c) which Brian (green@freebsd.org) looked into and solved. Running FreeBSD 5.3 + the updated rev (1.43) of vm_contig.c (which isn't merged to RELENG_5), I have now encountered a reproduceable panic in vm_page_remove which seems to be related to this patch but also to our new hardware. I have a new system (based on a Tyan 3098 motherboard) which panics at boot time (when assigning an IP with ifconfig more exactly) while the same build works ok on my older systems (Tyan 2098 motherboard). I have - reverted to the FreeBSD 5.3 version of vm_contig - panic went away. - merged the newer panic-related fixes - panic remained - tried the last version of vm_page on RELENG_5 - panic remained - loaded FreeBSD 6.1 - no panic I am guessing that rev 1.43 causes the panic indirectly but a later change in RELENG_6 fixed it or hid it. However, I would guess that this problem is unlikely to affect many, as rev 1.43 was not merged to RELENG_5. The dmesg output and panic trace are attached. Any assistance is most welcome. Nicolas Dehaine St Bernard Software --0-270479657-1161393605=:18463 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=panic.txt Content-Transfer-Encoding: BASE64 Content-ID: <20061020182005.K18463@slayer.rapid.stbernard.com> Content-Description: Content-Disposition: ATTACHMENT; FILENAME=panic.txt W2tlcm5lbCBib290cywgcm9vdCBsb2dpbi4gaWZjb25maWcgd2Fzbid0IHJ1 biBhdCBib290IHRpbWUgKHNhbWUgcmVzdWx0cyBpZiBpdCBkb2VzKV0NCiMg aWZjb25maWcgDQogIDxvdXRwdXQgb2s6IGVtMCwgZW0xIGludGVyZmFjZXM+ DQoNCiMgaWZjb25maWcgZW0wIDEwLjAuMC4xDQpwYW5pYzogdm1fcGFnZV9y ZW1vdmU6IHBhZ2Ugbm90IGJ1c3kNCktEQjogc3RhY2sgYmFja3RyYWNlOg0K a2RiX2JhY2t0cmFjZSgxMDAsYzI3ODc3ZDAsYzIzM2Y1ZjgsYzFjNDFkNjgs MThjODcpIGF0IGtkYl9iYWNrdHJhY2UrMHgyOQ0KcGFuaWMoYzA1ZTVmZDEs YzIzM2Y1ZjgsYzFjNDFkNjgsZGQ5NGY5ZDQsYzA1ODAyMzgpIGF0IHBhbmlj KzB4YTgNCnZtX3BhZ2VfcmVtb3ZlKGMyMzNmNWY4LGMyMzNmNWY4KSBhdCB2 bV9wYWdlX3JlbW92ZSsweDIyDQp2bV9wYWdlX2ZyZWVfdG9xKGMyMzNmNWY4 LGMyMzNmNWY4LDQwLGMyMzNmNWY4L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mF1bHQNCktEQjogZW50ZXI6 IHBhbmljDQoNCg0KRmF0YWwgdHJhcCAzOiBicmVha3BvaW50IGluc3RydWN0 aW9uIGZhdWx0IHdoaWxlIGluIGtlcm5lbCBtb2RlDQppbnN0cnVjdGlvbiBw b2ludGVyICAgICA9IDB4ODoweGMwNGNhZjFiDQpzdGFjayBwb2ludGVyICAg ICAgICAgICA9IDB4MTA6MHhkZDk0ZjY3NA0KZnJhbWUgcG9pbnRlciAgICAg ICAgICAgPSAweDEwOjB4ZGQ5NGY2NzQNCmNvZGUgc2VnbWVudCAgICAgICAg ICAgID0gYmFzZSAweDAsIGxpbWl0IDB4ZmZmZmYsIHR5cGUgMHgxYg0KICAg ICAgICAgICAgICAgICAgICAgICAgPSBEUEwgMCwgcHJlcyAxLCBkZWYzMiAx LCBncmFuIDENCnByb2Nlc3NvciBlZmxhZ3MgICAgICAgID0gSU9QTCA9IDAN CmN1cnJlbnQgcHJvY2VzcyAgICAgICAgID0gNjcxIChpZmNvbmZpZykgDQp0 cmFwIG51bWJlciAgICAgICAgICAgICA9IDMNCnBhbmljOiBicmVha3BvaW50 IGluc3RydWN0aW9uIGZhdWx0DQoNClttdWNoIG1vcmUgb2YgdGhpc10NCg== --0-270479657-1161393605=:18463 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=t3098dmesg.txt Content-Transfer-Encoding: BASE64 Content-ID: <20061025113351.T46523@slayer.rapid.stbernard.com> Content-Description: Content-Disposition: ATTACHMENT; FILENAME=t3098dmesg.txt Q29weXJpZ2h0IChjKSAxOTkyLTIwMDQgVGhlIEZyZWVCU0QgUHJvamVjdC4N CkNvcHlyaWdodCAoYykgMTk3OSwgMTk4MCwgMTk4MywgMTk4NiwgMTk4OCwg MTk4OSwgMTk5MSwgMTk5MiwgMTk5MywgMTk5NA0KICAgICAgICBUaGUgUmVn ZW50cyBvZiB0aGUgVW5pdmVyc2l0eSBvZiBDYWxpZm9ybmlhLiBBbGwgcmln aHRzIHJlc2VydmVk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-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0EA2416A49E for ; Wed, 8 Nov 2006 21:28:45 +0000 (UTC) (envelope-from shaun@FreeBSD.org) Received: from dione.picobyte.net (host-212-158-207-124.bulldogdsl.com [212.158.207.124]) by mx1.FreeBSD.org (Postfix) with SMTP id 9601643D64 for ; Wed, 8 Nov 2006 21:28:32 +0000 (GMT) (envelope-from shaun@FreeBSD.org) Received: from charon.picobyte.net (charon.picobyte.net [IPv6:2001:4bd0:201e::fe03]) by dione.picobyte.net (Postfix) with ESMTP for ; Wed, 8 Nov 2006 21:28:30 +0000 (GMT) Date: Wed, 8 Nov 2006 21:28:30 +0000 From: Shaun Amott To: freebsd-hackers@FreeBSD.org Message-ID: <20061108212829.GA2738@charon.picobyte.net> Mail-Followup-To: freebsd-hackers@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NMuMz9nt05w80d4+" Content-Disposition: inline User-Agent: Mutt/1.5.11 (FreeBSD i386) Cc: Subject: RFC: pam_krb5: minimum_[ug]id options X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Nov 2006 21:28:45 -0000 --NMuMz9nt05w80d4+ Content-Type: multipart/mixed; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable While fiddling with PAM, it came to my attention that the pam_krb5 module in some other (Linux?) PAM implementations supports, amongst other things, a minimum_uid option. This makes it possible to skip over Kerberos authentication for local system accounts, like so: auth required pam_krb5.so no_warn minimum_uid=3D1000 auth required pam_unix.so no_warn try_first_pass I think it'd a nice addition to our pam_krb5 at least. I've attached an initial patch. Comments/review welcome. Shaun --=20 Shaun Amott // PGP: 0x6B387A9A "A foolish consistency is the hobgoblin of little minds." - Ralph Waldo Emerson --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="pam_krb5.diff" Content-Transfer-Encoding: quoted-printable Index: pam_krb5.8 =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/lib/libpam/modules/pam_krb5/pam_krb5.8,v retrieving revision 1.6 diff -u -r1.6 pam_krb5.8 --- pam_krb5.8 24 Nov 2001 23:41:32 -0000 1.6 +++ pam_krb5.8 8 Nov 2006 20:50:35 -0000 @@ -108,6 +108,13 @@ .Ql %p , to designate the current process ID; can be used in .Ar name . +.It Cm minimum_uid Ns =3D Ns Ar id +Do not attempt to authenticate users with a uid below +.Ar id . +Instead, simply return; thus allowing a later module to authenticate +the user. +.It Cm minimum_gid Ns =3D Ns Ar id +As above, but specifies a minimum group. .El .Ss Kerberos 5 Account Management Module The Kerberos 5 account management component Index: pam_krb5.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/lib/libpam/modules/pam_krb5/pam_krb5.c,v retrieving revision 1.23 diff -u -r1.23 pam_krb5.c --- pam_krb5.c 7 Jul 2005 14:16:38 -0000 1.23 +++ pam_krb5.c 8 Nov 2006 20:50:36 -0000 @@ -90,6 +90,8 @@ #define PAM_OPT_FORWARDABLE "forwardable" #define PAM_OPT_NO_CCACHE "no_ccache" #define PAM_OPT_REUSE_CCACHE "reuse_ccache" +#define PAM_OPT_MINIMUM_UID "minimum_uid" +#define PAM_OPT_MINIMUM_GID "minimum_gid" =20 /* * authentication management @@ -110,6 +112,9 @@ const char *user, *pass; const void *sourceuser, *service; char *principal, *princ_name, *ccache_name, luser[32], *srvdup; + const char *retstr; + uid_t minuid =3D 0; + gid_t mingid =3D 0; =20 retval =3D pam_get_user(pamh, &user, USER_PROMPT); if (retval !=3D PAM_SUCCESS) @@ -222,6 +227,21 @@ =20 PAM_LOG("Done getpwnam()"); =20 + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_UID); + + if (retstr) + minuid =3D (uid_t)strtoul(retstr, NULL, 10); + + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_GID); + + if (retstr) + mingid =3D (gid_t)strtoul(retstr, NULL, 10); + + if (pwd->pw_uid < minuid || pwd->pw_gid < mingid) + return (PAM_IGNORE); + + PAM_LOG("Checked uid and gid bounds"); + /* Get a TGT */ memset(&creds, 0, sizeof(krb5_creds)); krbret =3D krb5_get_init_creds_password(pam_context, &creds, princ, @@ -349,6 +369,9 @@ const void *user; void *cache_data; char *cache_name_buf =3D NULL, *p; + const char *retstr; + uid_t minuid =3D 0; + gid_t mingid =3D 0; =20 uid_t euid; gid_t egid; @@ -391,6 +414,30 @@ =20 PAM_LOG("Got euid, egid: %d %d", euid, egid); =20 + /* Get the uid. This should exist. */ + pwd =3D getpwnam(user); + if (pwd =3D=3D NULL) { + retval =3D PAM_USER_UNKNOWN; + goto cleanup3; + } + + PAM_LOG("Done getpwnam()"); + + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_UID); + + if (retstr) + minuid =3D (uid_t)strtoul(retstr, NULL, 10); + + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_GID); + + if (retstr) + mingid =3D (gid_t)strtoul(retstr, NULL, 10); + + if (pwd->pw_uid < minuid || pwd->pw_gid < mingid) + return (PAM_IGNORE); + + PAM_LOG("Checked uid and gid bounds"); + /* Retrieve the temporary cache */ retval =3D pam_get_data(pamh, "ccache", &cache_data); if (retval !=3D PAM_SUCCESS) { @@ -405,15 +452,6 @@ goto cleanup3; } =20 - /* Get the uid. This should exist. */ - pwd =3D getpwnam(user); - if (pwd =3D=3D NULL) { - retval =3D PAM_USER_UNKNOWN; - goto cleanup3; - } - - PAM_LOG("Done getpwnam()"); - /* Avoid following a symlink as root */ if (setegid(pwd->pw_gid)) { retval =3D PAM_SERVICE_ERR; --XsQoSWH+UP9D9v3l-- --NMuMz9nt05w80d4+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFFUkv9kmhdCGs4epoRAlqcAKC1j9LENp2RBcNwnBza9z7vPZNovwCfbPkN US0RLNGZCsiYN9JjJOtQ2sQ= =GA2S -----END PGP SIGNATURE----- --NMuMz9nt05w80d4+-- From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 8 22: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 B660716A518 for ; Wed, 8 Nov 2006 22:11:21 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07E9A43D5F for ; Wed, 8 Nov 2006 22:10:19 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id E47FD5DE3 for ; Thu, 9 Nov 2006 01:10:15 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id AB7F85DCF for ; Thu, 9 Nov 2006 01:10:15 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kA8MAIWj011886 for freebsd-hackers@FreeBSD.org; Thu, 9 Nov 2006 01:10:18 +0300 (MSK) (envelope-from ru) Date: Thu, 9 Nov 2006 01:10:18 +0300 From: Ruslan Ermilov To: freebsd-hackers@FreeBSD.org Message-ID: <20061108221018.GB55351@rambler-co.ru> References: <20061108212829.GA2738@charon.picobyte.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7ZAtKRhVyVSsbBD2" Content-Disposition: inline In-Reply-To: <20061108212829.GA2738@charon.picobyte.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: Subject: Re: RFC: pam_krb5: minimum_[ug]id options X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Nov 2006 22:11:21 -0000 --7ZAtKRhVyVSsbBD2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 08, 2006 at 09:28:30PM +0000, Shaun Amott wrote: > While fiddling with PAM, it came to my attention that the pam_krb5 > module in some other (Linux?) PAM implementations supports, amongst > other things, a minimum_uid option. This makes it possible to skip over > Kerberos authentication for local system accounts, like so: >=20 > auth required pam_krb5.so no_warn minimum_uid=3D1000 > auth required pam_unix.so no_warn try_first_pass >=20 > I think it'd a nice addition to our pam_krb5 at least. >=20 > I've attached an initial patch. Comments/review welcome. >=20 OK. > Index: pam_krb5.8 > =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/lib/libpam/modules/pam_krb5/pam_krb5.8,v > retrieving revision 1.6 > diff -u -r1.6 pam_krb5.8 > --- pam_krb5.8 24 Nov 2001 23:41:32 -0000 1.6 > +++ pam_krb5.8 8 Nov 2006 20:50:35 -0000 > @@ -108,6 +108,13 @@ > .Ql %p , > to designate the current process ID; can be used in > .Ar name . > +.It Cm minimum_uid Ns =3D Ns Ar id > +Do not attempt to authenticate users with a uid below ^^^ UID > +.Ar id . > +Instead, simply return; thus allowing a later module to authenticate > +the user. > +.It Cm minimum_gid Ns =3D Ns Ar id > +As above, but specifies a minimum group. ^^^^^ "group ID" or GID Also, it could be explicit about this being a primary GID. > .El > .Ss Kerberos 5 Account Management Module > The Kerberos 5 account management component >=20 Document date should be bumped (the .Dd macro). > Index: pam_krb5.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/lib/libpam/modules/pam_krb5/pam_krb5.c,v > retrieving revision 1.23 > diff -u -r1.23 pam_krb5.c > --- pam_krb5.c 7 Jul 2005 14:16:38 -0000 1.23 > +++ pam_krb5.c 8 Nov 2006 20:50:36 -0000 > @@ -90,6 +90,8 @@ > #define PAM_OPT_FORWARDABLE "forwardable" > #define PAM_OPT_NO_CCACHE "no_ccache" > #define PAM_OPT_REUSE_CCACHE "reuse_ccache" > +#define PAM_OPT_MINIMUM_UID "minimum_uid" > +#define PAM_OPT_MINIMUM_GID "minimum_gid" > =20 Defines were sorted alphabetically by a defined name. > /* > * authentication management > @@ -110,6 +112,9 @@ > const char *user, *pass; > const void *sourceuser, *service; > char *principal, *princ_name, *ccache_name, luser[32], *srvdup; > + const char *retstr; > + uid_t minuid =3D 0; > + gid_t mingid =3D 0; > =20 > retval =3D pam_get_user(pamh, &user, USER_PROMPT); > if (retval !=3D PAM_SUCCESS) > @@ -222,6 +227,21 @@ > =20 > PAM_LOG("Done getpwnam()"); > =20 > + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_UID); > + Extraneous empty line. > + if (retstr) ^ missing "!=3D NULL" > + minuid =3D (uid_t)strtoul(retstr, NULL, 10); >=20 Errors are silently ignored; limit (UID_MAX) isn't checked. > + > + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_GID); > + > + if (retstr) > + mingid =3D (gid_t)strtoul(retstr, NULL, 10); > + >=20 Ditto but s/UID_MAX/GID_MAX/. > + if (pwd->pw_uid < minuid || pwd->pw_gid < mingid) > + return (PAM_IGNORE); > + > + PAM_LOG("Checked uid and gid bounds"); > + > /* Get a TGT */ > memset(&creds, 0, sizeof(krb5_creds)); > krbret =3D krb5_get_init_creds_password(pam_context, &creds, princ, > @@ -349,6 +369,9 @@ > const void *user; > void *cache_data; > char *cache_name_buf =3D NULL, *p; > + const char *retstr; > + uid_t minuid =3D 0; > + gid_t mingid =3D 0; > =20 > uid_t euid; > gid_t egid; > @@ -391,6 +414,30 @@ > =20 > PAM_LOG("Got euid, egid: %d %d", euid, egid); > =20 > + /* Get the uid. This should exist. */ > + pwd =3D getpwnam(user); > + if (pwd =3D=3D NULL) { > + retval =3D PAM_USER_UNKNOWN; > + goto cleanup3; > + } > + > + PAM_LOG("Done getpwnam()"); > + > + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_UID); > + > + if (retstr) > + minuid =3D (uid_t)strtoul(retstr, NULL, 10); > + > + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_GID); > + > + if (retstr) > + mingid =3D (gid_t)strtoul(retstr, NULL, 10); > + > + if (pwd->pw_uid < minuid || pwd->pw_gid < mingid) > + return (PAM_IGNORE); > + > + PAM_LOG("Checked uid and gid bounds"); > + > /* Retrieve the temporary cache */ > retval =3D pam_get_data(pamh, "ccache", &cache_data); > if (retval !=3D PAM_SUCCESS) { > @@ -405,15 +452,6 @@ > goto cleanup3; > } > =20 > - /* Get the uid. This should exist. */ > - pwd =3D getpwnam(user); > - if (pwd =3D=3D NULL) { > - retval =3D PAM_USER_UNKNOWN; > - goto cleanup3; > - } > - > - PAM_LOG("Done getpwnam()"); > - > /* Avoid following a symlink as root */ > if (setegid(pwd->pw_gid)) { > retval =3D PAM_SERVICE_ERR; Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --7ZAtKRhVyVSsbBD2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFUlXKqRfpzJluFF4RAn5UAJ4sE9S9lXf7/sj13NGD4xR6jSlbBQCfeh+8 9YO7dLFxPG/xiRzUwRDMWf8= =E7l2 -----END PGP SIGNATURE----- --7ZAtKRhVyVSsbBD2-- From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 8 23:41:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 678C616A412 for ; Wed, 8 Nov 2006 23:41:27 +0000 (UTC) (envelope-from juan.fco.rodriguez@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 775A143D46 for ; Wed, 8 Nov 2006 23:41:26 +0000 (GMT) (envelope-from juan.fco.rodriguez@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so14714wxc for ; Wed, 08 Nov 2006 15:41:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=P70bdiQyFCa7OzRRO9nO9gqZIo7rrigUIkJy+Mh2KyjpvApW+hUws/AiQXZErs/rAQmyZM1Z2Mja0Lsi6i2KHB0lJLT9d2RNCd/oJOiDI5h6tnickBhtyfW4/F4aMU9bzfrNJB0pbSsKEH+4WoIkLGmxNI0n9z3L6fK/jblrJUI= Received: by 10.70.59.17 with SMTP id h17mr306147wxa.1163029285438; Wed, 08 Nov 2006 15:41:25 -0800 (PST) Received: by 10.70.38.5 with HTTP; Wed, 8 Nov 2006 15:41:25 -0800 (PST) Message-ID: <96b30c400611081541y1cc870d5n4590f1d35a24fa59@mail.gmail.com> Date: Thu, 9 Nov 2006 00:41:25 +0100 From: "Juan Rodriguez" To: freebsd-hackers@freebsd.org In-Reply-To: <200611061610.kA6GAHrM092749@lurza.secnetix.de> MIME-Version: 1.0 References: <20061105052832.68400a56@loki.starkstrom.lan> <200611061610.kA6GAHrM092749@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: [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, 08 Nov 2006 23:41:27 -0000 Mac OS X uses the FreeBSD's behaviour. I don't see any problem with the current implementation of "rm -P". I think I agree with Mike Meyers (omg!) My 0.01 cents -- JFRH From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 01:18:49 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51CAF16A412 for ; Thu, 9 Nov 2006 01:18:49 +0000 (UTC) (envelope-from shaun@FreeBSD.org) Received: from dione.picobyte.net (host-212-158-207-124.bulldogdsl.com [212.158.207.124]) by mx1.FreeBSD.org (Postfix) with SMTP id 8807043D53 for ; Thu, 9 Nov 2006 01:18:46 +0000 (GMT) (envelope-from shaun@FreeBSD.org) Received: from charon.picobyte.net (charon.picobyte.net [IPv6:2001:4bd0:201e::fe03]) by dione.picobyte.net (Postfix) with ESMTP for ; Thu, 9 Nov 2006 01:18:44 +0000 (GMT) Date: Thu, 9 Nov 2006 01:18:44 +0000 From: Shaun Amott To: freebsd-hackers@FreeBSD.org Message-ID: <20061109011843.GA4880@charon.picobyte.net> Mail-Followup-To: freebsd-hackers@FreeBSD.org References: <20061108212829.GA2738@charon.picobyte.net> <20061108221018.GB55351@rambler-co.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uXxzq0nDebZQVNAZ" Content-Disposition: inline In-Reply-To: <20061108221018.GB55351@rambler-co.ru> User-Agent: Mutt/1.5.11 (FreeBSD i386) Cc: Subject: Re: RFC: pam_krb5: minimum_[ug]id options X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 01:18:49 -0000 --uXxzq0nDebZQVNAZ Content-Type: multipart/mixed; boundary="24zk1gE8NUlDmwG9" Content-Disposition: inline --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for reviewing the patch. Here's an updated version with your suggestions incorporated. Shaun --=20 Shaun Amott // PGP: 0x6B387A9A "A foolish consistency is the hobgoblin of little minds." - Ralph Waldo Emerson --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="pam_krb5.diff" Content-Transfer-Encoding: quoted-printable Index: pam_krb5.8 =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/lib/libpam/modules/pam_krb5/pam_krb5.8,v retrieving revision 1.6 diff -u -r1.6 pam_krb5.8 --- pam_krb5.8 24 Nov 2001 23:41:32 -0000 1.6 +++ pam_krb5.8 9 Nov 2006 01:14:18 -0000 @@ -1,7 +1,7 @@ .\" .\" $Id: pam_krb5.5,v 1.5 2000/01/05 00:59:56 fcusack Exp $ .\" $FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.8,v 1.6 2001/11/24 = 23:41:32 dd Exp $ -.Dd January 15, 1999 +.Dd Thursday 09, 2006 .Dt PAM_KRB5 8 .Os .Sh NAME @@ -108,6 +108,13 @@ .Ql %p , to designate the current process ID; can be used in .Ar name . +.It Cm minimum_uid Ns =3D Ns Ar id +Do not attempt to authenticate users with a UID below +.Ar id . +Instead, simply return; thus allowing a later module to authenticate +the user. +.It Cm minimum_gid Ns =3D Ns Ar id +As above, but specifies a minimum primary GID. .El .Ss Kerberos 5 Account Management Module The Kerberos 5 account management component Index: pam_krb5.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/lib/libpam/modules/pam_krb5/pam_krb5.c,v retrieving revision 1.23 diff -u -r1.23 pam_krb5.c --- pam_krb5.c 7 Jul 2005 14:16:38 -0000 1.23 +++ pam_krb5.c 9 Nov 2006 01:14:19 -0000 @@ -88,6 +88,8 @@ #define PAM_OPT_CCACHE "ccache" #define PAM_OPT_DEBUG "debug" #define PAM_OPT_FORWARDABLE "forwardable" +#define PAM_OPT_MINIMUM_GID "minimum_gid" +#define PAM_OPT_MINIMUM_UID "minimum_uid" #define PAM_OPT_NO_CCACHE "no_ccache" #define PAM_OPT_REUSE_CCACHE "reuse_ccache" =20 @@ -110,6 +112,9 @@ const char *user, *pass; const void *sourceuser, *service; char *principal, *princ_name, *ccache_name, luser[32], *srvdup; + const char *retstr; + uid_t minuid =3D 0; + gid_t mingid =3D 0; =20 retval =3D pam_get_user(pamh, &user, USER_PROMPT); if (retval !=3D PAM_SUCCESS) @@ -222,6 +227,39 @@ =20 PAM_LOG("Done getpwnam()"); =20 + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_UID); + if (retstr !=3D NULL) { + if ((minuid =3D (uid_t)strtoul(retstr, NULL, 10)) =3D=3D 0) { + if (errno =3D=3D ERANGE || errno =3D=3D EINVAL) { + PAM_LOG("Error in minimum_uid: %s", + strerror(errno)); + return (PAM_SERVICE_ERR); + } + } else if (minuid > UID_MAX) { + PAM_LOG("Error in minimum_uid: invalid UID"); + return (PAM_SERVICE_ERR); + } + } + + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_GID); + if (retstr !=3D NULL) { + if ((mingid =3D (gid_t)strtoul(retstr, NULL, 10)) =3D=3D 0) { + if (errno =3D=3D ERANGE || errno =3D=3D EINVAL) { + PAM_LOG("Error in minimum_gid: %s", + strerror(errno)); + return (PAM_SERVICE_ERR); + } + } else if (mingid > GID_MAX) { + PAM_LOG("Error in minimum_gid: invalid GID"); + return (PAM_SERVICE_ERR); + } + } + + if (pwd->pw_uid < minuid || pwd->pw_gid < mingid) + return (PAM_IGNORE); + + PAM_LOG("Checked uid and gid bounds"); + /* Get a TGT */ memset(&creds, 0, sizeof(krb5_creds)); krbret =3D krb5_get_init_creds_password(pam_context, &creds, princ, @@ -349,6 +387,9 @@ const void *user; void *cache_data; char *cache_name_buf =3D NULL, *p; + const char *retstr; + uid_t minuid =3D 0; + gid_t mingid =3D 0; =20 uid_t euid; gid_t egid; @@ -391,6 +432,48 @@ =20 PAM_LOG("Got euid, egid: %d %d", euid, egid); =20 + /* Get the uid. This should exist. */ + pwd =3D getpwnam(user); + if (pwd =3D=3D NULL) { + retval =3D PAM_USER_UNKNOWN; + goto cleanup3; + } + + PAM_LOG("Done getpwnam()"); + + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_UID); + if (retstr !=3D NULL) { + if ((minuid =3D (uid_t)strtoul(retstr, NULL, 10)) =3D=3D 0) { + if (errno =3D=3D ERANGE || errno =3D=3D EINVAL) { + PAM_LOG("Error in minimum_uid: %s", + strerror(errno)); + return (PAM_SERVICE_ERR); + } + } else if (minuid > UID_MAX) { + PAM_LOG("Error in minimum_uid: invalid UID"); + return (PAM_SERVICE_ERR); + } + } + + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_GID); + if (retstr !=3D NULL) { + if ((mingid =3D (gid_t)strtoul(retstr, NULL, 10)) =3D=3D 0) { + if (errno =3D=3D ERANGE || errno =3D=3D EINVAL) { + PAM_LOG("Error in minimum_gid: %s", + strerror(errno)); + return (PAM_SERVICE_ERR); + } + } else if (mingid > GID_MAX) { + PAM_LOG("Error in minimum_gid: invalid GID"); + return (PAM_SERVICE_ERR); + } + } + + if (pwd->pw_uid < minuid || pwd->pw_gid < mingid) + return (PAM_IGNORE); + + PAM_LOG("Checked uid and gid bounds"); + /* Retrieve the temporary cache */ retval =3D pam_get_data(pamh, "ccache", &cache_data); if (retval !=3D PAM_SUCCESS) { @@ -405,15 +488,6 @@ goto cleanup3; } =20 - /* Get the uid. This should exist. */ - pwd =3D getpwnam(user); - if (pwd =3D=3D NULL) { - retval =3D PAM_USER_UNKNOWN; - goto cleanup3; - } - - PAM_LOG("Done getpwnam()"); - /* Avoid following a symlink as root */ if (setegid(pwd->pw_gid)) { retval =3D PAM_SERVICE_ERR; --24zk1gE8NUlDmwG9-- --uXxzq0nDebZQVNAZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFFUoHzkmhdCGs4epoRApMEAKCo1bX8UqcweNhenc1t2jxA4ZFDrgCdGJob IUGGkJvv+trpCeT0q8beSys= =y5km -----END PGP SIGNATURE----- --uXxzq0nDebZQVNAZ-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 11:36: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 B113416A40F for ; Thu, 9 Nov 2006 11:36:26 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1D5143D66 for ; Thu, 9 Nov 2006 11:36:18 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 4F8826188 for ; Thu, 9 Nov 2006 14:36:17 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 3D8D86184 for ; Thu, 9 Nov 2006 14:36:17 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kA9BaKEL055147 for freebsd-hackers@FreeBSD.org; Thu, 9 Nov 2006 14:36:20 +0300 (MSK) (envelope-from ru) Date: Thu, 9 Nov 2006 14:36:19 +0300 From: Ruslan Ermilov To: freebsd-hackers@FreeBSD.org Message-ID: <20061109113619.GB53554@rambler-co.ru> References: <20061108212829.GA2738@charon.picobyte.net> <20061108221018.GB55351@rambler-co.ru> <20061109011843.GA4880@charon.picobyte.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5G06lTa6Jq83wMTw" Content-Disposition: inline In-Reply-To: <20061109011843.GA4880@charon.picobyte.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: Subject: Re: RFC: pam_krb5: minimum_[ug]id options X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 11:36:26 -0000 --5G06lTa6Jq83wMTw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 09, 2006 at 01:18:44AM +0000, Shaun Amott wrote: > Thanks for reviewing the patch. Here's an updated version with your > suggestions incorporated. >=20 Please don't remove me from Cc:. I prefer to receive directed replies, and I didn't ask for non-directed reply via setting the Mail-Followup-To: header like you seem to prefer. Thanks. Below are some more comments; it's still not being perfect... > Index: pam_krb5.8 > =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/lib/libpam/modules/pam_krb5/pam_krb5.8,v > retrieving revision 1.6 > diff -u -r1.6 pam_krb5.8 > --- pam_krb5.8 24 Nov 2001 23:41:32 -0000 1.6 > +++ pam_krb5.8 9 Nov 2006 01:14:18 -0000 > @@ -1,7 +1,7 @@ > .\" > .\" $Id: pam_krb5.5,v 1.5 2000/01/05 00:59:56 fcusack Exp $ > .\" $FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.8,v 1.6 2001/11/2= 4 23:41:32 dd Exp $ > -.Dd January 15, 1999 > +.Dd Thursday 09, 2006 >=20 It should be ".Dd November 9, 2006". > Index: pam_krb5.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/lib/libpam/modules/pam_krb5/pam_krb5.c,v > retrieving revision 1.23 > diff -u -r1.23 pam_krb5.c > --- pam_krb5.c 7 Jul 2005 14:16:38 -0000 1.23 > +++ pam_krb5.c 9 Nov 2006 01:14:19 -0000 > @@ -88,6 +88,8 @@ > #define PAM_OPT_CCACHE "ccache" > #define PAM_OPT_DEBUG "debug" > #define PAM_OPT_FORWARDABLE "forwardable" > +#define PAM_OPT_MINIMUM_GID "minimum_gid" > +#define PAM_OPT_MINIMUM_UID "minimum_uid" > #define PAM_OPT_NO_CCACHE "no_ccache" > #define PAM_OPT_REUSE_CCACHE "reuse_ccache" > =20 > @@ -110,6 +112,9 @@ > const char *user, *pass; > const void *sourceuser, *service; > char *principal, *princ_name, *ccache_name, luser[32], *srvdup; > + const char *retstr; > + uid_t minuid =3D 0; > + gid_t mingid =3D 0; Initializations can be done later, please see below. > =20 > retval =3D pam_get_user(pamh, &user, USER_PROMPT); > if (retval !=3D PAM_SUCCESS) > @@ -222,6 +227,39 @@ > =20 > PAM_LOG("Done getpwnam()"); > =20 > + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_UID); > + if (retstr !=3D NULL) { > + if ((minuid =3D (uid_t)strtoul(retstr, NULL, 10)) =3D=3D 0) { > + if (errno =3D=3D ERANGE || errno =3D=3D EINVAL) { >=20 Checking for ERANGE here is pointless, as when it's set, the return value will be ULONG_MAX and not zero. > + PAM_LOG("Error in minimum_uid: %s", > + strerror(errno)); > + return (PAM_SERVICE_ERR); > + } > + } else if (minuid > UID_MAX) { Err, you should be range checking an uncasted "unsigned long" value against UID_MAX because by casting it to (uid_t) this condition is always false. On 32-bit platforms where "long" is 4 bytes it's moot anyway, but on 64-bit platforms with 8-byte longs it will make a difference. I think a correct code would look something like this (assuming it's guaranteed that sizeof(uid_t) <=3D sizeof(long) ;-): : unsigned long val; :=20 : val =3D strtoul(retstr, NULL, 10); : if ((val =3D=3D ULONG_MAX && errno =3D=3D ERANGE) || : (val =3D=3D 0 && errno =3D=3D EINVAL)) : /* error1 */ : else if (val > UID_MAX) : /* error2 */ : else : uid =3D (uid_t)val; > + PAM_LOG("Error in minimum_uid: invalid UID"); > + return (PAM_SERVICE_ERR); > + } > + } It probably makes sense to initialize "minuid =3D 0" only here (in the "else" clause), rather than doing it in the declaration part. > + > + retstr =3D openpam_get_option(pamh, PAM_OPT_MINIMUM_GID); > + if (retstr !=3D NULL) { > + if ((mingid =3D (gid_t)strtoul(retstr, NULL, 10)) =3D=3D 0) { > + if (errno =3D=3D ERANGE || errno =3D=3D EINVAL) { > + PAM_LOG("Error in minimum_gid: %s", > + strerror(errno)); > + return (PAM_SERVICE_ERR); > + } > + } else if (mingid > GID_MAX) { > + PAM_LOG("Error in minimum_gid: invalid GID"); > + return (PAM_SERVICE_ERR); > + } > + } > + > + if (pwd->pw_uid < minuid || pwd->pw_gid < mingid) > + return (PAM_IGNORE); Ditto for the GID code. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --5G06lTa6Jq83wMTw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFUxKzqRfpzJluFF4RAjbnAJsHXOGInGsksXJaKi/fa/QWRiHrugCgh9O2 R3yF3Cw0nn3A32kulpgpT8E= =/ZjC -----END PGP SIGNATURE----- --5G06lTa6Jq83wMTw-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 11:58:07 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 8E93516A407; Thu, 9 Nov 2006 11:58:07 +0000 (UTC) (envelope-from flz@xbsd.org) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id B650C43D75; Thu, 9 Nov 2006 11:58:03 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from smtp.xbsd.org (unknown [82.233.2.192]) by smtp5-g19.free.fr (Postfix) with ESMTP id E76CE27B58; Thu, 9 Nov 2006 12:58:02 +0100 (CET) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id 3447211585; Thu, 9 Nov 2006 12:58:02 +0100 (CET) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12724-05; Thu, 9 Nov 2006 12:57:33 +0100 (CET) Received: from [192.168.99.200] (guest35.usr.dsi.unimi.it [159.149.159.235]) by smtp.xbsd.org (Postfix) with ESMTP id C227711415; Thu, 9 Nov 2006 12:57:32 +0100 (CET) In-Reply-To: <1162993001.4305.37.camel@massimo.datacode.it> References: <1162993001.4305.37.camel@massimo.datacode.it> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Florent Thoumie Date: Thu, 9 Nov 2006 11:57:28 +0000 To: Massimo Lusetti X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: amavisd-new at xbsd.org Cc: hackers@freebsd.org, net@freebsd.org Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 11:58:07 -0000 On Nov 8, 2006, at 1:36 PM, Massimo Lusetti wrote: > Hi all, > I'm pleased to tell you i got the latest wpi driver from Damien > Bergamini to work properly on a latest -stable on an Acer laptop. Nice work! > The driver is available here: > http://www.datacode.it/wpi-freebsd/wpi-freebsd.tgz > If anyone from FreeBSD team or else is willing to put it on a host > with > more bandwidth it's more then welcome. I've mirrored it at http://people.freebsd.org/~flz/local/wpi/wpi- freebsd-20061109.tgz. -- Florent Thoumie flz@FreeBSD.org FreeBSD Committer From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 12:50:57 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53B0516A40F for ; Thu, 9 Nov 2006 12:50:57 +0000 (UTC) (envelope-from vini@fugspbr.org) Received: from customer-domains.icp-qv1-irony9.iinet.net.au (customer-domains.icp-qv1-irony9.iinet.net.au [203.59.1.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 10F6F43D5C for ; Thu, 9 Nov 2006 12:50:54 +0000 (GMT) (envelope-from vini@fugspbr.org) Received: from 203-217-60-199.dyn.chime.net.au (HELO [192.168.192.3]) ([203.217.60.199]) by customer-domains.icp-qv1-irony9.iinet.net.au with ESMTP; 09 Nov 2006 20:50:49 +0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAMayUkXL2TzHdGdsb2JhbAANjDwB X-IronPort-AV: i="4.09,405,1157299200"; d="scan'208"; a="57107207:sNHT1266726064" Message-ID: <455324F2.9090603@fugspbr.org> Date: Thu, 09 Nov 2006 23:54:10 +1100 From: Vini Engel User-Agent: Thunderbird 1.5.0.5 (X11/20060808) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Hardening FreeBSD, does anyone have any documentation that may help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 12:50:57 -0000 Hi guys, This may not seem to be the best place to ask for this but as this is supposed to be a list for high level discussions I am assuming that some people have must know how to harden FreeBSD and/or may have articles and other docs that can be shared. We have a set of simple policies that are used to harden FreeBSD machines but I would like make it better and also would like to see how people do it out there so that I can pick the ideas that we find interesting/useful for us here and improve our hardening skills. Our machines range from dns servers to mail servers and a few router/firewalls. Some of them don't have to have anything special but some others have to comply with the policy of the highly protected networks that they live in, hence the reason why I want to improve my hardening skills. Any info will be greatly appreciated! Regards, Vini From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 12:41: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 96B5E16A512 for ; Thu, 9 Nov 2006 12:41:21 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3763443D53 for ; Thu, 9 Nov 2006 12:41:20 +0000 (GMT) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 77F8C1CE94; Thu, 9 Nov 2006 13:41:19 +0100 (CET) Date: Thu, 9 Nov 2006 13:41:19 +0100 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20061109124119.GB16100@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-Mailman-Approved-At: Thu, 09 Nov 2006 13:45:05 +0000 Subject: [Patch] sys/kern/kern_descrip.c: remove double limit check in fcntl() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 12:41:21 -0000 --gatW/ieO32f1wygP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I'm working on a project at school to develop a multimedia system (a la Windows Media Center) based on FreeBSD. I was looking at some code in sys/kern/kern_descrip.c to figure out how the fcntl() with F_DUPFD and dup() differ. I discovered that kern_fcntl() contains some redundant code. Right before calling do_dup(), it locks the process and checks that the minimal file descriptor is lower than the limit for the process. The do_dup() call does exactly the same check almost at the beginning. This causes the fcntl() call to call PROC_LOCK() once too much. The patch below prevents this by performing this check by do_dup(). It will prevent fcntl() from PROC_LOCK()'ing twice. It also fixes the return value of fcntl(). The manual page states that it should return EMFILE when it exceeds its limit, though the actual code sets EINVAL. %%% --- kern_descrip.c Thu Nov 9 13:23:40 2006 +++ kern_descrip.c Thu Nov 9 13:32:28 2006 @@ -355,7 +355,6 @@ struct proc *p; char *pop; struct vnode *vp; - u_int newmin; int error, flg, tmp; int giant_locked; =20 @@ -393,16 +392,7 @@ case F_DUPFD: /* mtx_assert(&Giant, MA_NOTOWNED); */ FILEDESC_UNLOCK(fdp); - newmin =3D arg; - PROC_LOCK(p); - if (newmin >=3D lim_cur(p, RLIMIT_NOFILE) || - newmin >=3D maxfilesperproc) { - PROC_UNLOCK(p); - error =3D EINVAL; - break; - } - PROC_UNLOCK(p); - error =3D do_dup(td, DUP_VARIABLE, fd, newmin, td->td_retval); + error =3D do_dup(td, DUP_VARIABLE, fd, arg, td->td_retval); break; =20 case F_GETFD: %%% --=20 Ed Schouten WWW: http://g-rave.nl/ --gatW/ieO32f1wygP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFUyHv52SDGA2eCwURAmHFAJwPccsflvlDh7pQhIIUP+J4Qj6A9gCeMH0J QGPZX0iudeCpI9i6Y2K1cN0= =Z0Tk -----END PGP SIGNATURE----- --gatW/ieO32f1wygP-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 13:02: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 68DA916A494 for ; Thu, 9 Nov 2006 13:02:10 +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 BD26043D5A for ; Thu, 9 Nov 2006 13:02:09 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (orgfel@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kA9D22pK090748; Thu, 9 Nov 2006 14:02:07 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kA9D22BD090747; Thu, 9 Nov 2006 14:02:02 +0100 (CET) (envelope-from olli) Date: Thu, 9 Nov 2006 14:02:02 +0100 (CET) Message-Id: <200611091302.kA9D22BD090747@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, vini@fugspbr.org In-Reply-To: <455324F2.9090603@fugspbr.org> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 09 Nov 2006 14:02:07 +0100 (CET) X-Mailman-Approved-At: Thu, 09 Nov 2006 13:45:15 +0000 Cc: Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 13:02:10 -0000 Vini Engel wrote: > This may not seem to be the best place to ask for this but as this is > supposed to be a list for high level discussions I am assuming that some > people have must know how to harden FreeBSD and/or may have articles and > other docs that can be shared. A good place to start is the security(7) manual page, and the security-related sections in the FreeBSD Handbook. Of course, pretty much any generic book on UNIX security applies to FreeBSD, too. 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. "UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things." -- Doug Gwyn From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 16:30: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 6A35A16A4E6 for ; Thu, 9 Nov 2006 16:30:51 +0000 (UTC) (envelope-from thinker@branda.to) Received: from msr36.hinet.net (msr36.hinet.net [168.95.4.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9EE443D8E for ; Thu, 9 Nov 2006 16:30:45 +0000 (GMT) (envelope-from thinker@branda.to) Received: from [192.168.1.39] (220-139-81-35.dynamic.hinet.net [220.139.81.35]) by msr36.hinet.net (8.9.3/8.9.3) with ESMTP id AAA01395 for ; Fri, 10 Nov 2006 00:30:43 +0800 (CST) Message-ID: <4553576D.6020701@branda.to> Date: Fri, 10 Nov 2006 00:29:33 +0800 From: Thinker User-Agent: Thunderbird 1.5.0.7 (X11/20061002) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: multipart/mixed; boundary="------------010104090004020402090007" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: USB Video class driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 16:30:52 -0000 This is a multi-part message in MIME format. --------------010104090004020402090007 Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: 8bit Hi, I am interest to know if FreeBSD has a USB Video Class driver project. I had seem a news from Creative which announce a new webcam following USB Video Class. It is time to start a Video Class driver for FreeBSD. -- Thinker Li (李圭烽) Mobile: 0968776647 E-Mail: thinker@branda.to thinker.li@gmail.com --------------010104090004020402090007-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 17:25: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 A892316A599; Thu, 9 Nov 2006 17:25:36 +0000 (UTC) (envelope-from shaun@FreeBSD.org) Received: from dione.picobyte.net (host-212-158-207-124.bulldogdsl.com [212.158.207.124]) by mx1.FreeBSD.org (Postfix) with SMTP id 6855D43D6D; Thu, 9 Nov 2006 17:25:35 +0000 (GMT) (envelope-from shaun@FreeBSD.org) Received: from charon.picobyte.net (charon.picobyte.net [IPv6:2001:4bd0:201e::fe03]) by dione.picobyte.net (Postfix) with ESMTP; Thu, 9 Nov 2006 17:25:33 +0000 (GMT) Date: Thu, 9 Nov 2006 17:25:33 +0000 From: Shaun Amott To: Ruslan Ermilov Message-ID: <20061109172532.GA1896@charon.picobyte.net> References: <20061108212829.GA2738@charon.picobyte.net> <20061108221018.GB55351@rambler-co.ru> <20061109011843.GA4880@charon.picobyte.net> <20061109113619.GB53554@rambler-co.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <20061109113619.GB53554@rambler-co.ru> User-Agent: Mutt/1.5.11 (FreeBSD i386) Cc: freebsd-hackers@FreeBSD.org Subject: Re: RFC: pam_krb5: minimum_[ug]id options X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 17:25:36 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 09, 2006 at 02:36:19PM +0300, Ruslan Ermilov wrote: > On Thu, Nov 09, 2006 at 01:18:44AM +0000, Shaun Amott wrote: > > Thanks for reviewing the patch. Here's an updated version with your > > suggestions incorporated. > >=20 > Please don't remove me from Cc:. I prefer to receive directed > replies, and I didn't ask for non-directed reply via setting the > Mail-Followup-To: header like you seem to prefer. Thanks. Actually, I prefer to receive two copies of the message too. It seems mutt defaults to adding the header... but somewhat inconsistently. Even so, being omitted from the Cc: is such a rare event that I assumed you also didn't want to be Cc'ed. > > diff -u -r1.6 pam_krb5.8 > > --- pam_krb5.8 24 Nov 2001 23:41:32 -0000 1.6 > > +++ pam_krb5.8 9 Nov 2006 01:14:18 -0000 > > @@ -1,7 +1,7 @@ > > .\" > > .\" $Id: pam_krb5.5,v 1.5 2000/01/05 00:59:56 fcusack Exp $ > > .\" $FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.8,v 1.6 2001/11= /24 23:41:32 dd Exp $ > > -.Dd January 15, 1999 > > +.Dd Thursday 09, 2006 > >=20 > It should be ".Dd November 9, 2006". Thanks again for your review... and apologies for such a careless patch. I've submitted a PR with an updated version. --=20 Shaun Amott // PGP: 0x6B387A9A "A foolish consistency is the hobgoblin of little minds." - Ralph Waldo Emerson --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFFU2SMkmhdCGs4epoRAsvKAKDghjkq+FUsqLrDIx5eE2gm3w2NJgCfbQep TBFXG4i0QIAUsqfpcyIGmCU= =ej0Z -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 19:03: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 F1AD716A403 for ; Thu, 9 Nov 2006 19:03:47 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.swip.net [212.247.155.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id F406E43D6D for ; Thu, 9 Nov 2006 19:03:46 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: eTj37GNIcvkAyZK6uNkuvQ== X-Cloudmark-Score: 0.000000 [] Received: from [193.217.133.152] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe11.swip.net (CommuniGate Pro SMTP 5.0.12) with ESMTPA id 153427987; Thu, 09 Nov 2006 20:03:45 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Thu, 9 Nov 2006 20:03:24 +0100 User-Agent: KMail/1.7 References: <4553576D.6020701@branda.to> In-Reply-To: <4553576D.6020701@branda.to> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611092003.25068.hselasky@c2i.net> Cc: Thinker Subject: Re: USB Video class driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 19:03:48 -0000 On Thursday 09 November 2006 17:29, Thinker wrote: > Hi, > > I am interest to know if FreeBSD has a USB Video Class driver project. > I had seem a news from Creative which announce a new webcam following > USB Video Class. It is time to start a Video Class driver for FreeBSD. Hi, No, FreeBSD does not have a video class driver. But there is a USB mailing list for FreeBSD: freebsd-usb@freebsd.org If you want to develop a Video Class driver, you might want to have a look at my new USB driver for FreeBSD: http://www.turbocat.net/~hselasky/usb4bsd If you install anything, install the SVN version. --HPS From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 19:34: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 89DBD16A4AB for ; Thu, 9 Nov 2006 19:34:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD9D943D7C for ; Thu, 9 Nov 2006 19:33:44 +0000 (GMT) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 92A051CEB3; Thu, 9 Nov 2006 20:33:42 +0100 (CET) Date: Thu, 9 Nov 2006 20:33:42 +0100 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20061109193342.GC16100@hoeg.nl> References: <20061109124119.GB16100@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y5rl02BVI9TCfPar" Content-Disposition: inline In-Reply-To: <20061109124119.GB16100@hoeg.nl> User-Agent: Mutt/1.5.13 (2006-08-11) X-Mailman-Approved-At: Thu, 09 Nov 2006 20:02:54 +0000 Subject: Re: [Patch] sys/kern/kern_descrip.c: remove double limit check in fcntl() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 19:34:10 -0000 --Y5rl02BVI9TCfPar Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ed Schouten wrote: > The patch below prevents this by performing this check by do_dup(). It > will prevent fcntl() from PROC_LOCK()'ing twice. It also fixes the > return value of fcntl(). The manual page states that it should return > EMFILE when it exceeds its limit, though the actual code sets EINVAL. Woops - It looks like I wasn't awake when I was reading the fcntl() manual page. fcntl() should return EINVAL when the minimum value is higher than the limit and EMFILE when it can't find a free descriptor in the range from the minimum value to the maximum. dup() generalizes this to EMFILE. It cannot return EINVAL. I decided to change the patch that do_dup() can return EINVAL for the fcntl() scenario and that the dup()/dup2() system calls readjust the errno right before returning. Please use the patch below. %%% --- src/sys/kern/kern_descrip.c Thu Nov 9 20:18:41 2006 +++ src/sys/kern/kern_descrip.c Thu Nov 9 20:26:25 2006 @@ -283,8 +283,14 @@ dup2(struct thread *td, struct dup2_args *uap) { =20 - return (do_dup(td, DUP_FIXED, (int)uap->from, (int)uap->to, - td->td_retval)); + int error; + + error =3D do_dup(td, DUP_FIXED, (int)uap->from, (int)uap->to, + td->td_retval); + /* dup2() should only return EMFILE when exceeding limits */ + if (error =3D=3D EINVAL) + error =3D EMFILE; + return (error); } =20 /* @@ -302,8 +308,13 @@ int dup(struct thread *td, struct dup_args *uap) { + int error; =20 - return (do_dup(td, DUP_VARIABLE, (int)uap->fd, 0, td->td_retval)); + error =3D do_dup(td, DUP_VARIABLE, (int)uap->fd, 0, td->td_retval); + /* dup() should only return EMFILE when exceeding limits */ + if (error =3D=3D EINVAL) + error =3D EMFILE; + return (error); } =20 /* @@ -358,7 +369,6 @@ struct proc *p; char *pop; struct vnode *vp; - u_int newmin; int error, flg, tmp; int giant_locked; =20 @@ -396,16 +406,7 @@ case F_DUPFD: /* mtx_assert(&Giant, MA_NOTOWNED); */ FILEDESC_UNLOCK(fdp); - newmin =3D arg; - PROC_LOCK(p); - if (newmin >=3D lim_cur(p, RLIMIT_NOFILE) || - newmin >=3D maxfilesperproc) { - PROC_UNLOCK(p); - error =3D EINVAL; - break; - } - PROC_UNLOCK(p); - error =3D do_dup(td, DUP_VARIABLE, fd, newmin, td->td_retval); + error =3D do_dup(td, DUP_VARIABLE, fd, arg, td->td_retval); break; =20 case F_GETFD: @@ -629,7 +630,7 @@ maxfd =3D min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc); PROC_UNLOCK(p); if (new >=3D maxfd) - return (EMFILE); + return (EINVAL); =20 FILEDESC_LOCK(fdp); if (old >=3D fdp->fd_nfiles || fdp->fd_ofiles[old] =3D=3D NULL) { %%% --=20 Ed Schouten WWW: http://g-rave.nl/ --Y5rl02BVI9TCfPar Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFU4KW52SDGA2eCwURAmJgAJ9UpJDaGjCsgHLkzrz6rApKS1PplwCfaqNA trhr/xIwPaVAZE2BydCP9BE= =NEMo -----END PGP SIGNATURE----- --Y5rl02BVI9TCfPar-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 9 21:39:40 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 C116316A4CA; Thu, 9 Nov 2006 21:39:40 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.t-hosting.hu (server.t-hosting.hu [217.20.133.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B39D43D99; Thu, 9 Nov 2006 21:39:23 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by server.t-hosting.hu (Postfix) with ESMTP id 493449A1859; Thu, 9 Nov 2006 22:39:22 +0100 (CET) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.t-hosting.hu ([127.0.0.1]) by localhost (server.t-hosting.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8WXBRDbsVLY2; Thu, 9 Nov 2006 22:39:17 +0100 (CET) Received: from [192.168.2.186] (catv-50635cb6.catv.broadband.hu [80.99.92.182]) by server.t-hosting.hu (Postfix) with ESMTP id ED9C09A1856; Thu, 9 Nov 2006 22:39:16 +0100 (CET) Message-ID: <4553A000.7070407@FreeBSD.org> Date: Thu, 09 Nov 2006 22:39:12 +0100 From: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Florent Thoumie References: <1162993001.4305.37.camel@massimo.datacode.it> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, Massimo Lusetti , net@freebsd.org Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Nov 2006 21:39:41 -0000 Florent Thoumie wrote: > On Nov 8, 2006, at 1:36 PM, Massimo Lusetti wrote: > >> Hi all, >> I'm pleased to tell you i got the latest wpi driver from Damien >> Bergamini to work properly on a latest -stable on an Acer laptop. > > Nice work! Unfortunately, it seems that this is still that unfinished driver from Damien, that circulates on the net everywhere, but it only works for some lucky people. As for me, I get an error message when loading the module, that it could not allocate resources. -- Cheers, Gabor From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 09:24: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 A560816A412 for ; Fri, 10 Nov 2006 09:24:22 +0000 (UTC) (envelope-from chinhngt@sectorb.msk.ru) Received: from hq.sectorb.msk.ru (petaflop.b.gz.ru [194.88.210.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AADC43D4C for ; Fri, 10 Nov 2006 09:24:19 +0000 (GMT) (envelope-from chinhngt@sectorb.msk.ru) Received: from it.local (it.local [172.16.20.8]) by hq.sectorb.msk.ru (Postfix) with ESMTP id 0E00F32C5 for ; Fri, 10 Nov 2006 12:24:15 +0300 (MSK) Date: Fri, 10 Nov 2006 12:24:13 +0300 (MSK) From: Nguyen Tam Chinh X-X-Sender: chinhngt@it.hackers To: freebsd-hackers@freebsd.org Message-ID: <20061110121247.E953@it.hackers> X-Operating-System: FreeBSD 6-STABLE Keywords: 216091683 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Value range of IPC semaphores X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 09:24:22 -0000 Hello, I'm tuning some IPC semaphores parameters in 6.1-STABLE for a busy PostGreSQL server (8.1.4). I still now can not find the value range (exactly the maximum value) and its dependencies on other system wide parameters of these parameters: kern.ipc.semmni, kern.ipc.semmns, kern.ipc.shmseg and kern.ipc.shmmni. The server is a dual Xeon 3.6 with 8Gb of RAM. Please advice. PS. The last change for me is going to read the source code, but I hope that someone in this mailing-list would tell me where to read or would give a good answer. ----- With best regards, | The Power to Serve Nguyen Tam Chinh | http://www.FreeBSD.org Loc: sp.cs.msu.su | From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 11:12:51 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 8BCB716A416; Fri, 10 Nov 2006 11:12:51 +0000 (UTC) (envelope-from flz@xbsd.org) Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6A2C43D62; Fri, 10 Nov 2006 11:12:42 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from smtp.xbsd.org (unknown [82.233.2.192]) by smtp1-g19.free.fr (Postfix) with ESMTP id C177668A0F; Fri, 10 Nov 2006 12:12:41 +0100 (CET) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id 4614D114F6; Fri, 10 Nov 2006 12:12:41 +0100 (CET) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30380-07; Fri, 10 Nov 2006 12:12:19 +0100 (CET) Received: from [10.0.0.142] (unknown [81.74.42.155]) by smtp.xbsd.org (Postfix) with ESMTP id 1BC9A11415; Fri, 10 Nov 2006 12:12:17 +0100 (CET) In-Reply-To: <4553A000.7070407@FreeBSD.org> References: <1162993001.4305.37.camel@massimo.datacode.it> <4553A000.7070407@FreeBSD.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Florent Thoumie Date: Fri, 10 Nov 2006 11:12:09 +0000 To: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: amavisd-new at xbsd.org Cc: Massimo Lusetti , hackers@freebsd.org, net@freebsd.org Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 11:12:51 -0000 On Nov 9, 2006, at 9:39 PM, G=E1bor K=F6vesd=E1n wrote: > Florent Thoumie wrote: >> On Nov 8, 2006, at 1:36 PM, Massimo Lusetti wrote: >> >>> Hi all, >>> I'm pleased to tell you i got the latest wpi driver from Damien >>> Bergamini to work properly on a latest -stable on an Acer laptop. >> >> Nice work! > Unfortunately, it seems that this is still that unfinished driver =20 > from Damien, that circulates on the net everywhere, but it only =20 > works for some lucky people. As for me, I get an error message when =20= > loading the module, that it could not allocate resources. Haven't taken my 3945 "powered" laptop in Milan, so I haven't had the =20= chance to try it yet. Is it the same as the one we can find in =20 deischen public space on freefall? --=20 Florent Thoumie flz@FreeBSD.org FreeBSD Committer From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 12:13:13 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B59AA16A417; Fri, 10 Nov 2006 12:13:13 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.t-hosting.hu (server.t-hosting.hu [217.20.133.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id D652B43D58; Fri, 10 Nov 2006 12:13:12 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by server.t-hosting.hu (Postfix) with ESMTP id 456059A195A; Fri, 10 Nov 2006 13:13:11 +0100 (CET) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.t-hosting.hu ([127.0.0.1]) by localhost (server.t-hosting.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5Z17vAa+4N64; Fri, 10 Nov 2006 13:13:05 +0100 (CET) Received: from [192.168.2.186] (catv-50635cb6.catv.broadband.hu [80.99.92.182]) by server.t-hosting.hu (Postfix) with ESMTP id 345D79A1924; Fri, 10 Nov 2006 13:13:05 +0100 (CET) Message-ID: <45546CC7.5070302@FreeBSD.org> Date: Fri, 10 Nov 2006 13:12:55 +0100 From: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Florent Thoumie References: <1162993001.4305.37.camel@massimo.datacode.it> <4553A000.7070407@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Massimo Lusetti , hackers@freebsd.org, net@freebsd.org Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 12:13:13 -0000 Florent Thoumie wrote: > > On Nov 9, 2006, at 9:39 PM, G墎or K饘esd嫕 wrote: > >> Florent Thoumie wrote: >>> On Nov 8, 2006, at 1:36 PM, Massimo Lusetti wrote: >>> >>>> Hi all, >>>> I'm pleased to tell you i got the latest wpi driver from Damien >>>> Bergamini to work properly on a latest -stable on an Acer laptop. >>> >>> Nice work! >> Unfortunately, it seems that this is still that unfinished driver >> from Damien, that circulates on the net everywhere, but it only works >> for some lucky people. As for me, I get an error message when loading >> the module, that it could not allocate resources. > > Haven't taken my 3945 "powered" laptop in Milan, so I haven't had the > chance to try it yet. Is it the same as the one we can find in > deischen public space on freefall? > > Well, not actually. I compared them, and this one is different, but unfortunately still produces the same error for me on a Fujitsu-Siemens Amilo Pi 1556 01. -- Cheers, Gabor From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 09:37:55 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 D2C9C16A416 for ; Fri, 10 Nov 2006 09:37:55 +0000 (UTC) (envelope-from massimo@cedoc.mo.it) Received: from insomma.datacode.it (ip-174-86.sn2.eutelia.it [83.211.174.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEA5A43D53 for ; Fri, 10 Nov 2006 09:37:53 +0000 (GMT) (envelope-from massimo@cedoc.mo.it) Received: from localhost (localhost.datacode.it [127.0.0.1]) by insomma.datacode.it (Postfix) with SMTP id E16A02C90C for ; Fri, 10 Nov 2006 10:37:49 +0100 (CET) Received: from insomma.datacode.it (localhost.datacode.it [127.0.0.1]) by insomma.datacode.it (Postfix) with ESMTP id 31E0E2C90A; Fri, 10 Nov 2006 10:37:48 +0100 (CET) Received: from massimo.datacode.it (massimo.datacode.it [192.168.1.13]) by insomma.datacode.it (Postfix) with ESMTP id 7D1FD2C906; Fri, 10 Nov 2006 10:37:47 +0100 (CET) From: Massimo Lusetti To: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= In-Reply-To: <4553A000.7070407@FreeBSD.org> References: <1162993001.4305.37.camel@massimo.datacode.it> <4553A000.7070407@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Organization: CEDOC - Modena Date: Fri, 10 Nov 2006 10:37:48 +0100 Message-Id: <1163151468.4328.6.camel@massimo.datacode.it> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Fri, 10 Nov 2006 12:53:28 +0000 Cc: net@freebsd.org, hackers@freebsd.org, Florent Thoumie Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 09:37:55 -0000 On Thu, 2006-11-09 at 22:39 +0100, G獺bor K繹vesd獺n wrote: > Unfortunately, it seems that this is still that unfinished driver from > Damien, that circulates on the net everywhere, but it only works for > some lucky people. As for me, I get an error message when loading the > module, that it could not allocate resources. I don't think it's "that unfinished driver from Damien" classify it correctly, as stated it's an unsupported version so case where it will not work are expected. Feel free to improve it or wait when some FreeBSD developer will port and maintain it. Thanks Florent for mirroring. -- Massimo.run(); From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 13:59: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 8541516A492; Fri, 10 Nov 2006 13:59:37 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B4F843D45; Fri, 10 Nov 2006 13:59:36 +0000 (GMT) (envelope-from max@love2party.net) Received: from [81.74.42.155] (helo=[10.0.0.243]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1GiWul3Y9j-0004Xc; Fri, 10 Nov 2006 14:59:31 +0100 From: Max Laier To: freebsd-hackers@freebsd.org Date: Fri, 10 Nov 2006 14:59:19 +0100 User-Agent: KMail/1.9.4 References: <1162993001.4305.37.camel@massimo.datacode.it> <4553A000.7070407@FreeBSD.org> <1163151468.4328.6.camel@massimo.datacode.it> In-Reply-To: <1163151468.4328.6.camel@massimo.datacode.it> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200611101459.20117.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-net@freebsd.org, Massimo Lusetti , =?utf-8?q?G=C3=A1bor_K=C3=B6vesd=C3=A1n?= , Florent Thoumie Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 13:59:37 -0000 On Friday 10 November 2006 10:37, Massimo Lusetti wrote: > On Thu, 2006-11-09 at 22:39 +0100, G=C3=A1bor K=C3=B6vesd=C3=A1n wrote: > > Unfortunately, it seems that this is still that unfinished driver from > > Damien, that circulates on the net everywhere, but it only works for > > some lucky people. As for me, I get an error message when loading the > > module, that it could not allocate resources. > > I don't think it's "that unfinished driver from Damien" classify it > correctly, as stated it's an unsupported version so case where it will > not work are expected. Feel free to improve it or wait when some FreeBSD > developer will port and maintain it. I agree. On top of that, a more detailed error report would be preferable.= =20 =46rom what you put above, it seems that you are out of sufficient continou= s=20 memory at the point where you enable the hardware. Try enabling it before= =20 bringing up X11 etc. > Thanks Florent for mirroring. =2D- Max From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 15:47: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 3A85E16A47E for ; Fri, 10 Nov 2006 15:47:24 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.238]) by mx1.FreeBSD.org (Postfix) with ESMTP id F03C243D46 for ; Fri, 10 Nov 2006 15:47:22 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so466135wxc for ; Fri, 10 Nov 2006 07:47:22 -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=SIkV+vHjmcbECYJMYmL72jXFHl20ZgsEmQdVBJ1mpUnDMccxSmfkjc4l6ww0PYDnJEE6WF4UEsjC2EtDHy6MtaJICds1+t8zYczB7yyRZEBkWMdzbuz3eKUvk8r2wU7Bt1lA1jhJwRquQm7UQCqXDFI6N9gVN1R4HGPHc3XfVnQ= Received: by 10.70.74.6 with SMTP id w6mr3274029wxa.1163173641874; Fri, 10 Nov 2006 07:47:21 -0800 (PST) Received: by 10.70.12.2 with HTTP; Fri, 10 Nov 2006 07:47:21 -0800 (PST) Message-ID: <3bbf2fe10611100747l386a624cpd72d04b62a0681e7@mail.gmail.com> Date: Fri, 10 Nov 2006 16:47:21 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Max Laier" In-Reply-To: <200611101459.20117.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <1162993001.4305.37.camel@massimo.datacode.it> <4553A000.7070407@FreeBSD.org> <1163151468.4328.6.camel@massimo.datacode.it> <200611101459.20117.max@love2party.net> X-Google-Sender-Auth: 1f08d947640195d3 Cc: freebsd-hackers@freebsd.org, Massimo Lusetti , Florent Thoumie , =?UTF-8?Q?G=C3=A1bor_K=C3=B6vesd=C3=A1n?= , freebsd-net@freebsd.org Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 15:47:24 -0000 MjAwNi8xMS8xMCwgTWF4IExhaWVyIDxtYXhAbG92ZTJwYXJ0eS5uZXQ+Ogo+IE9uIEZyaWRheSAx MCBOb3ZlbWJlciAyMDA2IDEwOjM3LCBNYXNzaW1vIEx1c2V0dGkgd3JvdGU6Cj4gPiBPbiBUaHUs IDIwMDYtMTEtMDkgYXQgMjI6MzkgKzAxMDAsIEfDoWJvciBLw7Z2ZXNkw6FuIHdyb3RlOgo+ID4g PiBVbmZvcnR1bmF0ZWx5LCBpdCBzZWVtcyB0aGF0IHRoaXMgaXMgc3RpbGwgdGhhdCB1bmZpbmlz aGVkIGRyaXZlciBmcm9tCj4gPiA+IER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yBoYXZpbmcKYXQgdGhlIG1vbWVudCwgc29tZSB0aW1lIGFnbyBJIHN0YXJ0ZWQg bG9va2luZyBhdCB0aGUgY29kZSBhbmQgb25lCmRpZmZlcmVuY2UgYmV0d2VlbiBpcGkgYW5kIHdw aSBpcyBpbiByaW5ncyB0aGV5IHVzZSAoYW5kIHRoZWlyCmFsbG9jYXRpb24pIGFuZCBhZ2FpbiBp biB0aGUgdXNhZ2Ugb2YgYSBzaGFyZWQgRE1BIG1lbW9yeSBwYWdlIGJldHdlZW4KdGhlIGhvc3Qg YW5kIHRoZSBOSUMuCgpNYXliZSB0aGlzIGlzIG5vdCBkb25lIGluIHRoZSByaWdodCB3YXkgaW4g dGhlIERhbWllbidzIGRyaXZlciBhbmQKdGhpcyBpcyBiZWFjYXVzZSBnYWJvciB3b3VsZCBoYXZp bmcgYWxsb2NhdGlvbiBwcm9ibGVtcy4KCkF0dGlsaW8KClBTOiBJIHdpbGwgdHJ5IHRvIGxvb2sg YXQgdGhlIGNvZGUgcG9zdGVkIGFib3ZlIEFTQVAuLi4KCgotLSAKUGVhY2UgY2FuIG9ubHkgYmUg YWNoaWV2ZWQgYnkgdW5kZXJzdGFuZGluZyAtIEEuIEVpbnN0ZWluCg== From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 15:51: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 52C0E16A407 for ; Fri, 10 Nov 2006 15:51:41 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2116A43D72 for ; Fri, 10 Nov 2006 15:51:35 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so467044wxc for ; Fri, 10 Nov 2006 07:51:35 -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=li1w6KGL0ckaDs6JfopwaauP+n5mXu/5pLhsFzMrbcKLIxN83eG1htc5IORgnFNRE6fgmzB6Va9nfNwSCwQQ+CcBj2bUp1T9NYOW82qiN31E8fXdPDVZkDzJEQ3ZTHdOrrWwA0DhyMbCxaHqvMOtJ3d/p5g1ZeoAOfJh/LYc95I= Received: by 10.70.33.10 with SMTP id g10mr3290736wxg.1163173895032; Fri, 10 Nov 2006 07:51:35 -0800 (PST) Received: by 10.70.12.2 with HTTP; Fri, 10 Nov 2006 07:51:34 -0800 (PST) Message-ID: <3bbf2fe10611100751i77e9c8afle0aed1e794062f4f@mail.gmail.com> Date: Fri, 10 Nov 2006 16:51:34 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Max Laier" In-Reply-To: <3bbf2fe10611100747l386a624cpd72d04b62a0681e7@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <1162993001.4305.37.camel@massimo.datacode.it> <4553A000.7070407@FreeBSD.org> <1163151468.4328.6.camel@massimo.datacode.it> <200611101459.20117.max@love2party.net> <3bbf2fe10611100747l386a624cpd72d04b62a0681e7@mail.gmail.com> X-Google-Sender-Auth: 93c68a4113db3a88 Cc: freebsd-hackers@freebsd.org, Massimo Lusetti , Florent Thoumie , =?UTF-8?Q?G=C3=A1bor_K=C3=B6vesd=C3=A1n?= , freebsd-net@freebsd.org Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 15:51:41 -0000 MjAwNi8xMS8xMCwgQXR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ID4gSSBh Z3JlZS4gIE9uIHRvcCBvZiB0aGF0LCBhIG1vcmUgZGV0YWlsZWQgZXJyb3IgcmVwb3J0IHdvdWxk IGJlIHByZWZlcmFibGUuCj4gPiBGcm9tIHdoYXQgeW91IHB1dCBhYm92ZSwgaXQgc2VlbXMgdGhh dCB5b3UgYXJlIG91dCBvZiBzdWZmaWNpZW50IGNvbnRpbm91cwo+ID4gbWVtb3J5IGF0IHRoZSBw b2ludCB3aGVyZSB5b3UgZW5hYmxlIHRoZSBoYXJkd2FyZS4gIFRyeSBlbmFibGluZyBpdCBiZWZv cmUKPiA+IGJyaW5naW5nIHVwIFgxMSBldGMuCj4KPiBFdmVuIGlmIEknbSBub3QgdG90YWxseSBh d2FyZSBhYm91dCB3aGF0IHByb2JsZW0gYXJlIGdhYm9yQCBpcyBoYXZpbmcKPiBhdCB0aGUgbW9t ZW50LCBzb21lIHRpbWUgYWdvIEkgc3RhcnRlZCBsb29raW5nIGF0IHRoZSBjb2RlIGFuZCBvbmUK PiBkaWZmZXJlbmNlIGJldHdlZW4gaXBpIGFuZCB3cGkgaXMgaW4gcmluZ3MgdGhleSB1c2UgKGFu ZCB0aGVpcgo+IGFsbG9jYXRpb24pIGFuZCBhZ2FpbiBpbiB0aGUgdXNhZ2Ugb2YgYSBzaGFyZWQg RE1BIG1lbW9yeSBwYWdlIGJldHdlZW4KPiB0aGUgaG9zdCBhbmQgdGhlIE5JQy4KCnMvaXBpL2l3 aS4KCkF0dGlsaW8KCgotLSAKUGVhY2UgY2FuIG9ubHkgYmUgYWNoaWV2ZWQgYnkgdW5kZXJzdGFu ZGluZyAtIEEuIEVpbnN0ZWluCg== From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 19:15: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 2A25316A61D for ; Fri, 10 Nov 2006 19:15:25 +0000 (UTC) (envelope-from josh.carroll@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 65EAB43D55 for ; Fri, 10 Nov 2006 19:15:24 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by nf-out-0910.google.com with SMTP id p77so916165nfc for ; Fri, 10 Nov 2006 11:15: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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hSp2Va3Q5mtK6GBJMsCWVynQXpe/Sl8iLzV0rZIrshkSbFoXJO7ggAHqFDz/Mlkae1QZi6MNkXey/JMjUHtzXdGDxdoz61yEGQdeO1KYYrTjzwPHJALJAbw0vbwktfM0I4DuJH96Yq2bQ3aKcdDbqwoikQfUCLHJdSaVSH592hI= Received: by 10.82.98.13 with SMTP id v13mr388112bub.1163186122813; Fri, 10 Nov 2006 11:15:22 -0800 (PST) Received: by 10.82.163.16 with HTTP; Fri, 10 Nov 2006 11:15:22 -0800 (PST) Message-ID: <8cb6106e0611101115k25df8cddu98c980481cd591f2@mail.gmail.com> Date: Fri, 10 Nov 2006 11:15:22 -0800 From: "Josh Carroll" To: freebsd-hackers@freebsd.org In-Reply-To: <8cb6106e0611071051y6cbbca1padc24ba315d4a2b3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061102094748.G75543@mignon.ki.iif.hu> <20061103024621.GB16445@kobe.laptop> <20061103024837.GB79357@lor.one-eyed-alien.net> <20061103025442.GB16543@kobe.laptop> <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> <20061104062439.GD854@turion.vk2pj.dyndns.org> <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> <20061107174151.GA51473@lor.one-eyed-alien.net> <8cb6106e0611071008y6811a79x9ba056c2be94d773@mail.gmail.com> <8cb6106e0611071051y6cbbca1padc24ba315d4a2b3@mail.gmail.com> 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: Fri, 10 Nov 2006 19:15:25 -0000 > Below is the patch using strsep instead. I also updated the > gather_inet function to print a message that a protocol is not > supported if it exists in /etc/protocols, but does not have a case in > the gather_inet function. So, anyone interested in committing this? :) Do people think this would be useful going forward? Or does anyone else have suggestions for the code? Regards, Josh From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 19:50: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 A55CE16A407 for ; Fri, 10 Nov 2006 19:50:05 +0000 (UTC) (envelope-from asmrookie@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 6A59A43D92 for ; Fri, 10 Nov 2006 19:49:54 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so517216wxc for ; Fri, 10 Nov 2006 11:49:53 -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=d2L2XuoEB63I12Dr9HfSwRkjjsCY+YerDepOAURywj87kKjuuoawz5r5SZ9k+MSrAlI55ZzL3crpWHuN6yMr67YBLq4oK/DLZiJUw1Mo027nxt3v0xp8IHQZmaGLLPFH9CwO6TkTaafP+r6HSrPNKmlJRZUbMYX96S1BoFy7C2o= Received: by 10.70.109.12 with SMTP id h12mr3677018wxc.1163188192481; Fri, 10 Nov 2006 11:49:52 -0800 (PST) Received: by 10.70.12.2 with HTTP; Fri, 10 Nov 2006 11:49:52 -0800 (PST) Message-ID: <3bbf2fe10611101149y72f29285s517f5e40a5b8f3e0@mail.gmail.com> Date: Fri, 10 Nov 2006 20:49:52 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Max Laier" In-Reply-To: <3bbf2fe10611100751i77e9c8afle0aed1e794062f4f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <1162993001.4305.37.camel@massimo.datacode.it> <4553A000.7070407@FreeBSD.org> <1163151468.4328.6.camel@massimo.datacode.it> <200611101459.20117.max@love2party.net> <3bbf2fe10611100747l386a624cpd72d04b62a0681e7@mail.gmail.com> <3bbf2fe10611100751i77e9c8afle0aed1e794062f4f@mail.gmail.com> X-Google-Sender-Auth: 0292fb96362c32b4 Cc: freebsd-hackers@freebsd.org, Massimo Lusetti , Florent Thoumie , =?UTF-8?Q?G=C3=A1bor_K=C3=B6vesd=C3=A1n?= , freebsd-net@freebsd.org Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 19:50:05 -0000 MjAwNi8xMS8xMCwgQXR0aWxpbyBSYW8gPGF0dGlsaW9AZnJlZWJzZC5vcmc+Ogo+IDIwMDYvMTEv MTAsIEF0dGlsaW8gUmFvIDxhdHRpbGlvQGZyZWVic2Qub3JnPjoKPiA+IDIwMDYvMTEvMTAsIE1h eCBMYWllciA8bWF4QGxvdmUycGFydHkubmV0PjoKPiA+ID4gT24gRnJpZGF5IDEwIE5vdmVtYmVy IDIwMDYgMTA6MzcsIE1h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IgQkFSLApzbyBzaW1wbHkgdHJ5IGFsbCA2 IHVzaW5nIFBDSVJfQkFSKG4pIHdoZXJlIG4gcmFuZ2UgaXMgMC02IHVudGlsIGl0CmRvZXMgYWxs b2NhdGUuCgpBdHRpbGlvCgpQUzogSSB3b3VsZCBsaWtlIHRoYXQgdGhlIGNvZGUgd2lsbCBiZXR0 ZXIgZm9sbG93IHN0bHllKDkpIHRvby4uLgoKLS0gClBlYWNlIGNhbiBvbmx5IGJlIGFjaGlldmVk IGJ5IHVuZGVyc3RhbmRpbmcgLSBBLiBFaW5zdGVpbgo= From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 10 20:00: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 5F84716A4C2 for ; Fri, 10 Nov 2006 20:00:45 +0000 (UTC) (envelope-from asmrookie@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 9A74D43F53 for ; Fri, 10 Nov 2006 19:57:47 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so518646wxc for ; Fri, 10 Nov 2006 11:57:45 -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=ryu8eUTa46QYMRnuMnppY7DPoA8xU9wfDu4+Er+1YtnGbWBv/HY1RVaZEw+JgABVS0djlFeIQDq24b+bD2EyLpsdPTdEgrx5K8zVOFG6IK1AosgREvqTibHoBb9DyJ+vtSnXW7ykued7T60r6ZWlDCoCG8XIqj7UbWSE0KJxQns= Received: by 10.70.90.18 with SMTP id n18mr3718138wxb.1163188664677; Fri, 10 Nov 2006 11:57:44 -0800 (PST) Received: by 10.70.12.2 with HTTP; Fri, 10 Nov 2006 11:57:44 -0800 (PST) Message-ID: <3bbf2fe10611101157p13296002ic974d45c3fe95e09@mail.gmail.com> Date: Fri, 10 Nov 2006 20:57:44 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Max Laier" In-Reply-To: <3bbf2fe10611101149y72f29285s517f5e40a5b8f3e0@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1162993001.4305.37.camel@massimo.datacode.it> <4553A000.7070407@FreeBSD.org> <1163151468.4328.6.camel@massimo.datacode.it> <200611101459.20117.max@love2party.net> <3bbf2fe10611100747l386a624cpd72d04b62a0681e7@mail.gmail.com> <3bbf2fe10611100751i77e9c8afle0aed1e794062f4f@mail.gmail.com> <3bbf2fe10611101149y72f29285s517f5e40a5b8f3e0@mail.gmail.com> X-Google-Sender-Auth: 93e8c797357ed415 Cc: freebsd-hackers@freebsd.org, Massimo Lusetti , Florent Thoumie , =?UTF-8?Q?G=C3=A1bor_K=C3=B6vesd=C3=A1n?= , freebsd-net@freebsd.org Subject: Re: New wpi driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Nov 2006 20:00:45 -0000 > First of all, WPI_PCI_BAR0 might not be defined in this way, but it > should really use PCIR_BAR() macro. > Then, probabilly, gabor's device I/O space is relative to another BAR, > so simply try all 6 using PCIR_BAR(n) where n range is 0-6 until it > does allocate. Sorry, n ranges 0-5... (as I said before 6 different address spaces). Today it seems I'm absolutely sleeping... (probabilly I'm too angry to have not parecipied at EuroBSDCon...). Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 11:01: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 9EC3916A40F for ; Sat, 11 Nov 2006 11:01:24 +0000 (UTC) (envelope-from rionda@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 7ADB443D53 for ; Sat, 11 Nov 2006 11:01:23 +0000 (GMT) (envelope-from rionda@gmail.com) Received: by nf-out-0910.google.com with SMTP id p77so1092107nfc for ; Sat, 11 Nov 2006 03:01:22 -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:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=YD6BpQY1FfClLHVfGTxwA6yV9pSlzuZn/KvxoMZyem3rDpcsXWmK1nPD8IKuBxPk8Vx34m3K2AUGsmpYalMulEgk3BJxtdTlmeIWggdndtQwtSkt0Cpw3D7odohARMZ2oCTevV4YwHcV9nMljfRa9/H36195SuW9ilULZIPz5DE= Received: by 10.82.114.3 with SMTP id m3mr419439buc.1163242880023; Sat, 11 Nov 2006 03:01:20 -0800 (PST) Received: by 10.82.148.6 with HTTP; Sat, 11 Nov 2006 03:01:19 -0800 (PST) Message-ID: Date: Sat, 11 Nov 2006 12:01:19 +0100 From: "Matteo Riondato" Sender: rionda@gmail.com To: "Free System Burned In Economy" , varie@gufi.org, freebsd-hackers@freebsd.org, developers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 06acf4df211e4f5d Cc: Subject: FreeSBIE 2.0-BETA (EW) Available! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Nov 2006 11:01:24 -0000 All, after FreeSBIE GMV and FreeSBIE LVC (2.0-PREBETA), a new ISO is available from today. This is the third of a series of four ISO images: GMV, LVC, EW, and CE, with CE being hopefully FreeSBIE 2.0. The image being release today is EW, which is FreeSBIE 2.0-BETA. The codename for this image is EW, which stands for "Eli Wallach", an actor who played in "The good, the bad and the ugly" and in "The Godfather: Part Three". Complete information about this actor at http://www.imdb.com/name/nm0908919/ . Unlike GMV and LVC, FreeSBIE 2.0-BETA is based on the RELENG_6 branch of FreeBSD as it was on 20061008. Ports are based on the RELEASE_6_2_0 branch. GMV and LVC were very appreciated and I received a lot of feedback and bug reports. I want to thank everybody for this, since seeing my work being used is what I want to get from it, apart from having fun and learning. Although all suggestion were included, FreeSBIE 2.0-BETA is not perfect yet. It's BETA and it's not supposed to be perfect. A known bug consists in the "freesbie" user not allowed to use ping(8). The error is "Operation not permitted". This problem is confirmed but I cannot find what originates it (any suggestion is much appreciated). Another problem is the date after boot: it is set to Epoch. This is still an issue in FreeSBIE-2.0-BETA but will be solved in future ISO images. If you find anything that doesn't work, point it out to me by email, using [FreeSBIE BETA] in the Subject. If you have any additional software to suggest, feel free to send me an email saying:"Hey, I'd like to see this software included". Please note that since the installed software is taken from the RELEASE_6_2_0 branch of the FreeBSD ports tree, it is possible that the latest version of the software you want to include will not be available. Remember to try FreeSBIE cheatcodes. At boot, press 2 and type "help cheatcodes" to discover what cheatcodes are and how to use them. FreeSBIE 2.0-BETA can be download from ftp://ftp2.freesbie.org/pub/FreeSBIE/2.0-BETA-EW/FreeSBIE-2.0-BETA-20061108.iso {ftp, http}://ftp.fr.freesbie.org/freesbie/2.0-BETA-EW/FreeSBIE-2.0-BETA-20061108.iso ftp://ftp8.de.freesbie.org/unix/FreeSBIE/2.0-BETA-EW/FreeSBIE-2.0-BETA-20061108.iso ftp://ftp.gr.freesbie.org/pub/FreeSBIE/2.0-BETA-EW/FreeSBIE-2.0-BETA-20061108.iso and the ISO image will be available from other mirrors of the FreeSBIE project (http://www.freesbie.org/mirrors.php) If you like BitTorrent: http://torrent.freesbie.org/FreeSBIE-2.0-BETA-20061108.iso.torrent The MD5 sum for the ISO image is: MD5 (FreeSBIE-2.0-BETA-20061108.iso) = 557394314be2b5d50a8fe9f0a843cafa A list of installed software follows. Please note that this is only the list of the "main" packages and does not include their dependencies. 915resolution sysutils/915resolution abiword editors/abiword abiword-plugins editors/abiword-plugins aircrack-ng net-mgmt/aircrack-ng aMule net-p2p/amule2 arpwatch net-mgmt/arpwatch bacula-client sysutils/bacula-client bash shells/bash bsd-airtools net-mgmt/bsd-airtools beep-media-player-esound multimedia/beep-media-player bmp-scrobbler audio/bmp-scrobbler bmp-faad2 audio/bmp-faad bmp-crossfade audio/bmp-crossfade bmp-wma audio/bmp-wma bmpx multimedia/bmpx buffer misc/buffer bvi editors/bvi cabextract archivers/cabextract cdrtools sysutils/cdrtools chillispot net-mgmt/chillispot chkrootkit security/chkrootkit clamav security/clamav conky sysutils/conky cpdup sysutils/cpdup cpuburn sysutils/cpuburn crack security/crack cups print/cups curl ftp/curl distcc devel/distcc dns-proxy-tor security/dns-proxy-tor e2fsprogs sysutils/e2fsprogs easytag-devel audio/easytag-devel ekiga net/ekiga elinks www/elinks eject sysutils/eject emacs editors/emacs etherape net-mgmt/etherape ettercap-gtk2 net-mgmt/ettercap evince graphics/evince fetchmail mail/fetchmail firefox www/firefox firewalk security/firewalk fluxbox x11-wm/fluxbox fping net/fping freeradius net/freeradius gaim net-im/gaim gdesklets deskutils/gdesklets gftp ftp/gftp gimp graphics/gimp gnuchess games/gnuchess gnumeric math/gnumeric gnupg security/gnupg gphoto2 graphics/gphoto2 gqview graphics/gqview grdesktop net/grdesktop gthumb graphics/gthumb gtkpod audio/gtkpod gv print/gv healthd sysutils/healthd hping net/hping hydra security/hydra i855vidctl sysutils/i855vidctl10 ike-scan security/ike-scan ImageMagick graphics/ImageMagick inkscape graphics/inkscape irssi irc/irssi john security/john kismet net-mgmt/kismet lighttpd www/lighttpd magicpoint misc/magicpoint mplayer multimedia/mplayer mplayer-fonts multimedia/mplayer-fonts mplayerplug-in www/mplayer-plugin mutt mail/mutt nagios net-mgmt/nagios nagios-plugins net-mgmt/nagios-plugins nano editors/nano ngrep net/ngrep nikto security/nikto nmap security/nmap nmapfe security/nmapfe ntfsprogs sysutils/ntfsprogs ntop net/ntop obexapp comms/obexapp openvpn security/openvpn outguess security/outguess pine mail/pine4 playmidi audio/playmidi privoxy www/privoxy progsreiserfs sysutils/progsreiserfs pwd_unmkdb sysutils/pwd_unmkdb p0f net-mgmt/p0f rainbowcrack security/rainbowcrack rkhunter security/rkhunter rox x11-fm/rox-filer rsync net/rsync ruby lang/ruby18 ruby18-gems devel/ruby-gems s3switch graphics/s3switch samba net/samba3 screen sysutils/screen scite-gtk2 editors/scite smartmontools sysutils/smartmontools snort security/snort sudo security/sudo thunderbird mail/thunderbird tightvnc net/tightvnc tor-devel security/tor-devel transmission-gtk2 net-p2p/transmission-gtk2 unicornscan security/unicornscan unrar archivers/unrar unzip archivers/unzip vim-gtk2 editors/vim wget ftp/wget wipe security/wipe wireshark net/wireshark wol net/wol xbindkeys x11/xbindkeys xbindkeys_config x11/xbindkeys_config xchat irc/xchat xfce x11-wm/xfce4 xfce4-battery-plugin sysutils/xfce4-battery-plugin xfce4-mixer audio/xfce4-mixer xfce4-netload-plugin sysutils/xfce4-netload-plugin xfce4-systemload-plugin sysutils/xfce4-systemload-plugin xfce4-xkb-plugin deskutils/xfce4-xkb-plugin xfsprogs sysutils/xfsprogs xorg-clients x11/xorg-clients xorg-fonts-100dpi x11-fonts/xorg-fonts-100dpi xorg-fonts-75dpi x11-fonts/xorg-fonts-75dpi xorg-fonts-encodings x11-fonts/xorg-fonts-cyrillic xorg-fonts-miscbitmaps x11-fonts/xorg-fonts-miscbitmaps xorg-fonts-truetype x11-fonts/xorg-fonts-truetype xorg-server x11-servers/xorg-server xpdf graphics/xpdf xsane graphics/xsane xscreensaver-gnome x11/xscreensaver-gnome zebra net/zebra zip archivers/zip zsh shells/zsh As said, any suggestion for other software to include is much appreciated. Side note: I'm in Milan for EuroBSDCon, so if you want to offer me a beer, I'm here. If you want to insult me..well, I'm not here. :) -- Matteo Riondato FreeBSD Committer (http://www.freebsd.org) G.U.F.I. Staff Member (http://www.gufi.org) FreeSBIE Developer (http://www.freesbie.org) From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 13:19: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 7721A16A403 for ; Sat, 11 Nov 2006 13:19:42 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23FF843D5D for ; Sat, 11 Nov 2006 13:19:40 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (host155-42.pool8174.interbusiness.it [81.74.42.155] (may be forged)) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kABDJICM015293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Nov 2006 15:19:23 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kABDJDVX002166; Sat, 11 Nov 2006 14:19:13 +0100 (CET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kABDJC2M002165; Sat, 11 Nov 2006 14:19:12 +0100 (CET) (envelope-from keramida@freebsd.org) Date: Sat, 11 Nov 2006 14:19:12 +0100 From: Giorgos Keramidas To: josh.carroll@psualum.com Message-ID: <20061111131912.GB1972@kobe.laptop> References: <20061103024621.GB16445@kobe.laptop> <20061103024837.GB79357@lor.one-eyed-alien.net> <20061103025442.GB16543@kobe.laptop> <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> <20061104062439.GD854@turion.vk2pj.dyndns.org> <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> <20061107174151.GA51473@lor.one-eyed-alien.net> <8cb6106e0611071008y6811a79x9ba056c2be94d773@mail.gmail.com> <8cb6106e0611071051y6cbbca1padc24ba315d4a2b3@mail.gmail.com> <8cb6106e0611101115k25df8cddu98c980481cd591f2@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <8cb6106e0611101115k25df8cddu98c980481cd591f2@mail.gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.463, required 5, autolearn=not spam, BAYES_00 -2.60, FORGED_RCVD_HELO 0.14, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@freebsd.org 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: Sat, 11 Nov 2006 13:19:42 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2006-11-10 11:15, Josh Carroll wrote: >> Below is the patch using strsep instead. I also updated the >> gather_inet function to print a message that a protocol is not >> supported if it exists in /etc/protocols, but does not have a case in >> the gather_inet function. > > So, anyone interested in committing this? :) Do people think this > would be useful going forward? Or does anyone else have suggestions > for the code? I haven't had time to look at the patch the last few days, but I plan to install it on my laptop tonight and go through the changes you made. I can't commit it myself, but I'm sure we can find someone :-) --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFVc3Q1g+UGjGGA7YRAiMaAKCdVFpSFuop1KkEERyc1PzrwlKSaACfUoEe SzJN2dLV4/Ar5oKXWbicu6g= =WIM3 -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 15:49: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 98C1416A403 for ; Sat, 11 Nov 2006 15:49:41 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9466643D72 for ; Sat, 11 Nov 2006 15:49:34 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (host155-42.pool8174.interbusiness.it [81.74.42.155] (may be forged)) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kABFmxU0023048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Nov 2006 17:49:05 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kABFmqes003806; Sat, 11 Nov 2006 16:48:53 +0100 (CET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kABFmoum003805; Sat, 11 Nov 2006 16:48:50 +0100 (CET) (envelope-from keramida@freebsd.org) Date: Sat, 11 Nov 2006 16:48:50 +0100 From: Giorgos Keramidas To: Josh Carroll Message-ID: <20061111154849.GC1972@kobe.laptop> References: <8cb6106e0611021834h17737556y4bb2fda39a4bfa0c@mail.gmail.com> <20061103024621.GB16445@kobe.laptop> <20061103024837.GB79357@lor.one-eyed-alien.net> <20061103025442.GB16543@kobe.laptop> <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> <20061104062439.GD854@turion.vk2pj.dyndns.org> <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> <20061107174151.GA51473@lor.one-eyed-alien.net> <8cb6106e0611071008y6811a79x9ba056c2be94d773@mail.gmail.com> <8cb6106e0611071051y6cbbca1padc24ba315d4a2b3@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline In-Reply-To: <8cb6106e0611101115k25df8cddu98c980481cd591f2@mail.gmail.com> <8cb6106e0611071051y6cbbca1padc24ba315d4a2b3@mail.gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.463, required 5, autolearn=not spam, BAYES_00 -2.60, FORGED_RCVD_HELO 0.14, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@freebsd.org 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: Sat, 11 Nov 2006 15:49:41 -0000 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2006-11-07 10:51, Josh Carroll wrote: > Below is the patch using strsep instead. I also updated the > gather_inet function to print a message that a protocol is not > supported if it exists in /etc/protocols, but does not have a case in > the gather_inet function. > > patch is here if you'd rather just fetch it: > > http://pflog.net/~floyd/sockstat.patch This patch still has some points which are in need of a slight modification or rearrangement, but it works fine here. My comments, and a proposed patch to replace it (after some style fixes and partial rewrite of the added code), are below: > --- sockstat.c.orig Thu Jun 9 23:36:03 2005 > +++ sockstat.c Tue Nov 7 10:49:28 2006 > @@ -66,8 +66,15 @@ > static int opt_u; /* Show Unix domain sockets */ > static int opt_v; /* Verbose mode */ > > +/* default protocols to use if no -P was defined, currently > + tcp, udp and divert */ > +const char *default_protos[] = {"tcp", "udp", "divert", NULL}; > + > +static int *protos; /* protocols to use */ > + > static int *ports; We don't use this sort of style for inline comments. This should be something like: % +/* % + * Default protocols to use if no -P was defined, currently % + * tcp, udp and divert. % + */ % +const char *default_protos[] = {"tcp", "udp", "divert", NULL}; % + % +static int *protos; /* protocols to use */ % + % static int *ports; IMHO, there's no need to repeat in the comments the protocol list, because this means anyone updating the source definition of default_protos[] will have to remember to update the commented out list too. Since the default_protos[] array is static and predefined, there is no need for special NULL termination too. You can let the compiler find out how large it is. This is why in the attached patch this part appears as: % +/* % + * Default protocols to use if no -P was defined. % + */ % +static const char *default_protos[] = {"tcp", "udp", "divert" }; % +static size_t default_numprotos = % + sizeof(default_protos) / sizeof(default_protos[0]); % + % +static int *protos; /* protocols to use */ % +static size_t numprotos; /* allocated size of protos[] */ It's also a good idea to use `size_t' for array sizes, but this affects other parts below in the attached patch (which used `int' to iterate through the array index). > + > +/* this function needs to be updated to reflect additional protocols > + that are to be supported */ > +static int > +get_proto_type(const char *proto) > +{ Minor style bugs in the formatting of the comment above. > + struct protoent *pent; > + > + if(strlen(proto) == 0) > + return 0; Pretty small style bug in whitespace. > + pent = getprotobyname(proto); > + if(pent == NULL) { > + printf("Unrecognized protocol: %s\n", proto); > + return -1; > + } else { > + return pent->p_proto; > + } Since you immediatelly return when something goes wrong, it will save some indentation levels if parts like: if (condition) { ... return; } else { small or larger part; return; } are written as: if (condition) { ... return; } small or larger part; return; Now it doens't matter so much, I think, but if the else-part grows a lot, it will. > +static void init_protos(int num) > +{ > + int proto_count = 0; > + > + if(num > 0) { > + proto_count = num; > + } else { > + /* find the maximum number of possible protocols */ > + while(getprotoent() != NULL) > + proto_count++; > + endprotoent(); > + } > + > + if ((protos = malloc(sizeof(int) * proto_count)) == NULL) > + err(1, "malloc()"); > +} I'm not sure I like the iteration of all protocol entries from `/etc/protocols' here. This may tend to be *VERY* slow if protocol entries are retrieved from NIS maps or something that is not locally available at all times :-( Maybe it's a better idea to let the protos[] array automatically adapt to the number of protocols entries *really* entered by the user at command line? I'll try to work a second patch (after the attached one), which does exactly this sort of thing, because I don't like static, fixed limits and prefer auto-sizing when possible. > +static int > +parse_protos(char *protospec) > +{ > + char **prot; > + char *tmp = protospec; > + int protos_defined = 0, proto_type, proto_index = 0; > + > + init_protos(0); > + > + while( (*prot = strsep(&tmp, ",")) != NULL) { > + /* handle ,, */ > + if(strlen(*prot) > 0) { > + proto_type = get_proto_type(*prot); > + if(proto_type != -1) { > + protos[proto_index++] = proto_type; > + protos_defined++; > + } > + } > + } > + return protos_defined; Indentation and style is kind of uncool here. Since the special case is when strlen(*prot) == 0, we can skip these parts of the protocol string with: while ((*prot = strsep(&tmp, ",")) != NULL) { if (strlen(*prot) == NULL) continue; ... } The semantic use of proto_index and protos_defined is also *exactly* the same, so they can be rolled into a _single_ index, since they will always have the same value throughout this function body. This is why I've rewritten this part in the attached patch to look like this: % +static int % +parse_protos(char *protospec) % +{ % + char *prot; % + char *tmp = protospec; % + int proto_type, proto_index; % + % + if (protospec == NULL) % + return -1; % + % + init_protos(0); % + proto_index = 0; % + while ((prot = strsep(&tmp, ",")) != NULL) { % + if (strlen(prot) == 0) % + continue; % + proto_type = get_proto_type(prot); % + if (proto_type != -1) % + protos[proto_index++] = proto_type; % + } % + numprotos = proto_index; % + return proto_index; % +} > @@ -209,7 +279,9 @@ > protoname = "div"; > break; > default: > - abort(); > + pent = getprotobynumber(proto); > + printf("protocol `%s' not supported.\n", pent->p_name); > + exit(EXIT_FAILURE); I don't like replacing abort() with a custom printf() error. For one thing, printf() will go to `stdout' and not `stderr'. For another, we usually prefer err() and warn() instead of custom printf() calls for errors. You are also missing a check for the return value of getprotobynumber() being NULL here. I've rewritten this part as: % default: % - abort(); % + errx(1, "protocol %d not supported", proto); > default: > - abort(); > + pent = getprotobynumber(proto); > + printf("protocol `%s' not supported.\n", pent->p_name); > + exit(EXIT_FAILURE); Same as above. > +static int set_default_protos(void) > +{ > + struct protoent *prot; > + const char **curr_proto; > + int proto_index = 0; > + int proto_count = 0; > + > + /* determine the number of default protocols */ > + for(curr_proto = default_protos; *curr_proto; curr_proto++, proto_count++) > + ; > + > + init_protos(proto_count); > + > + for(curr_proto = default_protos; *curr_proto; curr_proto++) { > + prot = getprotobyname(*curr_proto); > + if(prot == NULL) { > + printf("Cannot determine default protocols\n"); > + exit(EXIT_FAILURE); > + } > + protos[proto_index++] = prot->p_proto; > + } > + > + return proto_index; > +} This function suffers a bit from bloat, because of the choise to use a NULL entry at the end of default_protos[] as the protocol list terminator. It also uses printf() for error reporting, which (as I said previously) is not a good idea. A much smaller, but equivalent in functionality version, which depends on `default_numprotos' being already set for us by the compile-time sizeof() stuff near default_protos[]'s definition, can be: % +static int set_default_protos(void) % +{ % + struct protoent *prot; % + const char *pname; % + size_t pindex; % + % + init_protos(default_numprotos); % + % + for (pindex = 0; pindex < default_numprotos; pindex++) { % + pname = default_protos[pindex]; % + prot = getprotobyname(pname); % + if (prot == NULL) % + err(1, "getprotobyname: %s", pname); % + protos[pindex] = prot->p_proto; % + } % + numprotos = pindex; % + return pindex; % +} > int > main(int argc, char *argv[]) > { > - int o; > + /* 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, i; Style bugs above. We don't write comments using this sort of style and we don't use so large comments explaining the internal meaning of a variable near its definition. Explaining the semantics of protos_defined near the place where it is being used will be much more useful IMHO. > - if (!opt_4 && !opt_6 && !opt_u) > - opt_4 = opt_6 = opt_u = 1; > + > + if (!opt_4 && !opt_6 && !opt_u && protos_defined == -1) { > + opt_u = 1; > + /* show tcp, udp and divert by default if no -P was > specified */ > + /* restore protos_defined to the number of default protocols > */ > + protos_defined = set_default_protos(); > + } Style bugs above too. The comments are too long, wrapping in an 80-column terminal and they seem useless near this place. This has been changed in my attached patch to: % - if (!opt_4 && !opt_6 && !opt_u) % - opt_4 = opt_6 = opt_u = 1; % + /* % + * If protos_defined remains -1, no -P was provided, so we have to % + * set up the default protocol list in protos[] first. % + */ % + if (!opt_4 && !opt_6 && !opt_u && protos_defined == -1) { % + opt_u = 1; % + protos_defined = set_default_protos(); % + } % + > if (opt_4 || opt_6) { > - gather_inet(IPPROTO_TCP); > - gather_inet(IPPROTO_UDP); > - gather_inet(IPPROTO_DIVERT); > + for(i=0; i < protos_defined; i++) > + gather_inet(protos[i]); > } > - if (opt_u) { > + > + if ( opt_u || (protos_defined == -1 && !opt_4 && !opt_6)) { > gather_unix(SOCK_STREAM); > gather_unix(SOCK_DGRAM); > } Only whitespace style bugs above. These are fixed in the attached version of the patch. On 2006-11-10 11:15, Josh Carroll wrote: >> Below is the patch using strsep instead. I also updated the >> gather_inet function to print a message that a protocol is not >> supported if it exists in /etc/protocols, but does not have a case in >> the gather_inet function. > > So, anyone interested in committing this? :) Do people think this > would be useful going forward? Or does anyone else have suggestions > for the code? There are a few nits, like the ones I described above, which I'd like to see fixed before I suggest that this is committed. All in all, this is a good feature patch though, and I've just tested it on CURRENT. It runs quite nicely... % $ pwd % /home/keramida/hg/freebsd-7.0-keramida/usr.bin/sockstat % % $ ./sockstat -P udp % USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS % root cupsd 935 5 udp4 *:631 *:* % root ntpd 877 4 udp4 *:123 *:* % root ntpd 877 5 udp6 *:123 *:* % root ntpd 877 6 udp6 ::1:123 *:* % root ntpd 877 7 udp4 127.0.0.1:123 *:* % bind named 797 20 udp4 127.0.0.1:53 *:* % bind named 797 22 udp4 *:61747 *:* % root syslogd 735 8 udp6 *:514 *:* % root syslogd 735 9 udp4 *:514 *:* % % $ ./sockstat -P udp,, % USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS % root cupsd 935 5 udp4 *:631 *:* % root ntpd 877 4 udp4 *:123 *:* % root ntpd 877 5 udp6 *:123 *:* % root ntpd 877 6 udp6 ::1:123 *:* % root ntpd 877 7 udp4 127.0.0.1:123 *:* % bind named 797 20 udp4 127.0.0.1:53 *:* % bind named 797 22 udp4 *:61747 *:* % root syslogd 735 8 udp6 *:514 *:* % root syslogd 735 9 udp4 *:514 *:* % % $ ./sockstat -P ,,tcp % USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS % keramida firefox-bi 3508 9 tcp4 192.168.99.185:65501 10.6.0.131:80 % keramida irssi 3276 3 tcp4 192.168.99.185:65165 194.159.164.195:6667 % root Xorg 1118 1 tcp6 *:6000 *:* % root Xorg 1118 3 tcp4 *:6000 *:* % root sshd 961 3 tcp4 *:22 *:* % root cupsd 935 2 tcp6 ::1:631 *:* % root cupsd 935 3 tcp4 127.0.0.1:631 *:* % root sendmail 903 4 tcp4 127.0.0.1:25 *:* % bind named 797 21 tcp4 127.0.0.1:53 *:* % bind named 797 23 tcp4 127.0.0.1:953 *:* % % $ ./sockstat -P ,,tcp,udp % USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS % keramida firefox-bi 3508 9 tcp4 192.168.99.185:65501 10.6.0.131:80 % keramida irssi 3276 3 tcp4 192.168.99.185:65165 194.159.164.195:6667 % root Xorg 1118 1 tcp6 *:6000 *:* % root Xorg 1118 3 tcp4 *:6000 *:* % root sshd 961 3 tcp4 *:22 *:* % root cupsd 935 2 tcp6 ::1:631 *:* % root cupsd 935 3 tcp4 127.0.0.1:631 *:* % root cupsd 935 5 udp4 *:631 *:* % root sendmail 903 4 tcp4 127.0.0.1:25 *:* % root ntpd 877 4 udp4 *:123 *:* % root ntpd 877 5 udp6 *:123 *:* % root ntpd 877 6 udp6 ::1:123 *:* % root ntpd 877 7 udp4 127.0.0.1:123 *:* % bind named 797 20 udp4 127.0.0.1:53 *:* % bind named 797 21 tcp4 127.0.0.1:53 *:* % bind named 797 22 udp4 *:61747 *:* % bind named 797 23 tcp4 127.0.0.1:953 *:* % root syslogd 735 8 udp6 *:514 *:* % root syslogd 735 9 udp4 *:514 *:* Can you go through the attached, modified version and see if this is better in any way than the original patch? If you like the changes, we can probably ask Brooks for help in getting this committed. Then we can work a bit on making the protos[] array dynamically sized, without having to iterate through the entire list of getprotoent() protocols, and we're done I think :-) --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sockstat-protocol.patch" Add support for filtering sockets by protocol type. The default behavior of sockstat(1) will still be to show "udp", "tcp" and "divert" protocols, but we can now provide a (comma-separated) list of protocols, as in: % sockstat -P tcp to list only TCP sockets, or we can filter more than one protocol by separating the protocol names with a comma: % sockstat -P tcp,udp Protocol names are parsed with getprotobyname(3), so any protocol whose name is listed in `/etc/protocols' should work fine. Submitted by: Josh Carroll diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -66,6 +66,16 @@ static int opt_u; /* Show Unix domain static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ +/* + * Default protocols to use if no -P was defined. + */ +static const char *default_protos[] = {"tcp", "udp", "divert" }; +static size_t default_numprotos = + sizeof(default_protos) / sizeof(default_protos[0]); + +static int *protos; /* protocols to use */ +static size_t numprotos; /* allocated size of protos[] */ + static int *ports; #define INT_BIT (sizeof(int)*CHAR_BIT) @@ -103,6 +113,66 @@ xprintf(const char *fmt, ...) err(1, "printf()"); return (len); } + + +static int +get_proto_type(const char *proto) +{ + struct protoent *pent; + + if (strlen(proto) == 0) + return 0; + pent = getprotobyname(proto); + if (pent == NULL) { + warn("getprotobyname"); + return -1; + } + return pent->p_proto; +} + + +static void init_protos(int num) +{ + int proto_count = 0; + + if (num > 0) { + proto_count = num; + } else { + /* Find the maximum number of possible protocols. */ + while (getprotoent() != NULL) + proto_count++; + endprotoent(); + } + + if ((protos = malloc(sizeof(int) * proto_count)) == NULL) + err(1, "malloc"); + numprotos = proto_count; +} + + +static int +parse_protos(char *protospec) +{ + char *prot; + char *tmp = protospec; + int proto_type, proto_index; + + if (protospec == NULL) + return -1; + + init_protos(0); + proto_index = 0; + while ((prot = strsep(&tmp, ",")) != NULL) { + if (strlen(prot) == 0) + continue; + proto_type = get_proto_type(prot); + if (proto_type != -1) + protos[proto_index++] = proto_type; + } + numprotos = proto_index; + return proto_index; +} + static void parse_ports(const char *portspec) @@ -209,7 +279,7 @@ gather_inet(int proto) protoname = "div"; break; default: - abort(); + errx(1, "protocol %d not supported", proto); } buf = NULL; @@ -264,7 +334,7 @@ gather_inet(int proto) so = &xip->xi_socket; break; default: - abort(); + errx(1, "protocol %d not supported", proto); } if ((inp->inp_vflag & vflag) == 0) continue; @@ -573,19 +643,40 @@ display(void) } } +static int set_default_protos(void) +{ + struct protoent *prot; + const char *pname; + size_t pindex; + + init_protos(default_numprotos); + + for (pindex = 0; pindex < default_numprotos; pindex++) { + pname = default_protos[pindex]; + prot = getprotobyname(pname); + if (prot == NULL) + err(1, "getprotobyname: %s", pname); + protos[pindex] = prot->p_proto; + } + numprotos = pindex; + return pindex; +} + + 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[]) { - int o; - - while ((o = getopt(argc, argv, "46clp:uv")) != -1) + int protos_defined = -1; + int o, i; + + while ((o = getopt(argc, argv, "46clp:P:uv")) != -1) switch (o) { case '4': opt_4 = 1; @@ -602,6 +693,9 @@ main(int argc, char *argv[]) case 'p': parse_ports(optarg); break; + case 'P': + protos_defined = parse_protos(optarg); + break; case 'u': opt_u = 1; break; @@ -618,22 +712,30 @@ main(int argc, char *argv[]) if (argc > 0) usage(); - if (!opt_4 && !opt_6 && !opt_u) - opt_4 = opt_6 = opt_u = 1; + /* + * If protos_defined remains -1, no -P was provided, so we have to + * set up the default protocol list in protos[] first. + */ + if (!opt_4 && !opt_6 && !opt_u && protos_defined == -1) { + opt_u = 1; + protos_defined = set_default_protos(); + } + + 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); - gather_inet(IPPROTO_DIVERT); - } - if (opt_u) { + for (i = 0; i < protos_defined; i++) + gather_inet(protos[i]); + } + + if (opt_u || (protos_defined == -1 && !opt_4 && !opt_6)) { gather_unix(SOCK_STREAM); gather_unix(SOCK_DGRAM); } getfiles(); display(); - exit(0); } --SkvwRMAIpAhPCcCJ-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 16:10:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DC5716A416 for ; Sat, 11 Nov 2006 16:10:03 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7BE443D46 for ; Sat, 11 Nov 2006 16:10:01 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (host155-42.pool8174.interbusiness.it [81.74.42.155] (may be forged)) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kABG9cUH024940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Nov 2006 18:09:42 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kABG9W18004042; Sat, 11 Nov 2006 17:09:32 +0100 (CET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kABG9WPC004041; Sat, 11 Nov 2006 17:09:32 +0100 (CET) (envelope-from keramida@freebsd.org) Date: Sat, 11 Nov 2006 17:09:32 +0100 From: Giorgos Keramidas To: Josh Carroll Message-ID: <20061111160931.GB3979@kobe.laptop> References: <20061103024621.GB16445@kobe.laptop> <20061103024837.GB79357@lor.one-eyed-alien.net> <20061103025442.GB16543@kobe.laptop> <8cb6106e0611031550y1381b67agdc74144b89de763b@mail.gmail.com> <20061104062439.GD854@turion.vk2pj.dyndns.org> <8cb6106e0611061517k62c9193fnbbfc8e36db328282@mail.gmail.com> <20061107174151.GA51473@lor.one-eyed-alien.net> <8cb6106e0611071008y6811a79x9ba056c2be94d773@mail.gmail.com> <8cb6106e0611071051y6cbbca1padc24ba315d4a2b3@mail.gmail.com> <20061111154849.GC1972@kobe.laptop> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20061111154849.GC1972@kobe.laptop> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.463, required 5, autolearn=not spam, BAYES_00 -2.60, FORGED_RCVD_HELO 0.14, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@freebsd.org 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: Sat, 11 Nov 2006 16:10:03 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2006-11-11 16:48, Giorgos Keramidas wrote: > This patch still has some points which are in need of a slight > modification or rearrangement, but it works fine here. > > My comments, and a proposed patch to replace it (after some style fixes > and partial rewrite of the added code), are below: Maxim Konovalov reminded me of another style(9) issue we have to address. All 'return' statements should use parentheses: return (foo); The attached version of my last patch fixes that too, in the sockstat.c parts which are new. --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sockstat-protocol.patch" Add support for filtering sockets by protocol type. The default behavior of sockstat(1) will still be to show "udp", "tcp" and "divert" protocols, but we can now provide a (comma-separated) list of protocols, as in: % sockstat -P tcp to list only TCP sockets, or we can filter more than one protocol by separating the protocol names with a comma: % sockstat -P tcp,udp Protocol names are parsed with getprotobyname(3), so any protocol whose name is listed in `/etc/protocols' should work fine. Submitted by: Josh Carroll diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -66,6 +66,16 @@ static int opt_u; /* Show Unix domain static int opt_u; /* Show Unix domain sockets */ static int opt_v; /* Verbose mode */ +/* + * Default protocols to use if no -P was defined. + */ +static const char *default_protos[] = {"tcp", "udp", "divert" }; +static size_t default_numprotos = + sizeof(default_protos) / sizeof(default_protos[0]); + +static int *protos; /* protocols to use */ +static size_t numprotos; /* allocated size of protos[] */ + static int *ports; #define INT_BIT (sizeof(int)*CHAR_BIT) @@ -103,6 +113,66 @@ xprintf(const char *fmt, ...) err(1, "printf()"); return (len); } + + +static int +get_proto_type(const char *proto) +{ + struct protoent *pent; + + if (strlen(proto) == 0) + return (0); + pent = getprotobyname(proto); + if (pent == NULL) { + warn("getprotobyname"); + return (-1); + } + return (pent->p_proto); +} + + +static void init_protos(int num) +{ + int proto_count = 0; + + if (num > 0) { + proto_count = num; + } else { + /* Find the maximum number of possible protocols. */ + while (getprotoent() != NULL) + proto_count++; + endprotoent(); + } + + if ((protos = malloc(sizeof(int) * proto_count)) == NULL) + err(1, "malloc"); + numprotos = proto_count; +} + + +static int +parse_protos(char *protospec) +{ + char *prot; + char *tmp = protospec; + int proto_type, proto_index; + + if (protospec == NULL) + return (-1); + + init_protos(0); + proto_index = 0; + while ((prot = strsep(&tmp, ",")) != NULL) { + if (strlen(prot) == 0) + continue; + proto_type = get_proto_type(prot); + if (proto_type != -1) + protos[proto_index++] = proto_type; + } + numprotos = proto_index; + return (proto_index); +} + static void parse_ports(const char *portspec) @@ -209,7 +279,7 @@ gather_inet(int proto) protoname = "div"; break; default: - abort(); + errx(1, "protocol %d not supported", proto); } buf = NULL; @@ -264,7 +334,7 @@ gather_inet(int proto) so = &xip->xi_socket; break; default: - abort(); + errx(1, "protocol %d not supported", proto); } if ((inp->inp_vflag & vflag) == 0) continue; @@ -573,19 +643,40 @@ display(void) } } +static int set_default_protos(void) +{ + struct protoent *prot; + const char *pname; + size_t pindex; + + init_protos(default_numprotos); + + for (pindex = 0; pindex < default_numprotos; pindex++) { + pname = default_protos[pindex]; + prot = getprotobyname(pname); + if (prot == NULL) + err(1, "getprotobyname: %s", pname); + protos[pindex] = prot->p_proto; + } + numprotos = pindex; + return (pindex); +} + + 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[]) { - int o; - - while ((o = getopt(argc, argv, "46clp:uv")) != -1) + int protos_defined = -1; + int o, i; + + while ((o = getopt(argc, argv, "46clp:P:uv")) != -1) switch (o) { case '4': opt_4 = 1; @@ -602,6 +693,9 @@ main(int argc, char *argv[]) case 'p': parse_ports(optarg); break; + case 'P': + protos_defined = parse_protos(optarg); + break; case 'u': opt_u = 1; break; @@ -618,22 +712,30 @@ main(int argc, char *argv[]) if (argc > 0) usage(); - if (!opt_4 && !opt_6 && !opt_u) - opt_4 = opt_6 = opt_u = 1; + /* + * If protos_defined remains -1, no -P was provided, so we have to + * set up the default protocol list in protos[] first. + */ + if (!opt_4 && !opt_6 && !opt_u && protos_defined == -1) { + opt_u = 1; + protos_defined = set_default_protos(); + } + + 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); - gather_inet(IPPROTO_DIVERT); - } - if (opt_u) { + for (i = 0; i < protos_defined; i++) + gather_inet(protos[i]); + } + + if (opt_u || (protos_defined == -1 && !opt_4 && !opt_6)) { gather_unix(SOCK_STREAM); gather_unix(SOCK_DGRAM); } getfiles(); display(); - exit(0); } --EeQfGwPcQSOJBaQU-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 17:24: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 01C4F16A412 for ; Sat, 11 Nov 2006 17:24:33 +0000 (UTC) (envelope-from trowa-4@yahoo.com.tw) Received: from web72011.mail.tp2.yahoo.com (web72011.mail.tp2.yahoo.com [203.188.200.41]) by mx1.FreeBSD.org (Postfix) with SMTP id DF5BA43D45 for ; Sat, 11 Nov 2006 17:24:31 +0000 (GMT) (envelope-from trowa-4@yahoo.com.tw) Received: (qmail 5133 invoked by uid 60001); 11 Nov 2006 17:24:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.tw; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=FQ2TZMCUiJq8dWOI/GpRcrFBqR73egKwFQMVuHV9h6RwBBkClx2Uq4cvky46sbNMR/kybRsMIXRtivjlR36ycE1pkPFGJcLEIiVMd6tOcE0r/vj3Tff/YVut3ARtAmQSEjee/e6v2n9ISmsTDbua/2mZljxX5ep/383QN5A73F4=; X-YMail-OSG: LfsUZyEVM1m6PIbsV5SSbJktnM8klS.LrRJK6Sk9qAT3xTu4dk7pIjGrCIHOLeaCiUhzVhsVBwbSZz8ZdXy5phE2VllngKmyU0xDWHWTgGwjAuyJeFu3NekSaU9gcy3HLxYyTBwNv6LyHGU- Received: from [61.56.138.188] by web72011.mail.tp2.yahoo.com via HTTP; Sun, 12 Nov 2006 01:24:30 CST Date: Sun, 12 Nov 2006 01:24:30 +0800 (CST) From: trowa-4 To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: 8bit Message-ID: <571883.4868.qm@web72011.mail.tp2.yahoo.com> X-Mailman-Approved-At: Sat, 11 Nov 2006 17:46:08 +0000 Subject: Process Debugging 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: Sat, 11 Nov 2006 17:24:33 -0000 Hi all, FreeBSD provides the ptrace system call for controlling and debugging the execution of a process. An alternative to the ptrace system call is the /proc filesystem. The functionality provided by the /proc filesystem is the same as that provided by ptrace; if differs only in its interface. Are there having a better method or other method? thanks. ___________________________________________________ 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! http://messenger.yahoo.com.tw/ From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 17:27: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 7EEE816A412 for ; Sat, 11 Nov 2006 17:27:24 +0000 (UTC) (envelope-from gergely.czuczy@harmless.hu) Received: from marvin.harmless.hu (marvin.harmless.hu [195.56.55.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CDFA43D4C for ; Sat, 11 Nov 2006 17:27:23 +0000 (GMT) (envelope-from gergely.czuczy@harmless.hu) Received: from localhost (marvin-mail [192.168.0.2]) by marvin.harmless.hu (Postfix) with ESMTP id 2FF847C00B7 for ; Sat, 11 Nov 2006 18:27:38 +0100 (CET) X-Virus-Scanned: amavisd-new at harmless.hu Received: from marvin.harmless.hu ([192.168.0.2]) by localhost (marvin.harmless.hu [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id jBZf943HK+ld for ; Sat, 11 Nov 2006 18:27:32 +0100 (CET) Received: from marvin.harmless.hu (localhost [127.0.0.1]) by marvin.harmless.hu (Postfix) with ESMTP id E212A7C00B4 for ; Sat, 11 Nov 2006 18:27:31 +0100 (CET) Date: Sat, 11 Nov 2006 18:27:31 +0100 From: Gergely CZUCZY To: freebsd-hackers@freebsd.org Message-ID: <20061111172731.GB39999@harmless.hu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=x-unknown; protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu" Content-Disposition: inline User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Mailman-Approved-At: Sat, 11 Nov 2006 17:46:32 +0000 Subject: system randomly freezes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Nov 2006 17:27:24 -0000 --TRYliJ5NKNqkz5bu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I have sent this as a PR, but Remko Lodder suggested that it should be discuessed here. I have seen several other examples to very similar unstability issues in the mailing lists previously. When i have posted this to -questions@ there also was a person who said he has fimilar behaviours sometimes. so, here it goes: >Environment: System: FreeBSD marvin.harmless.hu 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 = #0: Mon Oct 2 14:54:14 CEST 2006 root@marvin.harmless.hu:/usr/obj/usr/src/s= ys/MARVIN i386 >Description: We run hosting services on this FreeBSD box, and we encountered strange problems. Sometimes, in 4-6 weeks' time the system simply freezes. I use the term "freeze", because i feel it the proper one. The console is blank, we cannot do network communication with the box, there is no crash dump left of the event, the system logs are empty. We've got absolutely no clue on this at the moment. This a supermicro 5013C-MT: http://www.supermicro.com/products/system/1U/5013/SYS-5013C-MT.cfm with a P4-2.4GHz, and with 4x512MB of DDR RAM. We are using the 6300ESB SATA controller, because the marvell one is buggy (i have already filed a bug report on that). All the other hardware spec will be in the later pciiconf output and dmesg. The config. We are running ftp, web, email, postgresql services mostly on this box. We have 6 jails on it with the pf packet filter. if anything is else is needed, please ask for the info. Dmesg: --- chop here --- Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.1-RELEASE-p10 #0: Mon Oct 2 14:54:14 CEST 2006 root@marvin.harmless.hu:/usr/obj/usr/src/sys/MARVIN ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2795.24-MHz 686-class CPU) Origin =3D "GenuineIntel" Id =3D 0xf29 Stepping =3D 9 Features=3D0xbfebfbff Features2=3D0x4400> Logical CPUs per core: 2 real memory =3D 2146304000 (2046 MB) avail memory =3D 2096168960 (1999 MB) ioapic0: Changing APIC ID to 2 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 cpu0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 3.0 on pci0 pci1: on pcib1 em0: port 0xc000-0x= c01f mem 0xfd500000-0xfd51ffff irq 18 at device 1.0 on pci1 em0: Ethernet address: 00:30:48:80:aa:3e pcib2: at device 28.0 on pci0 pci2: on pcib2 atapci0: mem 0xfd400000-0xfd47ffff ir= q 27 at device 4.0 on pci2 ata2: on atapci0 ata3: on atapci0 ata4: on atapci0 ata5: on atapci0 pcib3: at device 30.0 on pci0 pci3: on pcib3 pci3: at device 9.0 (no driver attached) em1: port 0xd100-0x= d13f mem 0xfc000000-0xfc01ffff irq 19 at device 10.0 on pci3 em1: Ethernet address: 00:30:48:80:aa:3f isab0: at device 31.0 on pci0 isa0: on isab0 atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x= 177,0x376,0xf000-0xf00f at device 31.1 on pci0 ata0: on atapci1 ata1: on atapci1 atapci2: port 0xe200-0xe207,0xe300-0xe30= 3,0xe400-0xe407,0xe500-0xe503,0xe600-0xe60f at device 31.2 on pci0 ata6: on atapci2 ata7: on atapci2 pci0: at device 31.3 (no driver attached) acpi_tz0: on acpi0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acp= i0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] pmtimer0 on isa0 orm0: at iomem 0xc0000-0xc7fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=3D0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2795239320 Hz quality 800 Timecounters tick every 1.000 msec acd0: CDROM at ata0-master UDMA33 ad12: 190782MB at ata6-master SATA150 ad14: 190782MB at ata7-master SATA150 GEOM_MIRROR: Device gm0 created (id=3D2141307500). GEOM_MIRROR: Device gm0: provider ad12 detected. GEOM_MIRROR: Device gm0: provider ad14 detected. GEOM_MIRROR: Device gm0: provider ad14 activated. GEOM_MIRROR: Device gm0: provider ad12 activated. GEOM_MIRROR: Device gm0: provider mirror/gm0 launched. Trying to mount root from ufs:/dev/mirror/gm0s1a WARNING: / was not properly dismounted WARNING: /var was not properly dismounted /var: mount pending error: blocks 36 files 3 em1: link state changed to UP --- chop here --- pciconf -lv: --- chop here --- hostb0@pci0:0:0: class=3D0x060000 card=3D0x518015d9 chip=3D0x25788086 rev= =3D0x02 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '82875P/E7210 DRAM Controller / Host-Hub Interface' class =3D bridge subclass =3D HOST-PCI pcib1@pci0:3:0: class=3D0x060400 card=3D0x00000000 chip=3D0x257b8086 rev=3D= 0x02 hdr=3D0x01 vendor =3D 'Intel Corporation' device =3D '82875P/E7210 PCI to CSA Bridge' class =3D bridge subclass =3D PCI-PCI pcib2@pci0:28:0: class=3D0x060400 card=3D0x00000050 chip=3D0x25ae8086 rev= =3D0x02 hdr=3D0x01 vendor =3D 'Intel Corporation' device =3D '6300ESB Hub Interface to PCI-X Bridge' class =3D bridge subclass =3D PCI-PCI pcib3@pci0:30:0: class=3D0x060400 card=3D0x00000000 chip=3D0x244e8086 rev= =3D0x0a hdr=3D0x01 vendor =3D 'Intel Corporation' device =3D '82801BA/CA/DB/DBL/EB/ER/FB (ICH2/3/4/4/5/5/6), 6300ESB Hu= b Interface to PCI Bridge' class =3D bridge subclass =3D PCI-PCI isab0@pci0:31:0: class=3D0x060100 card=3D0x00000000 chip=3D0x25a18086 rev= =3D0x02 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '6300ESB LPC Interface Bridge' class =3D bridge subclass =3D PCI-ISA atapci1@pci0:31:1: class=3D0x01018a card=3D0x518015d9 chip=3D0x25a28086 rev= =3D0x02 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '6300ESB IDE Controller' class =3D mass storage subclass =3D ATA atapci2@pci0:31:2: class=3D0x01018f card=3D0x518015d9 chip=3D0x25a38086 rev= =3D0x02 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '6300ESB Serial ATA Controller' class =3D mass storage subclass =3D ATA none0@pci0:31:3: class=3D0x0c0500 card=3D0x518015d9 chip=3D0x25a48086 rev= =3D0x02 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '6300ESB SMBus Controller' class =3D serial bus subclass =3D SMBus em0@pci1:1:0: class=3D0x020000 card=3D0x10758086 chip=3D0x10758086 rev=3D0x= 00 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '82547EI Gigabit Ethernet Controller' class =3D network subclass =3D ethernet atapci0@pci2:4:0: class=3D0x010000 card=3D0x504111ab chip=3D0x504111ab rev= =3D0x03 hdr=3D0x00 vendor =3D 'Marvell Semiconductor (Was: Galileo Technology Ltd)' device =3D 'MV88SX5041 4-port SATA PCI-X Controller' class =3D mass storage subclass =3D SCSI none1@pci3:9:0: class=3D0x030000 card=3D0x518015d9 chip=3D0x47521002 rev=3D= 0x27 hdr=3D0x00 vendor =3D 'ATI Technologies Inc' device =3D 'Rage XL PCI' class =3D display subclass =3D VGA em1@pci3:10:0: class=3D0x020000 card=3D0x10768086 chip=3D0x10768086 rev=3D0= x00 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '82547EI Gigabit Ethernet Controller' class =3D network subclass =3D ethernet --- chop here --- Kernel config: --- chop here --- machine i386 cpu I686_CPU ident MARVIN maxusers 64 device npx # i will have this removed soonely: options CPU_FASTER_5X86_FPU # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. #makeoptions DEBUG=3D-g # Build kernel with gdb(1) debug symbols #options SCHED_ULE # ULE scheduler options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking #options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories #options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client options NFSSERVER # Network Filesystem Server #options NFS_ROOT # NFS usable as /, requires NFSCLIENT options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_GPT # GUID Partition Tables. options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options COMPAT_FREEBSD4 # Compatible with FreeBSD4 # i will have this removed soonely: options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options SCSI_DELAY=3D5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores # i will have this removed soonely: options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev # i will have this removed soonely: options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. # i will have this removed soonely: options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. options ADAPTIVE_GIANT # Giant mutex is adaptive. device apic # I/O APIC # Bus support. device isa device eisa device pci # Floppy drives #device fdc # ATA and ATAPI devices device ata device atadisk # ATA disk drives # i will have this removed soonely: device ataraid # ATA RAID drives device atapicd # ATAPI CDROM drives #device atapifd # ATAPI floppy drives #device atapist # ATAPI tape drives options ATA_STATIC_ID # Static device numbering # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device kbdmux # keyboard multiplexer device vga # VGA video card driver # syscons is the default console driver, resembling an SCO console device sc # Enable this for the pcvt (VT220 compatible) console driver device vt #options XSERVER # support for X server on a vt console #options FAT_CURSOR # start with block cursor # i will have this removed soonely: device agp # support several AGP chipsets # Power management support (see NOTES for more options) # i will have this removed soonely: device apm # Add suspend/resume support for the i8254. # i will have this removed soonely: device pmtimer # Serial (COM) ports device sio # 8250, 16[45]50 based serial ports # PCI Ethernet NICs. device em # Intel PRO/1000 adapter Gigabit Ethernet Card # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device fxp # Intel EtherExpress PRO/100B (82557, 82558) device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # Pseudo devices. device loop # Network loopback device random # Entropy device device ether # Ethernet support # i will have this removed soonely: device sl # Kernel SLIP # i will have this removed soonely: device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter device pf device pflog device pfsync options ALTQ options ALTQ_CBQ options ALTQ_RED options ALTQ_RIO options ALTQ_HFSC options ALTQ_PRIQ options ALTQ_NOPCC device tap options COMPAT_LINUX # i will have this removed soonely: device acpi device nullfs device geom_mirror device geom_label options DEVICE_POLLING --- chop here --- Bye, Gergely Czuczy mailto: gergely.czuczy@harmless.hu --=20 Weenies test. Geniuses solve problems that arise. --TRYliJ5NKNqkz5bu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) owHNWb1vI0l2X9/awKkBB5c6qpsFPBKOH/1BUhQ9M16KpCRiRJFmU7OzXiw0ze4i 1af+2q5uSdzAkQMHB8PYxMEFlzg1cMHB/gOMSw9wZBjOnDp14sj+vepms0lp5+N2 F7Bml2R3vffq/V69eh9Vf/fHH3/0o5/87te/+eJnv/jml3/wj41/mVf8NEmCZdW3 4ls3qGqqqlWNI/xVNaPaOjTUueO0m4Y9t5sLffDqxx/3wiDhQVKdrSLeYQm/T+qR Z7nBnzH72ooFT56nyaLaVtZ0fVdEoXATNww6zA08N+DF2Cy2ArHgcXUQ2KHjBssO +yoNE+5Uo9gNEmvucUU5454XVhRlyK6tW84EGFly7Qpm4T82mVbYPE3YlPs3ITsP HYfHTKTLJReQA0IrUdyEiesw9Rw258xxhZ1yITB4zWNeY4VcHuDjlseWx8IEYwq/ t/zI44IlIcP7FROu73pWzNJAQDnXc5MVc4WAOCDDXJz5Ft4GS8VzRSJYFPNbN0yF t6qxz64h383mgkEy5Vwpu/oVJJCBxKcKTcyZ5YmQ3UmAEY9FGLC765AJyyWlIUOw Ra7KnEMi5oiFIkKfJ67PRU3B74qEx4B9GXLRUV4Mgls3DgMf9uso5goa+B12EnN+ bPZZtvw1rKAPwKJ2nbJWTatOB+eDrjmoRppakO6+f658onbYCDqO7YTpTGt0mo2O 1mC9gTljuqq2WByGyacPp+jUUxHXw/nP5beI7bp4rqxEfdSdvhpeMNdotxRFedHn w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tkMf9PFRasSsQCf/mzz/+o48Gr3788e9+/ZsvfvaLb375kx/d /dtHvzr/2+Cb/71TPn7z7/9884s//O1f+2/+ofPRr269xm//de+//v7Ff/a/+e/2 P/3yP/6n+yf/Bw== =jd+e -----END PGP SIGNATURE----- --TRYliJ5NKNqkz5bu-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 18:31: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 5471316A40F for ; Sat, 11 Nov 2006 18:31:28 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 573E843D93 for ; Sat, 11 Nov 2006 18:31:20 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 508E31A3C19; Sat, 11 Nov 2006 10:31:20 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 7BC17515F4; Sat, 11 Nov 2006 13:31:10 -0500 (EST) Date: Sat, 11 Nov 2006 13:31:10 -0500 From: Kris Kennaway To: Gergely CZUCZY Message-ID: <20061111183110.GA6975@xor.obsecurity.org> References: <20061111172731.GB39999@harmless.hu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <20061111172731.GB39999@harmless.hu> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: system randomly freezes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Nov 2006 18:31:28 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Nov 11, 2006 at 06:27:31PM +0100, Gergely CZUCZY wrote: > The config. > We are running ftp, web, email, postgresql services mostly on this > box. We have 6 jails on it with the pf packet filter. > options ALTQ > options ALTQ_CBQ > options ALTQ_RED > options ALTQ_RIO > options ALTQ_HFSC > options ALTQ_PRIQ > options ALTQ_NOPCC Altq could be relevant - do you need it? Try to remove it if you can. Also try disabling polling, as it could be an interaction between those two. Beyond that, you'll have to do what I've suggested in your other email, and configure additional debugging. Kris --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFVhbtWry0BWjoQKURAtJcAKDjHAdhGIgPpUN3O4kff8FAOX5dowCfZa/r y/aiRoM9Rh3nnUN2Lkk+7K8= =AHiM -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 19:03:01 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 38AA916A47E for ; Sat, 11 Nov 2006 19:03:01 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C42C43D53 for ; Sat, 11 Nov 2006 19:02:59 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 076EC1A3C19; Sat, 11 Nov 2006 11:02:59 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 9A90D515D9; Sat, 11 Nov 2006 14:02:46 -0500 (EST) Date: Sat, 11 Nov 2006 14:02:46 -0500 From: Kris Kennaway To: Gergely CZUCZY Message-ID: <20061111190245.GA7577@xor.obsecurity.org> References: <20061111172731.GB39999@harmless.hu> <20061111183110.GA6975@xor.obsecurity.org> <20061111183432.GA41296@harmless.hu> <20061111184025.GA7128@xor.obsecurity.org> <20061111184625.GA41463@harmless.hu> <20061111185228.GA7338@xor.obsecurity.org> <20061111185747.GA56613@harmless.hu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20061111185747.GA56613@harmless.hu> User-Agent: Mutt/1.4.2.2i Cc: hackers@FreeBSD.org, Kris Kennaway Subject: Re: system randomly freezes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Nov 2006 19:03:01 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 11, 2006 at 07:57:47PM +0100, Gergely CZUCZY wrote: > > OK, seems weird to go through all the disruption of changing to a new > > OS instead of a few minutes work at a console to give us what we need > > to resolve the matter -- but whatever works for you. > already done some stuff like these movings... i'm familiars with them. > it's not about a few minutes work. it's about the few hours' downtime :) It's a few minutes to perform the additional work at the serial console when your system hangs, which is *required* for a developer to help with your problem. If you're not willing to do this, there's not much more we can do for you. > > > > > taking into account these facts, exactly what additional debugging > > > > > would you recommend? > > > >=20 > > > > Turn on all the usual debugging checks (WITNESS, INVARIANTS, > > > > DEBUG_*_LOCKS, etc) and check whether anything turns up. > > > i've found these in conf/NOTES and i386/conf/NOTES: > > > options WITNESS > > > options INVARIANTS > > > options DEBUG_VFS_LOCKS > > >=20 > > > anything else? > >=20 > > Well, yeah...I'd hoped you'd be able to figure it out for yourself > > though without me spelling it out :) Also add INVARIANT_SUPPORT and > > DEBUG_LOCKS. > good. i had some compiling errors :) > sorry, but i'm not familiar with building a debug kernel >=20 > > First, try with just altq removed, in case that already fixes it. If > > not, then proceed as above. > okey. when 6.2 comes at, to that on the nearest sunday i will update > the system anyways, and check it with this new configuration. i wouldn't > make an unnessecary downtime if it's not required. After 6.2 is release will of course be too late for you, again. If the problem is not fixed by magic then you'll be in the same position you are now. I really suggest you get that serial console hooked up, read the documentation I pointed you at, and then put in the trivial effort required to let the FreeBSD team help you. > BTW, currently' i'm not on the list, and these emails are not > going to be posted there. > would you be so kind and include the mailing list in your > next reply's CC list? > it would be nice if the mailing list could archive this > discussion. You were the one who dropped the list from the CC in your reply to me ;-) Kris --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFVh5VWry0BWjoQKURAnfmAKDB4OobJx5BPg0zJ9Ya8RO8p5Yf6wCeLY8C syNWrrYogFhEXAGqg68rEB0= =jSPG -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 19:17:45 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 372FE16A4A7 for ; Sat, 11 Nov 2006 19:17:45 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFA0E43D4C for ; Sat, 11 Nov 2006 19:17:43 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id D4F871A3C19; Sat, 11 Nov 2006 11:17:43 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id F1EE751390; Sat, 11 Nov 2006 14:17:33 -0500 (EST) Date: Sat, 11 Nov 2006 14:17:33 -0500 From: Kris Kennaway To: Gergely CZUCZY Message-ID: <20061111191733.GB7930@xor.obsecurity.org> References: <20061111172731.GB39999@harmless.hu> <20061111183110.GA6975@xor.obsecurity.org> <20061111183432.GA41296@harmless.hu> <20061111184025.GA7128@xor.obsecurity.org> <20061111184625.GA41463@harmless.hu> <20061111185228.GA7338@xor.obsecurity.org> <20061111185747.GA56613@harmless.hu> <20061111190245.GA7577@xor.obsecurity.org> <20061111191322.GA56870@harmless.hu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3uo+9/B/ebqu+fSQ" Content-Disposition: inline In-Reply-To: <20061111191322.GA56870@harmless.hu> User-Agent: Mutt/1.4.2.2i Cc: hackers@FreeBSD.org, Kris Kennaway Subject: Re: system randomly freezes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Nov 2006 19:17:45 -0000 --3uo+9/B/ebqu+fSQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 11, 2006 at 08:13:22PM +0100, Gergely CZUCZY wrote: > On Sat, Nov 11, 2006 at 02:02:46PM -0500, Kris Kennaway wrote: > > On Sat, Nov 11, 2006 at 07:57:47PM +0100, Gergely CZUCZY wrote: > >=20 > > > > OK, seems weird to go through all the disruption of changing to a n= ew > > > > OS instead of a few minutes work at a console to give us what we ne= ed > > > > to resolve the matter -- but whatever works for you. > > > already done some stuff like these movings... i'm familiars with them. > > > it's not about a few minutes work. it's about the few hours' downtime= :) > >=20 > > It's a few minutes to perform the additional work at the serial > > console when your system hangs, which is *required* for a developer to > > help with your problem. If you're not willing to do this, there's not > > much more we can do for you. > i will see what can i do. a serial console may be accessable, but i'm not= sure. > i will have to visit the server hotel and talk with the techies there. we > have two boxes there, and it may be somehow possible to connect their > serial ports. the problem is, they are far away in the room from each oth= er. > the hotel only gives system console(VGA+ps2 keyboard) access if i ask. but > this bloody box sometimes ain't even responses to that anyways, the LCD > remains blank. You can't even break to the debugger? > i'd like to solve this, but the technical opportunities are limited here. > we cannot have downtime, and if we have it have to be minimized. as you s= ee > clients won't accept a reasons like "sorry, we were debugging this OS we > run at the server". >=20 > the question will be that, when i have a serial link, and shit happens(tm= ), > should i inspect it myself, or should i scream somewhere for a more decent > person (maybe a developer) to check it? Did you read the developers handbook chapter I pointed you to, yet? > > After 6.2 is release will of course be too late for you, again. If > > the problem is not fixed by magic then you'll be in the same position > > you are now. > why too late? it usually go for a month with a reboot. and it should be > released in a month. as i see, it fits into the time :) Because (if it is a FreeBSD bug) then you'll have more work to do to apply a patch to your system, and also it won't help anyone else who might also be seeing the problem, until 6.3-RELEASE in ~6 months. Kris --3uo+9/B/ebqu+fSQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFViHNWry0BWjoQKURAiZvAKDmTrgDj3hT2hTZptu23qVdkdoY9ACgwD1g aXYiYEEZvvIhchVTpKiatsk= =qoDo -----END PGP SIGNATURE----- --3uo+9/B/ebqu+fSQ-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 19:31:58 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 722C916A47E for ; Sat, 11 Nov 2006 19:31:58 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98CE443DAE for ; Sat, 11 Nov 2006 19:30:59 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 78BCE1A3C19; Sat, 11 Nov 2006 11:30:52 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id B036251390; Sat, 11 Nov 2006 14:30:42 -0500 (EST) Date: Sat, 11 Nov 2006 14:30:42 -0500 From: Kris Kennaway To: Gergely CZUCZY Message-ID: <20061111193042.GA8188@xor.obsecurity.org> References: <20061111183110.GA6975@xor.obsecurity.org> <20061111183432.GA41296@harmless.hu> <20061111184025.GA7128@xor.obsecurity.org> <20061111184625.GA41463@harmless.hu> <20061111185228.GA7338@xor.obsecurity.org> <20061111185747.GA56613@harmless.hu> <20061111190245.GA7577@xor.obsecurity.org> <20061111191322.GA56870@harmless.hu> <20061111191733.GB7930@xor.obsecurity.org> <20061111192406.GA57162@harmless.hu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <20061111192406.GA57162@harmless.hu> User-Agent: Mutt/1.4.2.2i Cc: hackers@FreeBSD.org, Kris Kennaway Subject: Re: system randomly freezes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Nov 2006 19:31:58 -0000 --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 11, 2006 at 08:24:06PM +0100, Gergely CZUCZY wrote: > > You can't even break to the debugger? > well, no. > currently the serial line is not configured nor connected, and the system= console > is not accessable. >=20 > > > i'd like to solve this, but the technical opportunities are limited h= ere. > > > we cannot have downtime, and if we have it have to be minimized. as y= ou see > > > clients won't accept a reasons like "sorry, we were debugging this OS= we > > > run at the server". > > >=20 > > > the question will be that, when i have a serial link, and shit happen= s(tm), > > > should i inspect it myself, or should i scream somewhere for a more d= ecent > > > person (maybe a developer) to check it? > >=20 > > Did you read the developers handbook chapter I pointed you to, yet? > may be. a while back i've read the developers' handbook. but yet, i > haven't read that chapter, currently, i'm in a work, and have little time > to share. Please come back once you've read it, since you're clearly missing some of the points I've been making :-) Kris --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFViTiWry0BWjoQKURAhCaAKCsnBfFFSS7aYuWE0V2LdpgR9qEkQCfVoyR D87bJxryIKYH4npuX7j3erQ= =8MXB -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 11 22:52:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F69016A415 for ; Sat, 11 Nov 2006 22:52:03 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1288D43D6D for ; Sat, 11 Nov 2006 22:52:02 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 4199E2087; Sat, 11 Nov 2006 23:51:58 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 28C3B2085; Sat, 11 Nov 2006 23:51:58 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 1001) id 097EDB85E; Sat, 11 Nov 2006 23:51:58 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: trowa-4 References: <571883.4868.qm@web72011.mail.tp2.yahoo.com> Date: Sat, 11 Nov 2006 23:51:57 +0100 In-Reply-To: <571883.4868.qm@web72011.mail.tp2.yahoo.com> (trowa-4@yahoo.com.tw's message of "Sun, 12 Nov 2006 01:24:30 +0800 (CST)") Message-ID: <86irhlfvg2.fsf@dwp.des.no> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Process Debugging 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: Sat, 11 Nov 2006 22:52:03 -0000 trowa-4 writes: > FreeBSD provides the ptrace system call for controlling and > debugging the execution of a process. > > An alternative to the ptrace system call is the /proc filesystem. > > The functionality provided by the /proc filesystem is the same as > that provided by ptrace; if differs only in its interface. > > Are there having a better method or other method? They both suck, for different reasons. In theory, ptrace sucks less than proc, but it lacks some of proc's functionality, and fixing that is very hard. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no