From owner-freebsd-pf@FreeBSD.ORG Sat Feb 10 15:21:24 2007 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86BED16A402 for ; Sat, 10 Feb 2007 15:21:24 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.179]) by mx1.freebsd.org (Postfix) with ESMTP id 177AA13C494 for ; Sat, 10 Feb 2007 15:21:23 +0000 (UTC) (envelope-from max@love2party.net) Received: from [88.66.6.207] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis), id 0ML25U-1HFu2H2bmy-0002Xa; Sat, 10 Feb 2007 16:21:21 +0100 From: Max Laier Organization: FreeBSD To: freebsd-pf@freebsd.org Date: Sat, 10 Feb 2007 16:20:54 +0100 User-Agent: KMail/1.9.5 References: <200612161335.kBGDZkMj012022@freefall.freebsd.org> <061229091759A.42827@www.mmlab.cse.yzu.edu.tw> <200612291518.39222.max@love2party.net> In-Reply-To: <200612291518.39222.max@love2party.net> 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="nextPart1466578.z0NtyKnVV7"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200702101621.00430.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 X-Provags-ID2: V01U2FsdGVkX19DQIi/IlWzBikfqV0Jl0zpupBjFSDVjqA80Pit91Kvl94/NKonw+NUf7JFIfnrnBPYrOoNGpnyJRncdq1lbYoMObDaZ94K00noVxn66DR5rA== Cc: Tai-hwa Liang Subject: Re: debug.mpsafenet=1 vs. user/group rules [Re: kern/106805: ...] X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Feb 2007 15:21:24 -0000 --nextPart1466578.z0NtyKnVV7 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, after 6 weeks in HEAD I have received ZERO additional feedback! Does=20 anyone (other than avatar) care? On Friday 29 December 2006 15:18, Max Laier wrote: > I just put this in HEAD, a diff to RELENG_6 is attached. Please follow > avatar's example and test and report back! > > Just apply and put "options PF_MPSAFE_UGID" in your kernconf or > append "-DPF_MPSAFE_UGID" to your CFLAGS in make.conf. The latter > works for the module build as well. Don't forgot to turn > debug.mpsafenet back on. > > I'd also be interested in the output of "pfctl -si", in particular the > match counter and the State searches in order to get a picture of your > traffic pattern and how the patch might impact on it. > > On Friday 29 December 2006 02:21, Tai-hwa Liang wrote: > > On Sat, 16 Dec 2006, Max Laier wrote: > > [...] > > > > > The attached diff circumvents the problem by **always** doing the > > > credential lookup *before* walking the pf rules. This has the > > > benefit, that it works (at least I think it should), but there is a > > > price to pay. Now we have to pay for the socket lookup for *every* > > > tcp and udp packet instead of just for those that really hit > > > uid/gid rules. That's why I decided to make is a config option > > > "PF_MPFSAFE_UGID" which you can turn on if you are running a setup > > > that will benefit. The patch turns it on for the module-built by > > > default. > > > > > > A possible scenario that should benefit is a big iron SMP box > > > running lot of services that you want to filter using *stateful* > > > uid/gid rules. For this setup where a huge percentage of the > > > packets that are not captured by states eventually match a uid/gid > > > rule, you will even get added parallelism with this patch. > > > > > > On every other typical setup, it should be better to avoid > > > user/group rules or to disable mpsafenet. > > > > > > In order for this to hit the tree, I need tests confirming that it > > > really helps and possibly benchmarks that qualify the impact of it. > > > Thanks. > > > > Your patch works great here. The box in question never ran into a > > single lockup in the last 7 days. > > Great - Thanks for the report! =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 --nextPart1466578.z0NtyKnVV7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFzeLcXyyEoT62BG0RAiwBAJ4zuq/mXUYtemMv4nfbFxCdrTmE2wCfRxQQ J+g59oOP/VAo6+VtotpWabQ= =iHMH -----END PGP SIGNATURE----- --nextPart1466578.z0NtyKnVV7--