From owner-cvs-src@FreeBSD.ORG Wed Jul 28 18:07:26 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 B9CD516A4CE; Wed, 28 Jul 2004 18:07:26 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93C5E43D1F; Wed, 28 Jul 2004 18:07:26 +0000 (GMT) (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.10) with ESMTP id i6SI7COF001555; Wed, 28 Jul 2004 11:07:12 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i6SI7BXl001554; Wed, 28 Jul 2004 11:07:11 -0700 Date: Wed, 28 Jul 2004 11:07:11 -0700 From: Brooks Davis To: Scott Long Message-ID: <20040728180711.GA31842@Odin.AC.HMC.Edu> References: <4107E0F6.8060902@samsco.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <4107E0F6.8060902@samsco.org> User-Agent: Mutt/1.5.4i cc: src-committers@FreeBSD.org cc: cvs-src@FreeBSD.org cc: Alfred Perlstein cc: cvs-all@FreeBSD.org cc: Robert Watson cc: Garrett Wollman Subject: Re: cvs commit: src/sys/sys _task.h 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: Wed, 28 Jul 2004 18:07:26 -0000 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 28, 2004 at 11:23:02AM -0600, Scott Long wrote: > Robert Watson wrote: > >On Wed, 28 Jul 2004, Garrett Wollman wrote: > > > > > >>< >> said: > >> > >> > >>>* Maxime Henrion [040728 02:19] wrote: > >>> > >>>>Or have a struct ifnet for kernel and a struct xifnet for userland, a= s=20 > >>>>we > >>>>do in other places. > >> > >>>That sounds more correct (xifnet). > >> > >>No. Everything that would legitimately be available in an xifnet > >>structure is already made available through other interfaces. The only > >>reason programs might need to look at a struct ifnet is because they're > >>mucking about in kernel memory, in which case they need the real one and > >>not a "sanitized" version. (This is why I moved struct ifnet to > >> in the first place.)=20 > > > > > >Some applications and libraries declare their known violation of layering > >boundaries in the system by #define _KERNEL. Others structures have > >special #define's, such as COMPAT_43, _WANT_UCRED, etc. I'd be happy wi= th > >either #define _KERNEL or #if defined(_KERNEL) || _WANT_IFNET. >=20 > I'd be quite happy with >=20 > #ifndef _KERNEL > #error "No user-servicable parts inside" >=20 > or similar as is in /sys/sys/timetc.h. Either way, pollution bad, > fluffy bunnies good. First we need to get our house in order. I count at least 52 includes of net/if_var.h in our userland. We could go ahead and add: #if defined(BURN_BRIDGES) && !defined(_KERNEL) #error "No user-servicable parts inside" #endif That would break all the offenders when we branch without forcing us to deal with yet another thing before 5.3. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBB+tFXY6L6fI4GtQRAs6DAKDQFAhp3FNi42sWkIArpLKwp+e9SgCfU9fA 00YJxb1rZc3KJg1Ja6tPtq8= =BWd1 -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--