From owner-freebsd-arch@FreeBSD.ORG Fri Jul 27 07:44:13 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BF8416A418; Fri, 27 Jul 2007 07:44:13 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.174]) by mx1.freebsd.org (Postfix) with ESMTP id E4D2413C4B5; Fri, 27 Jul 2007 07:44:12 +0000 (UTC) (envelope-from max@love2party.net) Received: from [88.66.18.93] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis), id 0MKwh2-1IEKUc0Xom-00005Q; Fri, 27 Jul 2007 09:44:11 +0200 From: Max Laier Organization: FreeBSD To: Kris Kennaway Date: Fri, 27 Jul 2007 09:43:53 +0200 User-Agent: KMail/1.9.7 References: <20070717131518.G1177@fledge.watson.org> <46A100C2.1030606@elischer.org> <20070727024107.GA69300@rot26.obsecurity.org> In-Reply-To: <20070727024107.GA69300@rot26.obsecurity.org> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1297215.7gjCYQZVqa"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200707270944.08668.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19qgpJOsKPY13+dL0inB7/YqoaLLyS5B5I950U 3bLJO+qL4iNi9SOsv6E+CSfwVHqiAhIxlo9bBWaAul270yGKjy VHW9gY91VBvPOvwvL184E6mlcgcg15Zsy7aqOUn/lE= Cc: Robert Watson , Julian Elischer , freebsd-arch@freebsd.org Subject: Re: Attention pf/ipfw users with uid/gid/jail rules (Re: Reminder: NET_NEEDS_GIANT, debug.mpsafenet going away in 7.0) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2007 07:44:13 -0000 --nextPart1297215.7gjCYQZVqa Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 27 July 2007, Kris Kennaway wrote: > On Fri, Jul 20, 2007 at 11:36:50AM -0700, Julian Elischer wrote: > > Robert Watson wrote: > > >On Tue, 17 Jul 2007, Max Laier wrote: > > > > > >So far I have had 0 (zero) reports of problems since this thread > > > began. Could people using uid/gid/jail rules with ipfw or pf on 7.x > > > *please* try running their firewalls without debug.mpsafenet -- > > > ignore the witness warnings and/or disable witness, and let us know > > > if you experience deadlocks. We're reaching the very end of the > > > merge cycle for 7.0, and I would really like to remove the Giant > > > crutches (now effectively unused) from the network stack so it's > > > not part of the ABI/API, the code is simplified and cleaned up, > > > etc. > > > > does "problem" include a LOR message, or only a deadlock? > > I've seen plenty of the first, but not the second. > > Various users have reported definite deadlocks relating to uid/gid ^------^ ^------^ > firewall rules in the past. I don't think the strong wording is true. I have seen a few reports of=20 deadlocks in the past where debug.mpsafenet "fixed" the issue, but none=20 of the reporters where able to provide enough debugging details to=20 actually identify the culprit. Also note that a lot has changed since the early reports. What WITNESS is= =20 warning about now is something like: rlock(&lock1); mtx_lock(&lock2); mtx_unlock(&lock2); runlock(&lock1); vs. mtx_lock(&lock2); rlock(&lock1); runlock(&lock1); mtx_unlock(&lock2); It's obvious that this can't cause a deadlock unless there is a third=20 codepath that does either: wlock(&lock1); mtx_lock(&lock2); mtx_unlock(&lock2); wunlock(&lock1); or mtx_lock(&lock2); wlock(&lock1); wunlock(&lock1); mtx_unlock(&lock2); I have an idea how to teach WITNESS about this, but it's an awful hack,=20 yet. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1297215.7gjCYQZVqa Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBGqaJIXyyEoT62BG0RAm1aAJ9odYqxJEIjxEMrbr+bG2r3jC5TsQCaAr5+ 9fVT+KOkkxdub/q9NyqKoj4= =mAop -----END PGP SIGNATURE----- --nextPart1297215.7gjCYQZVqa--