xref: /netbsd-src/share/man/man4/options.4 (revision bada23909e740596d0a3785a73bd3583a9807fb8)
1.\"	$NetBSD: options.4,v 1.72 1999/03/16 01:19:17 garbled Exp $
2.\"
3.\" Copyright (c) 1996
4.\" 	Perry E. Metzger.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgment:
16.\"	This product includes software developed for the NetBSD Project
17.\"	by Perry E. Metzger.
18.\" 4. The name of the author may not be used to endorse or promote products
19.\"    derived from this software without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31.\"
32.\"
33.Dd June 26, 1998
34.Os
35.Dt OPTIONS 4
36.Sh NAME
37.Nm options
38.Nd Miscellaneous kernel configuration options
39.Sh SYNOPSIS
40.Cd options ...
41.Sh DESCRIPTION
42This manual page describes a number of miscellaneous kernel
43configuration options that may be specified in a kernel config
44file.
45See
46.Xr config 8
47for information on how to configure and build kernels.
48.Em Note:
49Options are passed to the compile process as -D flags to the C
50compiler.
51.Ss Compatibility Options
52.Bl -ohang
53.It Cd options COMPAT_09
54Enable binary compatibility with
55.Nx 0.9 .
56This enables support for
5716-bit user, group, and process ids (following revisions support
5832-bit identifiers),
59It also allows the use of the deprecated
60.Xr getdomainname 3 ,
61.Xr setdomainname 3 ,
62and
63.Xr uname 3
64syscalls.
65This option also allows using numeric filesystem identifiers rather
66than strings.
67Post
68.Nx 0.9
69versions use string identifiers.
70.It Cd options COMPAT_10
71Enable binary compatibility with
72.Nx 1.0 .
73This option allows the use of the filesystem name of
74.Dq ufs
75as an alias for
76.Dq ffs .
77The name
78.Dq ffs
79should be used post 1.0 in
80.Pa /etc/fstab
81and other files.
82It also adds old syscalls for the
83.At V
84shared memory interface.
85This was changed post 1.0 to work on 64-bit architectures.
86This option also enables
87.Dq sgtty
88compatibility, without which programs using the old interface produce
89an
90.Dq inappropriate ioctl
91error.
92.It Cd options COMPAT_11
93Enable binary compatibility with
94.Nx 1.1 .
95This allows binaries running on the i386 port to gain direct access to
96the io ports by opening
97.Pa /dev/io
98read/write.
99This functionality was replaced by
100.Xr i386_iopl 2
101post 1.1.
102On the
103.Tn Atari
104port, the location of the disk label was moved after 1.1.
105When the
106.Em COMPAT_11
107option is set, the kernel will read (pre) 1.1 style disk labels as a
108last resort.
109When a disklabel is re-written, the old style label will be replaced
110with a post 1.1 style label.
111.It Cd options COMPAT_12
112Enable binary compatibility with
113.Nx 1.2 .
114This allows the use of old syscalls for
115.Fn reboot
116and
117.Fn swapon .
118The syscall numbers were changed post 1.2 to add functionality to the
119.Xr reboot 2
120syscall, and the new
121.Xr swapctl 2
122interface was introduced.
123.It Cd options COMPAT_13
124Enable binary compatibility with
125.Nx 1.3 .
126This allows the use of old syscalls for
127.Fn sigaltstack ,
128and also enables the old
129.Xr swapctl 2
130command
131.Dv SWAP_STATS
132(now called
133.Dv SWAP_OSTATS ) ,
134which does not include the
135.Fa se_path
136member of
137.Va struct swapent .
138.It Cd options COMPAT_43
139Enables compatibility with
140.Bx 4.3 .
141This adds an old syscall for
142.Xr lseek 2 .
143It also adds the ioctls for
144.Dv TIOCGETP
145and
146.Dv TIOCSETP .
147The return values for
148.Xr getpid 2 ,
149.Xr getgid 2 ,
150and
151.Xr getuid 2
152syscalls are modified as well, to return the parent's pid and
153uid as well as the current process's.
154It also enables the deprecated
155.Dv NTTYDISC
156terminal line discipline.
157It also provides backwards compatibility with
158.Dq old
159SIOC[GS]IF{ADDR,DSTADDR,BRDADDR,NETMASK} interface ioctls, including
160binary compatibility with code written before the introduction of the
161sa_len field in sockaddrs.
162It also enables
163support for some older pre
164.Bx 4.4
165socket calls.
166.It Cd options COMPAT_SVR4
167On those architectures that support it, this enables binary
168compatibility with
169.At V.4
170applications built for the same architecture.
171This currently includes the sparc and i386.
172.It Cd options COMPAT_LINUX
173On those architectures that support it, this enables binary
174compatibility with Linux ELF and
175.Xr a.out 5
176applications built for the same architecture.
177This is currently limited to the i386.
178.It Cd options COMPAT_SUNOS
179On those architectures that support it, this enables binary
180compatibility with
181.Tn SunOS 4.1
182applications built for the same architecture.
183This currently includes the sparc and most or all m68k platforms.
184.It Cd options COMPAT_ULTRIX
185On those architectures that support it, this enables binary
186compatibility with
187.Tn Ultrix
188applications built for the same architecture.
189This currently is limited to the pmax.
190The functionality of this option is unknown.
191.It Cd options COMPAT_FREEBSD
192On those architectures that support it, this enables binary
193compatibility with
194.Fx
195applications built for the same architecture.
196This is obviously limited to the i386.
197.It Cd options COMPAT_HPUX
198On those architectures that support it, this enables binary
199compatibility with
200.Tn HP/UX
201applications built for the same architecture.
202This is limited to the hp300 port, and has some known bugs.
203A limited set of programs do work.
204.It Cd options COMPAT_IBCS2
205On those architectures that support it, this enables binary
206compatibility with iBCS2 applications built for the same architecture.
207This is currently limited to the i386.
208.It Cd options COMPAT_OSF1
209On those architectures that support it, this enables binary
210compatibility with
211.Tn Digital
212.Ux
213.Po
214formerly
215.Tn OSF/1
216.Pc
217applications built for the same architecture.
218This is currently limited to the alpha, and may not even work.
219.It Cd options COMPAT_NOMID
220Enable compatibility with
221.Xr a.out 5
222executables that lack a machine ID.
223This includes
224.Nx 0.8 Ns 's
225ZMAGIC format, and 386BSD and BSDI's
226QMAGIC, NMAGIC, and OMAGIC
227.Xr a.out 5
228formats.
229.El
230.Ss Debugging Options
231.Bl -ohang
232.It Cd options DDB
233Compiles in a kernel debugger for diagnosing kernel problems.
234See
235.Xr ddb 4
236for details.
237.Em NOTE:
238not available on all architectures.
239.It Cd options DDB_FROMCONSOLE=integer
240If set to non-zero, DDB may be entered by sending a break on a serial
241console or by a special key sequence on a graphics console.
242A value of "0" ignores console breaks or key sequences,
243It not explicitly specified, the default value is "1".
244Note that this sets the value of the
245.Em ddb.fromconsole
246.Xr sysctl 3
247variable which may be changed at run time -- see
248.Xr sysctl 8
249for details.
250.It Cd options DDB_HISTORY_SIZE=integer
251If this is non-zero, enable history editing in the kernel debugger
252and set the size of the history to this value.
253.It Cd options DDB_ONPANIC
254If set to non-zero, the DDB will be entered upon kernel panic.
255The default if not specified is "1".
256Note that this sets the value of the
257.Em ddb.onpanic
258.Xr sysctl 3
259variable which may be changed at run time -- see
260.Xr sysctl 8
261for details.
262.It Cd options KGDB
263Compiles in a remote kernel debugger stub for diagnosing kernel problems
264using the
265.Dq remote target
266feature of gdb.
267See
268.Xr gdb 1
269for details.
270.Em NOTE:
271not available on all architectures.
272.It Cd makeoptions DEBUG="-g"
273The -g flag causes
274.Pa netbsd.gdb
275to be built in addition to
276.Pa netbsd .
277.Pa netbsd.gdb
278is useful for debugging kernel crash dumps with gdb.
279The command
280.Dl gdb -k
281invokes gdb in kernel debugger mode.
282See
283.Xr gdb 1
284for details.
285This also turns on
286.Em options DEBUG
287(which see).
288.It Cd options DEBUG
289Turns on miscellaneous kernel debugging.
290Since options are turned into preprocessor defines (see above),
291.Em options DEBUG
292is equivalent to doing a
293.Em #define DEBUG
294throughout the kernel.
295Much of the kernel has
296.Em #ifdef DEBUG
297conditionalized debugging code.
298Note that many parts of the kernel (typically device drivers) include their own
299.Em #ifdef XXX_DEBUG
300conditionals instead.
301This option also turns on certain other options,
302which may decrease system performance.
303.It Cd options DIAGNOSTIC
304Adds code to the kernel that does internal consistency checks.
305This code will cause the kernel to panic if corruption of internal data
306structures is detected.
307.It Cd options KTRACE
308Add hooks for the system call tracing facility, which allows users to
309watch the system call invocation behavior of processes.
310See
311.Xr ktrace 1
312for details.
313.It Cd options MSGBUFSIZE=integer
314This option sets the size of the kernel message buffer.
315This buffer holds the kernel output of
316.Fn printf
317when not (yet) read by
318.Xr syslogd 8 .
319This is particularly useful when the system has crashed and you wish to lookup
320the kernel output from just before the crash.
321Also, since the autoconfig output becomes more and more verbose,
322it sometimes happens that the message buffer overflows before
323.Xr syslogd 8
324was able to read it.
325Note that not all systems are capable of obtaining a variable sized message
326buffer.
327There are also some systems on which memory contents are not preserved
328across reboots.
329.It Cd options MALLOCLOG
330Enables an event log for
331.Xr malloc 9 .
332Useful for tracking down
333.Dq Data modified on freelist
334and
335.Dq multiple free
336problems.
337.It Cd options MALLOCLOGSIZE=integer
338Defines the number of entries in the malloc log.
339Default is 100000 entries.
340.El
341.Ss File Systems
342.Bl -ohang
343.It Cd file-system FFS
344Includes code implementing the Berkeley Fast File System
345.Em ( FFS ) .
346Most machines need this if they are not running diskless.
347.It Cd file-system EXT2FS
348Includes code implementing the Second Extended File System
349.Em ( EXT2FS ) .
350This is the most commonly used file system on the Linux operating system,
351and is provided here for compatibility.
352Some of the specific features of
353.Em EXT2FS
354like the "behavior on errors" are not implemented.
355This file system can't be used with UID or GID greater than 65535.
356See
357.Xr mount_ext2fs 8
358for details.
359.It Cd file-system LFS
360.Em [EXPERIMENTAL]
361Include the Log-structured File System
362.Em ( LFS ) .
363See
364.Xr mount_lfs 8
365and
366.Xr newlfs 8
367for details.
368.It Cd file-system MFS
369Include the Memory File System
370.Em ( MFS ) .
371This file system stores files in swappable memory, and produces
372notable performance improvements when it is used as the file store
373for
374.Pa /tmp
375and similar file systems.
376See
377.Xr mount_mfs 8
378for details.
379.It Cd file-system NFS
380Include the client side of the Network File System
381.Pq Tn NFS
382remote file sharing protocol.
383Although the bulk of the code implementing
384.Tn NFS
385is kernel based, several user level daemons are needed for it to work.
386See
387.Xr mount_nfs 8
388and
389.Xr nfsiod 8
390for details.
391.It Cd file-system CD9660
392Includes code for the
393.Tn ISO
3949660 + Rock Ridge file system, which is the standard file system on many
395.Tn CD-ROM
396discs.
397Useful primarily if you have a
398.Tn CD-ROM
399drive.
400See
401.Xr mount_cd9660 8
402for details.
403.It Cd file-system MSDOSFS
404Includes the
405.Tn MS-DOS
406FAT file system, which is reportedly still used
407by unfortunate people who have not heard about
408.Nx .
409Also implements the
410.Tn Windows 95
411extensions to the same, which permit the use of longer, mixed case
412file names.
413See
414.Xr mount_msdos 8
415and
416.Xr fsck_msdos 8
417for details.
418.It Cd file-system FDESC
419Includes code for a file system, conventionally mounted on
420.Pa /dev/fd ,
421which permits access to the per-process file descriptor space via
422special files in the file system.
423See
424.Xr mount_fdesc 8
425for details.
426Note that this facility is redundant, and thus unneeded on most
427.Nx
428systems, since the
429.Xr fd 4
430pseudodevice driver already provides identical functionality.
431On most
432.Nx
433systems, instances of
434.Xr fd 4
435are mknoded under
436.Pa /dev/fd/
437and on
438.Pa /dev/stdin ,
439.Pa /dev/stdout ,
440and
441.Pa /dev/stderr .
442.It Cd file-system KERNFS
443Includes code which permits the mounting of a special file system
444(normally mounted on
445.Pa /kern )
446in which files representing various kernel variables and parameters
447may be found.
448See
449.Xr mount_kernfs 8
450for details.
451.It Cd file-system NULLFS
452Includes code for a loopback file system.
453This permits portions of the file hierarchy to be re-mounted in other places.
454The code really exists to provide an example of a stackable file system layer.
455See
456.Xr mount_null 8
457for details.
458.It Cd file-system PORTAL
459.Em [EXPERIMENTAL]
460Includes the portal filesystem.
461This permits interesting tricks like opening
462.Tn TCP
463sockets by opening files in the file system.
464The portal file system is conventionally mounted on
465.Pa /p
466and is partially implemented by a special daemon.
467See
468.Xr mount_portal 8
469for details.
470.It Cd file-system PROCFS
471Includes code for a special file system (conventionally mounted on
472.Pa /proc )
473in which the process space becomes visible in the file system.
474Among
475other things, the memory spaces of processes running on the system are
476visible as files, and signals may be sent to processes by writing to
477.Pa ctl
478files in the procfs namespace.
479See
480.Xr mount_procfs 8
481for details.
482.It Cd file-system UMAPFS
483Includes a loopback file system in which user and group ids may be
484remapped -- this can be useful when mounting alien file systems with
485different uids and gids than the local system.
486See
487.Xr mount_umap 8
488for details.
489.It Cd file-system UNION
490.Em [EXPERIMENTAL]
491Includes code for the union file system, which permits directories to
492be mounted on top of each other in such a way that both file systems
493remain visible -- this permits tricks like allowing writing (and the
494deleting of files) on a read-only file system like a
495.Tn CD-ROM
496by mounting a local writable file system on top of the read-only file system.
497See
498.Xr mount_union 8
499for details.
500.It Cd file-system CODA
501.Em [EXPERIMENTAL]
502Includes code for the Coda file system.
503Coda is a distributed file system like NFS and AFS.  It is
504freely available, like NFS, but it functions much like AFS in being a
505"stateful" file system.  Both Coda and AFS cache files on your local
506machine to improve performance.  Then Coda goes a step further than AFS
507by letting you access the cached files when there is no available
508network, viz. disconnected laptops and network outages.  In Coda, both
509the client and server are outside the kernel which makes them easier
510to experiment with.  Coda is available for several UNIX and non-UNIX
511platforms.
512See http://www.coda.cs.cmu.edu for more details.
513NOTE: You also need to enable the pseudo-device, vcoda, for the Coda
514filesystem to work.
515.El
516.Ss File System Options
517.Bl -ohang
518.It Cd options NFSSERVER
519Include the server side of the
520.Em NFS
521(Network File System) remote file sharing protocol.
522Although the bulk of the code implementing
523.Em NFS
524is kernel based, several user level daemons are needed for it to
525work.
526See
527.Xr mountd 8
528and
529.Xr nfsd 8
530for details.
531.It Cd options QUOTA
532Enables kernel support for file system quotas.
533See
534.Xr quotaon 8 ,
535.Xr edquota 8 ,
536and
537.Xr quota 1
538for details.
539Note that quotas only work on
540.Dq ffs
541file systems, although
542.Xr rpc.rquotad 8
543permits them to be accessed over
544.Em NFS .
545.It Cd options FFS_EI
546Enable ``Endian-Independant'' FFS support.
547This allows a system to mount an FFS filesystem created for another
548architecture, at a small performance cost for all FFS filesytems.
549See also
550.Xr newfs 8 ,
551.Xr fsck_ffs 8 ,
552.Xr dumpfs 8
553for filesystem byte order status and manipulation.
554.It Cd options NVNODE=integer
555This option sets the size of the cache used by the name-to-inode translation
556routines, (a.k.a. the
557.Fn namei
558cache, though called by many other names in the kernel source).
559By default, this cache has
560.Dv NPROC
561(set as 20 + 16 * MAXUSERS) * (80 + NPROC / 8) entries.
562A reasonable way to derive a value of
563.Dv NVNODE ,
564should you notice a large number of namei cache misses with a tool such as
565.Xr systat 1 ,
566is to examine your system's current computed value with
567.Xr sysctl 8 ,
568(which calls this parameter "kern.maxvnodes") and to increase this value
569until either the namei cache hit rate improves or it is determined that
570your system does not benefit substantially from an increase in the size of
571the namei cache.
572.It Cd options EXT2FS_SYSTEM_FLAGS
573This option changes the behavior of the APPEND and IMMUTABLE flags
574for a file on an
575.Em EXT2FS
576filesystem.
577Without this option, the superuser or owner of the file can
578set and clear them.
579With this option, only the superuser can set them, and
580they can't be cleared if the securelevel is greater than 0.
581See also
582.Xr chflags 1 .
583.It Cd options NFS_BOOT_BOOTP
584Enable use of the BOOTP protocol (RFC 951, 1048) to get configuration
585information if NFS is used to mount the root file system.
586See
587.Xr diskless 8
588for details.
589.It Cd options NFS_BOOT_DHCP
590Same as
591.Dq NFS_BOOT_BOOTP
592, but use the DHCP extensions to the
593BOOTP protocol (RFC 1541).
594.It Cd options NFS_BOOT_BOOTPARAM
595Enable use of the BOOTPARAM protocol, consisting of RARP and
596BOOTPARAM RPC, to get configuration information if NFS
597is used to mount the root file system.
598See
599.Xr diskless 8
600for details.
601.It Cd options NFS_BOOT_RWSIZE=value
602Set the initial NFS read and write sizes for diskless-boot requests.
603The normal default is 8Kbytes.  This option provides a way to lower
604the value (e.g., to 1024 bytes) as a workaround for buggy network
605interface cards or boot proms. Once booted, the read and write request
606sizes can be increased by remounting the filesystem. See
607.Xr mount_nfs 8
608for details.
609.El
610.Ss Miscellaneous Options
611.Bl -ohang
612.It Cd options LKM
613Enable loadable kernel modules.
614See
615.Xr lkm 4
616for details.
617.Em NOTE :
618not available on all architectures.
619.It Cd options INSECURE
620Hardwires the kernel security level at -1.
621This means that the system
622always runs in secure level 0 mode, even when running multiuser.
623See the manual page for
624.Xr init 8
625for details on the implications of this.
626The kernel secure level may manipulated by the superuser by altering the
627.Em kern.securelevel
628.Xr sysctl 3
629variable (the secure level may only be lowered by a call from process ID 1,
630i.e.
631.Xr init 8 ) .
632See also
633.Xr sysctl 8
634and
635.Xr sysctl 3 .
636.It Cd options UCONSOLE
637Normally, only the superuser can execute the
638.Dv TIOCCONS
639.Xr ioctl 2 ,
640which redirects console output to a non-console tty.
641See
642.Xr tty 4
643for details.
644This option permits any user to execute the
645.Dv TIOCCONS
646.Xr ioctl 2 .
647This is useful on
648machines such as personal workstations which run
649.Xr X 1
650servers, where one would prefer to permit console output to be
651viewed in a window without requiring a suid root program to do it.
652.It Cd options MACHINE_NONCONTIG
653This option changes part of the VM/pmap interface, to allow for
654non-contiguous memory.
655On some ports it is not an option.
656These ports typically only use one of the interfaces.
657.It Cd options MEMORY_DISK_HOOKS
658This option allows for some machine dependent functions to be called when
659the
660.Tn RAM
661disk driver is configured.
662This can result in automatically loading a
663.Tn RAM
664disk from floppy on open (among other things).
665.It Cd options MEMORY_DISK_IS_ROOT
666Forces the
667.Tn RAM
668disk to be the root device.
669This can only be overridden when
670the kernel is booted in the 'ask-for-root' mode.
671.It Cd options NTP
672Turns on in-kernel precision timekeeping support used by software
673implementing
674.Em NTP
675(Network Time Protocol, RFC1305).
676The
677.Em NTP
678option adds an in-kernel Phase-Locked Loop (PLL) for normal
679.Em NTP
680operation, and a Frequency-Locked Loop (FLL) for intermittently-connected
681operation.
682.Xr xntpd 8
683will employ a user-level PLL when kernel support is unavailable,
684but the in-kernel version has lower latency and more precision, and
685so typically keeps much better time.
686The interface to the kernel
687.Em NTP
688support is provided by the
689.Xr ntp_adjtime 2
690and
691.Xr ntp_gettime 2
692system calls, which are intended for use by
693.Xr xntpd 8
694and are enabled by the option.
695On systems with sub-microsecond resolution timers, or where (HZ / 100000)
696is not an integer, the
697.Em NTP
698option also enables extended-precision arithmetic to keep track of
699fractional clock ticks at NTP time-format precision.
700.It Cd options PPS_SYNC
701This option enables a kernel serial line discipline for receiving time
702phase signals from an external reference clock such as a radio clock.
703(The
704.Em NTP
705option (which see) must be on if the
706.Em PPS_SYNC
707option is used.)
708Some reference clocks generate a Pulse Per Second (PPS) signal in
709phase with their time source.
710The
711.Em PPS
712line discipline receives this signal on either the data leads
713or the DCD control lead of a serial port.
714.Em NTP
715uses the PPS signal to discipline the local clock oscillator to a high
716degree of precision (typically less than 50 microseconds in time and
7170.1 ppm in accuracy).
718.Em PPS
719can also generate a serial output pulse when the system receives a PPS
720interrupt.
721This can be used to measure the system interrupt latency and thus calibrate
722.Em NTP
723to account for it.
724Using
725.Em PPS
726usually requires a
727gadget box
728to convert from TTL to RS-232 signal levels.
729The gadget box and PPS are described in more detail in the HTML documentation
730shipped with the xntpd distribution.
731.It Cd option SETUIDSCRIPTS
732Allows scripts with the setuid bit set to execute as the effective
733user rather than the real user, just like binary executables.
734.Pp
735.Em NOTE :
736Using this option will also enable
737.Em option FDSCRIPTS
738.It Cd option FDSCRIPTS
739Allows execution of scripts with the execute bit set, but not the
740read bit, by opening the file and passing the file descriptor to
741the shell, rather than the filename.
742.Pp
743.Em NOTE :
744Execute only (non-readable) scripts will have
745.Va argv[0]
746set to
747.Pa /dev/fd/* .
748What this option allows as far as security is
749concerned, is the ability to safely ensure that the correct script
750is run by the interpreter, as it is passed as an already open file.
751.It Cd options RTC_OFFSET=integer
752The kernel (and typically the hardware battery backed-up clock on
753those machines that have one) keeps time in
754.Em UTC
755(Universal Coordinated Time, once known as
756.Em GMT ,
757or Greenwich Mean Time)
758and not in the time of the local time zone.
759The
760.Em RTC_OFFSET
761option is used on some ports (such as the i386) to tell the kernel
762that the hardware clock is offset from
763.Em UTC
764by the specified number of minutes.
765This is typically used when a machine boots several operating
766systems and one of them wants the hardware clock to run in the
767local time zone and not in
768.Em UTC ,
769e.g.
770.Em RTC_OFFSET=300
771means
772the hardware clock is set to US Eastern Time (300 minutes behind
773.Em UTC ) ,
774and not
775.Em UTC .
776(Note:
777.Em RTC_OFFSET
778is used to initialize a kernel variable named
779.Va rtc_offset
780which is the source actually used to determine the clock offset, and
781which may be accessed via the kern.rtc_offset sysctl variable.
782See
783.Xr sysctl 8
784and
785.Xr sysctl 3
786for details.
787Since the kernel clock is initialized from the hardware clock very
788early in the boot process, it is not possible to meaningfully change
789.Va rtc_offset
790in system initialization scripts.
791Changing this value currently may only be done at kernel compile
792time or by patching the kernel and rebooting).
793.It Cd options KMEMSTATS
794The kernel memory allocator,
795.Xr malloc 9 ,
796will keep statistics on its performance if this option is enabled.
797Unfortunately, this option therefore essentially disables the
798.Fn MALLOC
799and
800.Fn FREE
801forms of the memory allocator, which are used to enhance the performance
802of certain critical sections of code in the kernel.
803This option therefore can lead to a significant decrease in the
804performance of certain code in the kernel if enabled.
805Examples of such code include the
806.Fn namei
807routine, the
808.Xr ccd 4
809driver,
810the
811.Xr ncr 4
812driver,
813and much of the networking code.
814.It Cd options MAXUPRC=integer
815Sets the
816.Em RLIMIT_NPROC
817resource limit, which specifies the maximum number of simultaneous
818processes a user is permitted to run, for process 0;
819this value is inherited by its child processes.
820It defaults to
821.Em CHILD_MAX ,
822which is currently defined to be 80.
823Setting
824.Em MAXUPRC
825to a value less than
826.Em CHILD_MAX
827is not permitted, as this would result in a violation of the semantics of
828.St -p1003.1-90 .
829.It Cd options SHORTCORENAME
830If set, process core dumps are named
831.Nm core .
832If not specified, they are named
833.Nm programname.core
834(the default in 4.4BSD). Note that this changes the value of the
835.Em kern.shortcorename
836sysctl variable which may be changed at run time. See
837.Xr sysctl 8
838and
839.Xr sysctl 3
840for details.
841.El
842.Ss Networking Options
843.Bl -ohang
844.It Cd options GATEWAY
845Enables
846.Em IPFORWARDING
847(which see)
848and (on most ports) increases the size of
849.Em NMBCLUSTERS
850(which see).
851In general,
852.Em GATEWAY
853is used to indicate that a system should act as a router, and
854.Em IPFORWARDING
855is not invoked directly.
856(Note that
857.Em GATEWAY
858has no impact on protocols other than
859.Tn IP ,
860such as
861.Tn CLNP
862or
863.Tn XNS ) .
864.It Cd options IPFORWARDING=value
865If
866.Em value
867is 1 this enables IP routing behavior. If
868.Em value
869is 0 (the default), it disables it. The
870.Em GATEWAY
871option sets this to 1 automatically.
872With this option enabled, the machine will forward IP datagrams destined
873for other machines between its interfaces.
874Note that even without this option, the kernel will
875still forward some packets (such as source routed packets) -- removing
876.Em GATEWAY
877and
878.Em IPFORWARDING
879is insufficient to stop all routing through a bastion host on a
880firewall -- source routing is controlled independently.
881To turn off source routing, use
882.Em options IPFORWSRCRT=0
883(which see).
884Note that IP forwarding may be turned on and off independently of the
885setting of the
886.Em IPFORWARDING
887option through the use of the
888.Em net.inet.ip.forwarding
889sysctl variable.
890If
891.Em net.inet.ip.forwarding
892is 1, IP forwarding is on.
893See
894.Xr sysctl 8
895and
896.Xr sysctl 3
897for details.
898.It Cd options IPFORWSRCRT=value
899If
900.Em value
901is set to zero, source routing of IP datagrams is turned off.
902If
903.Em value
904is set to one (the default) or the option is absent, source routed IP
905datagrams are forwarded by the machine.
906Note that source routing of IP packets may be turned on and off
907independently of the setting of the
908.Em IPFORWSRCRT
909option through the use of the
910.Em net.inet.ip.forwsrcrt
911sysctl variable.
912If
913.Em net.inet.ip.forwsrcrt
914is 1, forwarding of source routed IP datagrams is on.
915See
916.Xr sysctl 8
917and
918.Xr sysctl 3
919for details.
920.It Cd options MROUTING
921Includes support for IP multicast routers.
922You certainly want
923.Em INET
924with this.
925Multicast routing is controlled by the
926.Xr mrouted 8
927daemon.
928.It Cd options INET
929Includes support for the
930.Tn TCP/IP
931protocol stack.
932You almost certainly want this.
933See
934.Xr inet 4
935for details.
936This option is currently required.
937.It Cd options MCLSHIFT=value
938This option is the base-2 logarithm of the size of mbuf clusters.
939The
940.Bx
941networking stack keeps network packets in a linked
942list, or chain, of kernel buffer objects called mbufs.
943The system provides larger mbuf clusters as an optimization for
944large packets, instead of using long chains for large packets.
945The mbuf cluster size,
946or
947.Em MCLBYTES,
948must be a power of two, and is computed as two raised to the power
949.Em MCLSHIFT .
950On systems with Ethernet network adaptors,
951.Em MCLSHIFT
952is often set to 11, giving 2048-byte mbuf clusters, large enough to
953hold a 1500-byte
954.Tn Ethernet
955frame in a single cluster.
956Systems with network interfaces supporting larger frame sizes like
957.Tn ATM ,
958.Tn FDDI ,
959or
960.Tn HIPPI
961may perform better with
962.Em MCLSHIFT
963set to 12 or 13, giving mbuf cluster sizes of 4096 and 8192 bytes,
964respectively.
965.It Cd options NS
966Include support for the
967.Tn Xerox
968.Tn XNS
969protocol stack.
970See
971.Xr ns 4
972for details.
973.It Cd options ISO,TPIP
974Include support for the ubiquitous
975.Tn OSI
976protocol stack.
977See
978.Xr iso 4
979for details.
980.It Cd options EON
981Include support for tunneling
982.Tn OSI
983protocols over
984.Tn IP .
985.It Cd options CCITT,LLC,HDLC
986Include support for the
987.Tn CCITT
988(nee
989.Tn ITU-TSS )
990.Tn X.25
991protocol stack.
992The state of this code is currently unknown, and probably contains bugs.
993.It Cd options NETATALK
994Include support for the
995.Tn AppleTalk
996protocol stack.
997The kernel provides provision for the
998.Em Datagram Delivery Protocol
999(DDP), providing SOCK_DGRAM support and
1000.Tn AppleTalk
1001routing.
1002This stack is used by the
1003.Em NETATALK
1004package, which adds support for
1005.Tn AppleTalk
1006server services via user libraries and applications.
1007.It Cd options IPNOPRIVPORTS
1008Normally, only root can bind a socket descriptor to a so-called
1009.Dq privileged
1010.Tn TCP
1011port, that is, a port number in the range 0-1023.
1012This option eliminates those checks from the kernel.
1013This can be useful if there is a desire to allow daemons without
1014privileges to bind those ports, e.g. on firewalls.
1015The security tradeoffs in doing this are subtle.
1016This option should only be used by experts.
1017.It Cd options TCP_COMPAT_42
1018.Tn TCP
1019bug compatibility with
1020.Bx 4.2 .
1021In
1022.Bx 4.2 ,
1023.Tn TCP
1024sequence numbers were 32-bit signed values.
1025Modern implementations of TCP use unsigned values.
1026This option clamps the initial sequence number to start in
1027the range 2^31 rather than the full unsigned range of 2^32.
1028Also, under
1029.Bx 4.2 ,
1030keepalive packets must contain at least one byte or else
1031the remote end would not respond.
1032.It Cd options PFIL_HOOKS
1033This option turns on the packet filter interface hooks.
1034See
1035.Xr pfil 9
1036for details.
1037.It Cd options IPFILTER_LOG
1038This option, in conjunction with
1039.Em pseudo-device ipfilter ,
1040enables logging of IP packets using ip-filter.
1041.It Cd options IPFILTER_DEFAULT_BLOCK
1042This option sets the default policy of ip-filter.
1043If it is set, ip-filter will block packets by default.
1044.It Cd options PPP_BSDCOMP
1045Enable support for BSD-compress
1046.Pq Sq bsdcomp
1047compression in ppp.
1048.It Cd options PPP_DEFLATE
1049Enable support for deflate
1050compression in ppp.
1051.It Cd options PPP_FILTER
1052This option turns on
1053.Xr pcap 3
1054based filtering for ppp connections.
1055This option is used by
1056.Xr pppd 8
1057which needs to be compiled with
1058.Em PPP_FILTER
1059defined (the current default).
1060.El
1061.Ss System V IPC Options
1062.Bl -ohang
1063.It Cd options SYSVMSG
1064Includes support for
1065.At V
1066style message queues.
1067See
1068.Xr msgctl 2 ,
1069.Xr msgget 2 ,
1070.Xr msgrcv 2 ,
1071.Xr msgsnd 2 .
1072.It Cd options SYSVSEM
1073Includes support for
1074.At V
1075style semaphores.
1076See
1077.Xr semctl 2 ,
1078.Xr semget 2 ,
1079.Xr semop 2 .
1080.It Cd options SYSVSHM
1081Includes support for
1082.At V
1083style shared memory.
1084See
1085.Xr shmat 2 ,
1086.Xr shmctl 2 ,
1087.Xr shmdt 2 ,
1088.Xr shmget 2 .
1089.It Cd options SHMMAXPGS=value
1090Sets the maximum number of
1091.At V
1092style shared memory pages that are available through the
1093.Xr shmget 2
1094system call.
1095Default value is 1024 on most ports.
1096See
1097.Pa /usr/include/machine/vmparam.h
1098for the default.
1099.El
1100.Ss VM Related Options
1101.Bl -ohang
1102.It Cd options SWAPPAGER
1103Turns on paging.
1104(To be specific, this enables the virtual memory
1105module responsible for handling page faults for
1106.Dq anonymous
1107objects (i.e. BSS pages)).
1108.Em MANDATORY
1109-- you cannot actually run without this
1110.Dq option .
1111.It Cd options VNODEPAGER
1112Support for
1113.Xr mmap 2 Ns ing
1114of files.
1115(Specifically, this enables the
1116virtual memory module responsible for handling page faults on mapped
1117files (
1118.Dq plain file
1119vnodes)).
1120.Em MANDATORY
1121-- you cannot actually run without this
1122.Dq option .
1123.It Cd options DEVPAGER
1124Support for
1125.Xr mmap 2 Ns ing
1126of devices.
1127(Specifically, this enables the virtual memory module responsible
1128for handling page faults on mapped devices (
1129.Dq cdev
1130vnodes)).
1131.Em MANDATORY
1132-- you cannot actually run without this
1133.Dq option .
1134.It Cd options NMBCLUSTERS=value
1135Size of kernel mbuf cluster map,
1136.Em mb_map ,
1137in CLBYTES-sized logical
1138pages.
1139Default on most ports is 256 (512 with
1140.Dq options GATEWAY ).
1141See
1142.Pa /usr/include/machine/param.h
1143for exact default information.
1144Increase this value if you get
1145.Dq mb_map full
1146messages.
1147.It Cd options NKMEMCLUSTERS=value
1148Size of kernel malloc arena in CLBYTES-sized logical pages.
1149This area is covered by the kernel submap
1150.Em kmem_map .
1151See
1152.Pa /usr/include/machine/param.h
1153for the default value, which is port specific.
1154Increase this value if you get
1155.Dq out of space in kmem_map
1156panics.
1157.\" , which mean you have run out of mallocable kernel memory.
1158.It Cd options BUFCACHE=value
1159Size of the buffer cache as a percentage of total available
1160.Tn RAM .
1161Ignored if BUFPAGES is also specified.
1162.It Cd options NBUF=value
1163.It Cd options BUFPAGES=value
1164These options set the number of pages available for the buffer cache.
1165Their default value is a machine dependent value, often calculated as
1166between 5% and 10% of total available
1167.Tn RAM .
1168.El
1169.Ss amiga-specific Options
1170.Bl -ohang
1171.It Cd options BB060STUPIDROM
1172When the bootloader (which passes
1173.Tn AmigaOS
1174.Tn ROM
1175information) claims we have a 68060
1176.Tn CPU
1177without
1178.Tn FPU ,
1179go look into the Processor Configuration Register (PCR) to find out.
1180You need this with
1181.Tn Amiga
1182.Tn ROM Ns s
1183up to (at least) V40.xxx (OS3.1),
1184when you boot via the bootblocks and don't have a DraCo.
1185.It Cd options LIMITMEM=value
1186If there, limit the part of the first memory bank used by
1187.Nx
1188to value megabytes.
1189Default is unlimited.
1190.It Cd options NKPTADD=addvalue
1191.It Cd options NKPTADDSHIFT=shiftvalue
1192The
1193.Tn CPU
1194specific
1195.Tn MMU
1196table for the kernel is pre-allocated at kernel startup time.
1197Part of it is scaled with
1198.Va maxproc ,
1199to have enough room to hold the user program
1200.Tn MMU
1201tables; the second part is a fixed amount for the kernel itself.
1202.Pp
1203The third part accounts for the size of the file buffer cache.
1204Its size is either
1205.Dv NKPTADD
1206pages (if defined) or memory size in bytes divided by two to
1207the power of
1208.Dv NKPTADDSHIFT .
1209The default is undefined
1210.Dv NKPTADD
1211and
1212.Dv NKPTADDSHIFT=24 ,
1213allowing for 16 buffers per megabyte of main memory (while
1214a GENERIC kernel allocates about half of that).
1215When you get "can't get KPT page" panics, you should increase
1216.Dv NKPTADD
1217(if defined), or decrease
1218.Dv NKPTADDSHIFT
1219by one.
1220.El
1221.Ss atari-specific Options
1222.Bl -ohang
1223.It Cd options DISKLABEL_AHDI
1224Include support for AHDI (native Atari) disklabels.
1225.It Cd options DISKLABEL_NBDA
1226Include support for
1227.Nx Ns Tn /atari
1228labels.
1229If you don't set this option, it will be set automatically.
1230.Nx Ns Tn /atari
1231will not work without it.
1232.It Cd options FALCON_SCSI
1233Include support for the 5380-SCSI configuration as found on the Falcon.
1234.It Cd options RELOC_KERNEL
1235If set, the kernel will relocate itself to TT-RAM, if possible.
1236This will give you a slightly faster system.
1237.Em Beware
1238that on some TT030 systems,
1239the system will frequently dump with MMU-faults with this option enabled.
1240.It Cd options SERCONSOLE
1241Allow the modem1-port to act as the system-console.
1242A carrier should be active on modem1 during system boot to active
1243the console functionality.
1244.It Cd options TT_SCSI
1245Include support for the 5380-SCSI configuration as found on the TT030
1246and Hades.
1247.El
1248.Ss i386-specific Options
1249.Bl -ohang
1250.It Cd options I386_CPU,I486_CPU,I586_CPU,I686_CPU
1251Include support for a particular class of
1252.Tn CPU
1253.Po
1254.Tn i386 ,
1255.Tn i486 ,
1256.Tn Pentium ,
1257or
1258.Tn Pentium Pro
1259.Pc .
1260If the appropriate class for your
1261.Tn CPU
1262is not configured, the kernel will use the highest class available
1263that will work.
1264In general, using the correct
1265.Tn CPU
1266class will result in the best performance.
1267At least one of these options must be present.
1268.It Cd options CPURESET_DELAY=value
1269specifies the time (in millisecond) to wait before doing a hardware reset
1270in the last phase of a reboot. This gives the user a chance to see error
1271messages from the shutdown operations (like NFS unmounts, buffer cache flush,
1272etc ...). Setting this to 0 will disable the delay. Default is 2 seconds.
1273.It Cd options MATH_EMULATE
1274Include the floating point emulator.
1275This is useful only for
1276.Tn CPU Ns s
1277that lack an
1278internal Floating Point Unit
1279.Pq Tn FPU
1280or co-processor.
1281.It Cd options VM86
1282Include support for virtual 8086 mode, used by
1283.Tn DOS
1284emulators.
1285.It Cd options USER_LDT
1286Include i386-specific system calls for modifying the local descriptor table,
1287used by Windows emulators.
1288.It Cd options REALBASEMEM=integer
1289Overrides the base memory size passed in from the boot block.
1290(Value given in kilobytes.)
1291Use this option only if the boot block reports the size incorrectly.
1292(Note that some
1293.Tn BIOS Ns es
1294put the extended
1295.Tn BIOS
1296data area at the top of base memory, and therefore report a smaller
1297base memory size to prevent programs overwriting it.
1298This is correct behavior, and you should not use the
1299.Em REALBASEMEM
1300option to access this memory).
1301.It Cd options REALEXTMEM=integer
1302Overrides the extended memory size passed in from the boot block.
1303(Value given in kilobytes. Extended memory does not include the first megabyte.)
1304Use this option only if the boot block reports the size incorrectly.
1305.It Cd options FRENCH_KBD,FINNISH_KBD,GERMAN_KBD,NORWEGIAN_KBD
1306Select a non-US keyboard layout for the
1307.Em pccons
1308console driver.
1309.El
1310.Ss m68k-specific Options
1311.Bl -ohang
1312.It Cd options FPU_EMULATE
1313Include support for MC68881/MC68882 emulator.
1314.It Cd options FPSP
1315Include support for 68040 floating point.
1316.It Cd options M68020,M68030,M68040,M68060
1317Include support for a specific
1318.Tn CPU ,
1319at least one (the one you are using) should be specified.
1320.It Cd options M060SP
1321Include software support for 68060.
1322This provides emulation of unimplemented
1323integer instructions as well as emulation of unimplemented floating point
1324instructions and data types and software support for floating point traps.
1325.El
1326.Ss sparc-specific Options
1327.Bl -ohang
1328.It Cd options AUDIO_DEBUG
1329Enable simple event debugging of the logging of the
1330.Xr audio 4
1331device.
1332.It Cd options BLINK
1333Enable blinking of LED.  Blink rate is full cycle every N seconds for
1334N < then current load average.  See
1335.Xr getloadavg 3 .
1336.\" .It Cd options COLORFONT_CACHE
1337.\" this is totally fucked up.. what does this do?
1338.It Cd options COUNT_SW_LEFTOVERS
1339Count how many times the sw SCSI device has left 3, 2, 1 and 0 in the
1340sw_3_leftover, sw_2_leftover, sw_1_leftover, and sw_0_leftover
1341variables accessable from
1342.Xr ddb 4 .
1343See
1344.Xr sw 4 .
1345.It Cd options DEBUG_ALIGN
1346Adds debugging messages calls when user-requested alignment fault
1347handling happens.
1348.It Cd options DEBUG_EMUL
1349Adds debugging messages calls for emulated floating point and
1350alignment fixing operations.
1351.It Cd options DEBUG_SVR4
1352Prints registers messages calls for emulated SVR4 getcontext and
1353setcontext operations.  See
1354.Em options COMPAT_SVR4 .
1355.It Cd options EXTREME_DEBUG
1356Adds debugging functions callable from
1357.Xr ddb 4 .  The debug_pagetables, test_region and print_fe_map
1358functions print information about page tables for the SUN4M
1359platforms only.
1360.It Cd options EXTREME_EXTREME_DEBUG
1361Adds extra info to
1362.Cd options EXTREME_DEBUG .
1363.It Cd options FPU_CONTEXT
1364Make
1365.Em options COMPAT_SVR4
1366getcontext and setcontext include floating point registers.
1367.It Cd options MAGMA_DEBUG
1368Adds debugging messages to the
1369.Xr magma 4
1370device.
1371.It Cd options RASTERCONS_FULLSCREEN
1372Use the entire screen for the console.
1373.It Cd options RASTERCONS_SMALLFONT
1374Use a the fixed font on the console, instead of the normal font.
1375.It Cd options SUN4
1376Support sun4 class machines.
1377.It Cd options SUN4C
1378Support sun4c class machines.
1379.It Cd options SUN4M
1380Support sun4m class machines.
1381.It Cd options SUN4_MMU3L
1382.\" XXX ???
1383Enable support for sun4 3-level MMU machines.
1384.It Cd options V9
1385Enable SPARC V9 assembler in
1386.Xr ddb 4 .
1387.El
1388.\" The following requests should be uncommented and used where appropriate.
1389.\" .Sh FILES
1390.\" .Sh EXAMPLES
1391.Sh SEE ALSO
1392.Xr config 8 ,
1393.Xr init 8 ,
1394.Xr gettimeofday 2 ,
1395.Xr sysctl 8 ,
1396.Xr sysctl 3 ,
1397.Xr xntpd 8 ,
1398.Xr ntp_adjtime 2 ,
1399.Xr ntp_gettime 2 ,
1400.Xr i386_iopl 2 ,
1401.Xr msgctl 2 ,
1402.Xr msgget 2 ,
1403.Xr msgrcv 2 ,
1404.Xr msgsnd 2 ,
1405.Xr semctl 2 ,
1406.Xr semget 2 ,
1407.Xr semop 2 ,
1408.Xr shmat 2 ,
1409.Xr shmctl 2 ,
1410.Xr shmdt 2 ,
1411.Xr shmget 2 ,
1412.Xr ddb 4 ,
1413.Xr lkm 4 ,
1414.Xr inet 4 ,
1415.Xr ns 4 ,
1416.Xr iso 4 ,
1417.Xr mrouted 8 ,
1418.Xr mount_lfs 8 ,
1419.Xr newlfs 8 ,
1420.Xr mount_mfs 8 ,
1421.Xr mount_nfs 8 ,
1422.Xr mount_cd9660 8 ,
1423.Xr mount_msdos 8 ,
1424.Xr mount_fdesc 8 ,
1425.Xr mount_kernfs 8 ,
1426.Xr mount_null 8 ,
1427.Xr mount_portal 8 ,
1428.Xr mount_procfs 8 ,
1429.Xr mount_umap 8 ,
1430.Xr mount_union 8 ,
1431.Xr edquota 8 ,
1432.Xr quotaon 8 ,
1433.Xr quota 1 ,
1434.Xr rpc.rquotad 8 ,
1435.Xr ktrace 1 ,
1436.Xr gdb 1
1437.Sh HISTORY
1438The
1439.Nm
1440man page first appeared in
1441.Nx 1.3 .
1442.Sh BUGS
1443The
1444.Em INET
1445and the
1446.Em VNODEPAGER
1447options should not be required.
1448