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