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