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