Kconfig 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config DEFCONFIG_LIST
  3. string
  4. depends on !UML
  5. option defconfig_list
  6. default "/lib/modules/$(shell,uname -r)/.config"
  7. default "/etc/kernel-config"
  8. default "/boot/config-$(shell,uname -r)"
  9. default "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)"
  10. config CC_VERSION_TEXT
  11. string
  12. default "$(CC_VERSION_TEXT)"
  13. help
  14. This is used in unclear ways:
  15. - Re-run Kconfig when the compiler is updated
  16. The 'default' property references the environment variable,
  17. CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
  18. When the compiler is updated, Kconfig will be invoked.
  19. - Ensure full rebuild when the compier is updated
  20. include/linux/kconfig.h contains this option in the comment line so
  21. fixdep adds include/config/cc/version/text.h into the auto-generated
  22. dependency. When the compiler is updated, syncconfig will touch it
  23. and then every file will be rebuilt.
  24. config CC_IS_GCC
  25. def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc)
  26. config GCC_VERSION
  27. int
  28. default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC
  29. default 0
  30. config LD_VERSION
  31. int
  32. default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh)
  33. config CC_IS_CLANG
  34. def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q clang)
  35. config LD_IS_LLD
  36. def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD)
  37. config CLANG_VERSION
  38. int
  39. default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
  40. config LLD_VERSION
  41. int
  42. default $(shell,$(srctree)/scripts/lld-version.sh $(LD))
  43. config CC_CAN_LINK
  44. bool
  45. default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag)) if 64BIT
  46. default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag))
  47. config CC_CAN_LINK_STATIC
  48. bool
  49. default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT
  50. default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static)
  51. config CC_HAS_ASM_GOTO
  52. def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
  53. config CC_HAS_ASM_GOTO_OUTPUT
  54. depends on CC_HAS_ASM_GOTO
  55. def_bool $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
  56. config TOOLS_SUPPORT_RELR
  57. def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
  58. config CC_HAS_ASM_INLINE
  59. def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
  60. config CONSTRUCTORS
  61. bool
  62. depends on !UML
  63. config IRQ_WORK
  64. bool
  65. config BUILDTIME_TABLE_SORT
  66. bool
  67. config THREAD_INFO_IN_TASK
  68. bool
  69. help
  70. Select this to move thread_info off the stack into task_struct. To
  71. make this work, an arch will need to remove all thread_info fields
  72. except flags and fix any runtime bugs.
  73. One subtle change that will be needed is to use try_get_task_stack()
  74. and put_task_stack() in save_thread_stack_tsk() and get_wchan().
  75. menu "General setup"
  76. config BROKEN
  77. bool
  78. config BROKEN_ON_SMP
  79. bool
  80. depends on BROKEN || !SMP
  81. default y
  82. config INIT_ENV_ARG_LIMIT
  83. int
  84. default 32 if !UML
  85. default 128 if UML
  86. help
  87. Maximum of each of the number of arguments and environment
  88. variables passed to init from the kernel command line.
  89. config COMPILE_TEST
  90. bool "Compile also drivers which will not load"
  91. depends on HAS_IOMEM
  92. help
  93. Some drivers can be compiled on a different platform than they are
  94. intended to be run on. Despite they cannot be loaded there (or even
  95. when they load they cannot be used due to missing HW support),
  96. developers still, opposing to distributors, might want to build such
  97. drivers to compile-test them.
  98. If you are a developer and want to build everything available, say Y
  99. here. If you are a user/distributor, say N here to exclude useless
  100. drivers to be distributed.
  101. config UAPI_HEADER_TEST
  102. bool "Compile test UAPI headers"
  103. depends on HEADERS_INSTALL && CC_CAN_LINK
  104. help
  105. Compile test headers exported to user-space to ensure they are
  106. self-contained, i.e. compilable as standalone units.
  107. If you are a developer or tester and want to ensure the exported
  108. headers are self-contained, say Y here. Otherwise, choose N.
  109. config LOCALVERSION
  110. string "Local version - append to kernel release"
  111. help
  112. Append an extra string to the end of your kernel version.
  113. This will show up when you type uname, for example.
  114. The string you set here will be appended after the contents of
  115. any files with a filename matching localversion* in your
  116. object and source tree, in that order. Your total string can
  117. be a maximum of 64 characters.
  118. config LOCALVERSION_AUTO
  119. bool "Automatically append version information to the version string"
  120. default y
  121. depends on !COMPILE_TEST
  122. help
  123. This will try to automatically determine if the current tree is a
  124. release tree by looking for git tags that belong to the current
  125. top of tree revision.
  126. A string of the format -gxxxxxxxx will be added to the localversion
  127. if a git-based tree is found. The string generated by this will be
  128. appended after any matching localversion* files, and after the value
  129. set in CONFIG_LOCALVERSION.
  130. (The actual string used here is the first eight characters produced
  131. by running the command:
  132. $ git rev-parse --verify HEAD
  133. which is done within the script "scripts/setlocalversion".)
  134. config BUILD_SALT
  135. string "Build ID Salt"
  136. default ""
  137. help
  138. The build ID is used to link binaries and their debug info. Setting
  139. this option will use the value in the calculation of the build id.
  140. This is mostly useful for distributions which want to ensure the
  141. build is unique between builds. It's safe to leave the default.
  142. config HAVE_KERNEL_GZIP
  143. bool
  144. config HAVE_KERNEL_BZIP2
  145. bool
  146. config HAVE_KERNEL_LZMA
  147. bool
  148. config HAVE_KERNEL_XZ
  149. bool
  150. config HAVE_KERNEL_LZO
  151. bool
  152. config HAVE_KERNEL_LZ4
  153. bool
  154. config HAVE_KERNEL_ZSTD
  155. bool
  156. config HAVE_KERNEL_UNCOMPRESSED
  157. bool
  158. choice
  159. prompt "Kernel compression mode"
  160. default KERNEL_GZIP
  161. depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 || HAVE_KERNEL_ZSTD || HAVE_KERNEL_UNCOMPRESSED
  162. help
  163. The linux kernel is a kind of self-extracting executable.
  164. Several compression algorithms are available, which differ
  165. in efficiency, compression and decompression speed.
  166. Compression speed is only relevant when building a kernel.
  167. Decompression speed is relevant at each boot.
  168. If you have any problems with bzip2 or lzma compressed
  169. kernels, mail me (Alain Knaff) <alain@knaff.lu>. (An older
  170. version of this functionality (bzip2 only), for 2.4, was
  171. supplied by Christian Ludwig)
  172. High compression options are mostly useful for users, who
  173. are low on disk space (embedded systems), but for whom ram
  174. size matters less.
  175. If in doubt, select 'gzip'
  176. config KERNEL_GZIP
  177. bool "Gzip"
  178. depends on HAVE_KERNEL_GZIP
  179. help
  180. The old and tried gzip compression. It provides a good balance
  181. between compression ratio and decompression speed.
  182. config KERNEL_BZIP2
  183. bool "Bzip2"
  184. depends on HAVE_KERNEL_BZIP2
  185. help
  186. Its compression ratio and speed is intermediate.
  187. Decompression speed is slowest among the choices. The kernel
  188. size is about 10% smaller with bzip2, in comparison to gzip.
  189. Bzip2 uses a large amount of memory. For modern kernels you
  190. will need at least 8MB RAM or more for booting.
  191. config KERNEL_LZMA
  192. bool "LZMA"
  193. depends on HAVE_KERNEL_LZMA
  194. help
  195. This compression algorithm's ratio is best. Decompression speed
  196. is between gzip and bzip2. Compression is slowest.
  197. The kernel size is about 33% smaller with LZMA in comparison to gzip.
  198. config KERNEL_XZ
  199. bool "XZ"
  200. depends on HAVE_KERNEL_XZ
  201. help
  202. XZ uses the LZMA2 algorithm and instruction set specific
  203. BCJ filters which can improve compression ratio of executable
  204. code. The size of the kernel is about 30% smaller with XZ in
  205. comparison to gzip. On architectures for which there is a BCJ
  206. filter (i386, x86_64, ARM, IA-64, PowerPC, and SPARC), XZ
  207. will create a few percent smaller kernel than plain LZMA.
  208. The speed is about the same as with LZMA: The decompression
  209. speed of XZ is better than that of bzip2 but worse than gzip
  210. and LZO. Compression is slow.
  211. config KERNEL_LZO
  212. bool "LZO"
  213. depends on HAVE_KERNEL_LZO
  214. help
  215. Its compression ratio is the poorest among the choices. The kernel
  216. size is about 10% bigger than gzip; however its speed
  217. (both compression and decompression) is the fastest.
  218. config KERNEL_LZ4
  219. bool "LZ4"
  220. depends on HAVE_KERNEL_LZ4
  221. help
  222. LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding.
  223. A preliminary version of LZ4 de/compression tool is available at
  224. <https://code.google.com/p/lz4/>.
  225. Its compression ratio is worse than LZO. The size of the kernel
  226. is about 8% bigger than LZO. But the decompression speed is
  227. faster than LZO.
  228. config KERNEL_ZSTD
  229. bool "ZSTD"
  230. depends on HAVE_KERNEL_ZSTD
  231. help
  232. ZSTD is a compression algorithm targeting intermediate compression
  233. with fast decompression speed. It will compress better than GZIP and
  234. decompress around the same speed as LZO, but slower than LZ4. You
  235. will need at least 192 KB RAM or more for booting. The zstd command
  236. line tool is required for compression.
  237. config KERNEL_UNCOMPRESSED
  238. bool "None"
  239. depends on HAVE_KERNEL_UNCOMPRESSED
  240. help
  241. Produce uncompressed kernel image. This option is usually not what
  242. you want. It is useful for debugging the kernel in slow simulation
  243. environments, where decompressing and moving the kernel is awfully
  244. slow. This option allows early boot code to skip the decompressor
  245. and jump right at uncompressed kernel image.
  246. endchoice
  247. config DEFAULT_INIT
  248. string "Default init path"
  249. default ""
  250. help
  251. This option determines the default init for the system if no init=
  252. option is passed on the kernel command line. If the requested path is
  253. not present, we will still then move on to attempting further
  254. locations (e.g. /sbin/init, etc). If this is empty, we will just use
  255. the fallback list when init= is not passed.
  256. config DEFAULT_HOSTNAME
  257. string "Default hostname"
  258. default "(none)"
  259. help
  260. This option determines the default system hostname before userspace
  261. calls sethostname(2). The kernel traditionally uses "(none)" here,
  262. but you may wish to use a different default here to make a minimal
  263. system more usable with less configuration.
  264. #
  265. # For some reason microblaze and nios2 hard code SWAP=n. Hopefully we can
  266. # add proper SWAP support to them, in which case this can be remove.
  267. #
  268. config ARCH_NO_SWAP
  269. bool
  270. config SWAP
  271. bool "Support for paging of anonymous memory (swap)"
  272. depends on MMU && BLOCK && !ARCH_NO_SWAP
  273. default y
  274. help
  275. This option allows you to choose whether you want to have support
  276. for so called swap devices or swap files in your kernel that are
  277. used to provide more virtual memory than the actual RAM present
  278. in your computer. If unsure say Y.
  279. config SYSVIPC
  280. bool "System V IPC"
  281. help
  282. Inter Process Communication is a suite of library functions and
  283. system calls which let processes (running programs) synchronize and
  284. exchange information. It is generally considered to be a good thing,
  285. and some programs won't run unless you say Y here. In particular, if
  286. you want to run the DOS emulator dosemu under Linux (read the
  287. DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>),
  288. you'll need to say Y here.
  289. You can find documentation about IPC with "info ipc" and also in
  290. section 6.4 of the Linux Programmer's Guide, available from
  291. <http://www.tldp.org/guides.html>.
  292. config SYSVIPC_SYSCTL
  293. bool
  294. depends on SYSVIPC
  295. depends on SYSCTL
  296. default y
  297. config POSIX_MQUEUE
  298. bool "POSIX Message Queues"
  299. depends on NET
  300. help
  301. POSIX variant of message queues is a part of IPC. In POSIX message
  302. queues every message has a priority which decides about succession
  303. of receiving it by a process. If you want to compile and run
  304. programs written e.g. for Solaris with use of its POSIX message
  305. queues (functions mq_*) say Y here.
  306. POSIX message queues are visible as a filesystem called 'mqueue'
  307. and can be mounted somewhere if you want to do filesystem
  308. operations on message queues.
  309. If unsure, say Y.
  310. config POSIX_MQUEUE_SYSCTL
  311. bool
  312. depends on POSIX_MQUEUE
  313. depends on SYSCTL
  314. default y
  315. config WATCH_QUEUE
  316. bool "General notification queue"
  317. default n
  318. help
  319. This is a general notification queue for the kernel to pass events to
  320. userspace by splicing them into pipes. It can be used in conjunction
  321. with watches for key/keyring change notifications and device
  322. notifications.
  323. See Documentation/watch_queue.rst
  324. config CROSS_MEMORY_ATTACH
  325. bool "Enable process_vm_readv/writev syscalls"
  326. depends on MMU
  327. default y
  328. help
  329. Enabling this option adds the system calls process_vm_readv and
  330. process_vm_writev which allow a process with the correct privileges
  331. to directly read from or write to another process' address space.
  332. See the man page for more details.
  333. config USELIB
  334. bool "uselib syscall"
  335. def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION
  336. help
  337. This option enables the uselib syscall, a system call used in the
  338. dynamic linker from libc5 and earlier. glibc does not use this
  339. system call. If you intend to run programs built on libc5 or
  340. earlier, you may need to enable this syscall. Current systems
  341. running glibc can safely disable this.
  342. config AUDIT
  343. bool "Auditing support"
  344. depends on NET
  345. help
  346. Enable auditing infrastructure that can be used with another
  347. kernel subsystem, such as SELinux (which requires this for
  348. logging of avc messages output). System call auditing is included
  349. on architectures which support it.
  350. config HAVE_ARCH_AUDITSYSCALL
  351. bool
  352. config AUDITSYSCALL
  353. def_bool y
  354. depends on AUDIT && HAVE_ARCH_AUDITSYSCALL
  355. select FSNOTIFY
  356. source "kernel/irq/Kconfig"
  357. source "kernel/time/Kconfig"
  358. source "kernel/Kconfig.preempt"
  359. menu "CPU/Task time and stats accounting"
  360. config VIRT_CPU_ACCOUNTING
  361. bool
  362. choice
  363. prompt "Cputime accounting"
  364. default TICK_CPU_ACCOUNTING if !PPC64
  365. default VIRT_CPU_ACCOUNTING_NATIVE if PPC64
  366. # Kind of a stub config for the pure tick based cputime accounting
  367. config TICK_CPU_ACCOUNTING
  368. bool "Simple tick based cputime accounting"
  369. depends on !S390 && !NO_HZ_FULL
  370. help
  371. This is the basic tick based cputime accounting that maintains
  372. statistics about user, system and idle time spent on per jiffies
  373. granularity.
  374. If unsure, say Y.
  375. config VIRT_CPU_ACCOUNTING_NATIVE
  376. bool "Deterministic task and CPU time accounting"
  377. depends on HAVE_VIRT_CPU_ACCOUNTING && !NO_HZ_FULL
  378. select VIRT_CPU_ACCOUNTING
  379. help
  380. Select this option to enable more accurate task and CPU time
  381. accounting. This is done by reading a CPU counter on each
  382. kernel entry and exit and on transitions within the kernel
  383. between system, softirq and hardirq state, so there is a
  384. small performance impact. In the case of s390 or IBM POWER > 5,
  385. this also enables accounting of stolen time on logically-partitioned
  386. systems.
  387. config VIRT_CPU_ACCOUNTING_GEN
  388. bool "Full dynticks CPU time accounting"
  389. depends on HAVE_CONTEXT_TRACKING
  390. depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
  391. depends on GENERIC_CLOCKEVENTS
  392. select VIRT_CPU_ACCOUNTING
  393. select CONTEXT_TRACKING
  394. help
  395. Select this option to enable task and CPU time accounting on full
  396. dynticks systems. This accounting is implemented by watching every
  397. kernel-user boundaries using the context tracking subsystem.
  398. The accounting is thus performed at the expense of some significant
  399. overhead.
  400. For now this is only useful if you are working on the full
  401. dynticks subsystem development.
  402. If unsure, say N.
  403. endchoice
  404. config IRQ_TIME_ACCOUNTING
  405. bool "Fine granularity task level IRQ time accounting"
  406. depends on HAVE_IRQ_TIME_ACCOUNTING && !VIRT_CPU_ACCOUNTING_NATIVE
  407. help
  408. Select this option to enable fine granularity task irq time
  409. accounting. This is done by reading a timestamp on each
  410. transitions between softirq and hardirq state, so there can be a
  411. small performance impact.
  412. If in doubt, say N here.
  413. config HAVE_SCHED_AVG_IRQ
  414. def_bool y
  415. depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
  416. depends on SMP
  417. config SCHED_THERMAL_PRESSURE
  418. bool
  419. default y if ARM && ARM_CPU_TOPOLOGY
  420. default y if ARM64
  421. depends on SMP
  422. depends on CPU_FREQ_THERMAL
  423. help
  424. Select this option to enable thermal pressure accounting in the
  425. scheduler. Thermal pressure is the value conveyed to the scheduler
  426. that reflects the reduction in CPU compute capacity resulted from
  427. thermal throttling. Thermal throttling occurs when the performance of
  428. a CPU is capped due to high operating temperatures.
  429. If selected, the scheduler will be able to balance tasks accordingly,
  430. i.e. put less load on throttled CPUs than on non/less throttled ones.
  431. This requires the architecture to implement
  432. arch_set_thermal_pressure() and arch_get_thermal_pressure().
  433. config BSD_PROCESS_ACCT
  434. bool "BSD Process Accounting"
  435. depends on MULTIUSER
  436. help
  437. If you say Y here, a user level program will be able to instruct the
  438. kernel (via a special system call) to write process accounting
  439. information to a file: whenever a process exits, information about
  440. that process will be appended to the file by the kernel. The
  441. information includes things such as creation time, owning user,
  442. command name, memory usage, controlling terminal etc. (the complete
  443. list is in the struct acct in <file:include/linux/acct.h>). It is
  444. up to the user level program to do useful things with this
  445. information. This is generally a good idea, so say Y.
  446. config BSD_PROCESS_ACCT_V3
  447. bool "BSD Process Accounting version 3 file format"
  448. depends on BSD_PROCESS_ACCT
  449. default n
  450. help
  451. If you say Y here, the process accounting information is written
  452. in a new file format that also logs the process IDs of each
  453. process and its parent. Note that this file format is incompatible
  454. with previous v0/v1/v2 file formats, so you will need updated tools
  455. for processing it. A preliminary version of these tools is available
  456. at <http://www.gnu.org/software/acct/>.
  457. config TASKSTATS
  458. bool "Export task/process statistics through netlink"
  459. depends on NET
  460. depends on MULTIUSER
  461. default n
  462. help
  463. Export selected statistics for tasks/processes through the
  464. generic netlink interface. Unlike BSD process accounting, the
  465. statistics are available during the lifetime of tasks/processes as
  466. responses to commands. Like BSD accounting, they are sent to user
  467. space on task exit.
  468. Say N if unsure.
  469. config TASK_DELAY_ACCT
  470. bool "Enable per-task delay accounting"
  471. depends on TASKSTATS
  472. select SCHED_INFO
  473. help
  474. Collect information on time spent by a task waiting for system
  475. resources like cpu, synchronous block I/O completion and swapping
  476. in pages. Such statistics can help in setting a task's priorities
  477. relative to other tasks for cpu, io, rss limits etc.
  478. Say N if unsure.
  479. config TASK_XACCT
  480. bool "Enable extended accounting over taskstats"
  481. depends on TASKSTATS
  482. help
  483. Collect extended task accounting data and send the data
  484. to userland for processing over the taskstats interface.
  485. Say N if unsure.
  486. config TASK_IO_ACCOUNTING
  487. bool "Enable per-task storage I/O accounting"
  488. depends on TASK_XACCT
  489. help
  490. Collect information on the number of bytes of storage I/O which this
  491. task has caused.
  492. Say N if unsure.
  493. config PSI
  494. bool "Pressure stall information tracking"
  495. help
  496. Collect metrics that indicate how overcommitted the CPU, memory,
  497. and IO capacity are in the system.
  498. If you say Y here, the kernel will create /proc/pressure/ with the
  499. pressure statistics files cpu, memory, and io. These will indicate
  500. the share of walltime in which some or all tasks in the system are
  501. delayed due to contention of the respective resource.
  502. In kernels with cgroup support, cgroups (cgroup2 only) will
  503. have cpu.pressure, memory.pressure, and io.pressure files,
  504. which aggregate pressure stalls for the grouped tasks only.
  505. For more details see Documentation/accounting/psi.rst.
  506. Say N if unsure.
  507. config PSI_DEFAULT_DISABLED
  508. bool "Require boot parameter to enable pressure stall information tracking"
  509. default n
  510. depends on PSI
  511. help
  512. If set, pressure stall information tracking will be disabled
  513. per default but can be enabled through passing psi=1 on the
  514. kernel commandline during boot.
  515. This feature adds some code to the task wakeup and sleep
  516. paths of the scheduler. The overhead is too low to affect
  517. common scheduling-intense workloads in practice (such as
  518. webservers, memcache), but it does show up in artificial
  519. scheduler stress tests, such as hackbench.
  520. If you are paranoid and not sure what the kernel will be
  521. used for, say Y.
  522. Say N if unsure.
  523. endmenu # "CPU/Task time and stats accounting"
  524. config CPU_ISOLATION
  525. bool "CPU isolation"
  526. depends on SMP || COMPILE_TEST
  527. default y
  528. help
  529. Make sure that CPUs running critical tasks are not disturbed by
  530. any source of "noise" such as unbound workqueues, timers, kthreads...
  531. Unbound jobs get offloaded to housekeeping CPUs. This is driven by
  532. the "isolcpus=" boot parameter.
  533. Say Y if unsure.
  534. source "kernel/rcu/Kconfig"
  535. config BUILD_BIN2C
  536. bool
  537. default n
  538. config IKCONFIG
  539. tristate "Kernel .config support"
  540. help
  541. This option enables the complete Linux kernel ".config" file
  542. contents to be saved in the kernel. It provides documentation
  543. of which kernel options are used in a running kernel or in an
  544. on-disk kernel. This information can be extracted from the kernel
  545. image file with the script scripts/extract-ikconfig and used as
  546. input to rebuild the current kernel or to build another kernel.
  547. It can also be extracted from a running kernel by reading
  548. /proc/config.gz if enabled (below).
  549. config IKCONFIG_PROC
  550. bool "Enable access to .config through /proc/config.gz"
  551. depends on IKCONFIG && PROC_FS
  552. help
  553. This option enables access to the kernel configuration file
  554. through /proc/config.gz.
  555. config IKHEADERS
  556. tristate "Enable kernel headers through /sys/kernel/kheaders.tar.xz"
  557. depends on SYSFS
  558. help
  559. This option enables access to the in-kernel headers that are generated during
  560. the build process. These can be used to build eBPF tracing programs,
  561. or similar programs. If you build the headers as a module, a module called
  562. kheaders.ko is built which can be loaded on-demand to get access to headers.
  563. config LOG_BUF_SHIFT
  564. int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
  565. range 12 25 if !H8300
  566. range 12 19 if H8300
  567. default 17
  568. depends on PRINTK
  569. help
  570. Select the minimal kernel log buffer size as a power of 2.
  571. The final size is affected by LOG_CPU_MAX_BUF_SHIFT config
  572. parameter, see below. Any higher size also might be forced
  573. by "log_buf_len" boot parameter.
  574. Examples:
  575. 17 => 128 KB
  576. 16 => 64 KB
  577. 15 => 32 KB
  578. 14 => 16 KB
  579. 13 => 8 KB
  580. 12 => 4 KB
  581. config LOG_CPU_MAX_BUF_SHIFT
  582. int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)"
  583. depends on SMP
  584. range 0 21
  585. default 12 if !BASE_SMALL
  586. default 0 if BASE_SMALL
  587. depends on PRINTK
  588. help
  589. This option allows to increase the default ring buffer size
  590. according to the number of CPUs. The value defines the contribution
  591. of each CPU as a power of 2. The used space is typically only few
  592. lines however it might be much more when problems are reported,
  593. e.g. backtraces.
  594. The increased size means that a new buffer has to be allocated and
  595. the original static one is unused. It makes sense only on systems
  596. with more CPUs. Therefore this value is used only when the sum of
  597. contributions is greater than the half of the default kernel ring
  598. buffer as defined by LOG_BUF_SHIFT. The default values are set
  599. so that more than 16 CPUs are needed to trigger the allocation.
  600. Also this option is ignored when "log_buf_len" kernel parameter is
  601. used as it forces an exact (power of two) size of the ring buffer.
  602. The number of possible CPUs is used for this computation ignoring
  603. hotplugging making the computation optimal for the worst case
  604. scenario while allowing a simple algorithm to be used from bootup.
  605. Examples shift values and their meaning:
  606. 17 => 128 KB for each CPU
  607. 16 => 64 KB for each CPU
  608. 15 => 32 KB for each CPU
  609. 14 => 16 KB for each CPU
  610. 13 => 8 KB for each CPU
  611. 12 => 4 KB for each CPU
  612. config PRINTK_SAFE_LOG_BUF_SHIFT
  613. int "Temporary per-CPU printk log buffer size (12 => 4KB, 13 => 8KB)"
  614. range 10 21
  615. default 13
  616. depends on PRINTK
  617. help
  618. Select the size of an alternate printk per-CPU buffer where messages
  619. printed from usafe contexts are temporary stored. One example would
  620. be NMI messages, another one - printk recursion. The messages are
  621. copied to the main log buffer in a safe context to avoid a deadlock.
  622. The value defines the size as a power of 2.
  623. Those messages are rare and limited. The largest one is when
  624. a backtrace is printed. It usually fits into 4KB. Select
  625. 8KB if you want to be on the safe side.
  626. Examples:
  627. 17 => 128 KB for each CPU
  628. 16 => 64 KB for each CPU
  629. 15 => 32 KB for each CPU
  630. 14 => 16 KB for each CPU
  631. 13 => 8 KB for each CPU
  632. 12 => 4 KB for each CPU
  633. #
  634. # Architectures with an unreliable sched_clock() should select this:
  635. #
  636. config HAVE_UNSTABLE_SCHED_CLOCK
  637. bool
  638. config GENERIC_SCHED_CLOCK
  639. bool
  640. menu "Scheduler features"
  641. config UCLAMP_TASK
  642. bool "Enable utilization clamping for RT/FAIR tasks"
  643. depends on CPU_FREQ_GOV_SCHEDUTIL
  644. help
  645. This feature enables the scheduler to track the clamped utilization
  646. of each CPU based on RUNNABLE tasks scheduled on that CPU.
  647. With this option, the user can specify the min and max CPU
  648. utilization allowed for RUNNABLE tasks. The max utilization defines
  649. the maximum frequency a task should use while the min utilization
  650. defines the minimum frequency it should use.
  651. Both min and max utilization clamp values are hints to the scheduler,
  652. aiming at improving its frequency selection policy, but they do not
  653. enforce or grant any specific bandwidth for tasks.
  654. If in doubt, say N.
  655. config UCLAMP_BUCKETS_COUNT
  656. int "Number of supported utilization clamp buckets"
  657. range 5 20
  658. default 5
  659. depends on UCLAMP_TASK
  660. help
  661. Defines the number of clamp buckets to use. The range of each bucket
  662. will be SCHED_CAPACITY_SCALE/UCLAMP_BUCKETS_COUNT. The higher the
  663. number of clamp buckets the finer their granularity and the higher
  664. the precision of clamping aggregation and tracking at run-time.
  665. For example, with the minimum configuration value we will have 5
  666. clamp buckets tracking 20% utilization each. A 25% boosted tasks will
  667. be refcounted in the [20..39]% bucket and will set the bucket clamp
  668. effective value to 25%.
  669. If a second 30% boosted task should be co-scheduled on the same CPU,
  670. that task will be refcounted in the same bucket of the first task and
  671. it will boost the bucket clamp effective value to 30%.
  672. The clamp effective value of a bucket is reset to its nominal value
  673. (20% in the example above) when there are no more tasks refcounted in
  674. that bucket.
  675. An additional boost/capping margin can be added to some tasks. In the
  676. example above the 25% task will be boosted to 30% until it exits the
  677. CPU. If that should be considered not acceptable on certain systems,
  678. it's always possible to reduce the margin by increasing the number of
  679. clamp buckets to trade off used memory for run-time tracking
  680. precision.
  681. If in doubt, use the default value.
  682. endmenu
  683. #
  684. # For architectures that want to enable the support for NUMA-affine scheduler
  685. # balancing logic:
  686. #
  687. config ARCH_SUPPORTS_NUMA_BALANCING
  688. bool
  689. #
  690. # For architectures that prefer to flush all TLBs after a number of pages
  691. # are unmapped instead of sending one IPI per page to flush. The architecture
  692. # must provide guarantees on what happens if a clean TLB cache entry is
  693. # written after the unmap. Details are in mm/rmap.c near the check for
  694. # should_defer_flush. The architecture should also consider if the full flush
  695. # and the refill costs are offset by the savings of sending fewer IPIs.
  696. config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
  697. bool
  698. config CC_HAS_INT128
  699. def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
  700. #
  701. # For architectures that know their GCC __int128 support is sound
  702. #
  703. config ARCH_SUPPORTS_INT128
  704. bool
  705. # For architectures that (ab)use NUMA to represent different memory regions
  706. # all cpu-local but of different latencies, such as SuperH.
  707. #
  708. config ARCH_WANT_NUMA_VARIABLE_LOCALITY
  709. bool
  710. config NUMA_BALANCING
  711. bool "Memory placement aware NUMA scheduler"
  712. depends on ARCH_SUPPORTS_NUMA_BALANCING
  713. depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
  714. depends on SMP && NUMA && MIGRATION
  715. help
  716. This option adds support for automatic NUMA aware memory/task placement.
  717. The mechanism is quite primitive and is based on migrating memory when
  718. it has references to the node the task is running on.
  719. This system will be inactive on UMA systems.
  720. config NUMA_BALANCING_DEFAULT_ENABLED
  721. bool "Automatically enable NUMA aware memory/task placement"
  722. default y
  723. depends on NUMA_BALANCING
  724. help
  725. If set, automatic NUMA balancing will be enabled if running on a NUMA
  726. machine.
  727. menuconfig CGROUPS
  728. bool "Control Group support"
  729. select KERNFS
  730. help
  731. This option adds support for grouping sets of processes together, for
  732. use with process control subsystems such as Cpusets, CFS, memory
  733. controls or device isolation.
  734. See
  735. - Documentation/scheduler/sched-design-CFS.rst (CFS)
  736. - Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
  737. and resource control)
  738. Say N if unsure.
  739. if CGROUPS
  740. config PAGE_COUNTER
  741. bool
  742. config MEMCG
  743. bool "Memory controller"
  744. select PAGE_COUNTER
  745. select EVENTFD
  746. help
  747. Provides control over the memory footprint of tasks in a cgroup.
  748. config MEMCG_SWAP
  749. bool
  750. depends on MEMCG && SWAP
  751. default y
  752. config MEMCG_KMEM
  753. bool
  754. depends on MEMCG && !SLOB
  755. default y
  756. config BLK_CGROUP
  757. bool "IO controller"
  758. depends on BLOCK
  759. default n
  760. help
  761. Generic block IO controller cgroup interface. This is the common
  762. cgroup interface which should be used by various IO controlling
  763. policies.
  764. Currently, CFQ IO scheduler uses it to recognize task groups and
  765. control disk bandwidth allocation (proportional time slice allocation)
  766. to such task groups. It is also used by bio throttling logic in
  767. block layer to implement upper limit in IO rates on a device.
  768. This option only enables generic Block IO controller infrastructure.
  769. One needs to also enable actual IO controlling logic/policy. For
  770. enabling proportional weight division of disk bandwidth in CFQ, set
  771. CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
  772. CONFIG_BLK_DEV_THROTTLING=y.
  773. See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
  774. config CGROUP_WRITEBACK
  775. bool
  776. depends on MEMCG && BLK_CGROUP
  777. default y
  778. menuconfig CGROUP_SCHED
  779. bool "CPU controller"
  780. default n
  781. help
  782. This feature lets CPU scheduler recognize task groups and control CPU
  783. bandwidth allocation to such task groups. It uses cgroups to group
  784. tasks.
  785. if CGROUP_SCHED
  786. config FAIR_GROUP_SCHED
  787. bool "Group scheduling for SCHED_OTHER"
  788. depends on CGROUP_SCHED
  789. default CGROUP_SCHED
  790. config CFS_BANDWIDTH
  791. bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
  792. depends on FAIR_GROUP_SCHED
  793. default n
  794. help
  795. This option allows users to define CPU bandwidth rates (limits) for
  796. tasks running within the fair group scheduler. Groups with no limit
  797. set are considered to be unconstrained and will run with no
  798. restriction.
  799. See Documentation/scheduler/sched-bwc.rst for more information.
  800. config RT_GROUP_SCHED
  801. bool "Group scheduling for SCHED_RR/FIFO"
  802. depends on CGROUP_SCHED
  803. default n
  804. help
  805. This feature lets you explicitly allocate real CPU bandwidth
  806. to task groups. If enabled, it will also make it impossible to
  807. schedule realtime tasks for non-root users until you allocate
  808. realtime bandwidth for them.
  809. See Documentation/scheduler/sched-rt-group.rst for more information.
  810. endif #CGROUP_SCHED
  811. config UCLAMP_TASK_GROUP
  812. bool "Utilization clamping per group of tasks"
  813. depends on CGROUP_SCHED
  814. depends on UCLAMP_TASK
  815. default n
  816. help
  817. This feature enables the scheduler to track the clamped utilization
  818. of each CPU based on RUNNABLE tasks currently scheduled on that CPU.
  819. When this option is enabled, the user can specify a min and max
  820. CPU bandwidth which is allowed for each single task in a group.
  821. The max bandwidth allows to clamp the maximum frequency a task
  822. can use, while the min bandwidth allows to define a minimum
  823. frequency a task will always use.
  824. When task group based utilization clamping is enabled, an eventually
  825. specified task-specific clamp value is constrained by the cgroup
  826. specified clamp value. Both minimum and maximum task clamping cannot
  827. be bigger than the corresponding clamping defined at task group level.
  828. If in doubt, say N.
  829. config CGROUP_PIDS
  830. bool "PIDs controller"
  831. help
  832. Provides enforcement of process number limits in the scope of a
  833. cgroup. Any attempt to fork more processes than is allowed in the
  834. cgroup will fail. PIDs are fundamentally a global resource because it
  835. is fairly trivial to reach PID exhaustion before you reach even a
  836. conservative kmemcg limit. As a result, it is possible to grind a
  837. system to halt without being limited by other cgroup policies. The
  838. PIDs controller is designed to stop this from happening.
  839. It should be noted that organisational operations (such as attaching
  840. to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
  841. since the PIDs limit only affects a process's ability to fork, not to
  842. attach to a cgroup.
  843. config CGROUP_RDMA
  844. bool "RDMA controller"
  845. help
  846. Provides enforcement of RDMA resources defined by IB stack.
  847. It is fairly easy for consumers to exhaust RDMA resources, which
  848. can result into resource unavailability to other consumers.
  849. RDMA controller is designed to stop this from happening.
  850. Attaching processes with active RDMA resources to the cgroup
  851. hierarchy is allowed even if can cross the hierarchy's limit.
  852. config CGROUP_FREEZER
  853. bool "Freezer controller"
  854. help
  855. Provides a way to freeze and unfreeze all tasks in a
  856. cgroup.
  857. This option affects the ORIGINAL cgroup interface. The cgroup2 memory
  858. controller includes important in-kernel memory consumers per default.
  859. If you're using cgroup2, say N.
  860. config CGROUP_HUGETLB
  861. bool "HugeTLB controller"
  862. depends on HUGETLB_PAGE
  863. select PAGE_COUNTER
  864. default n
  865. help
  866. Provides a cgroup controller for HugeTLB pages.
  867. When you enable this, you can put a per cgroup limit on HugeTLB usage.
  868. The limit is enforced during page fault. Since HugeTLB doesn't
  869. support page reclaim, enforcing the limit at page fault time implies
  870. that, the application will get SIGBUS signal if it tries to access
  871. HugeTLB pages beyond its limit. This requires the application to know
  872. beforehand how much HugeTLB pages it would require for its use. The
  873. control group is tracked in the third page lru pointer. This means
  874. that we cannot use the controller with huge page less than 3 pages.
  875. config CPUSETS
  876. bool "Cpuset controller"
  877. depends on SMP
  878. help
  879. This option will let you create and manage CPUSETs which
  880. allow dynamically partitioning a system into sets of CPUs and
  881. Memory Nodes and assigning tasks to run only within those sets.
  882. This is primarily useful on large SMP or NUMA systems.
  883. Say N if unsure.
  884. config PROC_PID_CPUSET
  885. bool "Include legacy /proc/<pid>/cpuset file"
  886. depends on CPUSETS
  887. default y
  888. config CGROUP_DEVICE
  889. bool "Device controller"
  890. help
  891. Provides a cgroup controller implementing whitelists for
  892. devices which a process in the cgroup can mknod or open.
  893. config CGROUP_CPUACCT
  894. bool "Simple CPU accounting controller"
  895. help
  896. Provides a simple controller for monitoring the
  897. total CPU consumed by the tasks in a cgroup.
  898. config CGROUP_PERF
  899. bool "Perf controller"
  900. depends on PERF_EVENTS
  901. help
  902. This option extends the perf per-cpu mode to restrict monitoring
  903. to threads which belong to the cgroup specified and run on the
  904. designated cpu. Or this can be used to have cgroup ID in samples
  905. so that it can monitor performance events among cgroups.
  906. Say N if unsure.
  907. config CGROUP_BPF
  908. bool "Support for eBPF programs attached to cgroups"
  909. depends on BPF_SYSCALL
  910. select SOCK_CGROUP_DATA
  911. help
  912. Allow attaching eBPF programs to a cgroup using the bpf(2)
  913. syscall command BPF_PROG_ATTACH.
  914. In which context these programs are accessed depends on the type
  915. of attachment. For instance, programs that are attached using
  916. BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
  917. inet sockets.
  918. config CGROUP_DEBUG
  919. bool "Debug controller"
  920. default n
  921. depends on DEBUG_KERNEL
  922. help
  923. This option enables a simple controller that exports
  924. debugging information about the cgroups framework. This
  925. controller is for control cgroup debugging only. Its
  926. interfaces are not stable.
  927. Say N.
  928. config SOCK_CGROUP_DATA
  929. bool
  930. default n
  931. endif # CGROUPS
  932. menuconfig NAMESPACES
  933. bool "Namespaces support" if EXPERT
  934. depends on MULTIUSER
  935. default !EXPERT
  936. help
  937. Provides the way to make tasks work with different objects using
  938. the same id. For example same IPC id may refer to different objects
  939. or same user id or pid may refer to different tasks when used in
  940. different namespaces.
  941. if NAMESPACES
  942. config UTS_NS
  943. bool "UTS namespace"
  944. default y
  945. help
  946. In this namespace tasks see different info provided with the
  947. uname() system call
  948. config TIME_NS
  949. bool "TIME namespace"
  950. depends on GENERIC_VDSO_TIME_NS
  951. default y
  952. help
  953. In this namespace boottime and monotonic clocks can be set.
  954. The time will keep going with the same pace.
  955. config IPC_NS
  956. bool "IPC namespace"
  957. depends on (SYSVIPC || POSIX_MQUEUE)
  958. default y
  959. help
  960. In this namespace tasks work with IPC ids which correspond to
  961. different IPC objects in different namespaces.
  962. config USER_NS
  963. bool "User namespace"
  964. default n
  965. help
  966. This allows containers, i.e. vservers, to use user namespaces
  967. to provide different user info for different servers.
  968. When user namespaces are enabled in the kernel it is
  969. recommended that the MEMCG option also be enabled and that
  970. user-space use the memory control groups to limit the amount
  971. of memory a memory unprivileged users can use.
  972. If unsure, say N.
  973. config PID_NS
  974. bool "PID Namespaces"
  975. default y
  976. help
  977. Support process id namespaces. This allows having multiple
  978. processes with the same pid as long as they are in different
  979. pid namespaces. This is a building block of containers.
  980. config NET_NS
  981. bool "Network namespace"
  982. depends on NET
  983. default y
  984. help
  985. Allow user space to create what appear to be multiple instances
  986. of the network stack.
  987. endif # NAMESPACES
  988. config CHECKPOINT_RESTORE
  989. bool "Checkpoint/restore support"
  990. select PROC_CHILDREN
  991. select KCMP
  992. default n
  993. help
  994. Enables additional kernel features in a sake of checkpoint/restore.
  995. In particular it adds auxiliary prctl codes to setup process text,
  996. data and heap segment sizes, and a few additional /proc filesystem
  997. entries.
  998. If unsure, say N here.
  999. config SCHED_AUTOGROUP
  1000. bool "Automatic process group scheduling"
  1001. select CGROUPS
  1002. select CGROUP_SCHED
  1003. select FAIR_GROUP_SCHED
  1004. help
  1005. This option optimizes the scheduler for common desktop workloads by
  1006. automatically creating and populating task groups. This separation
  1007. of workloads isolates aggressive CPU burners (like build jobs) from
  1008. desktop applications. Task group autogeneration is currently based
  1009. upon task session.
  1010. config RT_SOFTINT_OPTIMIZATION
  1011. bool "Improve RT scheduling during long softint execution"
  1012. depends on ARM64
  1013. depends on SMP
  1014. default n
  1015. help
  1016. Enable an optimization which tries to avoid placing RT tasks on CPUs
  1017. occupied by nonpreemptible tasks, such as a long softint, or CPUs
  1018. which may soon block preemptions, such as a CPU running a ksoftirq
  1019. thread which handles slow softints.
  1020. config SYSFS_DEPRECATED
  1021. bool "Enable deprecated sysfs features to support old userspace tools"
  1022. depends on SYSFS
  1023. default n
  1024. help
  1025. This option adds code that switches the layout of the "block" class
  1026. devices, to not show up in /sys/class/block/, but only in
  1027. /sys/block/.
  1028. This switch is only active when the sysfs.deprecated=1 boot option is
  1029. passed or the SYSFS_DEPRECATED_V2 option is set.
  1030. This option allows new kernels to run on old distributions and tools,
  1031. which might get confused by /sys/class/block/. Since 2007/2008 all
  1032. major distributions and tools handle this just fine.
  1033. Recent distributions and userspace tools after 2009/2010 depend on
  1034. the existence of /sys/class/block/, and will not work with this
  1035. option enabled.
  1036. Only if you are using a new kernel on an old distribution, you might
  1037. need to say Y here.
  1038. config SYSFS_DEPRECATED_V2
  1039. bool "Enable deprecated sysfs features by default"
  1040. default n
  1041. depends on SYSFS
  1042. depends on SYSFS_DEPRECATED
  1043. help
  1044. Enable deprecated sysfs by default.
  1045. See the CONFIG_SYSFS_DEPRECATED option for more details about this
  1046. option.
  1047. Only if you are using a new kernel on an old distribution, you might
  1048. need to say Y here. Even then, odds are you would not need it
  1049. enabled, you can always pass the boot option if absolutely necessary.
  1050. config RELAY
  1051. bool "Kernel->user space relay support (formerly relayfs)"
  1052. select IRQ_WORK
  1053. help
  1054. This option enables support for relay interface support in
  1055. certain file systems (such as debugfs).
  1056. It is designed to provide an efficient mechanism for tools and
  1057. facilities to relay large amounts of data from kernel space to
  1058. user space.
  1059. If unsure, say N.
  1060. config BLK_DEV_INITRD
  1061. bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
  1062. help
  1063. The initial RAM filesystem is a ramfs which is loaded by the
  1064. boot loader (loadlin or lilo) and that is mounted as root
  1065. before the normal boot procedure. It is typically used to
  1066. load modules needed to mount the "real" root file system,
  1067. etc. See <file:Documentation/admin-guide/initrd.rst> for details.
  1068. If RAM disk support (BLK_DEV_RAM) is also included, this
  1069. also enables initial RAM disk (initrd) support and adds
  1070. 15 Kbytes (more on some other architectures) to the kernel size.
  1071. If unsure say Y.
  1072. if BLK_DEV_INITRD
  1073. source "usr/Kconfig"
  1074. endif
  1075. config BOOT_CONFIG
  1076. bool "Boot config support"
  1077. select BLK_DEV_INITRD
  1078. help
  1079. Extra boot config allows system admin to pass a config file as
  1080. complemental extension of kernel cmdline when booting.
  1081. The boot config file must be attached at the end of initramfs
  1082. with checksum, size and magic word.
  1083. See <file:Documentation/admin-guide/bootconfig.rst> for details.
  1084. If unsure, say Y.
  1085. choice
  1086. prompt "Compiler optimization level"
  1087. default CC_OPTIMIZE_FOR_PERFORMANCE
  1088. config CC_OPTIMIZE_FOR_PERFORMANCE
  1089. bool "Optimize for performance (-O2)"
  1090. help
  1091. This is the default optimization level for the kernel, building
  1092. with the "-O2" compiler flag for best performance and most
  1093. helpful compile-time warnings.
  1094. config CC_OPTIMIZE_FOR_PERFORMANCE_O3
  1095. bool "Optimize more for performance (-O3)"
  1096. depends on ARC
  1097. help
  1098. Choosing this option will pass "-O3" to your compiler to optimize
  1099. the kernel yet more for performance.
  1100. config CC_OPTIMIZE_FOR_SIZE
  1101. bool "Optimize for size (-Os)"
  1102. help
  1103. Choosing this option will pass "-Os" to your compiler resulting
  1104. in a smaller kernel.
  1105. endchoice
  1106. config HAVE_LD_DEAD_CODE_DATA_ELIMINATION
  1107. bool
  1108. help
  1109. This requires that the arch annotates or otherwise protects
  1110. its external entry points from being discarded. Linker scripts
  1111. must also merge .text.*, .data.*, and .bss.* correctly into
  1112. output sections. Care must be taken not to pull in unrelated
  1113. sections (e.g., '.text.init'). Typically '.' in section names
  1114. is used to distinguish them from label names / C identifiers.
  1115. config LD_DEAD_CODE_DATA_ELIMINATION
  1116. bool "Dead code and data elimination (EXPERIMENTAL)"
  1117. depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
  1118. depends on EXPERT
  1119. depends on $(cc-option,-ffunction-sections -fdata-sections)
  1120. depends on $(ld-option,--gc-sections)
  1121. help
  1122. Enable this if you want to do dead code and data elimination with
  1123. the linker by compiling with -ffunction-sections -fdata-sections,
  1124. and linking with --gc-sections.
  1125. This can reduce on disk and in-memory size of the kernel
  1126. code and static data, particularly for small configs and
  1127. on small systems. This has the possibility of introducing
  1128. silently broken kernel if the required annotations are not
  1129. present. This option is not well tested yet, so use at your
  1130. own risk.
  1131. config LD_ORPHAN_WARN
  1132. def_bool y
  1133. depends on ARCH_WANT_LD_ORPHAN_WARN
  1134. depends on !LD_IS_LLD || LLD_VERSION >= 110000
  1135. depends on $(ld-option,--orphan-handling=warn)
  1136. config SYSCTL
  1137. bool
  1138. config HAVE_UID16
  1139. bool
  1140. config SYSCTL_EXCEPTION_TRACE
  1141. bool
  1142. help
  1143. Enable support for /proc/sys/debug/exception-trace.
  1144. config SYSCTL_ARCH_UNALIGN_NO_WARN
  1145. bool
  1146. help
  1147. Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
  1148. Allows arch to define/use @no_unaligned_warning to possibly warn
  1149. about unaligned access emulation going on under the hood.
  1150. config SYSCTL_ARCH_UNALIGN_ALLOW
  1151. bool
  1152. help
  1153. Enable support for /proc/sys/kernel/unaligned-trap
  1154. Allows arches to define/use @unaligned_enabled to runtime toggle
  1155. the unaligned access emulation.
  1156. see arch/parisc/kernel/unaligned.c for reference
  1157. config HAVE_PCSPKR_PLATFORM
  1158. bool
  1159. # interpreter that classic socket filters depend on
  1160. config BPF
  1161. bool
  1162. menuconfig EXPERT
  1163. bool "Configure standard kernel features (expert users)"
  1164. # Unhide debug options, to make the on-by-default options visible
  1165. select DEBUG_KERNEL
  1166. help
  1167. This option allows certain base kernel options and settings
  1168. to be disabled or tweaked. This is for specialized
  1169. environments which can tolerate a "non-standard" kernel.
  1170. Only use this if you really know what you are doing.
  1171. config UID16
  1172. bool "Enable 16-bit UID system calls" if EXPERT
  1173. depends on HAVE_UID16 && MULTIUSER
  1174. default y
  1175. help
  1176. This enables the legacy 16-bit UID syscall wrappers.
  1177. config MULTIUSER
  1178. bool "Multiple users, groups and capabilities support" if EXPERT
  1179. default y
  1180. help
  1181. This option enables support for non-root users, groups and
  1182. capabilities.
  1183. If you say N here, all processes will run with UID 0, GID 0, and all
  1184. possible capabilities. Saying N here also compiles out support for
  1185. system calls related to UIDs, GIDs, and capabilities, such as setuid,
  1186. setgid, and capset.
  1187. If unsure, say Y here.
  1188. config SGETMASK_SYSCALL
  1189. bool "sgetmask/ssetmask syscalls support" if EXPERT
  1190. def_bool PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
  1191. help
  1192. sys_sgetmask and sys_ssetmask are obsolete system calls
  1193. no longer supported in libc but still enabled by default in some
  1194. architectures.
  1195. If unsure, leave the default option here.
  1196. config SYSFS_SYSCALL
  1197. bool "Sysfs syscall support" if EXPERT
  1198. default y
  1199. help
  1200. sys_sysfs is an obsolete system call no longer supported in libc.
  1201. Note that disabling this option is more secure but might break
  1202. compatibility with some systems.
  1203. If unsure say Y here.
  1204. config FHANDLE
  1205. bool "open by fhandle syscalls" if EXPERT
  1206. select EXPORTFS
  1207. default y
  1208. help
  1209. If you say Y here, a user level program will be able to map
  1210. file names to handle and then later use the handle for
  1211. different file system operations. This is useful in implementing
  1212. userspace file servers, which now track files using handles instead
  1213. of names. The handle would remain the same even if file names
  1214. get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
  1215. syscalls.
  1216. config POSIX_TIMERS
  1217. bool "Posix Clocks & timers" if EXPERT
  1218. default y
  1219. help
  1220. This includes native support for POSIX timers to the kernel.
  1221. Some embedded systems have no use for them and therefore they
  1222. can be configured out to reduce the size of the kernel image.
  1223. When this option is disabled, the following syscalls won't be
  1224. available: timer_create, timer_gettime: timer_getoverrun,
  1225. timer_settime, timer_delete, clock_adjtime, getitimer,
  1226. setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
  1227. clock_getres and clock_nanosleep syscalls will be limited to
  1228. CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
  1229. If unsure say y.
  1230. config PRINTK
  1231. default y
  1232. bool "Enable support for printk" if EXPERT
  1233. select IRQ_WORK
  1234. help
  1235. This option enables normal printk support. Removing it
  1236. eliminates most of the message strings from the kernel image
  1237. and makes the kernel more or less silent. As this makes it
  1238. very difficult to diagnose system problems, saying N here is
  1239. strongly discouraged.
  1240. config PRINTK_NMI
  1241. def_bool y
  1242. depends on PRINTK
  1243. depends on HAVE_NMI
  1244. config BUG
  1245. bool "BUG() support" if EXPERT
  1246. default y
  1247. help
  1248. Disabling this option eliminates support for BUG and WARN, reducing
  1249. the size of your kernel image and potentially quietly ignoring
  1250. numerous fatal conditions. You should only consider disabling this
  1251. option for embedded systems with no facilities for reporting errors.
  1252. Just say Y.
  1253. config ELF_CORE
  1254. depends on COREDUMP
  1255. default y
  1256. bool "Enable ELF core dumps" if EXPERT
  1257. help
  1258. Enable support for generating core dumps. Disabling saves about 4k.
  1259. config PCSPKR_PLATFORM
  1260. bool "Enable PC-Speaker support" if EXPERT
  1261. depends on HAVE_PCSPKR_PLATFORM
  1262. select I8253_LOCK
  1263. default y
  1264. help
  1265. This option allows to disable the internal PC-Speaker
  1266. support, saving some memory.
  1267. config BASE_FULL
  1268. default y
  1269. bool "Enable full-sized data structures for core" if EXPERT
  1270. help
  1271. Disabling this option reduces the size of miscellaneous core
  1272. kernel data structures. This saves memory on small machines,
  1273. but may reduce performance.
  1274. config FUTEX
  1275. bool "Enable futex support" if EXPERT
  1276. default y
  1277. imply RT_MUTEXES
  1278. help
  1279. Disabling this option will cause the kernel to be built without
  1280. support for "fast userspace mutexes". The resulting kernel may not
  1281. run glibc-based applications correctly.
  1282. config FUTEX_PI
  1283. bool
  1284. depends on FUTEX && RT_MUTEXES
  1285. default y
  1286. config HAVE_FUTEX_CMPXCHG
  1287. bool
  1288. depends on FUTEX
  1289. help
  1290. Architectures should select this if futex_atomic_cmpxchg_inatomic()
  1291. is implemented and always working. This removes a couple of runtime
  1292. checks.
  1293. config EPOLL
  1294. bool "Enable eventpoll support" if EXPERT
  1295. default y
  1296. help
  1297. Disabling this option will cause the kernel to be built without
  1298. support for epoll family of system calls.
  1299. config SIGNALFD
  1300. bool "Enable signalfd() system call" if EXPERT
  1301. default y
  1302. help
  1303. Enable the signalfd() system call that allows to receive signals
  1304. on a file descriptor.
  1305. If unsure, say Y.
  1306. config TIMERFD
  1307. bool "Enable timerfd() system call" if EXPERT
  1308. default y
  1309. help
  1310. Enable the timerfd() system call that allows to receive timer
  1311. events on a file descriptor.
  1312. If unsure, say Y.
  1313. config EVENTFD
  1314. bool "Enable eventfd() system call" if EXPERT
  1315. default y
  1316. help
  1317. Enable the eventfd() system call that allows to receive both
  1318. kernel notification (ie. KAIO) or userspace notifications.
  1319. If unsure, say Y.
  1320. config SHMEM
  1321. bool "Use full shmem filesystem" if EXPERT
  1322. default y
  1323. depends on MMU
  1324. help
  1325. The shmem is an internal filesystem used to manage shared memory.
  1326. It is backed by swap and manages resource limits. It is also exported
  1327. to userspace as tmpfs if TMPFS is enabled. Disabling this
  1328. option replaces shmem and tmpfs with the much simpler ramfs code,
  1329. which may be appropriate on small systems without swap.
  1330. config AIO
  1331. bool "Enable AIO support" if EXPERT
  1332. default y
  1333. help
  1334. This option enables POSIX asynchronous I/O which may by used
  1335. by some high performance threaded applications. Disabling
  1336. this option saves about 7k.
  1337. config IO_URING
  1338. bool "Enable IO uring support" if EXPERT
  1339. select IO_WQ
  1340. default y
  1341. help
  1342. This option enables support for the io_uring interface, enabling
  1343. applications to submit and complete IO through submission and
  1344. completion rings that are shared between the kernel and application.
  1345. config ADVISE_SYSCALLS
  1346. bool "Enable madvise/fadvise syscalls" if EXPERT
  1347. default y
  1348. help
  1349. This option enables the madvise and fadvise syscalls, used by
  1350. applications to advise the kernel about their future memory or file
  1351. usage, improving performance. If building an embedded system where no
  1352. applications use these syscalls, you can disable this option to save
  1353. space.
  1354. config HAVE_ARCH_USERFAULTFD_WP
  1355. bool
  1356. help
  1357. Arch has userfaultfd write protection support
  1358. config HAVE_ARCH_USERFAULTFD_MINOR
  1359. bool
  1360. help
  1361. Arch has userfaultfd minor fault support
  1362. config MEMBARRIER
  1363. bool "Enable membarrier() system call" if EXPERT
  1364. default y
  1365. help
  1366. Enable the membarrier() system call that allows issuing memory
  1367. barriers across all running threads, which can be used to distribute
  1368. the cost of user-space memory barriers asymmetrically by transforming
  1369. pairs of memory barriers into pairs consisting of membarrier() and a
  1370. compiler barrier.
  1371. If unsure, say Y.
  1372. config KALLSYMS
  1373. bool "Load all symbols for debugging/ksymoops" if EXPERT
  1374. default y
  1375. help
  1376. Say Y here to let the kernel print out symbolic crash information and
  1377. symbolic stack backtraces. This increases the size of the kernel
  1378. somewhat, as all symbols have to be loaded into the kernel image.
  1379. config KALLSYMS_ALL
  1380. bool "Include all symbols in kallsyms"
  1381. depends on DEBUG_KERNEL && KALLSYMS
  1382. help
  1383. Normally kallsyms only contains the symbols of functions for nicer
  1384. OOPS messages and backtraces (i.e., symbols from the text and inittext
  1385. sections). This is sufficient for most cases. And only in very rare
  1386. cases (e.g., when a debugger is used) all symbols are required (e.g.,
  1387. names of variables from the data sections, etc).
  1388. This option makes sure that all symbols are loaded into the kernel
  1389. image (i.e., symbols from all sections) in cost of increased kernel
  1390. size (depending on the kernel configuration, it may be 300KiB or
  1391. something like this).
  1392. Say N unless you really need all symbols.
  1393. config KALLSYMS_ABSOLUTE_PERCPU
  1394. bool
  1395. depends on KALLSYMS
  1396. default X86_64 && SMP
  1397. config KALLSYMS_BASE_RELATIVE
  1398. bool
  1399. depends on KALLSYMS
  1400. default !IA64
  1401. help
  1402. Instead of emitting them as absolute values in the native word size,
  1403. emit the symbol references in the kallsyms table as 32-bit entries,
  1404. each containing a relative value in the range [base, base + U32_MAX]
  1405. or, when KALLSYMS_ABSOLUTE_PERCPU is in effect, each containing either
  1406. an absolute value in the range [0, S32_MAX] or a relative value in the
  1407. range [base, base + S32_MAX], where base is the lowest relative symbol
  1408. address encountered in the image.
  1409. On 64-bit builds, this reduces the size of the address table by 50%,
  1410. but more importantly, it results in entries whose values are build
  1411. time constants, and no relocation pass is required at runtime to fix
  1412. up the entries based on the runtime load address of the kernel.
  1413. # end of the "standard kernel features (expert users)" menu
  1414. # syscall, maps, verifier
  1415. config BPF_LSM
  1416. bool "LSM Instrumentation with BPF"
  1417. depends on BPF_EVENTS
  1418. depends on BPF_SYSCALL
  1419. depends on SECURITY
  1420. depends on BPF_JIT
  1421. help
  1422. Enables instrumentation of the security hooks with eBPF programs for
  1423. implementing dynamic MAC and Audit Policies.
  1424. If you are unsure how to answer this question, answer N.
  1425. config BPF_SYSCALL
  1426. bool "Enable bpf() system call"
  1427. select BPF
  1428. select IRQ_WORK
  1429. select TASKS_TRACE_RCU
  1430. default n
  1431. help
  1432. Enable the bpf() system call that allows to manipulate eBPF
  1433. programs and maps via file descriptors.
  1434. config ARCH_WANT_DEFAULT_BPF_JIT
  1435. bool
  1436. config BPF_JIT_ALWAYS_ON
  1437. bool "Permanently enable BPF JIT and remove BPF interpreter"
  1438. depends on BPF_SYSCALL && HAVE_EBPF_JIT && BPF_JIT
  1439. help
  1440. Enables BPF JIT and removes BPF interpreter to avoid
  1441. speculative execution of BPF instructions by the interpreter
  1442. config BPF_JIT_DEFAULT_ON
  1443. def_bool ARCH_WANT_DEFAULT_BPF_JIT || BPF_JIT_ALWAYS_ON
  1444. depends on HAVE_EBPF_JIT && BPF_JIT
  1445. config BPF_UNPRIV_DEFAULT_OFF
  1446. bool "Disable unprivileged BPF by default"
  1447. depends on BPF_SYSCALL
  1448. help
  1449. Disables unprivileged BPF by default by setting the corresponding
  1450. /proc/sys/kernel/unprivileged_bpf_disabled knob to 2. An admin can
  1451. still reenable it by setting it to 0 later on, or permanently
  1452. disable it by setting it to 1 (from which no other transition to
  1453. 0 is possible anymore).
  1454. source "kernel/bpf/preload/Kconfig"
  1455. config USERFAULTFD
  1456. bool "Enable userfaultfd() system call"
  1457. depends on MMU
  1458. help
  1459. Enable the userfaultfd() system call that allows to intercept and
  1460. handle page faults in userland.
  1461. config ARCH_HAS_MEMBARRIER_CALLBACKS
  1462. bool
  1463. config ARCH_HAS_MEMBARRIER_SYNC_CORE
  1464. bool
  1465. config KCMP
  1466. bool "Enable kcmp() system call" if EXPERT
  1467. help
  1468. Enable the kernel resource comparison system call. It provides
  1469. user-space with the ability to compare two processes to see if they
  1470. share a common resource, such as a file descriptor or even virtual
  1471. memory space.
  1472. If unsure, say N.
  1473. config RSEQ
  1474. bool "Enable rseq() system call" if EXPERT
  1475. default y
  1476. depends on HAVE_RSEQ
  1477. select MEMBARRIER
  1478. help
  1479. Enable the restartable sequences system call. It provides a
  1480. user-space cache for the current CPU number value, which
  1481. speeds up getting the current CPU number from user-space,
  1482. as well as an ABI to speed up user-space operations on
  1483. per-CPU data.
  1484. If unsure, say Y.
  1485. config DEBUG_RSEQ
  1486. default n
  1487. bool "Enabled debugging of rseq() system call" if EXPERT
  1488. depends on RSEQ && DEBUG_KERNEL
  1489. help
  1490. Enable extra debugging checks for the rseq system call.
  1491. If unsure, say N.
  1492. config EMBEDDED
  1493. bool "Embedded system"
  1494. option allnoconfig_y
  1495. select EXPERT
  1496. help
  1497. This option should be enabled if compiling the kernel for
  1498. an embedded system so certain expert options are available
  1499. for configuration.
  1500. config HAVE_PERF_EVENTS
  1501. bool
  1502. help
  1503. See tools/perf/design.txt for details.
  1504. config PERF_USE_VMALLOC
  1505. bool
  1506. help
  1507. See tools/perf/design.txt for details
  1508. config PC104
  1509. bool "PC/104 support" if EXPERT
  1510. help
  1511. Expose PC/104 form factor device drivers and options available for
  1512. selection and configuration. Enable this option if your target
  1513. machine has a PC/104 bus.
  1514. menu "Kernel Performance Events And Counters"
  1515. config PERF_EVENTS
  1516. bool "Kernel performance events and counters"
  1517. default y if PROFILING
  1518. depends on HAVE_PERF_EVENTS
  1519. select IRQ_WORK
  1520. select SRCU
  1521. help
  1522. Enable kernel support for various performance events provided
  1523. by software and hardware.
  1524. Software events are supported either built-in or via the
  1525. use of generic tracepoints.
  1526. Most modern CPUs support performance events via performance
  1527. counter registers. These registers count the number of certain
  1528. types of hw events: such as instructions executed, cachemisses
  1529. suffered, or branches mis-predicted - without slowing down the
  1530. kernel or applications. These registers can also trigger interrupts
  1531. when a threshold number of events have passed - and can thus be
  1532. used to profile the code that runs on that CPU.
  1533. The Linux Performance Event subsystem provides an abstraction of
  1534. these software and hardware event capabilities, available via a
  1535. system call and used by the "perf" utility in tools/perf/. It
  1536. provides per task and per CPU counters, and it provides event
  1537. capabilities on top of those.
  1538. Say Y if unsure.
  1539. config DEBUG_PERF_USE_VMALLOC
  1540. default n
  1541. bool "Debug: use vmalloc to back perf mmap() buffers"
  1542. depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
  1543. select PERF_USE_VMALLOC
  1544. help
  1545. Use vmalloc memory to back perf mmap() buffers.
  1546. Mostly useful for debugging the vmalloc code on platforms
  1547. that don't require it.
  1548. Say N if unsure.
  1549. endmenu
  1550. config VM_EVENT_COUNTERS
  1551. default y
  1552. bool "Enable VM event counters for /proc/vmstat" if EXPERT
  1553. help
  1554. VM event counters are needed for event counts to be shown.
  1555. This option allows the disabling of the VM event counters
  1556. on EXPERT systems. /proc/vmstat will only show page counts
  1557. if VM event counters are disabled.
  1558. config SLUB_DEBUG
  1559. default y
  1560. bool "Enable SLUB debugging support" if EXPERT
  1561. depends on SLUB && SYSFS
  1562. help
  1563. SLUB has extensive debug support features. Disabling these can
  1564. result in significant savings in code size. This also disables
  1565. SLUB sysfs support. /sys/slab will not exist and there will be
  1566. no support for cache validation etc.
  1567. config SLUB_MEMCG_SYSFS_ON
  1568. default n
  1569. bool "Enable memcg SLUB sysfs support by default" if EXPERT
  1570. depends on SLUB && SYSFS && MEMCG
  1571. help
  1572. SLUB creates a directory under /sys/kernel/slab for each
  1573. allocation cache to host info and debug files. If memory
  1574. cgroup is enabled, each cache can have per memory cgroup
  1575. caches. SLUB can create the same sysfs directories for these
  1576. caches under /sys/kernel/slab/CACHE/cgroup but it can lead
  1577. to a very high number of debug files being created. This is
  1578. controlled by slub_memcg_sysfs boot parameter and this
  1579. config option determines the parameter's default value.
  1580. config COMPAT_BRK
  1581. bool "Disable heap randomization"
  1582. default y
  1583. help
  1584. Randomizing heap placement makes heap exploits harder, but it
  1585. also breaks ancient binaries (including anything libc5 based).
  1586. This option changes the bootup default to heap randomization
  1587. disabled, and can be overridden at runtime by setting
  1588. /proc/sys/kernel/randomize_va_space to 2.
  1589. On non-ancient distros (post-2000 ones) N is usually a safe choice.
  1590. choice
  1591. prompt "Choose SLAB allocator"
  1592. default SLUB
  1593. help
  1594. This option allows to select a slab allocator.
  1595. config SLAB
  1596. bool "SLAB"
  1597. select HAVE_HARDENED_USERCOPY_ALLOCATOR
  1598. help
  1599. The regular slab allocator that is established and known to work
  1600. well in all environments. It organizes cache hot objects in
  1601. per cpu and per node queues.
  1602. config SLUB
  1603. bool "SLUB (Unqueued Allocator)"
  1604. select HAVE_HARDENED_USERCOPY_ALLOCATOR
  1605. help
  1606. SLUB is a slab allocator that minimizes cache line usage
  1607. instead of managing queues of cached objects (SLAB approach).
  1608. Per cpu caching is realized using slabs of objects instead
  1609. of queues of objects. SLUB can use memory efficiently
  1610. and has enhanced diagnostics. SLUB is the default choice for
  1611. a slab allocator.
  1612. config SLOB
  1613. depends on EXPERT
  1614. bool "SLOB (Simple Allocator)"
  1615. help
  1616. SLOB replaces the stock allocator with a drastically simpler
  1617. allocator. SLOB is generally more space efficient but
  1618. does not perform as well on large systems.
  1619. endchoice
  1620. config SLAB_MERGE_DEFAULT
  1621. bool "Allow slab caches to be merged"
  1622. default y
  1623. help
  1624. For reduced kernel memory fragmentation, slab caches can be
  1625. merged when they share the same size and other characteristics.
  1626. This carries a risk of kernel heap overflows being able to
  1627. overwrite objects from merged caches (and more easily control
  1628. cache layout), which makes such heap attacks easier to exploit
  1629. by attackers. By keeping caches unmerged, these kinds of exploits
  1630. can usually only damage objects in the same cache. To disable
  1631. merging at runtime, "slab_nomerge" can be passed on the kernel
  1632. command line.
  1633. config SLAB_FREELIST_RANDOM
  1634. bool "Randomize slab freelist"
  1635. depends on SLAB || SLUB
  1636. help
  1637. Randomizes the freelist order used on creating new pages. This
  1638. security feature reduces the predictability of the kernel slab
  1639. allocator against heap overflows.
  1640. config SLAB_FREELIST_HARDENED
  1641. bool "Harden slab freelist metadata"
  1642. depends on SLAB || SLUB
  1643. help
  1644. Many kernel heap attacks try to target slab cache metadata and
  1645. other infrastructure. This options makes minor performance
  1646. sacrifices to harden the kernel slab allocator against common
  1647. freelist exploit methods. Some slab implementations have more
  1648. sanity-checking than others. This option is most effective with
  1649. CONFIG_SLUB.
  1650. config SHUFFLE_PAGE_ALLOCATOR
  1651. bool "Page allocator randomization"
  1652. default SLAB_FREELIST_RANDOM && ACPI_NUMA
  1653. help
  1654. Randomization of the page allocator improves the average
  1655. utilization of a direct-mapped memory-side-cache. See section
  1656. 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
  1657. 6.2a specification for an example of how a platform advertises
  1658. the presence of a memory-side-cache. There are also incidental
  1659. security benefits as it reduces the predictability of page
  1660. allocations to compliment SLAB_FREELIST_RANDOM, but the
  1661. default granularity of shuffling on the "MAX_ORDER - 1" i.e,
  1662. 10th order of pages is selected based on cache utilization
  1663. benefits on x86.
  1664. While the randomization improves cache utilization it may
  1665. negatively impact workloads on platforms without a cache. For
  1666. this reason, by default, the randomization is enabled only
  1667. after runtime detection of a direct-mapped memory-side-cache.
  1668. Otherwise, the randomization may be force enabled with the
  1669. 'page_alloc.shuffle' kernel command line parameter.
  1670. Say Y if unsure.
  1671. config SLUB_CPU_PARTIAL
  1672. default y
  1673. depends on SLUB && SMP
  1674. bool "SLUB per cpu partial cache"
  1675. help
  1676. Per cpu partial caches accelerate objects allocation and freeing
  1677. that is local to a processor at the price of more indeterminism
  1678. in the latency of the free. On overflow these caches will be cleared
  1679. which requires the taking of locks that may cause latency spikes.
  1680. Typically one would choose no for a realtime system.
  1681. config MMAP_ALLOW_UNINITIALIZED
  1682. bool "Allow mmapped anonymous memory to be uninitialized"
  1683. depends on EXPERT && !MMU
  1684. default n
  1685. help
  1686. Normally, and according to the Linux spec, anonymous memory obtained
  1687. from mmap() has its contents cleared before it is passed to
  1688. userspace. Enabling this config option allows you to request that
  1689. mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus
  1690. providing a huge performance boost. If this option is not enabled,
  1691. then the flag will be ignored.
  1692. This is taken advantage of by uClibc's malloc(), and also by
  1693. ELF-FDPIC binfmt's brk and stack allocator.
  1694. Because of the obvious security issues, this option should only be
  1695. enabled on embedded devices where you control what is run in
  1696. userspace. Since that isn't generally a problem on no-MMU systems,
  1697. it is normally safe to say Y here.
  1698. See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
  1699. config SYSTEM_DATA_VERIFICATION
  1700. def_bool n
  1701. select SYSTEM_TRUSTED_KEYRING
  1702. select KEYS
  1703. select CRYPTO
  1704. select CRYPTO_RSA
  1705. select ASYMMETRIC_KEY_TYPE
  1706. select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
  1707. select ASN1
  1708. select OID_REGISTRY
  1709. select X509_CERTIFICATE_PARSER
  1710. select PKCS7_MESSAGE_PARSER
  1711. help
  1712. Provide PKCS#7 message verification using the contents of the system
  1713. trusted keyring to provide public keys. This then can be used for
  1714. module verification, kexec image verification and firmware blob
  1715. verification.
  1716. config PROFILING
  1717. bool "Profiling support"
  1718. help
  1719. Say Y here to enable the extended profiling support mechanisms used
  1720. by profilers such as OProfile.
  1721. #
  1722. # Place an empty function call at each tracepoint site. Can be
  1723. # dynamically changed for a probe function.
  1724. #
  1725. config TRACEPOINTS
  1726. bool
  1727. endmenu # General setup
  1728. source "arch/Kconfig"
  1729. config RT_MUTEXES
  1730. bool
  1731. config BASE_SMALL
  1732. int
  1733. default 0 if BASE_FULL
  1734. default 1 if !BASE_FULL
  1735. config MODULE_SIG_FORMAT
  1736. def_bool n
  1737. select SYSTEM_DATA_VERIFICATION
  1738. menuconfig MODULES
  1739. bool "Enable loadable module support"
  1740. option modules
  1741. help
  1742. Kernel modules are small pieces of compiled code which can
  1743. be inserted in the running kernel, rather than being
  1744. permanently built into the kernel. You use the "modprobe"
  1745. tool to add (and sometimes remove) them. If you say Y here,
  1746. many parts of the kernel can be built as modules (by
  1747. answering M instead of Y where indicated): this is most
  1748. useful for infrequently used options which are not required
  1749. for booting. For more information, see the man pages for
  1750. modprobe, lsmod, modinfo, insmod and rmmod.
  1751. If you say Y here, you will need to run "make
  1752. modules_install" to put the modules under /lib/modules/
  1753. where modprobe can find them (you may need to be root to do
  1754. this).
  1755. If unsure, say Y.
  1756. if MODULES
  1757. config MODULE_FORCE_LOAD
  1758. bool "Forced module loading"
  1759. default n
  1760. help
  1761. Allow loading of modules without version information (ie. modprobe
  1762. --force). Forced module loading sets the 'F' (forced) taint flag and
  1763. is usually a really bad idea.
  1764. config MODULE_UNLOAD
  1765. bool "Module unloading"
  1766. help
  1767. Without this option you will not be able to unload any
  1768. modules (note that some modules may not be unloadable
  1769. anyway), which makes your kernel smaller, faster
  1770. and simpler. If unsure, say Y.
  1771. config MODULE_FORCE_UNLOAD
  1772. bool "Forced module unloading"
  1773. depends on MODULE_UNLOAD
  1774. help
  1775. This option allows you to force a module to unload, even if the
  1776. kernel believes it is unsafe: the kernel will remove the module
  1777. without waiting for anyone to stop using it (using the -f option to
  1778. rmmod). This is mainly for kernel developers and desperate users.
  1779. If unsure, say N.
  1780. config MODVERSIONS
  1781. bool "Module versioning support"
  1782. help
  1783. Usually, you have to use modules compiled with your kernel.
  1784. Saying Y here makes it sometimes possible to use modules
  1785. compiled for different kernels, by adding enough information
  1786. to the modules to (hopefully) spot any changes which would
  1787. make them incompatible with the kernel you are running. If
  1788. unsure, say N.
  1789. config ASM_MODVERSIONS
  1790. bool
  1791. default HAVE_ASM_MODVERSIONS && MODVERSIONS
  1792. help
  1793. This enables module versioning for exported symbols also from
  1794. assembly. This can be enabled only when the target architecture
  1795. supports it.
  1796. config MODULE_REL_CRCS
  1797. bool
  1798. depends on MODVERSIONS
  1799. config MODULE_SRCVERSION_ALL
  1800. bool "Source checksum for all modules"
  1801. help
  1802. Modules which contain a MODULE_VERSION get an extra "srcversion"
  1803. field inserted into their modinfo section, which contains a
  1804. sum of the source files which made it. This helps maintainers
  1805. see exactly which source was used to build a module (since
  1806. others sometimes change the module source without updating
  1807. the version). With this option, such a "srcversion" field
  1808. will be created for all modules. If unsure, say N.
  1809. config MODULE_SCMVERSION
  1810. bool "SCM version for modules"
  1811. depends on LOCALVERSION_AUTO
  1812. help
  1813. This enables the module attribute "scmversion" which can be used
  1814. by developers to identify the SCM version of a given module, e.g.
  1815. git sha1 or hg sha1. The SCM version can be queried by modinfo or
  1816. via the sysfs node: /sys/modules/MODULENAME/scmversion. This is
  1817. useful when the kernel or kernel modules are updated separately
  1818. since that causes the vermagic of the kernel and the module to
  1819. differ.
  1820. If unsure, say N.
  1821. config MODULE_SIG
  1822. bool "Module signature verification"
  1823. select MODULE_SIG_FORMAT
  1824. help
  1825. Check modules for valid signatures upon load: the signature
  1826. is simply appended to the module. For more information see
  1827. <file:Documentation/admin-guide/module-signing.rst>.
  1828. Note that this option adds the OpenSSL development packages as a
  1829. kernel build dependency so that the signing tool can use its crypto
  1830. library.
  1831. You should enable this option if you wish to use either
  1832. CONFIG_SECURITY_LOCKDOWN_LSM or lockdown functionality imposed via
  1833. another LSM - otherwise unsigned modules will be loadable regardless
  1834. of the lockdown policy.
  1835. !!!WARNING!!! If you enable this option, you MUST make sure that the
  1836. module DOES NOT get stripped after being signed. This includes the
  1837. debuginfo strip done by some packagers (such as rpmbuild) and
  1838. inclusion into an initramfs that wants the module size reduced.
  1839. config MODULE_SIG_FORCE
  1840. bool "Require modules to be validly signed"
  1841. depends on MODULE_SIG
  1842. help
  1843. Reject unsigned modules or signed modules for which we don't have a
  1844. key. Without this, such modules will simply taint the kernel.
  1845. config MODULE_SIG_ALL
  1846. bool "Automatically sign all modules"
  1847. default y
  1848. depends on MODULE_SIG
  1849. help
  1850. Sign all modules during make modules_install. Without this option,
  1851. modules must be signed manually, using the scripts/sign-file tool.
  1852. comment "Do not forget to sign required modules with scripts/sign-file"
  1853. depends on MODULE_SIG_FORCE && !MODULE_SIG_ALL
  1854. choice
  1855. prompt "Which hash algorithm should modules be signed with?"
  1856. depends on MODULE_SIG
  1857. help
  1858. This determines which sort of hashing algorithm will be used during
  1859. signature generation. This algorithm _must_ be built into the kernel
  1860. directly so that signature verification can take place. It is not
  1861. possible to load a signed module containing the algorithm to check
  1862. the signature on that module.
  1863. config MODULE_SIG_SHA1
  1864. bool "Sign modules with SHA-1"
  1865. select CRYPTO_SHA1
  1866. config MODULE_SIG_SHA224
  1867. bool "Sign modules with SHA-224"
  1868. select CRYPTO_SHA256
  1869. config MODULE_SIG_SHA256
  1870. bool "Sign modules with SHA-256"
  1871. select CRYPTO_SHA256
  1872. config MODULE_SIG_SHA384
  1873. bool "Sign modules with SHA-384"
  1874. select CRYPTO_SHA512
  1875. config MODULE_SIG_SHA512
  1876. bool "Sign modules with SHA-512"
  1877. select CRYPTO_SHA512
  1878. endchoice
  1879. config MODULE_SIG_HASH
  1880. string
  1881. depends on MODULE_SIG
  1882. default "sha1" if MODULE_SIG_SHA1
  1883. default "sha224" if MODULE_SIG_SHA224
  1884. default "sha256" if MODULE_SIG_SHA256
  1885. default "sha384" if MODULE_SIG_SHA384
  1886. default "sha512" if MODULE_SIG_SHA512
  1887. config MODULE_COMPRESS
  1888. bool "Compress modules on installation"
  1889. help
  1890. Compresses kernel modules when 'make modules_install' is run; gzip or
  1891. xz depending on "Compression algorithm" below.
  1892. module-init-tools MAY support gzip, and kmod MAY support gzip and xz.
  1893. Out-of-tree kernel modules installed using Kbuild will also be
  1894. compressed upon installation.
  1895. Note: for modules inside an initrd or initramfs, it's more efficient
  1896. to compress the whole initrd or initramfs instead.
  1897. Note: This is fully compatible with signed modules.
  1898. If in doubt, say N.
  1899. choice
  1900. prompt "Compression algorithm"
  1901. depends on MODULE_COMPRESS
  1902. default MODULE_COMPRESS_GZIP
  1903. help
  1904. This determines which sort of compression will be used during
  1905. 'make modules_install'.
  1906. GZIP (default) and XZ are supported.
  1907. config MODULE_COMPRESS_GZIP
  1908. bool "GZIP"
  1909. config MODULE_COMPRESS_XZ
  1910. bool "XZ"
  1911. endchoice
  1912. config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
  1913. bool "Allow loading of modules with missing namespace imports"
  1914. help
  1915. Symbols exported with EXPORT_SYMBOL_NS*() are considered exported in
  1916. a namespace. A module that makes use of a symbol exported with such a
  1917. namespace is required to import the namespace via MODULE_IMPORT_NS().
  1918. There is no technical reason to enforce correct namespace imports,
  1919. but it creates consistency between symbols defining namespaces and
  1920. users importing namespaces they make use of. This option relaxes this
  1921. requirement and lifts the enforcement when loading a module.
  1922. If unsure, say N.
  1923. config UNUSED_SYMBOLS
  1924. bool "Enable unused/obsolete exported symbols"
  1925. default y if X86
  1926. help
  1927. Unused but exported symbols make the kernel needlessly bigger. For
  1928. that reason most of these unused exports will soon be removed. This
  1929. option is provided temporarily to provide a transition period in case
  1930. some external kernel module needs one of these symbols anyway. If you
  1931. encounter such a case in your module, consider if you are actually
  1932. using the right API. (rationale: since nobody in the kernel is using
  1933. this in a module, there is a pretty good chance it's actually the
  1934. wrong interface to use). If you really need the symbol, please send a
  1935. mail to the linux kernel mailing list mentioning the symbol and why
  1936. you really need it, and what the merge plan to the mainline kernel for
  1937. your module is.
  1938. config TRIM_UNUSED_KSYMS
  1939. bool "Trim unused exported kernel symbols"
  1940. depends on !UNUSED_SYMBOLS
  1941. help
  1942. The kernel and some modules make many symbols available for
  1943. other modules to use via EXPORT_SYMBOL() and variants. Depending
  1944. on the set of modules being selected in your kernel configuration,
  1945. many of those exported symbols might never be used.
  1946. This option allows for unused exported symbols to be dropped from
  1947. the build. In turn, this provides the compiler more opportunities
  1948. (especially when using LTO) for optimizing the code and reducing
  1949. binary size. This might have some security advantages as well.
  1950. If unsure, or if you need to build out-of-tree modules, say N.
  1951. config UNUSED_KSYMS_WHITELIST
  1952. string "Whitelist of symbols to keep in ksymtab"
  1953. depends on TRIM_UNUSED_KSYMS
  1954. help
  1955. By default, all unused exported symbols will be un-exported from the
  1956. build when TRIM_UNUSED_KSYMS is selected.
  1957. UNUSED_KSYMS_WHITELIST allows to whitelist symbols that must be kept
  1958. exported at all times, even in absence of in-tree users. The value to
  1959. set here is the path to a text file containing the list of symbols,
  1960. one per line. The path can be absolute, or relative to the kernel
  1961. source tree.
  1962. endif # MODULES
  1963. config MODULES_TREE_LOOKUP
  1964. def_bool y
  1965. depends on PERF_EVENTS || TRACING || CFI_CLANG
  1966. config INIT_ALL_POSSIBLE
  1967. bool
  1968. help
  1969. Back when each arch used to define their own cpu_online_mask and
  1970. cpu_possible_mask, some of them chose to initialize cpu_possible_mask
  1971. with all 1s, and others with all 0s. When they were centralised,
  1972. it was better to provide this option than to break all the archs
  1973. and have several arch maintainers pursuing me down dark alleys.
  1974. source "block/Kconfig"
  1975. config PREEMPT_NOTIFIERS
  1976. bool
  1977. config PADATA
  1978. depends on SMP
  1979. bool
  1980. config ASN1
  1981. tristate
  1982. help
  1983. Build a simple ASN.1 grammar compiler that produces a bytecode output
  1984. that can be interpreted by the ASN.1 stream decoder and used to
  1985. inform it as to what tags are to be expected in a stream and what
  1986. functions to call on what tags.
  1987. source "kernel/Kconfig.locks"
  1988. config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
  1989. bool
  1990. config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
  1991. bool
  1992. # It may be useful for an architecture to override the definitions of the
  1993. # SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
  1994. # and the COMPAT_ variants in <linux/compat.h>, in particular to use a
  1995. # different calling convention for syscalls. They can also override the
  1996. # macros for not-implemented syscalls in kernel/sys_ni.c and
  1997. # kernel/time/posix-stubs.c. All these overrides need to be available in
  1998. # <asm/syscall_wrapper.h>.
  1999. config ARCH_HAS_SYSCALL_WRAPPER
  2000. def_bool n
  2001. source "init/Kconfig.gki"