
From bde@zeta.org.au Tue Apr 15 15:30:26 2003
Date: Wed, 16 Apr 2003 01:18:33 +1000 (EST)
From: Bruce Evans <bde@zeta.org.au>
To: Robert Watson <rwatson@FreeBSD.org>
Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject: Re: cvs commit: src/sys/conf options

On Mon, 14 Apr 2003, Robert Watson wrote:

> rwatson     2003/04/14 14:45:12 PDT
>
>   FreeBSD src repository
>
>   Modified files:
>     sys/conf             options
>   Log:
>   Add MAC_ALWAYS_LABEL_MBUF to options; this permits the administrator
>   to force the allocation of MAC labels for all mbufs regardless of
>   whether a configured policy requires labeling when the mbuf is
>   allocated.  This can be useful it you anticipate loading a fully
>   labeled policy after boot and don't want mbufs to exist without
>   label storage, for performance measurement purposes, etc.  It also
>   slightly lowers the overhead of m_tag labeling due to removing the
>   decision logic.

This seems to be missing in NOTES.

>   While here, improve commenting of other MAC options.

This unimproves the commenting, since individual options should only be
commented on in 1 place (not here).  This file shouldn't contain any
comments except meta-comments about what to put in it and technical
details.  There are good examples of these at the start of the file.
More examples:

    # Do not add comments on individual options in this file!
    # Put comments on options in NOTES, not here!
    # These rules should go without saying - see commit history

>   Obtained from:  TrustedBSD Project
>   Sponsored by:   DARPA, Network Associates Laboratories
>
>   Revision  Changes    Path
>   1.388     +7 -1      src/sys/conf/options

Should be more like +1 -4 to remove the comments, or larger to move the
options.  Options that use a prefix so that it is obvious what subsystem
they are for are grouped naturally if they are sorted normally.  Here is
an old patch that moves the MAC options and fixes a few of the other
style bugs in this file.

%%%
Index: options
===================================================================
RCS file: /home/ncvs/src/sys/conf/options,v
retrieving revision 1.366
diff -u -2 -r1.366 options
--- options	14 Jan 2003 22:44:48 -0000	1.366
+++ options	22 Feb 2003 04:06:09 -0000
@@ -73,13 +73,12 @@

 # Miscellaneous options.
-ALQ		opt_alq.h
 ADAPTIVE_MUTEXES
+ALQ
 COMPAT_43	opt_compat.h
 COMPAT_FREEBSD4	opt_compat.h
 COMPAT_SUNOS	opt_compat.h
-NO_COMPAT_FREEBSD4	opt_compat.h
 COMPILING_LINT	opt_global.h
-CY_PCI_FASTINTR
 CONSPEED	opt_comconsole.h
+CY_PCI_FASTINTR
 DDB
 DDB_NOKLDSYM	opt_ddb.h
@@ -88,5 +87,5 @@
 GDB_REMOTE_CHAT	opt_ddb.h
 GDBSPEED	opt_ddb.h
-NO_GEOM		opt_geom.h
+GEOM
 GEOM_AES	opt_geom.h
 GEOM_BDE	opt_geom.h
@@ -98,6 +97,6 @@
 GEOM_SUNLABEL	opt_geom.h
 HW_WDOG
-KSTACK_PAGES
 KSTACK_MAX_PAGES
+KSTACK_PAGES
 KTRACE
 KTRACE_REQUEST_POOL	opt_ktrace.h
@@ -105,7 +104,20 @@
 MD_ROOT		opt_md.h
 MD_ROOT_SIZE	opt_md.h
+MAC
+MAC_BIBA	opt_dontuse.h
+MAC_BSDEXTENDED	opt_dontuse.h
+MAC_DEBUG	opt_mac.h
+MAC_IFOFF	opt_dontuse.h
+MAC_LOMAC	opt_dontuse.h
+MAC_MLS		opt_dontuse.h
+MAC_NONE	opt_dontuse.h
+MAC_PARTITION	opt_dontuse.h
+MAC_SEEOTHERUIDS	opt_dontuse.h
+MAC_TEST	opt_dontuse.h
+MUTEX_DEBUG
 NDGBPORTS	opt_dgb.h
 NODEVFS		opt_devfs.h
-NTIMECOUNTER	opt_ntp.h
+NO_GEOM		opt_geom.h
+NO_COMPAT_FREEBSD4	opt_compat.h
 NSWAPDEV	opt_swap.h
 PANIC_REBOOT_WAIT_TIME	opt_panic.h
@@ -142,22 +154,6 @@

 # POSIX kernel options
-_KPOSIX_PRIORITY_SCHEDULING	opt_posix.h
 P1003_1B_SEMAPHORES		opt_posix.h
-
-#####################################################################
-# SECURITY POLICY PARAMETERS
-
-# Support for Mandatory Access Control (MAC)
-MAC		opt_mac.h
-MAC_BIBA	opt_dontuse.h
-MAC_BSDEXTENDED	opt_dontuse.h
-MAC_DEBUG	opt_mac.h
-MAC_IFOFF	opt_dontuse.h
-MAC_LOMAC	opt_dontuse.h
-MAC_MLS		opt_dontuse.h
-MAC_NONE	opt_dontuse.h
-MAC_PARTITION	opt_dontuse.h
-MAC_SEEOTHERUIDS	opt_dontuse.h
-MAC_TEST	opt_dontuse.h
+_KPOSIX_PRIORITY_SCHEDULING	opt_posix.h

 # Do we want the config file compiled into the kernel?
@@ -172,6 +168,8 @@
 EXT2FS		opt_dontuse.h
 FDESCFS		opt_dontuse.h
+HPFS		opt_dontuse.h
 LINPROCFS	opt_dontuse.h
 MSDOSFS		opt_dontuse.h
+NTFS		opt_dontuse.h
 NULLFS		opt_dontuse.h
 NWFS		opt_dontuse.h
@@ -179,15 +177,13 @@
 PROCFS		opt_dontuse.h
 PSEUDOFS	opt_dontuse.h
-UMAPFS		opt_dontuse.h
-NTFS		opt_dontuse.h
-HPFS		opt_dontuse.h
 SMBFS		opt_dontuse.h
-UNIONFS		opt_dontuse.h
 UDF		opt_dontuse.h
+UMAPFS		opt_dontuse.h
+UNIONFS		opt_dontuse.h

 # Broken - ffs_snapshot() dependency from ufs_lookup() :-(
 FFS		opt_ffs_broken_fixme.h

-# These static filesystems has one slightly bogus static dependency in
+# These static filesystems have one slightly bogus static dependency in
 # sys/i386/i386/autoconf.c.  If any of these filesystems are
 # statically compiled into the kernel, code for mounting them as root
@@ -196,4 +192,5 @@
 NFSSERVER	opt_nfs.h

+# XXX massive bitrot; this is now a normal component of FreeBSD.
 # If you are following the conditions in the copyright,
 # you can enable soft-updates which will speed up a lot of thigs
@@ -216,4 +213,7 @@
 UFS_DIRHASH	opt_ufs.h

+# XXX mounds of other options have been bogusly inserted beteen the ones
+# for static filesystems and here.
+# The below sentence is not in English, and neither is this one.
 # The above static dependencies are planned removed, with a
 # <filesystem>_ROOT option to control if it usable as root.  This list
@@ -252,6 +252,4 @@
 SCSI_NO_OP_STRINGS	opt_scsi.h

-
-
 # Options used only in cam/scsi/scsi_cd.c
 CHANGER_MIN_BUSY_SECONDS	opt_cd.h
@@ -295,4 +293,8 @@

 # Options used in the 'ata' ATA/ATAPI driver
+ACD_DEBUG		opt_ata.h
+AST_DEBUG		opt_ata.h
+ATAPI_DEBUG		opt_ata.h
+ATA_DEBUG		opt_ata.h
 ATA_STATIC_ID		opt_ata.h
 ATA_NOPCI		opt_ata.h
@@ -302,8 +304,4 @@
 DEV_ATAPIFD		opt_ata.h
 DEV_ATAPICAM		opt_ata.h
-ATA_DEBUG		opt_ata.h
-ATAPI_DEBUG		opt_ata.h
-ACD_DEBUG		opt_ata.h
-AST_DEBUG		opt_ata.h

 # Net stuff.
@@ -377,6 +375,6 @@
 NETGRAPH_IP_INPUT	opt_netgraph.h
 NETGRAPH_KSOCKET	opt_netgraph.h
-NETGRAPH_LMI		opt_netgraph.h
 NETGRAPH_L2TP		opt_netgraph.h
+NETGRAPH_LMI		opt_netgraph.h
 # MPPC compression requires proprietary files (not included)
 NETGRAPH_MPPC_COMPRESSION	opt_netgraph.h
@@ -398,5 +396,4 @@
 DRM_DEBUG		opt_drm.h

-
 ZERO_COPY_SOCKETS	opt_zero.h
 TI_PRIVATE_JUMBOS	opt_ti.h
@@ -455,9 +452,10 @@
 DEBUG_LOCKS		opt_global.h
 DEBUG_VFS_LOCKS		opt_global.h
-LOOKUP_SHARED		opt_global.h
 DIAGNOSTIC		opt_global.h
 ENABLE_VFS_IOOPT	opt_global.h
+MUTEX_PROFILING		opt_global.h
 INVARIANT_SUPPORT	opt_global.h
 INVARIANTS		opt_global.h
+LOOKUP_SHARED		opt_global.h
 MCLSHIFT		opt_global.h
 MSIZE			opt_global.h
@@ -559,9 +557,9 @@
 PCFCLOCK_VERBOSE	opt_pcfclock.h
 PCFCLOCK_MAX_RETRIES	opt_pcfclock.h
+TDFX_LINUX		opt_tdfx.h

 # RAIDframe options
 RAID_AUTOCONFIG		opt_raid.h
 RAID_DEBUG		opt_raid.h
-TDFX_LINUX opt_tdfx.h

 KTR			opt_global.h
@@ -572,5 +570,4 @@
 KTR_ENTRIES		opt_global.h
 KTR_VERBOSE		opt_ktr.h
-MUTEX_DEBUG		opt_global.h
 WITNESS			opt_global.h
 WITNESS_DDB		opt_witness.h
@@ -596,8 +593,4 @@
 WI_SYMBOL_FIRMWARE	opt_wi.h

-# Polling device handling
+# XXX bogusly global.
 DEVICE_POLLING		opt_global.h
-
-# Mutex profiling
-MUTEX_PROFILING		opt_global.h
-
%%%

Bruce
