From owner-cvs-src@FreeBSD.ORG Sun Apr 4 12:02:09 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88B6E16A4CE; Sun, 4 Apr 2004 12:02:09 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 327B243D45; Sun, 4 Apr 2004 12:02:09 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i34J1uPq084710; Sun, 4 Apr 2004 15:01:56 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i34J1tJG084707; Sun, 4 Apr 2004 15:01:56 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sun, 4 Apr 2004 15:01:55 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Brooks Davis In-Reply-To: <20040404051126.GA22393@Odin.AC.HMC.Edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: Ruslan Ermilov cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/net if_gif.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2004 19:02:09 -0000 On Sat, 3 Apr 2004, Brooks Davis wrote: > > Actually, just replacing nesting limiter with loop detection was a > > bad idea, so I didn't follow it. It's a bad idea because you might > > have many nesting (but not looping) gif interfaces, and this will > > still cause panic by exhausting the kernel stack. Instead, I have > > combined both checks. Please review the attached patch. > > Unless you can automaticly choose a valid value for max_gif_nesting, I > think it should be taken out and shot. Unless you can do that, there's > nothing you can do to prevent the admin from making a configuration that > blows out the stack so why keep the extra annoyance of gif_max_nest > around? It won't do anything to prevent the panic and will break things > in perfectly valid cases. If we're really worried about the stack > issue, forcing a requeue instead of processing to completion any time > we're nested makes more sense to me. Agreed -- I suspect that decapsulation should almost always re-queue rather than process inline. However, you still need loop detection that carries state for the packets as it gets processed. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research