xref: /openbsd-src/share/man/man4/options.4 (revision 7350f337b9e3eb4461d99580e625c7ef148d107c)
1.\"	$OpenBSD: options.4,v 1.265 2019/05/05 19:06:56 jmc Exp $
2.\"	$NetBSD: options.4,v 1.21 1997/06/25 03:13:00 thorpej Exp $
3.\"
4.\" Copyright (c) 1998 Theo de Raadt
5.\" Copyright (c) 1998 Todd Miller
6.\" Copyright (c) 1998 Gene Skonicki
7.\" Copyright (c) 1996
8.\" 	Perry E. Metzger.  All rights reserved.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\" 3. All advertising materials mentioning features or use of this software
19.\"    must display the following acknowledgment:
20.\"	This product includes software developed for the NetBSD Project
21.\"	by Perry E. Metzger.
22.\" 4. The name of the author may not be used to endorse or promote products
23.\"    derived from this software without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\"
36.\"
37.Dd $Mdocdate: May 5 2019 $
38.Dt OPTIONS 4
39.Os
40.Sh NAME
41.Nm options
42.Nd kernel configuration options
43.Sh SYNOPSIS
44.Cd option ...
45.Sh DESCRIPTION
46This manual page describes a number of miscellaneous kernel
47configuration options that may be specified in a kernel config file.
48See
49.Xr config 8
50for information on how to configure and build kernels.
51.Em Note :
52options are passed to the compile process as
53.Fl D
54flags to the C compiler.
55.Sh DEBUGGING OPTIONS
56.Bl -ohang
57.It Cd makeoptions DEBUG=""
58Do not build the debug kernel
59.Pa bsd.gdb .
60Normally,
61.Pa bsd.gdb
62is built
63(in addition to the regular
64.Pa bsd
65kernel)
66and is used for debugging kernels and their crash dumps with
67.Xr gdb 1 .
68A crash dump can be debugged by starting gdb with
69.Pa bsd.gdb
70as an argument (no core file) and then using the gdb command
71.Dq target kvm COREFILE .
72.It Cd makeoptions PROF="-pg"
73The
74.Fl pg
75flag causes the kernel to be compiled with support for profiling.
76The
77.Cm option GPROF
78is required for the kernel compile to succeed.
79.It Cd option ACCOUNTING
80Adds support for the
81.Xr acct 2
82system call.
83.It Cd option DDB
84Compiles in a kernel debugger for diagnosing kernel problems.
85See
86.Xr ddb 4 .
87.It Cd option DDB_SAFE_CONSOLE
88Allows a break into the kernel debugger during boot.
89Useful when debugging problems that can cause
90.Xr init 8
91to fail.
92.It Cd option DEBUG
93Turns on miscellaneous kernel debugging.
94Since options are turned into preprocessor defines (see above),
95.Cm option DEBUG
96is equivalent to doing a
97.Em #define DEBUG
98throughout the kernel.
99Much of the kernel has
100.Em #ifdef DEBUG
101conditional debugging code.
102Note that many parts of the kernel (typically device drivers) include their own
103.Em #ifdef XXX_DEBUG
104conditionals instead.
105.It Cd option DIAGNOSTIC
106Adds code to the kernel that does internal consistency checks.
107This code will cause the kernel to panic if corruption of internal data
108structures is detected.
109.It Cd option GPROF
110Adds code to the kernel for kernel profiling with
111.Xr kgmon 8 .
112.It Cd option KTRACE
113Adds hooks for the system call tracing facility, which allows users to
114watch the system call invocation behavior of processes.
115See
116.Xr ktrace 1 .
117.It Cd option KUBSAN
118Detect undefined behavior in the kernel.
119See
120.Xr kubsan 4 .
121.It Cd option NO_PROPOLICE
122Do not compile the kernel with the ProPolice stack protection.
123See
124.Xr gcc-local 1
125for more information about ProPolice.
126.It Cd option PTRACE
127Adds hooks for the process tracing facility, allowing a process to
128control and observe another process.
129See
130.Xr ptrace 2 .
131.It Cd option SMALL_KERNEL
132Removes some features and some optimizations from the kernel to reduce the
133size of the resulting kernel binary.
134This option is used on some installation media and should not be used
135for general purpose kernels.
136.It Cd option VFSLCKDEBUG
137Turns on debugging for the Virtual File System interface.
138See
139.Xr vfs 9 .
140.It Cd option WITNESS
141Compiles in a lock checker for detecting lock order violations in the kernel.
142See
143.Xr witness 4 .
144.It Cd option WITNESS_COUNT= Ns Ar integer
145Maximum number of lock types that are tracked by
146.Xr witness 4 .
147It defaults to 1536.
148.It Cd option WITNESS_LOCKTRACE
149Enable
150.Xr witness 4
151lock stack trace saving at boot.
152The feature is disabled by default and has to be enabled by setting the
153.Va kern.witness.locktrace
154.Xr sysctl 8
155variable.
156.It Cd option WITNESS_WATCH
157Enable
158.Xr witness 4
159at boot.
160By default, the subsystem is disabled and has to be enabled at runtime
161by raising the
162.Va kern.witness.watch
163.Xr sysctl 8
164variable.
165.El
166.Sh FILE SYSTEMS
167.Bl -ohang
168.It Cd option CD9660
169Includes code for the ISO 9660 + Rock Ridge file system, which is the
170standard file system used on many CD-ROMs.
171It also supports Joliet extensions.
172See
173.Xr mount_cd9660 8 .
174.It Cd option EXT2FS
175Includes code implementing the Second Extended File System
176.Em ( EXT2FS ) ,
177commonly used on the Linux operating system.
178This option is provided here for compatibility.
179Some specific features of
180.Em EXT2FS
181like the "behavior on errors" are not implemented.
182This file system
183can't be used with
184.Li uid_t
185or
186.Li gid_t
187values greater than 65535.
188Also, the filesystem will not function correctly on architectures with
189differing byte-orders.
190That is, a big-endian machine will not be able to read an
191ext2fs filesystem created on an i386 or other little-endian machine.
192See
193.Xr mount_ext2fs 8 .
194.It Cd option FFS
195Includes code implementing the Berkeley Fast File System
196.Em ( FFS ) .
197Most machines need this if they are not running diskless.
198.It Cd option FFS2
199Includes code implementing the enhanced Fast File System
200.Em ( FFS2 ) .
201.It Cd option MFS
202Include the memory file system
203.Em ( MFS ) .
204This file system stores files in swappable memory, and produces
205notable performance improvements when it is used as the file store
206for
207.Pa /tmp
208or similar mount points.
209See
210.Xr mount_mfs 8 .
211.It Cd option MSDOSFS
212Includes support for the MS-DOS FAT file system.
213The kernel also implements the Windows 95
214extensions which permit the use of longer, mixed-case file names.
215See
216.Xr mount_msdos 8
217and
218.Xr fsck_msdos 8 .
219.It Cd option NFSCLIENT
220Include the client side of the
221.Em NFS
222(Network File System) remote file sharing protocol.
223Although the bulk of the code implementing
224.Em NFS
225is kernel based, several user level daemons are needed for it to work.
226See
227.Xr mount_nfs 8
228for details on NFS.
229.It Cd option NTFS
230Includes support for reading NTFS file systems.
231See
232.Xr mount_ntfs 8 .
233.It Cd option UDF
234Includes code for the UDF file systems typically found on DVD discs.
235See
236.Xr mount_udf 8 .
237.It Cd option TMPFS
238Includes code for the TMPFS efficient memory file system.
239See
240.Xr mount_tmpfs 8 .
241.El
242.Sh FILE SYSTEM OPTIONS
243.Bl -ohang
244.It Cd option BUFCACHEPERCENT= Ns Ar integer
245The maximum percentage of DMA-reachable physical memory the buffer cache may use.
246.It Cd option EXT2FS_SYSTEM_FLAGS
247This option changes the behavior of the APPEND and IMMUTABLE flags
248for a file on an
249.Em EXT2FS
250filesystem.
251Without this option, the superuser or owner of the file can set and clear them.
252With this option, only the superuser can set them, and they can't be cleared
253if the securelevel is greater than 0.
254See also
255.Xr chflags 1 .
256.It Cd option FFS_SOFTUPDATES
257Enables a scheme that uses partial ordering of buffer cache operations
258to allow metadata updates in FFS to happen asynchronously, increasing write
259performance significantly.
260Normally, the FFS filesystem writes metadata updates synchronously which exacts
261a performance penalty in favor of filesystem integrity.
262With soft updates, the performance of asynchronous writes is gained while
263retaining the safety of synchronous metadata updates.
264.Pp
265Soft updates must be enabled on a per-filesystem basis.
266See
267.Xr mount 8 .
268.Pp
269Processors with a small kernel address space, such as the sun4 and sun4c, do
270not have enough kernel memory to support soft updates.
271Attempts to use this option with these CPUs will cause a kernel hang or panic
272after a short period of use as the kernel will quickly run out of memory.
273This is not related to the amount of physical memory present in the
274machine \(em it is a limitation of the CPU architecture itself.
275.It Cd option FIFO
276Adds support for
277.At V
278style FIFOs (i.e.,
279.Dq named pipes ) .
280This option is recommended in almost all cases as many programs use these.
281.It Cd option NFSSERVER
282Include the server side of the
283.Em NFS
284(Network File System) remote file sharing protocol.
285Although the bulk of the code implementing
286.Em NFS
287is kernel based, several user level daemons are needed for it to
288work.
289See
290.Xr mountd 8
291and
292.Xr nfsd 8 .
293.It Cd option QUOTA
294Enables kernel support for file system quotas.
295See
296.Xr quotaon 8 ,
297.Xr edquota 8 ,
298.Xr repquota 8 ,
299and
300.Xr quota 1 .
301Note that quotas only work on
302.Dq ffs
303file systems, although
304.Xr rpc.rquotad 8
305permits them to be accessed over
306.Em NFS .
307.It Cd option UFS_DIRHASH
308This option enables using an in memory hash table to speed lookups
309in large directories.
310.El
311.Sh MISCELLANEOUS OPTIONS
312.Bl -ohang
313.It Cd option APERTURE
314Provide in-kernel support for controlling VGA framebuffer mapping
315and PCI configuration registers by user-processes
316(such as an X Window System server).
317See
318.Xr xf86 4 .
319This option is supported on the
320.Va alpha ,
321.Va amd64 ,
322.Va i386 ,
323.Va macppc ,
324and
325.Va sparc64
326architectures.
327.It Cd option BOOT_CONFIG
328Adds support for the
329.Fl c
330boot option (User Kernel Config).
331Allows modification of kernel settings (e.g., device parameters) before
332booting the system.
333See
334.Xr boot_config 8 .
335.It Cd option CRYPTO
336Enables support for the kernel cryptographic framework.
337See
338.Xr crypto 9 .
339While not IP specific, this option is usually used in conjunction with option
340.Em IPSEC .
341.It Cd option EISAVERBOSE
342Makes the boot process more verbose for EISA peripherals.
343See
344.Xr eisa 4 .
345.It Cd option KMEMSTATS
346The kernel memory allocator,
347.Xr malloc 9 ,
348will keep statistics on its performance if this option is enabled.
349.It Cd option MULTIPROCESSOR
350On those architectures that have it, this enables multiprocessor support.
351.It Cd option PCIVERBOSE
352Makes the boot process more verbose for PCI peripherals
353(vendor names and other information is printed, etc.).
354See
355.Xr pci 4 .
356.It Cd option PCMCIAVERBOSE
357Makes the boot process more verbose for PCMCIA peripherals.
358See
359.Xr pcmcia 4 .
360.It Cd option USER_PCICONF
361Enables the user level access to the PCI bus configuration space
362through ioctls on the
363.Pa /dev/pci
364device.
365It's used by
366.Xr Xorg 1
367and
368.Xr pcidump 8 .
369See
370.Xr pci 4 .
371.It Cd option UVM_SWAP_ENCRYPT
372Enables kernel support for encrypting pages that are written out to
373swap storage.
374Swap encryption prevents sensitive data from remaining
375on the disk even after the operating system has been shut down.
376This option should be turned on if cryptographic filesystems are used.
377The sysctl variable
378.Em vm.swapencrypt.enable
379controls its behaviour.
380See
381.Xr sysctl 8
382and
383.Xr sysctl 2 .
384.El
385.Sh NETWORKING OPTIONS
386.Bl -ohang
387.It Cd option ENCDEBUG
388This option permits the conditional logging of IPsec debugging information,
389and requires the
390.Em IPSEC
391option.
392Debug logging can be turned on/off through the use of the
393.Em net.inet.ip.encdebug
394sysctl variable.
395If
396.Em net.inet.ip.encdebug
397is 1, debug logging is on.
398See
399.Xr sysctl 8
400and
401.Xr sysctl 2 .
402.It Cd option INET6
403Includes support for the IPv6 protocol stack.
404See
405.Xr inet6 4 .
406.Em INET6
407enables multicast routing code as well.
408.It Cd option IPSEC
409This option enables IP security protocol support.
410See
411.Xr ipsec 4
412for more details.
413.It Cd option MROUTING
414Includes support for IP multicast routers.
415Multicast routing is controlled by the
416.Xr mrouted 8
417daemon.
418.It Cd option ND6_DEBUG
419The option sets the default value of
420.Em net.inet6.icmp6.nd6_debug
421to 1,
422for debugging IPv6 neighbor discovery protocol handling.
423See
424.Xr sysctl 2 .
425.It Cd option PIPEX
426Includes pipex in-kernel acceleration for PPPoE, L2TP or PPTP.
427See
428.Xr pipex 4 .
429.It Cd option PPP_BSDCOMP
430Enables BSD compressor for PPP connections.
431.It Cd option PPP_DEFLATE
432For use in conjunction with PPP_BSDCOMP; provides an interface to zlib for PPP
433for deflate compression/decompression.
434.It Cd option PPPOE_TERM_UNKNOWN_SESSIONS
435Send PADT to terminate open sessions before connecting.
436See
437.Xr pppoe 4 .
438.It Cd option SOCKET_SPLICE
439Enables zero-copy socket splicing in the kernel.
440See
441.Dv SO_SPLICE
442in
443.Xr setsockopt 2
444and
445.Xr sosplice 9 .
446.It Cd option TCP_ECN
447Turns on Explicit Congestion Notification (RFC 3168).
448.Em ECN
449allows intermediate routers to use the Congestion Experienced
450codepoint in the IP header as an indication of congestion, and allows
451TCP to adjust the transmission rate using this signal.
452Both communication endpoints negotiate enabling
453.Em ECN
454functionality at the TCP connection establishment.
455.It Cd option TCP_SIGNATURE
456Turns on support for the TCP MD5 Signature option (RFC 2385).
457This is used by
458Internet backbone routers to provide per-packet authentication for the TCP
459packets used to communicate BGP routing information.
460You will also need a
461routing daemon that supports this option in order to actually use it.
462.El
463.Sh OPERATION RELATED OPTIONS
464.Bl -ohang -compact
465.It Cd option BUFPAGES= Ns Ar value
466This option sets the number of pages available for the buffer cache.
467The default value is machine dependent, often calculated as
468between 5% and 10% of total available RAM.
469.Pp
470.It Cd option DST= Ns Ar value
471If
472.Ar value
473is non-zero, indicates that the hardware real-time clock device
474is one hour ahead of the offset given in
475.Sq TIMEZONE ,
476due to Daylight Saving Time (DST).
477If
478.Ar value
479is zero, the hardware real-time clock device is not in Daylight Saving Time.
480.Pp
481.It Cd option NKMEMPAGES= Ns Ar value
482.It Cd option NKMEMPAGES_MAX= Ns Ar value
483Size of kernel malloc area in PAGE_SIZE-sized logical pages.
484This area is covered by the kernel submap
485.Em kmem_map .
486The kernel attempts to auto-size this map based on the amount of
487physical memory in the system.
488Platform-specific code may place bounds on this computed size,
489which may be viewed with the
490.Xr sysctl 8
491variable
492.Em vm.nkmempages .
493See
494.Pa /usr/include/machine/param.h
495for the default upper bound.
496The related option
497.Sq NKMEMPAGES_MAX
498allows the bounds to be overridden in the kernel configuration file
499in the event the computed value is insufficient resulting in an
500.Dq out of space in kmem_map
501panic.
502.Pp
503.It Cd option \&"TIMEZONE= Ns Ar value Ns Cm \&"
504.Ar value
505indicates the time zone offset of the hardware real-time clock device,
506in minutes,
507from UTC.
508It is useful when the hardware real-time clock device is configured
509with local time,
510when dual-booting
511.Ox
512with other operating systems on a single machine.
513For instance, if the hardware real-time clock is set to Tokyo time,
514.Ar value
515should be
516.Li \&-540
517as Tokyo local time is 9 hours ahead of UTC.
518Double quotes are needed when specifying a negative
519.Ar value .
520.El
521.Sh SCSI SUBSYSTEM OPTIONS
522See
523.Xr scsi 4 .
524.Bl -ohang
525.It Cd option SCSI_DELAY= Ns Ar value
526Delay for
527.Ar value
528seconds before starting to probe the first SCSI bus.
529This can be used if a SCSI device needs extra time to get ready.
530.It Cd option SCSIDEBUG
531Enable printing of SCSI subsystem debugging info to the console.
532Each of
533.Em SCSIDEBUG_LEVEL ,
534.Em SCSIDEBUG_BUSES ,
535.Em SCSIDEBUG_TARGETS
536and
537.Em SCSIDEBUG_LUNS
538must have non-zero values for any debugging info to be printed.
539Only
540.Em SCSIDEBUG_LEVEL
541has a default value (SDEV_DB1 | SDEV_DB2) that is non-zero.
542.It Cd option SCSIDEBUG_BUSES= Ns Ar value
543Define which SCSI buses will print debug info.
544Each bit enables debugging info for the corresponding bus.
545e.g. a value of 0x1 enables debug info for bus 0.
546.It Cd option SCSIDEBUG_LEVEL= Ns Ar value
547Define which of the four levels of debugging info are printed.
548Each bit enables a level, and multiple levels are specified by setting multiple
549bits.
550.Bd -literal -offset indent
5510x0010	(SDEV_DB1) SCSI commands, errors, and data
5520x0020	(SDEV_DB2) routine flow
5530x0040	(SDEV_DB3) routine internals
5540x0080	(SDEV_DB4) miscellaneous addition debugging
555.Ed
556.Pp
557If
558.Em SCSIDEBUG_LEVEL
559is undefined, a value of 0x0030 (SDEV_DB1|SDEV_DB2) is used.
560.It Cd option SCSIDEBUG_LUNS= Ns Ar value
561Define which SCSI luns will print debug info.
562Each bit enables debugging info for the corresponding lun.
563.It Cd option SCSIDEBUG_TARGETS= Ns Ar value
564Define which SCSI targets will print debug info.
565Each bit enables debugging info for the corresponding target.
566.It Cd option SCSITERSE
567Terser SCSI error messages.
568This omits the table for decoding ASC/ASCQ info, saving about 30KB.
569.El
570.Sh SYSTEM V IPC OPTIONS
571.Bl -ohang
572.It Cd option SEMMNI= Ns Ar value
573Number of semaphore identifiers (also called semaphore handles
574and semaphore sets) available in the system.
575Default value is 10.
576The kernel allocates memory for the control structures at startup,
577so arbitrarily large values should be avoided.
578.It Cd option SEMMNS= Ns Ar value
579Maximum number of semaphores in all sets in the system.
580Default value is 60.
581.It Cd option SEMMNU= Ns Ar value
582Maximum number of semaphore undo structures in the system.
583Default value is 30.
584.It Cd option SEMUME= Ns Ar value
585Maximum number of per-process undo operation entries in the
586system.
587Semaphore undo operations are invoked by the kernel when
588.Xr semop 2
589is called with the SEM_UNDO flag and the process holding
590the semaphores terminates unexpectedly.
591Default value is 10.
592.It Cd option SHMMAXPGS= Ns Ar value
593Sets the maximum number of
594.At V
595style shared memory pages that are available through the
596.Xr shmget 2
597system call.
598Default value is 1024 on most architectures.
599See
600.Pa /usr/include/machine/vmparam.h
601for the default.
602.It Cd option SYSVMSG
603Includes support for
604.At V
605style message queues.
606See
607.Xr msgctl 2 ,
608.Xr msgget 2 ,
609.Xr msgrcv 2 ,
610.Xr msgsnd 2 .
611.It Cd option SYSVSEM
612Includes support for
613.At V
614style semaphores.
615See
616.Xr semctl 2 ,
617.Xr semget 2 ,
618.Xr semop 2 .
619.It Cd option SYSVSHM
620Includes support for
621.At V
622style shared memory.
623See
624.Xr shmat 2 ,
625.Xr shmctl 2 ,
626.Xr shmdt 2 ,
627.Xr shmget 2 .
628.El
629.Sh SEE ALSO
630.Xr intro 4 ,
631.Xr files.conf 5 ,
632.Xr config 8 ,
633.Xr sysctl 8
634.Sh HISTORY
635The
636.Nm
637man page first appeared in
638.Ox 2.3 .
639