From owner-cvs-all Sat Sep 21 20:31:45 2002 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 885C937B401; Sat, 21 Sep 2002 20:31:44 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CBF443E3B; Sat, 21 Sep 2002 20:31:43 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id NAA10066; Sun, 22 Sep 2002 13:31:29 +1000 Date: Sun, 22 Sep 2002 13:40:17 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Jeff Roberson Cc: Robert Watson , , Subject: Re: cvs commit: src/sys/security/mac_biba mac_biba.c src/sys/security/mac_mls mac_mls.c In-Reply-To: <20020921224816.K43954-100000@mail.chesapeake.net> Message-ID: <20020922132906.J12545-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 21 Sep 2002, Jeff Roberson wrote: > On Sun, 22 Sep 2002, Bruce Evans wrote: > > > On Sat, 21 Sep 2002, Robert Watson wrote: > > > > > rwatson 2002/09/21 11:29:38 PDT > > > > > > Modified files: > > > sys/security/mac_biba mac_biba.c > > > sys/security/mac_mls mac_mls.c > > > Log: > > > As INVARIANTS isn't supported for code that loads only as a kernel > > > module and is not linked into the base system, two KASSERT's rotted. > > > Fix them by fixing variable names. It would be really nice if > > ^^^^ nasty > > > opt_global.h was used when building modules as part of a buildkernel. > > > > > > Obtained from: TrustedBSD Project > > > Sponsored by: DARPA, Network Associates Laboratories > > > > Modules are bad enough without making ones that only work with 1 kernel. > > What if we were to allow modules to build in KASSERTS that were only > enabled if the kernel they were loaded into supported it? That seems like > the right solution here. I guess I have no objections to modules being compiled with options that are binary compatible with all kernels. I think KASSERTs already work almost right here. "options INVARIANTS" gives KASSERTs in modules, and these are supposed to work if the kernel was compiled with "options INVARIANT_SUPPORT". Last time I looked, INVARIANT_SUPPORT had a low cost so it might as well be standard. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message