From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 1 07:16:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72021106564A for ; Mon, 1 Sep 2008 07:16:00 +0000 (UTC) (envelope-from cbeckham@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4118FC0A for ; Mon, 1 Sep 2008 07:16:00 +0000 (UTC) (envelope-from cbeckham@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so958588yxb.13 for ; Mon, 01 Sep 2008 00:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=r+19PXhGXFPXA8Rw9tsgVQ8/H1nJo9k69y5vofI9bTA=; b=CTLHGbKPB6VenJBTcCcLlLK3hPAL0Q/EzMgwsqMPqWEmcbelJ7rkmOPqamRyjrXoFp 6sA88XJXyMdYnpbriIE9nfwHJcdYnOYuMGPcZb8LjoIVhawExqAmSukwKW8rxsJH+dRP ZVbIKu/eEvkm/P+VGDhk9HWq/Q9APDrzO3qr0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=DPklttQZUA8txd/3/sWoDyANthGOOHufdwkdl0dAVlS+g/JV3Uh5VFJzCRUE+nZmYo gJdFQgwPNZEA8L6tp2tpc2Bki/TN/5Vo2zNN4Tn13SrHFWIC9MXe5N2E1SShVlNYpRMA mK2JfjLVFCq25gxy8ym5E2C1Sxsmhxl7VcR+M= Received: by 10.150.230.15 with SMTP id c15mr6287643ybh.156.1220251596074; Sun, 31 Aug 2008 23:46:36 -0700 (PDT) Received: by 10.151.109.2 with HTTP; Sun, 31 Aug 2008 23:46:36 -0700 (PDT) Message-ID: Date: Sun, 31 Aug 2008 23:46:36 -0700 From: "Charles Beckham" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Obytes counter in netstat not incrementing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Sep 2008 07:16:00 -0000 after configuring some rrd's and expecting to grab the data from netstat to log, i noticed that most addresses on the system arn't having the OBytes counter increased. is this just me, or am i missing something? i also have ipfw count rules for each address on the system, to check if the problem was maybe my command line. below is some snippets. x# netstat -ibdnW | grep 208.110.87.83 | perl -p -e 's/ */ /g' fxp0 1500 208.110.87 208.110.87.83 148701705 - 3765807065 1520 - 136897 - - x# ipfw show 5000 | grep 208.110.87.83 05000 423144 18533923 count ip from any to 208.110.87.83 05000 419195 85561587 count ip from 208.110.87.83 to any x# netstat -ibdnW | grep 208.110.87.83 | perl -p -e 's/ */ /g' fxp0 1500 208.110.87 208.110.87.83 148702426 - 3765843377 1520 - 136897 - - x# ipfw show 5000 | grep 208.110.87.83 05000 423198 18536930 count ip from any to 208.110.87.83 05000 419228 85565367 count ip from 208.110.87.83 to any x# netstat -ibdnW | grep 208.110.87.83 | perl -p -e 's/ */ /g' fxp0 1500 208.110.87 208.110.87.83 148702600 - 3765853440 1520 - 136897 - - as you can see, the ipfw counters are increasing, but not the netstat output, any ideas, or am i missing something? -- - Charles Beckham From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 1 09:06:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EA7B106569A for ; Mon, 1 Sep 2008 09:06:23 +0000 (UTC) (envelope-from ahornung@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by mx1.freebsd.org (Postfix) with ESMTP id EC4028FC1D for ; Mon, 1 Sep 2008 09:06:22 +0000 (UTC) (envelope-from ahornung@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2462940rvf.43 for ; Mon, 01 Sep 2008 02:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=WnphO1mbqxeO+gmn1tibZl9nY4J4ZwGoyokJZWXf4KE=; b=tUjGR2uOKqPs2UzPhMYn1RXrQU2DFYV0ZgrxOrtMJhepTdQqUro5II11ExlaksyoIg L/cN3AGeTnqWs0OcPhBtGRGfeLQLCggCn0X9TeO8SLev+DOS/haiIkuicc2k6hYhcc8v EMoWLBRhz3pg0UW7jt/8fcmU7Msdy3tYM40PY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=YXrf0zU5lwK8HEe8Wq3+w1V6LHqHLJspLfoV1LTrOwTiBPhRYxkeC+JwDVRmY6BUwL IY/2nlWsYjGEsdvf/BYzzHHpXJxBo0S7vDIIWclso+DanIIfir172aQrn3b1IvyGahKh tgf/HjWDguZ9H3PRTdfAV4nummzgM7pGWw/6I= Received: by 10.141.133.14 with SMTP id k14mr3301263rvn.127.1220259982345; Mon, 01 Sep 2008 02:06:22 -0700 (PDT) Received: by 10.141.96.2 with HTTP; Mon, 1 Sep 2008 02:06:22 -0700 (PDT) Message-ID: <10fba67b0809010206ya78c526n566e4e643f7a2b64@mail.gmail.com> Date: Mon, 1 Sep 2008 10:06:22 +0100 From: Alex To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Driver to Driver communication, with kobj? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Sep 2008 09:06:23 -0000 Hi, I was wondering what the best way of doing driver to driver communication is. I'm trying to enqueue an ata-command from a completely different driver (nothing to do with storage / ata). I would just bluntly use the ata_controlcmd() function, but it would require for me to know the device_t of the drive I'm trying to access. I don't know which device_t it would be, nor do I know how to find it out. If this is a no-go... I really need some help with kobj, as I can't figure it out fully... How do you use a kobj "exported" method from another driver? Thank you in advance, Alex From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 1 11:22:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8304810656A0 for ; Mon, 1 Sep 2008 11:22:57 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id 11D3E8FC1A for ; Mon, 1 Sep 2008 11:22:56 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1213256fgb.35 for ; Mon, 01 Sep 2008 04:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=jCYZUAl/ZFE22mmp+CuwdIhwg9ds3Pb7A82qxyM3qD0=; b=hix5JKLPU0qqFOTW4YYWlSB51KD1C/uosR0/dyli6o5gML5J0S0oDi3jMzTg7cdfDg RZThldA79ROxihaVmoEZc7qgr0vqWY8GM4ihrB8wCYHTa3Khm3isyc/6QFJBnXvnCb3w pZJEiOaReDX/rL+XeG0LjT/ZuZo9ChJ2YdQv0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=OzXwE7dcGzL3HAbnLAg3mEQ204LkVVlZXbUFIAYtWQw5+IVUE7fvse45PuK3J2IMoV c1bjVivrYu4lZCnKwV1Sc0tpktVwZzitMv5CDnJtXmfq1BEuMwOu+SCM9DLufoUgYHqU Q24F7Ge6k8SiIGMRIPyEl1bkvbhicKYd3oUqE= Received: by 10.86.82.6 with SMTP id f6mr4481097fgb.38.1220266687731; Mon, 01 Sep 2008 03:58:07 -0700 (PDT) Received: from hunin.home ( [83.228.190.5]) by mx.google.com with ESMTPS id d4sm6481060fga.5.2008.09.01.03.58.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Sep 2008 03:58:06 -0700 (PDT) Message-Id: <0F17887A-AC71-49F0-B25D-8F2DC8BB5465@gmail.com> From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Mon, 1 Sep 2008 12:58:05 +0200 X-Mailer: Apple Mail (2.926) Subject: kldload: unexpected relocation type 10 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Sep 2008 11:22:57 -0000 Hi guys, I'm trying to do something unusual - to build my own module, mixed with the Click (Modular Router). In order to do so, I had to write a Makefile which borrows a lot from Click's Makefile. Like all other kernel modules, I include , but I'm modifying CFLAGS (with +=), and CXXFLAGS. I also have -DHAVE_INT64_IS_LONG there. For CXXFLAGS I use -fpermissive -fno-exceptions -fno-rtti. I had to do all this creaziness because I had to build CLick first (its .cc files), and then link all them with my code. Now I'm getting this: "kldload: unexpected relocation type 10" and: "link_elf_obj: symbol M_TEMP undefined" I cannot find where this M_TEMP comes from, because I'm including . for the relocation, I don't know what to do. I'm not using - g, as described on some web forum. Any hints? Cheers, Nikola From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 1 22:07:08 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE4EC106567A; Mon, 1 Sep 2008 22:07:08 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.ipv6.0x20.net [IPv6:2001:aa8:fffb::3]) by mx1.freebsd.org (Postfix) with ESMTP id 62FA48FC18; Mon, 1 Sep 2008 22:07:07 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: by mail.0x20.net (Postfix, from userid 1002) id 5C1333A6AF; Tue, 2 Sep 2008 00:07:06 +0200 (CEST) Date: Tue, 2 Sep 2008 00:07:06 +0200 From: Lars Engels To: Alexander Leidinger Message-ID: <20080901220706.GB3961@e.0x20.net> References: <200808191305.m7JD5Tbl007123@brother.ludd.ltu.se> <20080819175332.482767np3ciixag4@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oAjj1ZwgLg4oRN9q" Content-Disposition: inline In-Reply-To: <20080819175332.482767np3ciixag4@webmail.leidinger.net> X-Editor: VIM - Vi IMproved 7.1 X-Operation-System: FreeBSD 5.5-RELEASE-p19 User-Agent: mutt-ng/devel-r804 (FreeBSD) Cc: usb@freebsd.org, freebsd-hackers@freebsd.org, Peter B Subject: Re: USB Video class X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lars Engels List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2008 22:07:09 -0000 --oAjj1ZwgLg4oRN9q Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 19, 2008 at 05:53:32PM +0200, Alexander Leidinger wrote: > Quoting "Peter B" (from Tue, 19 Aug 2008 15:05:29 +0200 = (MEST)): >=20 > > > >Is there any ongoing project towards USB Video class support in FreeBSD = =2E.? >=20 > This is better asked on usb@ (CCed). I'm not aware of such an effort, fee= l free to start it (you better wait some days until the=20 > new USB stack hits CVS). NetBSD had a Summer of Code project and it seems to be pretty successful: http://netbsd-soc.sourceforge.net/projects/uvc/ Perhaps one can take this as a starting point? --oAjj1ZwgLg4oRN9q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAki8Z4oACgkQKc512sD3afgcigCfScXZf2d576xn/2Utr2MGqrJt h3oAoIfUS2eszLD7OTWmpwborcQCQY8e =0Tac -----END PGP SIGNATURE----- --oAjj1ZwgLg4oRN9q-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 1 23:19:41 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BF511065670; Mon, 1 Sep 2008 23:19:41 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from mother.ludd.ltu.se (mother.ludd.ltu.se [130.240.16.3]) by mx1.freebsd.org (Postfix) with ESMTP id 028E68FC1B; Mon, 1 Sep 2008 23:19:40 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from brother.ludd.ltu.se (root@brother.ludd.ltu.se [130.240.16.78]) by mother.ludd.ltu.se (8.13.6+Sun/8.12.10) with ESMTP id m81NJcia010364; Tue, 2 Sep 2008 01:19:38 +0200 (MEST) Received: from brother.ludd.ltu.se (pb@localhost [127.0.0.1]) by brother.ludd.ltu.se (8.13.6+Sun/8.12.2) with ESMTP id m81NJcN3006027; Tue, 2 Sep 2008 01:19:38 +0200 (MEST) Received: (from pb@localhost) by brother.ludd.ltu.se (8.13.6+Sun/8.13.6/Submit) id m81NJckk006025; Tue, 2 Sep 2008 01:19:38 +0200 (MEST) From: Peter B Message-Id: <200809012319.m81NJckk006025@brother.ludd.ltu.se> To: lme@FreeBSD.org Date: Tue, 2 Sep 2008 01:19:38 +0200 (MEST) In-Reply-To: <20080901220706.GB3961@e.0x20.net> from "Lars Engels" at Sep 02, 2008 12:07:06 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 02 Sep 2008 02:45:59 +0000 Cc: usb@FreeBSD.org, freebsd-hackers@FreeBSD.org Subject: Re: USB Video class X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Sep 2008 23:19:41 -0000 >> > >> >Is there any ongoing project towards USB Video class support in FreeBSD = >=2E.? >>=20 >> This is better asked on usb@ (CCed). I'm not aware of such an effort, fee= >l free to start it (you better wait some days until the=20 >> new USB stack hits CVS). >NetBSD had a Summer of Code project and it seems to be pretty >successful: >http://netbsd-soc.sourceforge.net/projects/uvc/ >Perhaps one can take this as a starting point? When testing. I found it seems to be easier to port the OpenBSD code. I think it's because it's more integrated into the kernel sources. The current status is proper probe, attach, and capability dump. I think I know how to approach the problem better now after messing with code for awhile. (however some other things are using my time atm) From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 2 16:14:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 335CF1065672 for ; Tue, 2 Sep 2008 16:14:59 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id AE0068FC1E for ; Tue, 2 Sep 2008 16:14:58 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id m82FfVJJ004942; Tue, 2 Sep 2008 08:41:31 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id m82FfVfw004941; Tue, 2 Sep 2008 08:41:31 -0700 (PDT) (envelope-from david) Date: Tue, 2 Sep 2008 08:41:31 -0700 From: David Wolfskill To: Charles Beckham Message-ID: <20080902154131.GH1089@bunrab.catwhisker.org> Mail-Followup-To: David Wolfskill , Charles Beckham , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzX0AQGjRQPusK/O" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Obytes counter in netstat not incrementing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Sep 2008 16:14:59 -0000 --NzX0AQGjRQPusK/O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 31, 2008 at 11:46:36PM -0700, Charles Beckham wrote: > [... "netstat -ibdnW" doesn't show changes in Obytes (or Opkts)...] > ... > as you can see, the ipfw counters are increasing, but not the netstat > output, any ideas, or am i missing something? First, what is the output of "uname -r" (at least)? I'm experimenting with using "netstat -nibf inet" to acquire such information, and on a FreeBSD 6.3-STABLE system built 25 Aug 2008, I do not see the problem: dwolf-bsd(6.3-S)[1] date;netstat -nibf inet; sleep 10; date; netstat -nibf = inet Tue Sep 2 08:40:26 PDT 2008 Name Mtu Network Address Ipkts Ierrs Ibytes Op= kts Oerrs Obytes Coll em0 1500 172.24.24/22 172.24.24.91 16954669 - 3460328864 8173= 509 - 1440161156 - lo0 16384 127 127.0.0.1 4283768 - 627953338 4283= 768 - 627953338 - Tue Sep 2 08:40:36 PDT 2008 Name Mtu Network Address Ipkts Ierrs Ibytes Op= kts Oerrs Obytes Coll em0 1500 172.24.24/22 172.24.24.91 16954688 - 3460330996 8173= 528 - 1440163696 - lo0 16384 127 127.0.0.1 4283806 - 627956814 4283= 807 - 627957022 - dwolf-bsd(6.3-S)[2]=20 Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --NzX0AQGjRQPusK/O Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAki9XqoACgkQmprOCmdXAD3stgCgiMSBu7bLkmpnRrHw/5q1y2lI Ge0AnisGZAlSyD6NiYfyC+D+93IBddMj =/dNi -----END PGP SIGNATURE----- --NzX0AQGjRQPusK/O-- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 2 20:15:17 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BFD01066167 for ; Tue, 2 Sep 2008 20:15:17 +0000 (UTC) (envelope-from cbeckham@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 4B8E38FC18 for ; Tue, 2 Sep 2008 20:15:17 +0000 (UTC) (envelope-from cbeckham@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1377823yxb.13 for ; Tue, 02 Sep 2008 13:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ciPUzvj2/tEcSYYbRjtjTy6uPhdtaWFJHgKq5rmJZ6s=; b=xq36D6q4elGGC5VC/3cIrykS2cB6LEbgtBN4QRoee2XRQg1phuv225NV68Duf1AfIv /GD9SfKq4e/Lmm+DQo/1/xWW++r3Eg+pfo2utkQ6Ac+4AWk9qbC7671/k9WRD0RistR2 xYiaK9oxLuuTUF2cuBpcIOaFrd6YVbSoyD1GI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=r1FCdfzRffGTPpu75k+oj6wYlLgqRHJ4oM+w9CLSQp7PZG/g9GQ3BTudrPlY4RfDdi fhe9yK5pyryH3Szb0cbmY6IeUEHU+0cyUIa0BReanGGmefqYsqhi8DXi12464Zn7jO99 LTztqmQzuZYkQxjzfiTav08Sm+7+/CvzUxGtY= Received: by 10.150.228.12 with SMTP id a12mr4733601ybh.97.1220386515676; Tue, 02 Sep 2008 13:15:15 -0700 (PDT) Received: by 10.151.109.2 with HTTP; Tue, 2 Sep 2008 13:15:15 -0700 (PDT) Message-ID: Date: Tue, 2 Sep 2008 13:15:15 -0700 From: "Charles Beckham" To: "David Wolfskill" , "Charles Beckham" , freebsd-hackers@freebsd.org In-Reply-To: <20080902154131.GH1089@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080902154131.GH1089@bunrab.catwhisker.org> Cc: Subject: Re: Obytes counter in netstat not incrementing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Sep 2008 20:15:17 -0000 sorry, heres a uname x# uname -a FreeBSD x.worxtech.net 6.3-STABLE FreeBSD 6.3-STABLE #1: Sun May 25 12:15:51 CDT 2008 worxtech@x.worxtech.net:/usr/obj/usr/src/sys/X i386 also i should point out that this machine has ~ 100 alias addresses on it, and the problem doesnt seem to appear with all of them, some appear to have a proper counter. x# netstat -nibf inet Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll fxp0 1500 208.110.87 208.110.87.43 16734290 - 3093571704 284564171 - 685127971 - fxp0 1500 208.110.87 208.110.87.44 848085 - 82624659 46376 - 2604545 - heres output from the address i posted before, which is the highest usage on the machine fxp0 1500 208.110.87 208.110.87.83 169838660 - 400838840 1520 - 136897 - as you can see, the obytes hasnt gone up in a few days. i'm not quite sure why this problem is persistent but could it be related to my netmask address for the inet alias? i did some research and it appears i should be using 0xffffffff for my netmask for the alias interface? please let me know any thaughts you may have. x# ifconfig fxp0 fxp0: flags=8843 mtu 1500 options=b inet 208.110.87.43 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.44 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.45 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.46 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.47 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.48 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.49 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.20 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.120 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.121 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.122 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.123 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.124 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.125 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.126 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.127 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.128 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.129 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.130 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.131 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.132 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.133 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.134 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.135 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.136 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.137 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.138 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.139 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.140 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.141 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.142 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.143 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.144 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.145 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.146 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.147 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.148 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.149 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.150 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.151 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.152 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.153 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.154 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.155 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.156 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.157 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.158 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.159 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.160 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.40 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.98 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.99 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.100 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.101 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.41 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.42 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.50 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.51 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.52 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.53 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.54 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.55 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.56 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.57 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.58 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.59 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.60 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.61 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.62 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.63 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.64 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.65 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.66 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.67 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.68 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.69 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.70 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.71 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.72 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.73 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.74 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.75 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.76 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.77 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.78 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.79 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.80 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.81 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.82 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.83 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.84 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.85 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.86 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.87 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.88 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.89 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.90 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.91 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.92 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.93 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.94 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.95 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.96 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.97 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.102 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.103 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.104 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.105 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.106 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.107 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.108 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.109 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.110 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.111 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.112 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.113 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.114 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.115 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.116 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.117 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.118 netmask 0xffffff00 broadcast 208.110.87.255 inet 208.110.87.119 netmask 0xffffff00 broadcast 208.110.87.255 ether 00:30:48:24:85:7d media: Ethernet autoselect (100baseTX ) status: active x# On Tue, Sep 2, 2008 at 8:41 AM, David Wolfskill wrote: > On Sun, Aug 31, 2008 at 11:46:36PM -0700, Charles Beckham wrote: >> [... "netstat -ibdnW" doesn't show changes in Obytes (or Opkts)...] >> ... >> as you can see, the ipfw counters are increasing, but not the netstat >> output, any ideas, or am i missing something? > > First, what is the output of "uname -r" (at least)? > > I'm experimenting with using "netstat -nibf inet" to acquire such > information, and on a FreeBSD 6.3-STABLE system built 25 Aug 2008, I do > not see the problem: > > dwolf-bsd(6.3-S)[1] date;netstat -nibf inet; sleep 10; date; netstat -nibf inet > Tue Sep 2 08:40:26 PDT 2008 > Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll > em0 1500 172.24.24/22 172.24.24.91 16954669 - 3460328864 8173509 - 1440161156 - > lo0 16384 127 127.0.0.1 4283768 - 627953338 4283768 - 627953338 - > Tue Sep 2 08:40:36 PDT 2008 > Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll > em0 1500 172.24.24/22 172.24.24.91 16954688 - 3460330996 8173528 - 1440163696 - > lo0 16384 127 127.0.0.1 4283806 - 627956814 4283807 - 627957022 - > dwolf-bsd(6.3-S)[2] > > Peace, > david > -- > David H. Wolfskill david@catwhisker.org > Depriving a girl or boy of an opportunity for education is evil. > > See http://www.catwhisker.org/~david/publickey.gpg for my public key. > -- - Charles From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 2 20:38:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14D8D1065673 for ; Tue, 2 Sep 2008 20:38:11 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id B8A988FC21 for ; Tue, 2 Sep 2008 20:38:10 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id m82Kc9X2006159; Tue, 2 Sep 2008 13:38:09 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id m82Kc9xL006158; Tue, 2 Sep 2008 13:38:09 -0700 (PDT) (envelope-from david) Date: Tue, 2 Sep 2008 13:38:09 -0700 From: David Wolfskill To: Charles Beckham Message-ID: <20080902203809.GK1089@bunrab.catwhisker.org> Mail-Followup-To: David Wolfskill , Charles Beckham , freebsd-hackers@freebsd.org References: <20080902154131.GH1089@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4LwthZj+AV2mq5CX" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Obytes counter in netstat not incrementing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Sep 2008 20:38:11 -0000 --4LwthZj+AV2mq5CX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 02, 2008 at 01:15:15PM -0700, Charles Beckham wrote: > sorry, heres a uname > x# uname -a > FreeBSD x.worxtech.net 6.3-STABLE FreeBSD 6.3-STABLE #1: Sun May 25 > 12:15:51 CDT 2008 worxtech@x.worxtech.net:/usr/obj/usr/src/sys/X > i386 >=20 > also i should point out that this machine has ~ 100 alias addresses on > it, and the problem doesnt seem to appear with all of them, some > appear to have a proper counter. > ... > i'm not quite sure why this problem is persistent but could it be > related to my netmask address for the inet alias? > i did some research and it appears i should be using 0xffffffff for my > netmask for the alias interface? please let me know any thaughts you > may have. Ah. I recall that in older releases of FreeBSD, attempting to create such "alias" entries netmask specifications that amounted to having different "alias" specifications sharing a (sub)net generally failed to work, with the suggestion to use 0xffffffff as the netmask for all such alias specification being the usual suggestion. Somehow, I thought that someone had done some work on this, but on a 6.3-STABLE system built 25 August, I still see in ifconfig(1): alias Establish an additional network address for this interface. T= his is sometimes useful when changing network numbers, and one wis= hes to accept packets addressed to the old interface. If the addr= ess is on the same subnet as the first network address for this interface, a non-conflicting netmask must be given. Usually 0xffffffff is most appropriate. so unless there's some special reason you're using a different netmask for the alia entrie, I think I'd suggest switching to 0xffffffff. >.... Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --4LwthZj+AV2mq5CX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAki9pDAACgkQmprOCmdXAD2VtACeLt9q4bHRf0dbJlHUYoi1okfs C9IAn2koNVXfCZ8p8pTtOXsS0DaS75Cu =r0dZ -----END PGP SIGNATURE----- --4LwthZj+AV2mq5CX-- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 00:22:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B890106568E for ; Wed, 3 Sep 2008 00:22:13 +0000 (UTC) (envelope-from cbeckham@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 1CA7E8FC08 for ; Wed, 3 Sep 2008 00:22:12 +0000 (UTC) (envelope-from cbeckham@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1432390yxb.13 for ; Tue, 02 Sep 2008 17:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=NW0kSviOAvC86JjOz9fjDtJroPo0SGa6232ZY3/K4+U=; b=Txi5tIZkLfsYNqoFfyY2TmVDjZSehtvCJU1RSDARzQwwSyZ79uTFc71L0XmUHL+3ja luLM3GNdLqvRzoVJf14/fTxg4Q9waq3tyYVVu7w0WiLmyoKpl9/tRYNl/p++s12TBkNL Y3QV87xoDNsls5gjFJybTkGZ2igx+YsKYHh+s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=wxIehJ9H/RxuT2wsoRZg1wU+f4yRQRO8RAKNW0qNeijyRT/xrlWNzOUavkbxUgwHyq FGeDUAae8m8q144dOCyYn+dVd1kf7lMr4gVS5b3XL/uHEFGp9zGoHC4jpywpiCGvvpyd 8JSiUIj/Lgxexi3UbWACHIdHuXrh2nfjKq7l0= Received: by 10.151.42.21 with SMTP id u21mr5762796ybj.195.1220401330787; Tue, 02 Sep 2008 17:22:10 -0700 (PDT) Received: by 10.151.109.2 with HTTP; Tue, 2 Sep 2008 17:22:10 -0700 (PDT) Message-ID: Date: Tue, 2 Sep 2008 17:22:10 -0700 From: "Charles Beckham" To: "David Wolfskill" , "Charles Beckham" , freebsd-hackers@freebsd.org In-Reply-To: <20080902203809.GK1089@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080902154131.GH1089@bunrab.catwhisker.org> <20080902203809.GK1089@bunrab.catwhisker.org> Cc: Subject: Re: Obytes counter in netstat not incrementing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 00:22:13 -0000 i've already made the changes to rc.conf, but since its a shared machine and almost all addresses are in use, i'll have to schedule a reboot before i can make changes effective, i will post a follwup after i've made these changes. thanks for you assistance. On Tue, Sep 2, 2008 at 1:38 PM, David Wolfskill wrote: > On Tue, Sep 02, 2008 at 01:15:15PM -0700, Charles Beckham wrote: >> sorry, heres a uname >> x# uname -a >> FreeBSD x.worxtech.net 6.3-STABLE FreeBSD 6.3-STABLE #1: Sun May 25 >> 12:15:51 CDT 2008 worxtech@x.worxtech.net:/usr/obj/usr/src/sys/X >> i386 >> >> also i should point out that this machine has ~ 100 alias addresses on >> it, and the problem doesnt seem to appear with all of them, some >> appear to have a proper counter. >> ... >> i'm not quite sure why this problem is persistent but could it be >> related to my netmask address for the inet alias? >> i did some research and it appears i should be using 0xffffffff for my >> netmask for the alias interface? please let me know any thaughts you >> may have. > > Ah. I recall that in older releases of FreeBSD, attempting to create > such "alias" entries netmask specifications that amounted to having > different "alias" specifications sharing a (sub)net generally failed to > work, with the suggestion to use 0xffffffff as the netmask for all such > alias specification being the usual suggestion. > > Somehow, I thought that someone had done some work on this, but on a > 6.3-STABLE system built 25 August, I still see in ifconfig(1): > > alias Establish an additional network address for this interface. This > is sometimes useful when changing network numbers, and one wishes > to accept packets addressed to the old interface. If the address > is on the same subnet as the first network address for this > interface, a non-conflicting netmask must be given. Usually > 0xffffffff is most appropriate. > > so unless there's some special reason you're using a different netmask for > the alia entrie, I think I'd suggest switching to 0xffffffff. > >>.... > > Peace, > david > -- > David H. Wolfskill david@catwhisker.org > Depriving a girl or boy of an opportunity for education is evil. > > See http://www.catwhisker.org/~david/publickey.gpg for my public key. > -- - Charles From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 09:06:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 294C3106564A for ; Wed, 3 Sep 2008 09:06:19 +0000 (UTC) (envelope-from kr.lekha@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by mx1.freebsd.org (Postfix) with ESMTP id F0A738FC23 for ; Wed, 3 Sep 2008 09:06:18 +0000 (UTC) (envelope-from kr.lekha@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3746156rvf.43 for ; Wed, 03 Sep 2008 02:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=xMsex7NWOwOyiSjpOmDxctPOVDO3D+mTiTnQE0SCDfo=; b=R7HTGH+fTdDrr0JvOFz5P/pUIKm9vlwVhi1c29Y0r/H6AxQwkHNPBtl/k4/BtiO8z5 BKddawpp1vKAMqbI20PX8SlKW6TigkCbyfSMPi316+hJSqte9ofvbi17FIbq612hp4cU 9qTBh8Uf2zPI1grZhKbQOH2j/S7DTnJar5OQs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=S9gfomKFF0zPWuO08ejS3VCuMN9kIEidluII0oiZsdyFwhjxFOm4ijz1Zq/YEvxpXt P5M/Ltm7exqTw2xiG7VMvCkmnHbhhHeYqrtFzkO0cVGvDjzbot2tCPJbCCuH4Qthameb EAOmnXw0xeleb3zG9Yz5bJcDbgS5wt22Stzew= Received: by 10.141.164.13 with SMTP id r13mr4765576rvo.53.1220430887377; Wed, 03 Sep 2008 01:34:47 -0700 (PDT) Received: by 10.141.212.11 with HTTP; Wed, 3 Sep 2008 01:34:47 -0700 (PDT) Message-ID: <96b2ec350809030134j73a61369m35395391a1218975@mail.gmail.com> Date: Wed, 3 Sep 2008 09:34:47 +0100 From: "kr Lekha" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: killing a kthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 09:06:19 -0000 Hi, i wanted to kill a kthread created by my module, There is no actual kthread_kill to kill it hence I tried to send kill signal to thread psignal(p, SIGTERM); psignal(p, SIGKILL); killproc(p,"messeage"); and kthread_suspend() Nothing seems to be killing the kthread, I still see it [root@ /usr/src]# ps awx -l | grep kernel UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 1048 1 0 20 0 0 8 ktsusp DL ?? 0:00.01 [new_kernel_thread] I have noticed that generally if kernel module wanted to kill a thread then it calls { wakeup(p); msleep(p,0); /*or tsleep*/ } This puts the thread to sleep forever. However kthread_suspend also performs same actions. Does scheduler take care to killing it? I read that after 2 min scheduler wakes up the thread and eventually kills it, i see the same kthread suspended even after a day I would appreciate any thoughts in this reagard. Thanks, -lekha From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 09:57:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1C5F106567B for ; Wed, 3 Sep 2008 09:57:05 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id 398E18FC16 for ; Wed, 3 Sep 2008 09:57:04 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so1116795eyi.7 for ; Wed, 03 Sep 2008 02:57:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent:sender; bh=CkSim9BCFhJSDFT/dFlKCWL+gSaeEl3vS6fRlHhzKrE=; b=nhHTlU/asK/cH/NGsSEjscMKN4qi1I/WKrS5Nd7nfCOOt5oVdyq3sLhGQrXJKDVj2r v0x+A+Vpwo/H6l9WyvwtKsB9l/LwsBlnIBKnc2eTxPi9RxMf1QKkQsemAwihCQoFsiFB S4kn7N7XmFqOwdEpz5SndSemLMpQPXi9EKgVU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent:sender; b=Turb2Ytirvj8Mhj9YkGXJTJQcqmBxIUlvaSgVP91y8lxlvQBpb2d2cG+6oxEM/4VSf eHD4oJo7XlDq0pyOGjtA79zf2SHfPDDJjgnH5ajaP30bU62xbOc5XfhwvJ2dy4Jza+u2 tWgMCGYU+EYgaPZAj8BFbGg8vgEmGK9V1+/e4= Received: by 10.210.47.7 with SMTP id u7mr9808712ebu.165.1220435823811; Wed, 03 Sep 2008 02:57:03 -0700 (PDT) Received: from alpha.local ( [83.144.140.92]) by mx.google.com with ESMTPS id f13sm1555540gvd.10.2008.09.03.02.57.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Sep 2008 02:57:02 -0700 (PDT) Received: by alpha.local (Postfix, from userid 1001) id 13769F2EE; Wed, 3 Sep 2008 10:56:06 +0100 (WEST) Date: Wed, 3 Sep 2008 10:56:06 +0100 From: Rui Paulo To: kr Lekha Message-ID: <20080903095605.GB21178@alpha.local> References: <96b2ec350809030134j73a61369m35395391a1218975@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96b2ec350809030134j73a61369m35395391a1218975@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: Rui Paulo Cc: freebsd-hackers@freebsd.org Subject: Re: killing a kthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 09:57:05 -0000 On Wed, Sep 03, 2008 at 09:34:47AM +0100, kr Lekha wrote: > Hi, > i wanted to kill a kthread created by my module, There is no actual > kthread_kill to kill it > > hence I tried to send kill signal to thread > psignal(p, SIGTERM); > psignal(p, SIGKILL); > killproc(p,"messeage"); > and kthread_suspend() > > Nothing seems to be killing the kthread, I still see it > [root@ /usr/src]# ps awx -l | grep kernel > UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND > 0 1048 1 0 20 0 0 8 ktsusp DL > ?? 0:00.01 [new_kernel_thread] > > > I have noticed that generally if kernel module wanted to kill a thread then > it calls > { > wakeup(p); > msleep(p,0); /*or tsleep*/ > } > > This puts the thread to sleep forever. However kthread_suspend also performs > same actions. > Does scheduler take care to killing it? > > I read that after 2 min scheduler wakes up the thread and > eventually kills it, > i see the same kthread suspended even after a day > > I would appreciate any thoughts in this reagard. > Thanks, When the thread finishes what it's doing, it should call kthread_exit(). Regards, -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 11:31:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D97B1065675 for ; Wed, 3 Sep 2008 11:31:34 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id ACCC78FC19 for ; Wed, 3 Sep 2008 11:31:33 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from rebelion.Sisis.de ([193.31.10.34]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Sep 2008 13:31:32 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m83BVWMO008771 for freebsd-hackers@freebsd.org; Wed, 3 Sep 2008 13:31:32 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Wed, 3 Sep 2008 13:31:32 +0200 From: Matthias Apitz To: freebsd-hackers@freebsd.org Message-ID: <20080903113131.GA8697@rebelion.Sisis.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) X-OriginalArrivalTime: 03 Sep 2008 11:31:32.0380 (UTC) FILETIME=[9D77FDC0:01C90DB8] Subject: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2008 11:31:34 -0000 Hello, I'm using WPA to connect to my various Wifi AP's (office, home, partner locations) and have them well configured in the wpa_supplicant.conf(5) file; from time to time at home I encounter that it is associating with an unknown AP of my neighbourhood: # ifconfig iwi0 iwi0: flags=8843 metric 0 mtu 1500 ether 00:13:ce:a1:e6:81 inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) status: associated ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84 authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 roam:rate11g 5 protmode CTS roaming MANUAL # ifconfig iwi0 list scan SSID BSSID CHAN RATE S:N INT CAPS o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA the network with SSID 'o2DSL_kJaR' is not im my /etc/wpa_supplicant.conf; how this is possible and how can I prevent this? thx matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ We should all learn from the peoples of The Netherlands, France and Ireland. Aprendamos todos de los pueblos de Holanda, Francia e Irlanda. From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 12:00:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D106D1065675 for ; Wed, 3 Sep 2008 12:00:38 +0000 (UTC) (envelope-from andrit@ukr.net) Received: from kyiv.inobject.com (kyiv.inobject.com [62.221.40.190]) by mx1.freebsd.org (Postfix) with ESMTP id 47D8D8FC26 for ; Wed, 3 Sep 2008 12:00:38 +0000 (UTC) (envelope-from andrit@ukr.net) Received: from [192.168.10.67] ([192.168.10.67]) by kyiv.inobject.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Sep 2008 14:48:08 +0300 Message-ID: <48BE7976.6090705@ukr.net> Date: Wed, 03 Sep 2008 14:48:06 +0300 From: Andriy Tkachuk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3pre) Gecko/2008090118 SeaMonkey/2.0a1pre MIME-Version: 1.0 To: Matthias Apitz References: <20080903113131.GA8697@rebelion.Sisis.de> In-Reply-To: <20080903113131.GA8697@rebelion.Sisis.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Sep 2008 11:48:08.0505 (UTC) FILETIME=[EF349A90:01C90DBA] Cc: freebsd-hackers@freebsd.org Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 12:00:38 -0000 On 2008-09-03 14:31, Matthias Apitz wrote: > from time to time at home I encounter that it is associating with an > unknown AP of my neighbourhood: > > how this is possible and how can I prevent this? > Try to get wpa_supplicant log. Also you are welcome to write to hostap@lists.shmoo.com mail list about this problem (but specify there version of supplicant). Regards, Andriy From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 12:16:27 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 013CC106567A for ; Wed, 3 Sep 2008 12:16:27 +0000 (UTC) (envelope-from kr.lekha@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by mx1.freebsd.org (Postfix) with ESMTP id C0FD88FC1C for ; Wed, 3 Sep 2008 12:16:26 +0000 (UTC) (envelope-from kr.lekha@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3834433rvf.43 for ; Wed, 03 Sep 2008 05:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=a82gXYNMEF2mBmnT5quA2uCaz7C2tJzJukqtAofMXAU=; b=Sr12jOlHvkZLiINJUCuQetD6BgtkbK/32efbhLAw6ug4JURVxv7MDfqbsiSIRzY1vF 251VrkvaRyMDS6XF/fw0d8/dEBNxbBjCLvsPjjs6lx0q5S58m1AcCHn4rpmDVMutuGfv oH1mrxNByajVbz7LlBYzjFbhrwezNkuRpQ5uo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=RXjzXnE9mz7yhvnZ9l76fx71a1JsEIkR2lZgOT3ngSS8nHcYUXfYDSLw2NscPTfJHm RU0dVvGdGL5XcdgmFLXTLoxwShyHJk7IJkbvnrUCcrdnE9wdB9XA877sz963mEsZMISB 29dGUJCgIjImJZ7MmTWLTYuXa4dG+QT08g5cE= Received: by 10.140.193.16 with SMTP id q16mr4855241rvf.173.1220444186465; Wed, 03 Sep 2008 05:16:26 -0700 (PDT) Received: by 10.141.212.11 with HTTP; Wed, 3 Sep 2008 05:16:26 -0700 (PDT) Message-ID: <96b2ec350809030516y2d6f26d1h3cd7eb39231c4da0@mail.gmail.com> Date: Wed, 3 Sep 2008 13:16:26 +0100 From: "kr Lekha" To: "Rui Paulo" In-Reply-To: <20080903095605.GB21178@alpha.local> MIME-Version: 1.0 References: <96b2ec350809030134j73a61369m35395391a1218975@mail.gmail.com> <20080903095605.GB21178@alpha.local> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: killing a kthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 12:16:27 -0000 I understand when thread finishes it should call kthread_exit(). but if this thread was suspended before it finished, it might not be able to call kthread_exit(). Due to which we still see the thread suspended. I am unable to kill it even with killproc / psignal with in the kernel module. Thanks, Lekha On 9/3/08, Rui Paulo wrote: > > On Wed, Sep 03, 2008 at 09:34:47AM +0100, kr Lekha wrote: > > Hi, > > i wanted to kill a kthread created by my module, There is no actual > > kthread_kill to kill it > > > > hence I tried to send kill signal to thread > > psignal(p, SIGTERM); > > psignal(p, SIGKILL); > > killproc(p,"messeage"); > > and kthread_suspend() > > > > Nothing seems to be killing the kthread, I still see it > > [root@ /usr/src]# ps awx -l | grep kernel > > UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME > COMMAND > > 0 1048 1 0 20 0 0 8 ktsusp DL > > ?? 0:00.01 [new_kernel_thread] > > > > > > I have noticed that generally if kernel module wanted to kill a thread > then > > it calls > > { > > wakeup(p); > > msleep(p,0); /*or tsleep*/ > > } > > > > This puts the thread to sleep forever. However kthread_suspend also > performs > > same actions. > > Does scheduler take care to killing it? > > > > I read that after 2 min scheduler wakes up the thread and > > eventually kills it, > > i see the same kthread suspended even after a day > > > > I would appreciate any thoughts in this reagard. > > Thanks, > > When the thread finishes what it's doing, it should call kthread_exit(). > > Regards, > -- > Rui Paulo > From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 15:04:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21981106566C for ; Wed, 3 Sep 2008 15:04:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id EA6D68FC08 for ; Wed, 3 Sep 2008 15:04:50 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m83F4nuv002050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2008 08:04:50 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48BEA791.6030406@freebsd.org> Date: Wed, 03 Sep 2008 08:04:49 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Matthias Apitz References: <20080903113131.GA8697@rebelion.Sisis.de> In-Reply-To: <20080903113131.GA8697@rebelion.Sisis.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: ebb.errno.com; whitelist Cc: freebsd-hackers@freebsd.org Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 15:04:51 -0000 Matthias Apitz wrote: > Hello, > > I'm using WPA to connect to my various Wifi AP's (office, home, partner > locations) and have them well configured in the wpa_supplicant.conf(5) > file; > > from time to time at home I encounter that it is associating with an > unknown AP of my neighbourhood: > > > # ifconfig iwi0 > iwi0: flags=8843 metric 0 mtu 1500 > ether 00:13:ce:a1:e6:81 > inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 > media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) > status: associated > ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84 > authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 > scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 > roam:rate11g 5 protmode CTS roaming MANUAL > # ifconfig iwi0 list scan > SSID BSSID CHAN RATE S:N INT CAPS > o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP > xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA > > the network with SSID 'o2DSL_kJaR' is not im my > /etc/wpa_supplicant.conf; > > how this is possible and how can I prevent this? > You must have a wildcard entry in your wpa_supplicant.conf file (i.e. one w/o an ssid specified). Sam From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 16:09:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15888106968B for ; Wed, 3 Sep 2008 16:09:33 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 9CF908FC1A for ; Wed, 3 Sep 2008 16:09:32 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from [213.142.183.219] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1KauvD-00080M-6L; Wed, 03 Sep 2008 18:09:31 +0200 Message-ID: <48BEB687.5050308@FreeBSD.org> Date: Wed, 03 Sep 2008 18:08:39 +0200 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.16 (X11/20080807) MIME-Version: 1.0 To: Sam Leffler References: <20080903113131.GA8697@rebelion.Sisis.de> <48BEA791.6030406@freebsd.org> In-Reply-To: <48BEA791.6030406@freebsd.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-hackers@freebsd.org, Matthias Apitz Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 16:09:33 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Sam Leffler wrote: | Matthias Apitz wrote: |> Hello, |> |> I'm using WPA to connect to my various Wifi AP's (office, home, partner |> locations) and have them well configured in the wpa_supplicant.conf(5) |> file; |> |> from time to time at home I encounter that it is associating with an |> unknown AP of my neighbourhood: |> |> |> # ifconfig iwi0 |> iwi0: flags=8843 metric 0 mtu |> 1500 |> ether 00:13:ce:a1:e6:81 |> inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 |> media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) |> status: associated |> ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84 |> authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 |> scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 |> roam:rate11g 5 protmode CTS roaming MANUAL |> # ifconfig iwi0 list scan |> SSID BSSID CHAN RATE S:N INT CAPS |> o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP |> xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA |> |> the network with SSID 'o2DSL_kJaR' is not im my |> /etc/wpa_supplicant.conf; |> |> how this is possible and how can I prevent this? |> | You must have a wildcard entry in your wpa_supplicant.conf file (i.e. | one w/o an ssid specified). Not necessarily. If you bring up a wlan interface and don't specify anything, it will automatically associate with the first open AP it finds. I don't know if it's to be considered a feature or a bug. I've been worried by this sometimes, but honestly not enough to really care.. Anyway, it happens... | Sam - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEAREKAAYFAki+toYACgkQwMJqmJVx945SJwCeNc0z+Jb2Rqw6n06sPKLJcxmA jlMAn2ZEa/r40dDf5cgaUoeWiJYyCkLC =OxPp -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 18:23:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B6D91065900 for ; Wed, 3 Sep 2008 18:23:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id B51268FC16 for ; Wed, 3 Sep 2008 18:23:50 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m83INnFx003249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2008 11:23:50 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48BED635.5010100@freebsd.org> Date: Wed, 03 Sep 2008 11:23:49 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Pietro Cerutti References: <20080903113131.GA8697@rebelion.Sisis.de> <48BEA791.6030406@freebsd.org> <48BEB687.5050308@FreeBSD.org> In-Reply-To: <48BEB687.5050308@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: ebb.errno.com; whitelist Cc: freebsd-hackers@freebsd.org, Matthias Apitz Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 18:23:51 -0000 Pietro Cerutti wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Sam Leffler wrote: > | Matthias Apitz wrote: > |> Hello, > |> > |> I'm using WPA to connect to my various Wifi AP's (office, home, > partner > |> locations) and have them well configured in the wpa_supplicant.conf(5) > |> file; > |> > |> from time to time at home I encounter that it is associating with an > |> unknown AP of my neighbourhood: > |> > |> > |> # ifconfig iwi0 > |> iwi0: flags=8843 metric 0 mtu > |> 1500 > |> ether 00:13:ce:a1:e6:81 > |> inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 > |> media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) > |> status: associated > |> ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid > 00:19:cb:86:b3:84 > |> authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 > |> scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 > roam:rssi11g 7 > |> roam:rate11g 5 protmode CTS roaming MANUAL > |> # ifconfig iwi0 list scan > |> SSID BSSID CHAN RATE S:N INT CAPS > |> o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP > |> xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA > |> > |> the network with SSID 'o2DSL_kJaR' is not im my > |> /etc/wpa_supplicant.conf; > |> > |> how this is possible and how can I prevent this? > |> > | You must have a wildcard entry in your wpa_supplicant.conf file (i.e. > | one w/o an ssid specified). > > Not necessarily. If you bring up a wlan interface and don't specify > anything, it will automatically associate with the first open AP it > finds. > > I don't know if it's to be considered a feature or a bug. I've been > worried by this sometimes, but honestly not enough to really care.. > > Anyway, it happens... > He was talking about wpa_supplicant selecting an arbitrary AP. If you have a device marked up then the system will handle ap selection+join but if wpa_supplicant is running then it marks the interface in "manual roaming mode" which stops that behaviour. Sam From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 18:50:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAD61065670; Wed, 3 Sep 2008 18:50:38 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id B4CAE8FC12; Wed, 3 Sep 2008 18:50:37 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from [213.142.183.219] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1KaxR6-0000p3-6l; Wed, 03 Sep 2008 20:50:36 +0200 Message-ID: <48BEDC46.7090502@FreeBSD.org> Date: Wed, 03 Sep 2008 20:49:42 +0200 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.16 (X11/20080807) MIME-Version: 1.0 To: Sam Leffler References: <20080903113131.GA8697@rebelion.Sisis.de> <48BEA791.6030406@freebsd.org> <48BEB687.5050308@FreeBSD.org> <48BED635.5010100@freebsd.org> In-Reply-To: <48BED635.5010100@freebsd.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-hackers@freebsd.org, Matthias Apitz Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 18:50:38 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Sam Leffler wrote: | Pietro Cerutti wrote: |> -----BEGIN PGP SIGNED MESSAGE----- |> Hash: SHA512 |> |> Sam Leffler wrote: |> | Matthias Apitz wrote: |> |> Hello, |> |> |> |> I'm using WPA to connect to my various Wifi AP's (office, home, |> partner |> |> locations) and have them well configured in the wpa_supplicant.conf(5) |> |> file; |> |> |> |> from time to time at home I encounter that it is associating with an |> |> unknown AP of my neighbourhood: |> |> |> |> |> |> # ifconfig iwi0 |> |> iwi0: flags=8843 metric 0 mtu |> |> 1500 |> |> ether 00:13:ce:a1:e6:81 |> |> inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 |> |> media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) |> |> status: associated |> |> ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid |> 00:19:cb:86:b3:84 |> |> authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 |> |> scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 |> roam:rssi11g 7 |> |> roam:rate11g 5 protmode CTS roaming MANUAL |> |> # ifconfig iwi0 list scan |> |> SSID BSSID CHAN RATE S:N INT CAPS |> |> o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP |> |> xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA |> |> |> |> the network with SSID 'o2DSL_kJaR' is not im my |> |> /etc/wpa_supplicant.conf; |> |> |> |> how this is possible and how can I prevent this? |> |> |> | You must have a wildcard entry in your wpa_supplicant.conf file (i.e. |> | one w/o an ssid specified). |> |> Not necessarily. If you bring up a wlan interface and don't specify |> anything, it will automatically associate with the first open AP it |> finds. |> |> I don't know if it's to be considered a feature or a bug. I've been |> worried by this sometimes, but honestly not enough to really care.. |> |> Anyway, it happens... |> | | He was talking about wpa_supplicant selecting an arbitrary AP. If you | have a device marked up then the system will handle ap selection+join | but if wpa_supplicant is running then it marks the interface in "manual | roaming mode" which stops that behaviour. What if you bring up a device with "WPA" in its rc.conf ifconfig line? | | Sam | - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEAREKAAYFAki+3EUACgkQwMJqmJVx944m6QCeK9yPcIjjHKx1b3sFDy0feHQd KCEAoJmUx9VEuKL/e+y69auTLhe8sei2 =TH4n -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 19:04:58 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43AEB106564A; Wed, 3 Sep 2008 19:04:58 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (hunter.sisis.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id 5BE758FC1E; Wed, 3 Sep 2008 19:04:57 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id UAA10785; Wed, 3 Sep 2008 20:52:54 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) Received: from ppp-93-104-113-53.dynamic.mnet-online.de(93.104.113.53) by hunter.Sisis.de via smap (V2.1) id xma010748; Wed, 3 Sep 08 20:52:20 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m83J0WHt002679; Wed, 3 Sep 2008 21:00:32 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Wed, 3 Sep 2008 21:00:32 +0200 From: Matthias Apitz To: Sam Leffler Message-ID: <20080903190032.GA2372@rebelion.Sisis.de> References: <20080903113131.GA8697@rebelion.Sisis.de> <48BEA791.6030406@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <48BEA791.6030406@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) Cc: freebsd-hackers@freebsd.org Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2008 19:04:58 -0000 El día Wednesday, September 03, 2008 a las 08:04:49AM -0700, Sam Leffler escribió: > Matthias Apitz wrote: > >Hello, > > > >I'm using WPA to connect to my various Wifi AP's (office, home, partner > >locations) and have them well configured in the wpa_supplicant.conf(5) > >file; > > > >from time to time at home I encounter that it is associating with an > >unknown AP of my neighbourhood: > > > > > ># ifconfig iwi0 > >iwi0: flags=8843 metric 0 mtu 1500 > > ether 00:13:ce:a1:e6:81 > > inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 > > media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) > > status: associated > > ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84 > > authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 > > scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 > > roam:rate11g 5 protmode CTS roaming MANUAL > ># ifconfig iwi0 list scan > >SSID BSSID CHAN RATE S:N INT CAPS > >o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP > >xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA > > > >the network with SSID 'o2DSL_kJaR' is not im my > >/etc/wpa_supplicant.conf; > > > >how this is possible and how can I prevent this? > > > You must have a wildcard entry in your wpa_supplicant.conf file (i.e. > one w/o an ssid specified). Thx for the idea, but I don't have any wildcard entry; I've checked the conf file and also wpa_cli says: > list_networks network id / ssid / bssid / flags 0 santaclara any 1 tarara any [CURRENT] 2 OCLCPICAUK any 3 board_room any 4 guagua any 5 OCN-LAN any 6 ConnectionPoint any and: # fgrep network= /etc/wpa_supplicant.conf | wc -l 7 # fgrep ssid=\" /etc/wpa_supplicant.conf ssid="santaclara" ssid="tarara" ssid="OCLCPICAUK" ssid="board_room" ssid="guagua" ssid="OCN-LAN" ssid="ConnectionPoint" matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ We should all learn from the peoples of The Netherlands, France and Ireland. Aprendamos todos de los pueblos de Holanda, Francia e Irlanda. From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 19:37:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34E321065670 for ; Wed, 3 Sep 2008 19:37:31 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id DEF738FC22 for ; Wed, 3 Sep 2008 19:37:30 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m83JbSVC003990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2008 12:37:29 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48BEE778.4000503@freebsd.org> Date: Wed, 03 Sep 2008 12:37:28 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Matthias Apitz References: <20080903113131.GA8697@rebelion.Sisis.de> <48BEA791.6030406@freebsd.org> <20080903190032.GA2372@rebelion.Sisis.de> In-Reply-To: <20080903190032.GA2372@rebelion.Sisis.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-DCC-Misty-Metrics: ebb.errno.com; whitelist Cc: freebsd-hackers@freebsd.org Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 19:37:31 -0000 Matthias Apitz wrote: > El día Wednesday, September 03, 2008 a las 08:04:49AM -0700, Sam Leffler escribió: > > >> Matthias Apitz wrote: >> >>> Hello, >>> >>> I'm using WPA to connect to my various Wifi AP's (office, home, partner >>> locations) and have them well configured in the wpa_supplicant.conf(5) >>> file; >>> >>> >> >from time to time at home I encounter that it is associating with an >> >>> unknown AP of my neighbourhood: >>> >>> >>> # ifconfig iwi0 >>> iwi0: flags=8843 metric 0 mtu 1500 >>> ether 00:13:ce:a1:e6:81 >>> inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 >>> media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) >>> status: associated >>> ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84 >>> authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 >>> scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 >>> roam:rate11g 5 protmode CTS roaming MANUAL >>> # ifconfig iwi0 list scan >>> SSID BSSID CHAN RATE S:N INT CAPS >>> o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP >>> xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA >>> >>> the network with SSID 'o2DSL_kJaR' is not im my >>> /etc/wpa_supplicant.conf; >>> >>> how this is possible and how can I prevent this? >>> >>> >> You must have a wildcard entry in your wpa_supplicant.conf file (i.e. >> one w/o an ssid specified). >> > > Thx for the idea, but I don't have any wildcard entry; I've checked the > conf file and also wpa_cli says: > > >> list_networks >> > network id / ssid / bssid / flags > 0 santaclara any > 1 tarara any [CURRENT] > 2 OCLCPICAUK any > 3 board_room any > 4 guagua any > 5 OCN-LAN any > 6 ConnectionPoint any > > and: > > # fgrep network= /etc/wpa_supplicant.conf | wc -l > 7 > # fgrep ssid=\" /etc/wpa_supplicant.conf > ssid="santaclara" > ssid="tarara" > ssid="OCLCPICAUK" > ssid="board_room" > ssid="guagua" > ssid="OCN-LAN" > ssid="ConnectionPoint" > > So far as I know this should not happen. It'd be useful to have a wpa_supplicant log that shows it associating to an ssid not listed in the config file. Sam From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 21:00:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 926C6106567D for ; Wed, 3 Sep 2008 21:00:19 +0000 (UTC) (envelope-from roland@yttrium.micite.net) Received: from yttrium.micite.net (ut-n-d0eb.adsl.wanadoo.nl [81.68.238.235]) by mx1.freebsd.org (Postfix) with ESMTP id DA8548FC08 for ; Wed, 3 Sep 2008 21:00:18 +0000 (UTC) (envelope-from roland@yttrium.micite.net) Received: (qmail 43524 invoked by uid 1001); 3 Sep 2008 20:33:06 -0000 Date: Wed, 3 Sep 2008 22:33:06 +0200 From: Roland van Laar To: freebsd-hackers@freebsd.org Message-ID: <20080903203306.GE33677@yttrium.micite.net> References: <20080903113131.GA8697@rebelion.Sisis.de> <48BEA791.6030406@freebsd.org> <20080903190032.GA2372@rebelion.Sisis.de> <48BEE778.4000503@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48BEE778.4000503@freebsd.org> User-Agent: Mutt/1.4.2.3i Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 21:00:19 -0000 On Wed, Sep 03, 2008 at 12:37:28PM -0700, Sam Leffler wrote: > Matthias Apitz wrote: > >El d?a Wednesday, September 03, 2008 a las 08:04:49AM -0700, Sam Leffler > >escribi?: > > > > > >>Matthias Apitz wrote: > >> > >>>Hello, > >>> > >>>I'm using WPA to connect to my various Wifi AP's (office, home, partner > >>>locations) and have them well configured in the wpa_supplicant.conf(5) > >>>file; > >>> > >>> > >>>from time to time at home I encounter that it is associating with an > >> > >>>unknown AP of my neighbourhood: > >>> > >>> > >>># ifconfig iwi0 > >>>iwi0: flags=8843 metric 0 mtu > >>>1500 > >>> ether 00:13:ce:a1:e6:81 > >>> inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 > >>> media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) > >>> status: associated > >>> ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84 > >>> authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 > >>> scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 > >>> roam:rate11g 5 protmode CTS roaming MANUAL > >>># ifconfig iwi0 list scan > >>>SSID BSSID CHAN RATE S:N INT CAPS > >>>o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP > >>>xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA > >>> > >>>the network with SSID 'o2DSL_kJaR' is not im my > >>>/etc/wpa_supplicant.conf; > >>> > >>>how this is possible and how can I prevent this? > >>> > >>> > >>You must have a wildcard entry in your wpa_supplicant.conf file (i.e. > >>one w/o an ssid specified). > >> > > > >Thx for the idea, but I don't have any wildcard entry; I've checked the > >conf file and also wpa_cli says: > > > > > >>list_networks > >> > >network id / ssid / bssid / flags > >0 santaclara any > >1 tarara any [CURRENT] > >2 OCLCPICAUK any > >3 board_room any > >4 guagua any > >5 OCN-LAN any > >6 ConnectionPoint any > > > >and: > > > ># fgrep network= /etc/wpa_supplicant.conf | wc -l > > 7 > ># fgrep ssid=\" /etc/wpa_supplicant.conf > > ssid="santaclara" > > ssid="tarara" > > ssid="OCLCPICAUK" > > ssid="board_room" > > ssid="guagua" > > ssid="OCN-LAN" > > ssid="ConnectionPoint" > > > > > So far as I know this should not happen. It'd be useful to have a > wpa_supplicant log that shows it associating to an ssid not listed in > the config file. > I encountered the same problem last week. I had a contrab which did an ifconfig ath0 down; ifconfig ath0 up This worked fine with WEP but wpa_supplicant exits when ath0 goes done. ath0 connects to the first open AP after it gets up again; not reconnecting to my WPA AP. Hope it helps, Roland van Laar From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 3 21:40:02 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09C9710659E6; Wed, 3 Sep 2008 21:40:02 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id BDD968FC13; Wed, 3 Sep 2008 21:40:01 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id m83LExFA060367; Wed, 3 Sep 2008 17:14:59 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id m83LExrj060366; Wed, 3 Sep 2008 17:14:59 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Wed, 3 Sep 2008 17:14:59 -0400 From: David Schultz To: kr Lekha Message-ID: <20080903211459.GA60350@zim.MIT.EDU> Mail-Followup-To: kr Lekha , Rui Paulo , freebsd-hackers@FreeBSD.ORG References: <96b2ec350809030134j73a61369m35395391a1218975@mail.gmail.com> <20080903095605.GB21178@alpha.local> <96b2ec350809030516y2d6f26d1h3cd7eb39231c4da0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96b2ec350809030516y2d6f26d1h3cd7eb39231c4da0@mail.gmail.com> Cc: freebsd-hackers@FreeBSD.ORG, Rui Paulo Subject: Re: killing a kthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 03 Sep 2008 21:40:02 -0000 On Wed, Sep 03, 2008, kr Lekha wrote: > I understand when thread finishes it should call kthread_exit(). > but if this thread was suspended before it finished, it might not be able to > call kthread_exit(). > > Due to which we still see the thread suspended. I am unable to kill it > even with killproc / psignal with in the kernel module. That's by design. Kernel threads can hold arbitrary kernel resources, and there's no mechanism to clean up after them automatically. They are expected to clean up after themselves and exit gracefully. In your case, you'll need to wake up the suspended thread and somehow notify it that you want it to terminate. From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 08:31:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E241B106567B; Thu, 4 Sep 2008 08:31:38 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 70CBA8FC2F; Thu, 4 Sep 2008 08:31:37 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from rebelion.Sisis.de ([193.31.10.34]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Thu, 4 Sep 2008 10:31:36 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m848VYI3003900; Thu, 4 Sep 2008 10:31:34 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Thu, 4 Sep 2008 10:31:34 +0200 From: Matthias Apitz To: Roland van Laar Message-ID: <20080904083134.GA3606@rebelion.Sisis.de> References: <20080903113131.GA8697@rebelion.Sisis.de> <48BEA791.6030406@freebsd.org> <20080903190032.GA2372@rebelion.Sisis.de> <48BEE778.4000503@freebsd.org> <20080903203306.GE33677@yttrium.micite.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080903203306.GE33677@yttrium.micite.net> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) X-OriginalArrivalTime: 04 Sep 2008 08:31:36.0332 (UTC) FILETIME=[A4EF8CC0:01C90E68] Cc: freebsd-hackers@freebsd.org, Sam Leffler Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2008 08:31:39 -0000 El día Wednesday, September 03, 2008 a las 10:33:06PM +0200, Roland van Laar escribió: > I encountered the same problem last week. I had a contrab which did an > ifconfig ath0 down; ifconfig ath0 up > This worked fine with WEP but wpa_supplicant exits when ath0 goes done. > ath0 connects to the first open AP after it gets up again; not reconnecting > to my WPA AP. In my case wpa_supplicant always was running; it is launched by /etc/rc.conf as: ifconfig_iwi0="WPA" at home where I have this problem the association is WEP based; >From time to time my AP seems to get stuck and in this case wpa_supplicant seems picking up the wrong foreign AP; it triggers even on LINK_UP via the devd(8) my script which I have to assign IP or do DHCP according the AP-location, which of course does not know this foreign AP and does nothing, but I see it in the log: Wed Sep 3 07:07:49 CEST 2008: /usr/local/etc/devd/iwi.sh iwi0 LINK_UP AP [00:19:cb:86:b3:84] not known in /usr/local/etc/devd/iwi.sh I will try to collect a debug-log of wpa_supplicant for such a situation; matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ We should all learn from the peoples of The Netherlands, France and Ireland. Aprendamos todos de los pueblos de Holanda, Francia e Irlanda. From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 10:15:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB335106564A for ; Thu, 4 Sep 2008 10:15:49 +0000 (UTC) (envelope-from nolis71cu@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id 7B74C8FC12 for ; Thu, 4 Sep 2008 10:15:49 +0000 (UTC) (envelope-from nolis71cu@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so4493047rvf.43 for ; Thu, 04 Sep 2008 03:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; bh=+3wKrJxrwqp/Jo4xgJysvJczuYq67Ur+vxCMBxYxCFs=; b=R70Rslp5utJoZcU83Vw+oDGGnkDgK3Jkl/a0G6Ks5o3uiP5geg6jZtpa9+hivAmxCf ccreb49/XUYjworEUCC4qJQJWvveF4AuNGbjxptbT+IT7A7MszKZcwYlyht0klyZ6TCP cgOJlN1VDz6eTzdLQSyh1mnUptYDbzqqzjJeI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; b=t56ZM5D50Z0al0QgFC5OVCWY5oopZBrVPwL5JoDkmnMBgGCaQYDF3bzF3Vfa+AyMoP tX4+pKn/fXQ/eoofj1TXL5urHJmb9lpIRLjIDONnc/XRqiYVQu5aSWXDlq0yv6EG9Z6E tI4JuztzYy6FlMuQyzRWdp0sz/yveAgXbLDLE= Received: by 10.140.191.14 with SMTP id o14mr5536627rvf.247.1220521883458; Thu, 04 Sep 2008 02:51:23 -0700 (PDT) Received: from admin_net.elecmtz.une.cu ( [200.55.166.34]) by mx.google.com with ESMTPS id g31sm16767816rvb.7.2008.09.04.02.51.18 (version=SSLv3 cipher=RC4-MD5); Thu, 04 Sep 2008 02:51:22 -0700 (PDT) From: Manolo Valdes To: freebsd-hackers@freebsd.org Date: Thu, 4 Sep 2008 00:28:40 +0000 User-Agent: KMail/1.10.0 (FreeBSD/7.1-PRERELEASE; KDE/4.1.64; i386; svn-854061; 2008-08-27) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809040028.40979.nolis71cu@gmail.com> Subject: upgrade GDB-6.1.1 on the base System X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 10:15:49 -0000 Hi Hackers reading a thread from this very list i solve my problem trying to debug user- land programs. the problem was gdb-6.1.1 , and the thread point me to use gdb-6.6 and all my pains went away. so my question is: will be GDB upgraded in the base system? or the buggy gdb-6.1.1 still be around? best regards Manolito From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 11:11:31 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E356A1065673; Thu, 4 Sep 2008 11:11:31 +0000 (UTC) (envelope-from gabor@kovesdan.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 92C938FC23; Thu, 4 Sep 2008 11:11:31 +0000 (UTC) (envelope-from gabor@kovesdan.org) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id C532814D77F0; Thu, 4 Sep 2008 13:11:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AhrxXzCtWV6g; Thu, 4 Sep 2008 13:11:27 +0200 (CEST) Received: from [78.131.25.160] (78-131-25-160.pool.hdsnet.hu [78.131.25.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id D219C14D77EF; Thu, 4 Sep 2008 13:11:26 +0200 (CEST) Message-ID: <48BFC257.2010000@kovesdan.org> Date: Thu, 04 Sep 2008 13:11:19 +0200 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Andrey Chernov , Gabor Kovesdan , hackers@freebsd.org, Max Khon , dougb@freebsd.org, krion@freebsd.org, current@freebsd.org References: <48B44A7D.3070108@kovesdan.org> <20080827013221.GA82176@nagual.pp.ru> In-Reply-To: <20080827013221.GA82176@nagual.pp.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 04 Sep 2008 11:27:59 +0000 Cc: Subject: Re: CFT: BSD grep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 11:11:32 -0000 Andrey Chernov ha scritto: > Just from quick looking at the sources... > > This code looks suspicious: > > wend = sscanf(&l->dat[pmatch.rm_eo], "%lc", &wend); > > Perhaps it should be > > if (sscanf(&l->dat[pmatch.rm_eo], "%lc", &wend) != 1) > r = REG_NOMATCH; > > The next thing is that perhaps each r = REG_NOMATCH; case should be > isolated from others in this block (with "else if"?) > F.e. failing mbstowcs() can leave buffer for sscanf() in junk. > > wbegin = grep_malloc(mbstowcs(NULL, l->dat, pmatch.rm_so)); > > grep_malloc() here could terminate program for invalid mbstowcs() > sequence, but really must set only r = REG_NOMATCH; > > Think about files which, for various reasons, may contain not only valid > MB sequences. > > fgrepcomp() uses toupper()/tolower() while should use wide chars analogs > (MB chars can be in the pattern too). There are also many other places > where pattern treated as single chars one, fastcomp() etc. grep_cmp() > compares single chars toupper(data[]) too. There must be no plain ctype > usage in the whole data _and_ pattern handling code. > Hello Andrey, thanks for the detailed description of the current deficiencies, I'll fix them soon. I've been busy with moving to another flat, that's why I haven't replied yet, sorry for that. Gábor From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 12:19:08 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79242106564A for ; Thu, 4 Sep 2008 12:19:08 +0000 (UTC) (envelope-from prvs=113326f63d=marc.loerner@hob.de) Received: from mailgate.hob.de (mailgate.hob.de [212.185.199.3]) by mx1.freebsd.org (Postfix) with ESMTP id 329728FC1B for ; Thu, 4 Sep 2008 12:19:08 +0000 (UTC) (envelope-from prvs=113326f63d=marc.loerner@hob.de) Received: from imap.hob.de (mail2.hob.de [172.25.1.102]) by mailgate.hob.de (Postfix) with ESMTP id B752F52010D for ; Thu, 4 Sep 2008 13:59:45 +0200 (CEST) Received: from linux03.hob.de (linux03.hob.de [172.22.0.190]) by imap.hob.de (Postfix on SuSE eMail Server 2.0) with ESMTP id 64945FD217 for ; Thu, 4 Sep 2008 13:59:45 +0200 (CEST) From: Marc =?iso-8859-1?q?L=F6rner?= Organization: hob To: freebsd-hackers@freebsd.org Date: Thu, 4 Sep 2008 14:00:04 +0200 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200809041400.04575.marc.loerner@hob.de> Subject: question on asymmetric mtx_[un]lock_sleep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 12:19:08 -0000 Hello, I just read through the code of mutexes and turnstiles and it seems to me that _mtx_lock_sleep and _mtx_unlock_sleep are some kind of asymmetric when turning SMP and adaptive mutexes on in kernel-configuration. On locking the mutex, we try to "quick" obtain the lock. If we can't do this, we look, whether some other thread, that's running, holds the lock and spin until either lock is freed or thread is not running anymore. In that case we try again to obtain the lock "quick". If the thread only stopped running but still holds the lock, we use turnstiles to wake us up, when the thread unlocks the mutex. => That seems to be fine and quite symmetric with _mtx_unlock_sleep!! But if we're spinning and the other thread gave the mutex free, we quick-lock the mutex and don't set up a turnstile. Now on mtx_unlock_sleep: - in FreeBSD6/until revision 1.200 turnstiles were tested on existence. => if turnstile_lookup return NULL we only released the lock quick. - But now, it's never tested if turnstile exists instead we broadcast/wakeup all threads pending on the turnstile. If this turnstile is NULL => we access wrong memory. Now my question is: Why can we be sure (in new source) that turnstile_lookup always returns a valid pointer to an turnstile and can use returned pointer to call turnstile_broadcast? Am I missing something? Because it seems that following scenario may occur: - on locking same scenario as above (=> thread1 now holds the lock) - thread1 is put off the runqueue - thread2 now tries to quick unlock mutex and sees that thread1 holds it => call to mtx_unlock_sleep - now we try to use turnstile-mechanism and call turnstile_lookup => returns NULL because no thread waits for wakeup => we call turnstile_broadcast and crash. Regards, Marc Loerner From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 13:14:04 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54E741065679 for ; Thu, 4 Sep 2008 13:14:04 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8E48FC1A for ; Thu, 4 Sep 2008 13:14:02 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by postfix2-g20.free.fr (Postfix) with ESMTP id 21AF329D3592 for ; Thu, 4 Sep 2008 12:53:56 +0200 (CEST) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 488CD32A79C for ; Thu, 4 Sep 2008 14:54:15 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp8-g19.free.fr (Postfix) with ESMTP id 20E4932A7C8 for ; Thu, 4 Sep 2008 14:54:14 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 1958B9B497 for ; Thu, 4 Sep 2008 12:46:53 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 0E2CA4089; Thu, 4 Sep 2008 14:46:53 +0200 (CEST) Date: Thu, 4 Sep 2008 14:46:53 +0200 From: Jeremie Le Hen To: freebsd-hackers@FreeBSD.org Message-ID: <20080904124653.GK72107@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5/uDoXvLw7AC5HRs" Content-Disposition: inline User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Subject: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 13:14:04 -0000 --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, There is currently a knob to enable/disable SSP: WITH_SSP or WITHOUT_SSP. WITH_SSP is the default on -CURRENT, so no one had to put WITH_SSP= in src.conf(5). This has hidden the following bug so far: When buildworld is run with WITH_SSP= on command-line or in src.conf(5), it fails immediately with the following message, because the toolchain is built with WITHOUT_SSP: % "/usr/src/share/mk/bsd.own.mk", line 365: WITH_SSP and WITHOUT_SSP can't both be set. My leaning is to create an additional knob NO_SSP, much like NO_CPU_CFLAGS, that could be set internally. However I'm not sure it complies with the src.conf(5) policy. Any objection to the patch below? Thank you! Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > --5/uDoXvLw7AC5HRs Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="NO_SSP.diff" Index: Makefile.inc1 =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/Makefile.inc1,v retrieving revision 1.610 diff -u -p -r1.610 Makefile.inc1 --- Makefile.inc1 19 Aug 2008 14:23:26 -0000 1.610 +++ Makefile.inc1 4 Sep 2008 12:42:50 -0000 @@ -225,7 +225,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - -DWITHOUT_SSP \ + -DNO_SSP \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF @@ -236,7 +236,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \ - -DNO_WARNS -DNO_CTF -DWITHOUT_SSP + -DNO_WARNS -DNO_CTF -DNO_SSP # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ @@ -453,7 +453,7 @@ build32: .if ${MK_KERBEROS} != "no" .for _t in obj depend all cd ${.CURDIR}/kerberos5/tools; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DNO_SSP DESTDIR= \ ${_t} .endfor .endif @@ -476,7 +476,7 @@ build32: .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic cd ${.CURDIR}/${_dir}; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DNO_SSP DESTDIR= \ build-tools .endfor cd ${.CURDIR}; \ @@ -765,14 +765,14 @@ buildkernel: @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF \ + ${MAKE} -DNO_SSP -DNO_CPU_CFLAGS -DNO_CTF \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF ${target} + ${MAKE} -DNO_SSP -DNO_CPU_CFLAGS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) Index: gnu/lib/csu/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/gnu/lib/csu/Makefile,v retrieving revision 1.29 diff -u -p -r1.29 Makefile --- gnu/lib/csu/Makefile 25 Jun 2008 21:33:28 -0000 1.29 +++ gnu/lib/csu/Makefile 4 Sep 2008 12:42:50 -0000 @@ -19,7 +19,7 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR} -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN -WITHOUT_SSP= +NO_SSP= .if ${MACHINE_ARCH} == "ia64" BEGINSRC= crtbegin.asm Index: gnu/lib/libssp/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/gnu/lib/libssp/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- gnu/lib/libssp/Makefile 25 Jun 2008 21:33:28 -0000 1.3 +++ gnu/lib/libssp/Makefile 4 Sep 2008 12:42:50 -0000 @@ -10,7 +10,7 @@ LIB= ssp SHLIB_MAJOR= 0 SHLIBDIR?= /lib NO_PROFILE= -WITHOUT_SSP= +NO_SSP= SRCS= ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \ memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \ Index: lib/csu/Makefile.inc =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/lib/csu/Makefile.inc,v retrieving revision 1.1 diff -u -p -r1.1 Makefile.inc --- lib/csu/Makefile.inc 25 Jun 2008 21:33:28 -0000 1.1 +++ lib/csu/Makefile.inc 4 Sep 2008 12:42:50 -0000 @@ -1,3 +1,3 @@ # $FreeBSD: src/lib/csu/Makefile.inc,v 1.1 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= Index: lib/libstand/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/lib/libstand/Makefile,v retrieving revision 1.62 diff -u -p -r1.62 Makefile --- lib/libstand/Makefile 25 Jun 2008 21:33:28 -0000 1.62 +++ lib/libstand/Makefile 4 Sep 2008 12:42:50 -0000 @@ -12,7 +12,7 @@ NO_PIC= INCS= stand.h MAN= libstand.3 -WITHOUT_SSP= +NO_SSP= CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${.CURDIR} Index: lib/libthr/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/lib/libthr/Makefile,v retrieving revision 1.35 diff -u -p -r1.35 Makefile --- lib/libthr/Makefile 25 Jun 2008 21:33:28 -0000 1.35 +++ lib/libthr/Makefile 4 Sep 2008 12:42:50 -0000 @@ -8,7 +8,7 @@ # (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the # system call stubs. -WITHOUT_SSP= +NO_SSP= .include Index: libexec/rtld-elf/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/libexec/rtld-elf/Makefile,v retrieving revision 1.42 diff -u -p -r1.42 Makefile --- libexec/rtld-elf/Makefile 25 Jun 2008 21:33:28 -0000 1.42 +++ libexec/rtld-elf/Makefile 4 Sep 2008 12:42:50 -0000 @@ -1,6 +1,6 @@ # $FreeBSD: src/libexec/rtld-elf/Makefile,v 1.42 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= .include Index: rescue/librescue/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/rescue/librescue/Makefile,v retrieving revision 1.10 diff -u -p -r1.10 Makefile --- rescue/librescue/Makefile 25 Jun 2008 21:33:28 -0000 1.10 +++ rescue/librescue/Makefile 4 Sep 2008 12:42:50 -0000 @@ -2,7 +2,7 @@ # $FreeBSD: src/rescue/librescue/Makefile,v 1.10 2008/06/25 21:33:28 ru Exp $ # -WITHOUT_SSP= +NO_SSP= .include Index: rescue/rescue/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/rescue/rescue/Makefile,v retrieving revision 1.63 diff -u -p -r1.63 Makefile --- rescue/rescue/Makefile 31 Aug 2008 14:27:59 -0000 1.63 +++ rescue/rescue/Makefile 4 Sep 2008 12:42:50 -0000 @@ -2,7 +2,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/2/93 NO_MAN= -WITHOUT_SSP= +NO_SSP= .include Index: share/mk/bsd.sys.mk =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/share/mk/bsd.sys.mk,v retrieving revision 1.47 diff -u -p -r1.47 bsd.sys.mk --- share/mk/bsd.sys.mk 23 Jul 2008 06:14:21 -0000 1.47 +++ share/mk/bsd.sys.mk 4 Sep 2008 12:39:22 -0000 @@ -74,8 +74,9 @@ CWARNFLAGS += -Werror CWARNFLAGS += -Wno-unknown-pragmas .endif -.if ${MK_SSP} != "no" && ${CC} != "icc" && ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +.if ${MK_SSP} != "no" && !defined(NO_SSP) && ${CC} != "icc" && \ + ${MACHINE_ARCH} != "ia64" && ${MACHINE_ARCH} != "arm" && \ + ${MACHINE_ARCH} != "mips" # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS ?= -fstack-protector CFLAGS += ${SSP_CFLAGS} Index: sys/boot/Makefile.inc =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/Makefile.inc,v retrieving revision 1.1 diff -u -p -r1.1 Makefile.inc --- sys/boot/Makefile.inc 25 Jun 2008 21:33:28 -0000 1.1 +++ sys/boot/Makefile.inc 4 Sep 2008 12:42:50 -0000 @@ -1,3 +1,3 @@ # $FreeBSD: src/sys/boot/Makefile.inc,v 1.1 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= Index: sys/boot/i386/loader/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/i386/loader/Makefile,v retrieving revision 1.86 diff -u -p -r1.86 Makefile --- sys/boot/i386/loader/Makefile 25 Jun 2008 21:33:28 -0000 1.86 +++ sys/boot/i386/loader/Makefile 4 Sep 2008 12:42:50 -0000 @@ -1,6 +1,6 @@ # $FreeBSD: src/sys/boot/i386/loader/Makefile,v 1.86 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= .include Index: sys/boot/ia64/common/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/ia64/common/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- sys/boot/ia64/common/Makefile 25 Jun 2008 21:33:28 -0000 1.2 +++ sys/boot/ia64/common/Makefile 4 Sep 2008 12:42:50 -0000 @@ -1,6 +1,6 @@ # $FreeBSD: src/sys/boot/ia64/common/Makefile,v 1.2 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= .include Index: sys/boot/ia64/efi/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/ia64/efi/Makefile,v retrieving revision 1.29 diff -u -p -r1.29 Makefile --- sys/boot/ia64/efi/Makefile 25 Jun 2008 21:33:28 -0000 1.29 +++ sys/boot/ia64/efi/Makefile 4 Sep 2008 12:42:50 -0000 @@ -1,7 +1,7 @@ # $FreeBSD: src/sys/boot/ia64/efi/Makefile,v 1.29 2008/06/25 21:33:28 ru Exp $ NO_MAN= -WITHOUT_SSP= +NO_SSP= .include Index: sys/boot/ia64/ski/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/ia64/ski/Makefile,v retrieving revision 1.21 diff -u -p -r1.21 Makefile --- sys/boot/ia64/ski/Makefile 25 Jun 2008 21:33:28 -0000 1.21 +++ sys/boot/ia64/ski/Makefile 4 Sep 2008 12:42:50 -0000 @@ -1,7 +1,7 @@ # $FreeBSD: src/sys/boot/ia64/ski/Makefile,v 1.21 2008/06/25 21:33:28 ru Exp $ NO_MAN= -WITHOUT_SSP= +NO_SSP= .include Index: sys/boot/pc98/loader/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/pc98/loader/Makefile,v retrieving revision 1.42 diff -u -p -r1.42 Makefile --- sys/boot/pc98/loader/Makefile 25 Jun 2008 21:33:28 -0000 1.42 +++ sys/boot/pc98/loader/Makefile 4 Sep 2008 12:42:50 -0000 @@ -1,6 +1,6 @@ # $FreeBSD: src/sys/boot/pc98/loader/Makefile,v 1.42 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= .include Index: sys/boot/powerpc/ofw/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/powerpc/ofw/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- sys/boot/powerpc/ofw/Makefile 25 Jun 2008 21:33:28 -0000 1.24 +++ sys/boot/powerpc/ofw/Makefile 4 Sep 2008 12:42:50 -0000 @@ -1,6 +1,6 @@ # $FreeBSD: src/sys/boot/powerpc/ofw/Makefile,v 1.24 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= .include Index: sys/boot/sparc64/loader/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/sparc64/loader/Makefile,v retrieving revision 1.21 diff -u -p -r1.21 Makefile --- sys/boot/sparc64/loader/Makefile 25 Jun 2008 21:33:28 -0000 1.21 +++ sys/boot/sparc64/loader/Makefile 4 Sep 2008 12:42:50 -0000 @@ -1,6 +1,6 @@ # $FreeBSD: src/sys/boot/sparc64/loader/Makefile,v 1.21 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +NO_SSP= .include --5/uDoXvLw7AC5HRs-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 13:52:58 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71060106567E for ; Thu, 4 Sep 2008 13:52:58 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id EDBC08FC1E for ; Thu, 4 Sep 2008 13:52:57 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so1340116eyi.7 for ; Thu, 04 Sep 2008 06:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent:sender; bh=MqNQCJJPD3z8st+z6k6W80zbKl56rdgMbsg6bwvE9CQ=; b=cGfUqXdzikyS22VZfmLx50X0VPx7AQPpt0RON4KNT++eSMSnGPJ8USB+GDv8w1SXb+ /O9T2joJO5M6Fdpsbra1JCaYf2qYYQXj3Ljhy/2HxuEGXxXYutytlkhkwmzynfwVDIPY ZTTZddDy51lQHqgTg2uolmCLfR7+QZRTx7dJg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent:sender; b=J/lclCsEBxD11SRWSwb6FnBtvmu+3bpMO4MEXqGTuaZCfQUbiutJIg+B7T1/KMU3PF 6rBnqPrWvqQqjnxHkh9aiSlgqyAplzksHtdEtxKxJ0CTGgaDnPlZiXevVV5jRQq8MENs 28ZHYeJ39b1vXGOiBhC1sYdZonkUQK6LztNo0= Received: by 10.210.78.16 with SMTP id a16mr11921909ebb.173.1220536376528; Thu, 04 Sep 2008 06:52:56 -0700 (PDT) Received: from alpha.local ( [83.144.140.92]) by mx.google.com with ESMTPS id j8sm21284711gvb.1.2008.09.04.06.52.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Sep 2008 06:52:55 -0700 (PDT) Received: by alpha.local (Postfix, from userid 1001) id C0F2010064; Thu, 4 Sep 2008 14:52:00 +0100 (WEST) Date: Thu, 4 Sep 2008 14:52:00 +0100 From: Rui Paulo To: Jeremie Le Hen Message-ID: <20080904135200.GC31289@alpha.local> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080904124653.GK72107@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: Rui Paulo Cc: freebsd-hackers@FreeBSD.org Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 13:52:58 -0000 On Thu, Sep 04, 2008 at 02:46:53PM +0200, Jeremie Le Hen wrote: > Hello, > > There is currently a knob to enable/disable SSP: WITH_SSP or > WITHOUT_SSP. WITH_SSP is the default on -CURRENT, so no one had to put > WITH_SSP= in src.conf(5). This has hidden the following bug so far: > > When buildworld is run with WITH_SSP= on command-line or in src.conf(5), > it fails immediately with the following message, because the toolchain > is built with WITHOUT_SSP: > > % "/usr/src/share/mk/bsd.own.mk", line 365: WITH_SSP and WITHOUT_SSP can't both be set. > > My leaning is to create an additional knob NO_SSP, much like > NO_CPU_CFLAGS, that could be set internally. However I'm not sure it > complies with the src.conf(5) policy. Any objection to the patch below? We already have something like that. WITHOUT_SENDMAIL= is expanded to MK_SENDMAIL=no. You may want to do the same for SSP and keep the convention of the variable names. From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 13:57:21 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9257D1065671; Thu, 4 Sep 2008 13:57:21 +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 4EFE38FC20; Thu, 4 Sep 2008 13:57:21 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 681A1208A; Thu, 4 Sep 2008 15:57:20 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 5135684464; Thu, 4 Sep 2008 15:57:20 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Rui Paulo References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> Date: Thu, 04 Sep 2008 15:57:20 +0200 In-Reply-To: <20080904135200.GC31289@alpha.local> (Rui Paulo's message of "Thu, 4 Sep 2008 14:52:00 +0100") Message-ID: <86ljy857zz.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, Jeremie Le Hen Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 13:57:21 -0000 Rui Paulo writes: > Jeremie Le Hen writes: > > My leaning is to create an additional knob NO_SSP, much like > > NO_CPU_CFLAGS, that could be set internally. However I'm not sure it > > complies with the src.conf(5) policy. Any objection to the patch below? > We already have something like that. > WITHOUT_SENDMAIL=3D is expanded to MK_SENDMAIL=3Dno. > > You may want to do the same for SSP and keep the convention of the > variable names. It already exists. Read share/mk/bsd.own.mk. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 14:24:35 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 676401065706 for ; Thu, 4 Sep 2008 14:24:35 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by mx1.freebsd.org (Postfix) with ESMTP id 237C38FC22 for ; Thu, 4 Sep 2008 14:24:34 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id 9E8EB172C8; Thu, 4 Sep 2008 16:24:33 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp6-g19.free.fr (Postfix) with ESMTP id D57DF172C9; Thu, 4 Sep 2008 16:24:29 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 01A379B497; Thu, 4 Sep 2008 14:17:06 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id EDFC84089; Thu, 4 Sep 2008 16:17:05 +0200 (CEST) Date: Thu, 4 Sep 2008 16:17:05 +0200 From: Jeremie Le Hen To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20080904141705.GL72107@obiwan.tataz.chchile.org> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86ljy857zz.fsf@ds4.des.no> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-hackers@FreeBSD.org, Rui Paulo Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 14:24:35 -0000 On Thu, Sep 04, 2008 at 03:57:20PM +0200, Dag-Erling Smørgrav wrote: > Rui Paulo writes: > > Jeremie Le Hen writes: > > > My leaning is to create an additional knob NO_SSP, much like > > > NO_CPU_CFLAGS, that could be set internally. However I'm not sure it > > > complies with the src.conf(5) policy. Any objection to the patch below? > > We already have something like that. > > WITHOUT_SENDMAIL= is expanded to MK_SENDMAIL=no. > > > > You may want to do the same for SSP and keep the convention of the > > variable names. > > It already exists. Read share/mk/bsd.own.mk. I think I didn't explain the problem correctly, sorry. We indeed already have WITH_SSP/WITHOUT_SSP knob which is turned into MK_SSP="yes" or MK_SSP="no" respectively. The actual problem lies in Makefiles that define WITHOUT_SSP for some reason. For instance, in Makefile.inc1 the toolchain (namely bootstrap-tools, build-tools, cross-tools and a few other things) is built without SSP thanks to -DWITHOUT_SSP. For example: 224 BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ 225 ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ 226 DESTDIR= \ 227 BOOTSTRAPPING=${OSRELDATE} \ 228 -DWITHOUT_SSP \ 229 -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ 230 -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ 231 -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF There is a problem is the user defines WITH_SSP in src.conf or on command-line. In this case, bsd.own.mk screams because both WITH_SSP and WITHOUT_SSP are defined. Try to make buildworld with -DWITH_SSP, and it won't even fill your terminal before breaking :). That's why my proposition was to introduce NO_SSP, that could be used from those Makefiles instead of WITHOUT_SSP to work around the bsd.own.mk checks. But there may be a wiser or neater solution I can't devise by myself, that's why I'm asking. Thanks for your help. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 14:48:29 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FCFF106568A; Thu, 4 Sep 2008 14:48:29 +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 0950A8FC19; Thu, 4 Sep 2008 14:48:28 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 2E9802087; Thu, 4 Sep 2008 16:48:28 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 1C4B9844AB; Thu, 4 Sep 2008 16:48:28 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jeremie Le Hen References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> <20080904141705.GL72107@obiwan.tataz.chchile.org> Date: Thu, 04 Sep 2008 16:48:28 +0200 In-Reply-To: <20080904141705.GL72107@obiwan.tataz.chchile.org> (Jeremie Le Hen's message of "Thu, 4 Sep 2008 16:17:05 +0200") Message-ID: <86hc8w55mr.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, Rui Paulo Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 14:48:29 -0000 Jeremie Le Hen writes: > There is a problem is the user defines WITH_SSP in src.conf or on > command-line. In this case, bsd.own.mk screams because both WITH_SSP > and WITHOUT_SSP are defined. Try to make buildworld with -DWITH_SSP, > and it won't even fill your terminal before breaking :). bsd.own.mk: 184 # 185 # Supported NO_* options (if defined, MK_* will be forced to "no", 186 # regardless of user's setting). 187 # 188 .for var in \ 189 INSTALLLIB \ 190 MAN \ 191 PROFILE 192 .if defined(NO_${var}) 193 WITHOUT_${var}=3D 194 .endif 195 .endfor DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 15:49:04 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 931301065674; Thu, 4 Sep 2008 15:49:04 +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 231368FC08; Thu, 4 Sep 2008 15:49:04 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 08C3B17B5D9; Thu, 4 Sep 2008 17:49:03 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp3-g19.free.fr (Postfix) with ESMTP id BABAA17B536; Thu, 4 Sep 2008 17:49:02 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 817529B497; Thu, 4 Sep 2008 15:41:38 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 7CC3F4089; Thu, 4 Sep 2008 17:41:38 +0200 (CEST) Date: Thu, 4 Sep 2008 17:41:38 +0200 From: Jeremie Le Hen To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20080904154138.GM72107@obiwan.tataz.chchile.org> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> <20080904141705.GL72107@obiwan.tataz.chchile.org> <86hc8w55mr.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86hc8w55mr.fsf@ds4.des.no> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-hackers@FreeBSD.org, Rui Paulo Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 15:49:04 -0000 On Thu, Sep 04, 2008 at 04:48:28PM +0200, Dag-Erling Smørgrav wrote: > bsd.own.mk: > > 184 # > 185 # Supported NO_* options (if defined, MK_* will be forced to "no", > 186 # regardless of user's setting). > 187 # > 188 .for var in \ > 189 INSTALLLIB \ > 190 MAN \ > 191 PROFILE > 192 .if defined(NO_${var}) > 193 WITHOUT_${var}= > 194 .endif > 195 .endfor Ok, thank you Dag-Erling. I didn't understand what you meant the first time. If SSP belongs to this list, then NO_SSP is an alias for WITHOUT_SSP. But it will still not be possible to use WITH_SSP in src.conf or command-line. Does this mean that enforcing the default values with knobs is not supported? Or put differently, is it forbidden to use the opposite knobs of those documented in src.conf(5)? bsd.own.mk has the following test: 361 .if defined(WITH_${var}) && defined(WITHOUT_${var}) 362 .error WITH_${var} and WITHOUT_${var} can't both be set. 363 .endif So I would say that it is allowed to use WITH_SSP, even if it's the default. This can be a problem. Let's say a user has WITH_INFO= in src.conf for some reason. If WITHOUT_INFO= is used somewhere in the source tree, it will break with an error misleading for the user: WITH_INFO and WITHOUT_INFO can't be both set. Shouldn't we have a knob that overrides whatever the user says, only for internal use in the source tree? That was my original intent when asking if I could add NO_SSP. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 15:53:25 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84BBC10656A9 for ; Thu, 4 Sep 2008 15:53:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 4563B8FC17 for ; Thu, 4 Sep 2008 15:53:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m84FrNWP011096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Sep 2008 08:53:24 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48C00473.8070908@freebsd.org> Date: Thu, 04 Sep 2008 08:53:23 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Roland van Laar References: <20080903113131.GA8697@rebelion.Sisis.de> <48BEA791.6030406@freebsd.org> <20080903190032.GA2372@rebelion.Sisis.de> <48BEE778.4000503@freebsd.org> <20080903203306.GE33677@yttrium.micite.net> In-Reply-To: <20080903203306.GE33677@yttrium.micite.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: freebsd-hackers@freebsd.org Subject: Re: WPA && associating with unknown SSID X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 15:53:25 -0000 Roland van Laar wrote: > On Wed, Sep 03, 2008 at 12:37:28PM -0700, Sam Leffler wrote: > >> Matthias Apitz wrote: >> >>> El d?a Wednesday, September 03, 2008 a las 08:04:49AM -0700, Sam Leffler >>> escribi?: >>> >>> >>> >>>> Matthias Apitz wrote: >>>> >>>> >>>>> Hello, >>>>> >>>>> I'm using WPA to connect to my various Wifi AP's (office, home, partner >>>>> locations) and have them well configured in the wpa_supplicant.conf(5) >>>>> file; >>>>> >>>>> >>>>> >>>> >from time to time at home I encounter that it is associating with an >>>> >>>> >>>>> unknown AP of my neighbourhood: >>>>> >>>>> >>>>> # ifconfig iwi0 >>>>> iwi0: flags=8843 metric 0 mtu >>>>> 1500 >>>>> ether 00:13:ce:a1:e6:81 >>>>> inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255 >>>>> media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) >>>>> status: associated >>>>> ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84 >>>>> authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10 >>>>> scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 >>>>> roam:rate11g 5 protmode CTS roaming MANUAL >>>>> # ifconfig iwi0 list scan >>>>> SSID BSSID CHAN RATE S:N INT CAPS >>>>> o2DSL_kJaR 00:19:cb:86:b3:84 1 54M 19:0 100 EP >>>>> xxxxxxxxxxxx 00:14:6c:44:aa:f6 11 54M 13:0 100 EP WPA >>>>> >>>>> the network with SSID 'o2DSL_kJaR' is not im my >>>>> /etc/wpa_supplicant.conf; >>>>> >>>>> how this is possible and how can I prevent this? >>>>> >>>>> >>>>> >>>> You must have a wildcard entry in your wpa_supplicant.conf file (i.e. >>>> one w/o an ssid specified). >>>> >>>> >>> Thx for the idea, but I don't have any wildcard entry; I've checked the >>> conf file and also wpa_cli says: >>> >>> >>> >>>> list_networks >>>> >>>> >>> network id / ssid / bssid / flags >>> 0 santaclara any >>> 1 tarara any [CURRENT] >>> 2 OCLCPICAUK any >>> 3 board_room any >>> 4 guagua any >>> 5 OCN-LAN any >>> 6 ConnectionPoint any >>> >>> and: >>> >>> # fgrep network= /etc/wpa_supplicant.conf | wc -l >>> 7 >>> # fgrep ssid=\" /etc/wpa_supplicant.conf >>> ssid="santaclara" >>> ssid="tarara" >>> ssid="OCLCPICAUK" >>> ssid="board_room" >>> ssid="guagua" >>> ssid="OCN-LAN" >>> ssid="ConnectionPoint" >>> >>> >>> >> So far as I know this should not happen. It'd be useful to have a >> wpa_supplicant log that shows it associating to an ssid not listed in >> the config file. >> >> > > I encountered the same problem last week. I had a contrab which did an > ifconfig ath0 down; ifconfig ath0 up > This worked fine with WEP but wpa_supplicant exits when ath0 goes done. > ath0 connects to the first open AP after it gets up again; not reconnecting > to my WPA AP. > > I believe this is how things work; wpa_supplicant is launched only when the device is discovered (e.g. at boot or card insert) and not when marked up. You need to do something like /etc/rc.d/netif start ath0 to bring the interface up. Not sure if this can be handled more transparently (e.g. via devd). Sam From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 19:26:31 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0857A1065676; Thu, 4 Sep 2008 19:26:31 +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 B2B518FC14; Thu, 4 Sep 2008 19:26:30 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 84878208D; Thu, 4 Sep 2008 21:26:29 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 3EA53844B0; Thu, 4 Sep 2008 21:26:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jeremie Le Hen References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> <20080904141705.GL72107@obiwan.tataz.chchile.org> <86hc8w55mr.fsf@ds4.des.no> <20080904154138.GM72107@obiwan.tataz.chchile.org> Date: Thu, 04 Sep 2008 21:26:28 +0200 In-Reply-To: <20080904154138.GM72107@obiwan.tataz.chchile.org> (Jeremie Le Hen's message of "Thu, 4 Sep 2008 17:41:38 +0200") Message-ID: <8663pbzp97.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, Rui Paulo Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 04 Sep 2008 19:26:31 -0000 Jeremie Le Hen writes: > If SSP belongs to this list, then NO_SSP is an alias for WITHOUT_SSP. > But it will still not be possible to use WITH_SSP in src.conf or > command-line. > [...] > Shouldn't we have a knob that overrides whatever the user says, only for > internal use in the source tree? That was my original intent when > asking if I could add NO_SSP. That's *exactly* what NO_* does. Just add SSP to that list and replace WITHOUT_SSP with NO_SSP wherever it occurs in Makefiles in the tree. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 07:07:54 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9164106566C; Fri, 5 Sep 2008 07:07:54 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by mx1.freebsd.org (Postfix) with ESMTP id 768F58FC0A; Fri, 5 Sep 2008 07:07:53 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id 081231971F; Fri, 5 Sep 2008 09:07:53 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp6-g19.free.fr (Postfix) with ESMTP id B78A01724F; Fri, 5 Sep 2008 09:07:52 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id E65A39B497; Fri, 5 Sep 2008 07:00:28 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id D91614089; Fri, 5 Sep 2008 09:00:28 +0200 (CEST) Date: Fri, 5 Sep 2008 09:00:28 +0200 From: Jeremie Le Hen To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20080905070028.GN72107@obiwan.tataz.chchile.org> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> <20080904141705.GL72107@obiwan.tataz.chchile.org> <86hc8w55mr.fsf@ds4.des.no> <20080904154138.GM72107@obiwan.tataz.chchile.org> <8663pbzp97.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="xesSdrSSBC0PokLI" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8663pbzp97.fsf@ds4.des.no> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-hackers@FreeBSD.org Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 07:07:54 -0000 --xesSdrSSBC0PokLI Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Dag-Erling, On Thu, Sep 04, 2008 at 09:26:28PM +0200, Dag-Erling Smørgrav wrote: > Jeremie Le Hen writes: > > If SSP belongs to this list, then NO_SSP is an alias for WITHOUT_SSP. > > But it will still not be possible to use WITH_SSP in src.conf or > > command-line. > > [...] > > Shouldn't we have a knob that overrides whatever the user says, only for > > internal use in the source tree? That was my original intent when > > asking if I could add NO_SSP. > > That's *exactly* what NO_* does. Just add SSP to that list and replace > WITHOUT_SSP with NO_SSP wherever it occurs in Makefiles in the tree. I've just tested it with NO_SSP and I can confirm it doesn't work despite the explicit comment above stating otherwise. By the way, the code is nearly identical between the supported options and the compat ones, I don't see how it could override the user settings: 186 # 187 # Supported NO_* options (if defined, MK_* will be forced to "no", 188 # regardless of user's setting). 189 # 190 .for var in \ 191 INSTALLLIB \ 192 MAN \ 193 PROFILE \ 194 SSP 195 .if defined(NO_${var}) 196 WITHOUT_${var}= 197 .endif 198 .endfor 199 200 # 201 # Compat NO_* options (same as above, except their use is deprecated). 202 # 203 .if !defined(BURN_BRIDGES) 204 .for var in \ 205 ACPI \ [...] 267 WPA_SUPPLICANT_EAPOL 268 .if defined(NO_${var}) 269 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}= 270 WITHOUT_${var}= 271 .endif 272 .endfor 273 .endif # !defined(BURN_BRIDGES) The attached patch implements a behaviour that seems more correct to me WRT the intent. What do you think of it? Thanks! -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > --xesSdrSSBC0PokLI Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="NO_FOO.diff" Index: bsd.own.mk =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/share/mk/bsd.own.mk,v retrieving revision 1.77 diff -u -r1.77 bsd.own.mk --- bsd.own.mk 16 Jun 2008 07:23:12 -0000 1.77 +++ bsd.own.mk 5 Sep 2008 06:56:17 -0000 @@ -182,19 +182,6 @@ # # -# Supported NO_* options (if defined, MK_* will be forced to "no", -# regardless of user's setting). -# -.for var in \ - INSTALLLIB \ - MAN \ - PROFILE -.if defined(NO_${var}) -WITHOUT_${var}= -.endif -.endfor - -# # Compat NO_* options (same as above, except their use is deprecated). # .if !defined(BURN_BRIDGES) @@ -393,6 +380,19 @@ .endfor # +# Supported NO_* options (if defined, MK_* will be forced to "no", +# regardless of user's setting). +# +.for var in \ + INSTALLLIB \ + MAN \ + PROFILE +.if defined(NO_${var}) +MK_${var}= no +.endif +.endfor + +# # Force some options off if their dependencies are off. # Order is somewhat important. # --xesSdrSSBC0PokLI-- From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 08:14:25 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74FC31065679 for ; Fri, 5 Sep 2008 08:14:25 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 1751B8FC12 for ; Fri, 5 Sep 2008 08:14:23 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.16.129.135] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id D9BCD10EEDD for ; Fri, 5 Sep 2008 09:56:39 +0200 (CEST) Message-ID: <48C0E634.70406@fsn.hu> Date: Fri, 05 Sep 2008 09:56:36 +0200 From: Attila Nagy User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: WITHOUT_CXX but with libstdc++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 08:14:25 -0000 Hello, I have some netbooted servers, which work off an NFS (master) server. Everything is built and installed on the master, so the netbooted "images" contain only what's really needed, so for example gcc is ripped out by WITHOUT_CPP=yes and WITHOUT_CXX=yes in the installworld phase. Unfortunately WITHOUT_CXX also disables the installation (given to installworld, of course if it's not built, it can't be installed) of libstdc++, which is needed for a lot of programs. Would it be possible to build CXX, but at installworld, install only the libraries (this is needed for runtime, so header files also won't be needed)? In src/gnu/lib/Makefile there is an MK_CXX test. With an OR MK_LIBCXX check (and defining WITH_LIBCXX as no by default) something similar could be done, with the limitation that at build time WITHOUT_CXX shouldn't be set and at install time, WITHOUT_CXX and WITH_LIBCXX should be yes. Any ideas about that (or a cleaner solution)? Thanks, From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 10:12:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 482721065672 for ; Fri, 5 Sep 2008 10:12:54 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB008FC1B for ; Fri, 5 Sep 2008 10:12:54 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA01.emeryville.ca.mail.comcast.net ([76.96.30.11]) by QMTA07.emeryville.ca.mail.comcast.net with comcast id AxkX1a00b0EPchoA7yCtdX; Fri, 05 Sep 2008 10:12:53 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA01.emeryville.ca.mail.comcast.net with comcast id AyCt1a0024v8bD78MyCtx7; Fri, 05 Sep 2008 10:12:53 +0000 X-Authority-Analysis: v=1.0 c=1 a=mDV3o1hIAAAA:8 a=d-pe6f8hAAAA:8 a=QycZ5dHgAAAA:8 a=Mz5a3wwlWe91LHh15DEA:9 a=D3htHCIYvMoiOQUTshUA:7 a=GrxJ2iga8-3bqyOpsyTwt2a2q2UA:4 a=EoioJ0NPDVgA:10 a=CWfAmLVWKswA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 27EB717B81A; Fri, 5 Sep 2008 03:12:53 -0700 (PDT) Date: Fri, 5 Sep 2008 03:12:53 -0700 From: Jeremy Chadwick To: freebsd-hackers@freebsd.org Message-ID: <20080905101253.GA53396@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Extending find(1) to support -printf X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 10:12:54 -0000 I've been working on $SUBJECT for the past few hours, and have managed to implement a very crude subset of GNU find's features: http://www.gnu.org/software/findutils/manual/html_node/find_html/Format-Directives.html#Format-Directives I've implemented %f and %p (which appear identical to GNU find), and some escaped characters. Things I need help with, as string parsing in C has never been my forte (which will become quite obvious): 1) Getting %h to behave like GNU find. The GNU find code is significantly different than ours. As it stands, %h is broken. 2) find . -printf '\' results in odd output (SHELL=/usr/local/bin/bash on my box). Not sure why this is happening, but it's a big concern. 3) Security issues. I believe use of a large number of formatting variables could exceed the calloc()'d buffer (of MAXPATHLEN), causing a segfault at bare minimum. I'm not sure how to work around this. Also, some folks on #bsdports asked why I was bothering with this in the first place: mutt supports backticks to run shell commands inside of a muttrc file. See "Building a list of mailboxes on the fly" below: http://wiki.mutt.org/?ConfigTricks Note the find ... -printf '%h ' method. I can accomplish (just about) the same using `echo $HOME/Maildir/*`, but if I want to exclude an entry, I can't use | grep -v, because mutt doesn't support pipes within backticks. :-) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | diff -ruN find.orig/extern.h find/extern.h --- find.orig/extern.h 2006-05-14 13:23:00.000000000 -0700 +++ find/extern.h 2008-09-04 20:55:17.000000000 -0700 @@ -73,6 +73,7 @@ creat_f c_nouser; creat_f c_perm; creat_f c_print; +creat_f c_printf; creat_f c_regex; creat_f c_simple; creat_f c_size; @@ -107,6 +108,7 @@ exec_f f_perm; exec_f f_print; exec_f f_print0; +exec_f f_printf; exec_f f_prune; exec_f f_regex; exec_f f_size; diff -ruN find.orig/function.c find/function.c --- find.orig/function.c 2006-05-27 11:27:41.000000000 -0700 +++ find/function.c 2008-09-05 03:01:36.000000000 -0700 @@ -1272,6 +1272,86 @@ /* c_print0 is the same as c_print */ /* + * -printf functions -- + * + * Always true, manipulates output based on printf()-like + * formatting characters. + */ +int +f_printf(PLAN *plan, FTSENT *entry) +{ + char *scan; + char *outptr; + char *outidx; + + if ((outptr = calloc(MAXPATHLEN, 1)) == NULL) + err(1, NULL); + + outidx = outptr; + + for (scan = plan->c_data; *scan; scan++) { + if (*scan == '%') { + if (scan[1] == 0) { + errx(1, "missing format character"); + } + else if (scan[1] == '%') { + *outidx++ = '%'; + } + else if (scan[1] == 'f') { + strcpy(outidx, entry->fts_name); + outidx += entry->fts_namelen; + } + /* XXX - needs to behave like GNU find %h */ + /* + else if (scan[1] == 'h') { + strcpy(outidx, entry->fts_path); + outidx += entry->fts_pathlen; + } + */ + else if (scan[1] == 'p') { + strcpy(outidx, entry->fts_path); + outidx += entry->fts_pathlen; + } + scan++; + } + else if (*scan == '\\') { + if (scan[1] == '\\') { + *outidx++ = '\\'; + } + else if (scan[1] == 'n') { + *outidx++ = '\n'; + } + else if (scan[1] == 't') { + *outidx++ = '\t'; + } + scan++; + } + else { + *outidx++ = *scan; + } + } + + (void)printf(outptr); + free(outptr); + return 1; +} + +PLAN * +c_printf(OPTION *option, char ***argvp) +{ + char *argstring; + PLAN *new; + + argstring = nextarg(option, argvp); + ftsoptions &= ~FTS_NOSTAT; + isoutput = 1; + + new = palloc(option); + new->c_data = argstring; + return new; +} + +/* * -prune functions -- * * Prune a portion of the hierarchy. diff -ruN find.orig/option.c find/option.c --- find.orig/option.c 2006-04-05 16:06:11.000000000 -0700 +++ find/option.c 2008-09-04 20:48:18.000000000 -0700 @@ -128,6 +128,7 @@ { "-perm", c_perm, f_perm, 0 }, { "-print", c_print, f_print, 0 }, { "-print0", c_print, f_print0, 0 }, + { "-printf", c_printf, f_printf, 0 }, { "-prune", c_simple, f_prune, 0 }, { "-regex", c_regex, f_regex, 0 }, { "-size", c_size, f_size, 0 }, From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 12:30:16 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2F7B1065678 for ; Fri, 5 Sep 2008 12:30:16 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 290978FC19 for ; Fri, 5 Sep 2008 12:30:15 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: by ey-out-2122.google.com with SMTP id 6so173107eyi.7 for ; Fri, 05 Sep 2008 05:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to; bh=NUVQfzwbkMj1LWBi+uuAH6L+7AlR6DznyfBJJE7LlP4=; b=Ac6GtAJ9LWvQiHNAu4ypyN1hrGvQD9DJIAZcZTY8ZlOIvBpQhOAfGn853L57zaS39b vIm+hnQwk+TD3paknIeac46kkfxULU59f+EtFO4qkcGnlvoQBXtPYAm3ByXNVqceJLtv Ig8iac1K0O1yOURG7QWCzm6vjFgwDQMAXQakM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; b=CsbDHswIHAopPVqJE9ZWgEwIm8OL223VG739Dz9xBMFmLRNcoRfWpzFBdJt17+cgO4 AUuoeGnvO4PgrGUziuiMqBMlzdw9CWkahA4ID/x2/4o/rH93CVK8u5bzup4K3oFYpv7y iuqzvC4Y4JTMYfXKbXAcNK/1Dk5sVIscPhPuM= Received: by 10.210.35.5 with SMTP id i5mr13632413ebi.79.1220615955672; Fri, 05 Sep 2008 04:59:15 -0700 (PDT) Received: from logik.internal.network ( [81.86.41.187]) by mx.google.com with ESMTPS id 10sm117292eyd.6.2008.09.05.04.59.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Sep 2008 04:59:14 -0700 (PDT) Received: by logik.internal.network (Postfix, from userid 11001) id A962C5F06; Fri, 5 Sep 2008 11:52:40 +0000 (UTC) Date: Fri, 5 Sep 2008 12:52:40 +0100 From: xorquewasp@googlemail.com To: Manolo Valdes Message-ID: <20080905115240.GA12137@logik.internal.network> References: <200809040028.40979.nolis71cu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200809040028.40979.nolis71cu@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: upgrade GDB-6.1.1 on the base System X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 12:30:16 -0000 On 20080904 00:28:40, Manolo Valdes wrote: > Hi Hackers > > reading a thread from this very list i solve my problem trying to debug user- > land programs. > > the problem was gdb-6.1.1 , and the thread point me to use gdb-6.6 > and all my pains went away. > > so my question is: > > will be GDB upgraded in the base system? or the buggy gdb-6.1.1 still be > around? > GDB 6.6 is in ports if you need a later version. I agree that the base gdb should be upgraded. On a related note, I've been using a manually compiled GDB 6.8 for Ada work on all my machines and haven't had any problems to date. xw From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 14:17:55 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ED321065712 for ; Fri, 5 Sep 2008 14:17:55 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 890658FC1C for ; Fri, 5 Sep 2008 14:17:53 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m85EHUh5003217 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 5 Sep 2008 16:17:31 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id m85EHOPS033220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2008 16:17:24 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id m85EHOIk020692; Fri, 5 Sep 2008 16:17:24 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id m85EHNNV020691; Fri, 5 Sep 2008 16:17:23 +0200 (CEST) (envelope-from ticso) Date: Fri, 5 Sep 2008 16:17:23 +0200 From: Bernd Walter To: Charles Beckham Message-ID: <20080905141723.GI17711@cicely7.cicely.de> References: <20080902154131.GH1089@bunrab.catwhisker.org> <20080902203809.GK1089@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.065, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-hackers@freebsd.org, David Wolfskill Subject: Re: Obytes counter in netstat not incrementing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2008 14:17:55 -0000 On Tue, Sep 02, 2008 at 05:22:10PM -0700, Charles Beckham wrote: > i've already made the changes to rc.conf, but since its a shared > machine and almost all addresses are in use, i'll have to schedule a > reboot before i can make changes effective, i will post a follwup > after i've made these changes. thanks for you assistance. Be carefull with the mask - the primary should match the network range. Just additional ones need to be /32. If you are using multiple network ranges then you need multiple primary ones. I'm not a friend of large aliases on Ethernet anyway, since it just creates large ARP tables and wastes addresses (broadcast, ...). What I normaly do is configuring additional addresses (not part of any LAN) on lo0. Then you just route those addresses to the host. Using LAN IPs is just a workaround when you can't route IPs or other special requirements exists. One of the special requirement might be that the clients are distributed on the same LAN, so you don't want to pass everything over a router. But the typical case for such a large number of addresses are internet services and in that case everything has to pass your router anyway. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 14:32:24 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D5081065676 for ; Fri, 5 Sep 2008 14:32:24 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from mail.vega.ru (infra.dev.vega.ru [90.156.167.14]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9D18FC1A for ; Fri, 5 Sep 2008 14:32:23 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from [87.242.97.68] (port=50236 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1Kbbt8-000GIc-40; Fri, 05 Sep 2008 14:02:14 +0000 Date: Fri, 5 Sep 2008 18:02:04 +0400 From: Ruslan Ermilov To: Jeremie Le Hen Message-ID: <20080905140204.GA6498@edoofus.dev.vega.ru> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> <20080904141705.GL72107@obiwan.tataz.chchile.org> <86hc8w55mr.fsf@ds4.des.no> <20080904154138.GM72107@obiwan.tataz.chchile.org> <8663pbzp97.fsf@ds4.des.no> <20080905070028.GN72107@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080905070028.GN72107@obiwan.tataz.chchile.org> Cc: Dag-Erling Sm?rgrav , freebsd-hackers@FreeBSD.org Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 14:32:24 -0000 On Fri, Sep 05, 2008 at 09:00:28AM +0200, Jeremie Le Hen wrote: > Dag-Erling, > > On Thu, Sep 04, 2008 at 09:26:28PM +0200, Dag-Erling Sm?rgrav wrote: > > Jeremie Le Hen writes: > > > If SSP belongs to this list, then NO_SSP is an alias for WITHOUT_SSP. > > > But it will still not be possible to use WITH_SSP in src.conf or > > > command-line. > > > [...] > > > Shouldn't we have a knob that overrides whatever the user says, only for > > > internal use in the source tree? That was my original intent when > > > asking if I could add NO_SSP. > > > > That's *exactly* what NO_* does. Just add SSP to that list and replace > > WITHOUT_SSP with NO_SSP wherever it occurs in Makefiles in the tree. > > I've just tested it with NO_SSP and I can confirm it doesn't work > despite the explicit comment above stating otherwise. By the way, the > code is nearly identical between the supported options and the compat > ones, I don't see how it could override the user settings: > This is not the way the things were designed to work. http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html WITH_*/WITHOUT_* are for users, and MK_* are for makefiles. NO_*'s are mainly for backwards compatibility and (to the lesser extent) to support some of the makefile buzzwords like NO_MAN. There's no possibility to easily make what you want, i.e., disable SSP for some parts of the tree. Doing it for particular makefiles OTOH should be pretty easy, by starting a makefile with the following two lines: .include MK_SSP=no bsd.own.mk will set MK_SSP as per default ("yes"), then possibly reset it to "no" if a user set WITHOUT_SSP (either on a command line, in /etc/make.conf, or in environment), and then the second line will unconditionally reset it to "no". This will work in the SSP case, but may not work in general because some options have dependencies. Fortunately, cases like this are rare. (There are several makefiles in the tree that already do this; "grep ^MK_" to see them.) Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 14:39:16 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 593AD10656A6 for ; Fri, 5 Sep 2008 14:39:16 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA03.emeryville.ca.mail.comcast.net (qmta03.emeryville.ca.mail.comcast.net [76.96.30.32]) by mx1.freebsd.org (Postfix) with ESMTP id 401CA8FC16 for ; Fri, 5 Sep 2008 14:39:16 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by QMTA03.emeryville.ca.mail.comcast.net with comcast id AzWQ1a00216AWCUA32fGt8; Fri, 05 Sep 2008 14:39:16 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA06.emeryville.ca.mail.comcast.net with comcast id B2fF1a0034v8bD78S2fFgg; Fri, 05 Sep 2008 14:39:15 +0000 X-Authority-Analysis: v=1.0 c=1 a=KgNaWZNk1wsA:10 a=d-pe6f8hAAAA:8 a=QycZ5dHgAAAA:8 a=u4EwfqHMNk4GdPdDfYcA:9 a=ZCSos2YTJHuzVx0kQV4A:7 a=cHi0HIuRXPgQijr84tDhSsZ209wA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 1328617B81A; Fri, 5 Sep 2008 07:39:15 -0700 (PDT) Date: Fri, 5 Sep 2008 07:39:15 -0700 From: Jeremy Chadwick To: freebsd-hackers@freebsd.org Message-ID: <20080905143915.GA60002@icarus.home.lan> References: <20080905101253.GA53396@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080905101253.GA53396@icarus.home.lan> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: Extending find(1) to support -printf X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 14:39:16 -0000 On Fri, Sep 05, 2008 at 03:12:53AM -0700, Jeremy Chadwick wrote: > Also, some folks on #bsdports asked why I was bothering with this in the > first place: mutt supports backticks to run shell commands inside of > a muttrc file. See "Building a list of mailboxes on the fly" below: > > http://wiki.mutt.org/?ConfigTricks > > Note the find ... -printf '%h ' method. I can accomplish (just > about) the same using `echo $HOME/Maildir/*`, but if I want to > exclude an entry, I can't use | grep -v, because mutt doesn't support > pipes within backticks. :-) Follow-up: mutt's backtick support does in fact respect pipes. My echo|grep -v was doing exactly what I requested: the grep -v was removing all output of the echo, since echo returned the results in a space-delimited format, not one per line. Hence, "mailboxes" was being executed without any arguments. Equally as frustrating, mutt's backtick support will only honour the first line of input. If a backticked command returns multiple lines, only the first is read; the rest are ignored. This makes using BSD find annoying, since find always outputs results terminated with a newline. One of my peers uses find | perl -ne 'chomp; print "=", $_, " "' to deal with this limit, which is quite disgusting. I realise there are workarounds for the dilemma (e.g. write a shell script that provides the exact output needed), but it seems like one could kill two birds with one stone by extending BSD find to support -printf, which does not output a newline unless \n is used within the output formatting. (This also explains why the Mutt Wiki entry uses -printf '%h ', note the space.) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 16:42:03 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB5BD1065678 for ; Fri, 5 Sep 2008 16:42:03 +0000 (UTC) (envelope-from jonathan+freebsd-hackers@hst.org.za) Received: from hermes.hst.org.za (onix.hst.org.za [209.203.2.133]) by mx1.freebsd.org (Postfix) with ESMTP id 927878FC1A for ; Fri, 5 Sep 2008 16:42:01 +0000 (UTC) (envelope-from jonathan+freebsd-hackers@hst.org.za) Received: from [10.1.11.1] ([10.1.11.1]) (authenticated bits=0) by hermes.hst.org.za (8.13.8/8.13.8) with ESMTP id m85GZaNa095338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 5 Sep 2008 18:35:37 +0200 (SAST) (envelope-from jonathan+freebsd-hackers@hst.org.za) From: Jonathan McKeown To: freebsd-hackers@freebsd.org Date: Fri, 5 Sep 2008 18:46:09 +0200 User-Agent: KMail/1.9.4 References: <20080905101253.GA53396@icarus.home.lan> <20080905143915.GA60002@icarus.home.lan> In-Reply-To: <20080905143915.GA60002@icarus.home.lan> X-Face: $@VrUx^RHy/}yu]jKf/<4T%/d|F+$j-Ol2"2J$q+%OK1]&/G_S9(=?utf-8?q?HkaQ*=60!=3FYOK=3FY!=27M=60C=0A=09aP=5C9nVPF8Q=7DCilHH8l=3B=7E!4?= =?utf-8?q?2HK6=273lg4J=7Daz?=@1Dqqh:J]M^"YPn*2IWrZON$1+G?oX3@ =?utf-8?q?k=230=0A=0954XDRg=3DYn=5FF-etwot4U=24b?=dTS{i X-Spam-Score: -4.399 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.61 on 209.203.2.133 Subject: Re: Extending find(1) to support -printf X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 16:42:03 -0000 On Friday 05 September 2008 16:39, Jeremy Chadwick wrote: > Equally as frustrating, mutt's backtick support will only honour the > first line of input. If a backticked command returns multiple lines, > only the first is read; the rest are ignored. This makes using BSD find > annoying, since find always outputs results terminated with a newline. > One of my peers uses find | perl -ne 'chomp; print "=", $_, " "' to deal > with this limit, which is quite disgusting. It is, especially when you consider find ... | xargs (or find ... -print0 | xargs -0 if your filenames might cause problems (embedded spaces etc)). Jonathan From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 18:24:01 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E85BE106564A; Fri, 5 Sep 2008 18:24:01 +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 43E2C8FC14; Fri, 5 Sep 2008 18:24:00 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp4-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp4-g19.free.fr (Postfix) with ESMTP id A2AF83EA141; Fri, 5 Sep 2008 20:23:59 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp4-g19.free.fr (Postfix) with ESMTP id 4D5E23EA134; Fri, 5 Sep 2008 20:23:59 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 4BCE69B497; Fri, 5 Sep 2008 18:16:34 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 3628F4089; Fri, 5 Sep 2008 20:16:34 +0200 (CEST) Date: Fri, 5 Sep 2008 20:16:34 +0200 From: Jeremie Le Hen To: Ruslan Ermilov Message-ID: <20080905181634.GC11644@obiwan.tataz.chchile.org> References: <20080904124653.GK72107@obiwan.tataz.chchile.org> <20080904135200.GC31289@alpha.local> <86ljy857zz.fsf@ds4.des.no> <20080904141705.GL72107@obiwan.tataz.chchile.org> <86hc8w55mr.fsf@ds4.des.no> <20080904154138.GM72107@obiwan.tataz.chchile.org> <8663pbzp97.fsf@ds4.des.no> <20080905070028.GN72107@obiwan.tataz.chchile.org> <20080905140204.GA6498@edoofus.dev.vega.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <20080905140204.GA6498@edoofus.dev.vega.ru> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Dag-Erling Smorgrav , freebsd-hackers@FreeBSD.org Subject: Re: Creation of the NO_SSP build knob X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 18:24:02 -0000 --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Ruslan, On Fri, Sep 05, 2008 at 06:02:04PM +0400, Ruslan Ermilov wrote: > This is not the way the things were designed to work. > > http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html > > WITH_*/WITHOUT_* are for users, and MK_* are for makefiles. > > NO_*'s are mainly for backwards compatibility and (to the lesser > extent) to support some of the makefile buzzwords like NO_MAN. > > There's no possibility to easily make what you want, i.e., disable > SSP for some parts of the tree. Doing it for particular makefiles > OTOH should be pretty easy, by starting a makefile with the > following two lines: > > .include > MK_SSP=no > > bsd.own.mk will set MK_SSP as per default ("yes"), then possibly > reset it to "no" if a user set WITHOUT_SSP (either on a command > line, in /etc/make.conf, or in environment), and then the second > line will unconditionally reset it to "no". > > This will work in the SSP case, but may not work in general > because some options have dependencies. Fortunately, cases like > this are rare. (There are several makefiles in the tree that > already do this; "grep ^MK_" to see them.) Thank you for this clarification. Unfortunately, I can't use MK_SSP in Makefile.inc1. The only option I see is to override SSP_CFLAGS on ${BMAKE} and ${TMAKE} command-line. There is also a problem with some Makefile.inc containing NO_SSP. It's not possible to turn those to "MK_SSP= no" because bsd.init.mk includes ../Makefile.inc before bsd.own.mk. Would you agree with the attached patch? Or would you prefer to use SSP_CFLAGS everywhere? Thank you! -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > --liOOAslEiF7prFVr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="MK_SSP=no.diff" Index: Makefile.inc1 =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/Makefile.inc1,v retrieving revision 1.610 diff -u -p -r1.610 Makefile.inc1 --- Makefile.inc1 19 Aug 2008 14:23:26 -0000 1.610 +++ Makefile.inc1 5 Sep 2008 15:16:25 -0000 @@ -225,7 +225,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - -DWITHOUT_SSP \ + SSP_CFLAGS= \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF @@ -235,8 +235,9 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ + SSP_CFLAGS= \ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \ - -DNO_WARNS -DNO_CTF -DWITHOUT_SSP + -DNO_WARNS -DNO_CTF # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ @@ -453,7 +454,7 @@ build32: .if ${MK_KERBEROS} != "no" .for _t in obj depend all cd ${.CURDIR}/kerberos5/tools; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ ${_t} .endfor .endif @@ -476,7 +477,7 @@ build32: .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic cd ${.CURDIR}/${_dir}; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ build-tools .endfor cd ${.CURDIR}; \ @@ -765,14 +766,14 @@ buildkernel: @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF \ + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF ${target} + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) Index: gnu/lib/csu/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/gnu/lib/csu/Makefile,v retrieving revision 1.29 diff -u -p -r1.29 Makefile --- gnu/lib/csu/Makefile 25 Jun 2008 21:33:28 -0000 1.29 +++ gnu/lib/csu/Makefile 5 Sep 2008 15:24:07 -0000 @@ -1,5 +1,8 @@ # $FreeBSD: src/gnu/lib/csu/Makefile,v 1.29 2008/06/25 21:33:28 ru Exp $ +.include +MK_SSP= no + GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs CCDIR= ${.CURDIR}/../../usr.bin/cc @@ -19,7 +22,6 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR} -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN -WITHOUT_SSP= .if ${MACHINE_ARCH} == "ia64" BEGINSRC= crtbegin.asm Index: gnu/lib/libssp/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/gnu/lib/libssp/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- gnu/lib/libssp/Makefile 25 Jun 2008 21:33:28 -0000 1.3 +++ gnu/lib/libssp/Makefile 5 Sep 2008 15:24:00 -0000 @@ -1,5 +1,8 @@ # $FreeBSD: src/gnu/lib/libssp/Makefile,v 1.3 2008/06/25 21:33:28 ru Exp $ +.include +MK_SSP= no + GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs SRCDIR= ${GCCLIB}/libssp @@ -10,7 +13,6 @@ LIB= ssp SHLIB_MAJOR= 0 SHLIBDIR?= /lib NO_PROFILE= -WITHOUT_SSP= SRCS= ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \ memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \ Index: lib/csu/Makefile.inc =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/lib/csu/Makefile.inc,v retrieving revision 1.1 diff -u -p -r1.1 Makefile.inc --- lib/csu/Makefile.inc 25 Jun 2008 21:33:28 -0000 1.1 +++ lib/csu/Makefile.inc 5 Sep 2008 15:17:19 -0000 @@ -1,3 +1,3 @@ # $FreeBSD: src/lib/csu/Makefile.inc,v 1.1 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +SSP_CFLAGS= Index: lib/libstand/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/lib/libstand/Makefile,v retrieving revision 1.62 diff -u -p -r1.62 Makefile --- lib/libstand/Makefile 25 Jun 2008 21:33:28 -0000 1.62 +++ lib/libstand/Makefile 5 Sep 2008 15:23:52 -0000 @@ -6,13 +6,15 @@ # quite large. # +.include +MK_SSP= no + LIB= stand NO_PROFILE= NO_PIC= INCS= stand.h MAN= libstand.3 -WITHOUT_SSP= CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${.CURDIR} Index: lib/libthr/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/lib/libthr/Makefile,v retrieving revision 1.35 diff -u -p -r1.35 Makefile --- lib/libthr/Makefile 25 Jun 2008 21:33:28 -0000 1.35 +++ lib/libthr/Makefile 5 Sep 2008 15:23:47 -0000 @@ -8,9 +8,8 @@ # (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the # system call stubs. -WITHOUT_SSP= - .include +MK_SSP= no .if ${SHLIBDIR} == "/usr/lib" SHLIBDIR= /lib Index: libexec/rtld-elf/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/libexec/rtld-elf/Makefile,v retrieving revision 1.42 diff -u -p -r1.42 Makefile --- libexec/rtld-elf/Makefile 25 Jun 2008 21:33:28 -0000 1.42 +++ libexec/rtld-elf/Makefile 5 Sep 2008 15:23:40 -0000 @@ -1,8 +1,7 @@ # $FreeBSD: src/libexec/rtld-elf/Makefile,v 1.42 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= - .include +MK_SSP= no PROG?= ld-elf.so.1 SRCS= rtld_start.S \ Index: rescue/librescue/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/rescue/librescue/Makefile,v retrieving revision 1.10 diff -u -p -r1.10 Makefile --- rescue/librescue/Makefile 25 Jun 2008 21:33:28 -0000 1.10 +++ rescue/librescue/Makefile 5 Sep 2008 15:23:36 -0000 @@ -2,9 +2,8 @@ # $FreeBSD: src/rescue/librescue/Makefile,v 1.10 2008/06/25 21:33:28 ru Exp $ # -WITHOUT_SSP= - .include +MK_SSP= no # Certain library entries have hard-coded references to # /bin, /sbin, etc, that require those entries to be Index: rescue/rescue/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/rescue/rescue/Makefile,v retrieving revision 1.63 diff -u -p -r1.63 Makefile --- rescue/rescue/Makefile 31 Aug 2008 14:27:59 -0000 1.63 +++ rescue/rescue/Makefile 5 Sep 2008 18:03:12 -0000 @@ -2,9 +2,9 @@ # @(#)Makefile 8.1 (Berkeley) 6/2/93 NO_MAN= -WITHOUT_SSP= .include +MK_SSP= no PROG= rescue BINDIR?=/rescue Index: sys/boot/Makefile.inc =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/Makefile.inc,v retrieving revision 1.1 diff -u -p -r1.1 Makefile.inc --- sys/boot/Makefile.inc 25 Jun 2008 21:33:28 -0000 1.1 +++ sys/boot/Makefile.inc 5 Sep 2008 15:23:21 -0000 @@ -1,3 +1,3 @@ # $FreeBSD: src/sys/boot/Makefile.inc,v 1.1 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= +SSP_CFLAGS= Index: sys/boot/i386/loader/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/i386/loader/Makefile,v retrieving revision 1.86 diff -u -p -r1.86 Makefile --- sys/boot/i386/loader/Makefile 25 Jun 2008 21:33:28 -0000 1.86 +++ sys/boot/i386/loader/Makefile 5 Sep 2008 15:23:19 -0000 @@ -1,8 +1,7 @@ # $FreeBSD: src/sys/boot/i386/loader/Makefile,v 1.86 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= - .include +MK_SSP= no PROG= loader.sym INTERNALPROG= Index: sys/boot/ia64/common/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/ia64/common/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- sys/boot/ia64/common/Makefile 25 Jun 2008 21:33:28 -0000 1.2 +++ sys/boot/ia64/common/Makefile 5 Sep 2008 15:23:13 -0000 @@ -1,8 +1,7 @@ # $FreeBSD: src/sys/boot/ia64/common/Makefile,v 1.2 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= - .include +MK_SSP= no LIB= ia64 INTERNALLIB= Index: sys/boot/ia64/efi/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/ia64/efi/Makefile,v retrieving revision 1.29 diff -u -p -r1.29 Makefile --- sys/boot/ia64/efi/Makefile 25 Jun 2008 21:33:28 -0000 1.29 +++ sys/boot/ia64/efi/Makefile 5 Sep 2008 15:23:09 -0000 @@ -1,9 +1,9 @@ # $FreeBSD: src/sys/boot/ia64/efi/Makefile,v 1.29 2008/06/25 21:33:28 ru Exp $ NO_MAN= -WITHOUT_SSP= .include +MK_SSP= no PROG= loader.sym INTERNALPROG= Index: sys/boot/ia64/ski/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/ia64/ski/Makefile,v retrieving revision 1.21 diff -u -p -r1.21 Makefile --- sys/boot/ia64/ski/Makefile 25 Jun 2008 21:33:28 -0000 1.21 +++ sys/boot/ia64/ski/Makefile 5 Sep 2008 15:23:03 -0000 @@ -1,9 +1,9 @@ # $FreeBSD: src/sys/boot/ia64/ski/Makefile,v 1.21 2008/06/25 21:33:28 ru Exp $ NO_MAN= -WITHOUT_SSP= .include +MK_SSP= no PROG= skiload STRIP= # We must not strip skiload at install time. Index: sys/boot/pc98/loader/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/pc98/loader/Makefile,v retrieving revision 1.42 diff -u -p -r1.42 Makefile --- sys/boot/pc98/loader/Makefile 25 Jun 2008 21:33:28 -0000 1.42 +++ sys/boot/pc98/loader/Makefile 5 Sep 2008 15:24:29 -0000 @@ -1,8 +1,7 @@ # $FreeBSD: src/sys/boot/pc98/loader/Makefile,v 1.42 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= - .include +MK_SSP= no PROG= loader.sym INTERNALPROG= Index: sys/boot/powerpc/ofw/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/powerpc/ofw/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- sys/boot/powerpc/ofw/Makefile 25 Jun 2008 21:33:28 -0000 1.24 +++ sys/boot/powerpc/ofw/Makefile 5 Sep 2008 15:24:37 -0000 @@ -1,8 +1,7 @@ # $FreeBSD: src/sys/boot/powerpc/ofw/Makefile,v 1.24 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= - .include +MK_SSP= no PROG= loader NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH} Index: sys/boot/sparc64/loader/Makefile =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/sys/boot/sparc64/loader/Makefile,v retrieving revision 1.21 diff -u -p -r1.21 Makefile --- sys/boot/sparc64/loader/Makefile 25 Jun 2008 21:33:28 -0000 1.21 +++ sys/boot/sparc64/loader/Makefile 5 Sep 2008 15:24:46 -0000 @@ -1,8 +1,7 @@ # $FreeBSD: src/sys/boot/sparc64/loader/Makefile,v 1.21 2008/06/25 21:33:28 ru Exp $ -WITHOUT_SSP= - .include +MK_SSP= no PROG= loader NEWVERSWHAT= "bootstrap loader" sparc64 --liOOAslEiF7prFVr-- From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 19:00:45 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6651065672 for ; Fri, 5 Sep 2008 19:00:45 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.freebsd.org (Postfix) with ESMTP id 6986D8FC1B for ; Fri, 5 Sep 2008 19:00:45 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from localhost (is1.park.rambler.ru [81.19.64.121]) by relay0.rambler.ru (Postfix) with ESMTP id EF6615E42 for ; Fri, 5 Sep 2008 22:42:35 +0400 (MSD) Date: Fri, 5 Sep 2008 22:40:32 +0400 From: Igor Sysoev To: freebsd-hackers@FreeBSD.org Message-ID: <20080905184032.GA71993@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Subject: opendir()/closedir() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 19:00:45 -0000 Looking at opendir()/readdir()/closedir() sequence via ktrace, I've seen supposedly useless lseek() syscall just before close(). It's called from closedir(): _seekdir(dirp, dirp->dd_rewind); /* free seekdir storage */ It seems that free()ing libc seekdir storage should be done without calling lseek(). Other strange place for me is stat() before open() in opendir() /* * stat() before _open() because opening of special files may be * harmful. _fstat() after open because the file may have changed. */ What is the case when opening special file may be harmful ? -- Igor Sysoev http://sysoev.ru/en/ From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 19:48:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43E801065670 for ; Fri, 5 Sep 2008 19:48:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id DD9158FC17 for ; Fri, 5 Sep 2008 19:48:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KbhIX-0007Ig-O8; Fri, 05 Sep 2008 22:48:49 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m85JmkP2070837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2008 22:48:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m85JmkRo089761; Fri, 5 Sep 2008 22:48:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m85JmjhD089760; Fri, 5 Sep 2008 22:48:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 Sep 2008 22:48:45 +0300 From: Kostik Belousov To: Igor Sysoev Message-ID: <20080905194845.GV2038@deviant.kiev.zoral.com.ua> References: <20080905184032.GA71993@rambler-co.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="t/OLoFZ234xJS33u" Content-Disposition: inline In-Reply-To: <20080905184032.GA71993@rambler-co.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KbhIX-0007Ig-O8 3b314a861a5f6613ae16997e40c92d9c X-Terabit: YES Cc: freebsd-hackers@freebsd.org Subject: Re: opendir()/closedir() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 19:48:52 -0000 --t/OLoFZ234xJS33u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 05, 2008 at 10:40:32PM +0400, Igor Sysoev wrote: > Looking at opendir()/readdir()/closedir() sequence via ktrace, > I've seen supposedly useless lseek() syscall just before close(). > It's called from closedir(): >=20 > _seekdir(dirp, dirp->dd_rewind); /* free seekdir storage */ >=20 > It seems that free()ing libc seekdir storage should be done without > calling lseek(). >=20 > Other strange place for me is stat() before open() in opendir() >=20 > /* > * stat() before _open() because opening of special files may be > * harmful. _fstat() after open because the file may have change= d. > */ >=20 > What is the case when opening special file may be harmful ? For instance, tape may be rewinded. The whole opendir/seekdir/telldir probably should be synced with OpenBSD version, at least due to SINGLEUSE. I made this conclusion when I merged the OpenBSD fix for seekdir several months ago. But I also decided then that I am not a volunteer. --t/OLoFZ234xJS33u Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjBjR0ACgkQC3+MBN1Mb4i5ZACgy0o29M427E7EXlZCGET3NWjX t2EAn1LfapVOUX8PBSaIZrKl1mU+QT2n =yCdT -----END PGP SIGNATURE----- --t/OLoFZ234xJS33u-- From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 20:42:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0A2C106567A for ; Fri, 5 Sep 2008 20:42:20 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.freebsd.org (Postfix) with ESMTP id A513D8FC2B for ; Fri, 5 Sep 2008 20:42:20 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from localhost (is1.park.rambler.ru [81.19.64.121]) by relay0.rambler.ru (Postfix) with ESMTP id 978A05CCC; Sat, 6 Sep 2008 00:42:18 +0400 (MSD) Date: Sat, 6 Sep 2008 00:40:14 +0400 From: Igor Sysoev To: Kostik Belousov Message-ID: <20080905204014.GB71993@rambler-co.ru> References: <20080905184032.GA71993@rambler-co.ru> <20080905194845.GV2038@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20080905194845.GV2038@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: opendir()/closedir() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 20:42:21 -0000 On Fri, Sep 05, 2008 at 10:48:45PM +0300, Kostik Belousov wrote: > On Fri, Sep 05, 2008 at 10:40:32PM +0400, Igor Sysoev wrote: > > Looking at opendir()/readdir()/closedir() sequence via ktrace, > > I've seen supposedly useless lseek() syscall just before close(). > > It's called from closedir(): > > > > _seekdir(dirp, dirp->dd_rewind); /* free seekdir storage */ > > > > It seems that free()ing libc seekdir storage should be done without > > calling lseek(). > > > > Other strange place for me is stat() before open() in opendir() > > > > /* > > * stat() before _open() because opening of special files may be > > * harmful. _fstat() after open because the file may have changed. > > */ > > > > What is the case when opening special file may be harmful ? > > For instance, tape may be rewinded. > > The whole opendir/seekdir/telldir probably should be synced with OpenBSD > version, at least due to SINGLEUSE. I made this conclusion when I merged > the OpenBSD fix for seekdir several months ago. But I also decided then > that I am not a volunteer. BTW, OpenBSD does not worry about tapes :), they use open()/fstat() from the very start. And closedir() does not lseek() since OpenBSD 4.0. -- Igor Sysoev http://sysoev.ru/en/ From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 5 20:45:22 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 474F51065670 for ; Fri, 5 Sep 2008 20:45:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id DD7148FC16 for ; Fri, 5 Sep 2008 20:45:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KbiBE-000EbR-OD; Fri, 05 Sep 2008 23:45:20 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m85Kiwas046806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2008 23:44:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m85Kiw2O095391; Fri, 5 Sep 2008 23:44:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m85Kiwkt095390; Fri, 5 Sep 2008 23:44:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 Sep 2008 23:44:58 +0300 From: Kostik Belousov To: Igor Sysoev Message-ID: <20080905204458.GW2038@deviant.kiev.zoral.com.ua> References: <20080905184032.GA71993@rambler-co.ru> <20080905194845.GV2038@deviant.kiev.zoral.com.ua> <20080905204014.GB71993@rambler-co.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/prQV9BysLedkZvy" Content-Disposition: inline In-Reply-To: <20080905204014.GB71993@rambler-co.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KbiBE-000EbR-OD 7639c60fd07c23d18f34c17945486e2a X-Terabit: YES Cc: freebsd-hackers@freebsd.org Subject: Re: opendir()/closedir() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Sep 2008 20:45:22 -0000 --/prQV9BysLedkZvy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 06, 2008 at 12:40:14AM +0400, Igor Sysoev wrote: > On Fri, Sep 05, 2008 at 10:48:45PM +0300, Kostik Belousov wrote: >=20 > > On Fri, Sep 05, 2008 at 10:40:32PM +0400, Igor Sysoev wrote: > > > Looking at opendir()/readdir()/closedir() sequence via ktrace, > > > I've seen supposedly useless lseek() syscall just before close(). > > > It's called from closedir(): > > >=20 > > > _seekdir(dirp, dirp->dd_rewind); /* free seekdir stora= ge */ > > >=20 > > > It seems that free()ing libc seekdir storage should be done without > > > calling lseek(). > > >=20 > > > Other strange place for me is stat() before open() in opendir() > > >=20 > > > /* > > > * stat() before _open() because opening of special files may= be > > > * harmful. _fstat() after open because the file may have ch= anged. > > > */ > > >=20 > > > What is the case when opening special file may be harmful ? > >=20 > > For instance, tape may be rewinded. > >=20 > > The whole opendir/seekdir/telldir probably should be synced with OpenBSD > > version, at least due to SINGLEUSE. I made this conclusion when I merged > > the OpenBSD fix for seekdir several months ago. But I also decided then > > that I am not a volunteer. >=20 > BTW, OpenBSD does not worry about tapes :), they use open()/fstat() from > the very start. And closedir() does not lseek() since OpenBSD 4.0. This was my point. They reworked the code, and it seems that rework brought in improvements, that are aligned with your observations. --/prQV9BysLedkZvy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjBmkoACgkQC3+MBN1Mb4hpuACgwTJlwFSolkAVfh8fnk3M/nAK ECEAn3oDT945p9sFOgGzAJyXsjL9nwrN =JidR -----END PGP SIGNATURE----- --/prQV9BysLedkZvy-- From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 03:12:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C18A21065675 for ; Sat, 6 Sep 2008 03:12:02 +0000 (UTC) (envelope-from rtfm.xx@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by mx1.freebsd.org (Postfix) with ESMTP id 917148FC1B for ; Sat, 6 Sep 2008 03:12:02 +0000 (UTC) (envelope-from rtfm.xx@gmail.com) Received: by wa-out-1112.google.com with SMTP id j4so494020wah.3 for ; Fri, 05 Sep 2008 20:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:x-google-sender-auth; bh=b6y/8JIzLdIO6zWwfYM+/KD2j9xseeFS3OIJdZ2Wsq0=; b=HEVMqZ/Fw5o1ij9FPDtdeO9dO+Jr1AfUrsy+r2bzZpQlPZMdVvxHO2jP9R4rBY38rt CS0gQGiz/ZUapRWVtq8LxPltKz6hk2HORfdZ4yQRNe71OkpuMKQg8VCcxr9ZU6pS9Nvw pUqFmkooDgwlA6fZCKrpoj6B0/kdrfu/4wdL0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :x-google-sender-auth; b=iZdwjVJxOEtNQp/JApdGRAH8w5btCE+HDnU3dNREpvMO5ce7CldKytx1lGMn+CsSwU 0X9x124+KcvwgMZtAWDjyMDve+yBLwjDBUv1MuuJL9DIn2PKWFet9IlUPOXqE/LwRy2H of5aAbl4bv2VWntqh10NEXINkYnxrNyyq3A4w= Received: by 10.114.181.1 with SMTP id d1mr10656343waf.185.1220668813220; Fri, 05 Sep 2008 19:40:13 -0700 (PDT) Received: by 10.114.157.5 with HTTP; Fri, 5 Sep 2008 19:40:13 -0700 (PDT) Message-ID: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> Date: Fri, 5 Sep 2008 19:40:13 -0700 From: "Joshua Piccari" Sender: rtfm.xx@gmail.com To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Google-Sender-Auth: 3fc79288fd884922 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Temp files in /etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 03:12:02 -0000 Hi all, I am setting up a few jails and I want them all to use the same /etc files (with the exception of the files related to the password files and databases), so I mounted a shared /etc folder as a nullfs with read-only permissions. The problem is that using utilities like pw or chpass create temporary files in /etc and that file system is mounted read-only. So is there a way to force any utilities that create temp files in /etc to use another location, something like /usr/local/etc for example? ~Joshua From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 03:41:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1097D106566C for ; Sat, 6 Sep 2008 03:41:40 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by mx1.freebsd.org (Postfix) with ESMTP id 9C0838FC1B for ; Sat, 6 Sep 2008 03:41:39 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA03.westchester.pa.mail.comcast.net ([76.96.62.27]) by QMTA09.westchester.pa.mail.comcast.net with comcast id BE5G1a0090bG4ec59FXczH; Sat, 06 Sep 2008 03:31:37 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA03.westchester.pa.mail.comcast.net with comcast id BFXb1a00G4v8bD73PFXcqn; Sat, 06 Sep 2008 03:31:36 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=nxR78qaYifMxGTBnaiQA:9 a=tDLl8M4CBEE2RJB4J3gJiiAoJv0A:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 8B54917B81A; Fri, 5 Sep 2008 20:31:35 -0700 (PDT) Date: Fri, 5 Sep 2008 20:31:35 -0700 From: Jeremy Chadwick To: Joshua Piccari Message-ID: <20080906033135.GA73919@icarus.home.lan> References: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Temp files in /etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 03:41:40 -0000 On Fri, Sep 05, 2008 at 07:40:13PM -0700, Joshua Piccari wrote: > Hi all, > I am setting up a few jails and I want them all to use the same /etc files > (with the exception of the files related to the password files and > databases), so I mounted a shared /etc folder as a nullfs with read-only > permissions. The problem is that using utilities like pw or chpass create > temporary files in /etc and that file system is mounted read-only. > So is there a way to force any utilities that create temp files in /etc to > use another location, something like /usr/local/etc for example? It depends entirely on how each individual program makes temporary files; there is no "standard". libc offers a many different methods of creating temporary files: tmpfile(3), tmpnam(3), tempnam(3), mktemp(3), and mkstemp(3). You can read the manpages to get an idea of how chaotic the situation is. Other programs may implement their own temporary file creation methods entirely, and may/may not support TMPDIR. I would try export TMPDIR="/some/place" and then attempt using pw and chpass, and see what happens. If they still attempt to use /tmp, said programs could probably be modified to support TMPDIR. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 06:12:46 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 273EE1065670 for ; Sat, 6 Sep 2008 06:12:46 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA05.emeryville.ca.mail.comcast.net (qmta05.emeryville.ca.mail.comcast.net [76.96.30.48]) by mx1.freebsd.org (Postfix) with ESMTP id 0ACE78FC12 for ; Sat, 6 Sep 2008 06:12:45 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA08.emeryville.ca.mail.comcast.net ([76.96.30.12]) by QMTA05.emeryville.ca.mail.comcast.net with comcast id BJBe1a0080FhH24A5JCleY; Sat, 06 Sep 2008 06:12:45 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA08.emeryville.ca.mail.comcast.net with comcast id BJCj1a00C4v8bD78UJCk7K; Sat, 06 Sep 2008 06:12:45 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=p5AoZTOSbs44rUt0sUUA:9 a=QVEDIY4KTwmwikTzIevRcrINCsMA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id CB54517B829; Fri, 5 Sep 2008 23:12:43 -0700 (PDT) Date: Fri, 5 Sep 2008 23:12:43 -0700 From: Jeremy Chadwick To: Joshua Piccari Message-ID: <20080906061243.GA77307@icarus.home.lan> References: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> <20080906033135.GA73919@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080906033135.GA73919@icarus.home.lan> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Temp files in /etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 06:12:46 -0000 On Fri, Sep 05, 2008 at 08:31:35PM -0700, Jeremy Chadwick wrote: > ... > If they still attempt to use /tmp, said programs could probably be > modified to support TMPDIR. This should have read /etc, not /tmp. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 06:31:15 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05C9D106564A for ; Sat, 6 Sep 2008 06:31:15 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA10.emeryville.ca.mail.comcast.net (qmta10.emeryville.ca.mail.comcast.net [76.96.30.17]) by mx1.freebsd.org (Postfix) with ESMTP id E6A418FC1C for ; Sat, 6 Sep 2008 06:31:14 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA02.emeryville.ca.mail.comcast.net ([76.96.30.19]) by QMTA10.emeryville.ca.mail.comcast.net with comcast id BJLf1a0060QkzPwAAJXEmi; Sat, 06 Sep 2008 06:31:14 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA02.emeryville.ca.mail.comcast.net with comcast id BJXD1a0064v8bD78NJXDyt; Sat, 06 Sep 2008 06:31:14 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=DPEs6TlfJ2MCFc5VAhsA:9 a=2KZsmEXmW2j2W_fVVQfHjDpNTdEA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 5A93917B81A; Fri, 5 Sep 2008 23:31:13 -0700 (PDT) Date: Fri, 5 Sep 2008 23:31:13 -0700 From: Jeremy Chadwick To: Joshua Piccari Message-ID: <20080906063113.GB77307@icarus.home.lan> References: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Temp files in /etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 06:31:15 -0000 On Fri, Sep 05, 2008 at 07:40:13PM -0700, Joshua Piccari wrote: > Hi all, > I am setting up a few jails and I want them all to use the same /etc files > (with the exception of the files related to the password files and > databases), so I mounted a shared /etc folder as a nullfs with read-only > permissions. The problem is that using utilities like pw or chpass create > temporary files in /etc and that file system is mounted read-only. > So is there a way to force any utilities that create temp files in /etc to > use another location, something like /usr/local/etc for example? I've had a chat with another user off-list about this, and the conclusion reached is that your mounting of /etc read-only is a bad idea, for many different reasons. Let's step through things slowly, so that hopefully it'll make sense. Foremost, /etc is mounted read-only, so what purpose does it serve to be using passwd or group-editing utilities on that system? You'd need r/w access to be able to accomplish that. Secondly, utilities like vipw(8), chpass(1), pw(8), and many others all create temporary files in /etc for security reasons: the temporary files *must* be on the same filesystem. In your case, /etc is its own filesystem, mounted read-only. So, placing the temporary files (e.g. /etc/pw.XXXXXX when using vipw(8)) on a separate filesystem or separate location is not plausible. Regarding the security implications, others will have to chime in here. Thirdly, some (but not all) of the utilities support command-line flags that allow an alternative directory to /etc: pw(8) -V flag vipw(8) -d flag pwd_mkdb(8) -d flag chpass(1) no support passwd(1) no support rmuser(8) no support adduser(8) no support Fourthly, there are periodic(8) scripts which explicitly refer to /etc/master.passwd and do not support an alternative directory. Those scripts will break, and disabling them is not recommended. Finally, some other caveats/situations which will likely arise: - The administrator (you) will have to remember to use the above flags every time they use said utilities; chances are you'll forget, especially since the flags aren't all the same, - A user of your jail may become very surprised when they find passwd, group, or other files missing from /etc, - Third-party software which reads /etc/passwd or related files will fail since you'd be using an alternative /etc directory. I'm pretty sure we have some ports which use rmuser/adduser (meaning the software itself, not necessarily the port installation part). Hope this sheds some light on things. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 06:49:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67CFB1065670 for ; Sat, 6 Sep 2008 06:49:34 +0000 (UTC) (envelope-from rtfm.xx@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA6C8FC17 for ; Sat, 6 Sep 2008 06:49:34 +0000 (UTC) (envelope-from rtfm.xx@gmail.com) Received: by wa-out-1112.google.com with SMTP id j4so537987wah.3 for ; Fri, 05 Sep 2008 23:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=aZQoI/kyljCKeHbYS+XRJp6v/T3j0Xu8sF+QknVW15U=; b=HBJTY8po7umzTtBqdMadnQ602oTbKhCojmsVDiB4O3yVclDdc7wdMKZ8+nX6E65mGA 2LXWihTiClqdvOpzeOK+S3tl9nbGla6bywyx9ZQz6COaFQkMDytwBU1eDe/J1+VOFMGA PAl6tZfGWZqvOxBsDfvr1Lz44I0YQwm/f+TJ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=TQ7hjw9GndOyw8cfybQkSuvdJyAXXq/CRgT+aStjzK5u7e7cr4wIw1ljzib5vtDo5b KX3z0bje2TZxHfEPRek+NDpwTYuEwy4AfBezFr0gA40XeA3/HXGfFg16+54p0cKJ/Boq bFz2tugZ//BOd2+aEDRtHD2n8OJXGRVl+6o/o= Received: by 10.114.184.7 with SMTP id h7mr10850227waf.9.1220683773804; Fri, 05 Sep 2008 23:49:33 -0700 (PDT) Received: by 10.114.157.5 with HTTP; Fri, 5 Sep 2008 23:49:33 -0700 (PDT) Message-ID: <15d3bc360809052349t4e90e719tf82c5002a2d9e2d@mail.gmail.com> Date: Fri, 5 Sep 2008 23:49:33 -0700 From: "Joshua Piccari" Sender: rtfm.xx@gmail.com To: freebsd-hackers@freebsd.org In-Reply-To: <20080906063113.GB77307@icarus.home.lan> MIME-Version: 1.0 References: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> <20080906063113.GB77307@icarus.home.lan> X-Google-Sender-Auth: 22d21049768dc6df Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Temp files in /etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 06:49:34 -0000 On Fri, Sep 5, 2008 at 11:31 PM, Jeremy Chadwick wrote: > On Fri, Sep 05, 2008 at 07:40:13PM -0700, Joshua Piccari wrote: > > Hi all, > > I am setting up a few jails and I want them all to use the same /etc > files > > (with the exception of the files related to the password files and > > databases), so I mounted a shared /etc folder as a nullfs with read-only > > permissions. The problem is that using utilities like pw or chpass create > > temporary files in /etc and that file system is mounted read-only. > > So is there a way to force any utilities that create temp files in /etc > to > > use another location, something like /usr/local/etc for example? > > I've had a chat with another user off-list about this, and the > conclusion reached is that your mounting of /etc read-only is a bad > idea, for many different reasons. Let's step through things slowly, so > that hopefully it'll make sense. > > Foremost, /etc is mounted read-only, so what purpose does it serve to be > using passwd or group-editing utilities on that system? You'd need r/w > access to be able to accomplish that. > > Secondly, utilities like vipw(8), chpass(1), pw(8), and many others all > create temporary files in /etc for security reasons: the temporary files > *must* be on the same filesystem. In your case, /etc is its own > filesystem, mounted read-only. So, placing the temporary files (e.g. > /etc/pw.XXXXXX when using vipw(8)) on a separate filesystem or separate > location is not plausible. Regarding the security implications, others > will have to chime in here. > > Thirdly, some (but not all) of the utilities support command-line flags > that allow an alternative directory to /etc: > > pw(8) -V flag > vipw(8) -d flag > pwd_mkdb(8) -d flag > chpass(1) no support > passwd(1) no support > rmuser(8) no support > adduser(8) no support > > Fourthly, there are periodic(8) scripts which explicitly refer to > /etc/master.passwd and do not support an alternative directory. Those > scripts will break, and disabling them is not recommended. > > Finally, some other caveats/situations which will likely arise: > > - The administrator (you) will have to remember to use the above flags > every time they use said utilities; chances are you'll forget, > especially since the flags aren't all the same, > - A user of your jail may become very surprised when they find > passwd, group, or other files missing from /etc, > - Third-party software which reads /etc/passwd or related files will > fail since you'd be using an alternative /etc directory. I'm > pretty sure we have some ports which use rmuser/adduser (meaning > the software itself, not necessarily the port installation part). > > Hope this sheds some light on things. > > -- > | Jeremy Chadwick jdc at parodius.com | > | Parodius Networking http://www.parodius.com/ | > | UNIX Systems Administrator Mountain View, CA, USA | > | Making life hard for others since 1977. PGP: 4BD6C0CB | > > Thanks so much Jeremy. You sure did give out lots of information. Unfortunately none that I can really use. Let me explain my situation a bit more. I have a shared /etc folder that is mounted read-only to the different jails that share it. Some of the configuration files which need to be dynamic from jail to jail are replaced with symbolic links to the jails /usr/local/etc folder. The reason for mount /etc as read-only is to ensure that none of the jails accidentally modify the configurations for all the jails sharing these configurations. However, there is an issue with creating temp files on a read-only system which means I will have to work around this somehow. I thought about setting the schg flag on all the files in the shared /etc folder but I don't want one jail to be able to add a rc.d script for every jail. Anyways, hope that helps clarify things. Also, is there a way to just move the password files/databases to /usr/local/etc instead, I vaguely remember something in one of the man pages about alternate passwd/master.passwd locations, probably the flags you noted above. I'll check that out more tomorrow after some good sleep. :) ~Joshua From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 08:10:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C19991065670 for ; Sat, 6 Sep 2008 08:10:41 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [87.251.61.211]) by mx1.freebsd.org (Postfix) with ESMTP id 91E0A8FC27 for ; Sat, 6 Sep 2008 08:10:41 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 5C77D1CC73; Sat, 6 Sep 2008 09:45:54 +0200 (CEST) Date: Sat, 6 Sep 2008 09:45:54 +0200 From: Ed Schouten To: Joshua Piccari Message-ID: <20080906074554.GB99951@hoeg.nl> References: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vMU6QONnIyeQN1NO" Content-Disposition: inline In-Reply-To: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers Subject: Re: Temp files in /etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 08:10:41 -0000 --vMU6QONnIyeQN1NO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Joshua Piccari wrote: > Hi all, > I am setting up a few jails and I want them all to use the same /etc files > (with the exception of the files related to the password files and > databases), so I mounted a shared /etc folder as a nullfs with read-only > permissions. The problem is that using utilities like pw or chpass create > temporary files in /etc and that file system is mounted read-only. > So is there a way to force any utilities that create temp files in /etc to > use another location, something like /usr/local/etc for example? You could mount a unionfs on top. If the bottom mount is read-only, it will store modifications on the top mount. --=20 Ed Schouten WWW: http://80386.nl/ --vMU6QONnIyeQN1NO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjCNTIACgkQ52SDGA2eCwVC5QCfa8kNm1vcJLxRxzz4rMnINWJ9 SQgAn29VsVXgJ+0RPfqCOdWNQ1FPvTeQ =O7N0 -----END PGP SIGNATURE----- --vMU6QONnIyeQN1NO-- From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 11:19:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 874881065672 for ; Sat, 6 Sep 2008 11:19:02 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 10DDA8FC22 for ; Sat, 6 Sep 2008 11:19:01 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.2) with ESMTP id m86BIeXS046901; Sat, 6 Sep 2008 12:18:52 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.1 smtp.infracaninophile.co.uk m86BIeXS046901 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1220699932; bh=v+6fzYuYTJlnpS JAyHyXyK8UMIa6Hzd3kM5u5UZnpE0=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<48C2670A.9000808@infracaninophile.co.uk>|Date:=20Sat,=2 006=20Sep=202008=2012:18:34=20+0100|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.16=20(X11/20080726)|MIME-Version:=201 .0|To:=20Joshua=20Piccari=20|CC:=20freebsd-h ackers@freebsd.org|Subject:=20Re:=20Temp=20files=20in=20/etc|Refere nces:=20<15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.co m>=09<20080906063113.GB77307@icarus.home.lan>=20<15d3bc360809052349 t4e90e719tf82c5002a2d9e2d@mail.gmail.com>|In-Reply-To:=20<15d3bc360 809052349t4e90e719tf82c5002a2d9e2d@mail.gmail.com>|X-Enigmail-Versi on:=200.95.6|Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha 256=3B=0D=0A=20protocol=3D"application/pgp-signature"=3B=0D=0A=20bo undary=3D"------------enigD941CFB25FBFB773B8539A91"; b=GBF97Z4TTQRa NIyHa/ZLWke7dMmIQr+oARJK6NP6Pjj4lzFT7tgOu83BlAb91/SlvXywC3ZJqLizHZe dboBi0AxB6IccOcQChuRxsxvWpG1x2JLIjalxQBVGQqCtQ7yAg3ZQf4QIpik9P+ZPDV +nA2QeLfx1m+fmliqesx3zqg8= Message-ID: <48C2670A.9000808@infracaninophile.co.uk> Date: Sat, 06 Sep 2008 12:18:34 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: Joshua Piccari References: <15d3bc360809051940t70f0b884mb9a80132acc50b45@mail.gmail.com> <20080906063113.GB77307@icarus.home.lan> <15d3bc360809052349t4e90e719tf82c5002a2d9e2d@mail.gmail.com> In-Reply-To: <15d3bc360809052349t4e90e719tf82c5002a2d9e2d@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD941CFB25FBFB773B8539A91" X-Virus-Scanned: ClamAV 0.93.3/8173/Sat Sep 6 10:24:00 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-hackers@freebsd.org Subject: Re: Temp files in /etc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 11:19:02 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD941CFB25FBFB773B8539A91 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Joshua Piccari wrote: > I have a shared /etc folder that is mounted read-only to the different = jails > that share it. Some of the configuration files which need to be dynamic= from > jail to jail are replaced with symbolic links to the jails /usr/local/e= tc > folder. The reason for mount /etc as read-only is to ensure that none o= f the > jails accidentally modify the configurations for all the jails sharing = these > configurations. However, there is an issue with creating temp files on = a > read-only system which means I will have to work around this somehow. I= > thought about setting the schg flag on all the files in the shared /etc= > folder but I don't want one jail to be able to add a rc.d script for ev= ery > jail. Can't you use a unionfs to achieve what you want? Abstract out all the common data to filesystem that you mount read-only, and then use unionfs = to mount a per-jail read/write overlay on top of that? Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enigD941CFB25FBFB773B8539A91 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkjCZxAACgkQ8Mjk52CukIyRwQCfVcg2mCHuk4OexHijg0bLZITf NoYAnR8GmCeIatCpd+JPQjcPyI40bjkP =Jo0p -----END PGP SIGNATURE----- --------------enigD941CFB25FBFB773B8539A91-- From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 18:41:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C48A21065677 for ; Sat, 6 Sep 2008 18:41:05 +0000 (UTC) (envelope-from subs@arpanet.ru) Received: from mail.arpanet.ru (mail.arpanet.ru [81.176.67.164]) by mx1.freebsd.org (Postfix) with ESMTP id 0595A8FC2F for ; Sat, 6 Sep 2008 18:41:04 +0000 (UTC) (envelope-from subs@arpanet.ru) Received: from [172.16.1.202] (ppp85-141-175-60.pppoe.mtu-net.ru [85.141.175.60]) by mail.arpanet.ru (MAIL.ArpaNET) with ESMTPSA id CEF2C1AB614A for ; Sat, 6 Sep 2008 22:21:22 +0400 (MSD) Message-ID: <48C2CA14.1090304@arpanet.ru> Date: Sat, 06 Sep 2008 22:21:08 +0400 From: Alexander Sizov User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Possible bug (amd64/i386) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 18:41:05 -0000 Hello, world! I don't speak English, but try to explain what I got. Server #1 (p4, i386-7.0-RELEASE, GENERIC): ------------------------------------------------------------------------------- CUT Sep 5 00:34:38 test kernel: Waiting (max 60 seconds) for system process `vnlru' to stop...done Sep 5 00:34:38 test kernel: Waiting (max 60 seconds) for system process `bufdaemon' to stop...done Sep 5 00:34:38 test kernel: Waiting (max 60 Sep 5 00:34:38 test kernel: seScyonncdisn)g fdoirs kssy,s tvenmo dperso creesmsa i`nsiynngc.e.r.' to3 stop...0 0 done Sep 5 00:34:38 test kernel: All buffers synced. ------------------------------------------------------------------------------- CUT Server #2 (core2quad, amd64-7.0-RELEASE, GENERIC): ... same picture ... , 6.* hasn't problems. dmesg server #1 (by 6.3): ------------------------------------------------------------------------------- CUT Copyright (c) 1992-2008 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 is a registered trademark of The FreeBSD Foundation. FreeBSD 6.3-RELEASE-p3 #2: Tue Sep 2 16:48:58 MSD 2008 root@afina.arpanet.ru:/usr/obj/usr/src/sys/AFINA ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (3000.12-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf43 Stepping = 3 Features=0xbfebfbff Features2=0x649d AMD Features=0x20100000 Logical CPUs per core: 2 real memory = 3211657216 (3062 MB) avail memory = 3147747328 (3001 MB) ioapic0: Changing APIC ID to 4 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_perf0: on cpu0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: irq 16 at device 1.0 on pci0 pci1: on pcib1 pcib2: at device 0.0 on pci1 pci2: on pcib2 amr0: mem 0xd0000000-0xd000ffff irq 24 at device 1.0 on pci2 amr0: delete logical drives supported by controller amr0: Firmware 713N, BIOS G119, 64MB RAM pci0: at device 2.0 (no driver attached) pcib3: irq 16 at device 28.0 on pci0 pci3: on pcib3 bge0: mem 0xd0300000-0xd030ffff irq 16 at device 0.0 on pci3 miibus0: on bge0 brgphy0: on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto bge0: Ethernet address: 00:30:48:84:bc:7c pcib4: irq 17 at device 28.1 on pci0 pci4: on pcib4 bge1: mem 0xd0400000-0xd040ffff irq 17 at device 0.0 on pci4 miibus1: on bge1 brgphy1: on miibus1 brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto bge1: Ethernet address: 00:30:48:84:bc:7d uhci0: port 0xe100-0xe11f irq 23 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xe200-0xe21f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xe300-0xe31f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3: port 0xe400-0xe41f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: on uhci3 usb3: USB revision 1.0 uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xd05c0000-0xd05c03ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered pcib5: at device 30.0 on pci0 pci5: on pcib5 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 pci0: at device 31.3 (no driver attached) fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A ppc0: port 0x378-0x37f,0x778-0x77b irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 ppi0: on ppbus0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 3000121462 Hz quality 800 Timecounters tick every 1.000 msec ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to deny, logging disabled acd0: CDROM at ata0-master UDMA33 amr0: delete logical drives supported by controller amrd0: on amr0 amrd0: 953870MB (1953525760 sectors) RAID 1 (optimal) hwpmc: TSC/1/0x20 P4/18/0xfff Trying to mount root from ufs:/dev/amrd0s1a bge0: link state changed to UP ------------------------------------------------------------------------------- CUT WBR! From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 20:05:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F15521065671 for ; Sat, 6 Sep 2008 20:05:19 +0000 (UTC) (envelope-from asmodai@in-nomine.org) Received: from nexus.in-nomine.org (dhammapada.xs4all.nl [82.95.168.248]) by mx1.freebsd.org (Postfix) with ESMTP id B21AC8FC0A for ; Sat, 6 Sep 2008 20:05:19 +0000 (UTC) (envelope-from asmodai@in-nomine.org) Received: from localhost (localhost.domini.in-nomine.org [127.0.0.1]) by nexus.in-nomine.org (Postfix) with ESMTP id D4143EB32; Sat, 6 Sep 2008 22:05:17 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at in-nomine.org Received: from nexus.in-nomine.org ([127.0.0.1]) by localhost (nexus.domini.in-nomine.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fA6dPH-TeUOe; Sat, 6 Sep 2008 22:05:16 +0200 (CEST) Received: by nexus.in-nomine.org (Postfix, from userid 1000) id CAAABEB30; Sat, 6 Sep 2008 22:05:16 +0200 (CEST) Date: Sat, 6 Sep 2008 22:05:16 +0200 From: Jeroen Ruigrok van der Werven To: Alexander Sizov Message-ID: <20080906200516.GN34564@nexus.in-nomine.org> References: <48C2CA14.1090304@arpanet.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <48C2CA14.1090304@arpanet.ru> Organisation: Ninth Circle Enterprises User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Possible bug (amd64/i386) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 20:05:20 -0000 -On [20080906 20:41], Alexander Sizov (subs@arpanet.ru) wrote: >Sep 5 00:34:38 test kernel: seScyonncdisn)g fdoirs kssy,s tvenmo >dperso creesmsa i`nsiynngc.e.r.' to3 stop...0 0 done On my AMD64 box (using 32 bit FreeBSD due to the Nvidia drivers) my 7-STABLE is also showing this garbled text from time to time. -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B I accept that some things will never change, I've let your tiny minds magnify my agony... From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 20:58:26 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA514106564A for ; Sat, 6 Sep 2008 20:58:26 +0000 (UTC) (envelope-from jimmy@mammothcheese.ca) Received: from smtp122.rog.mail.re2.yahoo.com (smtp122.rog.mail.re2.yahoo.com [206.190.53.27]) by mx1.freebsd.org (Postfix) with SMTP id 8CB2C8FC16 for ; Sat, 6 Sep 2008 20:58:26 +0000 (UTC) (envelope-from jimmy@mammothcheese.ca) Received: (qmail 94295 invoked from network); 6 Sep 2008 20:31:44 -0000 Received: from unknown (HELO ?72.138.160.206?) (jazzturk@rogers.com@72.138.160.206 with plain) by smtp122.rog.mail.re2.yahoo.com with SMTP; 6 Sep 2008 20:31:44 -0000 X-YMail-OSG: Tf0Q9WkVM1kGC9YnzQlfZeCUmExC43CbYW6LcLio2WCx5jS2Au.s9L8ssqKMgHcX2Q-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <48C2E8B0.6090000@mammothcheese.ca> Date: Sat, 06 Sep 2008 16:31:44 -0400 From: James Bailie User-Agent: Thunderbird 2.0.0.16 (X11/20080728) MIME-Version: 1.0 CC: freebsd-hackers@freebsd.org References: <48C2CA14.1090304@arpanet.ru> <20080906200516.GN34564@nexus.in-nomine.org> In-Reply-To: <20080906200516.GN34564@nexus.in-nomine.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Possible bug (amd64/i386) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jimmy@mammothcheese.ca List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2008 20:58:27 -0000 This is merely two processes writing to the console at the same time. Their output is being mixed together. Jeroen Ruigrok van der Werven wrote: > -On [20080906 20:41], Alexander Sizov (subs@arpanet.ru) wrote: >> Sep 5 00:34:38 test kernel: seScyonncdisn)g fdoirs kssy,s tvenmo >> dperso creesmsa i`nsiynngc.e.r.' to3 stop...0 0 done > > On my AMD64 box (using 32 bit FreeBSD due to the Nvidia drivers) my 7-STABLE > is also showing this garbled text from time to time. > -- James Bailie http://www.mammothcheese.ca From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 21:11:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68A151065672 for ; Sat, 6 Sep 2008 21:11:13 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2557B8FC1D for ; Sat, 6 Sep 2008 21:11:13 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by py-out-1112.google.com with SMTP id p76so515220pyb.10 for ; Sat, 06 Sep 2008 14:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=nyr+16RW58jiiu4v6s+Oyt71YFtY2JweIgjh7Wfcxm8=; b=CmVOMYDObxuzgObm8ULRizmDBrrAMJg0ZNAR6DFi3aVtobmYZrbnh8xPdNQlun4AvP NjNWMtbjSnLTrDn9HwXd2Cm3ecBAH88acHymqj7A/llNPIb1sbB8CDBLIKWl0HM5Z3ZS RpIT2QUB75fg62rqvGnw7+VwDpQ4Cec3ZSXk4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=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=JcnGcwj68tFffu78cZxK7fNaoAhPnbe+o0fy6pZo2lKdc+GRA/ClE6gtXCw6nc0uGh SEIpjlN5i+EKCSc5+eqIgjQsvYIaJZG59CePauHbNtn34DNCpRLu+bwns8YT8LSiTa3i LTrQmYG5gq2j5LaX8FrVfe45mky1QkmGQT6fY= Received: by 10.64.180.15 with SMTP id c15mr26869212qbf.26.1220734139491; Sat, 06 Sep 2008 13:48:59 -0700 (PDT) Received: by 10.64.201.8 with HTTP; Sat, 6 Sep 2008 13:48:59 -0700 (PDT) Message-ID: Date: Sat, 6 Sep 2008 21:48:59 +0100 From: "Igor Mozolevsky" Sender: mozolevsky@gmail.com To: "Jeroen Ruigrok van der Werven" In-Reply-To: <20080906200516.GN34564@nexus.in-nomine.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48C2CA14.1090304@arpanet.ru> <20080906200516.GN34564@nexus.in-nomine.org> X-Google-Sender-Auth: 9134d019b3f4a699 Cc: freebsd-hackers@freebsd.org, Alexander Sizov Subject: Re: Possible bug (amd64/i386) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 21:11:13 -0000 2008/9/6 Jeroen Ruigrok van der Werven : > -On [20080906 20:41], Alexander Sizov (subs@arpanet.ru) wrote: >>Sep 5 00:34:38 test kernel: seScyonncdisn)g fdoirs kssy,s tvenmo >>dperso creesmsa i`nsiynngc.e.r.' to3 stop...0 0 done > > On my AMD64 box (using 32 bit FreeBSD due to the Nvidia drivers) my 7-STABLE > is also showing this garbled text from time to time. I get that too on various SMP boxes. -- Igor From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 22:21:56 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B1C91065673; Sat, 6 Sep 2008 22:21:56 +0000 (UTC) (envelope-from lolo@agneau.org) Received: from bergerie.agneau.org (bergerie.agneau.org [88.173.248.15]) by mx1.freebsd.org (Postfix) with ESMTP id BF8478FC14; Sat, 6 Sep 2008 22:21:55 +0000 (UTC) (envelope-from lolo@agneau.org) Received: by bergerie.agneau.org (Postfix, from userid 500) id 90C761707CE; Sun, 7 Sep 2008 00:04:48 +0200 (CEST) Date: Sun, 7 Sep 2008 00:04:48 +0200 From: Laurent Frigault To: freebsd-stable@freebsd.org, freebsd-hackers@FreeBSD.org Message-ID: <20080906220448.GA78044@obelix.bergerie.agneau.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Powered-By: UUCP Cc: Subject: how to compute vm.pmap.pv_entry_count from procstat ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 22:21:56 -0000 Hi, On a 7.0-STABLE i386 web server, I got kernel messages reporting problems with PV entries: Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max tunable. This server (DELL poweredge R200 quad core 4G RAM) is having random hang every few weeks (need power off/on cycle, IPMI not responding any more with those hangs) , but I don't know if the hangs are related to a PV entries problem. Before increasing blindly vm.pmap.shpgperproc , I would like to evaluate a good value for vm.pmap.shpgperproc (default 200) because I remember reading somewhere that increasing too much shpgperproc could result in panic at boot time or later. If I guess correctly (I did not find any understandable by me documentation on vm.pmap.*) vm.pmap.pv_entry_count is the value of currently used PV entries . My idea was to use procstat -av output to compute some statistics about the number of PV entries needed by various kind of process (apache, ...) It should be possible to compute a good evaluation of vm.pmap.pv_entry_count by adding some combination of RES,PRES, SHD columns. When I add RES,PRES, SHD values, the result is bigger than pv_entry_count. What is the formula to retrieve pv_entry_count from procstat output or in other words, how to compute the number of PV entries used by a process ? Regards, -- Laurent Frigault | From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 23:17:17 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEBAB1065675 for ; Sat, 6 Sep 2008 23:17:17 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 866628FC1B for ; Sat, 6 Sep 2008 23:17:17 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 4F3486D454; Sun, 7 Sep 2008 01:19:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2L5cfa8RTqOQ; Sun, 7 Sep 2008 01:19:01 +0200 (CEST) Received: by mx1.rink.nu (Postfix, from userid 1000) id 575BC6D453; Sun, 7 Sep 2008 01:19:01 +0200 (CEST) Date: Sun, 7 Sep 2008 01:19:01 +0200 From: Rink Springer To: Igor Mozolevsky Message-ID: <20080906231901.GA56244@rink.nu> References: <48C2CA14.1090304@arpanet.ru> <20080906200516.GN34564@nexus.in-nomine.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org, Jeroen Ruigrok van der Werven , Alexander Sizov Subject: Re: Possible bug (amd64/i386) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 23:17:17 -0000 On Sat, Sep 06, 2008 at 09:48:59PM +0100, Igor Mozolevsky wrote: > I get that too on various SMP boxes. This is a known issue - look at http://wiki.freebsd.org/JeremyChadwick/Commonly_reported_issues (search for 'Scrambled or garbled kernel output') for more information. Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 6 23:46:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3F041065675 for ; Sat, 6 Sep 2008 23:46:33 +0000 (UTC) (envelope-from jamesfrancistoy@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id 6DE868FC15 for ; Sat, 6 Sep 2008 23:46:33 +0000 (UTC) (envelope-from jamesfrancistoy@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1042322fgb.35 for ; Sat, 06 Sep 2008 16:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition:x-google-sender-auth; bh=FKrDdx8IET5I1oBQ8X5LoVb9YoSWp/xLSER8zKjkcXg=; b=aFkVvuKzzvTZLVo16UpE1vMyaXeTL/g+wiOhrlcLP8isvlpbVc8RdsDmEJ2gyvVUdS DgVcWoWBpWjX7wzgZ8KcY2rBillQBRBMGKUMwxiOD1456IzFF/DY7Dmm+Bhtm4796ij1 O0m//aazvBFOyYIFezcs7IWJQMLUhduSnsHGE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=NbVXNdnOAywggmhgK2NB3eVB3zdnSj0Y/Mzy5swAzadjZzC1Y0YIJ+DnxRD3ZCv/Qg 147vKd3KtNIPhbmvNZ5diCktuAN28SJ8d/Kqm6w4TY9vfe141sxaVKszyd9KQfID0ztX JV8061fO67R86eVoZlZhMsr57IY9yqtno32rw= Received: by 10.187.166.12 with SMTP id t12mr2734451fao.90.1220743587677; Sat, 06 Sep 2008 16:26:27 -0700 (PDT) Received: by 10.187.218.13 with HTTP; Sat, 6 Sep 2008 16:26:27 -0700 (PDT) Message-ID: <9f8af95f0809061626q22bc8f60i48fd95b32cef3d04@mail.gmail.com> Date: Sat, 6 Sep 2008 19:26:27 -0400 From: jT Sender: jamesfrancistoy@gmail.com To: freebsd-hackers MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: de8142b621ba6b96 Subject: 256-byte inode support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Sep 2008 23:46:33 -0000 hackers, since tytso had updated ext3 -- i've noticed that i can't use my 265-byte inode ext3 drives -- is there any effort to update it? If not -- if you know where i should attempt to start please let me know so i can start working on support (i have a few other people i know interested in this) -- thanks and hope everyone is well respectfully, /jT