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