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