From owner-freebsd-bugs@FreeBSD.ORG Wed Dec 7 23:40:09 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0E1516A41F for ; Wed, 7 Dec 2005 23:40:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F45F43D7C for ; Wed, 7 Dec 2005 23:40:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB7Ne7A7091584 for ; Wed, 7 Dec 2005 23:40:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB7Ne6o9091581; Wed, 7 Dec 2005 23:40:06 GMT (envelope-from gnats) Date: Wed, 7 Dec 2005 23:40:06 GMT Message-Id: <200512072340.jB7Ne6o9091581@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jung-uk Kim Cc: Subject: Re: kern/89752: [bpf] [patch] bpf_validate() needs to do more checks X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jung-uk Kim List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2005 23:40:10 -0000 The following reply was made to PR kern/89752; it has been noted by GNATS. From: Jung-uk Kim To: Guy Harris Cc: bug-followup@FreeBSD.org Subject: Re: kern/89752: [bpf] [patch] bpf_validate() needs to do more checks Date: Wed, 7 Dec 2005 18:37:59 -0500 On Wednesday 07 December 2005 06:11 pm, Guy Harris wrote: > On Dec 7, 2005, at 2:32 PM, Jung-uk Kim wrote: > > It looks good but `bpf_maxbufsize' may be unavailable to other > > consumers such as ng_bpf(4) and it doesn't make sense to them. > > Then that check can probably be removed - OpenBSD's consumers might > all use bpf_maxbufsize, so it was OK for them, and it's just an > optimization anyway (as the comment says, a "More strict check with > actual packet length is done runtime"). I found another problem. BPF_MAXINSNS is tunable in FreeBSD and it is not available to use for others. If we remove the check also, there's no difference from the previous implementation. :-( > (BTW, this was from OpenBSD; if you check it in, say it's from Otto > Moerbeek's changes to OpenBSD, do *NOT* give me direct credit for > it!) Thanks for letting us know. Jung-uk Kim