xref: /netbsd-src/share/man/man4/options.4 (revision e89934bbf778a6d6d6894877c4da59d0c7835b0f)
1.\"	$NetBSD: options.4,v 1.461 2017/02/13 09:46:29 skrll 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 January 8, 2017
34.Dt OPTIONS 4
35.Os
36.Sh NAME
37.Nm options
38.Nd Miscellaneous kernel configuration options
39.Sh SYNOPSIS
40.Cd cinclude ...
41.Cd config ...
42.Cd [no] file-system ...
43.Cd ident ...
44.Cd include ...
45.Cd [no] makeoptions ...
46.Cd maxusers ...
47.Cd [no] options ...
48.Cd [no] pseudo-device ...
49.Sh DESCRIPTION
50This manual page describes a number of miscellaneous kernel
51configuration options that may be specified in a kernel config
52file.
53See
54.Xr config 1
55and
56.Xr config 5
57for information on how to configure and build kernels.
58.Pp
59The
60.Ar no
61form removes a previously specified option.
62.Ss Keywords
63The following keywords are recognized in a kernel configuration file:
64.Bl -ohang
65.It Sy cinclude Qq Ar filename
66Conditionally includes another kernel configuration file whose name is
67.Ar filename ,
68which may be double-quoted and may be an explicit path or relative to
69the kernel source directory.
70Failure to open the named file is ignored.
71.It Sy config Ar exec_name No root on Ar rootdev Oo type Ar fstype Oc \
72Oo dumps on Ar dumpdev Oc
73Defines a configuration whose kernel executable is named
74.Ar exec_name ,
75normally
76.Dq netbsd ,
77with its root file system of type
78.Ar fstype
79on the device
80.Ar rootdev ,
81and optionally specifying the location of kernel core dumps on the device
82.Ar dumpdev .
83.Ar dev
84or
85.Ar dumpdev
86and
87.Ar fstype
88may be specified as
89.Dq \&? ,
90which is a wild card.
91The root
92.Ar fstype
93and
94.Ar dumpdev
95are optional and assumed to be wild carded if they are not specified.
96.It Ar device_instance No at Ar attachment \
97Oo Ar locators value Oo ... Oc Oc Oo flags Ar value Oc
98Define an instance of the device driver
99.Ar device_instance
100that attaches to the bus or device named
101.Ar attachment .
102An
103.Ar attachment
104may require additional information on where the device can be found, such
105as an address, channel, function, offset, and/or slot, referred to as
106.Ar locators ,
107whose
108.Ar value
109often may be a wild card,
110.Dq \&? .
111Some device drivers have one or more
112.Ar flags
113that can be adjusted to affect the way they operate.
114.It Sy file-system Ar fs_name Op , Ar fs_name Op ...
115Include support for the file-system
116.Ar fs_name .
117.It Sy ident Qq Ar string
118Sets the kernel identification string to
119.Ar string .
120.It Sy include Qq Ar filename
121Functions the same as
122.Ar cinclude ,
123except failure to open
124.Ar filename
125produces a fatal error.
126.It Sy options Ar option_name Op , Ar option_name=value Op ...
127Specifies (or sets) the option, or comma-separated list of options,
128.Ar option_name .
129Some options expect to be assigned a value, which may be an integer,
130a double-quoted word, a bare word, or an empty string
131.Pq Qq .
132Note that those are eventually handled by the C compiler, so the rules
133of that language apply.
134.Pp
135.Em Note :
136Options that are not defined by device definition files are passed to
137the compile process as
138.Fl D
139flags to the C compiler.
140.It Sy makeoptions Ar name=value
141Defines a
142.Xr make 1
143macro
144.Ar name
145with the value
146.Ar value
147in the kernel Makefile.
148.It Sy maxusers Ar integer
149Set the maxusers variable in the kernel.
150.It Sy no Ar keyword Ar name Op Ar arguments Op ...
151For the
152.Xr config 1
153.Ar keywords
154file-system, makeoptions, options, and pseudo-device,
155.Ar no
156removes the file-system, makeoption, options, or pseudo-device,
157.Ar name .
158This is useful when a kernel configuration file includes another which
159has undesired options.
160.Pp
161For example, a local configuration file that wanted the kitchen sink, but
162not COMPAT_09 or bridging, might be:
163.Bd -literal -offset indent
164include "arch/i386/conf/GENERIC"
165no options COMPAT_09
166no pseudo-device bridge
167.Ed
168.It Sy pseudo-device Ar name Op Ar N
169Includes support for the pseudo-device
170.Ar name .
171Some pseudo-devices can have multiple or
172.Ar N
173instances.
174.El
175.Ss Compatibility Options
176.Bl -ohang
177.It Cd options COMPAT_09
178Enable binary compatibility with
179.Nx 0.9 .
180This enables support for
18116-bit user, group, and process IDs (following revisions support
18232-bit identifiers).
183It also allows the use of the deprecated
184.Xr getdomainname 3 ,
185.Xr setdomainname 3 ,
186and
187.Xr uname 3
188syscalls.
189This option also allows using numeric file system identifiers rather
190than strings.
191Post
192.Nx 0.9
193versions use string identifiers.
194.It Cd options COMPAT_10
195Enable binary compatibility with
196.Nx 1.0 .
197This option allows the use of the file system name of
198.Dq ufs
199as an alias for
200.Dq ffs .
201The name
202.Dq ffs
203should be used post 1.0 in
204.Pa /etc/fstab
205and other files.
206It also adds old syscalls for the
207.At V
208shared memory interface.
209This was changed post 1.0 to work on 64-bit architectures.
210This option also enables
211.Dq sgtty
212compatibility, without which programs using the old interface produce
213an
214.Dq inappropriate ioctl
215error, and
216.Pa /dev/io
217only works when this option is set in the kernel,
218see
219.Xr io 4
220on ports that support it.
221.It Cd options COMPAT_11
222Enable binary compatibility with
223.Nx 1.1 .
224This allows binaries running on the i386 port to gain direct access to
225the io ports by opening
226.Pa /dev/io
227read/write.
228This functionality was replaced by
229.Xr i386_iopl 2
230post 1.1.
231On the
232.Tn Atari
233port, the location of the disk label was moved after 1.1.
234When the
235.Em COMPAT_11
236option is set, the kernel will read (pre) 1.1 style disk labels as a
237last resort.
238When a disk label is re-written, the old style label will be replaced
239with a post 1.1 style label.
240This also enables the
241.Em EXEC_ELF_NOTELESS
242option.
243.It Cd options COMPAT_12
244Enable binary compatibility with
245.Nx 1.2 .
246This allows the use of old syscalls for
247.Fn reboot
248and
249.Fn swapon .
250The syscall numbers were changed post 1.2 to add functionality to the
251.Xr reboot 2
252syscall, and the new
253.Xr swapctl 2
254interface was introduced.
255This also enables the
256.Em EXEC_ELF_NOTELESS
257option.
258.It Cd options COMPAT_13
259Enable binary compatibility with
260.Nx 1.3 .
261This allows the use of old syscalls for
262.Fn sigaltstack ,
263and also enables the old
264.Xr swapctl 2
265command
266.Dv SWAP_STATS
267(now called
268.Dv SWAP_OSTATS ) ,
269which does not include the
270.Fa se_path
271member of
272.Va struct swapent .
273.It Cd options COMPAT_14
274Enable binary compatibility with
275.Nx 1.4 .
276This allows some old
277.Xr ioctl 2
278on
279.Xr wscons 4
280to be performed, and allows the
281.Dv NFSSVC_BIOD
282mode of the
283.Xr nfssvc 2
284system call to be used for compatibility with the deprecated nfsiod program.
285.It Cd options COMPAT_15
286Enable binary compatibility with
287.Nx 1.5 .
288Since there were no API changes from
289.Nx 1.5
290and
291.Nx 1.6 ,
292this option does nothing.
293.It Cd options COMPAT_16
294Enable binary compatibility with
295.Nx 1.6 .
296This allows the use of old signal trampoline code which has been deprecated
297with the addition of
298.Xr siginfo 2 .
299.It Cd options COMPAT_20
300Enable binary compatibility with
301.Nx 2.0 .
302This allows the use of old syscalls for
303.Fn statfs ,
304.Fn fstatfs ,
305.Fn getfsstat
306and
307.Fn fhstatfs ,
308which have been deprecated with the addition of the
309.Xr statvfs 2 ,
310.Xr fstatvfs 2 ,
311.Xr getvfsstat 2
312and
313.Xr fhstatvfs 2
314system calls.
315.It Cd options COMPAT_30
316Enable binary compatibility with
317.Nx 3.0 .
318See
319.Xr compat_30 8
320for details about the changes made after the
321.Nx 3.0
322release.
323.It Cd options COMPAT_40
324Enable binary compatibility with
325.Nx 4.0 .
326.It Cd options COMPAT_43
327Enables compatibility with
328.Bx 4.3 .
329This adds an old syscall for
330.Xr lseek 2 .
331It also adds the ioctls for
332.Dv TIOCGETP
333and
334.Dv TIOCSETP .
335The return values for
336.Xr getpid 2 ,
337.Xr getgid 2 ,
338and
339.Xr getuid 2
340syscalls are modified as well, to return the parent's PID and
341UID as well as the current process's.
342It also enables the deprecated
343.Dv NTTYDISC
344terminal line discipline.
345It also provides backwards compatibility with
346.Dq old
347SIOC[GS]IF{ADDR,DSTADDR,BRDADDR,NETMASK} interface ioctls, including
348binary compatibility with code written before the introduction of the
349sa_len field in sockaddrs.
350It also enables
351support for some older pre
352.Bx 4.4
353socket calls.
354.It Cd options COMPAT_50
355Enable binary compatibility with
356.Nx 5.0 .
357.It Cd options COMPAT_60
358Enable binary compatibility with
359.Nx 6.0 .
360.It Cd options COMPAT_70
361Enable binary compatibility with
362.Nx 7.0 .
363.It Cd options COMPAT_BSDPTY
364This option is currently on by default and enables the pty multiplexer
365.Xr ptm 4
366and
367.Xr ptmx 4
368to find and use ptys named
369.Pa /dev/ptyXX
370(master) and
371.Pa /dev/ttyXX
372(slave).
373Eventually this option will become optional as ptyfs based pseudo-ttys become
374the default, see
375.Xr mount_ptyfs 8 .
376.It Cd options COMPAT_SVR4
377On those architectures that support it, this enables binary
378compatibility with
379.At V.4
380applications built for the same architecture.
381This currently includes the i386, m68k, and sparc ports.
382.It Cd options COMPAT_LINUX
383On those architectures that support it, this enables binary
384compatibility with Linux ELF and
385.Xr a.out 5
386applications built for the same architecture.
387This currently includes the alpha, arm, i386, m68k, mips, powerpc and
388x86_64 ports.
389.It Cd options COMPAT_LINUX32
390On those 64 bit architectures that support it, this enables binary
391compatibility with 32 bit Linux binaries.
392For now this is limited to running i386 ELF Linux binaries on amd64.
393.It Cd options COMPAT_SUNOS
394On those architectures that support it, this enables binary
395compatibility with
396.Tn SunOS 4.1
397applications built for the same architecture.
398This currently includes the sparc, sparc64 and most or all m68k ports.
399Note that the sparc64 requires the
400.Em COMPAT_NETBSD32
401option for 64-bit kernels, in addition to this option.
402.It Cd options COMPAT_ULTRIX
403On those architectures that support it, this enables binary
404compatibility with
405.Tn ULTRIX
406applications built for the same architecture.
407This currently is limited to the pmax.
408The functionality of this option is unknown.
409.It Cd options COMPAT_FREEBSD
410On those architectures that support it, this enables binary
411compatibility with
412.Fx
413applications built for the same architecture.
414At the moment this is limited to the i386 port.
415.It Cd options COMPAT_IBCS2
416On those architectures that support it, this enables binary
417compatibility with iBCS2 or SVR3 applications built for the same architecture.
418This is currently limited to the i386 and vax ports.
419.It Cd options COMPAT_OSF1
420On those architectures that support it, this enables binary
421compatibility with
422.Tn Digital
423.Ux
424.Po
425formerly
426.Tn OSF/1
427.Pc
428applications built for the same architecture.
429This is currently limited to the alpha port.
430.It Cd options COMPAT_NOMID
431Enable compatibility with
432.Xr a.out 5
433executables that lack a machine ID.
434This includes
435.Nx 0.8 Ns 's
436ZMAGIC format, and 386BSD and BSDI's
437QMAGIC, NMAGIC, and OMAGIC
438.Xr a.out 5
439formats.
440.It Cd options COMPAT_NETBSD32
441On those architectures that support it, this enables binary
442compatibility with 32-bit applications built for the same architecture.
443This is currently limited to the amd64 and sparc64 ports, and only
444applicable for 64-bit kernels.
445.It Cd options COMPAT_SVR4_32
446On those architectures that support it, this enables binary
447compatibility with 32-bit SVR4 applications built for the same architecture.
448This is currently limited to the sparc64 port, and only applicable for
44964-bit kernels.
450.It Cd options COMPAT_AOUT_M68K
451On m68k architectures which have switched to ELF,
452this enables binary compatibility with
453.Nx Ns Tn /m68k
454.Xr a.out 5
455executables on
456.Nx Ns Tn /m68k
457ELF kernels.
458This handles alignment incompatibility of m68k ABI between
459a.out and ELF which causes the structure padding differences.
460Currently only some system calls which use
461.Va struct stat
462are adjusted and some binaries which use
463.Xr sysctl 3
464to retrieve network details would not work properly.
465.It Cd options EMUL_NATIVEROOT=string
466Just like emulated binaries first try looking up files in
467an emulation root (e.g.
468.Pa /emul/linux )
469before looking them up in real root, this option causes native
470binaries to first look up files in an "emulation" directory too.
471This can be useful to test an amd64 kernel on top of an i386 system
472before full migration: by unpacking the amd64 distribution in e.g.
473.Pa /emul/netbsd64
474and specifying that location as
475.Cd EMUL_NATIVEROOT ,
476native amd64 binaries can be run while the root file system remains
477populated with i386 binaries.
478Beware of
479.Pa /dev
480incompatibilities between i386 and amd64 if you do this.
481.It Cd options EXEC_ELF_NOTELESS
482Run unidentified ELF binaries as
483.Nx
484binaries.
485This might be needed for very old
486.Nx
487ELF binaries on some archs.
488These old binaries didn't contain an appropriate
489.Li .note.netbsd.ident
490section, and thus can't be identified by the kernel as
491.Nx
492binaries otherwise.
493Beware - if this option is on, the kernel would run
494.Em any
495unknown ELF binaries as if they were
496.Nx
497binaries.
498.El
499.Ss Debugging Options
500.Bl -ohang
501.It Cd options DDB
502Compiles in a kernel debugger for diagnosing kernel problems.
503See
504.Xr ddb 4
505for details.
506.Em NOTE :
507not available on all architectures.
508.It Cd options DDB_FROMCONSOLE=integer
509If set to non-zero, DDB may be entered by sending a break on a serial
510console or by a special key sequence on a graphics console.
511A value of "0" ignores console breaks or key sequences.
512If not explicitly specified, the default value is "1".
513Note that this sets the value of the
514.Em ddb.fromconsole
515.Xr sysctl 3
516variable which may be changed at run time -- see
517.Xr sysctl 8
518for details.
519.It Cd options DDB_HISTORY_SIZE=integer
520If this is non-zero, enable history editing in the kernel debugger
521and set the size of the history to this value.
522.It Cd options DDB_ONPANIC
523The default if not specified is
524.Dq 1
525- just enter into DDB.
526If set to
527.Dq 2
528the kernel will
529attempt to print out a stack trace before entering into DDB.
530If set to
531.Dq 0
532the kernel will attempt to print out a stack trace
533and reboot the system.
534If set to
535.Dq -1
536then neither a stack trace is printed or DDB entered -
537it is as if DDB were not compiled into the kernel.
538Note that this sets the value of the
539.Em ddb.onpanic
540.Xr sysctl 3
541variable which may be changed at run time -- see
542.Xr sysctl 8
543for details.
544.It Cd options DDB_COMMANDONENTER=string
545This option specify commands which will be executed on each entry to DDB.
546This sets the default value of the
547.Em ddb.commandonenter
548.Xr sysctl 3
549variable which may be changed at run time.
550.It Cd options DDB_BREAK_CHAR=integer
551This option overrides using break to enter the kernel debugger
552on the serial console.
553The value given is the ASCII value to be used instead.
554This is currently only supported by the com driver.
555.It Cd options DDB_VERBOSE_HELP
556This option adds more verbose descriptions to the
557.Em help
558command.
559.It Cd options KGDB
560Compiles in a remote kernel debugger stub for diagnosing kernel problems
561using the
562.Dq remote target
563feature of gdb.
564See
565.Xr gdb 1
566for details.
567.Em NOTE :
568not available on all architectures.
569.It Cd options KGDB_DEV
570Device number
571.Po
572as a
573.Dv dev_t
574.Pc
575of kgdb device.
576.It Cd options KGDB_DEVADDR
577Memory address of kgdb device.
578.It Cd options KGDB_DEVMODE
579Permissions of kgdb device.
580.It Cd options KGDB_DEVNAME
581Device name of kgdb device.
582.It Cd options KGDB_DEVRATE
583Baud rate of kgdb device.
584.It Cd makeoptions DEBUG="-g"
585The
586.Fl g
587flag causes
588.Pa netbsd.gdb
589to be built in addition to
590.Pa netbsd .
591.Pa netbsd.gdb
592is useful for debugging kernel crash dumps with gdb.
593See
594.Xr gdb 1
595for details.
596This also turns on
597.Em options DEBUG
598(which see).
599.It Cd options DEBUG
600Turns on miscellaneous kernel debugging.
601Since options are turned into preprocessor defines (see above),
602.Em options DEBUG
603is equivalent to doing a
604.Em #define DEBUG
605throughout the kernel.
606Much of the kernel has
607.Em #ifdef DEBUG
608conditionalized debugging code.
609Note that many parts of the kernel (typically device drivers) include their own
610.Em #ifdef XXX_DEBUG
611conditionals instead.
612This option also turns on certain other options,
613which may decrease system performance.
614Systems with this option are not suitable for regular use, and are
615intended only for debugging or looking for bugs.
616.It Cd options DIAGNOSTIC
617Adds code to the kernel that does internal consistency checks.
618This code will cause the kernel to panic if corruption of internal data
619structures is detected.
620Historically, the performance degradation is sufficiently small that
621it is reasonable for systems with
622.Em options DIAGNOSTIC
623to be in production use, with the real consideration not being
624performance but instead a preference for more panics versus continued
625operation with undetected problems.
626.It Cd options LOCKDEBUG
627Adds code to the kernel to detect incorrect use of locking primitives
628(mutex, rwlock).
629This code will cause the kernel to check for dead lock conditions.
630It will also check for memory being freed to not contain initialised
631lock primitives.
632Functions for use in
633.Xr ddb 4
634to check lock chains etc. are also enabled.
635These checks are very expensive and can decrease performance on
636multi-processor machines by a factor of three.
637.It Cd options KSTACK_CHECK_MAGIC
638Check kernel stack usage and panic if stack overflow is detected.
639This check is performance sensitive because it scans stack on each context
640switch.
641.It Cd options KTRACE
642Add hooks for the system call tracing facility, which allows users to
643watch the system call invocation behavior of processes.
644See
645.Xr ktrace 1
646for details.
647.It Cd options MSGBUFSIZE=integer
648This option sets the size of the kernel message buffer.
649This buffer holds the kernel output of
650.Fn printf
651when not (yet) read by
652.Xr syslogd 8 .
653This is particularly useful when the system has crashed and you wish to lookup
654the kernel output from just before the crash.
655Also, since the autoconfig output becomes more and more verbose,
656it sometimes happens that the message buffer overflows before
657.Xr syslogd 8
658was able to read it.
659Note that not all systems are capable of obtaining a variable sized message
660buffer.
661There are also some systems on which memory contents are not preserved
662across reboots.
663.It Cd options KERNHIST
664Enables the kernel history logs, which create in-memory traces of
665various kernel activities.
666These logs can be displayed by using
667.Cm show kernhist
668from DDB.
669See the kernel source file
670.Pa sys/kern/kern_history.c
671and the
672.Xr kernhist 9
673manual for details.
674.It Cd options KERNHIST_PRINT
675Prints the kernel history logs on the system console as entries are added.
676Note that the output is
677.Em extremely
678voluminous, so this option is really only useful for debugging
679the very earliest parts of kernel initialization.
680.It Cd options UVMHIST
681Like
682.Em KERNHIST ,
683it enables the UVM history logs.
684These logs can be displayed by using
685.Cm show kernhist
686from DDB.
687See the kernel source file
688.Pa sys/uvm/uvm_stat.c
689for details.
690.It Cd options UVMHIST_PRINT
691Like
692.Em UVMHIST ,
693it prints the UVM history logs on the system console as entries are added.
694Note that the output is
695.Em extremely
696voluminous, so this option is really only useful for debugging
697the very earliest parts of kernel initialization.
698.It Cd options UVMHIST_MAPHIST_SIZE
699Set the size of the
700.Dq maphist
701kernel history.
702The default is 100.
703This option depends upon the
704.Em UVMHIST
705option.
706.It Cd options UVMHIST_PDHIST_SIZE
707Set the size of the
708.Dq pdhist
709kernel history.
710The default is 100.
711This option depends upon the
712.Em UVMHIST
713option.
714.It Cd options BIOHIST
715Like
716.Em KERNHIST ,
717it enables the BIO history logs.
718These logs can be displayed by using
719.Cm show kernhist
720from DDB, and can help in debugging problems with Buffered I/O operations.
721See the kernel source file
722.Pa sys/kern/vfs_vio.c
723for details.
724.It Cd options BIOHIST_PRINT
725Like
726.Em BIOHIST ,
727it prints the BIO history logs on the system console as entries are added.
728Note that the output is
729.Em extremely
730voluminous, so this option is really only useful for debugging
731the very earliest parts of kernel initialization.
732.It Cd options BIOHIST_SIZE
733Set the size of the
734.Dq biohist
735kernel history.
736The default is 500.
737This option depends upon the
738.Em BIOHIST
739option.
740.El
741.Ss File Systems
742.Bl -ohang
743.It Cd file-system FFS
744Includes code implementing the Berkeley Fast File System
745.Po Em FFS Pc .
746Most machines need this if they are not running diskless.
747.It Cd file-system EXT2FS
748Includes code implementing the Second Extended File System
749.Po Em ext2 Pc ,
750revision 0 and revision 1 with the
751.Em filetype ,
752.Em sparse_super
753and
754.Em large_file
755options.
756This is the most commonly used file system on the Linux operating system,
757and is provided here for compatibility.
758Some of the specific features of
759.Em ext2
760like the "behavior on errors" are not implemented.
761See
762.Xr mount_ext2fs 8
763for details.
764.It Cd file-system LFS
765.Bq Em EXPERIMENTAL
766Include the Log-structured File System
767.Po Em LFS Pc .
768See
769.Xr mount_lfs 8
770and
771.Xr newfs_lfs 8
772for details.
773.It Cd file-system MFS
774Include the Memory File System
775.Po Em MFS Pc .
776This file system stores files in swappable memory, and produces
777notable performance improvements when it is used as the file store
778for
779.Pa /tmp
780and similar file systems.
781See
782.Xr mount_mfs 8
783for details.
784.It Cd file-system NFS
785Include the client side of the Network File System
786.Pq Tn NFS
787remote file sharing protocol.
788Although the bulk of the code implementing
789.Tn NFS
790is kernel based, several user level daemons are needed for it to work.
791See
792.Xr mount_nfs 8
793for details.
794.It Cd file-system CD9660
795Includes code for the
796.Tn ISO
7979660 + Rock Ridge file system, which is the standard file system on many
798.Tn CD-ROM
799discs.
800Useful primarily if you have a
801.Tn CD-ROM
802drive.
803See
804.Xr mount_cd9660 8
805for details.
806.It Cd file-system MSDOSFS
807Includes the
808.Tn MS-DOS
809FAT file system, which is reportedly still used
810by unfortunate people who have not heard about
811.Nx .
812Also implements the
813.Tn Windows 95
814extensions to the same, which permit the use of longer, mixed case
815file names.
816See
817.Xr mount_msdos 8
818and
819.Xr fsck_msdos 8
820for details.
821.It Cd file-system NTFS
822.Bq Em EXPERIMENTAL
823Includes code for the
824.Tn Microsoft Windows NT
825file system.
826See
827.Xr mount_ntfs 8
828for details.
829.It Cd file-system FDESC
830Includes code for a file system, conventionally mounted on
831.Pa /dev/fd ,
832which permits access to the per-process file descriptor space via
833special files in the file system.
834See
835.Xr mount_fdesc 8
836for details.
837Note that this facility is redundant, and thus unneeded on most
838.Nx
839systems, since the
840.Xr fd 4
841pseudo-device driver already provides identical functionality.
842On most
843.Nx
844systems, instances of
845.Xr fd 4
846are mknoded under
847.Pa /dev/fd/
848and on
849.Pa /dev/stdin ,
850.Pa /dev/stdout ,
851and
852.Pa /dev/stderr .
853.It Cd file-system KERNFS
854Includes code which permits the mounting of a special file system
855(normally mounted on
856.Pa /kern )
857in which files representing various kernel variables and parameters
858may be found.
859See
860.Xr mount_kernfs 8
861for details.
862.It Cd file-system NULLFS
863Includes code for a loopback file system.
864This permits portions of the file hierarchy to be re-mounted in other places.
865The code really exists to provide an example of a stackable file system layer.
866See
867.Xr mount_null 8
868for details.
869.It Cd file-system OVERLAY
870Includes code for a file system filter.
871This permits the overlay file system to intercept all access to an underlying
872file system.
873This file system is intended to serve as an example of a stacking file
874system which has a need to interpose itself between an underlying file
875system and all other access.
876See
877.Xr mount_overlay 8
878for details.
879.It Cd file-system PROCFS
880Includes code for a special file system (conventionally mounted on
881.Pa /proc )
882in which the process space becomes visible in the file system.
883Among
884other things, the memory spaces of processes running on the system are
885visible as files, and signals may be sent to processes by writing to
886.Pa ctl
887files in the procfs namespace.
888See
889.Xr mount_procfs 8
890for details.
891.It Cd file-system UDF
892.Bq Em EXPERIMENTAL
893Includes code for the UDF file system commonly found on CD and DVD
894media but also on USB sticks.
895Currently supports read and write access upto UDF 2.01 and somewhat limited
896write support for UDF 2.50.
897It is marked experimental since there is no
898.Xr fsck_udf 8 .
899See
900.Xr mount_udf 8
901for details.
902.It Cd file-system UMAPFS
903Includes a loopback file system in which user and group IDs may be
904remapped -- this can be useful when mounting alien file systems with
905different UIDs and GIDs than the local system.
906See
907.Xr mount_umap 8
908for details.
909.It Cd file-system UNION
910.Bq Em EXPERIMENTAL
911Includes code for the union file system, which permits directories to
912be mounted on top of each other in such a way that both file systems
913remain visible -- this permits tricks like allowing writing (and the
914deleting of files) on a read-only file system like a
915.Tn CD-ROM
916by mounting a local writable file system on top of the read-only file system.
917See
918.Xr mount_union 8
919for details.
920.It Cd file-system CODA
921.Bq Em EXPERIMENTAL
922Includes code for the Coda file system.
923Coda is a distributed file system like NFS and AFS.
924It is freely available, like NFS, but it functions much like AFS in being a
925.Dq stateful
926file system.
927Both Coda and AFS cache files on your local machine to improve performance.
928Then Coda goes a step further than AFS by letting you access the cached
929files when there is no available network, viz. disconnected laptops and
930network outages.
931In Coda, both the client and server are outside the kernel which makes
932them easier to experiment with.
933Coda is available for several UNIX and non-UNIX platforms.
934See
935.Lk http://www.coda.cs.cmu.edu
936for more details.
937.Em NOTE :
938You also need to enable the pseudo-device, vcoda, for the Coda
939file system to work.
940.It Cd file-system SMBFS
941.Bq Em EXPERIMENTAL
942Includes code for the SMB/CIFS file system.
943See
944.Xr mount_smbfs 8
945for details.
946.Em NOTE :
947You also need to enable the pseudo-device, nsmb, for the SMB
948file system to work.
949.It Cd file-system PTYFS
950.Bq Em EXPERIMENTAL
951Includes code for a special file system (normally mounted on
952.Pa /dev/pts )
953in which pseudo-terminal slave devices become visible in the file system.
954See
955.Xr mount_ptyfs 8
956for details.
957.It Cd file-system TMPFS
958Includes code for the efficient memory file system, normally used over
959.Pa /tmp .
960See
961.Xr mount_tmpfs 8
962for details.
963.It Cd file-system PUFFS
964Includes kernel support for the pass-to-userspace framework file system.
965It can be used to implement file system functionality in userspace.
966See
967.Xr puffs 3
968for more details.
969This enables for example sshfs:
970.Xr mount_psshfs 8 .
971.El
972.Ss File System Options
973.Bl -ohang
974.It Cd options MAGICLINKS
975Enables the expansion of special strings
976.Po
977beginning with
978.Dq @
979.Pc
980when traversing symbolic links.
981See
982.Xr symlink 7
983for a list of supported strings.
984Note that this option only controls the enabling of this feature
985by the kernel at boot-up.
986This feature can still be manipulated with the
987.Xr sysctl 8
988command regardless of the setting of this option.
989.It Cd options NFSSERVER
990Include the server side of the
991.Em NFS
992(Network File System) remote file sharing protocol.
993Although the bulk of the code implementing
994.Em NFS
995is kernel based, several user level daemons are needed for it to
996work.
997See
998.Xr mountd 8
999and
1000.Xr nfsd 8
1001for details.
1002.It Cd options NVNODE=integer
1003This option sets the size of the cache used by the name-to-inode translation
1004routines, (a.k.a. the
1005.Fn namei
1006cache, though called by many other names in the kernel source).
1007By default, this cache has
1008.Dv (NPROC + NTEXT + 100)
1009entries (NPROC set as 20 + 16 * MAXUSERS and NTEXT as 80 + NPROC / 8).
1010A reasonable way to derive a value of
1011.Dv NVNODE ,
1012should you notice a large number of namei cache misses with a tool such as
1013.Xr systat 1 ,
1014is to examine your system's current computed value with
1015.Xr sysctl 8 ,
1016(which calls this parameter "kern.maxvnodes") and to increase this value
1017until either the namei cache hit rate improves or it is determined that
1018your system does not benefit substantially from an increase in the size of
1019the namei cache.
1020.It Cd options NAMECACHE_ENTER_REVERSE
1021Causes the namei cache to always enter a reverse mapping (vnode -\*[Gt] name)
1022as well as a normal one.
1023Normally, this is already done for directory vnodes, to speed up the getcwd
1024operation.
1025This option will cause longer hash chains in the reverse cache, and thus
1026slow down getcwd somewhat.
1027However, it does make vnode -\*[Gt] path translations possible in some cases.
1028For now, only useful if strict
1029.Pa /proc/#/maps
1030emulation for Linux binaries is required.
1031.El
1032.Ss Options for FFS/UFS File Systems
1033.Bl -ohang
1034.It Cd options WAPBL
1035Enable
1036.Dq Write Ahead Physical Block Logging file system journaling .
1037This provides rapid file system consistency checking after a system outage.
1038It also provides better general use performance over regular FFS.
1039See also
1040.Xr wapbl 4 .
1041.It Cd options QUOTA
1042Enables kernel support for traditional quotas in FFS.
1043Traditional quotas store the quota information in external files and
1044require
1045.Xr quotacheck 8
1046and
1047.Xr quotaon 8
1048at boot time.
1049Traditional quotas are limited to 32-bit sizes and are at this point
1050considered a legacy feature.
1051.It Cd options QUOTA2
1052Enables kernel support for in-volume quotas in FFS.
1053The quota information is file system metadata maintained by
1054.Xr fsck 8
1055and/or WAPBL journaling.
1056MFS volumes can also use
1057.Dv QUOTA2
1058quotas; see
1059.Xr mount_mfs 8
1060for more information.
1061.It Cd options FFS_EI
1062Enable
1063.Dq Endian-Independent
1064FFS support.
1065This allows a system to mount an FFS file system created for another
1066architecture, at a small performance cost for all FFS file systems.
1067See also
1068.Xr newfs 8 ,
1069.Xr fsck_ffs 8 ,
1070.Xr dumpfs 8
1071for file system byte order status and manipulation.
1072.It Cd options FFS_NO_SNAPSHOT
1073Disable support for the creation of file system internal snapshot
1074of FFS file systems.
1075Maybe useful for install media kernels, small memory systems and
1076embedded systems which don't require the snapshot support.
1077.It Cd options UFS_EXTATTR
1078Enable extended attribute support for UFS1 file systems.
1079.It Cd options UFS_DIRHASH
1080Increase lookup performance by maintaining in-core hash tables
1081for large directories.
1082.El
1083.Ss Options for the LFS File System
1084.Bl -ohang
1085.\" .It Cd options LFS_KERNEL_RFW
1086.\" There is no documentation for this. (XXX)
1087.\" .It Cd options LFS_QUOTA
1088.\" Enable traditional quota support for LFS.
1089.\" (It is not clear if this works.)
1090.\" .It Cd options LFS_QUOTA2
1091.\" Enable modernized 64-bit quota support for LFS.
1092.\" (This does not work yet.)
1093.It Cd options LFS_EI
1094Enable
1095.Dq Endian-Independent
1096LFS support.
1097This allows (at a small performance cost) mounting an LFS file system
1098created for another architecture.
1099.\" .It Cd options LFS_EXTATTR
1100.\" Enable extended attribute support for LFS.
1101.\" (It is not clear if this works.)
1102.It Cd options LFS_DIRHASH
1103Increase lookup performance by maintaining in-core hash tables
1104for large directories.
1105.El
1106.Ss Options for the ext2fs File System
1107.Bl -ohang
1108.It Cd options EXT2FS_SYSTEM_FLAGS
1109This option changes the behavior of the APPEND and IMMUTABLE flags
1110for a file on an
1111.Em ext2
1112file system.
1113Without this option, the superuser or owner of the file can
1114set and clear them.
1115With this option, only the superuser can set them, and
1116they can't be cleared if the securelevel is greater than 0.
1117See also
1118.Xr chflags 1
1119and
1120.Xr secmodel_securelevel 9 .
1121.El
1122.Ss Options for the NFS File System
1123.Bl -ohang
1124.It Cd options NFS_BOOT_BOOTP
1125Enable use of the BOOTP protocol (RFCs 951 and 1048) to get configuration
1126information if NFS is used to mount the root file system.
1127See
1128.Xr diskless 8
1129for details.
1130.It Cd options NFS_BOOT_BOOTSTATIC
1131Enable use of static values defined as
1132.Dq NFS_BOOTSTATIC_MYIP ,
1133.Dq NFS_BOOTSTATIC_GWIP ,
1134.Dq NFS_BOOTSTATIC_SERVADDR ,
1135and
1136.Dq NFS_BOOTSTATIC_SERVER
1137in kernel options to get configuration information
1138if NFS is used to mount the root file system.
1139.It Cd options NFS_BOOT_DHCP
1140Same as
1141.Dq NFS_BOOT_BOOTP ,
1142but use the DHCP extensions to the
1143BOOTP protocol (RFC 1541).
1144.It Cd options NFS_BOOT_BOOTP_REQFILE
1145Specifies the string sent in the bp_file field of the BOOTP/DHCP
1146request packet.
1147.It Cd options NFS_BOOT_BOOTPARAM
1148Enable use of the BOOTPARAM protocol, consisting of RARP and
1149BOOTPARAM RPC, to get configuration information if NFS
1150is used to mount the root file system.
1151See
1152.Xr diskless 8
1153for details.
1154.It Cd options NFS_BOOT_RWSIZE=value
1155Set the initial NFS read and write sizes for diskless-boot requests.
1156The normal default is 8Kbytes.
1157This option provides a way to lower the value (e.g., to 1024 bytes)
1158as a workaround for buggy network interface cards or boot PROMs.
1159Once booted, the read and write request sizes can be increased by
1160remounting the file system.
1161See
1162.Xr mount_nfs 8
1163for details.
1164.It Cd options NFS_V2_ONLY
1165Reduce the size of the NFS client code by omitting code that's only required
1166for NFSv3 and NQNFS support, leaving only that code required to use NFSv2
1167servers.
1168.It Cd options NFS_BOOT_TCP
1169Use NFS over TCP instead of the default UDP, for mounting root.
1170.El
1171.Ss Buffer queue strategy options
1172The following options enable alternative buffer queue strategies.
1173.Bl -ohang
1174.It Cd options BUFQ_READPRIO
1175Enable experimental buffer queue strategy for disk I/O.
1176In the default strategy, outstanding disk requests are ordered by
1177sector number and sent to the disk, regardless of whether the
1178operation is a read or write; this option gives priority to issuing
1179read requests over write requests.
1180Although requests may therefore be issued out of sector-order, causing
1181more seeks and thus lower overall throughput, interactive system
1182responsiveness under heavy disk I/O load may be improved, as processes
1183blocking on disk reads are serviced sooner (file writes typically
1184don't cause applications to block).
1185The performance effect varies greatly depending on the hardware, drive
1186firmware, file system configuration, workload, and desired performance
1187trade-off.
1188Systems using drive write-cache (most modern IDE disks, by default)
1189are unlikely to benefit and may well suffer; such disks acknowledge
1190writes very quickly, and optimize them internally according to
1191physical layout.
1192Giving these disks as many requests to work with as possible (the
1193standard strategy) will typically produce the best results, especially
1194if the drive has a large cache; the drive will silently complete
1195writes from cache as it seeks for reads.
1196Disks that support a large number of concurrent tagged requests (SCSI
1197disks and many hardware RAID controllers) expose this internal
1198scheduling with tagged responses, and don't block for reads; such
1199disks may not see a noticeable difference with either strategy.
1200However, if IDE disks are run with write-cache disabled for safety,
1201writes are not acknowledged until actually completed, and only one
1202request can be outstanding; a large number of small writes in one
1203locality can keep the disk busy, starving reads elsewhere on the disk.
1204Such systems are likely to see the most benefit from this option.
1205Finally, the performance interaction of this option with ffs soft
1206dependencies can be subtle, as that mechanism can drastically alter
1207the workload for file system metadata writes.
1208.It Cd options BUFQ_PRIOCSCAN
1209Enable another buffer queue strategy for disk I/O, per-priority cyclical scan.
1210.It Cd options NEW_BUFQ_STRATEGY
1211Synonym of
1212.Em BUFQ_READPRIO .
1213.El
1214.Ss Miscellaneous Options
1215.Bl -ohang
1216.It Cd options CPU_UCODE
1217Support cpu microcode loading via
1218.Xr cpuctl 8 .
1219.It Cd options MEMORY_DISK_DYNAMIC
1220This option makes the
1221.Xr md 4
1222.Tn RAM
1223disk size dynamically sized.
1224It is incompatible with
1225.Xr mdsetimage 8 .
1226.It Cd options MEMORY_DISK_HOOKS
1227This option allows for some machine dependent functions to be called when
1228the
1229.Xr md 4
1230.Tn RAM
1231disk driver is configured.
1232This can result in automatically loading a
1233.Tn RAM
1234disk from floppy on open (among other things).
1235.It Cd options MEMORY_DISK_IS_ROOT
1236Forces the
1237.Xr md 4
1238.Tn RAM
1239disk to be the root device.
1240This can only be overridden when
1241the kernel is booted in the 'ask-for-root' mode.
1242.It Cd options MEMORY_DISK_ROOT_SIZE=integer
1243Allocates the given number of 512 byte blocks as memory for the
1244.Xr md 4
1245.Tn RAM
1246disk, to be populated with
1247.Xr mdsetimage 8 .
1248.It Cd options MEMORY_DISK_SERVER=0
1249Do not include the interface to a userland memory disk server process.
1250Per default, this option is set to 1, including the support code.
1251Useful for install media kernels.
1252.It Cd options MEMORY_DISK_RBFLAGS=value
1253This option sets the
1254.Xr reboot 2
1255flags used when booting with a memory disk as root file system.
1256Possible values include
1257.Dv RB_AUTOBOOT
1258(boot in the usual fashion - default value), and
1259.Dv RB_SINGLE
1260(boot in single-user mode).
1261.It Cd options MODULAR
1262Enables the framework for kernel modules (see
1263.Xr module 7 ) .
1264.It Cd options MODULAR_DEFAULT_AUTOLOAD
1265Enables the autoloading of kernel modules by default.
1266This sets the default value of the
1267.Em kern.module.autoload
1268.Xr sysctl 3
1269variable which may be changed at run time.
1270.It Cd options VND_COMPRESSION
1271Enables the
1272.Xr vnd 4
1273driver to also handle compressed images.
1274See
1275.Xr vndcompress 1 ,
1276.Xr vnd 4
1277and
1278.Xr vnconfig 8
1279for more information.
1280.It Cd options SPLDEBUG
1281Help the kernel programmer find bugs related to the interrupt priority
1282level.
1283When
1284.Fn spllower
1285or
1286.Fn splraise
1287changes the current CPU's interrupt priority level to or from
1288.Dv IPL_HIGH ,
1289record a backtrace.
1290Read
1291.Xr return_address 9
1292for caveats about collecting backtraces.
1293This feature is experimental, and it is only available on i386.
1294See
1295.Pa sys/kern/subr_spldebug.c .
1296.It Cd options TFTPROOT
1297Download the root memory disk through TFTP at root mount time.
1298This enables the use of a root
1299.Tn RAM
1300disk without requiring it to be embedded in the kernel using
1301.Xr mdsetimage 8 .
1302The
1303.Tn RAM
1304disk name is obtained using DHCP's filename parameter.
1305This option requires
1306.Em MEMORY_DISK_HOOKS ,
1307.Em MEMORY_DISK_DYNAMIC ,
1308and
1309.Em MEMORY_DISK_IS_ROOT .
1310It is incompatible with
1311.Em MEMORY_DISK_ROOT_SIZE .
1312.It Cd options HZ=integer
1313On ports that support it, set the system clock frequency (see
1314.Xr hz 9 )
1315to the supplied value.
1316Handle with care.
1317.It Cd options NTP
1318Turns on in-kernel precision timekeeping support used by software
1319implementing
1320.Em NTP
1321(Network Time Protocol, RFC 1305).
1322The
1323.Em NTP
1324option adds an in-kernel Phase-Locked Loop (PLL) for normal
1325.Em NTP
1326operation, and a Frequency-Locked Loop (FLL) for intermittently-connected
1327operation.
1328.Xr ntpd 8
1329will employ a user-level PLL when kernel support is unavailable,
1330but the in-kernel version has lower latency and more precision, and
1331so typically keeps much better time.
1332.Pp
1333The interface to the kernel
1334.Em NTP
1335support is provided by the
1336.Xr ntp_adjtime 2
1337and
1338.Xr ntp_gettime 2
1339system calls, which are intended for use by
1340.Xr ntpd 8
1341and are enabled by the option.
1342On systems with sub-microsecond resolution timers, or where (HZ/100000)
1343is not an integer, the
1344.Em NTP
1345option also enables extended-precision arithmetic to keep track of
1346fractional clock ticks at NTP time-format precision.
1347.It Cd options PPS_SYNC
1348This option enables a kernel serial line discipline for receiving time
1349phase signals from an external reference clock such as a radio clock.
1350.Po
1351The
1352.Em NTP
1353option (which see) must be on if the
1354.Em PPS_SYNC
1355option is used
1356.Pc .
1357Some reference clocks generate a Pulse Per Second (PPS) signal in
1358phase with their time source.
1359The
1360.Em PPS
1361line discipline receives this signal on either the data leads
1362or the DCD control lead of a serial port.
1363.Pp
1364.Em NTP
1365uses the PPS signal to discipline the local clock oscillator to a high
1366degree of precision (typically less than 50 microseconds in time and
13670.1 ppm in accuracy).
1368.Em PPS
1369can also generate a serial output pulse when the system receives a PPS
1370interrupt.
1371This can be used to measure the system interrupt latency and thus calibrate
1372.Em NTP
1373to account for it.
1374Using
1375.Em PPS
1376usually requires a gadget box
1377to convert from
1378.Tn TTL
1379to
1380.Tn RS-232
1381signal levels.
1382The gadget box and PPS are described in more detail in the HTML documentation
1383for
1384.Xr ntpd 8
1385in
1386.Pa /usr/share/doc/html/ntp .
1387.Pp
1388.Nx
1389currently supports this option in
1390.Xr com 4
1391and
1392.Xr zsc 4 .
1393.It Cd options SETUIDSCRIPTS
1394Allows scripts with the setuid bit set to execute as the effective
1395user rather than the real user, just like binary executables.
1396.Pp
1397.Em NOTE :
1398Using this option will also enable
1399.Em options FDSCRIPTS
1400.It Cd options FDSCRIPTS
1401Allows execution of scripts with the execute bit set, but not the
1402read bit, by opening the file and passing the file descriptor to
1403the shell, rather than the filename.
1404.Pp
1405.Em NOTE :
1406Execute only (non-readable) scripts will have
1407.Va argv[0]
1408set to
1409.Pa /dev/fd/* .
1410What this option allows as far as security is
1411concerned, is the ability to safely ensure that the correct script
1412is run by the interpreter, as it is passed as an already open file.
1413.It Cd options RTC_OFFSET=integer
1414The kernel (and typically the hardware battery backed-up clock on
1415those machines that have one) keeps time in
1416.Em UTC
1417(Universal Coordinated Time, once known as
1418.Em GMT ,
1419or Greenwich Mean Time)
1420and not in the time of the local time zone.
1421The
1422.Em RTC_OFFSET
1423option is used on some ports (such as the i386) to tell the kernel
1424that the hardware clock is offset from
1425.Em UTC
1426by the specified number of minutes.
1427This is typically used when a machine boots several operating
1428systems and one of them wants the hardware clock to run in the
1429local time zone and not in
1430.Em UTC ,
1431e.g.
1432.Em RTC_OFFSET=300
1433means
1434the hardware clock is set to US Eastern Time (300 minutes behind
1435.Em UTC ) ,
1436and not
1437.Em UTC .
1438(Note:
1439.Em RTC_OFFSET
1440is used to initialize a kernel variable named
1441.Va rtc_offset
1442which is the source actually used to determine the clock offset, and
1443which may be accessed via the kern.rtc_offset sysctl variable.
1444See
1445.Xr sysctl 8
1446and
1447.Xr sysctl 3
1448for details.
1449Since the kernel clock is initialized from the hardware clock very
1450early in the boot process, it is not possible to meaningfully change
1451.Va rtc_offset
1452in system initialization scripts.
1453Changing this value currently may only be done at kernel compile
1454time or by patching the kernel and rebooting).
1455.Pp
1456.Em NOTE :
1457Unfortunately, in many cases where the hardware clock
1458is kept in local time, it is adjusted for Daylight Savings
1459Time; this means that attempting to use
1460.Em RTC_OFFSET
1461to let
1462.Nx
1463coexist with such an operating system, like Windows,
1464would necessitate changing
1465.Em RTC_OFFSET
1466twice a year.
1467As such, this solution is imperfect.
1468.It Cd options MAXUPRC=integer
1469Sets the soft
1470.Dv RLIMIT_NPROC
1471resource limit, which specifies the maximum number of simultaneous
1472processes a user is permitted to run, for process 0;
1473this value is inherited by its child processes.
1474It defaults to
1475.Em CHILD_MAX ,
1476which is currently defined to be 160.
1477Setting
1478.Em MAXUPRC
1479to a value less than
1480.Em CHILD_MAX
1481is not permitted, as this would result in a violation of the semantics of
1482.St -p1003.1-90 .
1483.It Cd options NOFILE=integer
1484Sets the soft
1485.Dv RLIMIT_NOFILE
1486resource limit, which specifies the maximum number of open
1487file descriptors for each process;
1488this value is inherited by its child processes.
1489It defaults to
1490.Em OPEN_MAX ,
1491which is currently defined to be 128.
1492.It Cd options MAXFILES=integer
1493Sets the default value of the
1494.Em kern.maxfiles
1495sysctl variable, which indicates the maximum number of files that may
1496be open in the system.
1497.It Cd options DEFCORENAME=string
1498Sets the default value of the
1499.Em kern.defcorename
1500sysctl variable, otherwise it is set to
1501.Nm %n.core .
1502See
1503.Xr sysctl 8
1504and
1505.Xr sysctl 3
1506for details.
1507.It Cd options RASOPS_CLIPPING
1508Enables clipping within the
1509.Nm rasops
1510raster-console output system.
1511.Em NOTE :
1512only available on architectures that use
1513.Nm rasops
1514for console output.
1515.It Cd options RASOPS_SMALL
1516Removes optimized character writing code from the
1517.Nm rasops
1518raster-console output system.
1519.Em NOTE :
1520only available on architectures that use
1521.Nm rasops
1522for console output.
1523.It Cd options INCLUDE_CONFIG_FILE
1524Embeds the kernel config file used to define the kernel in the kernel
1525binary itself.
1526The embedded data also includes any files directly included by the config
1527file itself, e.g.
1528.Pa GENERIC.local
1529or
1530.Pa std.$MACHINE .
1531The embedded config file can be extracted from the resulting kernel with
1532.Xr config 1
1533.Fl x ,
1534or by the following command:
1535.Bd -literal -offset indent
1536strings netbsd | sed -n 's/^_CFG_//p' | unvis
1537.Ed
1538.It Cd options INCLUDE_JUST_CONFIG
1539Similar to the above option, but includes just the actual config file,
1540not any included files.
1541.It Cd options PIPE_SOCKETPAIR
1542Use slower, but smaller socketpair(2)-based pipe implementation instead
1543of default faster, but bigger one.
1544Primarily useful for installation kernels.
1545.It Cd options USERCONF
1546Compiles in the in-kernel device configuration manager.
1547See
1548.Xr userconf 4
1549for details.
1550.It Cd options PERFCTRS
1551Compiles in kernel support for CPU performance-monitoring counters.
1552See
1553.Xr pmc 1
1554for details.
1555.Em NOTE :
1556not available on all architectures.
1557.It Cd options SCDEBUG_DEFAULT
1558Used with the
1559.Cd options SYSCALL_DEBUG
1560described below to choose which types of events are displayed.
1561.Pp
1562.Bl -tag -width "SCDEBUG_KERNHIST" -compact -offset indent
1563.It Dv SCDEBUG_CALLS
1564Show system call entry points.
1565.It Dv SCDEBUG_RETURNS
1566Show system call exit points.
1567.It Dv SCDEBUG_ALL
1568Show all system call requestes, including unimplemented calls.
1569.It Dv SCDEBUG_SHOWARGS
1570Show the arguments provided.
1571.It Dv SCDEBUG_KERNHIST
1572Store a restricted form of the system call debug in a kernel history
1573instead of printing it to the console.
1574This option relies upon
1575.Cd options KERNHIST .
1576.El
1577.Pp
1578The default value is
1579.Dv (SCDEBUG_CALLS|SCDEBUG_RETURNS|SCDEBUG_SHOWARGS) .
1580.It Cd options SYSCALL_DEBUG
1581Useful for debugging system call issues, usually in early single user bringup.
1582By default, writes entries to the system console for most system call events.
1583Can be configured with the
1584.Cd options SCDEBUG_DEFAULT
1585option to to use the
1586.Cd options KERNHIST
1587facility instead.
1588.It Cd options SYSCALL_STATS
1589Count the number of times each system call number is called.
1590The values can be read through the sysctl interface and displayed using
1591.Xr systat 1 .
1592.Em NOTE :
1593not yet available on all architectures.
1594.It Cd options SYSCALL_TIMES
1595Count the time spent (using
1596.Fn cpu_counter32 )
1597in each system call.
1598.Em NOTE :
1599Using this option will also enable
1600.Cd options SYSCALL_STATS .
1601.It Cd options SYSCALL_TIMES_HASCOUNTER
1602Force use of
1603.Fn cpu_counter32
1604even if
1605.Fn cpu_hascounter
1606reports false.
1607Useful for systems where the cycle counter doesn't run at a constant rate
1608(e.g. Soekris boxes).
1609.It Cd options XSERVER_DDB
1610A supplement to XSERVER that adds support for entering
1611.Xr ddb 4
1612while in
1613.Tn X11 .
1614.It Cd options FILEASSOC
1615Support for
1616.Xr fileassoc 9 .
1617Required for
1618.Cd options PAX_SEGVGUARD
1619and
1620.Cd pseudo-device veriexec .
1621.It Cd options FILEASSOC_NHOOKS=integer
1622Number of storage slots per file for
1623.Xr fileassoc 9 .
1624Default is 4.
1625.El
1626.Ss Networking Options
1627.Bl -ohang
1628.It Cd options GATEWAY
1629Enables
1630.Em IPFORWARDING
1631(which see)
1632and (on most ports) increases the size of
1633.Em NMBCLUSTERS
1634(which see).
1635In general,
1636.Em GATEWAY
1637is used to indicate that a system should act as a router, and
1638.Em IPFORWARDING
1639is not invoked directly.
1640(Note that
1641.Em GATEWAY
1642has no impact on protocols other than
1643.Tn IP ,
1644such as
1645.Tn CLNP ) .
1646.Em GATEWAY
1647option also compiles IPv4 and IPv6 fast forwarding code into the kernel.
1648.It Cd options ICMPPRINTFS
1649The
1650.Em ICMPPRINTFS
1651option will enable debugging information to be printed about
1652the
1653.Xr icmp 4
1654protocol.
1655.It Cd options IPFORWARDING=value
1656If
1657.Em value
1658is 1 this enables IP routing behavior.
1659If
1660.Em value
1661is 0 (the default), it disables it.
1662The
1663.Em GATEWAY
1664option sets this to 1 automatically.
1665With this option enabled, the machine will forward IP datagrams destined
1666for other machines between its interfaces.
1667Note that even without this option, the kernel will
1668still forward some packets (such as source routed packets) -- removing
1669.Em GATEWAY
1670and
1671.Em IPFORWARDING
1672is insufficient to stop all routing through a bastion host on a
1673firewall -- source routing is controlled independently.
1674To turn off source routing, use
1675.Em options IPFORWSRCRT=0
1676(which see).
1677Note that IP forwarding may be turned on and off independently of the
1678setting of the
1679.Em IPFORWARDING
1680option through the use of the
1681.Em net.inet.ip.forwarding
1682sysctl variable.
1683If
1684.Em net.inet.ip.forwarding
1685is 1, IP forwarding is on.
1686See
1687.Xr sysctl 8
1688and
1689.Xr sysctl 3
1690for details.
1691.It Cd options IPFORWSRCRT=value
1692If
1693.Em value
1694is set to zero, source routing of IP datagrams is turned off.
1695If
1696.Em value
1697is set to one (the default) or the option is absent, source routed IP
1698datagrams are forwarded by the machine.
1699Note that source routing of IP packets may be turned on and off
1700independently of the setting of the
1701.Em IPFORWSRCRT
1702option through the use of the
1703.Em net.inet.ip.forwsrcrt
1704sysctl variable.
1705If
1706.Em net.inet.ip.forwsrcrt
1707is 1, forwarding of source routed IP datagrams is on.
1708See
1709.Xr sysctl 8
1710and
1711.Xr sysctl 3
1712for details.
1713.It Cd options IFA_STATS
1714Tells the kernel to maintain per-address statistics on bytes sent
1715and received over (currently) Internet and AppleTalk addresses.
1716.\"This can be a fairly expensive operation, so you probably want to
1717.\"keep this disabled.
1718The option is not recommended as it degrades system stability.
1719.It Cd options IFQ_MAXLEN=value
1720Increases the allowed size of the network interface packet queues.
1721The default queue size is 50 packets, and you do not normally need
1722to increase it.
1723.It Cd options IPSELSRC
1724Includes support for source-address selection policies.
1725See
1726.Xr in_getifa 9 .
1727.It Cd options MROUTING
1728Includes support for IP multicast routers.
1729You certainly want
1730.Em INET
1731with this.
1732Multicast routing is controlled by the
1733.Xr mrouted 8
1734daemon.
1735See also option
1736.Cd PIM .
1737.It Cd options PIM
1738Includes support for Protocol Independent Multicast (PIM) routing.
1739You need
1740.Em MROUTING
1741and
1742.Em INET
1743with this.
1744Software using this can be found e.g. in
1745.Pa pkgsrc/net/xorp .
1746.It Cd options INET
1747Includes support for the
1748.Tn TCP/IP
1749protocol stack.
1750You almost certainly want this.
1751See
1752.Xr inet 4
1753for details.
1754.It Cd options INET6
1755Includes support for the
1756.Tn IPv6
1757protocol stack.
1758See
1759.Xr inet6 4
1760for details.
1761Unlike
1762.Em INET ,
1763.Em INET6
1764enables multicast routing code as well.
1765This option requires
1766.Em INET
1767at this moment, but it should not.
1768.It Cd options ND6_DEBUG
1769The option sets the default value of net.inet6.icmp6.nd6_debug to 1,
1770for debugging IPv6 neighbor discovery protocol handling.
1771See
1772.Xr sysctl 3
1773for details.
1774.It Cd options IPSEC
1775Includes support for the
1776.Tn IPsec
1777protocol, using the implementation derived from
1778.Ox ,
1779relying on
1780.Xr opencrypto 9
1781to carry out cryptographic operations.
1782See
1783.Xr fast_ipsec 4
1784for details.
1785.It Cd options IPSEC_DEBUG
1786Enables debugging code in
1787.Tn IPsec
1788stack.
1789See
1790.Xr ipsec 4
1791for details.
1792The
1793.Cd IPSEC
1794option includes support for
1795.Tn IPsec
1796Network Address Translator traversal (NAT-T), as described in RFCs 3947
1797and 3948.
1798This feature might be patent-encumbered in some countries.
1799.It Cd options ALTQ
1800Enabled ALTQ (Alternate Queueing).
1801For simple rate-limiting, use
1802.Xr tbrconfig 8
1803to set up the interface transmission rate.
1804To use queueing disciplines, their appropriate kernel options should also
1805be defined (documented below).
1806Queueing disciplines are managed by
1807.Xr altqd 8 .
1808See
1809.Xr altq 9
1810for details.
1811.It Cd options ALTQ_HFSC
1812Include support for ALTQ-implemented HFSC (Hierarchical Fair Service Curve)
1813module.
1814HFSC supports both link-sharing and guaranteed real-time services.
1815HFSC employs a service curve based QoS model, and its unique feature
1816is an ability to decouple delay and bandwidth allocation.
1817Requires
1818.Em ALTQ_RED
1819to use the RED queueing discipline on HFSC classes, or
1820.Em ALTQ_RIO
1821to use the RIO queueing discipline on HFSC classes.
1822This option assumes
1823.Em ALTQ .
1824.It Cd options ALTQ_PRIQ
1825Include support for ALTQ-implemented PRIQ (Priority Queueing).
1826PRIQ implements a simple priority-based queueing discipline.
1827A higher priority class is always served first.
1828Requires
1829.Em ALTQ_RED
1830to use the RED queueing discipline on HFSC classes, or
1831.Em ALTQ_RIO
1832to use the RIO queueing discipline on HFSC classes.
1833This option assumes
1834.Em ALTQ .
1835.It Cd options ALTQ_WFQ
1836Include support for ALTQ-implemented WFQ (Weighted Fair Queueing).
1837WFQ implements a weighted-round robin scheduler for a set of queues.
1838A weight can be assigned to each queue to give a different proportion
1839of the link capacity.
1840A hash function is used to map a flow to one of a set of queues.
1841This option assumes
1842.Em ALTQ .
1843.It Cd options ALTQ_FIFOQ
1844Include support for ALTQ-implemented FIFO queueing.
1845FIFOQ is a simple drop-tail FIFO (First In, First Out) queueing discipline.
1846This option assumes
1847.Em ALTQ .
1848.It Cd options ALTQ_RIO
1849Include support for ALTQ-implemented RIO (RED with In/Out).
1850The original RIO has 2 sets of RED parameters; one for in-profile
1851packets and the other for out-of-profile packets.
1852At the ingress of the network, profile meters tag packets as IN or
1853OUT based on contracted profiles for customers.
1854Inside the network, IN packets receive preferential treatment by
1855the RIO dropper.
1856ALTQ/RIO has 3 drop precedence levels defined for the Assured Forwarding
1857PHB of DiffServ (RFC 2597).
1858This option assumes
1859.Em ALTQ .
1860.It Cd options ALTQ_BLUE
1861Include support for ALTQ-implemented Blue buffer management.
1862Blue is another active buffer management mechanism.
1863This option assumes
1864.Em ALTQ .
1865.It Cd options ALTQ_FLOWVALVE
1866Include support for ALTQ-implemented Flowvalve.
1867Flowvalve is a simple implementation of a RED penalty box that identifies
1868and punishes misbehaving flows.
1869This option requires
1870.Em ALTQ_RED
1871and assumes
1872.Em ALTQ .
1873.It Cd options ALTQ_CDNR
1874Include support for ALTQ-implemented CDNR (diffserv traffic conditioner)
1875packet marking/manipulation.
1876Traffic conditioners are components to meter, mark, or drop incoming
1877packets according to some rules.
1878As opposed to queueing disciplines, traffic conditioners handle incoming
1879packets at an input interface.
1880This option assumes
1881.Em ALTQ .
1882.It Cd options ALTQ_NOPCC
1883Disables use of processor cycle counter to measure time in ALTQ.
1884This option should be defined for a non-Pentium i386 CPU which does not
1885have TSC, SMP (per-CPU counters are not in sync), or power management
1886which affects processor cycle counter.
1887This option assumes
1888.Em ALTQ .
1889.It Cd options ALTQ_IPSEC
1890Include support for IPsec in IPv4 ALTQ.
1891This option assumes
1892.Em ALTQ .
1893.It Cd options ALTQ_JOBS
1894Include support for ALTQ-implemented JoBS (Joint Buffer Management
1895and Scheduling).
1896This option assumes
1897.Em ALTQ .
1898.It Cd options ALTQ_AFMAP
1899Include support for an undocumented ALTQ feature that is used to map an IP
1900flow to an ATM VC (Virtual Circuit).
1901This option assumes
1902.Em ALTQ .
1903.It Cd options ALTQ_LOCALQ
1904Include support for ALTQ-implemented local queues.
1905Its practical use is undefined.
1906Assumes
1907.Em ALTQ .
1908.It Cd options SUBNETSARELOCAL
1909Sets default value for net.inet.ip.subnetsarelocal variable, which
1910controls whether non-directly-connected subnets of connected networks
1911are considered "local" for purposes of choosing the MSS for a TCP
1912connection.
1913This is mostly present for historic reasons and completely irrelevant if
1914you enable Path MTU discovery.
1915.It Cd options HOSTZEROBROADCAST
1916Sets default value for net.inet.ip.hostzerobroadcast variable, which
1917controls whether the zeroth host address of each connected subnet is
1918also considered a broadcast address.
1919Default value is "1", for compatibility with old systems; if this is
1920set to zero on all hosts on a subnet, you should be able to fit an extra
1921host per subnet on the
1922".0" address.
1923.It Cd options MCLSHIFT=value
1924This option is the base-2 logarithm of the size of mbuf clusters.
1925The
1926.Bx
1927networking stack keeps network packets in a linked
1928list, or chain, of kernel buffer objects called mbufs.
1929The system provides larger mbuf clusters as an optimization for
1930large packets, instead of using long chains for large packets.
1931The mbuf cluster size,
1932or
1933.Em MCLBYTES ,
1934must be a power of two, and is computed as two raised to the power
1935.Em MCLSHIFT .
1936On systems with Ethernet network adapters,
1937.Em MCLSHIFT
1938is often set to 11, giving 2048-byte mbuf clusters, large enough to
1939hold a 1500-byte
1940.Tn Ethernet
1941frame in a single cluster.
1942Systems with network interfaces supporting larger frame sizes like
1943.Tn ATM ,
1944.Tn FDDI ,
1945or
1946.Tn HIPPI
1947may perform better with
1948.Em MCLSHIFT
1949set to 12 or 13, giving mbuf cluster sizes of 4096 and 8192 bytes,
1950respectively.
1951.It Cd options NETATALK
1952Include support for the
1953.Tn AppleTalk
1954protocol stack.
1955The kernel provides provision for the
1956.Em Datagram Delivery Protocol
1957(DDP), providing SOCK_DGRAM support and
1958.Tn AppleTalk
1959routing.
1960This stack is used by the
1961.Em NETATALK
1962package, which adds support for
1963.Tn AppleTalk
1964server services via user libraries and applications.
1965.It Cd options BLUETOOTH
1966Include support for the
1967.Tn Bluetooth
1968protocol stack.
1969See
1970.Xr bluetooth 4
1971for details.
1972.It Cd options IPNOPRIVPORTS
1973Normally, only root can bind a socket descriptor to a so-called
1974.Dq privileged
1975.Tn TCP
1976port, that is, a port number in the range 0-1023.
1977This option eliminates those checks from the kernel.
1978This can be useful if there is a desire to allow daemons without
1979privileges to bind those ports, e.g., on firewalls.
1980The security tradeoffs in doing this are subtle.
1981This option should only be used by experts.
1982.It Cd options TCP_COMPAT_42
1983.Tn TCP
1984bug compatibility with
1985.Bx 4.2 .
1986In
1987.Bx 4.2 ,
1988.Tn TCP
1989sequence numbers were 32-bit signed values.
1990Modern implementations of TCP use unsigned values.
1991This option clamps the initial sequence number to start in
1992the range 2^31 rather than the full unsigned range of 2^32.
1993Also, under
1994.Bx 4.2 ,
1995keepalive packets must contain at least one byte or else
1996the remote end would not respond.
1997.It Cd options TCP_DEBUG
1998Record the last
1999.Em TCP_NDEBUG
2000TCP packets with SO_DEBUG set, and decode to the console if
2001.Em tcpconsdebug
2002is set.
2003.It Cd options TCP_NDEBUG
2004Number of packets to record for
2005.Em TCP_DEBUG .
2006Defaults to 100.
2007.It Cd options TCP_SENDSPACE=value
2008.It Cd options TCP_RECVSPACE=value
2009These options set the max TCP window size to other sizes than the default.
2010The TCP window sizes can be altered via
2011.Xr sysctl 8
2012as well.
2013.It Cd options TCP_INIT_WIN=value
2014This option sets the initial TCP window size for non-local connections,
2015which is used when the transmission starts.
2016The default size is 1, but if the machine should act more aggressively,
2017the initial size can be set to some other value.
2018The initial TCP window size can be set via
2019.Xr sysctl 8
2020as well.
2021.It Cd options TCP_SIGNATURE
2022Enable MD5 TCP signatures (RFC 2385) to protect BGP sessions.
2023.It Cd options IPFILTER_LOG
2024This option, in conjunction with
2025.Em pseudo-device ipfilter ,
2026enables logging of IP packets using IP-Filter.
2027.It Cd options IPFILTER_LOOKUP
2028This option enables the
2029IP-Filter
2030.Xr ippool 8
2031functionality to be enabled.
2032.It Cd options IPFILTER_COMPAT
2033This option enables older IP-Filter binaries to work.
2034.It Cd options IPFILTER_DEFAULT_BLOCK
2035This option sets the default policy of IP-Filter.
2036If it is set, IP-Filter will block packets by default.
2037.It Cd options BRIDGE_IPF
2038This option causes
2039.Em bridge
2040devices to use the IP and/or IPv6 filtering hooks, forming
2041a link-layer filter that uses protocol-layer rules.
2042This option assumes the presence of
2043.Em pseudo-device ipfilter .
2044.It Cd options MBUFTRACE
2045This option can help track down mbuf leaks.
2046When enabled, mbufs are tagged with the devices and protocols using them,
2047which slightly decreases network performance.
2048This additional information can be viewed with
2049.Xr netstat 1 :
2050.Dl Ic netstat Fl mssv
2051Not all devices or protocols support this option.
2052.El
2053.Ss Sysctl Related Options
2054.Bl -ohang
2055.It Cd options SYSCTL_DISALLOW_CREATE
2056Disallows the creation or deletion of nodes from the sysctl tree, as
2057well as the assigning of descriptions to nodes that lack them, by any
2058process.
2059These operations are still available to kernel sub-systems, including
2060loadable kernel modules.
2061.It Cd options SYSCTL_DISALLOW_KWRITE
2062Prevents processes from adding nodes to the sysctl tree that make
2063existing kernel memory areas writable.
2064Sections of kernel memory can still be read and new nodes that own
2065their own data may still be writable.
2066.It Cd options SYSCTL_DEBUG_SETUP
2067Causes the SYSCTL_SETUP routines to print a brief message when they
2068are invoked.
2069This is merely meant as an aid in determining the order in which
2070sections of the tree are created.
2071.It Cd options SYSCTL_DEBUG_CREATE
2072Prints a message each time
2073.Fn sysctl_create ,
2074the function that adds nodes to the tree, is called.
2075.It Cd options SYSCTL_INCLUDE_DESCR
2076Causes the kernel to include short, human readable descriptions for
2077nodes in the sysctl tree.
2078The descriptions can be retrieved programmatically (see
2079.Xr sysctl 3 ) ,
2080or by the sysctl binary itself (see
2081.Xr sysctl 8 ) .
2082The descriptions are meant to give an indication of the purpose and/or
2083effects of a given node's value, not replace the documentation for the
2084given subsystem as a whole.
2085.El
2086.Ss System V IPC Options
2087.Bl -ohang
2088.It Cd options SYSVMSG
2089Includes support for
2090.At V
2091style message queues.
2092See
2093.Xr msgctl 2 ,
2094.Xr msgget 2 ,
2095.Xr msgrcv 2 ,
2096.Xr msgsnd 2 .
2097.It Cd options SYSVSEM
2098Includes support for
2099.At V
2100style semaphores.
2101See
2102.Xr semctl 2 ,
2103.Xr semget 2 ,
2104.Xr semop 2 .
2105.It Cd options SEMMNI=value
2106Sets the number of
2107.At V
2108style semaphore identifiers.
2109The GENERIC config file for your port will have the default.
2110.It Cd options SEMMNS=value
2111Sets the number of
2112.At V
2113style semaphores in the system.
2114The GENERIC config file for your port will have the default.
2115.It Cd options SEMUME=value
2116Sets the maximum number of undo entries per process for
2117.At V
2118style semaphores.
2119The GENERIC config file for your port will have the default.
2120.It Cd options SEMMNU=value
2121Sets the number of undo structures in the system for
2122.At V
2123style semaphores.
2124The GENERIC config file for your port will have the default.
2125.It Cd options SYSVSHM
2126Includes support for
2127.At V
2128style shared memory.
2129See
2130.Xr shmat 2 ,
2131.Xr shmctl 2 ,
2132.Xr shmdt 2 ,
2133.Xr shmget 2 .
2134.It Cd options SHMMAXPGS=value
2135Sets the maximum number of
2136.At V
2137style shared memory pages that are available through the
2138.Xr shmget 2
2139system call.
2140Default value is 1024 on most ports.
2141See
2142.Pa /usr/include/machine/vmparam.h
2143for the default.
2144.El
2145.Ss VM Related Options
2146.Bl -ohang
2147.It Cd options NMBCLUSTERS=value
2148The number of mbuf clusters the kernel supports.
2149Mbuf clusters are MCLBYTES in size (usually 2k).
2150This is used to compute the size of the kernel VM map
2151.Em mb_map ,
2152which maps mbuf clusters.
2153Default on most ports is 1024 (2048 with
2154.Dq options GATEWAY
2155).
2156See
2157.Pa /usr/include/machine/param.h
2158for exact default information.
2159Increase this value if you get
2160.Dq mclpool limit reached
2161messages.
2162.It Cd options NKMEMPAGES=value
2163.It Cd options NKMEMPAGES_MIN=value
2164.It Cd options NKMEMPAGES_MAX=value
2165Size of kernel VM map
2166.Em kmem_map ,
2167in PAGE_SIZE-sized chunks (the VM page size; this value may be read
2168from the
2169.Xr sysctl 8
2170variable
2171.Em hw.pagesize
2172).
2173This VM map is used to map the kernel malloc arena.
2174The kernel attempts to auto-size this map based on the amount of
2175physical memory in the system.
2176Platform-specific code may place bounds on this computed size,
2177which may be viewed with the
2178.Xr sysctl 8
2179variable
2180.Em vm.nkmempages .
2181See
2182.Pa /usr/include/machine/param.h
2183for the default upper and lower bounds.
2184The related options
2185.Sq NKMEMPAGES_MIN
2186and
2187.Sq NKMEMPAGES_MAX
2188allow the bounds to be overridden in the kernel configuration file.
2189These options are provided in the event the computed value is
2190insufficient resulting in an
2191.Dq out of space in kmem_map
2192panic.
2193.It Cd options SB_MAX=value
2194Sets the max size in bytes that a socket buffer is allowed to occupy.
2195The default is 256k, but sometimes it needs to be increased, for example
2196when using large TCP windows.
2197This option can be changed via
2198.Xr sysctl 8
2199as well.
2200.It Cd options SOMAXKVA=value
2201Sets the maximum size of kernel virtual memory that the socket buffers
2202are allowed to use.
2203The default is 16MB, but in situations where for example large TCP
2204windows are used this value must also be increased.
2205This option can be changed via
2206.Xr sysctl 8
2207as well.
2208.It Cd options BUFCACHE=value
2209Size of the buffer cache as a percentage of total available
2210.Tn RAM .
2211Ignored if BUFPAGES is also specified.
2212.It Cd options NBUF=value
2213Sets the number of buffer headers available, i.e., the number of
2214open files that may have a buffer cache entry.
2215Each buffer header
2216requires MAXBSIZE (machine dependent, but usually 65536) bytes.
2217The default value is machine dependent, but is usually equal to the
2218value of BUFPAGES.
2219.It Cd options BUFPAGES=value
2220These options set the number of pages available for the buffer cache.
2221Their default value is a machine dependent value, often calculated as
2222between 5% and 10% of total available
2223.Tn RAM .
2224.It Cd options MAXTSIZ=bytes
2225Sets the maximum size limit of a process' text segment.
2226See
2227.Pa /usr/include/machine/vmparam.h
2228for the port-specific default.
2229.It Cd options DFLDSIZ=bytes
2230Sets the default size limit of a process' data segment, the value that
2231will be returned as the soft limit for
2232.Dv RLIMIT_DATA
2233(as returned by
2234.Xr getrlimit 2 ) .
2235See
2236.Pa /usr/include/machine/vmparam.h
2237for the port-specific default.
2238.It Cd options MAXDSIZ=bytes
2239Sets the maximum size limit of a process' data segment, the value that
2240will be returned as the hard limit for
2241.Dv RLIMIT_DATA
2242(as returned by
2243.Xr getrlimit 2 ) .
2244See
2245.Pa /usr/include/machine/vmparam.h
2246for the port-specific default.
2247.It Cd options DFLSSIZ=bytes
2248Sets the default size limit of a process' stack segment, the value that
2249will be returned as the soft limit for
2250.Dv RLIMIT_STACK
2251(as returned by
2252.Xr getrlimit 2 ) .
2253See
2254.Pa /usr/include/machine/vmparam.h
2255for the port-specific default.
2256.It Cd options MAXSSIZ=bytes
2257Sets the maximum size limit of a process' stack segment, the value that
2258will be returned as the hard limit for
2259.Dv RLIMIT_STACK
2260(as returned by
2261.Xr getrlimit 2 ) .
2262See
2263.Pa /usr/include/machine/vmparam.h
2264for the port-specific default.
2265.It Cd options DUMP_ON_PANIC=integer
2266Defaults to one.
2267If set to zero, the kernel will not dump to the dump device when
2268it panics, though dumps can still be forced via
2269.Xr ddb 4
2270with the
2271.Dq sync
2272command.
2273Note that this sets the value of the
2274.Em kern.dump_on_panic
2275.Xr sysctl 3
2276variable which may be changed at run time -- see
2277.Xr sysctl 8
2278for details.
2279.It Cd options USE_TOPDOWN_VM
2280User space memory allocations (as made by
2281.Xr mmap 2 )
2282will be arranged in a
2283.Dq top down
2284fashion instead of the traditional
2285.Dq upwards from MAXDSIZ \&+ vm_daddr
2286method.
2287This includes the placement of
2288.Xr ld.so 1 .
2289Arranging memory in this manner allows either (or both of) the heap or
2290.Xr mmap 2
2291allocated space to grow larger than traditionally possible.
2292This option is not available on all ports, but is instead expected to be
2293offered on a port-by-port basis, after which some ports will commit to
2294using it by default.
2295See the files
2296.Pa /usr/include/uvm/uvm_param.h
2297for some implementation details, and
2298.Pa /usr/include/machine/vmparam.h
2299for port specific details including availability.
2300.It Cd options VMSWAP
2301Enable paging device/file support.
2302This option is on by default.
2303.It Cd options PDPOLICY_CLOCKPRO
2304Use CLOCK-Pro, an alternative page replace policy.
2305.El
2306.Ss Security Options
2307.Bl -ohang
2308.It Cd options INSECURE
2309Initializes the kernel security level with \-1 instead of 0.
2310This means that the system always starts in secure level \-1 mode, even when
2311running multiuser, unless the securelevel variable is set to value > \-1 in
2312.Pa /etc/rc.conf .
2313In this case the kernel security level will be raised to that value when the
2314.Pa /etc/rc.d/securelevel
2315script is run during system startup.
2316See the manual page for
2317.Xr init 8
2318for details on the implications of this.
2319The kernel secure level may manipulated by the superuser by altering the
2320.Em kern.securelevel
2321.Xr sysctl 3
2322variable (the secure level may only be lowered by a call from process ID 1,
2323i.e.,
2324.Xr init 8 ) .
2325See also
2326.Xr secmodel_securelevel 9 ,
2327.Xr sysctl 8
2328and
2329.Xr sysctl 3 .
2330.It Cd options VERIFIED_EXEC_FP_MD5
2331Enables support for MD5 hashes in Veriexec.
2332.It Cd options VERIFIED_EXEC_FP_SHA1
2333Enables support for SHA1 hashes in Veriexec.
2334.It Cd options VERIFIED_EXEC_FP_RMD160
2335Enables support for RMD160 hashes in Veriexec.
2336.It Cd options VERIFIED_EXEC_FP_SHA256
2337Enables support for SHA256 hashes in Veriexec.
2338.It Cd options VERIFIED_EXEC_FP_SHA384
2339Enables support for SHA384 hashes in Veriexec.
2340.It Cd options VERIFIED_EXEC_FP_SHA512
2341Enables support for SHA512 hashes in Veriexec.
2342.It Cd options PAX_MPROTECT=value
2343Enables PaX MPROTECT,
2344.Xr mprotect 2
2345restrictions from the PaX project.
2346.Pp
2347The
2348.Ar value
2349is the default value for the
2350.Em global
2351knob, see
2352.Xr sysctl 3 .
2353If 0, PaX MPROTECT will be enabled only if explicitly set on programs
2354using
2355.Xr paxctl 8 .
2356If 1, PaX MPROTECT will be enabled for all programs.
2357Programs can be exempted using
2358.Xr paxctl 8 .
2359.Pp
2360See
2361.Xr security 7
2362for more details.
2363.It Cd options PAX_SEGVGUARD=value
2364Enables PaX Segvguard.
2365Requires
2366.Cd options FILEASSOC .
2367.Pp
2368The
2369.Ar value
2370is the default value for the
2371.Em global
2372knob, see
2373.Xr sysctl 3 .
2374If 0, PaX Segvguard will be enabled only if explicitly set on programs
2375using
2376.Xr paxctl 8 .
2377If 1, PaX Segvguard will be enabled to all programs, and exemption can
2378be done using
2379.Xr paxctl 8 .
2380.Pp
2381See
2382.Xr security 7
2383for more details.
2384.It Cd options PAX_ASLR=value
2385Enables PaX ASLR.
2386.Pp
2387The
2388.Ar value
2389is the default value for the
2390.Em global
2391knob, see
2392.Xr sysctl 3 .
2393If 0, PaX ASLR will be enabled only if explicitly set on programs
2394using
2395.Xr paxctl 8 .
2396If 1, PaX ASLR will be enabled to all programs, and exemption can
2397be done using
2398.Xr paxctl 8 .
2399.Pp
2400See
2401.Xr security 7
2402for more details.
2403.It Cd options USER_VA0_DISABLE_DEFAULT=value
2404Sets the initial value of the flag which controls whether user programs
2405can map virtual address 0.
2406The flag can be changed at runtime by
2407.Xr sysctl 3 .
2408.El
2409.Ss amiga-specific Options
2410.Bl -ohang
2411.It Cd options BB060STUPIDROM
2412When the bootloader (which passes
2413.Tn AmigaOS
2414.Tn ROM
2415information) claims we have a 68060
2416.Tn CPU
2417without
2418.Tn FPU ,
2419go look into the Processor Configuration Register (PCR) to find out.
2420You need this with
2421.Tn Amiga
2422.Tn ROM Ns s
2423up to (at least) V40.xxx (OS3.1),
2424when you boot via the bootblocks and don't have a DraCo.
2425.It Cd options IOBZCLOCK=frequency
2426The IOBlix boards come with two different serial master clocks: older ones
2427use 24 MHz, newer ones use 22.1184 MHz.
2428The driver normally assumes the latter.
2429If your board uses 24 MHz, you can recompile your kernel with
2430options IOBZCLOCK=24000000
2431or patch the kernel variable
2432.Tn iobzclock
2433to the same value.
2434.It Cd options LIMITMEM=value
2435If there, limit the part of the first memory bank used by
2436.Nx
2437to value megabytes.
2438Default is unlimited.
2439.It Cd options P5PPC68KBOARD
2440Add special support for Phase5 mixed 68k+PPC boards.
2441Currently, this only affects rebooting from
2442.Nx
2443and is only needed on 68040+PPC, not on
244468060+PPC; without this, affected machines will hang after
2445.Nx
2446has shut
2447down and will only restart after a keyboard reset or a power cycle.
2448.El
2449.Ss atari-specific Options
2450.Bl -ohang
2451.It Cd options DISKLABEL_AHDI
2452Include support for AHDI (native Atari) disklabels.
2453.It Cd options DISKLABEL_NBDA
2454Include support for
2455.Nx Ns Tn /atari
2456labels.
2457If you don't set this option, it will be set automatically.
2458.Nx Ns Tn /atari
2459will not work without it.
2460.It Cd options FALCON_SCSI
2461Include support for the 5380-SCSI configuration as found on the Falcon.
2462.It Cd options RELOC_KERNEL
2463If set, the kernel will relocate itself to TT-RAM, if possible.
2464This will give you a slightly faster system.
2465.Em Beware
2466that on some TT030 systems,
2467the system will frequently dump with MMU-faults with this option enabled.
2468.It Cd options SERCONSOLE
2469Allow the modem1-port to act as the system-console.
2470A carrier should be active on modem1 during system boot to active
2471the console functionality.
2472.It Cd options TT_SCSI
2473Include support for the 5380-SCSI configuration as found on the TT030
2474and Hades.
2475.El
2476.Ss i386-specific Options
2477.Bl -ohang
2478.It Cd options CPURESET_DELAY=value
2479Specifies the time (in millisecond) to wait before doing a hardware reset
2480in the last phase of a reboot.
2481This gives the user a chance to see error messages from the shutdown
2482operations (like NFS unmounts, buffer cache flush, etc ...).
2483Setting this to 0 will disable the delay.
2484Default is 2 seconds.
2485.It Cd options VM86
2486Include support for virtual 8086 mode, used by
2487.Tn DOS
2488emulators and X servers to run BIOS code, e.g., for some VESA routines.
2489.It Cd options USER_LDT
2490Include i386-specific system calls for modifying the local descriptor table,
2491used by Windows emulators.
2492.It Cd options PAE
2493Enable
2494.Tn PAE (Physical Address Extension)
2495mode.
2496.Tn PAE
2497permits up to 36 bits physical addressing (64GB of physical memory), and
2498turns physical addresses to 64 bits entities in the memory management
2499subsystem.
2500Userland virtual address space remains at 32 bits (4GB).
2501.Tn PAE
2502mode is required to enable the
2503.Tn NX/XD (No-eXecute/eXecute Disable)
2504bit for pages, which allows marking certain ones as not being executable.
2505Any attempt to execute code from such a page will raise an exception.
2506.It Cd options REALBASEMEM=integer
2507Overrides the base memory size passed in from the boot block.
2508(Value given in kilobytes.)
2509Use this option only if the boot block reports the size incorrectly.
2510(Note that some
2511.Tn BIOS Ns es
2512put the extended
2513.Tn BIOS
2514data area at the top of base memory, and therefore report a smaller
2515base memory size to prevent programs overwriting it.
2516This is correct behavior, and you should not use the
2517.Em REALBASEMEM
2518option to access this memory).
2519.It Cd options REALEXTMEM=integer
2520Overrides the extended memory size passed in from the boot block.
2521(Value given in kilobytes.
2522Extended memory does not include the first megabyte.)
2523Use this option only if the boot block reports the size incorrectly.
2524.It Cd options CYRIX_CACHE_WORKS
2525Relevant only to the Cyrix 486DLC CPU.
2526This option is used to turn on the cache in hold-flush mode.
2527It is not turned on by default because it is known to have problems in
2528certain motherboard implementations.
2529.It Cd options CYRIX_CACHE_REALLY_WORKS
2530Relevant only to the Cyrix 486DLC CPU.
2531This option is used to turn on the cache in write-back mode.
2532It is not turned on by default because it is known to have problems in
2533certain motherboard implementations.
2534In order for this option to take effect, option
2535.Em CYRIX_CACHE_WORKS
2536must also be specified.
2537.It Cd options PCIBIOS
2538Enable support for initializing the
2539.Tn PCI
2540bus using information from the
2541.Tn BIOS .
2542See
2543.Xr pcibios 4
2544for details.
2545.It Cd options MTRR
2546Include support for accessing MTRR registers from user-space.
2547See
2548.Xr i386_get_mtrr 2 .
2549.It Cd options BEEP_ONHALT
2550Make the system speaker emit several beeps when it is completely safe to
2551power down the computer after a
2552.Xr halt 8
2553command.
2554Requires
2555.Xr sysbeep 4
2556support.
2557.It Cd options BEEP_ONHALT_COUNT=times
2558Number of times to beep the speaker when
2559.Cd options BEEP_ONHALT
2560is enabled.
2561Defaults to 3.
2562.It Cd options BEEP_ONHALT_PITCH=hz
2563The tone frequency used when
2564.Cd options BEEP_ONHALT
2565option, in hertz.
2566Defaults to 1500.
2567.It Cd options BEEP_ONHALT_PERIOD=msecs
2568The duration of each beep when
2569.Cd options BEEP_ONHALT
2570is enabled, in milliseconds.
2571Defaults to 250.
2572.It Cd options MULTIBOOT
2573Makes the kernel Multiboot-compliant, allowing it to be booted through
2574a Multiboot-compliant boot manager such as GRUB.
2575See
2576.Xr multiboot 8
2577for more information.
2578.It Cd options SPLASHSCREEN
2579Display a splash screen during boot.
2580.It Cd options SPLASHSCREEN_PROGRESS
2581Display a progress bar at the splash screen during boot.
2582This option requires
2583.Em SPLASHSCREEN .
2584.El
2585.Ss isa-specific Options
2586Options specific to
2587.Xr isa 4
2588busses.
2589.Bl -ohang
2590.It Cd options PCIC_ISA_ALLOC_IOBASE=address, PCIC_ISA_ALLOC_IOSIZE=size
2591Control the section of IO bus space used for PCMCIA bus space mapping.
2592Ideally the probed defaults are satisfactory, however in practice
2593that is not always the case.
2594See
2595.Xr pcmcia 4
2596for details.
2597.It Cd options PCIC_ISA_INTR_ALLOC_MASK=mask
2598Controls the allowable interrupts that may be used for
2599.Tn PCMCIA
2600devices.
2601This mask is a logical-or of power-of-2s of allowable interrupts:
2602.Bd -literal -offset 04n
2603.Em "IRQ Val      IRQ Val      IRQ Val       IRQ Val"
2604 0  0x0001    4  0x0010    8  0x0100    12  0x1000
2605 1  0x0002    5  0x0020    9  0x0200    13  0x2000
2606 2  0x0004    6  0x0040   10  0x0400    14  0x4000
2607 3  0x0008    7  0x0080   11  0x0800    15  0x8000
2608.Ed
2609.It Cd options PCKBC_CNATTACH_SELFTEST
2610Perform a self test of the keyboard controller before attaching it as a
2611console.
2612This might be necessary on machines where we boot on cold iron, and
2613pckbc refuses to talk until we request a self test.
2614Currently only the netwinder port uses it.
2615.It Cd options PCKBD_CNATTACH_MAY_FAIL
2616If this option is set the PS/2 keyboard will not be used as the console
2617if it cannot be found during boot.
2618This allows other keyboards, like USB, to be the console keyboard.
2619.It Cd options PCKBD_LAYOUT=layout
2620Sets the default keyboard layout, see
2621.Xr pckbd 4 .
2622.El
2623.Ss m68k-specific Options
2624.Bl -ohang
2625.It Cd options FPU_EMULATE
2626Include support for MC68881/MC68882 emulator.
2627.It Cd options FPSP
2628Include support for 68040 floating point.
2629.It Cd options M68020,M68030,M68040,M68060
2630Include support for a specific
2631.Tn CPU ,
2632at least one (the one you are using) should be specified.
2633.It Cd options M060SP
2634Include software support for 68060.
2635This provides emulation of unimplemented
2636integer instructions as well as emulation of unimplemented floating point
2637instructions and data types and software support for floating point traps.
2638.El
2639.Ss powerpc-specific Options (OEA Only)
2640.Bl -ohang
2641.It Cd options PMAP_MEMLIMIT=value
2642Limit the amount of memory seen by the kernel to
2643.Ar value
2644bytes.
2645.It Cd options PTEGCOUNT=value
2646Specify the size of the page table as
2647.Ar value
2648PTE groups.
2649Normally, one PTEG is allocated per physical page frame.
2650.El
2651.Ss sparc-specific Options
2652.Bl -ohang
2653.It Cd options AUDIO_DEBUG
2654Enable simple event debugging of the logging of the
2655.Xr audio 4
2656device.
2657.It Cd options BLINK
2658Enable blinking of LED.
2659Blink rate is full cycle every N seconds for
2660N \*[Lt] then current load average.
2661See
2662.Xr getloadavg 3 .
2663.\" .It Cd options COLORFONT_CACHE
2664.\" What does this do?
2665.It Cd options COUNT_SW_LEFTOVERS
2666Count how many times the sw SCSI device has left 3, 2, 1 and 0 in the
2667sw_3_leftover, sw_2_leftover, sw_1_leftover, and sw_0_leftover
2668variables accessible from
2669.Xr ddb 4 .
2670See
2671.Xr sw 4 .
2672.It Cd options DEBUG_ALIGN
2673Adds debugging messages calls when user-requested alignment fault
2674handling happens.
2675.It Cd options DEBUG_EMUL
2676Adds debugging messages calls for emulated floating point and
2677alignment fixing operations.
2678.It Cd options DEBUG_SVR4
2679Prints registers messages calls for emulated SVR4 getcontext and
2680setcontext operations.
2681See
2682.Em options COMPAT_SVR4 .
2683.It Cd options EXTREME_DEBUG
2684Adds debugging functions callable from
2685.Xr ddb 4 .
2686The debug_pagetables, test_region and print_fe_map
2687functions print information about page tables for the SUN4M
2688platforms only.
2689.It Cd options EXTREME_EXTREME_DEBUG
2690Adds extra info to
2691.Em options EXTREME_DEBUG .
2692.It Cd options FPU_CONTEXT
2693Make
2694.Em options COMPAT_SVR4
2695getcontext and setcontext include floating point registers.
2696.It Cd options MAGMA_DEBUG
2697Adds debugging messages to the
2698.Xr magma 4
2699device.
2700.It Cd options RASTERCONS_FULLSCREEN
2701Use the entire screen for the console.
2702.It Cd options RASTERCONS_SMALLFONT
2703Use the Fixed font on the console, instead of the normal font.
2704.It Cd options SUN4
2705Support sun4 class machines.
2706.It Cd options SUN4C
2707Support sun4c class machines.
2708.It Cd options SUN4M
2709Support sun4m class machines.
2710.It Cd options SUN4_MMU3L
2711.\" XXX ???
2712Enable support for sun4 3-level MMU machines.
2713.It Cd options V9
2714Enable SPARC V9 assembler in
2715.Xr ddb 4 .
2716.El
2717.Ss sparc64-specific Options
2718.Bl -ohang
2719.It Cd options AUDIO_DEBUG
2720Enable simple event debugging of the logging of the
2721.Xr audio 4
2722device.
2723.It Cd options BLINK
2724Enable blinking of LED.
2725Blink rate is full cycle every N seconds for
2726N \*[Lt] then current load average.
2727See
2728.Xr getloadavg 3 .
2729.El
2730.Ss x68k-specific Options
2731.Bl -ohang
2732.It Cd options EXTENDED_MEMORY
2733Include support for extended memory, e.g., TS-6BE16 and 060turbo on-board.
2734.It Cd options JUPITER
2735Include support for Jupiter-X MPU accelerator
2736.It Cd options ZSCONSOLE,ZSCN_SPEED=value
2737Use the built-in serial port as the system-console.
2738Speed is specified in bps, defaults to 9600.
2739.It Cd options ITE_KERNEL_ATTR=value
2740Set the kernel message attribute for ITE.
2741Value, an integer, is a logical or of the following values:
2742.Bl -tag -width 4n -compact -offset indent
2743.It 1
2744color inversed
2745.It 2
2746underlined
2747.It 4
2748bolded
2749.El
2750.El
2751.\" The following requests should be uncommented and used where appropriate.
2752.\" .Sh FILES
2753.\" .Sh EXAMPLES
2754.Sh SEE ALSO
2755.Xr config 1 ,
2756.Xr gdb 1 ,
2757.Xr ktrace 1 ,
2758.Xr pmc 1 ,
2759.Xr quota 1 ,
2760.Xr vndcompress 1 ,
2761.Xr gettimeofday 2 ,
2762.Xr i386_get_mtrr 2 ,
2763.Xr i386_iopl 2 ,
2764.Xr msgctl 2 ,
2765.Xr msgget 2 ,
2766.Xr msgrcv 2 ,
2767.Xr msgsnd 2 ,
2768.Xr ntp_adjtime 2 ,
2769.Xr ntp_gettime 2 ,
2770.Xr reboot 2 ,
2771.Xr semctl 2 ,
2772.Xr semget 2 ,
2773.Xr semop 2 ,
2774.Xr shmat 2 ,
2775.Xr shmctl 2 ,
2776.Xr shmdt 2 ,
2777.Xr shmget 2 ,
2778.Xr sysctl 3 ,
2779.Xr apm 4 ,
2780.Xr ddb 4 ,
2781.Xr inet 4 ,
2782.Xr iso 4 ,
2783.Xr md 4 ,
2784.Xr pcibios 4 ,
2785.Xr pcmcia 4 ,
2786.Xr ppp 4 ,
2787.Xr userconf 4 ,
2788.Xr vnd 4 ,
2789.Xr wscons 4 ,
2790.Xr config 5 ,
2791.Xr edquota 8 ,
2792.Xr init 8 ,
2793.Xr mdsetimage 8 ,
2794.Xr mount_cd9660 8 ,
2795.Xr mount_fdesc 8 ,
2796.Xr mount_kernfs 8 ,
2797.Xr mount_lfs 8 ,
2798.Xr mount_mfs 8 ,
2799.Xr mount_msdos 8 ,
2800.Xr mount_nfs 8 ,
2801.Xr mount_ntfs 8 ,
2802.Xr mount_null 8 ,
2803.Xr mount_portal 8 ,
2804.Xr mount_procfs 8 ,
2805.Xr mount_udf 8 ,
2806.Xr mount_umap 8 ,
2807.Xr mount_union 8 ,
2808.Xr mrouted 8 ,
2809.Xr newfs_lfs 8 ,
2810.Xr ntpd 8 ,
2811.Xr quotaon 8 ,
2812.Xr rpc.rquotad 8 ,
2813.Xr sysctl 8 ,
2814.Xr in_getifa 9 ,
2815.Xr kernhist 9
2816.Sh HISTORY
2817The
2818.Nm
2819man page first appeared in
2820.Nx 1.3 .
2821.Sh BUGS
2822The
2823.Em EON
2824option should be a pseudo-device, and is also very fragile.
2825