From owner-cvs-all@FreeBSD.ORG Tue Mar 30 15:25:29 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3857616A4CF; Tue, 30 Mar 2004 15:25:29 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1793F43D49; Tue, 30 Mar 2004 15:25:29 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.3) with ESMTP id i2UNPIQF025129; Tue, 30 Mar 2004 15:25:19 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i2UNPIcN025121; Tue, 30 Mar 2004 15:25:18 -0800 Date: Tue, 30 Mar 2004 15:25:17 -0800 From: Brooks Davis To: Ruslan Ermilov Message-ID: <20040330232517.GA19416@Odin.AC.HMC.Edu> References: <200403221424.i2MEOQYK057524@repoman.freebsd.org> <20040330220349.GA97921@ip.net.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <20040330220349.GA97921@ip.net.ua> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Robert Watson cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net if_gif.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2004 23:25:29 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 31, 2004 at 01:03:49AM +0300, Ruslan Ermilov wrote: > On Mon, Mar 22, 2004 at 06:24:26AM -0800, Robert Watson wrote: > > rwatson 2004/03/22 06:24:26 PST > >=20 > > FreeBSD src repository > >=20 > > Modified files: > > sys/net if_gif.c=20 > > Log: > > Move "called", a static function variable used to detect recursive > > processing with gif interfaces, to a global variable named "gif_calle= d". > > Add an annotation that this approach will not work with a reentrant > > network stack, and that we should instead use packet tags to detect > > excessive recursive processing. > > =20 > > Revision Changes Path > > 1.42 +11 -4 src/sys/net/if_gif.c > >=20 > Implemented this in the attached patch. Note when testing: setting > net.link.gif.max_nesting too high (>20 on my system) and triggering > the recursion causes the kernel stack exhaustion. Why not just do what OpenBSD does and do actual loop detection? This gets rid of the nesting count hack which isn't really what you want to measure anyway. http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/if_gif.c.diff?r1=3D1.18&r= 2=3D1.19 -- Brooks --zhXaljGHf11kAtnf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAagHdXY6L6fI4GtQRAiz2AJ4+tdjiLA2q3CErWUAHO7NcgvMqTgCgmGGl WcZLEw0Ne+5cY07b9B2cCD8= =r8Ad -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--